filer/dist/filer.min.js

5 lines
108 KiB
JavaScript
Raw Normal View History

2014-05-16 17:18:13 +00:00
/*! filer 2014-05-16 */
(function(t,n){"object"==typeof exports?module.exports=n():"function"==typeof define&&define.amd?define(n):t.Filer||(t.Filer=n())})(this,function(){var t,n,e;(function(r){function i(t,n){return w.call(t,n)}function o(t,n){var e,r,i,o,s,a,c,u,f,l,h=n&&n.split("/"),p=y.map,d=p&&p["*"]||{};if(t&&"."===t.charAt(0))if(n){for(h=h.slice(0,h.length-1),t=h.concat(t.split("/")),u=0;t.length>u;u+=1)if(l=t[u],"."===l)t.splice(u,1),u-=1;else if(".."===l){if(1===u&&(".."===t[2]||".."===t[0]))break;u>0&&(t.splice(u-1,2),u-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((h||d)&&p){for(e=t.split("/"),u=e.length;u>0;u-=1){if(r=e.slice(0,u).join("/"),h)for(f=h.length;f>0;f-=1)if(i=p[h.slice(0,f).join("/")],i&&(i=i[r])){o=i,s=u;break}if(o)break;!a&&d&&d[r]&&(a=d[r],c=u)}!o&&a&&(o=a,s=c),o&&(e.splice(0,s,o),t=e.join("/"))}return t}function s(t,n){return function(){return p.apply(r,b.call(arguments,0).concat([t,n]))}}function a(t){return function(n){return o(n,t)}}function c(t){return function(n){v[t]=n}}function u(t){if(i(m,t)){var n=m[t];delete m[t],E[t]=!0,h.apply(r,n)}if(!i(v,t)&&!i(E,t))throw Error("No "+t);return v[t]}function f(t){var n,e=t?t.indexOf("!"):-1;return e>-1&&(n=t.substring(0,e),t=t.substring(e+1,t.length)),[n,t]}function l(t){return function(){return y&&y.config&&y.config[t]||{}}}var h,p,d,g,v={},m={},y={},E={},w=Object.prototype.hasOwnProperty,b=[].slice;d=function(t,n){var e,r=f(t),i=r[0];return t=r[1],i&&(i=o(i,n),e=u(i)),i?t=e&&e.normalize?e.normalize(t,a(n)):o(t,n):(t=o(t,n),r=f(t),i=r[0],t=r[1],i&&(e=u(i))),{f:i?i+"!"+t:t,n:t,pr:i,p:e}},g={require:function(t){return s(t)},exports:function(t){var n=v[t];return n!==void 0?n:v[t]={}},module:function(t){return{id:t,uri:"",exports:v[t],config:l(t)}}},h=function(t,n,e,o){var a,f,l,h,p,y,w=[];if(o=o||t,"function"==typeof e){for(n=!n.length&&e.length?["require","exports","module"]:n,p=0;n.length>p;p+=1)if(h=d(n[p],o),f=h.f,"require"===f)w[p]=g.require(t);else if("exports"===f)w[p]=g.exports(t),y=!0;else if("module"===f)a=w[p]=g.module(t);else if(i(v,f)||i(m,f)||i(E,f))w[p]=u(f);else{if(!h.p)throw Error(t+" missing "+f);h.p.load(h.n,s(o,!0),c(f),{}),w[p]=v[f]}l=e.apply(v[t],w),t&&(a&&a.exports!==r&&a.exports!==v[t]?v[t]=a.exports:l===r&&y||(v[t]=l))}else t&&(v[t]=e)},t=n=p=function(t,n,e,i,o){return"string"==typeof t?g[t]?g[t](n):u(d(t,n).f):(t.splice||(y=t,n.splice?(t=n,n=e,e=null):t=r),n=n||function(){},"function"==typeof e&&(e=i,i=o),i?h(r,t,n,e):setTimeout(function(){h(r,t,n,e)},4),p)},p.config=function(t){return y=t,y.deps&&p(y.deps,y.callback),p},e=function(t,n,e){n.splice||(e=n,n=[]),i(v,t)||i(m,t)||(m[t]=[t,n,e])},e.amd={jQuery:!0}})(),e("build/almond",function(){}),e("nodash",["require"],function(){function t(t,n){return p.call(t,n)}function n(t){return null==t?0:t.length===+t.length?t.length:v(t).length}function e(t){return t}function r(t,n,e){var r,i;if(null!=t)if(u&&t.forEach===u)t.forEach(n,e);else if(t.length===+t.length){for(r=0,i=t.length;i>r;r++)if(n.call(e,t[r],r,t)===g)return}else{var o=o(t);for(r=0,i=o.length;i>r;r++)if(n.call(e,t[o[r]],o[r],t)===g)return}}function i(t,n,i){n||(n=e);var o=!1;return null==t?o:l&&t.some===l?t.some(n,i):(r(t,function(t,e,r){return o||(o=n.call(i,t,e,r))?g:void 0}),!!o)}function o(t,n){return null==t?!1:f&&t.indexOf===f?-1!=t.indexOf(n):i(t,function(t){return t===n})}function s(t){this.value=t}function a(t){return t&&"object"==typeof t&&!Array.isArray(t)&&p.call(t,"__wrapped__")?t:new s(t)}var c=Array.prototype,u=c.forEach,f=c.indexOf,l=c.some,h=Object.prototype,p=h.hasOwnProperty,d=Object.keys,g={},v=d||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var e=[];for(var r in n)t(n,r)&&e.push(r);return e};return s.prototype.has=function(n){return t(this.value,n)},s.prototype.contains=function(t){return o(this.value,t)},s.prototype.size=function(){return n(this.value)},a}),e("src/path",[],function(){function t(t,n){for(var e=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),e++):e&&(t.splice(r,1),e--)}if(n)for(;e--;e)t.unshift("..");return t}function n(){for(var
if(!A){for(s=0;285>=s;)y[s++]=0;for(s=0;29>=s;)E[s++]=0}for(y[256]=1,i=0,o=e.length;o>i;++i){for(s=u=0,a=3;a>s&&i+s!==o;++s)u=u<<8|e[i+s];if(d[u]===w&&(d[u]=[]),f=d[u],!(m-->0)){for(;f.length>0&&i-f[0]>32768;)f.shift();if(i+3>=o){for(h&&r(h,-1),s=0,a=o-i;a>s;++s)p=e[i+s],g[v++]=p,++y[p];break}f.length>0?(l=c(e,i,f),h?h.length<l.length?(p=e[i-1],g[v++]=p,++y[p],r(l,0)):r(h,-1):_>l.length?h=l:r(l,0)):h?r(h,-1):(p=e[i],g[v++]=p,++y[p])}f.push(i)}return g[v++]=256,y[256]++,n.L=y,n.K=E,A?g.subarray(0,v):g}function c(t,n,e){var r,i,o,a,c,u,f=0,l=t.length;a=0,u=e.length;t:for(;u>a;a++){if(r=e[u-a-1],o=3,f>3){for(c=f;c>3;c--)if(t[r+c-1]!==t[n+c-1])continue t;o=f}for(;258>o&&l>n+o&&t[r+o]===t[n+o];)++o;if(o>f&&(i=r,f=o),258===o)break}return new s(f,n-i)}function u(t,n){var e,i,o,s,a,c=t.length,u=new r(572),l=new(A?Uint8Array:Array)(c);if(!A)for(s=0;c>s;s++)l[s]=0;for(s=0;c>s;++s)t[s]>0&&u.push(s,t[s]);if(e=Array(u.length/2),i=new(A?Uint32Array:Array)(u.length/2),1===e.length)return l[u.pop().index]=1,l;for(s=0,a=u.length/2;a>s;++s)e[s]=u.pop(),i[s]=e[s].value;for(o=f(i,i.length,n),s=0,a=e.length;a>s;++s)l[e[s].index]=o[s];return l}function f(t,n,e){function r(t){var e=p[t][d[t]];e===n?(r(t+1),r(t+1)):--l[e],++d[t]}var i,o,s,a,c,u=new(A?Uint16Array:Array)(e),f=new(A?Uint8Array:Array)(e),l=new(A?Uint8Array:Array)(n),h=Array(e),p=Array(e),d=Array(e),g=(1<<e)-n,v=1<<e-1;for(u[e-1]=n,o=0;e>o;++o)v>g?f[o]=0:(f[o]=1,g-=v),g<<=1,u[e-2-o]=(0|u[e-1-o]/2)+n;for(u[0]=f[0],h[0]=Array(u[0]),p[0]=Array(u[0]),o=1;e>o;++o)u[o]>2*u[o-1]+f[o]&&(u[o]=2*u[o-1]+f[o]),h[o]=Array(u[o]),p[o]=Array(u[o]);for(i=0;n>i;++i)l[i]=e;for(s=0;u[e-1]>s;++s)h[e-1][s]=t[s],p[e-1][s]=s;for(i=0;e>i;++i)d[i]=0;for(1===f[e-1]&&(--l[0],++d[e-1]),o=e-2;o>=0;--o){for(a=i=0,c=d[o+1],s=0;u[o]>s;s++)a=h[o+1][c]+h[o+1][c+1],a>t[i]?(h[o][s]=a,p[o][s]=n,c+=2):(h[o][s]=t[i],p[o][s]=i,++i);d[o]=0,1===f[o]&&r(o)}return l}function l(t){var n,e,r,i,o=new(A?Uint16Array:Array)(t.length),s=[],a=[],c=0;for(n=0,e=t.length;e>n;n++)s[t[n]]=(0|s[t[n]])+1;for(n=1,e=16;e>=n;n++)a[n]=c,c+=0|s[n],c<<=1;for(n=0,e=t.length;e>n;n++)for(c=a[t[n]],a[t[n]]+=1,r=o[n]=0,i=t[n];i>r;r++)o[n]=o[n]<<1|1&c,c>>>=1;return o}function h(n,e){switch(this.l=[],this.m=32768,this.e=this.g=this.c=this.q=0,this.input=A?new Uint8Array(n):n,this.s=!1,this.n=F,this.B=!1,(e||!(e={}))&&(e.index&&(this.c=e.index),e.bufferSize&&(this.m=e.bufferSize),e.bufferType&&(this.n=e.bufferType),e.resize&&(this.B=e.resize)),this.n){case L:this.b=32768,this.a=new(A?Uint8Array:Array)(32768+this.m+258);break;case F:this.b=0,this.a=new(A?Uint8Array:Array)(this.m),this.f=this.J,this.t=this.H,this.o=this.I;break;default:t(Error("invalid inflate mode"))}}function p(n,e){for(var r,i=n.g,o=n.e,s=n.input,a=n.c;e>o;)r=s[a++],r===w&&t(Error("input buffer is broken")),i|=r<<o,o+=8;return r=i&(1<<e)-1,n.g=i>>>e,n.e=o-e,n.c=a,r}function d(t,n){for(var e,r,i,o=t.g,s=t.e,a=t.input,c=t.c,u=n[0],f=n[1];f>s&&(e=a[c++],e!==w);)o|=e<<s,s+=8;return r=u[o&(1<<f)-1],i=r>>>16,t.g=o>>i,t.e=s-i,t.c=c,65535&r}function g(t){function n(t,n,e){var r,i,o,s;for(s=0;t>s;)switch(r=d(this,n)){case 16:for(o=3+p(this,2);o--;)e[s++]=i;break;case 17:for(o=3+p(this,3);o--;)e[s++]=0;i=0;break;case 18:for(o=11+p(this,7);o--;)e[s++]=0;i=0;break;default:i=e[s++]=r}return e}var e,r,o,s,a=p(t,5)+257,c=p(t,5)+1,u=p(t,4)+4,f=new(A?Uint8Array:Array)(V.length);for(s=0;u>s;++s)f[V[s]]=p(t,3);e=i(f),r=new(A?Uint8Array:Array)(a),o=new(A?Uint8Array:Array)(c),t.o(i(n.call(t,a,e,r)),i(n.call(t,c,e,o)))}function v(t){if("string"==typeof t){var n,e,r=t.split("");for(n=0,e=r.length;e>n;n++)r[n]=(255&r[n].charCodeAt(0))>>>0;t=r}for(var i,o=1,s=0,a=t.length,c=0;a>0;){i=a>1024?1024:a,a-=i;do o+=t[c++],s+=o;while(--i);o%=65521,s%=65521}return(s<<16|o)>>>0}function m(n,e){var r,i;switch(this.input=n,this.c=0,(e||!(e={}))&&(e.index&&(this.c=e.index),e.verify&&(this.M=e.verify)),r=n[this.c++],i=n[this.c++],15&r){case rn:this.method=rn;break;default:t(Error("unsupported compression method"))}0!==((r<<8)+i)%31&&t(Error("invalid fcheck flag:"+((r<<8)+i)%31)),32&i&&t(Error("fdict flag is not supported")),
var l=e(e(e(s,10),126),10);s-=10*126*10*l;var d=e(e(s,10),126);s-=126*10*d;var v=e(s,10),m=s-10*v;return r.emit(l+129,d+48,v+129,m+48)}}function _(t){var e=t.fatal,r=!1,i=0;this.decode=function(t){var o=t.get();if(o===j&&0===i)return U;if(o===j&&0!==i)return i=0,c(e);if(t.offset(1),126===i)return i=0,123===o?(r=!0,null):125===o?(r=!1,null):126===o?126:10===o?null:(t.offset(-1),c(e));if(0!==i){var s=i;i=0;var a=null;return n(o,33,126)&&(a=l(190*(s-1)+(o+63),p("gbk"))),10===o&&(r=!1),null===a?c(e):a}return 126===o?(i=126,null):r?n(o,32,127)?(i=o,null):(10===o&&(r=!1),c(e)):n(o,0,127)?o:c(e)}}function A(t){t.fatal;var r=!1;this.encode=function(t,i){var o=i.get();if(o===U)return j;if(i.offset(1),n(o,0,127)&&r)return i.offset(-1),r=!1,t.emit(126,125);if(126===o)return t.emit(126,126);if(n(o,0,127))return t.emit(o);if(!r)return i.offset(-1),r=!0,t.emit(126,123);var s=h(o,p("gbk"));if(null===s)return u(o);var a=e(s,190)+1,c=s%190-63;return n(a,33,126)&&n(c,33,126)?t.emit(a,c):u(o)}}function x(t){var e=t.fatal,r=0,i=null;this.decode=function(t){if(null!==i){var o=i;return i=null,o}var s=t.get();if(s===j&&0===r)return U;if(s===j&&0!==r)return r=0,c(e);if(t.offset(1),0!==r){var a=r,u=null;r=0;var f=127>s?64:98;if((n(s,64,126)||n(s,161,254))&&(u=157*(a-129)+(s-f)),1133===u)return i=772,202;if(1135===u)return i=780,202;if(1164===u)return i=772,234;if(1166===u)return i=780,234;var h=null===u?null:l(u,p("big5"));return null===u&&t.offset(-1),null===h?c(e):h}return n(s,0,127)?s:n(s,129,254)?(r=s,null):c(e)}}function O(t){t.fatal,this.encode=function(t,r){var i=r.get();if(i===U)return j;if(r.offset(1),n(i,0,127))return t.emit(i);var o=h(i,p("big5"));if(null===o)return u(i);var s=e(o,157)+129,a=o%157,c=63>a?64:98;return t.emit(s,a+c)}}function k(t){var e=t.fatal,r=0,i=0;this.decode=function(t){var o=t.get();if(o===j)return 0===r&&0===i?U:(r=0,i=0,c(e));t.offset(1);var s,a;return 0!==i?(s=i,i=0,a=null,n(s,161,254)&&n(o,161,254)&&(a=l(94*(s-161)+o-161,p("jis0212"))),n(o,161,254)||t.offset(-1),null===a?c(e):a):142===r&&n(o,161,223)?(r=0,65377+o-161):143===r&&n(o,161,254)?(r=0,i=o,null):0!==r?(s=r,r=0,a=null,n(s,161,254)&&n(o,161,254)&&(a=l(94*(s-161)+o-161,p("jis0208"))),n(o,161,254)||t.offset(-1),null===a?c(e):a):n(o,0,127)?o:142===o||143===o||n(o,161,254)?(r=o,null):c(e)}}function S(t){t.fatal,this.encode=function(t,r){var i=r.get();if(i===U)return j;if(r.offset(1),n(i,0,127))return t.emit(i);if(165===i)return t.emit(92);if(8254===i)return t.emit(126);if(n(i,65377,65439))return t.emit(142,i-65377+161);var o=h(i,p("jis0208"));if(null===o)return u(i);var s=e(o,94)+161,a=o%94+161;return t.emit(s,a)}}function I(t){var e=t.fatal,r={ASCII:0,escape_start:1,escape_middle:2,escape_final:3,lead:4,trail:5,Katakana:6},i=r.ASCII,o=!1,s=0;this.decode=function(t){var a=t.get();switch(a!==j&&t.offset(1),i){default:case r.ASCII:return 27===a?(i=r.escape_start,null):n(a,0,127)?a:a===j?U:c(e);case r.escape_start:return 36===a||40===a?(s=a,i=r.escape_middle,null):(a!==j&&t.offset(-1),i=r.ASCII,c(e));case r.escape_middle:var u=s;return s=0,36!==u||64!==a&&66!==a?36===u&&40===a?(i=r.escape_final,null):40!==u||66!==a&&74!==a?40===u&&73===a?(i=r.Katakana,null):(a===j?t.offset(-1):t.offset(-2),i=r.ASCII,c(e)):(i=r.ASCII,null):(o=!1,i=r.lead,null);case r.escape_final:return 68===a?(o=!0,i=r.lead,null):(a===j?t.offset(-2):t.offset(-3),i=r.ASCII,c(e));case r.lead:return 10===a?(i=r.ASCII,c(e,10)):27===a?(i=r.escape_start,null):a===j?U:(s=a,i=r.trail,null);case r.trail:if(i=r.lead,a===j)return c(e);var f=null,h=94*(s-33)+a-33;return n(s,33,126)&&n(a,33,126)&&(f=o===!1?l(h,p("jis0208")):l(h,p("jis0212"))),null===f?c(e):f;case r.Katakana:return 27===a?(i=r.escape_start,null):n(a,33,95)?65377+a-33:a===j?U:c(e)}}}function T(t){t.fatal;var r={ASCII:0,lead:1,Katakana:2},i=r.ASCII;this.encode=function(t,o){var s=o.get();if(s===U)return j;if(o.offset(1),(n(s,0,127)||165===s||8254===s)&&i!==r.ASCII)return o.offset(-1),i=r.ASCII,t.emit(27,40,66);if(n(s,0,127))return t.emit(s);if(165===s)return t.emit(92);if(8254===s)return t.emit(126);if(n(s,65377,65439)&&i!==r.Katakana)retur
}function a(n,e){n?o(n):(E=e,E.nlinks+=1,t.put(E.id,E,s))}function c(n){n?o(n):t.get(y[w].id,a)}function u(n,e){n?o(n):(y=e,fn(y).has(w)?o(new Cn.EEXIST("newpath resolves to an existing file")):(y[w]=v[p],t.put(m.data,y,c)))}function f(n,e){n?o(n):(m=e,t.get(m.data,u))}function l(n,e){n?o(n):(v=e,fn(v).has(p)?r(t,b,f):o(new Cn.ENOENT("a component of either path prefix does not exist")))}function h(n,e){n?o(n):(g=e,t.get(g.data,l))}n=ln(n);var p=pn(n),d=hn(n);i=ln(i);var g,v,m,y,E,w=pn(i),b=hn(i);r(t,d,h)}function v(t,n,i){function o(n){n?i(n):(delete l[p],t.put(f.data,l,function(){var n=Date.now();e(t,d,f,{mtime:n,ctime:n},i)}))}function s(n){n?i(n):t.delete(h.data,o)}function a(r,a){r?i(r):(h=a,h.nlinks-=1,1>h.nlinks?t.delete(h.id,s):t.put(h.id,h,function(){e(t,n,h,{ctime:Date.now()},o)}))}function c(n,e){n?i(n):(l=e,fn(l).has(p)?t.get(l[p].id,a):i(new Cn.ENOENT("a component of the path does not name an existing file")))}function u(n,e){n?i(n):(f=e,t.get(f.data,c))}n=ln(n);var f,l,h,p=pn(n),d=hn(n);r(t,d,u)}function m(t,n,e){function i(t,n){if(t)e(t);else{a=n;var r=Object.keys(a);e(null,r)}}function o(n,r){n?e(n):(s=r,t.get(s.data,i))}n=ln(n),pn(n);var s,a;r(t,n,o)}function y(t,n,i,o){function s(n,e){n?o(n):(l=e,t.get(l.data,a))}function a(t,n){t?o(t):(h=n,fn(h).has(d)?o(new Cn.EEXIST):c())}function c(){p=new Fn(void 0,yn),p.nlinks+=1,p.size=n.length,p.data=n,t.put(p.id,p,f)}function u(n){if(n)o(n);else{var r=Date.now();e(t,g,l,{mtime:r,ctime:r},o)}}function f(n){n?o(n):(h[d]=new Mn(p.id,yn),t.put(l.data,h,u))}i=ln(i);var l,h,p,d=pn(i),g=hn(i);wn==d?o(new Cn.EEXIST):r(t,g,s)}function E(t,n,e){function i(n,r){n?e(n):(a=r,t.get(a.data,o))}function o(n,r){n?e(n):(c=r,fn(c).has(u)?t.get(c[u].id,s):e(new Cn.ENOENT("a component of the path does not name an existing file")))}function s(t,n){t?e(t):n.mode!=yn?e(new Cn.EINVAL("path not a symbolic link")):e(null,n.data)}n=ln(n);var a,c,u=pn(n),f=hn(n);r(t,f,i)}function w(t,n,i,o){function s(n,e){n?o(n):e.mode==mn?o(new Cn.EISDIR):(f=e,t.get(f.data,a))}function a(n,e){if(n)o(n);else{var r=new Uint8Array(i);e&&r.set(e.subarray(0,i)),t.put(f.data,r,u)}}function c(r){if(r)o(r);else{var i=Date.now();e(t,n,f,{mtime:i,ctime:i},o)}}function u(n){n?o(n):(f.size=i,f.version+=1,t.put(f.id,f,c))}n=ln(n);var f;0>i?o(new Cn.EINVAL("length cannot be negative")):r(t,n,s)}function b(t,n,r,i){function o(n,e){n?i(n):e.mode==mn?i(new Cn.EISDIR):(u=e,t.get(u.data,s))}function s(n,e){if(n)i(n);else{var o=new Uint8Array(r);e&&o.set(e.subarray(0,r)),t.put(u.data,o,c)}}function a(r){if(r)i(r);else{var o=Date.now();e(t,n.path,u,{mtime:o,ctime:o},i)}}function c(n){n?i(n):(u.size=r,u.version+=1,t.put(u.id,u,a))}var u;0>r?i(new Cn.EINVAL("length cannot be negative")):t.get(n.id,o)}function _(t,n,i,o,s){function a(r,a){r?s(r):e(t,n,a,{atime:i,ctime:o,mtime:o},s)}n=ln(n),"number"!=typeof i||"number"!=typeof o?s(new Cn.EINVAL("atime and mtime must be number")):0>i||0>o?s(new Cn.EINVAL("atime and mtime must be positive integers")):r(t,n,a)}function A(t,n,r,i,o){function s(s,a){s?o(s):e(t,n.path,a,{atime:r,ctime:i,mtime:i},o)}"number"!=typeof r||"number"!=typeof i?o(new Cn.EINVAL("atime and mtime must be a number")):0>r||0>i?o(new Cn.EINVAL("atime and mtime must be positive integers")):t.get(n.id,s)}function x(t,n,e,r,o,s){n=ln(n),"string"!=typeof e?s(new Cn.EINVAL("attribute name must be a string")):e?null!==o&&o!==Tn&&o!==Nn?s(new Cn.EINVAL("invalid flag, must be null, XATTR_CREATE or XATTR_REPLACE")):i(t,n,e,r,o,s):s(new Cn.EINVAL("attribute name cannot be an empty string"))}function O(t,n,e,r,o,s){"string"!=typeof e?s(new Cn.EINVAL("attribute name must be a string")):e?null!==o&&o!==Tn&&o!==Nn?s(new Cn.EINVAL("invalid flag, must be null, XATTR_CREATE or XATTR_REPLACE")):i(t,n,e,r,o,s):s(new Cn.EINVAL("attribute name cannot be an empty string"))}function k(t,n,e,i){function o(t,n){n?n.xattrs[e]:null,t?i(t):n.xattrs.hasOwnProperty(e)?i(null,n.xattrs[e]):i(new Cn.ENOATTR)}n=ln(n),"string"!=typeof e?i(new Cn.EINVAL("attribute name must be a string")):e?r(t,n,o):i(new Cn.EINVAL("attribute name cannot be an empty