|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[269,6,7],{"+ua5":function(lt,Me,ne){},"/cxE":function(lt,Me,ne){"use strict";ne.d(Me,"e",function(){return De}),ne.d(Me,"f",function(){return l}),ne.d(Me,"g",function(){return R}),ne.d(Me,"d",function(){return m}),ne.d(Me,"a",function(){return y}),ne.d(Me,"b",function(){return c}),ne.d(Me,"c",function(){return o});var Ne=function(){function u(){this.listeners=[],this.unexpectedErrorHandler=function(r){setTimeout(function(){throw r.stack?new Error(r.message+`
|
|
|
|
|
|
`+r.stack):r},0)}}return u.prototype.emit=function(r){this.listeners.forEach(function(e){e(r)})},u.prototype.onUnexpectedError=function(r){this.unexpectedErrorHandler(r),this.emit(r)},u.prototype.onUnexpectedExternalError=function(r){this.unexpectedErrorHandler(r)},u}(),Pe=new Ne;function De(u){m(u)||Pe.onUnexpectedError(u);return}function l(u){m(u)||Pe.onUnexpectedExternalError(u);return}function R(u){if(u instanceof Error){var r=u.name,e=u.message,n=u.stacktrace||u.stack;return{$isError:!0,name:r,message:e,stack:n}}return u}var g="Canceled";function m(u){return u instanceof Error&&u.name===g&&u.message===g}function y(){var u=new Error(g);return u.name=u.message,u}function c(u){return u?new Error("Illegal argument: "+u):new Error("Illegal argument")}function o(u){return u?new Error("Illegal state: "+u):new Error("Illegal state")}},"0r65":function(lt,Me){var ne=arguments[3],Ne=arguments[4],Pe=arguments[5],De=JSON.stringify;lt.exports=function(l,R){for(var g,m=Object.keys(Pe),y=0,c=m.length;y<c;y++){var o=m[y],u=Pe[o].exports;if(u===l||u&&u.default===l){g=o;break}}if(!g){g=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var r={},y=0,c=m.length;y<c;y++){var o=m[y];r[o]=o}Ne[g]=["function(require,module,exports){"+l+"(self); }",r]}var e=Math.floor(Math.pow(16,8)*Math.random()).toString(16),n={};n[g]=g,Ne[e]=["function(require,module,exports){var f = require("+De(g)+");(f.default ? f.default : f)(self);}",n];var a={};p(e);function p(w){a[w]=!0;for(var T in Ne[w][1]){var C=Ne[w][1][T];a[C]||p(C)}}var d="("+ne+")({"+Object.keys(a).map(function(w){return De(w)+":["+Ne[w][0]+","+De(Ne[w][1])+"]"}).join(",")+"},{},["+De(e)+"])",i=window.URL||window.webkitURL||window.mozURL||window.msURL,v=new Blob([d],{type:"text/javascript"});if(R&&R.bare)return v;var b=i.createObjectURL(v),_=new Worker(b);return _.objectURL=b,_}},"1ZF9":function(lt,Me,ne){lt.exports=ne.p+"static/Authorize.cc9c212f.png"},"24hK":function(lt,Me,ne){"use strict";ne.d(Me,"a",function(){return De});var Ne=ne("JYp7"),Pe=function(){function l(R){this.element=R,this.next=l.Undefined,this.prev=l.Undefined}return l.Undefined=new l(void 0),l}(),De=function(){function l(){this._first=Pe.Undefined,this._last=Pe.Undefined,this._size=0}return Object.defineProperty(l.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),l.prototype.isEmpty=function(){return this._first===Pe.Undefined},l.prototype.clear=function(){this._first=Pe.Undefined,this._last=Pe.Undefined,this._size=0},l.prototype.unshift=function(R){return this._insert(R,!1)},l.prototype.push=function(R){return this._insert(R,!0)},l.prototype._insert=function(R,g){var m=this,y=new Pe(R);if(this._first===Pe.Undefined)this._first=y,this._last=y;else if(g){var c=this._last;this._last=y,y.prev=c,c.next=y}else{var o=this._first;this._first=y,y.next=o,o.prev=y}this._size+=1;var u=!1;return function(){u||(u=!0,m._remove(y))}},l.prototype.shift=function(){if(this._first===Pe.Undefined)return;var R=this._first.element;return this._remove(this._first),R},l.prototype.pop=function(){if(this._last===Pe.Undefined)return;var R=this._last.element;return this._remove(this._last),R},l.prototype._remove=function(R){if(R.prev!==Pe.Undefined&&R.next!==Pe.Undefined){var g=R.prev;g.next=R.next,R.next.prev=g}else R.prev===Pe.Undefined&&R.next===Pe.Undefined?(this._first=Pe.Undefined,this._last=Pe.Undefined):R.next===Pe.Undefined?(this._last=this._last.prev,this._last.next=Pe.Undefined):R.prev===Pe.Undefined&&(this._first=this._first.next,this._first.prev=Pe.Undefined);this._size-=1},l.prototype.iterator=function(){var R,g=this._first;return{next:function(){return g===Pe.Undefined?Ne.c:(R?R.value=g.element:R={done:!1,value:g.element},g=g.next,R)}}},l.prototype.toArray=function(){for(var R=[],g=this._first;g!==Pe.Undefined;g=g.next)R.push(g.element);return R},l}()},"4xil":function(lt,Me,ne){lt.exports={watermark:"watermark___2DVjg",videovideo:"videovideo___3jScv",animate__loop:"animate__loop___36IZ1",upDown:"upDown___3FGkz",container:"container___GV_Ds","video-container":"video-container___35tqx","video-controls":"video-controls___u99fM",hide:"hide___2GDit","video-progress":"video-progress___2LKQJ",seek:"seek___3b-US","seek-tooltip":"seek-tooltip___bZ9sZ","bottom-controls":"bottom-controls___74sQw","left-controls":"left-controls___2kBb3","volume-controls":"volume-controls___QLaWH","fullscreen-button":"fullscreen-button___2nHzc","pip-button":"pip-button___18qQG","playback-animation":"playback-animation___gCL6X",volume:"volume___10eUe",hidden:"hidden___2JBJW"}},"55Ip":function(lt,Me,ne){"use strict";ne.d(Me,"a",function(){return v}),ne.d(Me,"b",function(){return S});var Ne=ne("Ty5D"),Pe=ne("dI71"),De=ne("q1tI"),l=ne.n(De),R=ne("YS25"),g=ne("17x9"),m=ne.n(g),y=ne("wx14"),c=ne("zLVn"),o=ne("9R94"),u=function(N){Object(Pe.a)(E,N);function E(){for(var z,M=arguments.length,G=new Array(M),J=0;J<M;J++)G[J]=arguments[J];return z=N.call.apply(N,[this].concat(G))||this,z.history=Object(R.a)(z.props),z}var K=E.prototype;return K.render=function(){return l.a.createElement(Ne.c,{history:this.history,children:this.props.children})},E}(l.a.Component),r=function(N){Object(Pe.a)(E,N);function E(){for(var z,M=arguments.length,G=new Array(M),J=0;J<M;J++)G[J]=arguments[J];return z=N.call.apply(N,[this].concat(G))||this,z.history=Object(R.b)(z.props),z}var K=E.prototype;return K.render=function(){return l.a.createElement(Ne.c,{history:this.history,children:this.props.children})},E}(l.a.Component),e=function(E,K){return typeof E=="function"?E(K):E},n=function(E,K){return typeof E=="string"?Object(R.c)(E,null,null,K):E},a=function(E){return E},p=l.a.forwardRef;typeof p=="undefined"&&(p=a);function d(N){return!!(N.metaKey||N.altKey||N.ctrlKey||N.shiftKey)}var i=p(function(N,E){var K=N.innerRef,z=N.navigate,M=N.onClick,G=Object(c.a)(N,["innerRef","navigate","onClick"]),J=G.target,te=Object(y.a)({},G,{onClick:function(se){try{M&&M(se)}catch(H){throw se.preventDefault(),H}!se.defaultPrevented&&se.button===0&&(!J||J==="_self")&&!d(se)&&(se.preventDefault(),z())}});return a!==p?te.ref=E||K:te.ref=K,l.a.createElement("a",te)}),v=p(function(N,E){var K=N.component,z=K===void 0?i:K,M=N.replace,G=N.to,J=N.innerRef,te=Object(c.a)(N,["component","replace","to","innerRef"]);return l.a.createElement(Ne.e.Consumer,null,function(re){re||Object(o.a)(!1);var se=re.history,H=n(e(G,re.location),re.location),he=H?se.createHref(H):"",Z=Object(y.a)({},te,{href:he,navigate:function(){var V=e(G,re.location),X=M?se.replace:se.push;X(V)}});return a!==p?Z.ref=E||J:Z.innerRef=J,l.a.createElement(z,Z)})});if(!1)var b,_;var w=function(E){return E},T=l.a.forwardRef;typeof T=="undefined"&&(T=w);function C(){for(var N=arguments.length,E=new Array(N),K=0;K<N;K++)E[K]=arguments[K];return E.filter(function(z){return z}).join(" ")}var S=T(function(N,E){var K=N["aria-current"],z=K===void 0?"page":K,M=N.activeClassName,G=M===void 0?"active":M,J=N.activeStyle,te=N.className,re=N.exact,se=N.isActive,H=N.location,he=N.sensitive,Z=N.strict,$=N.style,V=N.to,X=N.innerRef,Q=Object(c.a)(N,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return l.a.createElement(Ne.e.Consumer,null,function(oe){oe||Object(o.a)(!1);var we=H||oe.location,ge=n(e(V,we),we),Ae=ge.pathname,me=Ae&&Ae.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),ye=me?Object(Ne.f)(we.pathname,{path:me,exact:re,sensitive:he,strict:Z}):null,ue=!!(se?se(ye,we):ye),ae=ue?C(te,G):te,ee=ue?Object(y.a)({},$,{},J):$,Ee=Object(y.a)({"aria-current":ue&&z||null,className:ae,style:ee,to:ge},Q);return w!==T?Ee.ref=E||X:Ee.innerRef=X,l.a.createElement(v,Ee)})});if(!1)var W},"746U":function(lt,Me,ne){"use strict";ne.d(Me,"d",function(){return Pe}),ne.d(Me,"j",function(){return De}),ne.d(Me,"i",function(){return l}),ne.d(Me,"h",function(){return R}),ne.d(Me,"e",function(){return g}),ne.d(Me,"k",function(){return m}),ne.d(Me,"l",function(){return y}),ne.d(Me,"a",function(){return c}),ne.d(Me,"f",function(){return u}),ne.d(Me,"g",function(){return r}),ne.d(Me,"m",function(){return e}),ne.d(Me,"c",function(){return p}),ne.d(Me,"b",function(){return d}),ne.d(Me,"n",function(){return i}),ne.d(Me,"o",function(){return v});var Ne={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};function Pe(b){return Array.isArray?Array.isArray(b):!!(b&&typeof b.length===Ne.number&&b.constructor===Array)}function De(b){return typeof b===Ne.string||b instanceof String}function l(b){return typeof b===Ne.object&&b!==null&&!Array.isArray(b)&&!(b instanceof RegExp)&&!(b instanceof Date)}function R(b){return(typeof b===Ne.number||b instanceof Number)&&!isNaN(b)}function g(b){return b===!0||b===!1}function m(b){return typeof b===Ne.undefined}function y(b){return m(b)||b===null}function c(b,_){if(!b)throw new Error(_?"Unexpected type, expected '"+_+"'":"Unexpected type")}var o=Object.prototype.hasOwnProperty;function u(b){if(!l(b))return!1;for(var _ in b)if(o.call(b,_))return!1;return!0}function r(b){return typeof b===Ne.function}function e(b,_){for(var w=Math.min(b.length,_.length),T=0;T<w;T++)n(b[T],_[T])}function n(b,_){if(De(_)){if(typeof b!==_)throw new Error("argument does not match constraint: typeof "+_)}else if(r(_)){try{if(b instanceof _)return}catch(w){}if(!y(b)&&b.constructor===_)return;if(_.length===1&&_.call(void 0,b)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function a(b){for(var _=[],w=Object.getPrototypeOf(b);Object.prototype!==w;)_=_.concat(Object.getOwnPropertyNames(w)),w=Object.getPrototypeOf(w);return _}function p(b){for(var _=[],w=0,T=a(b);w<T.length;w++){var C=T[w];typeof b[C]=="function"&&_.push(C)}return _}function d(b,_){for(var w=function(N){return function(){var E=Array.prototype.slice.call(arguments,0);return _(N,E)}},T={},C=0,S=b;C<S.length;C++){var W=S[C];T[W]=w(W)}return T}function i(b){return b===null?void 0:b}function v(b){return typeof b=="undefined"?null:b}},"7ixt":function(lt,Me,ne){"use strict";ne.d(Me,"a",function(){return De});var Ne={adjustX:1,adjustY:1},Pe=[0,0],De={left:{points:["cr","cl"],overflow:Ne,offset:[-4,0],targetOffset:Pe},right:{points:["cl","cr"],overflow:Ne,offset:[4,0],targetOffset:Pe},top:{points:["bc","tc"],overflow:Ne,offset:[0,-4],targetOffset:Pe},bottom:{points:["tc","bc"],overflow:Ne,offset:[0,4],targetOffset:Pe},topLeft:{points:["bl","tl"],overflow:Ne,offset:[0,-4],targetOffset:Pe},leftTop:{points:["tr","tl"],overflow:Ne,offset:[-4,0],targetOffset:Pe},topRight:{points:["br","tr"],overflow:Ne,offset:[0,-4],targetOffset:Pe},rightTop:{points:["tl","tr"],overflow:Ne,offset:[4,0],targetOffset:Pe},bottomRight:{points:["tr","br"],overflow:Ne,offset:[0,4],targetOffset:Pe},rightBottom:{points:["bl","br"],overflow:Ne,offset:[4,0],targetOffset:Pe},bottomLeft:{points:["tl","bl"],overflow:Ne,offset:[0,4],targetOffset:Pe},leftBottom:{points:["br","bl"],overflow:Ne,offset:[-4,0],targetOffset:Pe}},l=De},"8HAY":function(lt,Me,ne){"use strict";ne.d(Me,"a",function(){return g}),ne.d(Me,"b",function(){return m});var Ne=ne("pmY6"),Pe=ne("MI8n"),De=function(){var y=function(c,o){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,r){u.__proto__=r}||function(u,r){for(var e in r)r.hasOwnProperty(e)&&(u[e]=r[e])},y(c,o)};return function(c,o){y(c,o);function u(){this.constructor=c}c.prototype=o===null?Object.create(o):(u.prototype=o.prototype,new u)}}(),l=function(y,c,o,u){function r(e){return e instanceof o?e:new o(function(n){n(e)})}return new(o||(o=Promise))(function(e,n){function a(i){try{d(u.next(i))}catch(v){n(v)}}function p(i){try{d(u.throw(i))}catch(v){n(v)}}function d(i){i.done?e(i.value):r(i.value).then(a,p)}d((u=u.apply(y,c||[])).next())})},R=function(y,c){var o={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},u,r,e,n;return n={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(n[Symbol.iterator]=function(){return this}),n;function a(d){return function(i){return p([d,i])}}function p(d){if(u)throw new TypeError("Generator is already executing.");for(;o;)try{if(u=1,r&&(e=d[0]&2?r.return:d[0]?r.throw||((e=r.return)&&e.call(r),0):r.next)&&!(e=e.call(r,d[1])).done)return e;(r=0,e)&&(d=[d[0]&2,e.value]);switch(d[0]){case 0:case 1:e=d;break;case 4:return o.label++,{value:d[1],done:!1};case 5:o.label++,r=d[1],d=[0];continue;case 7:d=o.ops.pop(),o.trys.pop();continue;default:if(!(e=o.trys,e=e.length>0&&e[e.length-1])&&(d[0]===6||d[0]===2)){o=0;continue}if(d[0]===3&&(!e||d[1]>e[0]&&d[1]<e[3])){o.label=d[1];break}if(d[0]===6&&o.label<e[1]){o.label=e[1],e=d;break}if(e&&o.label<e[2]){o.label=e[2],o.ops.push(d);break}e[2]&&o.ops.pop(),o.trys.pop();continue}d=c.call(y,o)}catch(i){d=[6,i],r=0}finally{u=e=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}},g=function(y){De(c,y);function c(o,u,r,e,n){u===void 0&&(u=""),r===void 0&&(r=""),e===void 0&&(e=!0);var a=y.call(this)||this;return a._onDidChange=a._register(new Pe.a),a.onDidChange=a._onDidChange.event,a._enabled=!0,a._checked=!1,a._id=o,a._label=u,a._cssClass=r,a._enabled=e,a._actionCallback=n,a}return Object.defineProperty(c.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"label",{get:function(){return this._label},set:function(o){this._setLabel(o)},enumerable:!0,configurable:!0}),c.prototype._setLabel=function(o){this._label!==o&&(this._label=o,this._onDidChange.fire({label:o}))},Object.defineProperty(c.prototype,"tooltip",{get:function(){return this._tooltip||""},set:function(o){this._setTooltip(o)},enumerable:!0,configurable:!0}),c.prototype._setTooltip=function(o){this._tooltip!==o&&(this._tooltip=o,this._onDidChange.fire({tooltip:o}))},Object.defineProperty(c.prototype,"class",{get:function(){return this._cssClass},set:function(o){this._setClass(o)},enumerable:!0,configurable:!0}),c.prototype._setClass=function(o){this._cssClass!==o&&(this._cssClass=o,this._onDidChange.fire({class:o}))},Object.defineProperty(c.prototype,"enabled",{get:function(){return this._enabled},set:function(o){this._setEnabled(o)},enumerable:!0,configurable:!0}),c.prototype._setEnabled=function(o){this._enabled!==o&&(this._enabled=o,this._onDidChange.fire({enabled:o}))},Object.defineProperty(c.prototype,"checked",{get:function(){return this._checked},set:function(o){this._setChecked(o)},enumerable:!0,configurable:!0}),c.prototype._setChecked=function(o){this._checked!==o&&(this._checked=o,this._onDidChange.fire({checked:o}))},c.prototype.run=function(o,u){return this._actionCallback?this._actionCallback(o):Promise.resolve(!0)},c}(Ne.a),m=function(y){De(c,y);function c(){var o=y!==null&&y.apply(this,arguments)||this;return o._onDidBeforeRun=o._register(new Pe.a),o.onDidBeforeRun=o._onDidBeforeRun.event,o._onDidRun=o._register(new Pe.a),o.onDidRun=o._onDidRun.event,o}return c.prototype.run=function(o,u){return l(this,void 0,void 0,function(){var r,e;return R(this,function(n){switch(n.label){case 0:if(!o.enabled)return[2,Promise.resolve(null)];this._onDidBeforeRun.fire({action:o}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.runAction(o,u)];case 2:return r=n.sent(),this._onDidRun.fire({action:o,result:r}),[3,4];case 3:return e=n.sent(),this._onDidRun.fire({action:o,error:e}),[3,4];case 4:return[2]}})})},c.prototype.runAction=function(o,u){var r=u?o.run(u):o.run();return Promise.resolve(r)},c}(Ne.a)},"8hTe":function(lt,Me,ne){lt.exports={button:"button___1wy9m"}},"8mKB":function(lt,Me,ne){"use strict";var Ne=ne("rePB"),Pe=ne("1OyB"),De=ne("vuIU"),l=ne("Ji7U"),R=ne("md7G"),g=ne("foSv"),m=ne("q1tI"),y=ne.n(m),c=ne("m+aA"),o=ne("TSYQ"),u=ne.n(o),r=ne("4IlW");function e(N){var E=N.pageXOffset,K="scrollLeft";if(typeof E!="number"){var z=N.document;E=z.documentElement[K],typeof E!="number"&&(E=z.body[K])}return E}function n(N){var E,K,z=N.ownerDocument,M=z.body,G=z&&z.documentElement,J=N.getBoundingClientRect();return E=J.left,K=J.top,E-=G.clientLeft||M.clientLeft||0,K-=G.clientTop||M.clientTop||0,{left:E,top:K}}function a(N){var E=n(N),K=N.ownerDocument,z=K.defaultView||K.parentWindow;return E.left+=e(z),E.left}function p(N){var E=d();return function(){var z=Object(g.a)(N),M;if(E){var G=Object(g.a)(this).constructor;M=Reflect.construct(z,arguments,G)}else M=z.apply(this,arguments);return Object(R.a)(this,M)}}function d(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(N){return!1}}var i=function(N){Object(l.a)(K,N);var E=p(K);function K(){var z;return Object(Pe.a)(this,K),z=E.apply(this,arguments),z.onHover=function(M){var G=z.props,J=G.onHover,te=G.index;J(M,te)},z.onClick=function(M){var G=z.props,J=G.onClick,te=G.index;J(M,te)},z.onKeyDown=function(M){var G=z.props,J=G.onClick,te=G.index;M.keyCode===13&&J(M,te)},z}return Object(De.a)(K,[{key:"getClassName",value:function(){var M=this.props,G=M.prefixCls,J=M.index,te=M.value,re=M.allowHalf,se=M.focused,H=J+1,he=G;return te===0&&J===0&&se?he+=" ".concat(G,"-focused"):re&&te+.5>=H&&te<H?(he+=" ".concat(G,"-half ").concat(G,"-active"),se&&(he+=" ".concat(G,"-focused"))):(he+=H<=te?" ".concat(G,"-full"):" ".concat(G,"-zero"),H===te&&se&&(he+=" ".concat(G,"-focused"))),he}},{key:"render",value:function(){var M=this.onHover,G=this.onClick,J=this.onKeyDown,te=this.props,re=te.disabled,se=te.prefixCls,H=te.character,he=te.characterRender,Z=te.index,$=te.count,V=te.value,X=typeof H=="function"?H(this.props):H,Q=y.a.createElement("li",{className:this.getClassName()},y.a.createElement("div",{onClick:re?null:G,onKeyDown:re?null:J,onMouseMove:re?null:M,role:"radio","aria-checked":V>Z?"true":"false","aria-posinset":Z+1,"aria-setsize":$,tabIndex:re?-1:0},y.a.createElement("div",{className:"".concat(se,"-first")},X),y.a.createElement("div",{className:"".concat(se,"-second")},X)));return he&&(Q=he(Q,this.props)),Q}}]),K}(y.a.Component);function v(N,E){var K=Object.keys(N);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(N);E&&(z=z.filter(function(M){return Object.getOwnPropertyDescriptor(N,M).enumerable})),K.push.apply(K,z)}return K}function b(N){for(var E=1;E<arguments.length;E++){var K=arguments[E]!=null?arguments[E]:{};E%2?v(Object(K),!0).forEach(function(z){Object(Ne.a)(N,z,K[z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(N,Object.getOwnPropertyDescriptors(K)):v(Object(K)).forEach(function(z){Object.defineProperty(N,z,Object.getOwnPropertyDescriptor(K,z))})}return N}function _(N){var E=w();return function(){var z=Object(g.a)(N),M;if(E){var G=Object(g.a)(this).constructor;M=Reflect.construct(z,arguments,G)}else M=z.apply(this,arguments);return Object(R.a)(this,M)}}function w(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(N){return!1}}function T(){}var C=function(N){Object(l.a)(K,N);var E=_(K);function K(z){var M;Object(Pe.a)(this,K),M=E.call(this,z),M.onHover=function(J,te){var re=M.props.onHoverChange,se=M.getStarValue(te,J.pageX),H=M.state.cleanedValue;se!==H&&M.setState({hoverValue:se,cleanedValue:null}),re(se)},M.onMouseLeave=function(){var J=M.props.onHoverChange;M.setState({hoverValue:void 0,cleanedValue:null}),J(void 0)},M.onClick=function(J,te){var re=M.props.allowClear,se=M.state.value,H=M.getStarValue(te,J.pageX),he=!1;re&&(he=H===se),M.onMouseLeave(),M.changeValue(he?0:H),M.setState({cleanedValue:he?H:null})},M.onFocus=function(){var J=M.props.onFocus;M.setState({focused:!0}),J&&J()},M.onBlur=function(){var J=M.props.onBlur;M.setState({focused:!1}),J&&J()},M.onKeyDown=function(J){var te=J.keyCode,re=M.props,se=re.count,H=re.allowHalf,he=re.onKeyDown,Z=re.direction,$=Z==="rtl",V=M.state.value;te===r.a.RIGHT&&V<se&&!$?(H?V+=.5:V+=1,M.changeValue(V),J.preventDefault()):te===r.a.LEFT&&V>0&&!$||te===r.a.RIGHT&&V>0&&$?(H?V-=.5:V-=1,M.changeValue(V),J.preventDefault()):te===r.a.LEFT&&V<se&&$&&(H?V+=.5:V+=1,M.changeValue(V),J.preventDefault()),he&&he(J)},M.saveRef=function(J){return function(te){M.stars[J]=te}},M.saveRate=function(J){M.rate=J};var G=z.value;return G===void 0&&(G=z.defaultValue),M.stars={},M.state={value:G,focused:!1,cleanedValue:null},M}return Object(De.a)(K,[{key:"componentDidMount",value:function(){var M=this.props,G=M.autoFocus,J=M.disabled;G&&!J&&this.focus()}},{key:"getStarDOM",value:function(M){return Object(c.a)(this.stars[M])}},{key:"getStarValue",value:function(M,G){var J=this.props,te=J.allowHalf,re=J.direction,se=re==="rtl",H=M+1;if(te){var he=this.getStarDOM(M),Z=a(he),$=he.clientWidth;(se&&G-Z>$/2||!se&&G-Z<$/2)&&(H-=.5)}return H}},{key:"focus",value:function(){var M=this.props.disabled;M||this.rate.focus()}},{key:"blur",value:function(){var M=this.props.disabled;M||this.rate.blur()}},{key:"changeValue",value:function(M){var G=this.props.onChange;"value"in this.props||this.setState({value:M}),G(M)}},{key:"render",value:function(){for(var M=this.props,G=M.count,J=M.allowHalf,te=M.style,re=M.prefixCls,se=M.disabled,H=M.className,he=M.character,Z=M.characterRender,$=M.tabIndex,V=M.direction,X=this.state,Q=X.value,oe=X.hoverValue,we=X.focused,ge=[],Ae=se?"".concat(re,"-disabled"):"",me=0;me<G;me+=1)ge.push(y.a.createElement(i,{ref:this.saveRef(me),index:me,count:G,disabled:se,prefixCls:"".concat(re,"-star"),allowHalf:J,value:oe===void 0?Q:oe,onClick:this.onClick,onHover:this.onHover,key:me,character:he,characterRender:Z,focused:we}));var ye=u()(re,Ae,H,Object(Ne.a)({},"".concat(re,"-rtl"),V==="rtl"));return y.a.createElement("ul",{className:ye,style:te,onMouseLeave:se?null:this.onMouseLeave,tabIndex:se?-1:$,onFocus:se?null:this.onFocus,onBlur:se?null:this.onBlur,onKeyDown:se?null:this.onKeyDown,ref:this.saveRate,role:"radiogroup"},ge)}}],[{key:"getDerivedStateFromProps",value:function(M,G){return"value"in M&&M.value!==void 0?b(b({},G),{},{value:M.value}):G}}]),K}(y.a.Component);C.defaultProps={defaultValue:0,count:5,allowHalf:!1,allowClear:!0,style:{},prefixCls:"rc-rate",onChange:T,character:"\u2605",onHoverChange:T,tabIndex:0,direction:"ltr"};var S=C,W=Me.a=S},"96GE":function(lt,Me,ne){"use strict";ne.r(Me),ne.d(Me,"formatQuery",function(){return bt});var Ne=ne("T2oS"),Pe=ne("W9HT"),De=ne("k1fw"),l=ne("PpiC"),R=ne("q1tI"),g=ne.n(R),m=ne("9kvl"),y=ne("JqQi"),c=ne.n(y),o=ne("5Dmo"),u=ne("3S7+"),r=ne("+L6B"),e=ne("2/Rp"),n=ne("pC0b"),a=ne("GzdX"),p=ne("9og8"),d=ne("tJVT"),i=ne("WmNS"),v=ne.n(i),b=ne("nUhQ"),_=ne.n(b),w=ne("2qtc"),T=ne("kLXV"),C=ne("7Kak"),S=ne("9yH6"),W=ne("miYZ"),N=ne("tsqr"),E=ne("5NDa"),K=ne("5rEg"),z=ne("Ty5D"),M=ne("sWEp"),G=ne.n(M),J=ne("qdXH"),te=K.a.Search,re=function(et){var Ye,ut=et.videoDetail,st=et.globalSetting,gt=et.loading,yt=et.dispatch,ft=Object(l.a)(et,["videoDetail","globalSetting","loading","dispatch"]),xt=Object(z.i)(),At=Object(z.h)(),at=Object(R.useState)([]),pt=Object(d.a)(at,2),ct=pt[0],dt=pt[1],Ct=Object(R.useState)(""),fe=Object(d.a)(Ct,2),ie=fe[0],x=fe[1],P=Object(R.useState)(),B=Object(d.a)(P,2),q=B[0],ce=B[1],Re=Object(R.useState)(!1),Ie=Object(d.a)(Re,2),qe=Ie[0],Je=Ie[1],He=Object(R.useState)(!1),nt=Object(d.a)(He,2),Qe=nt[0],We=nt[1];Object(R.useEffect)(function(){ut.actionTabs.key==="Banner-SendToClass"&&it()},[ut.actionTabs.key]);var it=function(){var f=Object(p.a)(v.a.mark(function D(){var Y,U;return v.a.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return Ve.next=2,Object(J.h)({});case 2:if(U=Ve.sent,!(U!=null&&(Y=U.courses)!==null&&Y!==void 0&&Y.length)){Ve.next=8;break}dt((U==null?void 0:U.courses)||[]),We(!0),Ve.next=11;break;case 8:return s(),N.b.info("\u60A8\u5F53\u524D\u6CA1\u6709\u7BA1\u7406\u4EFB\u4F55\u8BFE\u5802\uFF0C\u4E0D\u53EF\u53D1\u9001"),Ve.abrupt("return");case 11:case"end":return Ve.stop()}},D)}));return function(){return f.apply(this,arguments)}}(),$e=function(D){dt(ct==null?void 0:ct.map(function(Y){return Object(De.a)(Object(De.a)({},Y),{},{hide:!Y.course_name.includes(D)})}))},O=function(){var f=Object(p.a)(v.a.mark(function D(){var Y;return v.a.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(q){Se.next=3;break}return Je(!0),Se.abrupt("return");case 3:return Se.next=5,Object(J.m)({id:xt.videoId,course_id:q});case 5:Y=Se.sent,(Y==null?void 0:Y.status)===0&&(N.b.success("\u53D1\u9001\u6210\u529F"),s(),m.d===null||m.d===void 0||m.d.replace("/classrooms/".concat(q,"/shixun_homework")));case 7:case"end":return Se.stop()}},D)}));return function(){return f.apply(this,arguments)}}(),s=function(){x(""),ce(null),Je(!1),yt({type:"videoDetail/setActionTabs",payload:{}}),We(!1)};return g.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,title:"\u53D1\u9001\u81F3\u8BFE\u5802",visible:Qe,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:O,onCancel:s},g.a.createElement("div",{className:G.a.wrap},g.a.createElement("div",{className:"mb10"},g.a.createElement(te,{placeholder:"\u8F93\u5165\u8BFE\u5802\u540D\u79F0\u7684\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",value:ie,onChange:function(D){return x(D.target.value)},onSearch:function(D){x(D),$e(D)}})),g.a.createElement("div",{className:G.a.radioWrap},g.a.createElement(S.a.Group,{value:q,onChange:function(D){ce(D.target.value),Je(!1)}},ct==null||((Ye=ct.filter(function(f){return!(f!=null&&f.hide)}))===null||Ye===void 0)?void 0:Ye.map(function(f,D){return g.a.createElement(S.a,{className:G.a.radio,value:f.course_id,key:D},f.course_name)}))),qe&&g.a.createElement("div",{className:G.a.colorFF0000},"\u8BF7\u9009\u62E9\u4F60\u8981\u53D1\u9001\u7684\u8BFE\u5802"),g.a.createElement("div",{className:G.a.title},"\u6E29\u99A8\u63D0\u793A\uFF1A\u5F53\u524D\u89C6\u9891\u9879\u76EE\u5C06\u4F1A\u53D1\u9001\u5230\u6307\u5B9A\u8BFE\u5802")))},se=Object(m.a)(function(vt){var et=vt.videoDetail,Ye=vt.loading,ut=vt.globalSetting;return{videoDetail:et,globalSetting:ut,loading:Ye.models.index}})(re),H=ne("sBCT"),he=ne("Mgx3"),Z=ne("1vsH"),$=ne("NLgs"),V=ne("Awhp"),X=ne("KrTs"),Q=ne("O3gP"),oe=ne("lrIw"),we=ne("oBTY"),ge=ne("eoI0"),Ae=ne.n(ge),me=ne("HBuW"),ye=function(et){var Ye,ut,st=et.videoDetail,gt=et.dispatch,yt=gt===void 0?function(){}:gt,ft=et.visible,xt=et.onClose,At=xt===void 0?function(){}:xt,at=st.queryParams,pt=st.queryParams,ct=pt.subject_id,dt=pt.videoId,Ct={videoId:dt},fe=Object(R.useState)(0),ie=Object(d.a)(fe,2),x=ie[0],P=ie[1],B=Object(R.useState)(""),q=Object(d.a)(B,2),ce=q[0],Re=q[1],Ie=Object(R.useState)([]),qe=Object(d.a)(Ie,2),Je=qe[0],He=qe[1],nt=Object(R.useState)([]),Qe=Object(d.a)(nt,2),We=Qe[0],it=Qe[1];Object(R.useEffect)(function(){var D,Y,U=((D=st.detail)===null||D===void 0||((Y=D.video_item)===null||Y===void 0)?void 0:Y.schools)||[];P(U!=null&&U.length?1:0),it(U)},[(Ye=st.detail)===null||Ye===void 0||((ut=Ye.video_item)===null||ut===void 0)?void 0:ut.schools]);var $e=function(){var D=Object(p.a)(v.a.mark(function Y(U){var Se;return v.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,Object(me.O)({q:U});case 2:Se=tt.sent,Se&&He(Se.shools_name||[]);case 4:case"end":return tt.stop()}},Y)}));return function(U){return D.apply(this,arguments)}}(),O=function(Y){if(We.includes(Y)){N.b.info("\u8BF7\u52FF\u6307\u5B9A\u76F8\u540C\u7684\u5355\u4F4D");return}Re(""),it([].concat(Object(we.a)(We),[Y]))},s=function(){var D=Object(p.a)(v.a.mark(function Y(){var U;return v.a.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:if(!(x===1&&!(We!=null&&We.length))){Ve.next=2;break}return Ve.abrupt("return",N.b.info("\u8BF7\u9009\u62E9\u6307\u5B9A\u5355\u4F4D\u516C\u5F00"));case 2:return Ve.next=4,Object(J.a)(Object(De.a)(Object(De.a)({},at),{},{id:Ct.videoId,schools:x===0?[]:We,is_public:!(x===2)}));case 4:U=Ve.sent,(U==null?void 0:U.status)===0&&(N.b.success("\u8BBE\u7F6E\u6210\u529F"),f());case 6:case"end":return Ve.stop()}},Y)}));return function(){return D.apply(this,arguments)}}(),f=function(){At(),yt({type:"videoDetail/getVideoDetail",payload:Object(De.a)(Object(De.a)({},at),{},{id:Ct.videoId})})};return g.a.createElement(T.a,{centered:!0,maskClosable:!1,title:"\u6743\u9650\u8BBE\u7F6E",width:530,className:Ae.a.modal,visible:ft,onOk:s,onCancel:f},g.a.createElement(g.a.Fragment,null,g.a.createElement(S.a.Group,{value:x,onChange:function(Y){return P(Y.target.value)}},g.a.createElement(S.a,{value:0},"\u5BF9\u6240\u6709\u5355\u4F4D\u516C\u5F00",g.a.createElement("span",null,"\uFF08\u9009\u4E2D\u540E\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF09")),g.a.createElement(S.a,{value:1},"\u5BF9\u6307\u5B9A\u5355\u4F4D\u516C\u5F00",g.a.createElement("span",null,"\uFF08\u9009\u4E2D\u540E\uFF0C\u4EC5\u5BF9\u4E0B\u65B9\u6307\u5B9A\u5355\u4F4D\u7528\u6237\u53EF\u89C1\uFF09")),g.a.createElement(S.a,{value:2},"\u4E0D\u516C\u5F00",g.a.createElement("span",null,"\uFF08\u9009\u4E2D\u540E\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u4E0D\u53EF\u89C1\uFF09"))),x===1&&g.a.createElement(g.a.Fragment,null,g.a.createElement("div",{className:"mt10"},g.a.createElement(oe.a,{showSearch:!0,className:Ae.a.selectSchool,placeholder:"\u8BF7\u8F93\u5165\u5E76\u9009\u62E9\u5355\u4F4D\u540D\u79F0",value:ce,onChange:function(Y){Re(Y),$e(Y)},onSelect:O,options:Je==null?void 0:Je.map(function(D){return{value:D}})})),g.a.createElement("div",{className:"mt10"},We==null?void 0:We.map(function(D,Y){return g.a.createElement(X.a,{count:g.a.createElement("span",{className:Ae.a.delete,onClick:function(){return it(We.filter(function(Se){return Se!==D}))}},"x"),className:"mt10 mr20 current",key:Y},g.a.createElement(e.a,{type:"primary",ghost:!0},D))})))))},ue=ye,ae=function(et){var Ye=et.user,ut=et.videoDetail,st=et.globalSetting,gt=et.loading,yt=et.dispatch,ft=Object(l.a)(et,["user","videoDetail","globalSetting","loading","dispatch"]),xt=ut.queryParams,At=ut.queryParams,at=At.subject_id,pt=At.videoId,ct={videoId:pt},dt=Object(R.useState)(),Ct=Object(d.a)(dt,2),fe=Ct[0],ie=Ct[1],x=Object(R.useState)(),P=Object(d.a)(x,2),B=P[0],q=P[1],ce=Object(R.useState)(!1),Re=Object(d.a)(ce,2),Ie=Re[0],qe=Re[1],Je=ut.detail||{},He=Je.video_item,nt=ut||{},Qe=nt.stages,We=function(){yt({type:"videoDetail/setActionTabs",payload:{key:"Banner-SendToClass"}})},it=function(){var O=Object(p.a)(v.a.mark(function s(){var f,D,Y,U,Se,Ve;return v.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:if(!((f=Ye.userInfo)!==null&&f!==void 0&&f.admin||(D=Ye.userInfo)!==null&&D!==void 0&&D.is_teacher&&Object($.d)())){ht.next=9;break}return U=[],Qe.map(function(Ze){Ze.items.map(function(mt){U.push(mt)})}),Se=U.filter(function(Ze){return Ze.id===He.id}),ht.next=6,Object(J.g)(Object(De.a)({id:Se==null||((Y=Se[0])===null||Y===void 0)?void 0:Y.stage_item_id},xt));case 6:Ve=ht.sent,q(Ve),ie(!0);case 9:case"end":return ht.stop()}},s)}));return function(){return O.apply(this,arguments)}}(),$e=function(){var O=Object(p.a)(v.a.mark(function s(f){var D,Y,U;return v.a.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return Ve.next=2,Object(he.S)(Object(De.a)(Object(De.a)({id:B==null?void 0:B.id},f),{},{video_id:(f==null?void 0:f.video_id)||(B==null||((D=B.video_item)===null||D===void 0)?void 0:D.video_id),link:(f==null?void 0:f.link)||(B==null||((Y=B.video_item)===null||Y===void 0)?void 0:Y.link)}));case 2:return U=Ve.sent,U&&(ie(!1),yt({type:"videoDetail/getVideoDetail",payload:Object(De.a)({id:ct.videoId},xt)})),Ve.abrupt("return",U);case 5:case"end":return Ve.stop()}},s)}));return function(f){return O.apply(this,arguments)}}();return g.a.createElement("aside",{className:_.a.banner},g.a.createElement("aside",{className:_.a.wrap},g.a.createElement("p",{className:_.a.title},He==null?void 0:He.name),g.a.createElement("div",{className:_.a.contentWrap},g.a.createElement("span",{className:"font14 c-white"},g.a.createElement("span",{className:"mr10"},"\u5B66\u4E60\u4EBA\u6570\uFF1A"),g.a.createElement("span",null,(He==null?void 0:He.study_video_items_count)||0),g.a.createElement("span",{className:"ml100 mr10"},"\u5B66\u5458\u8BC4\u5206\uFF1A"),g.a.createElement(a.a,{allowHalf:!0,value:Object(Z.A)(He==null?void 0:He.star),disabled:!0,className:_.a.rating})),g.a.createElement("div",null,(He==null?void 0:He.can_edit)&&g.a.createElement(e.a,{className:"".concat(_.a.button," ").concat(_.a.buttonTransparent," mr15"),onClick:function(){return qe(!0)}},"\u6743\u9650\u8BBE\u7F6E"),(He==null?void 0:He.can_edit)&&g.a.createElement(e.a,{className:"".concat(_.a.button," ").concat(_.a.buttonTransparent," mr15"),onClick:it},"\u7F16\u8F91"),g.a.createElement(u.a,{title:"\u53EF\u5C06\u672C\u89C6\u9891\u53D1\u9001\u81F3\u6211\u7684\u8BFE\u5802\u4E2D\u7684\u89C6\u9891\u680F\u76EE",placement:"bottom"},g.a.createElement(e.a,{className:"".concat(_.a.button," ").concat(_.a.buttonTransparent," mr15"),onClick:We},"\u53D1\u9001\u81F3"))))),g.a.createElement(se,null),g.a.createElement(H.a,{editData:B,visible:fe,onCancel:function(){return ie(!1)},onOk:$e}),g.a.createElement(ue,{dispatch:yt,videoDetail:ut,visible:Ie,onClose:function(){return qe(!1)}}))},ee=Object(m.a)(function(vt){var et=vt.user,Ye=vt.videoDetail,ut=vt.loading,st=vt.globalSetting;return{user:et,videoDetail:Ye,globalSetting:st,loading:ut}})(ae),Ee=ne("R9oj"),F=ne("ECub"),j=ne("sRBo"),de=ne("kaz8"),be=ne("J66h"),Te=ne("hgre"),I=ne("9Bee"),t=ne("vZDz"),h=ne.n(t),L=ne("9VGf"),A=function(et){var Ye=et.videoDetail,ut=et.globalSetting,st=et.loading,gt=et.dispatch,yt=Object(l.a)(et,["videoDetail","globalSetting","loading","dispatch"]),ft=Ye.queryParams,xt=Ye.selectParams,At=Ye.videoList,at=ft.subject_id,pt=ft.videoId,ct=xt.checkBoxValue,dt=xt.radioValue,Ct={videoId:pt},fe={query:ft},ie=Object(R.useRef)(),x=Object(R.useRef)(),P=Object(R.useRef)(),B=Object(R.useRef)(5),q=Ye.detail||{},ce=q.video_item;Object(L.a)(Object(p.a)(v.a.mark(function it(){return v.a.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:if(!x.current){O.next=5;break}return console.log("videoRef lastUpdatedTime: ",ie.current.getLastUpdatedTime()),console.log(ie.current),O.next=5,Re();case 5:case"end":return O.stop()}},it)})),B.current*1e3);var Re=function(){var $e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,O=$e?{is_f:1}:{};return Object(J.n)(Object(De.a)(Object(De.a)({},O),{id:Ct.videoId,point:ie.current.getLastUpdatedTime(),total:ie.current.getDuration()}))},Ie=function($e){return console.log("handlLogWatchHistory: ",$e),$e.ed==="1"&&(x.current=!1,Re(!0)),!x.current&&!$e.ed&&(x.current=!0,B.current=ie.current.getDuration()<=5?1:5,Re()),gt({type:"userDetail/logWatchHistory",payload:$e})},qe=function(){x.current=!1},Je=function(){x.current=!0},He=function(){P.current=5,T.a.confirm({width:600,centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u8BF7\u7ED9\u672C\u89C6\u9891\u8BC4\u5206",content:g.a.createElement("div",{className:"tc font14"},g.a.createElement(a.a,{defaultValue:P.current,onChange:function(O){return P.current=O},className:h.a.modalRating})),onOk:function(){var $e=Object(p.a)(v.a.mark(function s(){var f;return v.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.next=2,Object(J.l)({id:Ct.videoId,star:P.current});case 2:f=Y.sent,f.status===0&>({type:"videoDetail/getVideoDetail",payload:Object(De.a)({id:Ct.videoId},bt(fe.query))});case 4:case"end":return Y.stop()}},s)}));function O(){return $e.apply(this,arguments)}return O}()})},nt=function($e){var O=window.filterVideoSign,s=O.findIndex(function(Ve){return Ve.id===pt}),f=s===O.length-1;if(f)return;var D=O[s+1].id,Y=O[s+1].can_view,U=O[s+1].link,Se=O[s+1].is_public;if(window.checkBoxValue){if(U){window.open(U);return}if(!Y){T.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:g.a.createElement("div",{className:"tc font14"},"\u4E0B\u4E00\u6761\u89C6\u9891\u4E3A\u521B\u5EFA\u8005\u6240\u5C5E\u5355\u4F4D\u5185\u90E8\u6559\u5B66\u8D44\u6599\uFF0C\u5916\u5355\u4F4D\u7528\u6237\u65E0\u89C2\u770B\u6743\u9650")});return}if(!Se){T.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:g.a.createElement("div",{className:"tc font14"},"\u4E0B\u4E00\u6761\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85")});return}gt({type:"videoDetail/handleList",payload:{videoId:D}}),window.videoTimer=setTimeout(function(){$e.current.play()},2e3)}},Qe=function($e,O){if($e==="checkBox"){var s=O.target.checked;window.checkBoxValue=s,gt({type:"videoDetail/setSelectValue",payload:{radioValue:dt,checkBoxValue:s}});return}gt({type:"videoDetail/setSelectValue",payload:{checkBoxValue:ct,radioValue:O.target.value}})},We=function(){var $e=At.findIndex(function(s){return s.id===pt}),O=$e===At.length-1;return O?g.a.createElement("div",null,"\u5F53\u524D\u5DF2\u662F\u6700\u540E\u4E00\u4E2A\u89C6\u9891"):g.a.createElement(de.a,{onChange:function(f){Qe("checkBox",f)},checked:ct},"\u81EA\u52A8\u64AD\u653E\u4E0B\u4E00\u4E2A\u89C6\u9891")};return g.a.createElement("aside",{className:h.a.contentWrap},g.a.createElement("aside",{className:h.a.wrap},g.a.createElement("header",null,(ce==null?void 0:ce.description)&&g.a.createElement("span",{className:h.a.introName},"\u7B80\u4ECB"),Object(Z.L)(ce==null?void 0:ce.my_star)?g.a.createElement(e.a,{type:"primary",ghost:!0,onClick:He},"\u8BC4\u5206"):g.a.createElement("span",null,g.a.createElement("span",{className:"ml100 mr10 font14"},"\u6211\u7684\u8BC4\u5206\uFF1A"),g.a.createElement(a.a,{value:ce==null?void 0:ce.my_star,disabled:!0,className:h.a.rating}))),g.a.createElement("div",{className:"mt20"},g.a.createElement(I.a,{value:(ce==null?void 0:ce.description)||""})),!(ce!=null&&ce.can_edit)&&!(ce!=null&&ce.is_public)?g.a.createElement(F.a,{description:"\u5F53\u524D\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85"}):g.a.createElement(Te.a,{ref:ie,startTime:ce==null?void 0:ce.last_point,src:ce!=null&&ce.is_link?ce==null?void 0:ce.link:(ce==null?void 0:ce.play_url)&&be.Base64.decode(ce==null?void 0:ce.play_url),videoId:ce==null?void 0:ce.video_id,logWatchHistory:Ie,handlePause:qe,handlePlay:Je,videoSpeed:dt,handlePlayEnded:nt}),!(ce!=null&&ce.can_edit)&&!(ce!=null&&ce.is_public)?null:g.a.createElement("div",{className:h.a.footer},g.a.createElement("div",{className:h.a.checkBox},We()),g.a.createElement("div",{className:h.a.radioGroup},g.a.createElement(S.a.Group,{onChange:function($e){Qe("radio",$e)},value:dt},g.a.createElement(S.a,{value:1},"1.0X"),g.a.createElement(S.a,{value:1.5},"1.5X"),g.a.createElement(S.a,{value:2},"2.0X"))))))},k=Object(m.a)(function(vt){var et=vt.videoDetail,Ye=vt.loading,ut=vt.globalSetting;return{videoDetail:et,globalSetting:ut,loading:Ye}})(A),le=ne("MRWH"),_e=ne.n(le),Ge=ne("V0Rq"),ze=ne("m3rI"),Fe=[{name:"\u5B9E\u8DF5\u9879\u76EE",type:"Shixun",icon:g.a.createElement("i",{className:"iconfont icon-shixun2 font20"})},{name:"\u89C6\u9891\u9879\u76EE",type:"VideoItem",icon:g.a.createElement("i",{className:"iconfont icon-shipin font20"})},{name:"\u6559\u5B66\u8BFE\u4EF6",type:"Attachment",icon:g.a.createElement("i",{className:"iconfont icon-jiaoxueanli font20"})},{name:"\u7A7A\u76EE\u5F55",type:"StageCatalog",icon:g.a.createElement("i",{className:"iconfont icon-kongbai font20"})}],Ke=function(et){var Ye=et.dispatch,ut=et.videoDetail,st=et.user,gt=Object(l.a)(et,["dispatch","videoDetail","user"]),yt=ut.queryParams,ft=ut.stages,xt=ut.videoList,At=ut.cust_seq,at=yt.subject_id,pt=yt.videoId,ct=yt.course_id;Object(R.useEffect)(function(){Ye(at?{type:"videoDetail/getStageData",payload:{subject_id:at}}:{type:"videoDetail/getCourseStageData",payload:{coursesId:ct}})},[]);var dt=function(){var Re=Object(p.a)(v.a.mark(function Ie(qe,Je){var He;return v.a.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:if(Ye({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF0C\u8BF7\u7A0D\u540E..."}}),!Je){Qe.next=7;break}return Qe.next=4,Object(me.C)({id:qe});case 4:Qe.t0=Qe.sent,Qe.next=10;break;case 7:return Qe.next=9,Object(me.D)({id:qe});case 9:Qe.t0=Qe.sent;case 10:if(He=Qe.t0,Ye({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),!(He!=null&&He.game_identifier||He!=null&&He.identifier)){Qe.next=15;break}return Object(Z.O)(Je?"/tasks/".concat(He==null?void 0:He.identifier,"/jupyter"):"/tasks/".concat(He.game_identifier)),Qe.abrupt("return");case 15:(He==null?void 0:He.status)===2?fe(He==null?void 0:He.message):(He==null?void 0:He.status)===3&&Ct(He==null?void 0:He.message);case 16:case"end":return Qe.stop()}},Ie)}));return function(qe,Je){return Re.apply(this,arguments)}}(),Ct=function(Ie){T.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:g.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",Ie,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},fe=function Re(Ie){var qe;Ie=(qe=Ie)!==null&&qe!==void 0&&qe.includes(".json")?Ie:"".concat(Ie,".json"),T.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:g.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var Je=Object(p.a)(v.a.mark(function nt(){var Qe,We;return v.a.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return $e.next=2,Object(Ge.S)({url:Ie});case 2:if(Qe=$e.sent,Qe){$e.next=5;break}return $e.abrupt("return");case 5:return N.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),$e.next=8,Object(me.D)({id:Qe.shixun_identifier});case 8:if(We=$e.sent,!(We!=null&&We.game_identifier)){$e.next=12;break}return Object(Z.O)("/tasks/".concat(We.game_identifier)),$e.abrupt("return");case 12:(We==null?void 0:We.status)===2?Re(We==null?void 0:We.message):(We==null?void 0:We.status)===3&&Ct(We==null?void 0:We.message);case 13:case"end":return $e.stop()}},nt)}));function He(){return Je.apply(this,arguments)}return He}()})},ie=ut.detail||{},x=ie.video_item,P=function(Ie){if((Ie==null?void 0:Ie.item_type)==="StageCatalog")return;clearTimeout(window.videoTimer);var qe=Ie.id,Je=Ie.item_type,He=Ie.identifier,nt=Ie.is_jupyter,Qe=Ie.url,We=Ie.link;if(Je==="VideoItem"&&!We){var it,$e;if(!((it=st.userInfo)!==null&&it!==void 0&&it.admin)&&!(($e=st.userInfo)!==null&&$e!==void 0&&$e.business)&&!Ie.can_view){T.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:g.a.createElement("div",{className:"tc font14"},"\u5F53\u524D\u89C6\u9891\u4E3A\u521B\u5EFA\u8005\u6240\u5C5E\u5355\u4F4D\u5185\u90E8\u6559\u5B66\u8D44\u6599\uFF0C\u5916\u5355\u4F4D\u7528\u6237\u65E0\u89C2\u770B\u6743\u9650")});return}Ye({type:"videoDetail/getVideoDetail",payload:Object(De.a)(Object(De.a)({id:qe},yt),{},{videoId:qe}),callback:function(s){if(s&&s.video_item&&!s.video_item.can_edit&&!Ie.is_public){T.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:g.a.createElement("div",{className:"tc font14"},"\u5F53\u524D\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85")});return}Ye({type:"videoDetail/handleList",payload:{videoId:qe}})}});return}if(Je==="VideoItem"&&!!We){Ie.link&&Object(J.n)({is_f:1,id:Ie.id,point:0,total:0}),window.open(We);return}if(Je==="Shixun"){dt(He,nt);return}if(Je==="Attachment"){Object(Z.t)(Ie.name,ze.a.API_SERVER+Ie.url);return}window.open(ze.a.IMG_SERVER+Qe)},B=function(Ie){var qe=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],Je=["","\u5341","\u767E","\u5343","\u4E07"];Ie=parseInt(Ie);var He=function(it){for(var $e=it.toString().split("").reverse(),O="",s=0;s<$e.length;s++)O=(s==0&&$e[s]==0||s>0&&$e[s]==0&&$e[s-1]==0?"":qe[$e[s]]+($e[s]==0?Je[0]:Je[s]))+O;return O},nt=Math.floor(Ie/1e4),Qe=Ie%1e4;return Qe.toString().length<4&&(Qe="0"+Qe),nt?He(nt)+"\u4E07"+He(Qe):He(Ie)},q=function(Ie,qe,Je,He){var nt=Ie.name,Qe=Ie.item_type,We=Ie.id,it="".concat(qe+1,"-").concat(Je+1,"-").concat(He+1),$e=Fe.find(function(f){return f.type===Qe}).icon,O=_e.a.brght,s=pt===We?"".concat(O," ").concat(_e.a.active):O;return g.a.createElement("div",{key:it,onClick:function(){return P(Ie)},className:s,style:{paddingLeft:52}},g.a.createElement("span",{className:_e.a.s1},$e),!!At&&g.a.createElement("span",{className:_e.a.s2},it),g.a.createElement("span",{className:_e.a.s3},"\u203B ",nt))},ce=function(Ie,qe,Je){var He=Ie.name,nt=Ie.item_type,Qe=Ie.id,We=Ie.children,it="".concat(qe+1,"-").concat(Je+1),$e=Fe.find(function(f){return f.type===nt}).icon,O=_e.a.brght,s=pt===Qe?"".concat(O," ").concat(_e.a.active):O;return g.a.createElement(R.Fragment,{key:it},g.a.createElement("div",{onClick:function(){return P(Ie)},className:s},g.a.createElement("span",{className:_e.a.s1},$e),!!At&&g.a.createElement("span",{className:_e.a.s2},it),g.a.createElement("span",{className:_e.a.s3},"\u203B ",He)),!!We.length&&We.map(function(f,D){return q(f,qe,Je,D)}))};return g.a.createElement("aside",{className:_e.a.list},ft.map(function(Re,Ie){var qe=Re.stage_name,Je=Re.shixuns_list,He=Je===void 0?[]:Je,nt=Re.items,Qe=nt===void 0?[]:nt,We=Object(we.a)(Qe);return g.a.createElement("aside",{key:Ie,className:_e.a.box},g.a.createElement("div",{className:_e.a.title},B(Ie+1),"\u3001",qe),We.map(function(it,$e){return ce(it,Ie,$e)}),Ie!==ft.length-1&&g.a.createElement("div",{className:_e.a.line}))}))},ot=Object(m.a)(function(vt){var et=vt.user,Ye=vt.videoDetail,ut=vt.loading,st=vt.globalSetting;return{user:et,videoDetail:Ye,globalSetting:st,loading:ut}})(Ke),Be=ne("lppi"),je=ne.n(Be),ke=ne("fWQN"),Le=function vt(){var et=this;Object(ke.a)(this,vt),this.conversion_getDPI=function(){var Ye=new Array;if(window.screen.deviceXDPI)Ye[0]=window.screen.deviceXDPI,Ye[1]=window.screen.deviceXDPI;else{var ut=document.createElement("DIV");ut.style.cssText="width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden",document.body.appendChild(ut),Ye[0]=parseInt(String(ut.offsetWidth)),Ye[1]=parseInt(String(ut.offsetHeight)),ut.parentNode.removeChild(ut)}return Ye},this.pxConversionMm=function(Ye){var ut=Ye/et.conversion_getDPI()[0],st=ut*25.4;return st},this.mmConversionPx=function(Ye){var ut=Ye/25.4,st=ut*et.conversion_getDPI()[0];return st}},Oe=new Le,pe=Oe.mmConversionPx(297),ve=function(et){var Ye=et.url,ut=Object(R.useState)(""),st=Object(d.a)(ut,2),gt=st[0],yt=st[1],ft=Object(R.useState)(!0),xt=Object(d.a)(ft,2),At=xt[0],at=xt[1];return Object(R.useEffect)(function(){var pt="".concat(ze.a.API_SERVER).concat(Ye);gt!==pt&&(at(!1),setTimeout(function(){at(!0)},500)),yt(pt)},[Ye]),gt?g.a.createElement("div",{className:je.a.pdfContainer},g.a.createElement("div",{className:je.a.loading},g.a.createElement(Pe.a,{tip:"\u6B63\u5728\u52A0\u8F7D"})),At&&g.a.createElement("embed",{src:gt,height:pe,width:"100%"})):g.a.createElement(g.a.Fragment,null)},Ce=ve,xe=ne("b57q"),Ue=ne.n(xe),Xe=function(et){var Ye=et.name,ut=et.url;return g.a.createElement("div",{className:Ue.a.officeContainer},g.a.createElement(e.a,{type:"primary",onClick:function(){Object(Z.t)(Ye,ut)}},"\u70B9\u51FB\u4E0B\u8F7D\u6587\u4EF6"))},rt=Xe,bt=function(et){var Ye=et.subject_id;return{subject_id:Ye,course_id:Ye}},Et=function(et){var Ye=et.videoDetail,ut=et.globalSetting,st=et.loading,gt=et.dispatch,yt=Object(l.a)(et,["videoDetail","globalSetting","loading","dispatch"]),ft=Ye.queryParams,xt=Ye.videoList,At=Ye.attachmentList,at=Ye.active,pt=ft.subject_id,ct=ft.videoId,dt={videoId:ct};Object(R.useEffect)(function(){if(at){var fe=at.item_type,ie=at.id;fe==="VideoItem"&>({type:"videoDetail/getVideoDetail",payload:Object(De.a)(Object(De.a)({},ft),{},{id:ie})})}},[at.id]),Object(R.useEffect)(function(){var fe,ie;Object(Z.T)((fe=Ye.detail)===null||fe===void 0||((ie=fe.video_item)===null||ie===void 0)?void 0:ie.name)},[Ye]);var Ct={width:1200};return at&&at.item_type==="Attachment"&&at.content_type==="application/pdf"&&(Ct={width:1250,marginLeft:(document.body.clientWidth-1200)/2}),console.log("active:",at),g.a.createElement(Pe.a,{spinning:!1},g.a.createElement("section",{className:c.a.bg},g.a.createElement(ee,null),g.a.createElement("div",{className:c.a.container,style:Ct},g.a.createElement(ot,null),at&&at.item_type==="VideoItem"&&g.a.createElement(k,null),at&&at.item_type==="Attachment"&&at.content_type==="application/pdf"&&at.url&&g.a.createElement(Ce,{url:at.url}),at&&at.item_type==="Attachment"&&["application/msword","application/vnd.ms-excel","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].includes(at.content_type)&&at.url&&g.a.createElement(rt,{url:at.url,name:at.name}))))},_t=Me.default=Object(m.a)(function(vt){var et=vt.videoDetail,Ye=vt.loading,ut=vt.globalSetting;return{videoDetail:et,globalSetting:ut,loading:Ye}})(Et)},"9Bee":function(lt,Me,ne){"use strict";var Ne=ne("DYRE"),Pe=ne("zeV3"),De=ne("+L6B"),l=ne("2/Rp"),R=ne("k1fw"),g=ne("9og8"),m=ne("tJVT"),y=ne("WmNS"),c=ne.n(y),o=ne("q1tI"),u=ne.n(o),r=ne("vg9a"),e=ne("DlQD"),n=ne.n(e),a=ne("rUJ1");function p(O,s){var f=O.match(/^(\s+)(?:```)/);if(f===null)return s;var D=f[1];return s.split(`
|
|
|
`).map(function(Y){var U=Y.match(/^\s+/);if(U===null)return Y;var Se=Object(m.a)(U,1),Ve=Se[0];return Ve.length>=D.length?Y.slice(D.length):Y}).join(`
|
|
|
`)}var d=[],i=["<ul>"],v=new n.a.Renderer,b=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function _(){d.length=0,i=["<ul>"]}var w={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function T(O,s,f,D){if(s>=O.length||O[s].level<=f)return s;var Y=O[s];D.push("<li><a href='#"+Y.anchor+"'>"+Y.text+"</a>"),s++;var U=[];return s=T(O,s,Y.level,U),U.length>0&&(D.push("<ul>"),U.forEach(function(Se){D.push(Se)}),D.push("</ul>")),D.push("</li>"),s=T(O,s,f,D),s}function C(){return T(d,0,0,i),i.push("</ul>"),i.join("")}var S={heading:function(s){var f=b.exec(s);if(f)return{type:"heading",raw:f[0],depth:f[1].length,text:f[2]}},fences:function(s){var f=this.rules.block.fences.exec(s);if(f){var D=f[0],Y=p(D,f[3]||""),U=f[2]?f[2].trim():f[2];if(["latex","katex","math"].indexOf(U)>=0){var Se=E(),Ve=Y;Y=Se,K[Se]={type:"block",expression:Ve}}return{type:"code",raw:D,lang:U,text:Y}}}},W=/(?:\${2})([^\n`]+?)(?:\${2})/gi,N=0,E=function(){return"__special_katext_id_".concat(N++,"__")},K={};function z(){return K}function M(){N=0,K={}}function G(O){return O=O.replace(W,function(s,f){var D=E();return K[D]={type:"inline",expression:f},D}),O}var J=v.listitem;v.listitem=function(O){return J(G(O))};var te=v.paragraph;v.paragraph=function(O){return te(G(O))};var re=v.tablecell;v.tablecell=function(O,s){return re(G(O),s)},v.code=function(O,s,f){var D=(s||"").match(/\S*/)[0];return D?["latex","katex","math"].indexOf(D)>=0?"<p class='editormd-tex'>".concat(O,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(s,'">').concat(f?O:Object(a.escape)(O,!0),`</code></pre>
|
|
|
`):'<pre class="prettyprint linenums"><code>'+(f?O:Object(a.escape)(O,!0))+"</code></pre>"},v.heading=function(O,s,f){var D=this.options.headerPrefix+f.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return d.push({anchor:D,level:s,text:O}),"<h"+s+' id="'+D+'">'+O+"</h"+s+">"},n.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),n.a.use({tokenizer:S,renderer:v});var se=n.a,H=ne("SJMd"),he=ne("ulZh"),Z=ne.n(he),$=ne("m3rI"),V=ne("Oy/b"),X=ne("p5ED"),Q=ne("ErOA");/*! *****************************************************************************
|
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
purpose with or without fee is hereby granted.
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
|
***************************************************************************** */var oe=function(O,s){return(oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,D){f.__proto__=D}||function(f,D){for(var Y in D)Object.prototype.hasOwnProperty.call(D,Y)&&(f[Y]=D[Y])})(O,s)};function we(O,s){function f(){this.constructor=O}oe(O,s),O.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}function ge(O,s,f,D){return new(f||(f=Promise))(function(Y,U){function Se(ht){try{tt(D.next(ht))}catch(Ze){U(Ze)}}function Ve(ht){try{tt(D.throw(ht))}catch(Ze){U(Ze)}}function tt(ht){var Ze;ht.done?Y(ht.value):(Ze=ht.value,Ze instanceof f?Ze:new f(function(mt){mt(Ze)})).then(Se,Ve)}tt((D=D.apply(O,s||[])).next())})}function Ae(O,s){var f,D,Y,U,Se={label:0,sent:function(){if(1&Y[0])throw Y[1];return Y[1]},trys:[],ops:[]};return U={next:Ve(0),throw:Ve(1),return:Ve(2)},typeof Symbol=="function"&&(U[Symbol.iterator]=function(){return this}),U;function Ve(tt){return function(ht){return function(Ze){if(f)throw new TypeError("Generator is already executing.");for(;Se;)try{if(f=1,D&&(Y=2&Ze[0]?D.return:Ze[0]?D.throw||((Y=D.return)&&Y.call(D),0):D.next)&&!(Y=Y.call(D,Ze[1])).done)return Y;switch(D=0,Y&&(Ze=[2&Ze[0],Y.value]),Ze[0]){case 0:case 1:Y=Ze;break;case 4:return Se.label++,{value:Ze[1],done:!1};case 5:Se.label++,D=Ze[1],Ze=[0];continue;case 7:Ze=Se.ops.pop(),Se.trys.pop();continue;default:if(!(Y=Se.trys,(Y=Y.length>0&&Y[Y.length-1])||Ze[0]!==6&&Ze[0]!==2)){Se=0;continue}if(Ze[0]===3&&(!Y||Ze[1]>Y[0]&&Ze[1]<Y[3])){Se.label=Ze[1];break}if(Ze[0]===6&&Se.label<Y[1]){Se.label=Y[1],Y=Ze;break}if(Y&&Se.label<Y[2]){Se.label=Y[2],Se.ops.push(Ze);break}Y[2]&&Se.ops.pop(),Se.trys.pop();continue}Ze=s.call(O,Se)}catch(mt){Ze=[6,mt],D=0}finally{f=Y=0}if(5&Ze[0])throw Ze[1];return{value:Ze[0]?Ze[1]:void 0,done:!0}}([tt,ht])}}}function me(){for(var O=0,s=0,f=arguments.length;s<f;s++)O+=arguments[s].length;var D=Array(O),Y=0;for(s=0;s<f;s++)for(var U=arguments[s],Se=0,Ve=U.length;Se<Ve;Se++,Y++)D[Y]=U[Se];return D}var ye=function(){function O(){}return O.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},O.setAttributes=function(s,f){for(var D=0,Y=f;D<Y.length;D++){var U=Y[D],Se=U[0],Ve=U[1];s.setAttribute(Se,Ve)}},O.createRect=function(s,f,D){var Y=document.createElementNS("http://www.w3.org/2000/svg","rect");return Y.setAttribute("width",s.toString()),Y.setAttribute("height",f.toString()),D&&O.setAttributes(Y,D),Y},O.createLine=function(s,f,D,Y,U){var Se=document.createElementNS("http://www.w3.org/2000/svg","line");return Se.setAttribute("x1",s.toString()),Se.setAttribute("y1",f.toString()),Se.setAttribute("x2",D.toString()),Se.setAttribute("y2",Y.toString()),U&&O.setAttributes(Se,U),Se},O.createPolygon=function(s,f){var D=document.createElementNS("http://www.w3.org/2000/svg","polygon");return D.setAttribute("points",s),f&&O.setAttributes(D,f),D},O.createCircle=function(s,f){var D=document.createElementNS("http://www.w3.org/2000/svg","circle");return D.setAttribute("cx",(s/2).toString()),D.setAttribute("cy",(s/2).toString()),D.setAttribute("r",s.toString()),f&&O.setAttributes(D,f),D},O.createEllipse=function(s,f,D){var Y=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Y.setAttribute("cx",(s/2).toString()),Y.setAttribute("cy",(f/2).toString()),Y.setAttribute("rx",(s/2).toString()),Y.setAttribute("ry",(f/2).toString()),D&&O.setAttributes(Y,D),Y},O.createGroup=function(s){var f=document.createElementNS("http://www.w3.org/2000/svg","g");return s&&O.setAttributes(f,s),f},O.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},O.createMarker=function(s,f,D,Y,U,Se,Ve){var tt=document.createElementNS("http://www.w3.org/2000/svg","marker");return O.setAttributes(tt,[["id",s],["orient",f],["markerWidth",D.toString()],["markerHeight",Y.toString()],["refX",U.toString()],["refY",Se.toString()]]),tt.appendChild(Ve),tt},O.createText=function(s){var f=document.createElementNS("http://www.w3.org/2000/svg","text");return f.setAttribute("x","0"),f.setAttribute("y","0"),s&&O.setAttributes(f,s),f},O.createTSpan=function(s,f){var D=document.createElementNS("http://www.w3.org/2000/svg","tspan");return D.textContent=s,f&&O.setAttributes(D,f),D},O.createImage=function(s){var f=document.createElementNS("http://www.w3.org/2000/svg","image");return s&&O.setAttributes(f,s),f},O.createPoint=function(s,f){var D=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return D.x=s,D.y=f,D},O.createPath=function(s,f){var D=document.createElementNS("http://www.w3.org/2000/svg","path");return D.setAttribute("d",s),f&&O.setAttributes(D,f),D},O}(),ue=function(){function O(){}return O.addKey=function(s){O.key=s},Object.defineProperty(O,"isLicensed",{get:function(){return!!O.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(O.key)},enumerable:!1,configurable:!0}),O}(),ae=function(){function O(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return O.prototype.rasterize=function(s,f,D){var Y=this;return new Promise(function(U){var Se=D!==void 0?D:document.createElement("canvas");s===null&&(Y.markersOnly=!0,Y.naturalSize=!1);var Ve=document.createElementNS("http://www.w3.org/2000/svg","svg");Ve.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ve.setAttribute("width",f.width.baseVal.valueAsString),Ve.setAttribute("height",f.height.baseVal.valueAsString),Ve.setAttribute("viewBox","0 0 "+f.viewBox.baseVal.width.toString()+" "+f.viewBox.baseVal.height.toString()),Ve.innerHTML=f.innerHTML,Y.naturalSize===!0?(Ve.width.baseVal.value=s.naturalWidth,Ve.height.baseVal.value=s.naturalHeight):Y.width!==void 0&&Y.height!==void 0&&(Ve.width.baseVal.value=Y.width,Ve.height.baseVal.value=Y.height),Se.width=Ve.width.baseVal.value,Se.height=Ve.height.baseVal.value;var tt=Ve.outerHTML,ht=Se.getContext("2d");Y.markersOnly!==!0&&ht.drawImage(s,0,0,Se.width,Se.height);var Ze=window.URL,mt=new Image(Se.width,Se.height);mt.setAttribute("crossOrigin","anonymous");var wt=new Blob([tt],{type:"image/svg+xml"}),kt=Ze.createObjectURL(wt);mt.onload=function(){ht.drawImage(mt,0,0),Ze.revokeObjectURL(kt);var Nt=Se.toDataURL(Y.imageType,Y.imageQuality);U(Nt)},mt.src=kt})},O}(),ee=function(){},Ee=function(){function O(s){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+s+"_"}return Object.defineProperty(O.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),O.prototype.addClass=function(s){return this.styleSheet===void 0&&this.addStyleSheet(),s.name=""+this.classNamePrefix+s.localName,this.classes.push(s),this.styleSheet.sheet.insertRule("."+s.name+" {"+s.style+"}",this.styleSheet.sheet.cssRules.length),s},O.prototype.addRule=function(s){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(s),this.styleSheet.sheet.insertRule(s.selector+" {"+s.style+"}",this.styleSheet.sheet.cssRules.length)},O.prototype.addStyleSheet=function(){var s;this.styleSheet=document.createElement("style"),((s=this.styleSheetRoot)!==null&&s!==void 0?s:document.head).appendChild(this.styleSheet),this.addRule(new F("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new F("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new F("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new j("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new j("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},O.prototype.removeStyleSheet=function(){var s;this.styleSheet&&(((s=this.styleSheetRoot)!==null&&s!==void 0?s:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},O}(),F=function(O,s){this.selector=O,this.style=s},j=function(O,s){this.localName=O,this.style=s},de=function(){function O(s,f,D,Y,U){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=s,this.displayMode=f,this.markerItems=D,this.uiStyleSettings=Y,this.styles=U,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return O.prototype.show=function(s){var f=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=s,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var D=document.createElement("div");D.className=this.toolbarBlockStyleClass.name,D.style.whiteSpace="nowrap",this.uiContainer.appendChild(D),this.addActionButton(D,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(D,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(D,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(D,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(D,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(D,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(D,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(D,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(U){var Se=document.createElement("div");Se.className=""+f.toolbarButtonStyleClass.name,Se.setAttribute("data-type-name",U.typeName),Se.innerHTML=U.icon,Se.addEventListener("click",function(){f.markerToolbarButtonClicked(Se,U)}),f.buttons.push(Se),f.markerButtons.push(Se)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var Y=document.createElement("div");Y.className=this.toolbarBlockStyleClass.name,Y.style.whiteSpace="nowrap",Y.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Y),this.addActionButton(Y,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(Y,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},O.prototype.addButtonClickListener=function(s){this.buttonClickListeners.push(s)},O.prototype.removeButtonClickListener=function(s){this.buttonClickListeners.indexOf(s)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(s),1)},O.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},O.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var s=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var f=0;f<this.markerButtons.length;f++)f<s||f===s&&this.markerButtons.length-1===s?this.markerButtonBlock.appendChild(this.markerButtons[f]):(f===s&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[f]))}},O.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},O.prototype.resetButtonStyles=function(){var s=this;this.buttons.forEach(function(f){f.className=f.className.replace(s.uiStyleSettings.toolbarButtonStyleColorsClassName?s.uiStyleSettings.toolbarButtonStyleColorsClassName:s.toolbarButtonStyleColorsClass.name,"").trim(),f.className=f.className.replace(s.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?s.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:s.toolbarActiveButtonStyleColorsClass.name,"").trim(),f.className+=" "+(s.uiStyleSettings.toolbarButtonStyleColorsClassName?s.uiStyleSettings.toolbarButtonStyleColorsClassName:s.toolbarButtonStyleColorsClass.name)})},O.prototype.addActionButton=function(s,f,D){var Y=this,U=document.createElement("div");switch(U.className=""+this.toolbarButtonStyleClass.name,U.innerHTML=f,U.setAttribute("data-action",D),U.addEventListener("click",function(){Y.actionToolbarButtonClicked(U,D)}),D){case"select":U.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":U.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":U.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":U.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":U.style.fill=this.uiStyleSettings.closeButtonColor}s.appendChild(U),this.buttons.push(U)},O.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new j("toolbar",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new j("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new j("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new j("toolbar-overflow-block",`
|
|
|
position: absolute;
|
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
z-index: 10;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new j("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var s=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new j("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*s)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*s)+`px;
|
|
|
padding: `+s+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new j("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new j("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new F("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new F("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},O.prototype.markerToolbarButtonClicked=function(s,f){this.setActiveButton(s),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(D){return D("marker",f)}),this.markerButtonOverflowBlock.style.display="none"},O.prototype.actionToolbarButtonClicked=function(s,f){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(D){return D("action",f)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},O.prototype.setActiveButton=function(s){this.resetButtonStyles(),s.className=s.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),s.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},O.prototype.setActiveMarkerButton=function(s){var f=this.markerButtons.find(function(D){return D.getAttribute("data-type-name")===s});f&&this.setActiveButton(f)},O.prototype.setCurrentMarker=function(s){var f=this;this.currentMarker=s,this.buttons.filter(function(D){return/delete|notes/.test(D.getAttribute("data-action"))}).forEach(function(D){f.currentMarker===void 0?(D.style.fillOpacity="0.4",D.style.pointerEvents="none"):(D.style.fillOpacity="1",D.style.pointerEvents="all")})},O}(),be=function(){function O(s,f,D,Y){this.panels=[],this.panelButtons=[],this.markerjsContainer=s,this.displayMode=f,this.uiStyleSettings=D,this.styles=Y,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return O.prototype.addStyles=function(){var s;this.toolboxStyleClass=this.styles.addClass(new j("toolbox",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
font-family: sans-serif;
|
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new j("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var f=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new j("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new j("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new j("toolbox-panel-row",`
|
|
|
display: flex;
|
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
cursor: default;
|
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new j("toolbox-panel-row_colors",`
|
|
|
background-color: `+((s=this.uiStyleSettings.toolboxBackgroundColor)!==null&&s!==void 0?s:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new j("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*f)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*f)+`px;
|
|
|
padding: `+f+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new j("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new j("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new F("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new F("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},O.prototype.show=function(s){var f;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=s,this.uiContainer.className=this.toolboxStyleClass.name+" "+((f=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&f!==void 0?f:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},O.prototype.setPanelButtons=function(s){var f,D,Y=this;this.panels=s,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((f=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&f!==void 0?f:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((D=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&D!==void 0?D:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(U){var Se;U.uiStyleSettings=Y.uiStyleSettings;var Ve=document.createElement("div");Ve.className=Y.toolboxButtonStyleClass.name+" "+((Se=Y.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Se!==void 0?Se:Y.toolboxButtonStyleColorsClass.name),Ve.innerHTML=U.icon,Ve.title=U.title,Ve.addEventListener("click",function(){Y.panelButtonClick(U)}),Y.panelButtons.push(Ve),Y.buttonRow.appendChild(Ve)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},O.prototype.panelButtonClick=function(s){var f=this,D=-1;if(s!==this.activePanel){D=this.panels.indexOf(s),this.panelRow.innerHTML="";var Y=s.getUi();Y.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Y),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=s}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){f.displayMode==="inline"?f.panelRow.style.display="none":f.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(U,Se){var Ve,tt;U.className=f.toolboxButtonStyleClass.name+" "+(Se===D?""+((Ve=f.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ve!==void 0?Ve:f.toolboxActiveButtonStyleColorsClass.name):""+((tt=f.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&tt!==void 0?tt:f.toolboxButtonStyleColorsClass.name))})},O}(),Te=function(O,s){this.title=O,this.icon=s},I=function(O){function s(f,D,Y,U){var Se=O.call(this,f,U||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Se.colors=[],Se.addTransparent=!1,Se.colorBoxes=[],Se.colors=D,Se.currentColor=Y,Se.setCurrentColor=Se.setCurrentColor.bind(Se),Se.getColorBox=Se.getColorBox.bind(Se),Se}return we(s,O),s.prototype.getUi=function(){var f=this,D=document.createElement("div");return D.style.overflow="hidden",D.style.whiteSpace="nowrap",this.colors.forEach(function(Y){var U=f.getColorBox(Y);D.appendChild(U),f.colorBoxes.push(U)}),D},s.prototype.getColorBox=function(f){var D=this,Y=this.uiStyleSettings.toolbarHeight/4,U=this.uiStyleSettings.toolbarHeight-Y,Se=document.createElement("div");Se.style.display="inline-block",Se.style.boxSizing="content-box",Se.style.width=U-2+"px",Se.style.height=U-2+"px",Se.style.padding="1px",Se.style.marginRight="2px",Se.style.marginBottom="2px",Se.style.borderWidth="2px",Se.style.borderStyle="solid",Se.style.borderRadius=(U+2)/2+"px",Se.style.borderColor=f===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Se.addEventListener("click",function(){D.setCurrentColor(f,Se)});var Ve=document.createElement("div");return Ve.style.display="inline-block",Ve.style.width=U-2+"px",Ve.style.height=U-2+"px",Ve.style.backgroundColor=f,Ve.style.borderRadius=U/2+"px",f==="transparent"&&(Ve.style.fill=this.uiStyleSettings.toolboxAccentColor,Ve.innerHTML=`<svg viewBox="0 0 24 24">
|
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
|
</svg>`),Se.appendChild(Ve),Se},s.prototype.setCurrentColor=function(f,D){var Y=this;this.currentColor=f,this.colorBoxes.forEach(function(U){U.style.borderColor=U===D?Y.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(f)},s}(Te),t=function(){function O(s,f,D){this._state="new",this._isSelected=!1,this._container=s,this._overlayContainer=f,this.globalSettings=D,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(O.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),O.prototype.ownsTarget=function(s){return!1},Object.defineProperty(O.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),O.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},O.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},O.prototype.pointerDown=function(s,f){},O.prototype.dblClick=function(s,f){},O.prototype.manipulate=function(s){},O.prototype.pointerUp=function(s){this.stateChanged()},O.prototype.dispose=function(){},O.prototype.addMarkerVisualToContainer=function(s){this.container.childNodes.length>0?this.container.insertBefore(s,this.container.childNodes[0]):this.container.appendChild(s)},O.prototype.getState=function(){return{typeName:O.typeName,state:this.state,notes:this.notes}},O.prototype.restoreState=function(s){this._state=s.state,this.notes=s.notes},O.prototype.scale=function(s,f){},O.prototype.colorChanged=function(s){this.onColorChanged&&this.onColorChanged(s),this.stateChanged()},O.prototype.fillColorChanged=function(s){this.onFillColorChanged&&this.onFillColorChanged(s),this.stateChanged()},O.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var s=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),s.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(s)&&this.onStateChanged(this)}},O.typeName="MarkerBase",O}(),h=function(){function O(){this.findGripByVisual=this.findGripByVisual.bind(this)}return O.prototype.findGripByVisual=function(s){return this.topLeft.ownsTarget(s)?this.topLeft:this.topCenter.ownsTarget(s)?this.topCenter:this.topRight.ownsTarget(s)?this.topRight:this.centerLeft.ownsTarget(s)?this.centerLeft:this.centerRight.ownsTarget(s)?this.centerRight:this.bottomLeft.ownsTarget(s)?this.bottomLeft:this.bottomCenter.ownsTarget(s)?this.bottomCenter:this.bottomRight.ownsTarget(s)?this.bottomRight:void 0},O}(),L=function(){function O(){this.GRIP_SIZE=10,this.visual=ye.createGroup(),this.visual.appendChild(ye.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ye.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return O.prototype.ownsTarget=function(s){return s===this.visual||s===this.visual.childNodes[0]||s===this.visual.childNodes[1]},O}(),A=function(){function O(){}return O.toITransformMatrix=function(s){return{a:s.a,b:s.b,c:s.c,d:s.d,e:s.e,f:s.f}},O.toSVGMatrix=function(s,f){return s.a=f.a,s.b=f.b,s.c=f.c,s.d=f.d,s.e=f.e,s.f=f.f,s},O}(),k=function(O){function s(f,D,Y){var U=O.call(this,f,D,Y)||this;return U.left=0,U.top=0,U.width=0,U.height=0,U.defaultSize={x:50,y:20},U.offsetX=0,U.offsetY=0,U.rotationAngle=0,U.CB_DISTANCE=10,U._suppressMarkerCreateEvent=!1,U.container.transform.baseVal.appendItem(ye.createTransform()),U.setupControlBox(),U}return we(s,O),Object.defineProperty(s.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"visual",{get:function(){return this._visual},set:function(f){this._visual=f;var D=ye.createTransform();this._visual.transform.baseVal.appendItem(D)},enumerable:!1,configurable:!0}),s.prototype.ownsTarget=function(f){return!!O.prototype.ownsTarget.call(this,f)||!!(this.controlGrips.findGripByVisual(f)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(f))},s.prototype.pointerDown=function(f,D){O.prototype.pointerDown.call(this,f,D),this.state==="new"&&(this.left=f.x,this.top=f.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Y=this.unrotatePoint(f);if(this.manipulationStartX=Y.x,this.manipulationStartY=Y.y,this.offsetX=Y.x-this.left,this.offsetY=Y.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(D),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(D)){this.activeGrip=this.rotatorGrip;var U=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=U.x-this.width/2,this.top=U.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Se=this.container.transform.baseVal.getItem(0);Se.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Se,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},s.prototype.pointerUp=function(f){var D=this.state;O.prototype.pointerUp.call(this,f),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(f),this._state="select",D==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},s.prototype.moveVisual=function(f){this.visual.style.transform="translate("+f.x+"px, "+f.y+"px)"},s.prototype.manipulate=function(f){var D=this.unrotatePoint(f);this.state==="creating"?this.resize(f):this.state==="move"?(this.left=this.manipulationStartLeft+(D.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(D.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(D):this.state==="rotate"&&this.rotate(f)},s.prototype.resize=function(f){var D=this.manipulationStartLeft,Y=this.manipulationStartWidth,U=this.manipulationStartTop,Se=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:D=this.manipulationStartLeft+f.x-this.manipulationStartX,Y=this.manipulationStartWidth+this.manipulationStartLeft-D;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Y=this.manipulationStartWidth+f.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:U=this.manipulationStartTop+f.y-this.manipulationStartY,Se=this.manipulationStartHeight+this.manipulationStartTop-U;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Se=this.manipulationStartHeight+f.y-this.manipulationStartY}Y>=0?(this.left=D,this.width=Y):(this.left=D+Y,this.width=-Y),Se>=0?(this.top=U,this.height=Se):(this.top=U+Se,this.height=-Se),this.setSize()},s.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},s.prototype.rotate=function(f){if(Math.abs(f.x-this.centerX)>.1){var D=Math.sign(f.x-this.centerX);this.rotationAngle=180*Math.atan((f.y-this.centerY)/(f.x-this.centerX))/Math.PI+90*D,this.applyRotation()}},s.prototype.applyRotation=function(){var f=this.container.transform.baseVal.getItem(0);f.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(f,0)},s.prototype.rotatePoint=function(f){if(this.rotationAngle===0)return f;var D=this.container.getCTM(),Y=ye.createPoint(f.x,f.y);return{x:(Y=Y.matrixTransform(D)).x,y:Y.y}},s.prototype.unrotatePoint=function(f){if(this.rotationAngle===0)return f;var D=this.container.getCTM();D=D.inverse();var Y=ye.createPoint(f.x,f.y);return{x:(Y=Y.matrixTransform(D)).x,y:Y.y}},s.prototype.select=function(){O.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},s.prototype.deselect=function(){O.prototype.deselect.call(this),this.controlBox.style.display="none"},s.prototype.setupControlBox=function(){this.controlBox=ye.createGroup();var f=ye.createTransform();f.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(f),this.container.appendChild(this.controlBox),this.controlRect=ye.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ye.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new h,this.addControlGrips(),this.controlBox.style.display="none"},s.prototype.adjustControlBox=function(){var f=this.controlBox.transform.baseVal.getItem(0);f.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(f,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},s.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},s.prototype.createGrip=function(){var f=new L;return f.visual.transform.baseVal.appendItem(ye.createTransform()),this.controlBox.appendChild(f.visual),f},s.prototype.positionGrips=function(){var f=this.controlGrips.topLeft.GRIP_SIZE,D=-f/2,Y=D,U=(this.width+this.CB_DISTANCE)/2-f/2,Se=(this.height+this.CB_DISTANCE)/2-f/2,Ve=this.height+this.CB_DISTANCE-f/2,tt=this.width+this.CB_DISTANCE-f/2;this.positionGrip(this.controlGrips.topLeft.visual,D,Y),this.positionGrip(this.controlGrips.topCenter.visual,U,Y),this.positionGrip(this.controlGrips.topRight.visual,tt,Y),this.positionGrip(this.controlGrips.centerLeft.visual,D,Se),this.positionGrip(this.controlGrips.centerRight.visual,tt,Se),this.positionGrip(this.controlGrips.bottomLeft.visual,D,Ve),this.positionGrip(this.controlGrips.bottomCenter.visual,U,Ve),this.positionGrip(this.controlGrips.bottomRight.visual,tt,Ve),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,U,Y-3*this.CB_DISTANCE)},s.prototype.positionGrip=function(f,D,Y){var U=f.transform.baseVal.getItem(0);U.setTranslate(D,Y),f.transform.baseVal.replaceItem(U,0)},s.prototype.hideControlBox=function(){this.controlBox.style.display="none"},s.prototype.showControlBox=function(){this.controlBox.style.display=""},s.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:A.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:A.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},O.prototype.getState.call(this))},s.prototype.restoreState=function(f){O.prototype.restoreState.call(this,f);var D=f;this.left=D.left,this.top=D.top,this.width=D.width,this.height=D.height,this.rotationAngle=D.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(A.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,D.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(A.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,D.containerTransformMatrix))},s.prototype.scale=function(f,D){O.prototype.scale.call(this,f,D);var Y=this.rotatePoint({x:this.left,y:this.top}),U=this.unrotatePoint({x:Y.x*f,y:Y.y*D});this.left=U.x,this.top=U.y,this.width=this.width*f,this.height=this.height*D,this.adjustControlBox()},s}(t),le=function(O){function s(f,D,Y){var U=O.call(this,f,D,Y)||this;return U.fillColor="transparent",U.strokeColor="transparent",U.strokeWidth=0,U.strokeDasharray="",U.opacity=1,U.setStrokeColor=U.setStrokeColor.bind(U),U.setFillColor=U.setFillColor.bind(U),U.setStrokeWidth=U.setStrokeWidth.bind(U),U.setStrokeDasharray=U.setStrokeDasharray.bind(U),U.createVisual=U.createVisual.bind(U),U}return we(s,O),s.prototype.ownsTarget=function(f){return!(!O.prototype.ownsTarget.call(this,f)&&f!==this.visual)},s.prototype.createVisual=function(){this.visual=ye.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},s.prototype.pointerDown=function(f,D){O.prototype.pointerDown.call(this,f,D),this.state==="new"&&(this.createVisual(),this.moveVisual(f),this._state="creating")},s.prototype.manipulate=function(f){O.prototype.manipulate.call(this,f)},s.prototype.resize=function(f){O.prototype.resize.call(this,f),this.setSize()},s.prototype.setSize=function(){O.prototype.setSize.call(this),ye.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},s.prototype.pointerUp=function(f){O.prototype.pointerUp.call(this,f),this.setSize()},s.prototype.setStrokeColor=function(f){this.strokeColor=f,this.visual&&ye.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(f),this.stateChanged()},s.prototype.setFillColor=function(f){this.fillColor=f,this.visual&&ye.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},s.prototype.setStrokeWidth=function(f){this.strokeWidth=f,this.visual&&ye.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},s.prototype.setStrokeDasharray=function(f){this.strokeDasharray=f,this.visual&&ye.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},s.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},O.prototype.getState.call(this))},s.prototype.restoreState=function(f){var D=f;this.fillColor=D.fillColor,this.strokeColor=D.strokeColor,this.strokeWidth=D.strokeWidth,this.strokeDasharray=D.strokeDasharray,this.opacity=D.opacity,this.createVisual(),O.prototype.restoreState.call(this,f),this.setSize()},s.prototype.scale=function(f,D){O.prototype.scale.call(this,f,D),this.setSize()},s.title="Rectangle marker",s}(k),_e=function(O){function s(f,D,Y,U){var Se=O.call(this,f,U||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Se.widths=[],Se.widthBoxes=[],Se.widths=D,Se.currentWidth=Y,Se.setCurrentWidth=Se.setCurrentWidth.bind(Se),Se}return we(s,O),s.prototype.getUi=function(){var f=this,D=document.createElement("div");return D.style.display="flex",D.style.overflow="hidden",D.style.flexGrow="2",this.widths.forEach(function(Y){var U=document.createElement("div");U.style.display="flex",U.style.flexGrow="2",U.style.alignItems="center",U.style.justifyContent="space-between",U.style.padding="5px",U.style.borderWidth="2px",U.style.borderStyle="solid",U.style.borderColor=Y===f.currentWidth?f.uiStyleSettings.toolboxAccentColor:"transparent",U.addEventListener("click",function(){f.setCurrentWidth(Y,U)}),D.appendChild(U);var Se=document.createElement("div");Se.innerText=Y.toString(),Se.style.marginRight="5px",U.appendChild(Se);var Ve=document.createElement("div");Ve.style.minHeight="20px",Ve.style.flexGrow="2",Ve.style.display="flex",Ve.style.alignItems="center";var tt=document.createElement("hr");tt.style.minWidth="20px",tt.style.border="0px",tt.style.borderTop=Y+"px solid "+f.uiStyleSettings.toolboxColor,tt.style.flexGrow="2",Ve.appendChild(tt),U.appendChild(Ve),f.widthBoxes.push(U)}),D},s.prototype.setCurrentWidth=function(f,D){var Y=this;this.currentWidth=f,this.widthBoxes.forEach(function(U){U.style.borderColor=U===D?Y.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},s}(Te),Ge=function(O){function s(f,D,Y,U){var Se=O.call(this,f,U||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Se.styles=[],Se.styleBoxes=[],Se.styles=D,Se.currentStyle=Y,Se.setCurrentStyle=Se.setCurrentStyle.bind(Se),Se}return we(s,O),s.prototype.getUi=function(){var f=this,D=document.createElement("div");return D.style.display="flex",D.style.overflow="hidden",D.style.flexGrow="2",this.styles.forEach(function(Y){var U=document.createElement("div");U.style.display="flex",U.style.alignItems="center",U.style.justifyContent="space-between",U.style.padding="5px",U.style.borderWidth="2px",U.style.borderStyle="solid",U.style.overflow="hidden",U.style.maxWidth=100/f.styles.length-5+"%",U.style.borderColor=Y===f.currentStyle?f.uiStyleSettings.toolboxAccentColor:"transparent",U.addEventListener("click",function(){f.setCurrentStyle(Y,U)}),D.appendChild(U);var Se=document.createElement("div");Se.style.minHeight="20px",Se.style.flexGrow="2",Se.style.overflow="hidden";var Ve=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+f.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Y!==""?'stroke-dasharray="'+Y+'"':"")+` />
|
|
|
</svg>`;Se.innerHTML=Ve,U.appendChild(Se),f.styleBoxes.push(U)}),D},s.prototype.setCurrentStyle=function(f,D){var Y=this;this.currentStyle=f,this.styleBoxes.forEach(function(U){U.style.borderColor=U===D?Y.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},s}(Te),ze=function(O){function s(f,D,Y){var U=O.call(this,f,D,Y)||this;return U.strokeColor=Y.defaultColor,U.strokeWidth=Y.defaultStrokeWidth,U.strokeDasharray=Y.defaultStrokeDasharray,U.strokePanel=new I("Line color",Y.defaultColorSet,Y.defaultColor),U.strokePanel.onColorChanged=U.setStrokeColor,U.strokeWidthPanel=new _e("Line width",Y.defaultStrokeWidths,Y.defaultStrokeWidth),U.strokeWidthPanel.onWidthChanged=U.setStrokeWidth,U.strokeStylePanel=new Ge("Line style",Y.defaultStrokeDasharrays,Y.defaultStrokeDasharray),U.strokeStylePanel.onStyleChanged=U.setStrokeDasharray,U}return we(s,O),Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=O.prototype.getState.call(this);return f.typeName=s.typeName,f},s.typeName="FrameMarker",s.title="Frame marker",s.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',s}(le),Fe=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},Ke=function(O){function s(f,D,Y){var U=O.call(this,f,D,Y)||this;return U.x1=0,U.y1=0,U.x2=0,U.y2=0,U.defaultLength=50,U.manipulationStartX=0,U.manipulationStartY=0,U.manipulationStartX1=0,U.manipulationStartY1=0,U.manipulationStartX2=0,U.manipulationStartY2=0,U.setupControlBox(),U}return we(s,O),s.prototype.ownsTarget=function(f){return!!O.prototype.ownsTarget.call(this,f)||!(!this.grip1.ownsTarget(f)&&!this.grip2.ownsTarget(f))},s.prototype.pointerDown=function(f,D){O.prototype.pointerDown.call(this,f,D),this.manipulationStartX=f.x,this.manipulationStartY=f.y,this.state==="new"&&(this.x1=f.x,this.y1=f.y,this.x2=f.x,this.y2=f.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(D)?this.activeGrip=this.grip1:this.grip2.ownsTarget(D)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},s.prototype.pointerUp=function(f){var D=this.state;O.prototype.pointerUp.call(this,f),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(f),this._state="select",D==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},s.prototype.adjustVisual=function(){},s.prototype.manipulate=function(f){this.state==="creating"?this.resize(f):this.state==="move"?(this.x1=this.manipulationStartX1+f.x-this.manipulationStartX,this.y1=this.manipulationStartY1+f.y-this.manipulationStartY,this.x2=this.manipulationStartX2+f.x-this.manipulationStartX,this.y2=this.manipulationStartY2+f.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(f)},s.prototype.resize=function(f){switch(this.activeGrip){case this.grip1:this.x1=f.x,this.y1=f.y;break;case this.grip2:case void 0:this.x2=f.x,this.y2=f.y}this.adjustVisual(),this.adjustControlBox()},s.prototype.select=function(){O.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},s.prototype.deselect=function(){O.prototype.deselect.call(this),this.controlBox.style.display="none"},s.prototype.setupControlBox=function(){this.controlBox=ye.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},s.prototype.adjustControlBox=function(){this.positionGrips()},s.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},s.prototype.createGrip=function(){var f=new L;return f.visual.transform.baseVal.appendItem(ye.createTransform()),this.controlBox.appendChild(f.visual),f},s.prototype.positionGrips=function(){var f=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-f/2,this.y1-f/2),this.positionGrip(this.grip2.visual,this.x2-f/2,this.y2-f/2)},s.prototype.positionGrip=function(f,D,Y){var U=f.transform.baseVal.getItem(0);U.setTranslate(D,Y),f.transform.baseVal.replaceItem(U,0)},s.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},O.prototype.getState.call(this))},s.prototype.restoreState=function(f){O.prototype.restoreState.call(this,f);var D=f;this.x1=D.x1,this.y1=D.y1,this.x2=D.x2,this.y2=D.y2},s.prototype.scale=function(f,D){O.prototype.scale.call(this,f,D),this.x1=this.x1*f,this.y1=this.y1*D,this.x2=this.x2*f,this.y2=this.y2*D,this.adjustVisual(),this.adjustControlBox()},s}(t),ot=function(O){function s(f,D,Y){var U=O.call(this,f,D,Y)||this;return U.strokeColor="transparent",U.strokeWidth=0,U.strokeDasharray="",U.setStrokeColor=U.setStrokeColor.bind(U),U.setStrokeWidth=U.setStrokeWidth.bind(U),U.setStrokeDasharray=U.setStrokeDasharray.bind(U),U.strokeColor=Y.defaultColor,U.strokeWidth=Y.defaultStrokeWidth,U.strokeDasharray=Y.defaultStrokeDasharray,U.strokePanel=new I("Line color",Y.defaultColorSet,Y.defaultColor),U.strokePanel.onColorChanged=U.setStrokeColor,U.strokeWidthPanel=new _e("Line width",Y.defaultStrokeWidths,Y.defaultStrokeWidth),U.strokeWidthPanel.onWidthChanged=U.setStrokeWidth,U.strokeStylePanel=new Ge("Line style",Y.defaultStrokeDasharrays,Y.defaultStrokeDasharray),U.strokeStylePanel.onStyleChanged=U.setStrokeDasharray,U}return we(s,O),s.prototype.ownsTarget=function(f){return!(!O.prototype.ownsTarget.call(this,f)&&f!==this.visual&&f!==this.selectorLine&&f!==this.visibleLine)},s.prototype.createVisual=function(){this.visual=ye.createGroup(),this.selectorLine=ye.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ye.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},s.prototype.pointerDown=function(f,D){O.prototype.pointerDown.call(this,f,D),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},s.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ye.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ye.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ye.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},s.prototype.setStrokeColor=function(f){this.strokeColor=f,this.adjustVisual(),this.colorChanged(f)},s.prototype.setStrokeWidth=function(f){this.strokeWidth=f,this.adjustVisual()},s.prototype.setStrokeDasharray=function(f){this.strokeDasharray=f,this.adjustVisual(),this.stateChanged()},Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},O.prototype.getState.call(this));return f.typeName=s.typeName,f},s.prototype.restoreState=function(f){O.prototype.restoreState.call(this,f);var D=f;this.strokeColor=D.strokeColor,this.strokeWidth=D.strokeWidth,this.strokeDasharray=D.strokeDasharray,this.createVisual(),this.adjustVisual()},s.typeName="LineMarker",s.title="Line marker",s.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',s}(Ke),Be=function(O){function s(f,D,Y,U){var Se=O.call(this,f,U||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Se.fonts=[],Se.fontBoxes=[],Se.fonts=D,Se.currentFont=Y,Se.setCurrentFont=Se.setCurrentFont.bind(Se),Se}return we(s,O),s.prototype.getUi=function(){var f=this,D=document.createElement("div");return D.style.overflow="hidden",D.style.flexGrow="2",this.fonts.forEach(function(Y){var U=document.createElement("div");U.style.display="inline-block",U.style.alignItems="center",U.style.justifyContent="space-between",U.style.padding="5px",U.style.borderWidth="2px",U.style.borderStyle="solid",U.style.overflow="hidden",U.style.maxWidth=100/f.fonts.length-5+"%",U.style.borderColor=Y===f.currentFont?f.uiStyleSettings.toolboxAccentColor:"transparent",U.addEventListener("click",function(){f.setCurrentFont(Y,U)}),D.appendChild(U);var Se=document.createElement("div");Se.style.display="flex",Se.style.minHeight="20px",Se.style.flexGrow="2",Se.style.fontFamily=Y,Se.style.overflow="hidden";var Ve=document.createElement("div");Ve.style.whiteSpace="nowrap",Ve.style.overflow="hidden",Ve.style.textOverflow="ellipsis",Ve.innerHTML="The quick brown fox jumps over the lazy dog",Se.appendChild(Ve),U.appendChild(Se),f.fontBoxes.push(U)}),D},s.prototype.setCurrentFont=function(f,D){var Y=this;this.currentFont=f,this.fontBoxes.forEach(function(U){U.style.borderColor=U===D?Y.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},s}(Te),je=function(O){function s(f,D,Y){var U=O.call(this,f,D,Y)||this;return U.color="transparent",U.padding=5,U.DEFAULT_TEXT="your text here",U.text=U.DEFAULT_TEXT,U.isMoved=!1,U.color=Y.defaultColor,U.fontFamily=Y.defaultFontFamily,U.defaultSize={x:100,y:30},U.setColor=U.setColor.bind(U),U.setFont=U.setFont.bind(U),U.renderText=U.renderText.bind(U),U.sizeText=U.sizeText.bind(U),U.textEditDivClicked=U.textEditDivClicked.bind(U),U.showTextEditor=U.showTextEditor.bind(U),U.setSize=U.setSize.bind(U),U.positionTextEditor=U.positionTextEditor.bind(U),U.colorPanel=new I("Color",Y.defaultColorSet,Y.defaultColor),U.colorPanel.onColorChanged=U.setColor,U.fontFamilyPanel=new Be("Font",Y.defaultFontFamilies,Y.defaultFontFamily),U.fontFamilyPanel.onFontChanged=U.setFont,U}return we(s,O),s.prototype.ownsTarget=function(f){if(O.prototype.ownsTarget.call(this,f)||f===this.visual||f===this.textElement||f===this.bgRectangle)return!0;var D=!1;return this.textElement.childNodes.forEach(function(Y){Y===f&&(D=!0)}),D},s.prototype.createVisual=function(){this.visual=ye.createGroup(),this.bgRectangle=ye.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ye.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ye.createTransform()),this.textElement.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},s.prototype.pointerDown=function(f,D){O.prototype.pointerDown.call(this,f,D),this.isMoved=!1,this.pointerDownPoint=f,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(f),this._state="creating")},s.prototype.renderText=function(){var f=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(D){f.textElement.appendChild(ye.createTSpan(D.trim()===""?" ":D.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},s.prototype.getTextScale=function(){var f=this.textElement.getBBox(),D=1;if(f.width>0&&f.height>0){var Y=(1*this.width-this.width*this.padding*2/100)/f.width,U=(1*this.height-this.height*this.padding*2/100)/f.height;D=Math.min(Y,U)}return D},s.prototype.getTextPosition=function(f){var D=this.textElement.getBBox(),Y=0,U=0;return D.width>0&&D.height>0&&(Y=(this.width-D.width*f)/2,U=this.height/2-D.height*f/2),{x:Y,y:U}},s.prototype.sizeText=function(){var f=this.textElement.getBBox(),D=this.getTextScale(),Y=this.getTextPosition(D);Y.y-=f.y*D,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Y.x+"px, "+Y.y+"px) scale("+D+", "+D+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Y.x,Y.y),this.textElement.transform.baseVal.getItem(1).setScale(D,D))},s.prototype.manipulate=function(f){O.prototype.manipulate.call(this,f),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(f.x-this.pointerDownPoint.x)>5||Math.abs(f.y-this.pointerDownPoint.y)>5)},s.prototype.resize=function(f){O.prototype.resize.call(this,f),this.isMoved=!0,this.setSize(),this.sizeText()},s.prototype.setSize=function(){O.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ye.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ye.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},s.prototype.pointerUp=function(f){var D=this.state;D==="creating"&&(this._suppressMarkerCreateEvent=!0),O.prototype.pointerUp.call(this,f),this.setSize(),(D==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},s.prototype.showTextEditor=function(){var f=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(D){D.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var D=Number.parseFloat(f.textEditor.style.fontSize);f.textEditor.clientWidth>=Number.parseInt(f.textEditor.style.maxWidth)&&D>.9;)D-=.1,f.textEditor.style.fontSize=Math.max(D,.9)+"em"}),this.textEditor.addEventListener("keyup",function(D){D.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(D){if(D.clipboardData){var Y=D.clipboardData.getData("text"),U=window.getSelection();if(!U.rangeCount)return!1;U.deleteFromDocument(),U.getRangeAt(0).insertNode(document.createTextNode(Y)),D.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){f.textEditDivClicked(f.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},s.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var f=this.getTextScale(),D=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Y=this.textElement.getBBox(),U={x:Y.width*f,y:Y.height*f};D.x-=U.x/2,D.y-=U.y/2,this.textEditor.style.top=D.y+"px",this.textEditor.style.left=D.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-D.x+"px",this.textEditor.style.fontSize=Math.max(16*f,12)+"px",this.textElement.style.display="none"}},s.prototype.textEditDivClicked=function(f){this.text=f.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},s.prototype.select=function(){O.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},s.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),O.prototype.deselect.call(this)},s.prototype.dblClick=function(f,D){O.prototype.dblClick.call(this,f,D),this.showTextEditor()},s.prototype.setColor=function(f){this.textElement&&ye.setAttributes(this.textElement,[["fill",f]]),this.color=f,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(f)},s.prototype.setFont=function(f){this.textElement&&ye.setAttributes(this.textElement,[["font-family",f]]),this.fontFamily=f,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},s.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},s.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},O.prototype.getState.call(this));return f.typeName=s.typeName,f},s.prototype.restoreState=function(f){var D=f;this.color=D.color,this.fontFamily=D.fontFamily,this.padding=D.padding,this.text=D.text,this.createVisual(),O.prototype.restoreState.call(this,f),this.setSize()},s.prototype.scale=function(f,D){O.prototype.scale.call(this,f,D),this.setSize(),this.sizeText(),this.positionTextEditor()},s.typeName="TextMarker",s.title="Text marker",s.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',s}(k),ke=function(O){function s(f,D,Y){var U=O.call(this,f,D,Y)||this;return U.color="transparent",U.lineWidth=3,U.drawing=!1,U.pixelRatio=1,U.color=Y.defaultColor,U.lineWidth=Y.defaultStrokeWidth,U.pixelRatio=Y.freehandPixelRatio,U.setColor=U.setColor.bind(U),U.addCanvas=U.addCanvas.bind(U),U.finishCreation=U.finishCreation.bind(U),U.setLineWidth=U.setLineWidth.bind(U),U.colorPanel=new I("Color",Y.defaultColorSet,Y.defaultColor),U.colorPanel.onColorChanged=U.setColor,U.lineWidthPanel=new _e("Line width",Y.defaultStrokeWidths,Y.defaultStrokeWidth),U.lineWidthPanel.onWidthChanged=U.setLineWidth,U}return we(s,O),s.prototype.ownsTarget=function(f){return!(!O.prototype.ownsTarget.call(this,f)&&f!==this.visual&&f!==this.drawingImage)},s.prototype.createVisual=function(){this.visual=ye.createGroup(),this.drawingImage=ye.createImage(),this.visual.appendChild(this.drawingImage);var f=ye.createTransform();this.visual.transform.baseVal.appendItem(f),this.addMarkerVisualToContainer(this.visual)},s.prototype.pointerDown=function(f,D){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(f.x,f.y),this.drawing=!0):O.prototype.pointerDown.call(this,f,D)},s.prototype.manipulate=function(f){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(f.x,f.y),this.canvasContext.stroke()):O.prototype.manipulate.call(this,f)},s.prototype.resize=function(f){O.prototype.resize.call(this,f),ye.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ye.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},s.prototype.pointerUp=function(f){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):O.prototype.pointerUp.call(this,f)},s.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},s.prototype.select=function(){this.state==="creating"&&this.finishCreation(),O.prototype.select.call(this)},s.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),O.prototype.deselect.call(this)},s.prototype.finishCreation=function(){for(var f=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),D=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Y=D[0],U=D[1],Se=D[2],Ve=D[3],tt=!1,ht=0;ht<this.canvasElement.height;ht++)for(var Ze=0;Ze<this.canvasElement.width;Ze++)f.data[ht*this.canvasElement.width*4+4*Ze+3]>0&&(tt=!0,ht<U&&(U=ht),Ze<Y&&(Y=Ze),ht>Ve&&(Ve=ht),Ze>Se&&(Se=Ze));if(tt){this.left=Y/this.pixelRatio,this.top=U/this.pixelRatio,this.width=(Se-Y)/this.pixelRatio,this.height=(Ve-U)/this.pixelRatio;var mt=document.createElement("canvas");mt.width=Se-Y,mt.height=Ve-U,mt.getContext("2d").putImageData(this.canvasContext.getImageData(Y,U,Se-Y,Ve-U),0,0),this.drawingImgUrl=mt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},s.prototype.setDrawingImage=function(){ye.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ye.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},s.prototype.setColor=function(f){this.color=f,this.colorChanged(f)},s.prototype.setLineWidth=function(f){this.lineWidth=f},Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=Object.assign({drawingImgUrl:this.drawingImgUrl},O.prototype.getState.call(this));return f.typeName=s.typeName,f},s.prototype.restoreState=function(f){this.createVisual(),O.prototype.restoreState.call(this,f),this.drawingImgUrl=f.drawingImgUrl,this.setDrawingImage()},s.prototype.scale=function(f,D){O.prototype.scale.call(this,f,D),this.setDrawingImage()},s.typeName="FreehandMarker",s.title="Freehand marker",s.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',s}(k),Le=function(O){function s(f,D,Y){var U=O.call(this,f,Y||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return U.typeBoxes=[],U.currentType=D,U.setCurrentType=U.setCurrentType.bind(U),U}return we(s,O),s.prototype.getUi=function(){var f=this,D=document.createElement("div");D.style.display="flex",D.style.overflow="hidden",D.style.flexGrow="2";for(var Y=function(Ve){var tt="both";switch(Ve){case 0:tt="both";break;case 1:tt="start";break;case 2:tt="end";break;case 3:tt="none"}var ht=document.createElement("div");if(ht.style.display="flex",ht.style.flexGrow="2",ht.style.alignItems="center",ht.style.justifyContent="space-between",ht.style.padding="5px",ht.style.borderWidth="2px",ht.style.borderStyle="solid",ht.style.borderColor=tt===U.currentType?U.uiStyleSettings.toolboxAccentColor:"transparent",ht.addEventListener("click",function(){f.setCurrentType(tt,ht)}),D.appendChild(ht),tt==="both"||tt==="start"){var Ze=document.createElement("div");Ze.style.display="flex",Ze.style.alignItems="center",Ze.style.minHeight="20px",Ze.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,5 10,0 10,10" fill="`+(U.uiStyleSettings!==void 0?U.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Ze.style.marginLeft="5px",ht.appendChild(Ze)}var mt=document.createElement("div");mt.style.display="flex",mt.style.alignItems="center",mt.style.minHeight="20px",mt.style.flexGrow="2";var wt=document.createElement("hr");if(wt.style.minWidth="20px",wt.style.border="0px",wt.style.borderTop="3px solid "+(U.uiStyleSettings!==void 0?U.uiStyleSettings.toolboxColor:"#eeeeee"),wt.style.flexGrow="2",mt.appendChild(wt),ht.appendChild(mt),tt==="both"||tt==="end"){var kt=document.createElement("div");kt.style.display="flex",kt.style.alignItems="center",kt.style.minHeight="20px",kt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,0 10,5 0,10" fill="`+(U.uiStyleSettings!==void 0?U.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,kt.style.marginRight="5px",ht.appendChild(kt)}U.typeBoxes.push(ht)},U=this,Se=0;Se<4;Se++)Y(Se);return D},s.prototype.setCurrentType=function(f,D){var Y=this;this.currentType=f,this.typeBoxes.forEach(function(U){U.style.borderColor=U===D?Y.uiStyleSettings!==void 0?Y.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},s}(Te),Oe=function(O){function s(f,D,Y){var U=O.call(this,f,D,Y)||this;return U.arrowType="end",U.arrowBaseHeight=10,U.arrowBaseWidth=10,U.getArrowPoints=U.getArrowPoints.bind(U),U.setArrowType=U.setArrowType.bind(U),U.arrowTypePanel=new Le("Arrow type","end"),U.arrowTypePanel.onArrowTypeChanged=U.setArrowType,U}return we(s,O),s.prototype.ownsTarget=function(f){return!(!O.prototype.ownsTarget.call(this,f)&&f!==this.arrow1&&f!==this.arrow2)},s.prototype.getArrowPoints=function(f,D){var Y=this.arrowBaseWidth+2*this.strokeWidth,U=this.arrowBaseHeight+2*this.strokeWidth;return f-Y/2+","+(D+U/2)+" "+f+","+(D-U/2)+" "+(f+Y/2)+","+(D+U/2)},s.prototype.createTips=function(){this.arrow1=ye.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ye.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.arrow2)},s.prototype.pointerDown=function(f,D){O.prototype.pointerDown.call(this,f,D),this.state==="creating"&&this.createTips()},s.prototype.adjustVisual=function(){if(O.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ye.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ye.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var f=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),D=this.arrow1.transform.baseVal.getItem(0);D.setRotate(f,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(D,0);var Y=this.arrow2.transform.baseVal.getItem(0);Y.setRotate(f+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Y,0)}},s.prototype.setArrowType=function(f){this.arrowType=f,this.adjustVisual(),this.stateChanged()},Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=Object.assign({arrowType:this.arrowType},O.prototype.getState.call(this));return f.typeName=s.typeName,f},s.prototype.restoreState=function(f){O.prototype.restoreState.call(this,f);var D=f;this.arrowType=D.arrowType,this.createTips(),this.adjustVisual()},s.typeName="ArrowMarker",s.title="Arrow marker",s.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',s}(ot),pe=function(O){function s(f,D,Y){var U=O.call(this,f,D,Y)||this;return U.fillColor=Y.defaultFillColor,U.strokeWidth=0,U.fillPanel=new I("Color",Y.defaultColorSet,Y.defaultFillColor),U.fillPanel.onColorChanged=U.setFillColor,U}return we(s,O),Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=O.prototype.getState.call(this);return f.typeName=s.typeName,f},s.typeName="CoverMarker",s.title="Cover marker",s.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',s}(le),ve=function(O){function s(f,D,Y,U){var Se=O.call(this,f,U||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Se.opacities=[],Se.opacityBoxes=[],Se.opacities=D,Se.currentOpacity=Y,Se.setCurrentOpacity=Se.setCurrentOpacity.bind(Se),Se}return we(s,O),s.prototype.getUi=function(){var f=this,D=document.createElement("div");return D.style.display="flex",D.style.overflow="hidden",D.style.flexGrow="2",D.style.justifyContent="space-between",this.opacities.forEach(function(Y){var U=document.createElement("div");U.style.display="flex",U.style.alignItems="center",U.style.justifyContent="center",U.style.padding="5px",U.style.borderWidth="2px",U.style.borderStyle="solid",U.style.borderColor=Y===f.currentOpacity?f.uiStyleSettings.toolboxAccentColor:"transparent",U.addEventListener("click",function(){f.setCurrentOpacity(Y,U)}),D.appendChild(U);var Se=document.createElement("div");Se.innerText=100*Y+"%",U.appendChild(Se),f.opacityBoxes.push(U)}),D},s.prototype.setCurrentOpacity=function(f,D){var Y=this;this.currentOpacity=f,this.opacityBoxes.forEach(function(U){U.style.borderColor=U===D?Y.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},s}(Te),Ce=function(O){function s(f,D,Y){var U=O.call(this,f,D,Y)||this;return U.setOpacity=U.setOpacity.bind(U),U.fillColor=Y.defaultHighlightColor,U.strokeWidth=0,U.opacity=Y.defaultHighlightOpacity,U.fillPanel=new I("Color",Y.defaultColorSet,U.fillColor),U.fillPanel.onColorChanged=U.setFillColor,U.opacityPanel=new ve("Opacity",Y.defaultOpacitySteps,U.opacity),U.opacityPanel.onOpacityChanged=U.setOpacity,U}return we(s,O),s.prototype.setOpacity=function(f){this.opacity=f,this.visual&&ye.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=O.prototype.getState.call(this);return f.typeName=s.typeName,f},s.typeName="HighlightMarker",s.title="Highlight marker",s.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',s}(pe),xe='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',Ue=function(O){function s(f,D,Y){var U=O.call(this,f,D,Y)||this;return U.bgColor="transparent",U.tipPosition={x:0,y:0},U.tipBase1Position={x:0,y:0},U.tipBase2Position={x:0,y:0},U.tipMoving=!1,U.color=Y.defaultStrokeColor,U.bgColor=Y.defaultFillColor,U.fontFamily=Y.defaultFontFamily,U.defaultSize={x:100,y:30},U.setBgColor=U.setBgColor.bind(U),U.getTipPoints=U.getTipPoints.bind(U),U.positionTip=U.positionTip.bind(U),U.setTipPoints=U.setTipPoints.bind(U),U.colorPanel=new I("Text color",Y.defaultColorSet,U.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),U.colorPanel.onColorChanged=U.setColor,U.bgColorPanel=new I("Fill color",Y.defaultColorSet,U.bgColor,xe),U.bgColorPanel.onColorChanged=U.setBgColor,U.fontFamilyPanel=new Be("Font",Y.defaultFontFamilies,Y.defaultFontFamily),U.fontFamilyPanel.onFontChanged=U.setFont,U.tipGrip=new L,U.tipGrip.visual.transform.baseVal.appendItem(ye.createTransform()),U.controlBox.appendChild(U.tipGrip.visual),U}return we(s,O),s.prototype.ownsTarget=function(f){return O.prototype.ownsTarget.call(this,f)||this.tipGrip.ownsTarget(f)||this.tip===f},s.prototype.createTip=function(){ye.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ye.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},s.prototype.pointerDown=function(f,D){this.state==="new"&&O.prototype.pointerDown.call(this,f,D),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(D)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):O.prototype.pointerDown.call(this,f,D)},s.prototype.pointerUp=function(f){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,O.prototype.pointerUp.call(this,f);else{var D=this.state==="creating";O.prototype.pointerUp.call(this,f),this.setTipPoints(D),this.positionTip()}},s.prototype.manipulate=function(f){if(this.tipMoving){var D=this.unrotatePoint(f);this.tipPosition={x:D.x-this.manipulationStartLeft,y:D.y-this.manipulationStartTop},this.positionTip()}else O.prototype.manipulate.call(this,f)},s.prototype.setBgColor=function(f){this.bgRectangle&&this.tip&&(ye.setAttributes(this.bgRectangle,[["fill",f]]),ye.setAttributes(this.tip,[["fill",f]])),this.bgColor=f,this.fillColorChanged(f)},s.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},s.prototype.setTipPoints=function(f){f===void 0&&(f=!1);var D=Math.min(this.height/2,15),Y=this.height/5;f&&(this.tipPosition={x:D+Y/2,y:this.height+20});var U=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?U<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Y=this.width/5,D=Math.min(this.width/2,15),this.tipBase1Position={x:D,y:0},this.tipBase2Position={x:D+Y,y:0}):(this.tipBase1Position={x:0,y:D},this.tipBase2Position={x:0,y:D+Y}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?U<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Y=this.width/5,D=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-D-Y,y:0},this.tipBase2Position={x:this.width-D,y:0}):(this.tipBase1Position={x:this.width,y:D},this.tipBase2Position={x:this.width,y:D+Y}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?U<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Y=this.width/5,D=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-D-Y,y:this.height},this.tipBase2Position={x:this.width-D,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-D-Y},this.tipBase2Position={x:this.width,y:this.height-D}):U<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Y=this.width/5,D=Math.min(this.width/2,15),this.tipBase1Position={x:D,y:this.height},this.tipBase2Position={x:D+Y,y:this.height}):(this.tipBase1Position={x:0,y:this.height-D},this.tipBase2Position={x:0,y:this.height-D-Y})},s.prototype.resize=function(f){O.prototype.resize.call(this,f),this.positionTip()},s.prototype.positionTip=function(){ye.setAttributes(this.tip,[["points",this.getTipPoints()]]);var f=this.tipGrip.visual.transform.baseVal.getItem(0);f.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(f,0)},Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),s.prototype.select=function(){this.positionTip(),O.prototype.select.call(this)},s.prototype.getState=function(){var f=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},O.prototype.getState.call(this));return f.typeName=s.typeName,f},s.prototype.restoreState=function(f){var D=f;this.bgColor=D.bgColor,this.tipPosition=D.tipPosition,O.prototype.restoreState.call(this,f),this.createTip(),this.setTipPoints()},s.prototype.scale=function(f,D){O.prototype.scale.call(this,f,D),this.tipPosition={x:this.tipPosition.x*f,y:this.tipPosition.y*D},this.positionTip()},s.typeName="CalloutMarker",s.title="Callout marker",s.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',s}(je),Xe=function(O){function s(f,D,Y){var U=O.call(this,f,D,Y)||this;return U.fillColor="transparent",U.strokeColor="transparent",U.strokeWidth=0,U.strokeDasharray="",U.opacity=1,U.strokeColor=Y.defaultColor,U.strokeWidth=Y.defaultStrokeWidth,U.strokeDasharray=Y.defaultStrokeDasharray,U.fillColor=Y.defaultFillColor,U.setStrokeColor=U.setStrokeColor.bind(U),U.setFillColor=U.setFillColor.bind(U),U.setStrokeWidth=U.setStrokeWidth.bind(U),U.setStrokeDasharray=U.setStrokeDasharray.bind(U),U.setOpacity=U.setOpacity.bind(U),U.createVisual=U.createVisual.bind(U),U.strokePanel=new I("Line color",me(Y.defaultColorSet,["transparent"]),Y.defaultColor),U.strokePanel.onColorChanged=U.setStrokeColor,U.fillPanel=new I("Fill color",me(Y.defaultColorSet,["transparent"]),U.fillColor,xe),U.fillPanel.onColorChanged=U.setFillColor,U.strokeWidthPanel=new _e("Line width",Y.defaultStrokeWidths,Y.defaultStrokeWidth),U.strokeWidthPanel.onWidthChanged=U.setStrokeWidth,U.strokeStylePanel=new Ge("Line style",Y.defaultStrokeDasharrays,Y.defaultStrokeDasharray),U.strokeStylePanel.onStyleChanged=U.setStrokeDasharray,U.opacityPanel=new ve("Opacity",Y.defaultOpacitySteps,U.opacity),U.opacityPanel.onOpacityChanged=U.setOpacity,U}return we(s,O),s.prototype.ownsTarget=function(f){return!(!O.prototype.ownsTarget.call(this,f)&&f!==this.visual)},s.prototype.createVisual=function(){this.visual=ye.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},s.prototype.pointerDown=function(f,D){O.prototype.pointerDown.call(this,f,D),this.state==="new"&&(this.createVisual(),this.moveVisual(f),this._state="creating")},s.prototype.manipulate=function(f){O.prototype.manipulate.call(this,f)},s.prototype.resize=function(f){O.prototype.resize.call(this,f),this.setSize()},s.prototype.setSize=function(){O.prototype.setSize.call(this),ye.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},s.prototype.pointerUp=function(f){O.prototype.pointerUp.call(this,f),this.setSize()},s.prototype.setStrokeColor=function(f){this.strokeColor=f,this.visual&&ye.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(f),this.stateChanged()},s.prototype.setFillColor=function(f){this.fillColor=f,this.visual&&ye.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(f),this.stateChanged()},s.prototype.setStrokeWidth=function(f){this.strokeWidth=f,this.visual&&ye.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},s.prototype.setStrokeDasharray=function(f){this.strokeDasharray=f,this.visual&&ye.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},s.prototype.setOpacity=function(f){this.opacity=f,this.visual&&ye.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},O.prototype.getState.call(this));return f.typeName=s.typeName,f},s.prototype.restoreState=function(f){var D=f;this.fillColor=D.fillColor,this.strokeColor=D.strokeColor,this.strokeWidth=D.strokeWidth,this.strokeDasharray=D.strokeDasharray,this.opacity=D.opacity,this.createVisual(),O.prototype.restoreState.call(this,f),this.setSize()},s.prototype.scale=function(f,D){O.prototype.scale.call(this,f,D),this.setSize()},s.typeName="EllipseMarker",s.title="Ellipse marker",s.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',s}(k),rt=function(O){function s(f,D,Y){return O.call(this,f,D,Y)||this}return we(s,O),Object.defineProperty(s.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),s.prototype.ownsTarget=function(f){return!(!O.prototype.ownsTarget.call(this,f)&&f!==this.tip1&&f!==this.tip2)},s.prototype.createTips=function(){this.tip1=ye.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ye.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.tip2)},s.prototype.pointerDown=function(f,D){O.prototype.pointerDown.call(this,f,D),this.state==="creating"&&this.createTips()},s.prototype.adjustVisual=function(){if(O.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ye.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),ye.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var f=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),D=this.tip1.transform.baseVal.getItem(0);D.setRotate(f,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(D,0);var Y=this.tip2.transform.baseVal.getItem(0);Y.setRotate(f+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Y,0)}},Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=O.prototype.getState.call(this);return f.typeName=s.typeName,f},s.prototype.restoreState=function(f){O.prototype.restoreState.call(this,f),this.createTips(),this.adjustVisual()},s.typeName="MeasurementMarker",s.title="Measurement marker",s.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',s}(ot),bt=function(O){function s(f,D,Y){var U=O.call(this,f,D,Y)||this;return U.strokePanel.colors=Y.defaultColorSet,U.fillColor="transparent",U}return we(s,O),Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=O.prototype.getState.call(this);return f.typeName=s.typeName,f},s.typeName="EllipseFrameMarker",s.title="Ellipse frame marker",s.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',s}(Xe),Et=function(){function O(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(O.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),O.prototype.addUndoStep=function(s){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(s)||(this.undoStack.push(s),JSON.stringify(this.lastRedoStep)!==JSON.stringify(s)&&this.redoStack.splice(0,this.redoStack.length))},O.prototype.replaceLastUndoStep=function(s){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=s)},O.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},O.prototype.undo=function(){if(this.undoStack.length>1){var s=this.undoStack.pop();return s!==void 0&&this.redoStack.push(s),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},O.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},O}(),_t=function(O){function s(f,D,Y){var U=O.call(this,f,D,Y)||this;return U.strokeColor="transparent",U.strokeWidth=0,U.strokeDasharray="",U.curveX=0,U.curveY=0,U.manipulationStartCurveX=0,U.manipulationStartCurveY=0,U.setStrokeColor=U.setStrokeColor.bind(U),U.setStrokeWidth=U.setStrokeWidth.bind(U),U.setStrokeDasharray=U.setStrokeDasharray.bind(U),U.positionGrips=U.positionGrips.bind(U),U.addControlGrips=U.addControlGrips.bind(U),U.adjustVisual=U.adjustVisual.bind(U),U.setupControlBox=U.setupControlBox.bind(U),U.resize=U.resize.bind(U),U.strokeColor=Y.defaultColor,U.strokeWidth=Y.defaultStrokeWidth,U.strokeDasharray=Y.defaultStrokeDasharray,U.strokePanel=new I("Line color",Y.defaultColorSet,Y.defaultColor),U.strokePanel.onColorChanged=U.setStrokeColor,U.strokeWidthPanel=new _e("Line width",Y.defaultStrokeWidths,Y.defaultStrokeWidth),U.strokeWidthPanel.onWidthChanged=U.setStrokeWidth,U.strokeStylePanel=new Ge("Line style",Y.defaultStrokeDasharrays,Y.defaultStrokeDasharray),U.strokeStylePanel.onStyleChanged=U.setStrokeDasharray,U}return we(s,O),s.prototype.ownsTarget=function(f){return!(!O.prototype.ownsTarget.call(this,f)&&f!==this.visual&&f!==this.selectorCurve&&f!==this.visibleCurve&&!this.curveGrip.ownsTarget(f))},s.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},s.prototype.createVisual=function(){this.visual=ye.createGroup(),this.selectorCurve=ye.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ye.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},s.prototype.pointerDown=function(f,D){O.prototype.pointerDown.call(this,f,D),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=f.x,this.curveY=f.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(D)&&(this.activeGrip=this.curveGrip,this._state="resize")},s.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ye.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ye.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ye.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},s.prototype.setupControlBox=function(){O.prototype.setupControlBox.call(this),this.curveControlLine1=ye.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ye.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},s.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,O.prototype.addControlGrips.call(this)},s.prototype.positionGrips=function(){O.prototype.positionGrips.call(this);var f=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-f/2,this.curveY-f/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},s.prototype.manipulate=function(f){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+f.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+f.y-this.manipulationStartY),O.prototype.manipulate.call(this,f)},s.prototype.resize=function(f){this.activeGrip===this.curveGrip&&(this.curveX=f.x,this.curveY=f.y),O.prototype.resize.call(this,f),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},s.prototype.setStrokeColor=function(f){this.strokeColor=f,this.adjustVisual(),this.colorChanged(f)},s.prototype.setStrokeWidth=function(f){this.strokeWidth=f,this.adjustVisual()},s.prototype.setStrokeDasharray=function(f){this.strokeDasharray=f,this.adjustVisual()},s.prototype.scale=function(f,D){this.curveX=this.curveX*f,this.curveY=this.curveY*D,O.prototype.scale.call(this,f,D)},Object.defineProperty(s.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),s.prototype.getState=function(){var f=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},O.prototype.getState.call(this));return f.typeName=s.typeName,f},s.prototype.restoreState=function(f){O.prototype.restoreState.call(this,f);var D=f;this.strokeColor=D.strokeColor,this.strokeWidth=D.strokeWidth,this.strokeDasharray=D.strokeDasharray,this.curveX=D.curveX,this.curveY=D.curveY,this.createVisual(),this.adjustVisual()},s.typeName="CurveMarker",s.title="Curve marker",s.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',s}(Ke),vt=function(){function O(s,f){f===void 0&&(f=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=s,this.cancelable=f}return Object.defineProperty(O.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),O.prototype.preventDefault=function(){this._defaultPrevented=!0},O}(),et=function(O){function s(f,D,Y){var U=O.call(this,f,!1)||this;return U.dataUrl=D,U.state=Y,U}return we(s,O),s}(vt),Ye=function(O){function s(f,D,Y){Y===void 0&&(Y=!1);var U=O.call(this,f,Y)||this;return U.marker=D,U}return we(s,O),s}(vt),ut=function(){function O(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return O.prototype.addEventListener=function(s,f){this[s].push(f)},O.prototype.removeEventListener=function(s,f){var D=this[s].indexOf(f);D>-1&&this[s].splice(D,1)},O}(),st=function(){function O(s){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Fe,this._isOpen=!1,this.undoRedoManager=new Et,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new ut,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=O.instanceCounter++,this.styles=new Ee(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=s,this.targetRoot=document.body,this.width=s.clientWidth,this.height=s.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(O.prototype,"ALL_MARKER_TYPES",{get:function(){return[ze,ke,Oe,je,bt,Xe,Ce,Ue,rt,pe,ot,_t]},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ze,ke,Oe,je,Xe,Ce,Ue]},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ze,ke,Oe,je,Ce]},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(s){var f=this;this._availableMarkerTypes.splice(0),s.forEach(function(D){if(typeof D=="string"){var Y=f.ALL_MARKER_TYPES.find(function(U){return U.typeName===D});Y!==void 0&&f._availableMarkerTypes.push(Y)}else f._availableMarkerTypes.push(D)})},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(s){this._zoomLevel=s,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),O.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ue.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},O.prototype.show=function(){var s=this;this.styles.styleSheetRoot===void 0&&ee.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ee.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(f){return f(new vt(s))})},O.prototype.render=function(){return ge(this,void 0,void 0,function(){var s;return Ae(this,function(f){switch(f.label){case 0:return this.setCurrentMarker(),(s=new ae).naturalSize=this.renderAtNaturalSize,s.imageType=this.renderImageType,s.imageQuality=this.renderImageQuality,s.markersOnly=this.renderMarkersOnly,s.width=this.renderWidth,s.height=this.renderHeight,[4,s.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return f.sent(),[4,s.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,f.sent()]}})})},O.prototype.close=function(s){var f=this;if(s===void 0&&(s=!1),this.isOpen){var D=!1;s||this.eventListeners.beforeclose.forEach(function(Y){var U=new vt(f,!0);Y(U),U.defaultPrevented&&(D=!0)}),D||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Y){return Y(new vt(f))}),this.detachEvents(),this._isOpen=!1)}},O.prototype.addMarkersToToolbar=function(){for(var s,f=[],D=0;D<arguments.length;D++)f[D]=arguments[D];(s=this._availableMarkerTypes).push.apply(s,f)},O.prototype.addRenderEventListener=function(s){this.addEventListener("render",function(f){s(f.dataUrl,f.state)})},O.prototype.removeRenderEventListener=function(s){},O.prototype.addCloseEventListener=function(s){this.addEventListener("close",function(){s()})},O.prototype.removeCloseEventListener=function(s){},O.prototype.setupResizeObserver=function(){var s=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){s.resize(s.target.clientWidth,s.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return s.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},O.prototype.onPopupTargetResize=function(){var s=1*this.target.clientWidth/this.target.clientHeight,f=this.editorCanvas.clientWidth/s>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*s:this.editorCanvas.clientWidth,D=f<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/s;this.resize(f,D)},O.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},O.prototype.resize=function(s,f){this._isResizing=!0;var D=s/this.imageWidth,Y=f/this.imageHeight;this.imageWidth=Math.round(s),this.imageHeight=Math.round(f),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(D,Y),this._isResizing=!1},O.prototype.scaleMarkers=function(s,f){var D,Y=this;this._currentMarker&&this._currentMarker instanceof je?this._currentMarker.scale(s,f):(D=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(U){U!==Y._currentMarker&&U.scale(s,f)}),D!==void 0&&this.setCurrentMarker(D)},O.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},O.prototype.setTopLeft=function(){var s=this.editingTarget.getBoundingClientRect(),f=this.editorCanvas.getBoundingClientRect();this.left=s.left-f.left,this.top=s.top-f.top},O.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},O.prototype.addDefs=function(){for(var s,f=[],D=0;D<arguments.length;D++)f[D]=arguments[D];this.defs=ye.createDefs(),this.addDefsToImage(),(s=this.defs).append.apply(s,f)},O.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},O.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},O.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},O.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},O.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},O.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},O.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},O.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var s=document.createElement("a");s.href="https://markerjs.com/",s.target="_blank",s.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',s.title="Powered by marker.js",s.style.display="grid",s.style.alignItems="center",s.style.justifyItems="center",s.style.padding="3px",s.style.width="20px",s.style.height="20px",this.logoUI.appendChild(s),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},O.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},O.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},O.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},O.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var s=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=s+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new de(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new be(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},O.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},O.prototype.removeMarker=function(s){this.markerImage.removeChild(s.container),this.markers.indexOf(s)>-1&&this.markers.splice(this.markers.indexOf(s),1),s.dispose()},O.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},O.prototype.toolbarButtonClicked=function(s,f){if(s==="marker"&&f!==void 0)this.createNewMarker(f);else if(s==="action")switch(f){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},O.prototype.deleteSelectedMarker=function(){var s=this;if(this._currentMarker!==void 0){var f=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Y){var U=new Ye(s,s._currentMarker,!0);Y(U),U.defaultPrevented&&(f=!0)}),!f){var D=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(Y){return Y(new Ye(s,D))})}}},O.prototype.clear=function(){var s=this,f=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Se){var Ve=new Ye(s,void 0,!0);Se(Ve),Ve.defaultPrevented&&(f=!0)}),!f)){this.setCurrentMarker();for(var D=function(Se){var Ve=Y.markers[Se];Y.setCurrentMarker(Y.markers[Se]),Y._currentMarker.dispose(),Y.markerImage.removeChild(Y._currentMarker.container),Y.markers.splice(Y.markers.indexOf(Y._currentMarker),1),Y.eventListeners.markerdelete.forEach(function(tt){return tt(new Ye(s,Ve))})},Y=this,U=this.markers.length-1;U>=0;U--)D(U);this.addUndoStep()}},Object.defineProperty(O.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),O.prototype.showNotesEditor=function(){var s;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(s=this._currentMarker.notes)!==null&&s!==void 0?s:"",this.overlayContainer.appendChild(this.notesArea))},O.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},O.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},O.prototype.addUndoStep=function(){var s=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var f=this.getState(),D=this.undoRedoManager.getLastUndoStep();if(!D||D.width===f.width&&D.height===f.height){var Y=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(f),Y<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(U){return U(new vt(s))})}else this.undoRedoManager.replaceLastUndoStep(f),this.eventListeners.statechange.forEach(function(U){return U(new vt(s))})}},O.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},O.prototype.undoStep=function(){var s=this,f=this.undoRedoManager.undo();f!==void 0&&(this.restoreState(f),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(D){return D(new vt(s))}))},O.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},O.prototype.redoStep=function(){var s=this,f=this.undoRedoManager.redo();f!==void 0&&(this.restoreState(f),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(D){return D(new vt(s))}))},O.prototype.stepZoom=function(){var s=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=s<this.zoomSteps.length-1?this.zoomSteps[s+1]:this.zoomSteps[0]},O.prototype.panTo=function(s){this.contentDiv.scrollBy({left:this.prevPanPoint.x-s.x,top:this.prevPanPoint.y-s.y}),this.prevPanPoint=s},O.prototype.startRenderAndClose=function(){return ge(this,void 0,void 0,function(){var s,f,D=this;return Ae(this,function(Y){switch(Y.label){case 0:return[4,this.render()];case 1:return s=Y.sent(),f=this.getState(),this.eventListeners.render.forEach(function(U){return U(new et(D,s,f))}),this.close(!0),[2]}})})},O.prototype.getState=function(s){s===!0&&this.setCurrentMarker();var f={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(D){return f.markers.push(D.getState())}),f},O.prototype.restoreState=function(s){var f=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);s.markers.forEach(function(D){var Y=f._availableMarkerTypes.find(function(Se){return Se.typeName===D.typeName});if(Y!==void 0){var U=f.addNewMarker(Y);U.restoreState(D),f.markers.push(U)}}),s.width&&s.height&&(s.width!==this.imageWidth||s.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/s.width,this.imageHeight/s.height),this.eventListeners.restorestate.forEach(function(D){return D(new vt(f))})},O.prototype.addNewMarker=function(s){var f=ye.createGroup();return this.markerImage.appendChild(f),new s(f,this.overlayContainer,this.settings)},O.prototype.createNewMarker=function(s){var f,D=this;(f=typeof s=="string"?this._availableMarkerTypes.find(function(Y){return Y.typeName===s}):s)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(f),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(f.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Y){return Y(new Ye(D,D._currentMarker))}))},O.prototype.markerCreated=function(s){var f=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(s),this.setCurrentMarker(s),s instanceof ke&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ke):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(D){return D(new Ye(f,f._currentMarker))})},O.prototype.colorChanged=function(s){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=s,this.settings.defaultStrokeColor=s)},O.prototype.fillColorChanged=function(s){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=s)},O.prototype.markerStateChanged=function(s){var f=this;this.eventListeners.markerchange.forEach(function(D){return D(new Ye(f,s))})},O.prototype.setCurrentMarker=function(s){var f=this;this._currentMarker!==s&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(D){return D(new Ye(f,f._currentMarker))})),this._currentMarker=s,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(D){return D(new Ye(f,f._currentMarker))}))},O.prototype.onPointerDown=function(s){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||s.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var f=this.markers.find(function(D){return D.ownsTarget(s.target)});f!==void 0?(this.setCurrentMarker(f),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(s.clientX,s.clientY),s.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:s.clientX,y:s.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(s.clientX,s.clientY))},O.prototype.onDblClick=function(s){if(this._isFocused||this.focus(),this.mode==="select"){var f=this.markers.find(function(D){return D.ownsTarget(s.target)});f!==void 0&&f!==this._currentMarker&&this.setCurrentMarker(f),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(s.clientX,s.clientY),s.target):this.setCurrentMarker()}},O.prototype.onPointerMove=function(s){this.touchPoints!==1&&s.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||s.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(s.clientX,s.clientY)):this.zoomLevel>1&&this.panTo({x:s.clientX,y:s.clientY}))},O.prototype.onPointerUp=function(s){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(s.clientX,s.clientY)),this.isDragging=!1,this.addUndoStep()},O.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},O.prototype.onKeyUp=function(s){this._currentMarker===void 0||this.notesArea!==void 0||s.key!=="Delete"&&s.key!=="Backspace"||this.deleteSelectedMarker()},O.prototype.clientToLocalCoordinates=function(s,f){var D=this.markerImage.getBoundingClientRect();return{x:(s-D.left)/this.zoomLevel,y:(f-D.top)/this.zoomLevel}},O.prototype.onWindowResize=function(){this.positionUI()},O.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var s=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=s+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},O.prototype.addLicenseKey=function(s){ue.addKey(s)},O.prototype.addEventListener=function(s,f){this.eventListeners.addEventListener(s,f)},O.prototype.removeEventListener=function(s,f){this.eventListeners.removeEventListener(s,f)},O.prototype.renderState=function(s){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(s),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(O.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),O.prototype.focus=function(){var s=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(f){return f(new vt(s))}))},O.prototype.blur=function(){var s=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(f){return f(new vt(s))}))},O.instanceCounter=0,O}();/* **********************************
|
|
|
cropro version 1.2.0
|
|
|
@license SEE LICENSE IN LICENSE
|
|
|
|
|
|
copyright Alan Mendelevich
|
|
|
see README and LICENSE for details
|
|
|
********************************** *//*! *****************************************************************************
|
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
purpose with or without fee is hereby granted.
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
|
***************************************************************************** */var gt=function(O,s){return(gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,D){f.__proto__=D}||function(f,D){for(var Y in D)Object.prototype.hasOwnProperty.call(D,Y)&&(f[Y]=D[Y])})(O,s)};function yt(O,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function f(){this.constructor=O}gt(O,s),O.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}function ft(O,s,f,D){return new(f||(f=Promise))(function(Y,U){function Se(ht){try{tt(D.next(ht))}catch(Ze){U(Ze)}}function Ve(ht){try{tt(D.throw(ht))}catch(Ze){U(Ze)}}function tt(ht){var Ze;ht.done?Y(ht.value):(Ze=ht.value,Ze instanceof f?Ze:new f(function(mt){mt(Ze)})).then(Se,Ve)}tt((D=D.apply(O,s||[])).next())})}function xt(O,s){var f,D,Y,U,Se={label:0,sent:function(){if(1&Y[0])throw Y[1];return Y[1]},trys:[],ops:[]};return U={next:Ve(0),throw:Ve(1),return:Ve(2)},typeof Symbol=="function"&&(U[Symbol.iterator]=function(){return this}),U;function Ve(tt){return function(ht){return function(Ze){if(f)throw new TypeError("Generator is already executing.");for(;Se;)try{if(f=1,D&&(Y=2&Ze[0]?D.return:Ze[0]?D.throw||((Y=D.return)&&Y.call(D),0):D.next)&&!(Y=Y.call(D,Ze[1])).done)return Y;switch(D=0,Y&&(Ze=[2&Ze[0],Y.value]),Ze[0]){case 0:case 1:Y=Ze;break;case 4:return Se.label++,{value:Ze[1],done:!1};case 5:Se.label++,D=Ze[1],Ze=[0];continue;case 7:Ze=Se.ops.pop(),Se.trys.pop();continue;default:if(!(Y=Se.trys,(Y=Y.length>0&&Y[Y.length-1])||Ze[0]!==6&&Ze[0]!==2)){Se=0;continue}if(Ze[0]===3&&(!Y||Ze[1]>Y[0]&&Ze[1]<Y[3])){Se.label=Ze[1];break}if(Ze[0]===6&&Se.label<Y[1]){Se.label=Y[1],Y=Ze;break}if(Y&&Se.label<Y[2]){Se.label=Y[2],Se.ops.push(Ze);break}Y[2]&&Se.ops.pop(),Se.trys.pop();continue}Ze=s.call(O,Se)}catch(mt){Ze=[6,mt],D=0}finally{f=Y=0}if(5&Ze[0])throw Ze[1];return{value:Ze[0]?Ze[1]:void 0,done:!0}}([tt,ht])}}}var At=function(){function O(){}return O.addKey=function(s){O.key=s},Object.defineProperty(O,"isLicensed",{get:function(){return!!O.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(O.key)},enumerable:!1,configurable:!0}),O}(),at=function(){function O(){}return O.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},O.setAttributes=function(s,f){for(var D=0,Y=f;D<Y.length;D++){var U=Y[D],Se=U[0],Ve=U[1];s.setAttribute(Se,Ve)}},O.createRect=function(s,f,D){var Y=document.createElementNS("http://www.w3.org/2000/svg","rect");return Y.setAttribute("width",s.toString()),Y.setAttribute("height",f.toString()),D&&O.setAttributes(Y,D),Y},O.createLine=function(s,f,D,Y,U){var Se=document.createElementNS("http://www.w3.org/2000/svg","line");return Se.setAttribute("x1",s.toString()),Se.setAttribute("y1",f.toString()),Se.setAttribute("x2",D.toString()),Se.setAttribute("y2",Y.toString()),U&&O.setAttributes(Se,U),Se},O.createPolygon=function(s,f){var D=document.createElementNS("http://www.w3.org/2000/svg","polygon");return D.setAttribute("points",s),f&&O.setAttributes(D,f),D},O.createCircle=function(s,f){var D=document.createElementNS("http://www.w3.org/2000/svg","circle");return D.setAttribute("cx",(s/2).toString()),D.setAttribute("cy",(s/2).toString()),D.setAttribute("r",s.toString()),f&&O.setAttributes(D,f),D},O.createEllipse=function(s,f,D){var Y=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Y.setAttribute("cx",(s/2).toString()),Y.setAttribute("cy",(f/2).toString()),Y.setAttribute("rx",(s/2).toString()),Y.setAttribute("ry",(f/2).toString()),D&&O.setAttributes(Y,D),Y},O.createGroup=function(s){var f=document.createElementNS("http://www.w3.org/2000/svg","g");return s&&O.setAttributes(f,s),f},O.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},O.createMarker=function(s,f,D,Y,U,Se,Ve){var tt=document.createElementNS("http://www.w3.org/2000/svg","marker");return O.setAttributes(tt,[["id",s],["orient",f],["markerWidth",D.toString()],["markerHeight",Y.toString()],["refX",U.toString()],["refY",Se.toString()]]),tt.appendChild(Ve),tt},O.createText=function(s){var f=document.createElementNS("http://www.w3.org/2000/svg","text");return f.setAttribute("x","0"),f.setAttribute("y","0"),s&&O.setAttributes(f,s),f},O.createTSpan=function(s,f){var D=document.createElementNS("http://www.w3.org/2000/svg","tspan");return D.textContent=s,f&&O.setAttributes(D,f),D},O.createImage=function(s){var f=document.createElementNS("http://www.w3.org/2000/svg","image");return s&&O.setAttributes(f,s),f},O.createPoint=function(s,f){var D=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return D.x=s,D.y=f,D},O.createPath=function(s,f){var D=document.createElementNS("http://www.w3.org/2000/svg","path");return D.setAttribute("d",s),f&&O.setAttributes(D,f),D},O.createElement=function(s,f){var D=document.createElementNS("http://www.w3.org/2000/svg",s);return f&&O.setAttributes(D,f),D},O.getHollowRectanglePath=function(s,f,D,Y,U,Se,Ve,tt){return"M"+s+","+f+"V"+(f+Y)+"H"+(s+D)+"V"+f+"H"+U+"V"+Se+"H"+(U+Ve)+"V"+(Se+tt)+"H"+U+"V"+f+"Z"},O}(),pt=function(){function O(s){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+s+"_"}return Object.defineProperty(O.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),O.prototype.addClass=function(s){return this.styleSheet===void 0&&this.addStyleSheet(),s.name=""+this.classNamePrefix+s.localName,this.classes.push(s),this.styleSheet.sheet.insertRule("."+s.name+" {"+s.style+"}",this.styleSheet.sheet.cssRules.length),s},O.prototype.addRule=function(s){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(s),this.styleSheet.sheet.insertRule(s.selector+" {"+s.style+"}",this.styleSheet.sheet.cssRules.length)},O.prototype.addStyleSheet=function(){var s;this.styleSheet=document.createElement("style"),((s=this.styleSheetRoot)!==null&&s!==void 0?s:document.head).appendChild(this.styleSheet),this.addRule(new ct("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ct("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new ct("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new dt("_fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new dt("_fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},O.prototype.removeStyleSheet=function(){var s;this.styleSheet&&(((s=this.styleSheetRoot)!==null&&s!==void 0?s:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},O}(),ct=function(O,s){this.selector=O,this.style=s},dt=function(O,s){this.localName=O,this.style=s},Ct=function(){function O(){this.blocks=[],this.display=""}return O.prototype.addButtonBlock=function(s){s.className=this.blockClassName,s.buttonClassName=this.buttonClassName,s.buttonColorsClassName=this.buttonColorsClassName,s.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(s)},O.prototype.addElementBlock=function(s){s.className===void 0&&(s.className=this.blockClassName),this.blocks.push(s)},O.prototype.getUI=function(){var s=document.createElement("div");return s.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,s.style.display=this.display,this.blocks.forEach(function(f){return s.appendChild(f.getUI())}),s},O}(),fe=function(){function O(){}return O.prototype.getUI=function(){var s=document.createElement("div");if(s.className=this.className,this.minWidth!==void 0&&(s.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":s.style.justifyContent="flex-start";break;case"center":s.style.justifyContent="center";break;case"end":s.style.justifyContent="flex-end"}return s.style.whiteSpace="nowrap",s},O}(),ie=function(O){function s(){var f=O!==null&&O.apply(this,arguments)||this;return f.buttons=[],f}return yt(s,O),s.prototype.addButton=function(f){f.className=this.buttonClassName,f.colorsClassName=this.buttonColorsClassName,f.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(f)},s.prototype.getUI=function(){var f=O.prototype.getUI.call(this);return this.buttons.forEach(function(D){return f.appendChild(D.getUI())}),f},s}(fe),x=function(){function O(s,f){this._isActive=!1,this._isHidden=!1,this._icon=s,this.title=f,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(O.prototype,"icon",{get:function(){return this._icon},set:function(s){this._icon=s,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"isActive",{get:function(){return this._isActive},set:function(s){this._isActive=s,this.adjustClassName()},enumerable:!1,configurable:!0}),O.prototype.getUI=function(){var s=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return s.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},O.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},O.prototype.hide=function(){this._isHidden=!0},O}(),P=function(O){function s(){var f=O!==null&&O.apply(this,arguments)||this;return f.elements=[],f}return yt(s,O),s.prototype.addElement=function(f){this.elements.push(f)},s.prototype.getUI=function(){var f=O.prototype.getUI.call(this);return this.elements.forEach(function(D){return f.appendChild(D)}),f},s}(fe),B=function(){function O(s,f){this.horizontal=s,this.vertical=f}return Object.defineProperty(O.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),O.prototype.getVerticalLength=function(s){return s/this.ratio},O.prototype.getHorizontalLength=function(s){return s*this.ratio},O}(),q=function(){function O(){}return O.getIcon=function(s,f){if(s>0&&f>0){var D=new B(s,f),Y=D.ratio>=1?20:D.getHorizontalLength(20),U=D.ratio<1?20:D.getVerticalLength(20),Se=document.createElementNS("http://www.w3.org/2000/svg","svg");Se.setAttribute("xmlns","http://www.w3.org/2000/svg"),Se.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Se);var Ve=at.createDefs();Se.appendChild(Ve);var tt=at.createElement("clipPath",[["id","text-bg-clip"]]);Ve.appendChild(tt);var ht=at.createPath(at.getHollowRectanglePath((24-Y)/2,(24-U)/2,Y,U,(24-Y)/2+2,(24-U)/2+2,Y-4,U-4));Se.appendChild(ht);var Ze=at.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ze.appendChild(at.createTSpan(s+":"+f)),Se.appendChild(Ze);var mt=Ze.getBBox();at.setAttributes(Ze,[["x",((24-mt.width)/2).toString()],["y",((24-mt.height)/2-mt.y).toString()]]);var wt=at.createPath(at.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(mt.width))/2,(24-Math.ceil(mt.height))/2,Math.ceil(mt.width),Math.ceil(mt.height)));return tt.appendChild(wt),at.setAttributes(ht,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Se),Se.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},O}(),ce=function(O){function s(f,D,Y){var U=O.call(this,f,D)||this;return U.isDropdownOpen=!1,U.onClick=U.dropdownButtonClicked,U.dropdownButtons=Y,U}return yt(s,O),s.prototype.setupDropdown=function(){var f=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(D){D.className=f.className,D.colorsClassName=f.colorsClassName,f.dropdownBlock.appendChild(D.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},s.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},s.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},s.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},s.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},s.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},s}(x),Re=function(){function O(s,f){this.GRIP_SIZE=10,this.color=s,this.fillColor=f,this.visual=at.createGroup(),this.visual.appendChild(at.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(at.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return O.prototype.ownsTarget=function(s){return s===this.visual||s===this.visual.childNodes[0]||s===this.visual.childNodes[1]},O.prototype.setCenter=function(s,f){this.visual.childNodes.forEach(function(D){return at.setAttributes(D,[["cx",s.toString()],["cy",f.toString()]])})},O}(),Ie=function(){function O(s,f,D,Y){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=s,this.canvasHeight=f,this.margin=D,this.container=Y,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(O.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(s){this._aspectRatio=s,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(s){this._isGridVisible=s,this.gridContainer&&at.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(s){this._zoomFactor=s,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),O.prototype.open=function(){var s=this;this.cropShadeElement=at.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=at.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var f=0;f<this.numberOfGridLines;f++)this.horizontalGridLines.push(at.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(at.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(D){return s.gridContainer.appendChild(D)}),this.verticalGridLines.forEach(function(D){return s.gridContainer.appendChild(D)}),this.cropRectElement=at.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Re(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Re(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Re(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Re(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},O.prototype.setCropRectangle=function(s){this.cropRect=s;var f=Object.assign({},this.cropRect);this.zoomFactor!==1&&(f.width=this.cropRect.width*this.zoomFactor,f.height=this.cropRect.height*this.zoomFactor,f.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-f.width/2,f.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-f.height/2),at.setAttributes(this.cropRectElement,[["x",f.x.toString()],["y",f.y.toString()],["width",f.width.toString()],["height",f.height.toString()]]);var D=f.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(U,Se){var Ve=f.y+D*(Se+1);at.setAttributes(U,[["x1",""+f.x],["y1",""+Ve],["x2",""+(f.x+f.width)],["y2",""+Ve]])});var Y=f.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(U,Se){var Ve=f.x+Y*(Se+1);at.setAttributes(U,[["x1",""+Ve],["y1",""+f.y],["x2",""+Ve],["y2",""+(f.y+f.height)]])}),at.setAttributes(this.cropShadeElement,[["d",at.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,f.x,f.y,f.width,f.height)]]),this.topLeftGrip.setCenter(f.x,f.y),this.topRightGrip.setCenter(f.x+f.width,f.y),this.bottomLeftGrip.setCenter(f.x,f.y+f.height),this.bottomRightGrip.setCenter(f.x+f.width,f.y+f.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},O.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},O.prototype.clientToLocalCoordinates=function(s,f){var D=this.container.getBoundingClientRect();return{x:s-D.left+this.margin,y:f-D.top+this.margin}},O.prototype.onPointerDown=function(s){this.container.setPointerCapture(s.pointerId),this.previousPoint=this.clientToLocalCoordinates(s.clientX,s.clientY),this.cropRectElement===s.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(s.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(s.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(s.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(s.target)&&(this.activeGrip=this.bottomRightGrip)},O.prototype.onPointerMove=function(s){if(this.isMoving)this.move(this.clientToLocalCoordinates(s.clientX,s.clientY));else if(this.activeGrip){var f=this.clientToLocalCoordinates(s.clientX,s.clientY);this.resize(f)}s.preventDefault()},O.prototype.onPointerUp=function(s){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(s.pointerId)},O.prototype.move=function(s){var f=s.x-this.previousPoint.x,D=s.y-this.previousPoint.y;this.zoomFactor!==1&&(f=-f/this.zoomFactor,D=-D/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+f),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+D),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=s},O.prototype.resize=function(s){var f=Object.assign({},this.cropRect),D=s.x-this.previousPoint.x,Y=s.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:f.x+D<this.margin&&(D=this.margin-f.x),f.x+=D,f.width=this.cropRect.x+this.cropRect.width-f.x;break;case this.bottomRightGrip:case this.topRightGrip:f.width+D>this.canvasWidth*this.zoomFactor&&(D=this.canvasWidth*this.zoomFactor-f.width),f.width+=D}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(f.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(D),f.height=this.aspectRatio.getVerticalLength(f.width)):(f.y+=Y,f.height=this.cropRect.y+this.cropRect.height-f.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?f.height=this.aspectRatio.getVerticalLength(f.width):f.height+=Y}f.width<10&&(f.x=this.cropRect.x,f.width=10),f.height<10&&(f.y=this.cropRect.y,f.height=10),this.previousPoint=s,f.x>=this.margin&&f.y>=this.margin&&f.x-this.margin+f.width<=this.canvasWidth&&f.y-this.margin+f.height<=this.canvasHeight&&(this.cropRect=f,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},O.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var s=this.cropRect.x+this.cropRect.width/2,f=this.cropRect.y+this.cropRect.height/2,D=this.aspectRatio.getHorizontalLength(this.cropRect.height),Y=this.aspectRatio.getVerticalLength(this.cropRect.width);D/this.canvasWidth<Y/this.canvasHeight?this.cropRect.width=D:this.cropRect.height=Y,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=s-this.cropRect.width/2,this.cropRect.y=f-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},O.prototype.getRescaledRect=function(s,f,D,Y,U,Se){var Ve=D/s,tt=Y/f;return{x:(U.x-Se)*Ve+Se,y:(U.y-Se)*tt+Se,width:U.width*Ve,height:U.height*tt}},O.prototype.scaleCanvas=function(s,f){var D=this.getRescaledRect(this.canvasWidth,this.canvasHeight,s,f,this.cropRect,this.margin);this.canvasWidth=s,this.canvasHeight=f,this.onCropChange&&this.onCropChange(D),this.setCropRectangle(D)},O}(),qe=function(){function O(s){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=s,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(O.prototype,"angle",{get:function(){return this._angle},set:function(s){this._angle=s,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),O.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},O.prototype.onPointerDown=function(s){this.controlContainer.setPointerCapture(s.pointerId),this.isDragging=!0,this.previousPoint={x:s.clientX,y:s.clientY}},O.prototype.onPointerMove=function(s){this.isDragging&&(this.onAngleChange&&this.onAngleChange((s.clientX-this.previousPoint.x)/5),this.previousPoint.x=s.clientX)},O.prototype.onPointerUp=function(s){this.isDragging&&this.onAngleChange&&this.onAngleChange((s.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(s.pointerId)},O.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var s=this.angleLabelText.getBBox();at.setAttributes(this.angleLabelElement,[["x",((this.width-s.width)/2).toString()],["y",(this.height/2).toString()]])}},O.prototype.positionScaleShape=function(){if(this.scaleShape){var s=this.scaleShape.transform.baseVal.getItem(0);s.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(s,0)}},O.prototype.getVisual=function(){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("xmlns","http://www.w3.org/2000/svg"),s.setAttribute("width",this.width+"px"),s.setAttribute("height",this.height+"px"),s.setAttribute("viewBox","0 0 "+this.width+" "+this.height),s.style.flexShrink="0",document.body.appendChild(s);for(var f="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,D=1;D<=this.width/5+10;D++){var Y=D%5==0?this.height/3:this.height/6;f+="h4v"+-Y+"h1v"+Y}f+="v1H0Z",this.scaleShape=at.createPath(f);var U=at.createTransform();this.scaleShape.transform.baseVal.appendItem(U),s.appendChild(this.scaleShape),this.angleLabelElement=at.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=at.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Se=at.createTSpan("");return Se.innerHTML="°",this.angleLabelElement.appendChild(Se),s.appendChild(this.angleLabelElement),document.body.removeChild(s),s},O}(),Je=function(){function O(){this.naturalSize=!1,this.imageType="image/png"}return O.prototype.rasterize=function(s,f,D,Y,U,Se,Ve){var tt=this;return new Promise(function(ht){var Ze=document.createElement("canvas");Ze.width=s.width.baseVal.value-2*Y,Ze.height=s.height.baseVal.value-2*Y;var mt=1,wt=1;tt.naturalSize===!0?(mt=f.naturalWidth/(s.width.baseVal.value-2*Y)/Se,wt=f.naturalHeight/(s.height.baseVal.value-2*Y)/Ve,Ze.width=f.naturalWidth/Se,Ze.height=f.naturalHeight/Ve):tt.width!==void 0&&tt.height!==void 0&&(mt=tt.width/D.width,wt=tt.height/D.height,Ze.width*=mt,Ze.height*=wt);var kt=Ze.getContext("2d");kt.translate(Ze.width/2,Ze.height/2),kt.rotate(U*Math.PI/180),kt.scale(Se,Ve),kt.translate(-Ze.width/2,-Ze.height/2),kt.drawImage(f,0,0,Ze.width,Ze.height);var Nt=document.createElement("canvas");Nt.width=D.width*mt,Nt.height=D.height*wt,Nt.getContext("2d").putImageData(kt.getImageData((D.x-Y)*mt,(D.y-Y)*wt,D.width*mt,D.height*wt),0,0),ht(Nt.toDataURL(tt.imageType,tt.imageQuality))})},O}(),He=function(){function O(s){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=O.instanceCounter++,this.styles=new pt(this.instanceNo),this.target=s,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(O.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(s){this._zoomToCropEnabled=s,s?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(s){this._isGridVisible=s,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"gridLines",{get:function(){return this._gridLines},set:function(s){this._gridLines=s,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(s){this._rotationAngle=s,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"aspectRatio",{get:function(){var s;return(s=this._aspectRatio)!==null&&s!==void 0?s:this.aspectRatios[0]},set:function(s){this._aspectRatio=s},enumerable:!1,configurable:!0}),O.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},O.prototype.show=function(){this.showUI(),this.open()},O.prototype.close=function(s){s===void 0&&(s=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),s||this.closeEventListeners.forEach(function(f){return f()}),this._isOpen=!1)},O.prototype.addRenderEventListener=function(s){this.renderEventListeners.push(s)},O.prototype.removeRenderEventListener=function(s){this.renderEventListeners.indexOf(s)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(s),1)},O.prototype.addCloseEventListener=function(s){this.closeEventListeners.push(s)},O.prototype.removeCloseEventListener=function(s){this.closeEventListeners.indexOf(s)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(s),1)},O.prototype.setupResizeObserver=function(){var s=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){s.resize(s.target.clientWidth,s.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},O.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var s=1*this.target.clientWidth/this.target.clientHeight,f=this.contentDiv.clientWidth/s>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*s:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,D=f+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/s;this.resize(f,D)}},O.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},O.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",at.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},O.prototype.resize=function(s,f){this.imageWidth=Math.round(s),this.imageHeight=Math.round(f),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},O.prototype.setEditingTarget=function(){var s=document.createElement("canvas");s.width=this.target.naturalWidth,s.height=this.target.naturalHeight,s.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var f=s.toDataURL();at.setAttributes(this.editingTarget,[["href",f]]),this.setEditingTargetSize()},O.prototype.setTopLeft=function(){var s=this.target.getBoundingClientRect(),f=this.editorCanvas.getBoundingClientRect();this.left=s.left-f.left-this.CANVAS_MARGIN,this.top=s.top-f.top-this.CANVAS_MARGIN},O.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=at.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=at.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=at.createGroup(),this.editingTargetRotationScaleContainer=at.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var s=at.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(s);var f=at.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(f),this.editingTargetContainer=at.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},O.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},O.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=at.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Ie(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},O.prototype.zoomToCrop=function(){if(this.cropRect){var s=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,f=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=s+"px "+f+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-s+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-f+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},O.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},O.prototype.cropRectChanged=function(s){this.cropRect=s,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},O.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},O.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},O.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},O.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var s=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,f=this.target.offsetTop>s+this.CANVAS_MARGIN?this.target.offsetTop-(s+this.CANVAS_MARGIN):0;this.coverDiv.style.top=f+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},O.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},O.prototype.addTopToolbar=function(){var s=this;this.topToolbar=new Ct,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var f=new ie;f.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(f);var D=[];this.aspectRatios.forEach(function(wt){var kt=new x(q.getIcon(wt.horizontal,wt.vertical),wt.horizontal===0&&wt.vertical===0?"FREE":wt.horizontal+":"+wt.vertical);kt.onClick=function(){return s.ratioButtonClicked(wt)},D.push(kt)}),this.aspectRatioButton=new ce(q.getIcon(0,0),"Aspect ratio",D),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,f.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var Y=new x('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");Y.isActive=this.isGridVisible,Y.onClick=function(){s.isGridVisible=!s.isGridVisible,Y.isActive=s.isGridVisible},f.addButton(Y);var U=new x('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(U.isActive=this.zoomToCropEnabled,U.onClick=function(){s.zoomToCropEnabled=!s.zoomToCropEnabled,U.isActive=s.zoomToCropEnabled},f.addButton(U),!At.isLicensed){var Se=new P;this.topToolbar.addElementBlock(Se);var Ve=document.createElement("div");Ve.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var tt=document.createElement("a");tt.style.color="currentColor",tt.href="https://markerjs.com/products/cropro",tt.target="_blank",tt.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',Ve.appendChild(tt),Se.addElement(Ve)}var ht=new ie;ht.minWidth=3*this.toolbarHeight+"px",ht.contentAlign="end",this.topToolbar.addButtonBlock(ht);var Ze=new x('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");Ze.onClick=this.startRenderAndClose,ht.addButton(Ze),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ze.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var mt=new x('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");mt.onClick=this.close,ht.addButton(mt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(mt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},O.prototype.addBottomToolbar=function(){var s=this;this.bottomToolbar=new Ct,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var f=new ie;f.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(f);var D=new x('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");D.onClick=this.rotateLeftButtonClicked,f.addButton(D);var Y=new x('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");Y.onClick=this.rotateRightButtonClicked,f.addButton(Y);var U=new P;U.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(U),this.straightener=new qe("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(ht){s.rotateBy(ht),s.straightener.angle=s.rotationAngle},U.addElement(this.straightener.getUI());var Se=new ie;Se.minWidth=2*this.toolbarHeight+"px",Se.contentAlign="end",this.bottomToolbar.addButtonBlock(Se);var Ve=new x('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");Ve.onClick=this.flipHorizontallyButtonClicked,Se.addButton(Ve);var tt=new x('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");tt.onClick=this.flipVerticallyButtonClicked,Se.addButton(tt)},O.prototype.ratioButtonClicked=function(s){this.aspectRatio=s,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},O.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=q.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},O.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new B(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},O.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},O.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},O.prototype.restoreState=function(s){if(s){var f=this.cropLayer.getRescaledRect(s.width,s.height,this.imageWidth,this.imageHeight,s.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(f),this.cropRectChanged(f),this.flippedHorizontally=s.flippedHorizontally,this.flippedVertically=s.flippedVertically,this.applyFlip(),this.rotationAngle=s.rotationAngle,this.applyRotation()}},O.prototype.clientToLocalCoordinates=function(s,f){var D=this.cropImage.getBoundingClientRect();return{x:s-D.left,y:f-D.top}},O.prototype.onWindowResize=function(){this.positionUI()},O.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var s=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=s+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},O.prototype.rotateLeftButtonClicked=function(){var s=this.rotationAngle-90;this.rotationAngle%90!=0&&(s+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(s)},O.prototype.rotateRightButtonClicked=function(){var s=this.rotationAngle+90;this.rotationAngle%90!=0&&(s-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(s)},O.prototype.rotateTo=function(s){s=(s=s>180?s-360:s)<=-180?s+360:s,this.rotationAngle=s,this.applyRotation()},O.prototype.rotateBy=function(s){this.rotateTo((this.rotationAngle+s)%360)},O.prototype.applyRotation=function(){var s=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var f=this.editingTargetRotationContainer.transform.baseVal.getItem(0);f.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(f,0);var D=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/D.width,this.imageHeight/D.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=s},O.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},O.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},O.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},O.prototype.startRenderAndClose=function(){return ft(this,void 0,void 0,function(){var s,f;return xt(this,function(D){switch(D.label){case 0:return[4,this.render()];case 1:return s=D.sent(),f=this.getState(),this.renderEventListeners.forEach(function(Y){return Y(s,f)}),this.close(!0),[2]}})})},O.prototype.render=function(){return ft(this,void 0,void 0,function(){var s;return xt(this,function(f){switch(f.label){case 0:return(s=new Je).naturalSize=this.renderAtNaturalSize,s.imageType=this.renderImageType,s.imageQuality=this.renderImageQuality,s.width=this.renderWidth,s.height=this.renderHeight,this.unzoomFromCrop(),at.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,s.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return f.sent(),[4,s.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,f.sent()]}})})},O.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new dt("toolbar",`
|
|
|
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
overflow: hidden;
|
|
|
line-height: 0px;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new dt("toolbar_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new dt("toolbar-block",`
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
box-sizing: content-box;
|
|
|
`));var s=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new dt("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.toolbarHeight-2*s)+`px;
|
|
|
height: `+(this.toolbarHeight-2*s)+`px;
|
|
|
padding: `+s+`px;
|
|
|
cursor: default;
|
|
|
user-select: none;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new dt("toolbar_button_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new dt("toolbar_active_button",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
|
`)),this.styles.addRule(new ct("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new ct("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new dt("toolbar_dropdown",`
|
|
|
position: absolute;
|
|
|
max-width: `+4*this.toolbarHeight+`px;
|
|
|
z-index: 20;
|
|
|
white-space: normal;
|
|
|
box-sizing: content-box;
|
|
|
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
|
|
|
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
|
|
|
line-height: 0px;
|
|
|
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new dt("toolbar_dropdown_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new dt("toolbar_straightener_block",`
|
|
|
display: flex;
|
|
|
overflow: hidden;
|
|
|
justify-content: center;
|
|
|
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
|
|
|
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new dt("toolbar_straightener",`
|
|
|
display: flex;
|
|
|
overflow: hidden;
|
|
|
justify-content: center;
|
|
|
height: `+(this.toolbarHeight-2*s)+`px;
|
|
|
padding: `+s+`px;
|
|
|
cursor: default;
|
|
|
user-select: none;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new dt("toolbar_straightener_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`))},O.instanceCounter=0,O}(),nt=ne("8hTe"),Qe=ne.n(nt),We=/<pre[^>]*>/g;function it(O){var s=document.createElement("div");return s.innerHTML=O,s.childNodes.length===0?"":s.childNodes[0].nodeValue}var $e=Me.a=function(O){var s=O.value,f=s===void 0?"":s,D=O.edit,Y=D===void 0?!1:D,U=O.className,Se=O.showTextOnly,Ve=O.showLines,tt=O.replaces,ht=O.zoomImg,Ze=O.hasMask,mt=O.style,wt=mt===void 0?{}:mt,kt=O.stylesPrev,Nt=kt===void 0?{}:kt,Mt=String(f),Lt=Object(o.useRef)(),Rt=Object(o.useRef)(),qt=Object(o.useState)(""),Vt=Object(m.a)(qt,2),It=Vt[0],Pt=Vt[1],Ht=Object(o.useState)("office"),Gt=Object(m.a)(Ht,2),Xt=Gt[0],Ft=Gt[1],Yt=function(){var St=new He(Rt.current);St.displayMode="popup",St.addRenderEventListener(function(){var jt=Object(g.a)(c.a.mark(function Tt(Wt){var Dt;return c.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return Lt.current.style.display="none",Ut.next=3,Object(Q.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Wt}});case 3:Dt=Ut.sent,Dt!=null&&Dt.id&&tt(Rt.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(Dt==null?void 0:Dt.id,"?type=").concat(Dt.content_type));case 5:case"end":return Ut.stop()}},Tt)}));return function(Tt){return jt.apply(this,arguments)}}()),St.show()},Kt=function(){var St=new st(Rt.current);St.settings.displayMode="popup",St.addEventListener("render",function(){var jt=Object(g.a)(c.a.mark(function Tt(Wt){var Dt;return c.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:if(Lt.current.style.display="none",!Rt.current){Ut.next=6;break}return Ut.next=4,Object(Q.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Wt.dataUrl}});case 4:Dt=Ut.sent,Dt!=null&&Dt.id&&tt(Rt.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(Dt==null?void 0:Dt.id,"?type=").concat(Dt.content_type));case 6:case"end":return Ut.stop()}},Tt)}));return function(Tt){return jt.apply(this,arguments)}}()),St.show(),window.markerArea=St},zt=Object(o.useMemo)(function(){try{var Ot=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,St=/\"\/api\/attachments\/|\"\/attachments\/download\//g,jt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Mt=Mt.replace(Ot,"("+$.a.API_SERVER+"/api/attachments/").replace(St,'"'+$.a.API_SERVER+"/api/attachments/").replace(jt,'"'+$.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
|
`),Mt=Mt.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
|
|
|
`)}catch(Qt){}var Tt=se(Mt),Wt=z();if(Mt.match(/\[TOC\]/)&&(Tt=Tt.replace("<p>[TOC]</p>",C()),_()),Tt=Tt.replace(/(__special_katext_id_\d+__)/g,function(Qt,Ut){var en=Wt[Ut],tn=en.type,nn=en.expression;return Object(V.renderToString)(it(nn)||"",{displayMode:tn==="block",throwOnError:!1,output:"html"})}),Tt=Tt.replace(/▁/g,"\u2581\u2581\u2581"),M(),Se){var Dt=document.createElement("div");return Dt.innerHTML=Tt,Dt.innerText}return setTimeout(function(){return Jt()},500),Tt},[Mt]),Bt=Object(o.useRef)();w.WebkitLineClamp=Ve,Ve&&(wt=Object(R.a)(Object(R.a)({},wt),w));function $t(Ot){var St=Ot.target;if(St.tagName.toUpperCase()==="IMG"){if(ht){var jt=St.getAttribute("src");Pt(jt),Ft("image")}}else if(St.tagName.toUpperCase()==="A"){var Tt=St.getAttribute("href");if(Tt.indexOf("office")>-1)Ot.preventDefault(),Pt(Tt),Ft("office");else if(Tt.indexOf("application/pdf")>-1)Ot.preventDefault(),Pt(Tt),Ft("pdf");else if(Tt.indexOf("type=text")>-1)Ot.preventDefault(),Pt(Tt),Ft("html");else if(Tt.startsWith("#")){Ot.preventDefault();var Wt=document.getElementById(Tt.replace("#",""));Wt&&Wt.scrollIntoView(!0)}}}var Jt=function(){var St,jt=(St=Bt.current)===null||St===void 0?void 0:St.querySelectorAll("video");jt==null||jt.forEach(function(Tt){if(Tt.oncontextmenu=function(){return!1},Tt.src.indexOf(".m3u8")>-1&&!Tt.canPlayType("application/vnd.apple.mpegurl")){if(Z.a.isSupported()){var Wt=new Z.a;Wt.loadSource(Tt.src),Wt.attachMedia(Tt)}}})};Object(o.useEffect)(function(){if(Bt.current&&zt&&(zt.match(We)&&window.PR.prettyPrint()),Bt.current)return Bt.current.addEventListener("click",$t),function(){Bt.current.removeEventListener("click",$t),M(),_()}},[zt,Bt.current,$t]);var Zt=function(St){if(!Y)return;St.target.nodeName==="IMG"?(Lt.current.style.display="flex",Lt.current.style.width=St.target.clientWidth+"px",Lt.current.style.height=St.target.clientHeight+"px",Lt.current.style.top=St.target.offsetTop+"px",Lt.current.style.left=St.target.offsetLeft+"px",Rt.current.src=St.target.getAttribute("src")):Lt.current.style.display="none"};return u.a.createElement("div",{style:{position:"relative"}},u.a.createElement("div",{ref:Bt,style:Object(R.a)({},wt),className:"".concat(U||""," markdown-body ").concat(Qe.a.mdBody),onMouseOver:Zt,dangerouslySetInnerHTML:{__html:zt}}),u.a.createElement("div",{ref:Lt,className:Qe.a.button},u.a.createElement(Pe.a,null,u.a.createElement(l.a,{onClick:function(){return Yt()}},"\u88C1\u526A"),u.a.createElement(l.a,{onClick:function(){return Kt()}},"\u7F16\u8F91"))),u.a.createElement("img",{ref:Rt,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),u.a.createElement(X.a,{close:!0,data:It,hasMask:Ze,type:It!=null&&It.length?Xt:"",style:Object(R.a)({},Nt),onClose:function(){return Pt("")}}))}},"9VGf":function(lt,Me,ne){"use strict";ne.d(Me,"a",function(){return De});var Ne=ne("q1tI"),Pe=ne.n(Ne);function De(l,R){var g=Object(Ne.useRef)();Object(Ne.useEffect)(function(){g.current=l}),Object(Ne.useEffect)(function(){function m(){g.current()}if(R!==null){var y=setInterval(m,R);return function(){return clearInterval(y)}}},[R])}},Aky1:function(lt,Me,ne){"use strict";ne.d(Me,"a",function(){return c});var Ne=ne("ErOA"),Pe=ne("ppsT"),De=ne.n(Pe),l="",R,g="";function m(o){y(o)}function y(o){R=new De.a.Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:1829848226361863,enableUploadProgress:!1,addFileSuccess:function(r){console.log("addFileSuccess: "+r.file.name),o.addFileSuccess&&o.addFileSuccess(r),R.startUpload()},onUploadstarted:function(r){var e=r.file.name;if(r.videoId){var p="/api/users/".concat(l,"/video_auths.json");Object(Ne.a)(p,{method:"put",body:{video_id:r.videoId,title:e,file_name:e,virtual_classroom_id:g}}).then(function(d){if(d.status==-1){o.onUploadError&&o.onUploadError(r);return}var i=d.data,v=i.UploadAuth,b=i.UploadAddress,_=i.VideoId;R.setUploadAuthAndAddress(r,v,b)}).catch(function(d){R.deleteFile(R._curIndex),R.nextUpload(),console.log(d)})}else{var n="/api/users/".concat(l,"/video_auths.json"),a="";Object(Ne.a)(n,{method:"Post",body:{title:a+e,file_name:a+e,virtual_classroom_id:g}}).then(function(d){if(d){var i=d.data,v=i.UploadAuth,b=i.UploadAddress,_=i.VideoId;R.setUploadAuthAndAddress(r,v,b,_)}}).catch(function(d){R.deleteFile(R._curIndex),R.nextUpload(),console.log(d)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(r){o.onUploadSucceed&&o.onUploadSucceed(r),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(r,e,n){o.onUploadFailed&&o.onUploadFailed(r),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(r,e,n){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(r,e,n){o.onUploadProgress&&o.onUploadProgress(r,e,n);var a=Math.ceil(n*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(r){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var e="/api/users/".concat(l,"/video_auths.json");Object(Ne.a)(e,{method:"put",body:{video_id:r.videoId}}).then(function(n){var a=n.data,p=a.UploadAuth;R.resumeUploadWithAuth(p)}).catch(function(n){console.log(n)})},onUploadEnd:function(r){o.onUploadEnd&&o.onUploadEnd(r),console.log("onUploadEnd: uploaded all the files")}}),o.gotUploader&&o.gotUploader(R)}function c(o,u,r){o&&(l=o),u&&(g=u),m(r)}},"C/vA":function(lt,Me,ne){"use strict";ne.d(Me,"a",function(){return Ne});function Ne(Pe){var De=this,l=!1,R;return function(){return l||(l=!0,R=Pe.apply(De,arguments)),R}}},"Cg/j":function(lt,Me,ne){"use strict";ne.d(Me,"b",function(){return Ne}),ne.d(Me,"a",function(){return Pe}),ne.d(Me,"c",function(){return l}),ne.d(Me,"d",function(){return R});var Ne;(function(g){g.serviceIds=new Map,g.DI_TARGET="$di$target",g.DI_DEPENDENCIES="$di$dependencies";function m(y){return y[g.DI_DEPENDENCIES]||[]}g.getServiceDependencies=m})(Ne||(Ne={}));var Pe=l("instantiationService");function De(g,m,y,c){m[Ne.DI_TARGET]===m?m[Ne.DI_DEPENDENCIES].push({id:g,index:y,optional:c}):(m[Ne.DI_DEPENDENCIES]=[{id:g,index:y,optional:c}],m[Ne.DI_TARGET]=m)}function l(g){if(Ne.serviceIds.has(g))return Ne.serviceIds.get(g);var m=function(y,c,o){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");De(m,y,o,!1)};return m.toString=function(){return g},Ne.serviceIds.set(g,m),m}function R(g){return function(m,y,c){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");De(g,m,c,!0)}}},DlQD:function(lt,Me,ne){(function(Ne,Pe){lt.exports=Pe()})(this,function(){"use strict";function Ne(ke,Le){for(var Oe=0;Oe<Le.length;Oe++){var pe=Le[Oe];pe.enumerable=pe.enumerable||!1,pe.configurable=!0,"value"in pe&&(pe.writable=!0),Object.defineProperty(ke,pe.key,pe)}}function Pe(ke,Le,Oe){return Le&&Ne(ke.prototype,Le),Oe&&Ne(ke,Oe),ke}function De(ke,Le){if(!ke)return;if(typeof ke=="string")return l(ke,Le);var Oe=Object.prototype.toString.call(ke).slice(8,-1);if(Oe==="Object"&&ke.constructor&&(Oe=ke.constructor.name),Oe==="Map"||Oe==="Set")return Array.from(ke);if(Oe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oe))return l(ke,Le)}function l(ke,Le){(Le==null||Le>ke.length)&&(Le=ke.length);for(var Oe=0,pe=new Array(Le);Oe<Le;Oe++)pe[Oe]=ke[Oe];return pe}function R(ke,Le){var Oe;if(typeof Symbol=="undefined"||ke[Symbol.iterator]==null){if(Array.isArray(ke)||(Oe=De(ke))||Le&&ke&&typeof ke.length=="number"){Oe&&(ke=Oe);var pe=0;return function(){return pe>=ke.length?{done:!0}:{done:!1,value:ke[pe++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return Oe=ke[Symbol.iterator](),Oe.next.bind(Oe)}function g(ke,Le){return Le={exports:{}},ke(Le,Le.exports),Le.exports}var m=g(function(ke){function Le(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function Oe(pe){ke.exports.defaults=pe}ke.exports={defaults:Le(),getDefaults:Le,changeDefaults:Oe}}),y=m.defaults,c=m.getDefaults,o=m.changeDefaults,u=/[&<>"']/,r=/[&<>"']/g,e=/[<>"']|&(?!#?\w+;)/,n=/[<>"']|&(?!#?\w+;)/g,a={"&":"&","<":"<",">":">",'"':""","'":"'"},p=function(Le){return a[Le]};function d(ke,Le){if(Le){if(u.test(ke))return ke.replace(r,p)}else if(e.test(ke))return ke.replace(n,p);return ke}var i=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function v(ke){return ke.replace(i,function(Le,Oe){return Oe=Oe.toLowerCase(),Oe==="colon"?":":Oe.charAt(0)==="#"?Oe.charAt(1)==="x"?String.fromCharCode(parseInt(Oe.substring(2),16)):String.fromCharCode(+Oe.substring(1)):""})}var b=/(^|[^\[])\^/g;function _(ke,Le){ke=ke.source||ke,Le=Le||"";var Oe={replace:function(ve,Ce){return Ce=Ce.source||Ce,Ce=Ce.replace(b,"$1"),ke=ke.replace(ve,Ce),Oe},getRegex:function(){return new RegExp(ke,Le)}};return Oe}var w=/[^\w:]/g,T=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function C(ke,Le,Oe){if(ke){var pe;try{pe=decodeURIComponent(v(Oe)).replace(w,"").toLowerCase()}catch(ve){return null}if(pe.indexOf("javascript:")===0||pe.indexOf("vbscript:")===0||pe.indexOf("data:")===0)return null}Le&&!T.test(Oe)&&(Oe=K(Le,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(ve){return null}return Oe}var S={},W=/^[^:]+:\/*[^/]*$/,N=/^([^:]+:)[\s\S]*$/,E=/^([^:]+:\/*[^/]*)[\s\S]*$/;function K(ke,Le){S[" "+ke]||(W.test(ke)?S[" "+ke]=ke+"/":S[" "+ke]=J(ke,"/",!0)),ke=S[" "+ke];var Oe=ke.indexOf(":")===-1;return Le.substring(0,2)==="//"?Oe?Le:ke.replace(N,"$1")+Le:Le.charAt(0)==="/"?Oe?Le:ke.replace(E,"$1")+Le:ke+Le}var z={exec:function(){}};function M(ke){for(var Le=1,Oe,pe;Le<arguments.length;Le++){Oe=arguments[Le];for(pe in Oe)Object.prototype.hasOwnProperty.call(Oe,pe)&&(ke[pe]=Oe[pe])}return ke}function G(ke,Le){var Oe=ke.replace(/\|/g,function(Ce,xe,Ue){for(var Xe=!1,rt=xe;--rt>=0&&Ue[rt]==="\\";)Xe=!Xe;return Xe?"|":" |"}),pe=Oe.split(/ \|/),ve=0;if(pe.length>Le)pe.splice(Le);else for(;pe.length<Le;)pe.push("");for(;ve<pe.length;ve++)pe[ve]=pe[ve].trim().replace(/\\\|/g,"|");return pe}function J(ke,Le,Oe){var pe=ke.length;if(pe===0)return"";for(var ve=0;ve<pe;){var Ce=ke.charAt(pe-ve-1);if(Ce===Le&&!Oe)ve++;else if(Ce!==Le&&Oe)ve++;else break}return ke.substr(0,pe-ve)}function te(ke,Le){if(ke.indexOf(Le[1])===-1)return-1;for(var Oe=ke.length,pe=0,ve=0;ve<Oe;ve++)if(ke[ve]==="\\")ve++;else if(ke[ve]===Le[0])pe++;else if(ke[ve]===Le[1]&&(pe--,pe<0))return ve;return-1}function re(ke){ke&&ke.sanitize&&!ke.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var se={escape:d,unescape:v,edit:_,cleanUrl:C,resolveUrl:K,noopTest:z,merge:M,splitCells:G,rtrim:J,findClosingBracket:te,checkSanitizeDeprecation:re},H=m.defaults,he=se.rtrim,Z=se.splitCells,$=se.escape,V=se.findClosingBracket;function X(ke,Le,Oe){var pe=Le.href,ve=Le.title?$(Le.title):null,Ce=ke[1].replace(/\\([\[\]])/g,"$1");return ke[0].charAt(0)!=="!"?{type:"link",raw:Oe,href:pe,title:ve,text:Ce}:{type:"image",raw:Oe,href:pe,title:ve,text:$(Ce)}}function Q(ke,Le){var Oe=ke.match(/^(\s+)(?:```)/);if(Oe===null)return Le;var pe=Oe[1];return Le.split(`
|
|
|
`).map(function(ve){var Ce=ve.match(/^\s+/);if(Ce===null)return ve;var xe=Ce[0];return xe.length>=pe.length?ve.slice(pe.length):ve}).join(`
|
|
|
`)}var oe=function(){function ke(Oe){this.options=Oe||H}var Le=ke.prototype;return Le.space=function(pe){var ve=this.rules.block.newline.exec(pe);if(ve)return ve[0].length>1?{type:"space",raw:ve[0]}:{raw:`
|
|
|
`}},Le.code=function(pe,ve){var Ce=this.rules.block.code.exec(pe);if(Ce){var xe=ve[ve.length-1];if(xe&&xe.type==="paragraph")return{raw:Ce[0],text:Ce[0].trimRight()};var Ue=Ce[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ce[0],codeBlockStyle:"indented",text:this.options.pedantic?Ue:he(Ue,`
|
|
|
`)}}},Le.fences=function(pe){var ve=this.rules.block.fences.exec(pe);if(ve){var Ce=ve[0],xe=Q(Ce,ve[3]||"");return{type:"code",raw:Ce,lang:ve[2]?ve[2].trim():ve[2],text:xe}}},Le.heading=function(pe){var ve=this.rules.block.heading.exec(pe);if(ve)return{type:"heading",raw:ve[0],depth:ve[1].length,text:ve[2]}},Le.nptable=function(pe){var ve=this.rules.block.nptable.exec(pe);if(ve){var Ce={type:"table",header:Z(ve[1].replace(/^ *| *\| *$/g,"")),align:ve[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ve[3]?ve[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:ve[0]};if(Ce.header.length===Ce.align.length){var xe=Ce.align.length,Ue;for(Ue=0;Ue<xe;Ue++)/^ *-+: *$/.test(Ce.align[Ue])?Ce.align[Ue]="right":/^ *:-+: *$/.test(Ce.align[Ue])?Ce.align[Ue]="center":/^ *:-+ *$/.test(Ce.align[Ue])?Ce.align[Ue]="left":Ce.align[Ue]=null;for(xe=Ce.cells.length,Ue=0;Ue<xe;Ue++)Ce.cells[Ue]=Z(Ce.cells[Ue],Ce.header.length);return Ce}}},Le.hr=function(pe){var ve=this.rules.block.hr.exec(pe);if(ve)return{type:"hr",raw:ve[0]}},Le.blockquote=function(pe){var ve=this.rules.block.blockquote.exec(pe);if(ve){var Ce=ve[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ve[0],text:Ce}}},Le.list=function(pe){var ve=this.rules.block.list.exec(pe);if(ve){for(var Ce=ve[0],xe=ve[2],Ue=xe.length>1,Xe=xe[xe.length-1]===")",rt={type:"list",raw:Ce,ordered:Ue,start:Ue?+xe.slice(0,-1):"",loose:!1,items:[]},bt=ve[0].match(this.rules.block.item),Et=!1,_t,vt,et,Ye,ut,st,gt,yt=bt.length,ft=0;ft<yt;ft++)_t=bt[ft],Ce=_t,vt=_t.length,_t=_t.replace(/^ *([*+-]|\d+[.)]) */,""),~_t.indexOf(`
|
|
|
`)&&(vt-=_t.length,_t=this.options.pedantic?_t.replace(/^ {1,4}/gm,""):_t.replace(new RegExp("^ {1,"+vt+"}","gm"),"")),ft!==yt-1&&(et=this.rules.block.bullet.exec(bt[ft+1])[0],(Ue?et.length===1||!Xe&&et[et.length-1]===")":et.length>1||this.options.smartLists&&et!==xe)&&(Ye=bt.slice(ft+1).join(`
|
|
|
`),rt.raw=rt.raw.substring(0,rt.raw.length-Ye.length),ft=yt-1)),ut=Et||/\n\n(?!\s*$)/.test(_t),ft!==yt-1&&(Et=_t.charAt(_t.length-1)===`
|
|
|
`,ut||(ut=Et)),ut&&(rt.loose=!0),st=/^\[[ xX]\] /.test(_t),gt=void 0,st&&(gt=_t[1]!==" ",_t=_t.replace(/^\[[ xX]\] +/,"")),rt.items.push({type:"list_item",raw:Ce,task:st,checked:gt,loose:ut,text:_t});return rt}},Le.html=function(pe){var ve=this.rules.block.html.exec(pe);if(ve)return{type:this.options.sanitize?"paragraph":"html",raw:ve[0],pre:!this.options.sanitizer&&(ve[1]==="pre"||ve[1]==="script"||ve[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ve[0]):$(ve[0]):ve[0]}},Le.def=function(pe){var ve=this.rules.block.def.exec(pe);if(ve){ve[3]&&(ve[3]=ve[3].substring(1,ve[3].length-1));var Ce=ve[1].toLowerCase().replace(/\s+/g," ");return{tag:Ce,raw:ve[0],href:ve[2],title:ve[3]}}},Le.table=function(pe){var ve=this.rules.block.table.exec(pe);if(ve){var Ce={type:"table",header:Z(ve[1].replace(/^ *| *\| *$/g,"")),align:ve[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ve[3]?ve[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(Ce.header.length===Ce.align.length){Ce.raw=ve[0];var xe=Ce.align.length,Ue;for(Ue=0;Ue<xe;Ue++)/^ *-+: *$/.test(Ce.align[Ue])?Ce.align[Ue]="right":/^ *:-+: *$/.test(Ce.align[Ue])?Ce.align[Ue]="center":/^ *:-+ *$/.test(Ce.align[Ue])?Ce.align[Ue]="left":Ce.align[Ue]=null;for(xe=Ce.cells.length,Ue=0;Ue<xe;Ue++)Ce.cells[Ue]=Z(Ce.cells[Ue].replace(/^ *\| *| *\| *$/g,""),Ce.header.length);return Ce}}},Le.lheading=function(pe){var ve=this.rules.block.lheading.exec(pe);if(ve)return{type:"heading",raw:ve[0],depth:ve[2].charAt(0)==="="?1:2,text:ve[1]}},Le.paragraph=function(pe){var ve=this.rules.block.paragraph.exec(pe);if(ve)return{type:"paragraph",raw:ve[0],text:ve[1].charAt(ve[1].length-1)===`
|
|
|
`?ve[1].slice(0,-1):ve[1]}},Le.text=function(pe,ve){var Ce=this.rules.block.text.exec(pe);if(Ce){var xe=ve[ve.length-1];return xe&&xe.type==="text"?{raw:Ce[0],text:Ce[0]}:{type:"text",raw:Ce[0],text:Ce[0]}}},Le.escape=function(pe){var ve=this.rules.inline.escape.exec(pe);if(ve)return{type:"escape",raw:ve[0],text:$(ve[1])}},Le.tag=function(pe,ve,Ce){var xe=this.rules.inline.tag.exec(pe);if(xe)return!ve&&/^<a /i.test(xe[0])?ve=!0:ve&&/^<\/a>/i.test(xe[0])&&(ve=!1),!Ce&&/^<(pre|code|kbd|script)(\s|>)/i.test(xe[0])?Ce=!0:Ce&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(xe[0])&&(Ce=!1),{type:this.options.sanitize?"text":"html",raw:xe[0],inLink:ve,inRawBlock:Ce,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(xe[0]):$(xe[0]):xe[0]}},Le.link=function(pe){var ve=this.rules.inline.link.exec(pe);if(ve){var Ce=V(ve[2],"()");if(Ce>-1){var xe=ve[0].indexOf("!")===0?5:4,Ue=xe+ve[1].length+Ce;ve[2]=ve[2].substring(0,Ce),ve[0]=ve[0].substring(0,Ue).trim(),ve[3]=""}var Xe=ve[2],rt="";if(this.options.pedantic){var bt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Xe);bt?(Xe=bt[1],rt=bt[3]):rt=""}else rt=ve[3]?ve[3].slice(1,-1):"";Xe=Xe.trim().replace(/^<([\s\S]*)>$/,"$1");var Et=X(ve,{href:Xe&&Xe.replace(this.rules.inline._escapes,"$1"),title:rt&&rt.replace(this.rules.inline._escapes,"$1")},ve[0]);return Et}},Le.reflink=function(pe,ve){var Ce;if((Ce=this.rules.inline.reflink.exec(pe))||(Ce=this.rules.inline.nolink.exec(pe))){var xe=(Ce[2]||Ce[1]).replace(/\s+/g," ");if(xe=ve[xe.toLowerCase()],!xe||!xe.href){var Ue=Ce[0].charAt(0);return{type:"text",raw:Ue,text:Ue}}var Xe=X(Ce,xe,Ce[0]);return Xe}},Le.strong=function(pe,ve,Ce){Ce===void 0&&(Ce="");var xe=this.rules.inline.strong.start.exec(pe);if(xe&&(!xe[1]||xe[1]&&(Ce===""||this.rules.inline.punctuation.exec(Ce)))){ve=ve.slice(-1*pe.length);var Ue=xe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ue.lastIndex=0;for(var Xe;(xe=Ue.exec(ve))!=null;)if(Xe=this.rules.inline.strong.middle.exec(ve.slice(0,xe.index+3)),Xe)return{type:"strong",raw:pe.slice(0,Xe[0].length),text:pe.slice(2,Xe[0].length-2)}}},Le.em=function(pe,ve,Ce){Ce===void 0&&(Ce="");var xe=this.rules.inline.em.start.exec(pe);if(xe&&(!xe[1]||xe[1]&&(Ce===""||this.rules.inline.punctuation.exec(Ce)))){ve=ve.slice(-1*pe.length);var Ue=xe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ue.lastIndex=0;for(var Xe;(xe=Ue.exec(ve))!=null;)if(Xe=this.rules.inline.em.middle.exec(ve.slice(0,xe.index+2)),Xe)return{type:"em",raw:pe.slice(0,Xe[0].length),text:pe.slice(1,Xe[0].length-1)}}},Le.codespan=function(pe){var ve=this.rules.inline.code.exec(pe);if(ve){var Ce=ve[2].replace(/\n/g," "),xe=/[^ ]/.test(Ce),Ue=Ce.startsWith(" ")&&Ce.endsWith(" ");return xe&&Ue&&(Ce=Ce.substring(1,Ce.length-1)),Ce=$(Ce,!0),{type:"codespan",raw:ve[0],text:Ce}}},Le.br=function(pe){var ve=this.rules.inline.br.exec(pe);if(ve)return{type:"br",raw:ve[0]}},Le.del=function(pe){var ve=this.rules.inline.del.exec(pe);if(ve)return{type:"del",raw:ve[0],text:ve[1]}},Le.autolink=function(pe,ve){var Ce=this.rules.inline.autolink.exec(pe);if(Ce){var xe,Ue;return Ce[2]==="@"?(xe=$(this.options.mangle?ve(Ce[1]):Ce[1]),Ue="mailto:"+xe):(xe=$(Ce[1]),Ue=xe),{type:"link",raw:Ce[0],text:xe,href:Ue,tokens:[{type:"text",raw:xe,text:xe}]}}},Le.url=function(pe,ve){var Ce;if(Ce=this.rules.inline.url.exec(pe)){var xe,Ue;if(Ce[2]==="@")xe=$(this.options.mangle?ve(Ce[0]):Ce[0]),Ue="mailto:"+xe;else{var Xe;do Xe=Ce[0],Ce[0]=this.rules.inline._backpedal.exec(Ce[0])[0];while(Xe!==Ce[0]);xe=$(Ce[0]),Ce[1]==="www."?Ue="http://"+xe:Ue=xe}return{type:"link",raw:Ce[0],text:xe,href:Ue,tokens:[{type:"text",raw:xe,text:xe}]}}},Le.inlineText=function(pe,ve,Ce){var xe=this.rules.inline.text.exec(pe);if(xe){var Ue;return ve?Ue=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(xe[0]):$(xe[0]):xe[0]:Ue=$(this.options.smartypants?Ce(xe[0]):xe[0]),{type:"text",raw:xe[0],text:Ue}}},ke}(),we=se.noopTest,ge=se.edit,Ae=se.merge,me={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:we,table:we,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};me._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,me._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,me.def=ge(me.def).replace("label",me._label).replace("title",me._title).getRegex(),me.bullet=/(?:[*+-]|\d{1,9}[.)])/,me.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,me.item=ge(me.item,"gm").replace(/bull/g,me.bullet).getRegex(),me.list=ge(me.list).replace(/bull/g,me.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+me.def.source+")").getRegex(),me._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",me._comment=/<!--(?!-?>)[\s\S]*?-->/,me.html=ge(me.html,"i").replace("comment",me._comment).replace("tag",me._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me.paragraph=ge(me._paragraph).replace("hr",me.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",me._tag).getRegex(),me.blockquote=ge(me.blockquote).replace("paragraph",me.paragraph).getRegex(),me.normal=Ae({},me),me.gfm=Ae({},me.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),me.gfm.nptable=ge(me.gfm.nptable).replace("hr",me.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",me._tag).getRegex(),me.gfm.table=ge(me.gfm.table).replace("hr",me.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",me._tag).getRegex(),me.pedantic=Ae({},me.normal,{html:ge(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",me._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:we,paragraph:ge(me.normal._paragraph).replace("hr",me.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",me.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ye={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:we,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:we,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ye._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ye.punctuation=ge(ye.punctuation).replace(/punctuation/g,ye._punctuation).getRegex(),ye._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ye._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ye.em.start=ge(ye.em.start).replace(/punctuation/g,ye._punctuation).getRegex(),ye.em.middle=ge(ye.em.middle).replace(/punctuation/g,ye._punctuation).replace(/overlapSkip/g,ye._overlapSkip).getRegex(),ye.em.endAst=ge(ye.em.endAst,"g").replace(/punctuation/g,ye._punctuation).getRegex(),ye.em.endUnd=ge(ye.em.endUnd,"g").replace(/punctuation/g,ye._punctuation).getRegex(),ye.strong.start=ge(ye.strong.start).replace(/punctuation/g,ye._punctuation).getRegex(),ye.strong.middle=ge(ye.strong.middle).replace(/punctuation/g,ye._punctuation).replace(/blockSkip/g,ye._blockSkip).getRegex(),ye.strong.endAst=ge(ye.strong.endAst,"g").replace(/punctuation/g,ye._punctuation).getRegex(),ye.strong.endUnd=ge(ye.strong.endUnd,"g").replace(/punctuation/g,ye._punctuation).getRegex(),ye.blockSkip=ge(ye._blockSkip,"g").getRegex(),ye.overlapSkip=ge(ye._overlapSkip,"g").getRegex(),ye._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ye._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ye._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,ye.autolink=ge(ye.autolink).replace("scheme",ye._scheme).replace("email",ye._email).getRegex(),ye._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ye.tag=ge(ye.tag).replace("comment",me._comment).replace("attribute",ye._attribute).getRegex(),ye._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ye._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ye._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ye.link=ge(ye.link).replace("label",ye._label).replace("href",ye._href).replace("title",ye._title).getRegex(),ye.reflink=ge(ye.reflink).replace("label",ye._label).getRegex(),ye.reflinkSearch=ge(ye.reflinkSearch,"g").replace("reflink",ye.reflink).replace("nolink",ye.nolink).getRegex(),ye.normal=Ae({},ye),ye.pedantic=Ae({},ye.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:ge(/^!?\[(label)\]\((.*?)\)/).replace("label",ye._label).getRegex(),reflink:ge(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ye._label).getRegex()}),ye.gfm=Ae({},ye.normal,{escape:ge(ye.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),ye.gfm.url=ge(ye.gfm.url,"i").replace("email",ye.gfm._extended_email).getRegex(),ye.breaks=Ae({},ye.gfm,{br:ge(ye.br).replace("{2,}","*").getRegex(),text:ge(ye.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var ue={block:me,inline:ye},ae=m.defaults,ee=ue.block,Ee=ue.inline;function F(ke){return ke.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function j(ke){var Le="",Oe,pe,ve=ke.length;for(Oe=0;Oe<ve;Oe++)pe=ke.charCodeAt(Oe),Math.random()>.5&&(pe="x"+pe.toString(16)),Le+="&#"+pe+";";return Le}var de=function(){function ke(Oe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Oe||ae,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var pe={block:ee.normal,inline:Ee.normal};this.options.pedantic?(pe.block=ee.pedantic,pe.inline=Ee.pedantic):this.options.gfm&&(pe.block=ee.gfm,this.options.breaks?pe.inline=Ee.breaks:pe.inline=Ee.gfm),this.tokenizer.rules=pe}ke.lex=function(pe,ve){var Ce=new ke(ve);return Ce.lex(pe)};var Le=ke.prototype;return Le.lex=function(pe){return pe=pe.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(pe,this.tokens,!0),this.inline(this.tokens),this.tokens},Le.blockTokens=function(pe,ve,Ce){ve===void 0&&(ve=[]),Ce===void 0&&(Ce=!0),pe=pe.replace(/^ +$/gm,"");for(var xe,Ue,Xe,rt;pe;){if(xe=this.tokenizer.space(pe)){pe=pe.substring(xe.raw.length),xe.type&&ve.push(xe);continue}if(xe=this.tokenizer.code(pe,ve)){pe=pe.substring(xe.raw.length),xe.type?ve.push(xe):(rt=ve[ve.length-1],rt.raw+=`
|
|
|
`+xe.raw,rt.text+=`
|
|
|
`+xe.text);continue}if(xe=this.tokenizer.fences(pe)){pe=pe.substring(xe.raw.length),ve.push(xe);continue}if(xe=this.tokenizer.heading(pe)){pe=pe.substring(xe.raw.length),ve.push(xe);continue}if(xe=this.tokenizer.nptable(pe)){pe=pe.substring(xe.raw.length),ve.push(xe);continue}if(xe=this.tokenizer.hr(pe)){pe=pe.substring(xe.raw.length),ve.push(xe);continue}if(xe=this.tokenizer.blockquote(pe)){pe=pe.substring(xe.raw.length),xe.tokens=this.blockTokens(xe.text,[],Ce),ve.push(xe);continue}if(xe=this.tokenizer.list(pe)){for(pe=pe.substring(xe.raw.length),Xe=xe.items.length,Ue=0;Ue<Xe;Ue++)xe.items[Ue].tokens=this.blockTokens(xe.items[Ue].text,[],!1);ve.push(xe);continue}if(xe=this.tokenizer.html(pe)){pe=pe.substring(xe.raw.length),ve.push(xe);continue}if(Ce&&(xe=this.tokenizer.def(pe))){pe=pe.substring(xe.raw.length),this.tokens.links[xe.tag]||(this.tokens.links[xe.tag]={href:xe.href,title:xe.title});continue}if(xe=this.tokenizer.table(pe)){pe=pe.substring(xe.raw.length),ve.push(xe);continue}if(xe=this.tokenizer.lheading(pe)){pe=pe.substring(xe.raw.length),ve.push(xe);continue}if(Ce&&(xe=this.tokenizer.paragraph(pe))){pe=pe.substring(xe.raw.length),ve.push(xe);continue}if(xe=this.tokenizer.text(pe,ve)){pe=pe.substring(xe.raw.length),xe.type?ve.push(xe):(rt=ve[ve.length-1],rt.raw+=`
|
|
|
`+xe.raw,rt.text+=`
|
|
|
`+xe.text);continue}if(pe){var bt="Infinite loop on byte: "+pe.charCodeAt(0);if(this.options.silent){console.error(bt);break}else throw new Error(bt)}}return ve},Le.inline=function(pe){var ve,Ce,xe,Ue,Xe,rt,bt=pe.length;for(ve=0;ve<bt;ve++){rt=pe[ve];switch(rt.type){case"paragraph":case"text":case"heading":{rt.tokens=[],this.inlineTokens(rt.text,rt.tokens);break}case"table":{for(rt.tokens={header:[],cells:[]},Ue=rt.header.length,Ce=0;Ce<Ue;Ce++)rt.tokens.header[Ce]=[],this.inlineTokens(rt.header[Ce],rt.tokens.header[Ce]);for(Ue=rt.cells.length,Ce=0;Ce<Ue;Ce++)for(Xe=rt.cells[Ce],rt.tokens.cells[Ce]=[],xe=0;xe<Xe.length;xe++)rt.tokens.cells[Ce][xe]=[],this.inlineTokens(Xe[xe],rt.tokens.cells[Ce][xe]);break}case"blockquote":{this.inline(rt.tokens);break}case"list":{for(Ue=rt.items.length,Ce=0;Ce<Ue;Ce++)this.inline(rt.items[Ce].tokens);break}}}return pe},Le.inlineTokens=function(pe,ve,Ce,xe,Ue){ve===void 0&&(ve=[]),Ce===void 0&&(Ce=!1),xe===void 0&&(xe=!1),Ue===void 0&&(Ue="");var Xe,rt=pe,bt;if(this.tokens.links){var Et=Object.keys(this.tokens.links);if(Et.length>0)for(;(bt=this.tokenizer.rules.inline.reflinkSearch.exec(rt))!=null;)Et.includes(bt[0].slice(bt[0].lastIndexOf("[")+1,-1))&&(rt=rt.slice(0,bt.index)+"["+"a".repeat(bt[0].length-2)+"]"+rt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(bt=this.tokenizer.rules.inline.blockSkip.exec(rt))!=null;)rt=rt.slice(0,bt.index)+"["+"a".repeat(bt[0].length-2)+"]"+rt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;pe;){if(Xe=this.tokenizer.escape(pe)){pe=pe.substring(Xe.raw.length),ve.push(Xe);continue}if(Xe=this.tokenizer.tag(pe,Ce,xe)){pe=pe.substring(Xe.raw.length),Ce=Xe.inLink,xe=Xe.inRawBlock,ve.push(Xe);continue}if(Xe=this.tokenizer.link(pe)){pe=pe.substring(Xe.raw.length),Xe.type==="link"&&(Xe.tokens=this.inlineTokens(Xe.text,[],!0,xe)),ve.push(Xe);continue}if(Xe=this.tokenizer.reflink(pe,this.tokens.links)){pe=pe.substring(Xe.raw.length),Xe.type==="link"&&(Xe.tokens=this.inlineTokens(Xe.text,[],!0,xe)),ve.push(Xe);continue}if(Xe=this.tokenizer.strong(pe,rt,Ue)){pe=pe.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],Ce,xe),ve.push(Xe);continue}if(Xe=this.tokenizer.em(pe,rt,Ue)){pe=pe.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],Ce,xe),ve.push(Xe);continue}if(Xe=this.tokenizer.codespan(pe)){pe=pe.substring(Xe.raw.length),ve.push(Xe);continue}if(Xe=this.tokenizer.br(pe)){pe=pe.substring(Xe.raw.length),ve.push(Xe);continue}if(Xe=this.tokenizer.del(pe)){pe=pe.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],Ce,xe),ve.push(Xe);continue}if(Xe=this.tokenizer.autolink(pe,j)){pe=pe.substring(Xe.raw.length),ve.push(Xe);continue}if(!Ce&&(Xe=this.tokenizer.url(pe,j))){pe=pe.substring(Xe.raw.length),ve.push(Xe);continue}if(Xe=this.tokenizer.inlineText(pe,xe,F)){pe=pe.substring(Xe.raw.length),Ue=Xe.raw.slice(-1),ve.push(Xe);continue}if(pe){var _t="Infinite loop on byte: "+pe.charCodeAt(0);if(this.options.silent){console.error(_t);break}else throw new Error(_t)}}return ve},Pe(ke,null,[{key:"rules",get:function(){return{block:ee,inline:Ee}}}]),ke}(),be=m.defaults,Te=se.cleanUrl,I=se.escape,t=function(){function ke(Oe){this.options=Oe||be}var Le=ke.prototype;return Le.code=function(pe,ve,Ce){var xe=(ve||"").match(/\S*/)[0];if(this.options.highlight){var Ue=this.options.highlight(pe,xe);Ue!=null&&Ue!==pe&&(Ce=!0,pe=Ue)}return xe?'<pre><code class="'+this.options.langPrefix+I(xe,!0)+'">'+(Ce?pe:I(pe,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(Ce?pe:I(pe,!0))+`</code></pre>
|
|
|
`},Le.blockquote=function(pe){return`<blockquote>
|
|
|
`+pe+`</blockquote>
|
|
|
`},Le.html=function(pe){return pe},Le.heading=function(pe,ve,Ce,xe){return this.options.headerIds?"<h"+ve+' id="'+this.options.headerPrefix+xe.slug(Ce)+'">'+pe+"</h"+ve+`>
|
|
|
`:"<h"+ve+">"+pe+"</h"+ve+`>
|
|
|
`},Le.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},Le.list=function(pe,ve,Ce){var xe=ve?"ol":"ul",Ue=ve&&Ce!==1?' start="'+Ce+'"':"";return"<"+xe+Ue+`>
|
|
|
`+pe+"</"+xe+`>
|
|
|
`},Le.listitem=function(pe){return"<li>"+pe+`</li>
|
|
|
`},Le.checkbox=function(pe){return"<input "+(pe?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Le.paragraph=function(pe){return"<p>"+pe+`</p>
|
|
|
`},Le.table=function(pe,ve){return ve&&(ve="<tbody>"+ve+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+pe+`</thead>
|
|
|
`+ve+`</table>
|
|
|
`},Le.tablerow=function(pe){return`<tr>
|
|
|
`+pe+`</tr>
|
|
|
`},Le.tablecell=function(pe,ve){var Ce=ve.header?"th":"td",xe=ve.align?"<"+Ce+' align="'+ve.align+'">':"<"+Ce+">";return xe+pe+"</"+Ce+`>
|
|
|
`},Le.strong=function(pe){return"<strong>"+pe+"</strong>"},Le.em=function(pe){return"<em>"+pe+"</em>"},Le.codespan=function(pe){return"<code>"+pe+"</code>"},Le.br=function(){return this.options.xhtml?"<br/>":"<br>"},Le.del=function(pe){return"<del>"+pe+"</del>"},Le.link=function(pe,ve,Ce){if(pe=Te(this.options.sanitize,this.options.baseUrl,pe),pe===null)return Ce;var xe='<a href="'+I(pe)+'"';return ve&&(xe+=' title="'+ve+'"'),xe+=">"+Ce+"</a>",xe},Le.image=function(pe,ve,Ce){if(pe=Te(this.options.sanitize,this.options.baseUrl,pe),pe===null)return Ce;var xe='<img src="'+pe+'" alt="'+Ce+'"';return ve&&(xe+=' title="'+ve+'"'),xe+=this.options.xhtml?"/>":">",xe},Le.text=function(pe){return pe},ke}(),h=function(){function ke(){}var Le=ke.prototype;return Le.strong=function(pe){return pe},Le.em=function(pe){return pe},Le.codespan=function(pe){return pe},Le.del=function(pe){return pe},Le.html=function(pe){return pe},Le.text=function(pe){return pe},Le.link=function(pe,ve,Ce){return""+Ce},Le.image=function(pe,ve,Ce){return""+Ce},Le.br=function(){return""},ke}(),L=function(){function ke(){this.seen={}}var Le=ke.prototype;return Le.slug=function(pe){var ve=pe.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ve)){var Ce=ve;do this.seen[Ce]++,ve=Ce+"-"+this.seen[Ce];while(this.seen.hasOwnProperty(ve))}return this.seen[ve]=0,ve},ke}(),A=m.defaults,k=se.unescape,le=function(){function ke(Oe){this.options=Oe||A,this.options.renderer=this.options.renderer||new t,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new h,this.slugger=new L}ke.parse=function(pe,ve){var Ce=new ke(ve);return Ce.parse(pe)};var Le=ke.prototype;return Le.parse=function(pe,ve){ve===void 0&&(ve=!0);var Ce="",xe,Ue,Xe,rt,bt,Et,_t,vt,et,Ye,ut,st,gt,yt,ft,xt,At,at,pt=pe.length;for(xe=0;xe<pt;xe++){Ye=pe[xe];switch(Ye.type){case"space":continue;case"hr":{Ce+=this.renderer.hr();continue}case"heading":{Ce+=this.renderer.heading(this.parseInline(Ye.tokens),Ye.depth,k(this.parseInline(Ye.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ce+=this.renderer.code(Ye.text,Ye.lang,Ye.escaped);continue}case"table":{for(vt="",_t="",rt=Ye.header.length,Ue=0;Ue<rt;Ue++)_t+=this.renderer.tablecell(this.parseInline(Ye.tokens.header[Ue]),{header:!0,align:Ye.align[Ue]});for(vt+=this.renderer.tablerow(_t),et="",rt=Ye.cells.length,Ue=0;Ue<rt;Ue++){for(Et=Ye.tokens.cells[Ue],_t="",bt=Et.length,Xe=0;Xe<bt;Xe++)_t+=this.renderer.tablecell(this.parseInline(Et[Xe]),{header:!1,align:Ye.align[Xe]});et+=this.renderer.tablerow(_t)}Ce+=this.renderer.table(vt,et);continue}case"blockquote":{et=this.parse(Ye.tokens),Ce+=this.renderer.blockquote(et);continue}case"list":{for(ut=Ye.ordered,st=Ye.start,gt=Ye.loose,rt=Ye.items.length,et="",Ue=0;Ue<rt;Ue++)ft=Ye.items[Ue],xt=ft.checked,At=ft.task,yt="",ft.task&&(at=this.renderer.checkbox(xt),gt?ft.tokens.length>0&&ft.tokens[0].type==="text"?(ft.tokens[0].text=at+" "+ft.tokens[0].text,ft.tokens[0].tokens&&ft.tokens[0].tokens.length>0&&ft.tokens[0].tokens[0].type==="text"&&(ft.tokens[0].tokens[0].text=at+" "+ft.tokens[0].tokens[0].text)):ft.tokens.unshift({type:"text",text:at}):yt+=at),yt+=this.parse(ft.tokens,gt),et+=this.renderer.listitem(yt,At,xt);Ce+=this.renderer.list(et,ut,st);continue}case"html":{Ce+=this.renderer.html(Ye.text);continue}case"paragraph":{Ce+=this.renderer.paragraph(this.parseInline(Ye.tokens));continue}case"text":{for(et=Ye.tokens?this.parseInline(Ye.tokens):Ye.text;xe+1<pt&&pe[xe+1].type==="text";)Ye=pe[++xe],et+=`
|
|
|
`+(Ye.tokens?this.parseInline(Ye.tokens):Ye.text);Ce+=ve?this.renderer.paragraph(et):et;continue}default:{var ct='Token with "'+Ye.type+'" type was not found.';if(this.options.silent){console.error(ct);return}else throw new Error(ct)}}}return Ce},Le.parseInline=function(pe,ve){ve=ve||this.renderer;var Ce="",xe,Ue,Xe=pe.length;for(xe=0;xe<Xe;xe++){Ue=pe[xe];switch(Ue.type){case"escape":{Ce+=ve.text(Ue.text);break}case"html":{Ce+=ve.html(Ue.text);break}case"link":{Ce+=ve.link(Ue.href,Ue.title,this.parseInline(Ue.tokens,ve));break}case"image":{Ce+=ve.image(Ue.href,Ue.title,Ue.text);break}case"strong":{Ce+=ve.strong(this.parseInline(Ue.tokens,ve));break}case"em":{Ce+=ve.em(this.parseInline(Ue.tokens,ve));break}case"codespan":{Ce+=ve.codespan(Ue.text);break}case"br":{Ce+=ve.br();break}case"del":{Ce+=ve.del(this.parseInline(Ue.tokens,ve));break}case"text":{Ce+=ve.text(Ue.text);break}default:{var rt='Token with "'+Ue.type+'" type was not found.';if(this.options.silent){console.error(rt);return}else throw new Error(rt)}}}return Ce},ke}(),_e=se.merge,Ge=se.checkSanitizeDeprecation,ze=se.escape,Fe=m.getDefaults,Ke=m.changeDefaults,ot=m.defaults;function Be(ke,Le,Oe){if(typeof ke=="undefined"||ke===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ke!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ke)+", string expected");if(typeof Le=="function"&&(Oe=Le,Le=null),Le=_e({},Be.defaults,Le||{}),Ge(Le),Oe){var pe=Le.highlight,ve;try{ve=de.lex(ke,Le)}catch(Xe){return Oe(Xe)}var Ce=function(rt){var bt;if(!rt)try{bt=le.parse(ve,Le)}catch(Et){rt=Et}return Le.highlight=pe,rt?Oe(rt):Oe(null,bt)};if(!pe||pe.length<3)return Ce();if(delete Le.highlight,!ve.length)return Ce();var xe=0;Be.walkTokens(ve,function(Xe){Xe.type==="code"&&(xe++,setTimeout(function(){pe(Xe.text,Xe.lang,function(rt,bt){if(rt)return Ce(rt);bt!=null&&bt!==Xe.text&&(Xe.text=bt,Xe.escaped=!0),xe--,xe===0&&Ce()})},0))}),xe===0&&Ce();return}try{var Ue=de.lex(ke,Le);return Le.walkTokens&&Be.walkTokens(Ue,Le.walkTokens),le.parse(Ue,Le)}catch(Xe){if(Xe.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Le.silent)return"<p>An error occurred:</p><pre>"+ze(Xe.message+"",!0)+"</pre>";throw Xe}}Be.options=Be.setOptions=function(ke){return _e(Be.defaults,ke),Ke(Be.defaults),Be},Be.getDefaults=Fe,Be.defaults=ot,Be.use=function(ke){var Le=_e({},ke);if(ke.renderer&&function(){var pe=Be.defaults.renderer||new t,ve=function(Ue){var Xe=pe[Ue];pe[Ue]=function(){for(var rt=arguments.length,bt=new Array(rt),Et=0;Et<rt;Et++)bt[Et]=arguments[Et];var _t=ke.renderer[Ue].apply(pe,bt);return _t===!1&&(_t=Xe.apply(pe,bt)),_t}};for(var Ce in ke.renderer)ve(Ce);Le.renderer=pe}(),ke.tokenizer&&function(){var pe=Be.defaults.tokenizer||new oe,ve=function(Ue){var Xe=pe[Ue];pe[Ue]=function(){for(var rt=arguments.length,bt=new Array(rt),Et=0;Et<rt;Et++)bt[Et]=arguments[Et];var _t=ke.tokenizer[Ue].apply(pe,bt);return _t===!1&&(_t=Xe.apply(pe,bt)),_t}};for(var Ce in ke.tokenizer)ve(Ce);Le.tokenizer=pe}(),ke.walkTokens){var Oe=Be.defaults.walkTokens;Le.walkTokens=function(pe){ke.walkTokens(pe),Oe&&Oe(pe)}}Be.setOptions(Le)},Be.walkTokens=function(ke,Le){for(var Oe=R(ke),pe;!(pe=Oe()).done;){var ve=pe.value;Le(ve);switch(ve.type){case"table":{for(var Ce=R(ve.tokens.header),xe;!(xe=Ce()).done;){var Ue=xe.value;Be.walkTokens(Ue,Le)}for(var Xe=R(ve.tokens.cells),rt;!(rt=Xe()).done;)for(var bt=rt.value,Et=R(bt),_t;!(_t=Et()).done;){var vt=_t.value;Be.walkTokens(vt,Le)}break}case"list":{Be.walkTokens(ve.items,Le);break}default:ve.tokens&&Be.walkTokens(ve.tokens,Le)}}},Be.Parser=le,Be.parser=le.parse,Be.Renderer=t,Be.TextRenderer=h,Be.Lexer=de,Be.lexer=de.lex,Be.Tokenizer=oe,Be.Slugger=L,Be.parse=Be;var je=Be;return je})},E2g8:function(lt,Me,ne){(function(Ne,Pe){/*!
|
|
|
* @overview es6-promise - a tiny implementation of Promises/A+.
|
|
|
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
|
|
* @license Licensed under MIT license
|
|
|
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
|
|
* @version v4.2.8+1e68dce6
|
|
|
*/(function(De,l){lt.exports=l()})(this,function(){"use strict";function De(t){var h=typeof t;return t!==null&&(h==="object"||h==="function")}function l(t){return typeof t=="function"}var R=void 0;Array.isArray?R=Array.isArray:R=function(t){return Object.prototype.toString.call(t)==="[object Array]"};var g=R,m=0,y=void 0,c=void 0,o=function(h,L){T[m]=h,T[m+1]=L,m+=2,m===2&&(c?c(C):W())};function u(t){c=t}function r(t){o=t}var e=typeof window!="undefined"?window:void 0,n=e||{},a=n.MutationObserver||n.WebKitMutationObserver,p=typeof self=="undefined"&&typeof Ne!="undefined"&&{}.toString.call(Ne)==="[object process]",d=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function i(){return function(){return Ne.nextTick(C)}}function v(){return typeof y!="undefined"?function(){y(C)}:w()}function b(){var t=0,h=new a(C),L=document.createTextNode("");return h.observe(L,{characterData:!0}),function(){L.data=t=++t%2}}function _(){var t=new MessageChannel;return t.port1.onmessage=C,function(){return t.port2.postMessage(0)}}function w(){var t=setTimeout;return function(){return t(C,1)}}var T=new Array(1e3);function C(){for(var t=0;t<m;t+=2){var h=T[t],L=T[t+1];h(L),T[t]=void 0,T[t+1]=void 0}m=0}function S(){try{var t=Function("return this")().require("vertx");return y=t.runOnLoop||t.runOnContext,v()}catch(h){return w()}}var W=void 0;p?W=i():a?W=b():d?W=_():e===void 0&&!0?W=S():W=w();function N(t,h){var L=this,A=new this.constructor(z);A[K]===void 0&&ue(A);var k=L._state;if(k){var le=arguments[k-1];o(function(){return ge(k,A,le,L._result)})}else oe(L,A,t,h);return A}function E(t){var h=this;if(t&&typeof t=="object"&&t.constructor===h)return t;var L=new h(z);return $(L,t),L}var K=Math.random().toString(36).substring(2);function z(){}var M=void 0,G=1,J=2;function te(){return new TypeError("You cannot resolve a promise with itself")}function re(){return new TypeError("A promises callback cannot return that same promise.")}function se(t,h,L,A){try{t.call(h,L,A)}catch(k){return k}}function H(t,h,L){o(function(A){var k=!1,le=se(L,h,function(_e){if(k)return;k=!0,h!==_e?$(A,_e):X(A,_e)},function(_e){if(k)return;k=!0,Q(A,_e)},"Settle: "+(A._label||" unknown promise"));!k&&le&&(k=!0,Q(A,le))},t)}function he(t,h){h._state===G?X(t,h._result):h._state===J?Q(t,h._result):oe(h,void 0,function(L){return $(t,L)},function(L){return Q(t,L)})}function Z(t,h,L){h.constructor===t.constructor&&L===N&&h.constructor.resolve===E?he(t,h):L===void 0?X(t,h):l(L)?H(t,h,L):X(t,h)}function $(t,h){if(t===h)Q(t,te());else if(De(h)){var L=void 0;try{L=h.then}catch(A){Q(t,A);return}Z(t,h,L)}else X(t,h)}function V(t){t._onerror&&t._onerror(t._result),we(t)}function X(t,h){if(t._state!==M)return;t._result=h,t._state=G,t._subscribers.length!==0&&o(we,t)}function Q(t,h){if(t._state!==M)return;t._state=J,t._result=h,o(V,t)}function oe(t,h,L,A){var k=t._subscribers,le=k.length;t._onerror=null,k[le]=h,k[le+G]=L,k[le+J]=A,le===0&&t._state&&o(we,t)}function we(t){var h=t._subscribers,L=t._state;if(h.length===0)return;for(var A=void 0,k=void 0,le=t._result,_e=0;_e<h.length;_e+=3)A=h[_e],k=h[_e+L],A?ge(L,A,k,le):k(le);t._subscribers.length=0}function ge(t,h,L,A){var k=l(L),le=void 0,_e=void 0,Ge=!0;if(k){try{le=L(A)}catch(ze){Ge=!1,_e=ze}if(h===le){Q(h,re());return}}else le=A;h._state!==M||(k&&Ge?$(h,le):Ge===!1?Q(h,_e):t===G?X(h,le):t===J&&Q(h,le))}function Ae(t,h){try{h(function(A){$(t,A)},function(A){Q(t,A)})}catch(L){Q(t,L)}}var me=0;function ye(){return me++}function ue(t){t[K]=me++,t._state=void 0,t._result=void 0,t._subscribers=[]}function ae(){return new Error("Array Methods must be provided an Array")}var ee=function(){function t(h,L){this._instanceConstructor=h,this.promise=new h(z),this.promise[K]||ue(this.promise),g(L)?(this.length=L.length,this._remaining=L.length,this._result=new Array(this.length),this.length===0?X(this.promise,this._result):(this.length=this.length||0,this._enumerate(L),this._remaining===0&&X(this.promise,this._result))):Q(this.promise,ae())}return t.prototype._enumerate=function(L){for(var A=0;this._state===M&&A<L.length;A++)this._eachEntry(L[A],A)},t.prototype._eachEntry=function(L,A){var k=this._instanceConstructor,le=k.resolve;if(le===E){var _e=void 0,Ge=void 0,ze=!1;try{_e=L.then}catch(Ke){ze=!0,Ge=Ke}if(_e===N&&L._state!==M)this._settledAt(L._state,A,L._result);else if(typeof _e!="function")this._remaining--,this._result[A]=L;else if(k===Te){var Fe=new k(z);ze?Q(Fe,Ge):Z(Fe,L,_e),this._willSettleAt(Fe,A)}else this._willSettleAt(new k(function(Ke){return Ke(L)}),A)}else this._willSettleAt(le(L),A)},t.prototype._settledAt=function(L,A,k){var le=this.promise;le._state===M&&(this._remaining--,L===J?Q(le,k):this._result[A]=k),this._remaining===0&&X(le,this._result)},t.prototype._willSettleAt=function(L,A){var k=this;oe(L,void 0,function(le){return k._settledAt(G,A,le)},function(le){return k._settledAt(J,A,le)})},t}();function Ee(t){return new ee(this,t).promise}function F(t){var h=this;return g(t)?new h(function(L,A){for(var k=t.length,le=0;le<k;le++)h.resolve(t[le]).then(L,A)}):new h(function(L,A){return A(new TypeError("You must pass an array to race."))})}function j(t){var h=this,L=new h(z);return Q(L,t),L}function de(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function be(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Te=function(){function t(h){this[K]=ye(),this._result=this._state=void 0,this._subscribers=[],z!==h&&(typeof h!="function"&&de(),this instanceof t?Ae(this,h):be())}return t.prototype.catch=function(L){return this.then(null,L)},t.prototype.finally=function(L){var A=this,k=A.constructor;return l(L)?A.then(function(le){return k.resolve(L()).then(function(){return le})},function(le){return k.resolve(L()).then(function(){throw le})}):A.then(L,L)},t}();Te.prototype.then=N,Te.all=Ee,Te.race=F,Te.resolve=E,Te.reject=j,Te._setScheduler=u,Te._setAsap=r,Te._asap=o;function I(){var t=void 0;if(typeof Pe!="undefined")t=Pe;else if(typeof self!="undefined")t=self;else try{t=Function("return this")()}catch(A){throw new Error("polyfill failed because global object is unavailable in this environment")}var h=t.Promise;if(h){var L=null;try{L=Object.prototype.toString.call(h.resolve())}catch(A){}if(L==="[object Promise]"&&!h.cast)return}t.Promise=Te}return Te.polyfill=I,Te.Promise=Te,Te})}).call(this,ne("Q2Ig"),ne("IyRk"))},GUcZ:function(lt,Me,ne){"use strict";var Ne=ne("fWQN"),Pe=ne("mtLc"),De=function(){function fe(){Object(Ne.a)(this,fe)}return Object(Pe.a)(fe,null,[{key:"install",value:function(){Object.setPrototypeOf=Object.setPrototypeOf||function(x,P){return x.__proto__=P,x},Object.assign=Object.assign||function(x){if(x==null)throw new TypeError("Cannot convert undefined or null to object");for(var P=Object(x),B=1;B<arguments.length;B++){var q=arguments[B];if(q!=null)for(var ce in q)q.hasOwnProperty(ce)&&(P[ce]=q[ce])}return P},typeof self.Promise!="function"&&ne("E2g8").polyfill()}}]),fe}();De.install();var l=De,R=ne("+qE3"),g=ne.n(R),m=function(){function fe(){Object(Ne.a)(this,fe)}return Object(Pe.a)(fe,null,[{key:"e",value:function(x,P){(!x||fe.FORCE_GLOBAL_TAG)&&(x=fe.GLOBAL_TAG);var B="[".concat(x,"] > ").concat(P);if(fe.ENABLE_CALLBACK&&fe.emitter.emit("log","error",B),!fe.ENABLE_ERROR)return;console.error?console.error(B):console.warn?console.warn(B):console.log(B)}},{key:"i",value:function(x,P){(!x||fe.FORCE_GLOBAL_TAG)&&(x=fe.GLOBAL_TAG);var B="[".concat(x,"] > ").concat(P);if(fe.ENABLE_CALLBACK&&fe.emitter.emit("log","info",B),!fe.ENABLE_INFO)return;console.info?console.info(B):console.log(B)}},{key:"w",value:function(x,P){(!x||fe.FORCE_GLOBAL_TAG)&&(x=fe.GLOBAL_TAG);var B="[".concat(x,"] > ").concat(P);if(fe.ENABLE_CALLBACK&&fe.emitter.emit("log","warn",B),!fe.ENABLE_WARN)return;console.warn?console.warn(B):console.log(B)}},{key:"d",value:function(x,P){(!x||fe.FORCE_GLOBAL_TAG)&&(x=fe.GLOBAL_TAG);var B="[".concat(x,"] > ").concat(P);if(fe.ENABLE_CALLBACK&&fe.emitter.emit("log","debug",B),!fe.ENABLE_DEBUG)return;console.debug?console.debug(B):console.log(B)}},{key:"v",value:function(x,P){(!x||fe.FORCE_GLOBAL_TAG)&&(x=fe.GLOBAL_TAG);var B="[".concat(x,"] > ").concat(P);if(fe.ENABLE_CALLBACK&&fe.emitter.emit("log","verbose",B),!fe.ENABLE_VERBOSE)return;console.log(B)}}]),fe}();m.GLOBAL_TAG="flv.js",m.FORCE_GLOBAL_TAG=!1,m.ENABLE_ERROR=!0,m.ENABLE_INFO=!0,m.ENABLE_WARN=!0,m.ENABLE_DEBUG=!0,m.ENABLE_VERBOSE=!0,m.ENABLE_CALLBACK=!1,m.emitter=new g.a;var y=m,c=function(){function fe(){Object(Ne.a)(this,fe),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return Object(Pe.a)(fe,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(x){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=x,this._totalBytes+=x):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=x,this._totalBytes+=x):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=x,this._totalBytes+=x,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var x=(this._now()-this._lastCheckpoint)/1e3;return x==0&&(x=1),this._intervalBytes/x/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var x=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/x/1024}}]),fe}(),o=c,u=ne("yKVA"),r=ne("879j"),e=function(){function fe(ie){Object(Ne.a)(this,fe),this._message=ie}return Object(Pe.a)(fe,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),fe}(),n=function(fe){Object(u.a)(x,fe);var ie=Object(r.a)(x);function x(P){return Object(Ne.a)(this,x),ie.call(this,P)}return Object(Pe.a)(x,[{key:"name",get:function(){return"IllegalStateException"}}]),x}(e),a=function(fe){Object(u.a)(x,fe);var ie=Object(r.a)(x);function x(P){return Object(Ne.a)(this,x),ie.call(this,P)}return Object(Pe.a)(x,[{key:"name",get:function(){return"InvalidArgumentException"}}]),x}(e),p=function(fe){Object(u.a)(x,fe);var ie=Object(r.a)(x);function x(P){return Object(Ne.a)(this,x),ie.call(this,P)}return Object(Pe.a)(x,[{key:"name",get:function(){return"NotImplementedException"}}]),x}(e),d={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},i={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},v=function(){function fe(ie){Object(Ne.a)(this,fe),this._type=ie||"undefined",this._status=d.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return Object(Pe.a)(fe,[{key:"destroy",value:function(){this._status=d.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===d.kConnecting||this._status===d.kBuffering}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(x){this._onContentLengthKnown=x}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(x){this._onURLRedirect=x}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(x){this._onDataArrival=x}},{key:"onError",get:function(){return this._onError},set:function(x){this._onError=x}},{key:"onComplete",get:function(){return this._onComplete},set:function(x){this._onComplete=x}},{key:"open",value:function(x,P){throw new p("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new p("Unimplemented abstract function!")}}]),fe}(),b=ne("oZsa");function _(fe,ie){for(;!Object.prototype.hasOwnProperty.call(fe,ie)&&!(fe=Object(b.a)(fe),fe===null););return fe}function w(fe,ie,x){return typeof Reflect!="undefined"&&Reflect.get?w=Reflect.get:w=function(B,q,ce){var Re=_(B,q);if(!Re)return;var Ie=Object.getOwnPropertyDescriptor(Re,q);return Ie.get?Ie.get.call(ce):Ie.value},w(fe,ie,x||fe)}var T={};function C(){var fe=self.navigator.userAgent.toLowerCase(),ie=/(edge)\/([\w.]+)/.exec(fe)||/(opr)[\/]([\w.]+)/.exec(fe)||/(chrome)[ \/]([\w.]+)/.exec(fe)||/(iemobile)[\/]([\w.]+)/.exec(fe)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(fe)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(fe)||/(webkit)[ \/]([\w.]+)/.exec(fe)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(fe)||/(msie) ([\w.]+)/.exec(fe)||fe.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(fe)||fe.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(fe)||[],x=/(ipad)/.exec(fe)||/(ipod)/.exec(fe)||/(windows phone)/.exec(fe)||/(iphone)/.exec(fe)||/(kindle)/.exec(fe)||/(android)/.exec(fe)||/(windows)/.exec(fe)||/(mac)/.exec(fe)||/(linux)/.exec(fe)||/(cros)/.exec(fe)||[],P={browser:ie[5]||ie[3]||ie[1]||"",version:ie[2]||ie[4]||"0",majorVersion:ie[4]||ie[2]||"0",platform:x[0]||""},B={};if(P.browser){B[P.browser]=!0;var q=P.majorVersion.split(".");B.version={major:parseInt(P.majorVersion,10),string:P.version},q.length>1&&(B.version.minor=parseInt(q[1],10)),q.length>2&&(B.version.build=parseInt(q[2],10))}if(P.platform&&(B[P.platform]=!0),(B.chrome||B.opr||B.safari)&&(B.webkit=!0),B.rv||B.iemobile){B.rv&&delete B.rv;var ce="msie";P.browser=ce,B[ce]=!0}if(B.edge){delete B.edge;var Re="msedge";P.browser=Re,B[Re]=!0}if(B.opr){var Ie="opera";P.browser=Ie,B[Ie]=!0}if(B.safari&&B.android){var qe="android";P.browser=qe,B[qe]=!0}B.name=P.browser,B.platform=P.platform;for(var Je in T)T.hasOwnProperty(Je)&&delete T[Je];Object.assign(T,B)}C();var S=T,W=function(fe){Object(u.a)(x,fe);var ie=Object(r.a)(x);function x(P,B){var q;return Object(Ne.a)(this,x),q=ie.call(this,"fetch-stream-loader"),q.TAG="FetchStreamLoader",q._seekHandler=P,q._config=B,q._needStash=!0,q._requestAbort=!1,q._contentLength=null,q._receivedLength=0,q}return Object(Pe.a)(x,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),w(Object(b.a)(x.prototype),"destroy",this).call(this)}},{key:"open",value:function(B,q){var ce=this;this._dataSource=B,this._range=q;var Re=B.url;this._config.reuseRedirectedURL&&B.redirectedURL!=null&&(Re=B.redirectedURL);var Ie=this._seekHandler.getConfig(Re,q),qe=new self.Headers;if(typeof Ie.headers=="object"){var Je=Ie.headers;for(var He in Je)Je.hasOwnProperty(He)&&qe.append(He,Je[He])}var nt={method:"GET",headers:qe,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var Qe in this._config.headers)qe.append(Qe,this._config.headers[Qe]);B.cors===!1&&(nt.mode="same-origin"),B.withCredentials&&(nt.credentials="include"),B.referrerPolicy&&(nt.referrerPolicy=B.referrerPolicy),this._status=d.kConnecting,self.fetch(Ie.url,nt).then(function(We){if(ce._requestAbort){ce._requestAbort=!1,ce._status=d.kIdle;return}if(We.ok&&We.status>=200&&We.status<=299){if(We.url!==Ie.url&&ce._onURLRedirect){var it=ce._seekHandler.removeURLParameters(We.url);ce._onURLRedirect(it)}var $e=We.headers.get("Content-Length");return $e!=null&&(ce._contentLength=parseInt($e),ce._contentLength!==0&&(ce._onContentLengthKnown&&ce._onContentLengthKnown(ce._contentLength))),ce._pump.call(ce,We.body.getReader())}else if(ce._status=d.kError,ce._onError)ce._onError(i.HTTP_STATUS_CODE_INVALID,{code:We.status,msg:We.statusText});else throw new e("FetchStreamLoader: Http code invalid, "+We.status+" "+We.statusText)}).catch(function(We){if(ce._status=d.kError,ce._onError)ce._onError(i.EXCEPTION,{code:-1,msg:We.message});else throw We})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(B){var q=this;return B.read().then(function(ce){if(ce.done)if(q._contentLength!==null&&q._receivedLength<q._contentLength){q._status=d.kError;var Re=i.EARLY_EOF,Ie={code:-1,msg:"Fetch stream meet Early-EOF"};if(q._onError)q._onError(Re,Ie);else throw new e(Ie.msg)}else q._status=d.kComplete,q._onComplete&&q._onComplete(q._range.from,q._range.from+q._receivedLength-1);else{if(q._requestAbort===!0)return q._requestAbort=!1,q._status=d.kComplete,B.cancel();q._status=d.kBuffering;var qe=ce.value.buffer,Je=q._range.from+q._receivedLength;q._receivedLength+=qe.byteLength,q._onDataArrival&&q._onDataArrival(qe,Je,q._receivedLength),q._pump(B)}}).catch(function(ce){if(ce.code===11&&S.msedge)return;q._status=d.kError;var Re=0,Ie=null;if((ce.code===19||ce.message==="network error")&&(q._contentLength===null||q._contentLength!==null&&q._receivedLength<q._contentLength)?(Re=i.EARLY_EOF,Ie={code:ce.code,msg:"Fetch stream meet Early-EOF"}):(Re=i.EXCEPTION,Ie={code:ce.code,msg:ce.message}),q._onError)q._onError(Re,Ie);else throw new e(Ie.msg)})}}],[{key:"isSupported",value:function(){try{var B=S.msedge&&S.version.minor>=15048,q=S.msedge?B:!0;return self.fetch&&self.ReadableStream&&q}catch(ce){return!1}}}]),x}(v),N=W,E=function(fe){Object(u.a)(x,fe);var ie=Object(r.a)(x);function x(P,B){var q;return Object(Ne.a)(this,x),q=ie.call(this,"xhr-moz-chunked-loader"),q.TAG="MozChunkedLoader",q._seekHandler=P,q._config=B,q._needStash=!0,q._xhr=null,q._requestAbort=!1,q._contentLength=null,q._receivedLength=0,q}return Object(Pe.a)(x,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),w(Object(b.a)(x.prototype),"destroy",this).call(this)}},{key:"open",value:function(B,q){this._dataSource=B,this._range=q;var ce=B.url;this._config.reuseRedirectedURL&&B.redirectedURL!=null&&(ce=B.redirectedURL);var Re=this._seekHandler.getConfig(ce,q);this._requestURL=Re.url;var Ie=this._xhr=new XMLHttpRequest;if(Ie.open("GET",Re.url,!0),Ie.responseType="moz-chunked-arraybuffer",Ie.onreadystatechange=this._onReadyStateChange.bind(this),Ie.onprogress=this._onProgress.bind(this),Ie.onloadend=this._onLoadEnd.bind(this),Ie.onerror=this._onXhrError.bind(this),B.withCredentials&&(Ie.withCredentials=!0),typeof Re.headers=="object"){var qe=Re.headers;for(var Je in qe)qe.hasOwnProperty(Je)&&Ie.setRequestHeader(Je,qe[Je])}if(typeof this._config.headers=="object"){var He=this._config.headers;for(var nt in He)He.hasOwnProperty(nt)&&Ie.setRequestHeader(nt,He[nt])}this._status=d.kConnecting,Ie.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=d.kComplete}},{key:"_onReadyStateChange",value:function(B){var q=B.target;if(q.readyState===2){if(q.responseURL!=null&&q.responseURL!==this._requestURL&&this._onURLRedirect){var ce=this._seekHandler.removeURLParameters(q.responseURL);this._onURLRedirect(ce)}if(q.status!==0&&(q.status<200||q.status>299))if(this._status=d.kError,this._onError)this._onError(i.HTTP_STATUS_CODE_INVALID,{code:q.status,msg:q.statusText});else throw new e("MozChunkedLoader: Http code invalid, "+q.status+" "+q.statusText);else this._status=d.kBuffering}}},{key:"_onProgress",value:function(B){if(this._status===d.kError)return;this._contentLength===null&&(B.total!==null&&B.total!==0&&(this._contentLength=B.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)));var q=B.target.response,ce=this._range.from+this._receivedLength;this._receivedLength+=q.byteLength,this._onDataArrival&&this._onDataArrival(q,ce,this._receivedLength)}},{key:"_onLoadEnd",value:function(B){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===d.kError)return;this._status=d.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}},{key:"_onXhrError",value:function(B){this._status=d.kError;var q=0,ce=null;if(this._contentLength&&B.loaded<this._contentLength?(q=i.EARLY_EOF,ce={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(q=i.EXCEPTION,ce={code:-1,msg:B.constructor.name+" "+B.type}),this._onError)this._onError(q,ce);else throw new e(ce.msg)}}],[{key:"isSupported",value:function(){try{var B=new XMLHttpRequest;return B.open("GET","https://example.com",!0),B.responseType="moz-chunked-arraybuffer",B.responseType==="moz-chunked-arraybuffer"}catch(q){return y.w("MozChunkedLoader",q.message),!1}}}]),x}(v),K=E,z=function(fe){Object(u.a)(x,fe);var ie=Object(r.a)(x);function x(P,B){var q;return Object(Ne.a)(this,x),q=ie.call(this,"xhr-msstream-loader"),q.TAG="MSStreamLoader",q._seekHandler=P,q._config=B,q._needStash=!0,q._xhr=null,q._reader=null,q._totalRange=null,q._currentRange=null,q._currentRequestURL=null,q._currentRedirectedURL=null,q._contentLength=null,q._receivedLength=0,q._bufferLimit=16*1024*1024,q._lastTimeBufferSize=0,q._isReconnecting=!1,q}return Object(Pe.a)(x,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),w(Object(b.a)(x.prototype),"destroy",this).call(this)}},{key:"open",value:function(B,q){this._internalOpen(B,q,!1)}},{key:"_internalOpen",value:function(B,q,ce){this._dataSource=B,ce?this._currentRange=q:this._totalRange=q;var Re=B.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Re=this._currentRedirectedURL:B.redirectedURL!=null&&(Re=B.redirectedURL));var Ie=this._seekHandler.getConfig(Re,q);this._currentRequestURL=Ie.url;var qe=this._reader=new self.MSStreamReader;qe.onprogress=this._msrOnProgress.bind(this),qe.onload=this._msrOnLoad.bind(this),qe.onerror=this._msrOnError.bind(this);var Je=this._xhr=new XMLHttpRequest;if(Je.open("GET",Ie.url,!0),Je.responseType="ms-stream",Je.onreadystatechange=this._xhrOnReadyStateChange.bind(this),Je.onerror=this._xhrOnError.bind(this),B.withCredentials&&(Je.withCredentials=!0),typeof Ie.headers=="object"){var He=Ie.headers;for(var nt in He)He.hasOwnProperty(nt)&&Je.setRequestHeader(nt,He[nt])}if(typeof this._config.headers=="object"){var Qe=this._config.headers;for(var We in Qe)Qe.hasOwnProperty(We)&&Je.setRequestHeader(We,Qe[We])}this._isReconnecting?this._isReconnecting=!1:this._status=d.kConnecting,Je.send()}},{key:"abort",value:function(){this._internalAbort(),this._status=d.kComplete}},{key:"_internalAbort",value:function(){this._reader&&(this._reader.readyState===1&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}},{key:"_xhrOnReadyStateChange",value:function(B){var q=B.target;if(q.readyState===2)if(q.status>=200&&q.status<=299){if(this._status=d.kBuffering,q.responseURL!=null){var ce=this._seekHandler.removeURLParameters(q.responseURL);q.responseURL!==this._currentRequestURL&&ce!==this._currentRedirectedURL&&(this._currentRedirectedURL=ce,this._onURLRedirect&&this._onURLRedirect(ce))}var Re=q.getResponseHeader("Content-Length");if(Re!=null&&this._contentLength==null){var Ie=parseInt(Re);Ie>0&&(this._contentLength=Ie,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=d.kError,this._onError)this._onError(i.HTTP_STATUS_CODE_INVALID,{code:q.status,msg:q.statusText});else throw new e("MSStreamLoader: Http code invalid, "+q.status+" "+q.statusText);else if(q.readyState===3&&(q.status>=200&&q.status<=299)){this._status=d.kBuffering;var qe=q.response;this._reader.readAsArrayBuffer(qe)}}},{key:"_xhrOnError",value:function(B){this._status=d.kError;var q=i.EXCEPTION,ce={code:-1,msg:B.constructor.name+" "+B.type};if(this._onError)this._onError(q,ce);else throw new e(ce.msg)}},{key:"_msrOnProgress",value:function(B){var q=B.target,ce=q.result;if(ce==null){this._doReconnectIfNeeded();return}var Re=ce.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=ce.byteLength;var Ie=this._totalRange.from+this._receivedLength;this._receivedLength+=Re.byteLength,this._onDataArrival&&this._onDataArrival(Re,Ie,this._receivedLength),ce.byteLength>=this._bufferLimit&&(y.v(this.TAG,"MSStream buffer exceeded max size near ".concat(Ie+Re.byteLength,", reconnecting...")),this._doReconnectIfNeeded())}},{key:"_doReconnectIfNeeded",value:function(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();var B={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,B,!0)}}},{key:"_msrOnLoad",value:function(B){this._status=d.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}},{key:"_msrOnError",value:function(B){this._status=d.kError;var q=0,ce=null;if(this._contentLength&&this._receivedLength<this._contentLength?(q=i.EARLY_EOF,ce={code:-1,msg:"MSStream meet Early-Eof"}):(q=i.EARLY_EOF,ce={code:-1,msg:B.constructor.name+" "+B.type}),this._onError)this._onError(q,ce);else throw new e(ce.msg)}}],[{key:"isSupported",value:function(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;var B=new XMLHttpRequest;return B.open("GET","https://example.com",!0),B.responseType="ms-stream",B.responseType==="ms-stream"}catch(q){return y.w("MSStreamLoader",q.message),!1}}}]),x}(v),M=z,G=function(fe){Object(u.a)(x,fe);var ie=Object(r.a)(x);function x(P,B){var q;return Object(Ne.a)(this,x),q=ie.call(this,"xhr-range-loader"),q.TAG="RangeLoader",q._seekHandler=P,q._config=B,q._needStash=!1,q._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],q._currentChunkSizeKB=384,q._currentSpeedNormalized=0,q._zeroSpeedChunkCount=0,q._xhr=null,q._speedSampler=new o,q._requestAbort=!1,q._waitForTotalLength=!1,q._totalLengthReceived=!1,q._currentRequestURL=null,q._currentRedirectedURL=null,q._currentRequestRange=null,q._totalLength=null,q._contentLength=null,q._receivedLength=0,q._lastTimeLoaded=0,q}return Object(Pe.a)(x,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),w(Object(b.a)(x.prototype),"destroy",this).call(this)}},{key:"currentSpeed",get:function(){return this._speedSampler.lastSecondKBps}},{key:"open",value:function(B,q){this._dataSource=B,this._range=q,this._status=d.kConnecting;var ce=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(ce=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!ce?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}},{key:"_openSubRange",value:function(){var B=this._currentChunkSizeKB*1024,q=this._range.from+this._receivedLength,ce=q+B;this._contentLength!=null&&(ce-this._range.from>=this._contentLength&&(ce=this._range.from+this._contentLength-1)),this._currentRequestRange={from:q,to:ce},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(B,q){this._lastTimeLoaded=0;var ce=B.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?ce=this._currentRedirectedURL:B.redirectedURL!=null&&(ce=B.redirectedURL));var Re=this._seekHandler.getConfig(ce,q);this._currentRequestURL=Re.url;var Ie=this._xhr=new XMLHttpRequest;if(Ie.open("GET",Re.url,!0),Ie.responseType="arraybuffer",Ie.onreadystatechange=this._onReadyStateChange.bind(this),Ie.onprogress=this._onProgress.bind(this),Ie.onload=this._onLoad.bind(this),Ie.onerror=this._onXhrError.bind(this),B.withCredentials&&(Ie.withCredentials=!0),typeof Re.headers=="object"){var qe=Re.headers;for(var Je in qe)qe.hasOwnProperty(Je)&&Ie.setRequestHeader(Je,qe[Je])}if(typeof this._config.headers=="object"){var He=this._config.headers;for(var nt in He)He.hasOwnProperty(nt)&&Ie.setRequestHeader(nt,He[nt])}Ie.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=d.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(B){var q=B.target;if(q.readyState===2){if(q.responseURL!=null){var ce=this._seekHandler.removeURLParameters(q.responseURL);q.responseURL!==this._currentRequestURL&&ce!==this._currentRedirectedURL&&(this._currentRedirectedURL=ce,this._onURLRedirect&&this._onURLRedirect(ce))}if(q.status>=200&&q.status<=299){if(this._waitForTotalLength)return;this._status=d.kBuffering}else if(this._status=d.kError,this._onError)this._onError(i.HTTP_STATUS_CODE_INVALID,{code:q.status,msg:q.statusText});else throw new e("RangeLoader: Http code invalid, "+q.status+" "+q.statusText)}}},{key:"_onProgress",value:function(B){if(this._status===d.kError)return;if(this._contentLength===null){var q=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,q=!0;var ce=B.total;this._internalAbort(),ce!=null&ce!==0&&(this._totalLength=ce)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,q){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var Re=B.loaded-this._lastTimeLoaded;this._lastTimeLoaded=B.loaded,this._speedSampler.addBytes(Re)}},{key:"_normalizeSpeed",value:function(B){var q=this._chunkSizeKBList,ce=q.length-1,Re=0,Ie=0,qe=ce;if(B<q[0])return q[0];for(;Ie<=qe;){if(Re=Ie+Math.floor((qe-Ie)/2),Re===ce||B>=q[Re]&&B<q[Re+1])return q[Re];q[Re]<B?Ie=Re+1:qe=Re-1}}},{key:"_onLoad",value:function(B){if(this._status===d.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;var q=this._speedSampler.lastSecondKBps;if(q===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(q=this._speedSampler.currentKBps)),q!==0){var ce=this._normalizeSpeed(q);this._currentSpeedNormalized!==ce&&(this._currentSpeedNormalized=ce,this._currentChunkSizeKB=ce)}var Re=B.target.response,Ie=this._range.from+this._receivedLength;this._receivedLength+=Re.byteLength;var qe=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():qe=!0,this._onDataArrival&&this._onDataArrival(Re,Ie,this._receivedLength),qe&&(this._status=d.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},{key:"_onXhrError",value:function(B){this._status=d.kError;var q=0,ce=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(q=i.EARLY_EOF,ce={code:-1,msg:"RangeLoader meet Early-Eof"}):(q=i.EXCEPTION,ce={code:-1,msg:B.constructor.name+" "+B.type}),this._onError)this._onError(q,ce);else throw new e(ce.msg)}}],[{key:"isSupported",value:function(){try{var B=new XMLHttpRequest;return B.open("GET","https://example.com",!0),B.responseType="arraybuffer",B.responseType==="arraybuffer"}catch(q){return y.w("RangeLoader",q.message),!1}}}]),x}(v),J=G,te=function(fe){Object(u.a)(x,fe);var ie=Object(r.a)(x);function x(){var P;return Object(Ne.a)(this,x),P=ie.call(this,"websocket-loader"),P.TAG="WebSocketLoader",P._needStash=!0,P._ws=null,P._requestAbort=!1,P._receivedLength=0,P}return Object(Pe.a)(x,[{key:"destroy",value:function(){this._ws&&this.abort(),w(Object(b.a)(x.prototype),"destroy",this).call(this)}},{key:"open",value:function(B){try{var q=this._ws=new self.WebSocket(B.url);q.binaryType="arraybuffer",q.onopen=this._onWebSocketOpen.bind(this),q.onclose=this._onWebSocketClose.bind(this),q.onmessage=this._onWebSocketMessage.bind(this),q.onerror=this._onWebSocketError.bind(this),this._status=d.kConnecting}catch(Re){this._status=d.kError;var ce={code:Re.code,msg:Re.message};if(this._onError)this._onError(i.EXCEPTION,ce);else throw new e(ce.msg)}}},{key:"abort",value:function(){var B=this._ws;B&&(B.readyState===0||B.readyState===1)&&(this._requestAbort=!0,B.close()),this._ws=null,this._status=d.kComplete}},{key:"_onWebSocketOpen",value:function(B){this._status=d.kBuffering}},{key:"_onWebSocketClose",value:function(B){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=d.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}},{key:"_onWebSocketMessage",value:function(B){var q=this;if(B.data instanceof ArrayBuffer)this._dispatchArrayBuffer(B.data);else if(B.data instanceof Blob){var ce=new FileReader;ce.onload=function(){q._dispatchArrayBuffer(ce.result)},ce.readAsArrayBuffer(B.data)}else{this._status=d.kError;var Re={code:-1,msg:"Unsupported WebSocket message type: "+B.data.constructor.name};if(this._onError)this._onError(i.EXCEPTION,Re);else throw new e(Re.msg)}}},{key:"_dispatchArrayBuffer",value:function(B){var q=B,ce=this._receivedLength;this._receivedLength+=q.byteLength,this._onDataArrival&&this._onDataArrival(q,ce,this._receivedLength)}},{key:"_onWebSocketError",value:function(B){this._status=d.kError;var q={code:B.code,msg:B.message};if(this._onError)this._onError(i.EXCEPTION,q);else throw new e(q.msg)}}],[{key:"isSupported",value:function(){try{return typeof self.WebSocket!="undefined"}catch(B){return!1}}}]),x}(v),re=te,se=function(){function fe(ie){Object(Ne.a)(this,fe),this._zeroStart=ie||!1}return Object(Pe.a)(fe,[{key:"getConfig",value:function(x,P){var B={};if(P.from!==0||P.to!==-1){var q;P.to!==-1?q="bytes=".concat(P.from.toString(),"-").concat(P.to.toString()):q="bytes=".concat(P.from.toString(),"-"),B.Range=q}else this._zeroStart&&(B.Range="bytes=0-");return{url:x,headers:B}}},{key:"removeURLParameters",value:function(x){return x}}]),fe}(),H=se,he=function(){function fe(ie,x){Object(Ne.a)(this,fe),this._startName=ie,this._endName=x}return Object(Pe.a)(fe,[{key:"getConfig",value:function(x,P){var B=x;if(P.from!==0||P.to!==-1){var q=!0;B.indexOf("?")===-1&&(B+="?",q=!1),q&&(B+="&"),B+="".concat(this._startName,"=").concat(P.from.toString()),P.to!==-1&&(B+="&".concat(this._endName,"=").concat(P.to.toString()))}return{url:B,headers:{}}}},{key:"removeURLParameters",value:function(x){var P=x.split("?")[0],B=void 0,q=x.indexOf("?");q!==-1&&(B=x.substring(q+1));var ce="";if(B!=null&&B.length>0)for(var Re=B.split("&"),Ie=0;Ie<Re.length;Ie++){var qe=Re[Ie].split("="),Je=Ie>0;qe[0]!==this._startName&&qe[0]!==this._endName&&(Je&&(ce+="&"),ce+=Re[Ie])}return ce.length===0?P:P+"?"+ce}}]),fe}(),Z=he,$=function(){function fe(ie,x,P){Object(Ne.a)(this,fe),this.TAG="IOController",this._config=x,this._extraData=P,this._stashInitialSize=1024*384,x.stashInitialSize!=null&&x.stashInitialSize>0&&(this._stashInitialSize=x.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,x.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=ie,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(ie.url),this._refTotalLength=ie.filesize?ie.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new o,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return Object(Pe.a)(fe,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(x){this._extraData=x}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(x){this._onDataArrival=x}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(x){this._onSeeked=x}},{key:"onError",get:function(){return this._onError},set:function(x){this._onError=x}},{key:"onComplete",get:function(){return this._onComplete},set:function(x){this._onComplete=x}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(x){this._onRedirect=x}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(x){this._onRecoveredEarlyEof=x}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===J?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}},{key:"_selectSeekHandler",value:function(){var x=this._config;if(x.seekType==="range")this._seekHandler=new H(this._config.rangeLoadZeroStart);else if(x.seekType==="param"){var P=x.seekParamStart||"bstart",B=x.seekParamEnd||"bend";this._seekHandler=new Z(P,B)}else if(x.seekType==="custom"){if(typeof x.customSeekHandler!="function")throw new a("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new x.customSeekHandler}else throw new a("Invalid seekType in config: ".concat(x.seekType))}},{key:"_selectLoader",value:function(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=re;else if(N.isSupported())this._loaderClass=N;else if(K.isSupported())this._loaderClass=K;else if(J.isSupported())this._loaderClass=J;else throw new e("Your browser doesn't support xhr with arraybuffer responseType!")}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(x){this._currentRange={from:0,to:-1},x&&(this._currentRange.from=x),this._speedSampler.reset(),x||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var x=this._resumeFrom;this._resumeFrom=0,this._internalSeek(x,!0)}}},{key:"seek",value:function(x){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(x,!0)}},{key:"_internalSeek",value:function(x,P){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(P),this._loader.destroy(),this._loader=null;var B={from:x,to:-1};this._currentRange={from:B.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,B),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(x){if(!x||typeof x!="string"||x.length===0)throw new a("Url must be a non-empty string!");this._dataSource.url=x}},{key:"_expandBuffer",value:function(x){for(var P=this._stashSize;P+1024*1024*1<x;)P*=2;if(P+=1024*1024*1,P===this._bufferSize)return;var B=new ArrayBuffer(P);if(this._stashUsed>0){var q=new Uint8Array(this._stashBuffer,0,this._stashUsed),ce=new Uint8Array(B,0,P);ce.set(q,0)}this._stashBuffer=B,this._bufferSize=P}},{key:"_normalizeSpeed",value:function(x){var P=this._speedNormalizeList,B=P.length-1,q=0,ce=0,Re=B;if(x<P[0])return P[0];for(;ce<=Re;){if(q=ce+Math.floor((Re-ce)/2),q===B||x>=P[q]&&x<P[q+1])return P[q];P[q]<x?ce=q+1:Re=q-1}}},{key:"_adjustStashSize",value:function(x){var P=0;this._config.isLive||x<512?P=x:x>=512&&x<=1024?P=Math.floor(x*1.5):P=x*2,P>8192&&(P=8192);var B=P*1024+1024*1024*1;this._bufferSize<B&&this._expandBuffer(B),this._stashSize=P*1024}},{key:"_dispatchChunks",value:function(x,P){return this._currentRange.to=P+x.byteLength-1,this._onDataArrival(x,P)}},{key:"_onURLRedirect",value:function(x){this._redirectedURL=x,this._onRedirect&&this._onRedirect(x)}},{key:"_onContentLengthKnown",value:function(x){x&&this._fullRequestFlag&&(this._totalLength=x,this._fullRequestFlag=!1)}},{key:"_onLoaderChunkArrival",value:function(x,P,B){if(!this._onDataArrival)throw new n("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(x.byteLength);var q=this._speedSampler.lastSecondKBps;if(q!==0){var ce=this._normalizeSpeed(q);this._speedNormalized!==ce&&(this._speedNormalized=ce,this._adjustStashSize(ce))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=P),this._stashUsed+x.byteLength<=this._stashSize){var Qe=new Uint8Array(this._stashBuffer,0,this._stashSize);Qe.set(new Uint8Array(x),this._stashUsed),this._stashUsed+=x.byteLength}else{var We=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var it=this._stashBuffer.slice(0,this._stashUsed),$e=this._dispatchChunks(it,this._stashByteStart);if($e<it.byteLength){if($e>0){var O=new Uint8Array(it,$e);We.set(O,0),this._stashUsed=O.byteLength,this._stashByteStart+=$e}}else this._stashUsed=0,this._stashByteStart+=$e;this._stashUsed+x.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+x.byteLength),We=new Uint8Array(this._stashBuffer,0,this._bufferSize)),We.set(new Uint8Array(x),this._stashUsed),this._stashUsed+=x.byteLength}else{var s=this._dispatchChunks(x,P);if(s<x.byteLength){var f=x.byteLength-s;f>this._bufferSize&&(this._expandBuffer(f),We=new Uint8Array(this._stashBuffer,0,this._bufferSize)),We.set(new Uint8Array(x,s),0),this._stashUsed+=f,this._stashByteStart=P+s}}}else if(this._stashUsed===0){var Re=this._dispatchChunks(x,P);if(Re<x.byteLength){var Ie=x.byteLength-Re;Ie>this._bufferSize&&this._expandBuffer(Ie);var qe=new Uint8Array(this._stashBuffer,0,this._bufferSize);qe.set(new Uint8Array(x,Re),0),this._stashUsed+=Ie,this._stashByteStart=P+Re}}else{this._stashUsed+x.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+x.byteLength);var Je=new Uint8Array(this._stashBuffer,0,this._bufferSize);Je.set(new Uint8Array(x),this._stashUsed),this._stashUsed+=x.byteLength;var He=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(He<this._stashUsed&&He>0){var nt=new Uint8Array(this._stashBuffer,He);Je.set(nt,0)}this._stashUsed-=He,this._stashByteStart+=He}}},{key:"_flushStashBuffer",value:function(x){if(this._stashUsed>0){var P=this._stashBuffer.slice(0,this._stashUsed),B=this._dispatchChunks(P,this._stashByteStart),q=P.byteLength-B;if(B<P.byteLength)if(x)y.w(this.TAG,"".concat(q," bytes unconsumed data remain when flush buffer, dropped"));else{if(B>0){var ce=new Uint8Array(this._stashBuffer,0,this._bufferSize),Re=new Uint8Array(P,B);ce.set(Re,0),this._stashUsed=Re.byteLength,this._stashByteStart+=B}return 0}return this._stashUsed=0,this._stashByteStart=0,q}return 0}},{key:"_onLoaderComplete",value:function(x,P){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(x,P){y.e(this.TAG,"Loader error, code = ".concat(P.code,", msg = ").concat(P.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,x=i.UNRECOVERABLE_EARLY_EOF);switch(x){case i.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){var B=this._currentRange.to+1;B<this._totalLength&&(y.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(B,!1));return}x=i.UNRECOVERABLE_EARLY_EOF;break}case i.UNRECOVERABLE_EARLY_EOF:case i.CONNECTING_TIMEOUT:case i.HTTP_STATUS_CODE_INVALID:case i.EXCEPTION:break}if(this._onError)this._onError(x,P);else throw new e("IOException: "+P.msg)}}]),fe}(),V=$,X={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:3*60,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:3*60,autoCleanupMinBackwardDuration:2*60,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function Q(){return Object.assign({},X)}var oe=function(){function fe(){Object(Ne.a)(this,fe)}return Object(Pe.a)(fe,null,[{key:"supportMSEH264Playback",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"supportNetworkStreamIO",value:function(){var x=new V({},Q()),P=x.loaderType;return x.destroy(),P=="fetch-stream-loader"||P=="xhr-moz-chunked-loader"}},{key:"getNetworkLoaderTypeName",value:function(){var x=new V({},Q()),P=x.loaderType;return x.destroy(),P}},{key:"supportNativeMediaPlayback",value:function(x){fe.videoElement==null&&(fe.videoElement=window.document.createElement("video"));var P=fe.videoElement.canPlayType(x);return P==="probably"||P=="maybe"}},{key:"getFeatureList",value:function(){var x={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return x.mseFlvPlayback=fe.supportMSEH264Playback(),x.networkStreamIO=fe.supportNetworkStreamIO(),x.networkLoaderName=fe.getNetworkLoaderTypeName(),x.mseLiveFlvPlayback=x.mseFlvPlayback&&x.networkStreamIO,x.nativeMP4H264Playback=fe.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),x.nativeWebmVP8Playback=fe.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),x.nativeWebmVP9Playback=fe.supportNativeMediaPlayback('video/webm; codecs="vp9"'),x}}]),fe}(),we=oe,ge={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"},Ae=ge,me=function(){function fe(){Object(Ne.a)(this,fe)}return Object(Pe.a)(fe,null,[{key:"forceGlobalTag",get:function(){return y.FORCE_GLOBAL_TAG},set:function(x){y.FORCE_GLOBAL_TAG=x,fe._notifyChange()}},{key:"globalTag",get:function(){return y.GLOBAL_TAG},set:function(x){y.GLOBAL_TAG=x,fe._notifyChange()}},{key:"enableAll",get:function(){return y.ENABLE_VERBOSE&&y.ENABLE_DEBUG&&y.ENABLE_INFO&&y.ENABLE_WARN&&y.ENABLE_ERROR},set:function(x){y.ENABLE_VERBOSE=x,y.ENABLE_DEBUG=x,y.ENABLE_INFO=x,y.ENABLE_WARN=x,y.ENABLE_ERROR=x,fe._notifyChange()}},{key:"enableDebug",get:function(){return y.ENABLE_DEBUG},set:function(x){y.ENABLE_DEBUG=x,fe._notifyChange()}},{key:"enableVerbose",get:function(){return y.ENABLE_VERBOSE},set:function(x){y.ENABLE_VERBOSE=x,fe._notifyChange()}},{key:"enableInfo",get:function(){return y.ENABLE_INFO},set:function(x){y.ENABLE_INFO=x,fe._notifyChange()}},{key:"enableWarn",get:function(){return y.ENABLE_WARN},set:function(x){y.ENABLE_WARN=x,fe._notifyChange()}},{key:"enableError",get:function(){return y.ENABLE_ERROR},set:function(x){y.ENABLE_ERROR=x,fe._notifyChange()}},{key:"getConfig",value:function(){return{globalTag:y.GLOBAL_TAG,forceGlobalTag:y.FORCE_GLOBAL_TAG,enableVerbose:y.ENABLE_VERBOSE,enableDebug:y.ENABLE_DEBUG,enableInfo:y.ENABLE_INFO,enableWarn:y.ENABLE_WARN,enableError:y.ENABLE_ERROR,enableCallback:y.ENABLE_CALLBACK}}},{key:"applyConfig",value:function(x){y.GLOBAL_TAG=x.globalTag,y.FORCE_GLOBAL_TAG=x.forceGlobalTag,y.ENABLE_VERBOSE=x.enableVerbose,y.ENABLE_DEBUG=x.enableDebug,y.ENABLE_INFO=x.enableInfo,y.ENABLE_WARN=x.enableWarn,y.ENABLE_ERROR=x.enableError,y.ENABLE_CALLBACK=x.enableCallback}},{key:"_notifyChange",value:function(){var x=fe.emitter;if(x.listenerCount("change")>0){var P=fe.getConfig();x.emit("change",P)}}},{key:"registerListener",value:function(x){fe.emitter.addListener("change",x)}},{key:"removeListener",value:function(x){fe.emitter.removeListener("change",x)}},{key:"addLogListener",value:function(x){y.emitter.addListener("log",x),y.emitter.listenerCount("log")>0&&(y.ENABLE_CALLBACK=!0,fe._notifyChange())}},{key:"removeLogListener",value:function(x){y.emitter.removeListener("log",x),y.emitter.listenerCount("log")===0&&(y.ENABLE_CALLBACK=!1,fe._notifyChange())}}]),fe}();me.emitter=new g.a;var ye=me,ue=function(){function fe(){Object(Ne.a)(this,fe),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return Object(Pe.a)(fe,[{key:"isComplete",value:function(){var x=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,P=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&x&&P}},{key:"isSeekable",value:function(){return this.hasKeyframesIndex===!0}},{key:"getNearestKeyframe",value:function(x){if(this.keyframesIndex==null)return null;var P=this.keyframesIndex,B=this._search(P.times,x);return{index:B,milliseconds:P.times[B],fileposition:P.filepositions[B]}}},{key:"_search",value:function(x,P){var B=0,q=x.length-1,ce=0,Re=0,Ie=q;for(P<x[0]&&(B=0,Re=Ie+1);Re<=Ie;)if(ce=Re+Math.floor((Ie-Re)/2),ce===q||P>=x[ce]&&P<x[ce+1]){B=ce;break}else x[ce]<P?Re=ce+1:Ie=ce-1;return B}}]),fe}(),ae=ue;function ee(fe,ie,x){var P=fe;if(ie+x<P.length){for(;x--;)if((P[++ie]&192)!==128)return!1;return!0}else return!1}function Ee(fe){for(var ie=[],x=fe,P=0,B=fe.length;P<B;){if(x[P]<128){ie.push(String.fromCharCode(x[P])),++P;continue}else if(!(x[P]<192)){if(x[P]<224){if(ee(x,P,1)){var q=(x[P]&31)<<6|x[P+1]&63;if(q>=128){ie.push(String.fromCharCode(q&65535)),P+=2;continue}}}else if(x[P]<240){if(ee(x,P,2)){var ce=(x[P]&15)<<12|(x[P+1]&63)<<6|x[P+2]&63;if(ce>=2048&&(ce&63488)!==55296){ie.push(String.fromCharCode(ce&65535)),P+=3;continue}}}else if(x[P]<248&&ee(x,P,3)){var Re=(x[P]&7)<<18|(x[P+1]&63)<<12|(x[P+2]&63)<<6|x[P+3]&63;if(Re>65536&&Re<1114112){Re-=65536,ie.push(String.fromCharCode(Re>>>10|55296)),ie.push(String.fromCharCode(Re&1023|56320)),P+=4;continue}}}ie.push(String.fromCharCode(65533)),++P}return ie.join("")}var F=Ee,j=function(){var fe=new ArrayBuffer(2);return new DataView(fe).setInt16(0,256,!0),new Int16Array(fe)[0]===256}(),de=function(){function fe(){Object(Ne.a)(this,fe)}return Object(Pe.a)(fe,null,[{key:"parseScriptData",value:function(x,P,B){var q={};try{var ce=fe.parseValue(x,P,B),Re=fe.parseValue(x,P+ce.size,B-ce.size);q[ce.data]=Re.data}catch(Ie){y.e("AMF",Ie.toString())}return q}},{key:"parseObject",value:function(x,P,B){if(B<3)throw new n("Data not enough when parse ScriptDataObject");var q=fe.parseString(x,P,B),ce=fe.parseValue(x,P+q.size,B-q.size),Re=ce.objectEnd;return{data:{name:q.data,value:ce.data},size:q.size+ce.size,objectEnd:Re}}},{key:"parseVariable",value:function(x,P,B){return fe.parseObject(x,P,B)}},{key:"parseString",value:function(x,P,B){if(B<2)throw new n("Data not enough when parse String");var q=new DataView(x,P,B),ce=q.getUint16(0,!j),Re;return ce>0?Re=F(new Uint8Array(x,P+2,ce)):Re="",{data:Re,size:2+ce}}},{key:"parseLongString",value:function(x,P,B){if(B<4)throw new n("Data not enough when parse LongString");var q=new DataView(x,P,B),ce=q.getUint32(0,!j),Re;return ce>0?Re=F(new Uint8Array(x,P+4,ce)):Re="",{data:Re,size:4+ce}}},{key:"parseDate",value:function(x,P,B){if(B<10)throw new n("Data size invalid when parse Date");var q=new DataView(x,P,B),ce=q.getFloat64(0,!j),Re=q.getInt16(8,!j);return ce+=Re*60*1e3,{data:new Date(ce),size:8+2}}},{key:"parseValue",value:function(x,P,B){if(B<1)throw new n("Data not enough when parse Value");var q=new DataView(x,P,B),ce=1,Re=q.getUint8(0),Ie,qe=!1;try{switch(Re){case 0:Ie=q.getFloat64(1,!j),ce+=8;break;case 1:{var Je=q.getUint8(1);Ie=!!Je,ce+=1;break}case 2:{var He=fe.parseString(x,P+1,B-1);Ie=He.data,ce+=He.size;break}case 3:{Ie={};var nt=0;for((q.getUint32(B-4,!j)&16777215)===9&&(nt=3);ce<B-4;){var Qe=fe.parseObject(x,P+ce,B-ce-nt);if(Qe.objectEnd)break;Ie[Qe.data.name]=Qe.data.value,ce+=Qe.size}if(ce<=B-3){var We=q.getUint32(ce-1,!j)&16777215;We===9&&(ce+=3)}break}case 8:{Ie={},ce+=4;var it=0;for((q.getUint32(B-4,!j)&16777215)===9&&(it=3);ce<B-8;){var $e=fe.parseVariable(x,P+ce,B-ce-it);if($e.objectEnd)break;Ie[$e.data.name]=$e.data.value,ce+=$e.size}if(ce<=B-3){var O=q.getUint32(ce-1,!j)&16777215;O===9&&(ce+=3)}break}case 9:Ie=void 0,ce=1,qe=!0;break;case 10:{Ie=[];var s=q.getUint32(1,!j);ce+=4;for(var f=0;f<s;f++){var D=fe.parseValue(x,P+ce,B-ce);Ie.push(D.data),ce+=D.size}break}case 11:{var Y=fe.parseDate(x,P+1,B-1);Ie=Y.data,ce+=Y.size;break}case 12:{var U=fe.parseString(x,P+1,B-1);Ie=U.data,ce+=U.size;break}default:ce=B,y.w("AMF","Unsupported AMF value type "+Re)}}catch(Se){y.e("AMF",Se.toString())}return{data:Ie,size:ce,objectEnd:qe}}}]),fe}(),be=de,Te=function(){function fe(ie){Object(Ne.a)(this,fe),this.TAG="ExpGolomb",this._buffer=ie,this._buffer_index=0,this._total_bytes=ie.byteLength,this._total_bits=ie.byteLength*8,this._current_word=0,this._current_word_bits_left=0}return Object(Pe.a)(fe,[{key:"destroy",value:function(){this._buffer=null}},{key:"_fillCurrentWord",value:function(){var x=this._total_bytes-this._buffer_index;if(x<=0)throw new n("ExpGolomb: _fillCurrentWord() but no bytes available");var P=Math.min(4,x),B=new Uint8Array(4);B.set(this._buffer.subarray(this._buffer_index,this._buffer_index+P)),this._current_word=new DataView(B.buffer).getUint32(0,!1),this._buffer_index+=P,this._current_word_bits_left=P*8}},{key:"readBits",value:function(x){if(x>32)throw new a("ExpGolomb: readBits() bits exceeded max 32bits!");if(x<=this._current_word_bits_left){var P=this._current_word>>>32-x;return this._current_word<<=x,this._current_word_bits_left-=x,P}var B=this._current_word_bits_left?this._current_word:0;B=B>>>32-this._current_word_bits_left;var q=x-this._current_word_bits_left;this._fillCurrentWord();var ce=Math.min(q,this._current_word_bits_left),Re=this._current_word>>>32-ce;return this._current_word<<=ce,this._current_word_bits_left-=ce,B=B<<ce|Re,B}},{key:"readBool",value:function(){return this.readBits(1)===1}},{key:"readByte",value:function(){return this.readBits(8)}},{key:"_skipLeadingZero",value:function(){var x;for(x=0;x<this._current_word_bits_left;x++)if((this._current_word&2147483648>>>x)!==0)return this._current_word<<=x,this._current_word_bits_left-=x,x;return this._fillCurrentWord(),x+this._skipLeadingZero()}},{key:"readUEG",value:function(){var x=this._skipLeadingZero();return this.readBits(x+1)-1}},{key:"readSEG",value:function(){var x=this.readUEG();return x&1?x+1>>>1:-1*(x>>>1)}}]),fe}(),I=Te,t=function(){function fe(){Object(Ne.a)(this,fe)}return Object(Pe.a)(fe,null,[{key:"_ebsp2rbsp",value:function(x){for(var P=x,B=P.byteLength,q=new Uint8Array(B),ce=0,Re=0;Re<B;Re++){if(Re>=2&&(P[Re]===3&&P[Re-1]===0&&P[Re-2]===0))continue;q[ce]=P[Re],ce++}return new Uint8Array(q.buffer,0,ce)}},{key:"parseSPS",value:function(x){var P=fe._ebsp2rbsp(x),B=new I(P);B.readByte();var q=B.readByte();B.readByte();var ce=B.readByte();B.readUEG();var Re=fe.getProfileString(q),Ie=fe.getLevelString(ce),qe=1,Je=420,He=[0,420,422,444],nt=8;if((q===100||q===110||q===122||q===244||q===44||q===83||q===86||q===118||q===128||q===138||q===144)&&(qe=B.readUEG(),qe===3&&B.readBits(1),qe<=3&&(Je=He[qe]),nt=B.readUEG()+8,B.readUEG(),B.readBits(1),B.readBool()))for(var Qe=qe!==3?8:12,We=0;We<Qe;We++)B.readBool()&&(We<6?fe._skipScalingList(B,16):fe._skipScalingList(B,64));B.readUEG();var it=B.readUEG();if(it===0)B.readUEG();else if(it===1){B.readBits(1),B.readSEG(),B.readSEG();for(var $e=B.readUEG(),O=0;O<$e;O++)B.readSEG()}var s=B.readUEG();B.readBits(1);var f=B.readUEG(),D=B.readUEG(),Y=B.readBits(1);Y===0&&B.readBits(1),B.readBits(1);var U=0,Se=0,Ve=0,tt=0,ht=B.readBool();ht&&(U=B.readUEG(),Se=B.readUEG(),Ve=B.readUEG(),tt=B.readUEG());var Ze=1,mt=1,wt=0,kt=!0,Nt=0,Mt=0,Lt=B.readBool();if(Lt){if(B.readBool()){var Rt=B.readByte(),qt=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Vt=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Rt>0&&Rt<16?(Ze=qt[Rt-1],mt=Vt[Rt-1]):Rt===255&&(Ze=B.readByte()<<8|B.readByte(),mt=B.readByte()<<8|B.readByte())}if(B.readBool()&&B.readBool(),B.readBool()&&(B.readBits(4),B.readBool()&&B.readBits(24)),B.readBool()&&(B.readUEG(),B.readUEG()),B.readBool()){var It=B.readBits(32),Pt=B.readBits(32);kt=B.readBool(),Nt=Pt,Mt=It*2,wt=Nt/Mt}}var Ht=1;(Ze!==1||mt!==1)&&(Ht=Ze/mt);var Gt=0,Xt=0;if(qe===0)Gt=1,Xt=2-Y;else{var Ft=qe===3?1:2,Yt=qe===1?2:1;Gt=Ft,Xt=Yt*(2-Y)}var Kt=(f+1)*16,zt=(2-Y)*((D+1)*16);Kt-=(U+Se)*Gt,zt-=(Ve+tt)*Xt;var Bt=Math.ceil(Kt*Ht);return B.destroy(),B=null,{profile_string:Re,level_string:Ie,bit_depth:nt,ref_frames:s,chroma_format:Je,chroma_format_string:fe.getChromaFormatString(Je),frame_rate:{fixed:kt,fps:wt,fps_den:Mt,fps_num:Nt},sar_ratio:{width:Ze,height:mt},codec_size:{width:Kt,height:zt},present_size:{width:Bt,height:zt}}}},{key:"_skipScalingList",value:function(x,P){for(var B=8,q=8,ce=0,Re=0;Re<P;Re++)q!==0&&(ce=x.readSEG(),q=(B+ce+256)%256),B=q===0?B:q}},{key:"getProfileString",value:function(x){switch(x){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}},{key:"getLevelString",value:function(x){return(x/10).toFixed(1)}},{key:"getChromaFormatString",value:function(x){switch(x){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),fe}(),h=t,L={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"},A=L;function k(fe){return fe>>>8&255|(fe&255)<<8}function le(fe){return(fe&4278190080)>>>24|(fe&16711680)>>>8|(fe&65280)<<8|(fe&255)<<24}function _e(fe,ie){return fe[ie]<<24|fe[ie+1]<<16|fe[ie+2]<<8|fe[ie+3]}var Ge=function(){function fe(ie,x){Object(Ne.a)(this,fe),this.TAG="FLVDemuxer",this._config=x,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=ie.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=ie.hasAudioTrack,this._hasVideo=ie.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new ae,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var P=new ArrayBuffer(2);return new DataView(P).setInt16(0,256,!0),new Int16Array(P)[0]===256}()}return Object(Pe.a)(fe,[{key:"destroy",value:function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}},{key:"bindDataSource",value:function(x){return x.onDataArrival=this.parseChunks.bind(this),this}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(x){this._onTrackMetadata=x}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(x){this._onMediaInfo=x}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(x){this._onMetaDataArrived=x}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(x){this._onScriptDataArrived=x}},{key:"onError",get:function(){return this._onError},set:function(x){this._onError=x}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(x){this._onDataAvailable=x}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(x){this._timestampBase=x}},{key:"overridedDuration",get:function(){return this._duration},set:function(x){this._durationOverrided=!0,this._duration=x,this._mediaInfo.duration=x}},{key:"overridedHasAudio",set:function(x){this._hasAudioFlagOverrided=!0,this._hasAudio=x,this._mediaInfo.hasAudio=x}},{key:"overridedHasVideo",set:function(x){this._hasVideoFlagOverrided=!0,this._hasVideo=x,this._mediaInfo.hasVideo=x}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new ae}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}},{key:"parseChunks",value:function(x,P){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new n("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var B=0,q=this._littleEndian;if(P===0)if(x.byteLength>13){var ce=fe.probe(x);B=ce.dataOffset}else return 0;if(this._firstParse){this._firstParse=!1,P+B!==this._dataOffset&&y.w(this.TAG,"First time parsing but chunk byteStart invalid!");var Re=new DataView(x,B),Ie=Re.getUint32(0,!q);Ie!==0&&y.w(this.TAG,"PrevTagSize0 !== 0 !!!"),B+=4}for(;B<x.byteLength;){this._dispatch=!0;var qe=new DataView(x,B);if(B+11+4>x.byteLength)break;var Je=qe.getUint8(0),He=qe.getUint32(0,!q)&16777215;if(B+11+He+4>x.byteLength)break;if(Je!==8&&Je!==9&&Je!==18){y.w(this.TAG,"Unsupported tag type ".concat(Je,", skipped")),B+=11+He+4;continue}var nt=qe.getUint8(4),Qe=qe.getUint8(5),We=qe.getUint8(6),it=qe.getUint8(7),$e=We|Qe<<8|nt<<16|it<<24,O=qe.getUint32(7,!q)&16777215;O!==0&&y.w(this.TAG,"Meet tag which has StreamID != 0!");var s=B+11;switch(Je){case 8:this._parseAudioData(x,s,He,$e);break;case 9:this._parseVideoData(x,s,He,$e,P+B);break;case 18:this._parseScriptData(x,s,He);break}var f=qe.getUint32(11+He,!q);f!==11+He&&y.w(this.TAG,"Invalid PrevTagSize ".concat(f)),B+=11+He+4}return this._isInitialMetadataDispatched()&&(this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack)),B}},{key:"_parseScriptData",value:function(x,P,B){var q=be.parseScriptData(x,P,B);if(q.hasOwnProperty("onMetaData")){if(q.onMetaData==null||typeof q.onMetaData!="object"){y.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&y.w(this.TAG,"Found another onMetaData tag!"),this._metadata=q;var ce=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},ce)),typeof ce.hasAudio=="boolean"&&(this._hasAudioFlagOverrided===!1&&(this._hasAudio=ce.hasAudio,this._mediaInfo.hasAudio=this._hasAudio)),typeof ce.hasVideo=="boolean"&&(this._hasVideoFlagOverrided===!1&&(this._hasVideo=ce.hasVideo,this._mediaInfo.hasVideo=this._hasVideo)),typeof ce.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=ce.audiodatarate),typeof ce.videodatarate=="number"&&(this._mediaInfo.videoDataRate=ce.videodatarate),typeof ce.width=="number"&&(this._mediaInfo.width=ce.width),typeof ce.height=="number"&&(this._mediaInfo.height=ce.height),typeof ce.duration=="number"){if(!this._durationOverrided){var Re=Math.floor(ce.duration*this._timescale);this._duration=Re,this._mediaInfo.duration=Re}}else this._mediaInfo.duration=0;if(typeof ce.framerate=="number"){var Ie=Math.floor(ce.framerate*1e3);if(Ie>0){var qe=Ie/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=qe,this._referenceFrameRate.fps_num=Ie,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=qe}}if(typeof ce.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var Je=ce.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(Je),ce.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=ce,y.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(q).length>0&&(this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},q)))}},{key:"_parseKeyframesIndex",value:function(x){for(var P=[],B=[],q=1;q<x.times.length;q++){var ce=this._timestampBase+Math.floor(x.times[q]*1e3);P.push(ce),B.push(x.filepositions[q])}return{times:P,filepositions:B}}},{key:"_parseAudioData",value:function(x,P,B,q){if(B<=1){y.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;var ce=this._littleEndian,Re=new DataView(x,P,B),Ie=Re.getUint8(0),qe=Ie>>>4;if(qe!==2&&qe!==10){this._onError(A.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+qe);return}var Je=0,He=(Ie&12)>>>2;if(He>=0&&He<=4)Je=this._flvSoundRateTable[He];else{this._onError(A.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+He);return}var nt=(Ie&2)>>>1,Qe=Ie&1,We=this._audioMetadata,it=this._audioTrack;if(We||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),We=this._audioMetadata={},We.type="audio",We.id=it.id,We.timescale=this._timescale,We.duration=this._duration,We.audioSampleRate=Je,We.channelCount=Qe===0?1:2),qe===10){var $e=this._parseAACAudioData(x,P+1,B-1);if($e==null)return;if($e.packetType===0){We.config&&y.w(this.TAG,"Found another AudioSpecificConfig!");var O=$e.data;We.audioSampleRate=O.samplingRate,We.channelCount=O.channelCount,We.codec=O.codec,We.originalCodec=O.originalCodec,We.config=O.config,We.refSampleDuration=1024/We.audioSampleRate*We.timescale,y.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",We);var s=this._mediaInfo;s.audioCodec=We.originalCodec,s.audioSampleRate=We.audioSampleRate,s.audioChannelCount=We.channelCount,s.hasVideo?s.videoCodec!=null&&(s.mimeType='video/x-flv; codecs="'+s.videoCodec+","+s.audioCodec+'"'):s.mimeType='video/x-flv; codecs="'+s.audioCodec+'"',s.isComplete()&&this._onMediaInfo(s)}else if($e.packetType===1){var f=this._timestampBase+q,D={unit:$e.data,length:$e.data.byteLength,dts:f,pts:f};it.samples.push(D),it.length+=$e.data.length}else y.e(this.TAG,"Flv: Unsupported AAC data type ".concat($e.packetType))}else if(qe===2){if(!We.codec){var Y=this._parseMP3AudioData(x,P+1,B-1,!0);if(Y==null)return;We.audioSampleRate=Y.samplingRate,We.channelCount=Y.channelCount,We.codec=Y.codec,We.originalCodec=Y.originalCodec,We.refSampleDuration=1152/We.audioSampleRate*We.timescale,y.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",We);var U=this._mediaInfo;U.audioCodec=We.codec,U.audioSampleRate=We.audioSampleRate,U.audioChannelCount=We.channelCount,U.audioDataRate=Y.bitRate,U.hasVideo?U.videoCodec!=null&&(U.mimeType='video/x-flv; codecs="'+U.videoCodec+","+U.audioCodec+'"'):U.mimeType='video/x-flv; codecs="'+U.audioCodec+'"',U.isComplete()&&this._onMediaInfo(U)}var Se=this._parseMP3AudioData(x,P+1,B-1,!1);if(Se==null)return;var Ve=this._timestampBase+q,tt={unit:Se,length:Se.byteLength,dts:Ve,pts:Ve};it.samples.push(tt),it.length+=Se.length}}},{key:"_parseAACAudioData",value:function(x,P,B){if(B<=1){y.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}var q={},ce=new Uint8Array(x,P,B);return q.packetType=ce[0],ce[0]===0?q.data=this._parseAACAudioSpecificConfig(x,P+1,B-1):q.data=ce.subarray(1),q}},{key:"_parseAACAudioSpecificConfig",value:function(x,P,B){var q=new Uint8Array(x,P,B),ce=null,Re=0,Ie=0,qe=null,Je=0,He=null;if(Re=Ie=q[0]>>>3,Je=(q[0]&7)<<1|q[1]>>>7,Je<0||Je>=this._mpegSamplingRates.length){this._onError(A.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}var nt=this._mpegSamplingRates[Je],Qe=(q[1]&120)>>>3;if(Qe<0||Qe>=8){this._onError(A.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}Re===5&&(He=(q[1]&7)<<1|q[2]>>>7,qe=(q[2]&124)>>>2);var We=self.navigator.userAgent.toLowerCase();return We.indexOf("firefox")!==-1?Je>=6?(Re=5,ce=new Array(4),He=Je-3):(Re=2,ce=new Array(2),He=Je):We.indexOf("android")!==-1?(Re=2,ce=new Array(2),He=Je):(Re=5,He=Je,ce=new Array(4),Je>=6?He=Je-3:Qe===1&&(Re=2,ce=new Array(2),He=Je)),ce[0]=Re<<3,ce[0]|=(Je&15)>>>1,ce[1]=(Je&15)<<7,ce[1]|=(Qe&15)<<3,Re===5&&(ce[1]|=(He&15)>>>1,ce[2]=(He&1)<<7,ce[2]|=2<<2,ce[3]=0),{config:ce,samplingRate:nt,channelCount:Qe,codec:"mp4a.40."+Re,originalCodec:"mp4a.40."+Ie}}},{key:"_parseMP3AudioData",value:function(x,P,B,q){if(B<4){y.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}var ce=this._littleEndian,Re=new Uint8Array(x,P,B),Ie=null;if(q){if(Re[0]!==255)return;var qe=Re[1]>>>3&3,Je=(Re[1]&6)>>1,He=(Re[2]&240)>>>4,nt=(Re[2]&12)>>>2,Qe=Re[3]>>>6&3,We=Qe!==3?2:1,it=0,$e=0,O=34,s="mp3";switch(qe){case 0:it=this._mpegAudioV25SampleRateTable[nt];break;case 2:it=this._mpegAudioV20SampleRateTable[nt];break;case 3:it=this._mpegAudioV10SampleRateTable[nt];break}switch(Je){case 1:O=34,He<this._mpegAudioL3BitRateTable.length&&($e=this._mpegAudioL3BitRateTable[He]);break;case 2:O=33,He<this._mpegAudioL2BitRateTable.length&&($e=this._mpegAudioL2BitRateTable[He]);break;case 3:O=32,He<this._mpegAudioL1BitRateTable.length&&($e=this._mpegAudioL1BitRateTable[He]);break}Ie={bitRate:$e,samplingRate:it,channelCount:We,codec:s,originalCodec:s}}else Ie=Re;return Ie}},{key:"_parseVideoData",value:function(x,P,B,q,ce){if(B<=1){y.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;var Re=new Uint8Array(x,P,B)[0],Ie=(Re&240)>>>4,qe=Re&15;if(qe!==7){this._onError(A.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(qe));return}this._parseAVCVideoPacket(x,P+1,B-1,q,ce,Ie)}},{key:"_parseAVCVideoPacket",value:function(x,P,B,q,ce,Re){if(B<4){y.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}var Ie=this._littleEndian,qe=new DataView(x,P,B),Je=qe.getUint8(0),He=qe.getUint32(0,!Ie)&16777215,nt=He<<8>>8;if(Je===0)this._parseAVCDecoderConfigurationRecord(x,P+4,B-4);else if(Je===1)this._parseAVCVideoData(x,P+4,B-4,q,ce,Re,nt);else if(!(Je===2)){this._onError(A.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(Je));return}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(x,P,B){if(B<7){y.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}var q=this._videoMetadata,ce=this._videoTrack,Re=this._littleEndian,Ie=new DataView(x,P,B);q?typeof q.avcc!="undefined"&&y.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),q=this._videoMetadata={},q.type="video",q.id=ce.id,q.timescale=this._timescale,q.duration=this._duration);var qe=Ie.getUint8(0),Je=Ie.getUint8(1),He=Ie.getUint8(2),nt=Ie.getUint8(3);if(qe!==1||Je===0){this._onError(A.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(Ie.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(A.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));return}var Qe=Ie.getUint8(5)&31;if(Qe===0){this._onError(A.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else Qe>1&&y.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(Qe));for(var We=6,it=0;it<Qe;it++){var $e=Ie.getUint16(We,!Re);if(We+=2,$e===0)continue;var O=new Uint8Array(x,P+We,$e);We+=$e;var s=h.parseSPS(O);if(it!==0)continue;q.codecWidth=s.codec_size.width,q.codecHeight=s.codec_size.height,q.presentWidth=s.present_size.width,q.presentHeight=s.present_size.height,q.profile=s.profile_string,q.level=s.level_string,q.bitDepth=s.bit_depth,q.chromaFormat=s.chroma_format,q.sarRatio=s.sar_ratio,q.frameRate=s.frame_rate,(s.frame_rate.fixed===!1||s.frame_rate.fps_num===0||s.frame_rate.fps_den===0)&&(q.frameRate=this._referenceFrameRate);var f=q.frameRate.fps_den,D=q.frameRate.fps_num;q.refSampleDuration=q.timescale*(f/D);for(var Y=O.subarray(1,4),U="avc1.",Se=0;Se<3;Se++){var Ve=Y[Se].toString(16);Ve.length<2&&(Ve="0"+Ve),U+=Ve}q.codec=U;var tt=this._mediaInfo;tt.width=q.codecWidth,tt.height=q.codecHeight,tt.fps=q.frameRate.fps,tt.profile=q.profile,tt.level=q.level,tt.refFrames=s.ref_frames,tt.chromaFormat=s.chroma_format_string,tt.sarNum=q.sarRatio.width,tt.sarDen=q.sarRatio.height,tt.videoCodec=U,tt.hasAudio?tt.audioCodec!=null&&(tt.mimeType='video/x-flv; codecs="'+tt.videoCodec+","+tt.audioCodec+'"'):tt.mimeType='video/x-flv; codecs="'+tt.videoCodec+'"',tt.isComplete()&&this._onMediaInfo(tt)}var ht=Ie.getUint8(We);if(ht===0){this._onError(A.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else ht>1&&y.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(ht));We++;for(var Ze=0;Ze<ht;Ze++){var mt=Ie.getUint16(We,!Re);if(We+=2,mt===0)continue;We+=mt}q.avcc=new Uint8Array(B),q.avcc.set(new Uint8Array(x,P,B),0),y.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",q)}},{key:"_parseAVCVideoData",value:function(x,P,B,q,ce,Re,Ie){for(var qe=this._littleEndian,Je=new DataView(x,P,B),He=[],nt=0,Qe=0,We=this._naluLengthSize,it=this._timestampBase+q,$e=Re===1;Qe<B;){if(Qe+4>=B){y.w(this.TAG,"Malformed Nalu near timestamp ".concat(it,", offset = ").concat(Qe,", dataSize = ").concat(B));break}var O=Je.getUint32(Qe,!qe);if(We===3&&(O>>>=8),O>B-We){y.w(this.TAG,"Malformed Nalus near timestamp ".concat(it,", NaluSize > DataSize!"));return}var s=Je.getUint8(Qe+We)&31;s===5&&($e=!0);var f=new Uint8Array(x,P+Qe,We+O),D={type:s,data:f};He.push(D),nt+=f.byteLength,Qe+=We+O}if(He.length){var Y=this._videoTrack,U={units:He,length:nt,isKeyframe:$e,dts:it,cts:Ie,pts:it+Ie};$e&&(U.fileposition=ce),Y.samples.push(U),Y.length+=nt}}}],[{key:"probe",value:function(x){var P=new Uint8Array(x),B={match:!1};if(P[0]!==70||P[1]!==76||P[2]!==86||P[3]!==1)return B;var q=(P[4]&4)>>>2!==0,ce=(P[4]&1)!==0,Re=_e(P,5);return Re<9?B:{match:!0,consumed:Re,dataOffset:Re,hasAudioTrack:q,hasVideoTrack:ce}}}]),fe}(),ze=Ge,Fe=function(){function fe(){Object(Ne.a)(this,fe)}return Object(Pe.a)(fe,null,[{key:"init",value:function(){fe.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(var x in fe.types)fe.types.hasOwnProperty(x)&&(fe.types[x]=[x.charCodeAt(0),x.charCodeAt(1),x.charCodeAt(2),x.charCodeAt(3)]);var P=fe.constants={};P.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),P.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),P.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),P.STSC=P.STCO=P.STTS,P.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),P.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),P.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),P.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),P.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),P.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(x){for(var P=8,B=null,q=Array.prototype.slice.call(arguments,1),ce=q.length,Re=0;Re<ce;Re++)P+=q[Re].byteLength;B=new Uint8Array(P),B[0]=P>>>24&255,B[1]=P>>>16&255,B[2]=P>>>8&255,B[3]=P&255,B.set(x,4);for(var Ie=8,qe=0;qe<ce;qe++)B.set(q[qe],Ie),Ie+=q[qe].byteLength;return B}},{key:"generateInitSegment",value:function(x){var P=fe.box(fe.types.ftyp,fe.constants.FTYP),B=fe.moov(x),q=new Uint8Array(P.byteLength+B.byteLength);return q.set(P,0),q.set(B,P.byteLength),q}},{key:"moov",value:function(x){var P=fe.mvhd(x.timescale,x.duration),B=fe.trak(x),q=fe.mvex(x);return fe.box(fe.types.moov,P,B,q)}},{key:"mvhd",value:function(x,P){return fe.box(fe.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,x>>>24&255,x>>>16&255,x>>>8&255,x&255,P>>>24&255,P>>>16&255,P>>>8&255,P&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(x){return fe.box(fe.types.trak,fe.tkhd(x),fe.mdia(x))}},{key:"tkhd",value:function(x){var P=x.id,B=x.duration,q=x.presentWidth,ce=x.presentHeight;return fe.box(fe.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,P>>>24&255,P>>>16&255,P>>>8&255,P&255,0,0,0,0,B>>>24&255,B>>>16&255,B>>>8&255,B&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,q>>>8&255,q&255,0,0,ce>>>8&255,ce&255,0,0]))}},{key:"mdia",value:function(x){return fe.box(fe.types.mdia,fe.mdhd(x),fe.hdlr(x),fe.minf(x))}},{key:"mdhd",value:function(x){var P=x.timescale,B=x.duration;return fe.box(fe.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,P>>>24&255,P>>>16&255,P>>>8&255,P&255,B>>>24&255,B>>>16&255,B>>>8&255,B&255,85,196,0,0]))}},{key:"hdlr",value:function(x){var P=null;return x.type==="audio"?P=fe.constants.HDLR_AUDIO:P=fe.constants.HDLR_VIDEO,fe.box(fe.types.hdlr,P)}},{key:"minf",value:function(x){var P=null;return x.type==="audio"?P=fe.box(fe.types.smhd,fe.constants.SMHD):P=fe.box(fe.types.vmhd,fe.constants.VMHD),fe.box(fe.types.minf,P,fe.dinf(),fe.stbl(x))}},{key:"dinf",value:function(){var x=fe.box(fe.types.dinf,fe.box(fe.types.dref,fe.constants.DREF));return x}},{key:"stbl",value:function(x){var P=fe.box(fe.types.stbl,fe.stsd(x),fe.box(fe.types.stts,fe.constants.STTS),fe.box(fe.types.stsc,fe.constants.STSC),fe.box(fe.types.stsz,fe.constants.STSZ),fe.box(fe.types.stco,fe.constants.STCO));return P}},{key:"stsd",value:function(x){return x.type==="audio"?x.codec==="mp3"?fe.box(fe.types.stsd,fe.constants.STSD_PREFIX,fe.mp3(x)):fe.box(fe.types.stsd,fe.constants.STSD_PREFIX,fe.mp4a(x)):fe.box(fe.types.stsd,fe.constants.STSD_PREFIX,fe.avc1(x))}},{key:"mp3",value:function(x){var P=x.channelCount,B=x.audioSampleRate,q=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,P,0,16,0,0,0,0,B>>>8&255,B&255,0,0]);return fe.box(fe.types[".mp3"],q)}},{key:"mp4a",value:function(x){var P=x.channelCount,B=x.audioSampleRate,q=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,P,0,16,0,0,0,0,B>>>8&255,B&255,0,0]);return fe.box(fe.types.mp4a,q,fe.esds(x))}},{key:"esds",value:function(x){var P=x.config||[],B=P.length,q=new Uint8Array([0,0,0,0,3,23+B,0,1,0,4,15+B,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([B]).concat(P).concat([6,1,2]));return fe.box(fe.types.esds,q)}},{key:"avc1",value:function(x){var P=x.avcc,B=x.codecWidth,q=x.codecHeight,ce=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,B>>>8&255,B&255,q>>>8&255,q&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return fe.box(fe.types.avc1,ce,fe.box(fe.types.avcC,P))}},{key:"mvex",value:function(x){return fe.box(fe.types.mvex,fe.trex(x))}},{key:"trex",value:function(x){var P=x.id,B=new Uint8Array([0,0,0,0,P>>>24&255,P>>>16&255,P>>>8&255,P&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return fe.box(fe.types.trex,B)}},{key:"moof",value:function(x,P){return fe.box(fe.types.moof,fe.mfhd(x.sequenceNumber),fe.traf(x,P))}},{key:"mfhd",value:function(x){var P=new Uint8Array([0,0,0,0,x>>>24&255,x>>>16&255,x>>>8&255,x&255]);return fe.box(fe.types.mfhd,P)}},{key:"traf",value:function(x,P){var B=x.id,q=fe.box(fe.types.tfhd,new Uint8Array([0,0,0,0,B>>>24&255,B>>>16&255,B>>>8&255,B&255])),ce=fe.box(fe.types.tfdt,new Uint8Array([0,0,0,0,P>>>24&255,P>>>16&255,P>>>8&255,P&255])),Re=fe.sdtp(x),Ie=fe.trun(x,Re.byteLength+16+16+8+16+8+8);return fe.box(fe.types.traf,q,ce,Ie,Re)}},{key:"sdtp",value:function(x){for(var P=x.samples||[],B=P.length,q=new Uint8Array(4+B),ce=0;ce<B;ce++){var Re=P[ce].flags;q[ce+4]=Re.isLeading<<6|Re.dependsOn<<4|Re.isDependedOn<<2|Re.hasRedundancy}return fe.box(fe.types.sdtp,q)}},{key:"trun",value:function(x,P){var B=x.samples||[],q=B.length,ce=12+16*q,Re=new Uint8Array(ce);P+=8+ce,Re.set([0,0,15,1,q>>>24&255,q>>>16&255,q>>>8&255,q&255,P>>>24&255,P>>>16&255,P>>>8&255,P&255],0);for(var Ie=0;Ie<q;Ie++){var qe=B[Ie].duration,Je=B[Ie].size,He=B[Ie].flags,nt=B[Ie].cts;Re.set([qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255,Je>>>24&255,Je>>>16&255,Je>>>8&255,Je&255,He.isLeading<<2|He.dependsOn,He.isDependedOn<<6|He.hasRedundancy<<4|He.isNonSync,0,0,nt>>>24&255,nt>>>16&255,nt>>>8&255,nt&255],12+16*Ie)}return fe.box(fe.types.trun,Re)}},{key:"mdat",value:function(x){return fe.box(fe.types.mdat,x)}}]),fe}();Fe.init();var Ke=Fe,ot=function(){function fe(){Object(Ne.a)(this,fe)}return Object(Pe.a)(fe,null,[{key:"getSilentFrame",value:function(x,P){if(x==="mp4a.40.2"){if(P===1)return new Uint8Array([0,200,0,128,35,128]);if(P===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(P===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(P===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(P===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(P===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(P===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(P===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(P===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}]),fe}(),Be=ot,je=function fe(ie,x,P,B,q){Object(Ne.a)(this,fe),this.dts=ie,this.pts=x,this.duration=P,this.originalDts=B,this.isSyncPoint=q,this.fileposition=null},ke=function(){function fe(){Object(Ne.a)(this,fe),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return Object(Pe.a)(fe,[{key:"appendSyncPoint",value:function(x){x.isSyncPoint=!0,this.syncPoints.push(x)}}]),fe}(),Le=function(){function fe(){Object(Ne.a)(this,fe),this._list=[]}return Object(Pe.a)(fe,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(x){var P=this._list;if(x.length===0)return;P.length>0&&x[0].originalDts<P[P.length-1].originalDts&&this.clear(),Array.prototype.push.apply(P,x)}},{key:"getLastSyncPointBeforeDts",value:function(x){if(this._list.length==0)return null;var P=this._list,B=0,q=P.length-1,ce=0,Re=0,Ie=q;for(x<P[0].dts&&(B=0,Re=Ie+1);Re<=Ie;)if(ce=Re+Math.floor((Ie-Re)/2),ce===q||x>=P[ce].dts&&x<P[ce+1].dts){B=ce;break}else P[ce].dts<x?Re=ce+1:Ie=ce-1;return this._list[B]}}]),fe}(),Oe=function(){function fe(ie){Object(Ne.a)(this,fe),this._type=ie,this._list=[],this._lastAppendLocation=-1}return Object(Pe.a)(fe,[{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}},{key:"isEmpty",value:function(){return this._list.length===0}},{key:"clear",value:function(){this._list=[],this._lastAppendLocation=-1}},{key:"_searchNearestSegmentBefore",value:function(x){var P=this._list;if(P.length===0)return-2;var B=P.length-1,q=0,ce=0,Re=B,Ie=0;if(x<P[0].originalBeginDts)return Ie=-1,Ie;for(;ce<=Re;)if(q=ce+Math.floor((Re-ce)/2),q===B||x>P[q].lastSample.originalDts&&x<P[q+1].originalBeginDts){Ie=q;break}else P[q].originalBeginDts<x?ce=q+1:Re=q-1;return Ie}},{key:"_searchNearestSegmentAfter",value:function(x){return this._searchNearestSegmentBefore(x)+1}},{key:"append",value:function(x){var P=this._list,B=x,q=this._lastAppendLocation,ce=0;q!==-1&&q<P.length&&B.originalBeginDts>=P[q].lastSample.originalDts&&(q===P.length-1||q<P.length-1&&B.originalBeginDts<P[q+1].originalBeginDts)?ce=q+1:P.length>0&&(ce=this._searchNearestSegmentBefore(B.originalBeginDts)+1),this._lastAppendLocation=ce,this._list.splice(ce,0,B)}},{key:"getLastSegmentBefore",value:function(x){var P=this._searchNearestSegmentBefore(x);return P>=0?this._list[P]:null}},{key:"getLastSampleBefore",value:function(x){var P=this.getLastSegmentBefore(x);return P!=null?P.lastSample:null}},{key:"getLastSyncPointBefore",value:function(x){for(var P=this._searchNearestSegmentBefore(x),B=this._list[P].syncPoints;B.length===0&&P>0;)P--,B=this._list[P].syncPoints;return B.length>0?B[B.length-1]:null}}]),fe}(),pe=function(){function fe(ie){Object(Ne.a)(this,fe),this.TAG="MP4Remuxer",this._config=ie,this._isLive=ie.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=Infinity,this._videoDtsBase=Infinity,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new Oe("audio"),this._videoSegmentInfoList=new Oe("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(S.chrome&&(S.version.major<50||S.version.major===50&&S.version.build<2661)),this._fillSilentAfterSeek=S.msedge||S.msie,this._mp3UseMpegAudio=!S.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return Object(Pe.a)(fe,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(x){return x.onDataAvailable=this.remux.bind(this),x.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(x){this._onInitSegment=x}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(x){this._onMediaSegment=x}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(x){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(x,P){if(!this._onMediaSegment)throw new n("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(x,P),this._remuxVideo(P),this._remuxAudio(x)}},{key:"_onTrackMetadataReceived",value:function(x,P){var B=null,q="mp4",ce=P.codec;if(x==="audio")this._audioMeta=P,P.codec==="mp3"&&this._mp3UseMpegAudio?(q="mpeg",ce="",B=new Uint8Array):B=Ke.generateInitSegment(P);else if(x==="video")this._videoMeta=P,B=Ke.generateInitSegment(P);else return;if(!this._onInitSegment)throw new n("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(x,{type:x,data:B.buffer,codec:ce,container:"".concat(x,"/").concat(q),mediaDuration:P.duration})}},{key:"_calculateDtsBase",value:function(x,P){if(this._dtsBaseInited)return;x.samples&&x.samples.length&&(this._audioDtsBase=x.samples[0].dts),P.samples&&P.samples.length&&(this._videoDtsBase=P.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0}},{key:"flushStashedSamples",value:function(){var x=this._videoStashedLastSample,P=this._audioStashedLastSample,B={type:"video",id:1,sequenceNumber:0,samples:[],length:0};x!=null&&(B.samples.push(x),B.length=x.length);var q={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};P!=null&&(q.samples.push(P),q.length=P.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(B,!0),this._remuxAudio(q,!0)}},{key:"_remuxAudio",value:function(x,P){if(this._audioMeta==null)return;var B=x,q=B.samples,ce=void 0,Re=-1,Ie=-1,qe=-1,Je=this._audioMeta.refSampleDuration,He=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,nt=this._dtsBaseInited&&this._audioNextDts===void 0,Qe=!1;if(!q||q.length===0)return;if(q.length===1&&!P)return;var We=0,it=null,$e=0;He?(We=0,$e=B.length):(We=8,$e=8+B.length);var O=null;if(q.length>1&&(O=q.pop(),$e-=O.length),this._audioStashedLastSample!=null){var s=this._audioStashedLastSample;this._audioStashedLastSample=null,q.unshift(s),$e+=s.length}O!=null&&(this._audioStashedLastSample=O);var f=q[0].dts-this._dtsBase;if(this._audioNextDts)ce=f-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())ce=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&(this._audioMeta.originalCodec!=="mp3"&&(Qe=!0));else{var D=this._audioSegmentInfoList.getLastSampleBefore(f);if(D!=null){var Y=f-(D.originalDts+D.duration);Y<=3&&(Y=0);var U=D.dts+D.duration+Y;ce=f-U}else ce=0}if(Qe){var Se=f-ce,Ve=this._videoSegmentInfoList.getLastSegmentBefore(f);if(Ve!=null&&Ve.beginDts<Se){var tt=Be.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(tt){var ht=Ve.beginDts,Ze=Se-Ve.beginDts;y.v(this.TAG,"InsertPrefixSilentAudio: dts: ".concat(ht,", duration: ").concat(Ze)),q.unshift({unit:tt,dts:ht,pts:ht}),$e+=tt.byteLength}}else Qe=!1}for(var mt=[],wt=0;wt<q.length;wt++){var kt=q[wt],Nt=kt.unit,Mt=kt.dts-this._dtsBase,Lt=Mt-ce;Re===-1&&(Re=Lt);var Rt=0;if(wt!==q.length-1){var qt=q[wt+1].dts-this._dtsBase-ce;Rt=qt-Lt}else if(O!=null){var Vt=O.dts-this._dtsBase-ce;Rt=Vt-Lt}else mt.length>=1?Rt=mt[mt.length-1].duration:Rt=Math.floor(Je);var It=!1,Pt=null;if(Rt>Je*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!S.safari){It=!0;var Ht=Math.abs(Rt-Je),Gt=Math.ceil(Ht/Je),Xt=Lt+Je;y.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
|
`+"dts: ".concat(Lt+Rt," ms, expected: ").concat(Lt+Math.round(Je)," ms, ")+"delta: ".concat(Math.round(Ht)," ms, generate: ").concat(Gt," frames"));var Ft=Be.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);Ft==null&&(y.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),Ft=Nt),Pt=[];for(var Yt=0;Yt<Gt;Yt++){var Kt=Math.round(Xt);if(Pt.length>0){var zt=Pt[Pt.length-1];zt.duration=Kt-zt.dts}var Bt={dts:Kt,pts:Kt,cts:0,unit:Ft,size:Ft.byteLength,duration:0,originalDts:Mt,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Pt.push(Bt),$e+=Bt.size,Xt+=Je}var $t=Pt[Pt.length-1];$t.duration=Lt+Rt-$t.dts,Rt=Math.round(Je)}mt.push({dts:Lt,pts:Lt,cts:0,unit:kt.unit,size:kt.unit.byteLength,duration:Rt,originalDts:Mt,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),It&&mt.push.apply(mt,Pt)}He?it=new Uint8Array($e):(it=new Uint8Array($e),it[0]=$e>>>24&255,it[1]=$e>>>16&255,it[2]=$e>>>8&255,it[3]=$e&255,it.set(Ke.types.mdat,4));for(var Jt=0;Jt<mt.length;Jt++){var Zt=mt[Jt].unit;it.set(Zt,We),We+=Zt.byteLength}var Ot=mt[mt.length-1];Ie=Ot.dts+Ot.duration,this._audioNextDts=Ie;var St=new ke;St.beginDts=Re,St.endDts=Ie,St.beginPts=Re,St.endPts=Ie,St.originalBeginDts=mt[0].originalDts,St.originalEndDts=Ot.originalDts+Ot.duration,St.firstSample=new je(mt[0].dts,mt[0].pts,mt[0].duration,mt[0].originalDts,!1),St.lastSample=new je(Ot.dts,Ot.pts,Ot.duration,Ot.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(St),B.samples=mt,B.sequenceNumber++;var jt=null;He?jt=new Uint8Array:jt=Ke.moof(B,Re),B.samples=[],B.length=0;var Tt={type:"audio",data:this._mergeBoxes(jt,it).buffer,sampleCount:mt.length,info:St};He&&nt&&(Tt.timestampOffset=Re),this._onMediaSegment("audio",Tt)}},{key:"_remuxVideo",value:function(x,P){if(this._videoMeta==null)return;var B=x,q=B.samples,ce=void 0,Re=-1,Ie=-1,qe=-1,Je=-1;if(!q||q.length===0)return;if(q.length===1&&!P)return;var He=8,nt=null,Qe=8+x.length,We=null;if(q.length>1&&(We=q.pop(),Qe-=We.length),this._videoStashedLastSample!=null){var it=this._videoStashedLastSample;this._videoStashedLastSample=null,q.unshift(it),Qe+=it.length}We!=null&&(this._videoStashedLastSample=We);var $e=q[0].dts-this._dtsBase;if(this._videoNextDts)ce=$e-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())ce=0;else{var O=this._videoSegmentInfoList.getLastSampleBefore($e);if(O!=null){var s=$e-(O.originalDts+O.duration);s<=3&&(s=0);var f=O.dts+O.duration+s;ce=$e-f}else ce=0}for(var D=new ke,Y=[],U=0;U<q.length;U++){var Se=q[U],Ve=Se.dts-this._dtsBase,tt=Se.isKeyframe,ht=Ve-ce,Ze=Se.cts,mt=ht+Ze;Re===-1&&(Re=ht,qe=mt);var wt=0;if(U!==q.length-1){var kt=q[U+1].dts-this._dtsBase-ce;wt=kt-ht}else if(We!=null){var Nt=We.dts-this._dtsBase-ce;wt=Nt-ht}else Y.length>=1?wt=Y[Y.length-1].duration:wt=Math.floor(this._videoMeta.refSampleDuration);if(tt){var Mt=new je(ht,mt,wt,Se.dts,!0);Mt.fileposition=Se.fileposition,D.appendSyncPoint(Mt)}Y.push({dts:ht,pts:mt,cts:Ze,units:Se.units,size:Se.length,isKeyframe:tt,duration:wt,originalDts:Ve,flags:{isLeading:0,dependsOn:tt?2:1,isDependedOn:tt?1:0,hasRedundancy:0,isNonSync:tt?0:1}})}nt=new Uint8Array(Qe),nt[0]=Qe>>>24&255,nt[1]=Qe>>>16&255,nt[2]=Qe>>>8&255,nt[3]=Qe&255,nt.set(Ke.types.mdat,4);for(var Lt=0;Lt<Y.length;Lt++)for(var Rt=Y[Lt].units;Rt.length;){var qt=Rt.shift(),Vt=qt.data;nt.set(Vt,He),He+=Vt.byteLength}var It=Y[Y.length-1];if(Ie=It.dts+It.duration,Je=It.pts+It.duration,this._videoNextDts=Ie,D.beginDts=Re,D.endDts=Ie,D.beginPts=qe,D.endPts=Je,D.originalBeginDts=Y[0].originalDts,D.originalEndDts=It.originalDts+It.duration,D.firstSample=new je(Y[0].dts,Y[0].pts,Y[0].duration,Y[0].originalDts,Y[0].isKeyframe),D.lastSample=new je(It.dts,It.pts,It.duration,It.originalDts,It.isKeyframe),this._isLive||this._videoSegmentInfoList.append(D),B.samples=Y,B.sequenceNumber++,this._forceFirstIDR){var Pt=Y[0].flags;Pt.dependsOn=2,Pt.isNonSync=0}var Ht=Ke.moof(B,Re);B.samples=[],B.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Ht,nt).buffer,sampleCount:Y.length,info:D})}},{key:"_mergeBoxes",value:function(x,P){var B=new Uint8Array(x.byteLength+P.byteLength);return B.set(x,0),B.set(P,x.byteLength),B}}]),fe}(),ve=pe,Ce={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"},xe=Ce,Ue=function(){function fe(ie,x){Object(Ne.a)(this,fe),this.TAG="TransmuxingController",this._emitter=new g.a,this._config=x,ie.segments||(ie.segments=[{duration:ie.duration,filesize:ie.filesize,url:ie.url}]),typeof ie.cors!="boolean"&&(ie.cors=!0),typeof ie.withCredentials!="boolean"&&(ie.withCredentials=!1),this._mediaDataSource=ie,this._currentSegmentIndex=0;var P=0;this._mediaDataSource.segments.forEach(function(B){B.timestampBase=P,P+=B.duration,B.cors=ie.cors,B.withCredentials=ie.withCredentials,x.referrerPolicy&&(B.referrerPolicy=x.referrerPolicy)}),!isNaN(P)&&this._mediaDataSource.duration!==P&&(this._mediaDataSource.duration=P),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return Object(Pe.a)(fe,[{key:"destroy",value:function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(x,P){this._emitter.addListener(x,P)}},{key:"off",value:function(x,P){this._emitter.removeListener(x,P)}},{key:"start",value:function(){this._loadSegment(0),this._enableStatisticsReporter()}},{key:"_loadSegment",value:function(x,P){this._currentSegmentIndex=x;var B=this._mediaDataSource.segments[x],q=this._ioctl=new V(B,this._config,x);q.onError=this._onIOException.bind(this),q.onSeeked=this._onIOSeeked.bind(this),q.onComplete=this._onIOComplete.bind(this),q.onRedirect=this._onIORedirect.bind(this),q.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),P?this._demuxer.bindDataSource(this._ioctl):q.onDataArrival=this._onInitChunkArrival.bind(this),q.open(P)}},{key:"stop",value:function(){this._internalAbort(),this._disableStatisticsReporter()}},{key:"_internalAbort",value:function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}},{key:"pause",value:function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}},{key:"resume",value:function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}},{key:"seek",value:function(x){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;var P=this._searchSegmentIndexContains(x);if(P===this._currentSegmentIndex){var B=this._mediaInfo.segments[P];if(B==null)this._pendingSeekTime=x;else{var q=B.getNearestKeyframe(x);this._remuxer.seek(q.milliseconds),this._ioctl.seek(q.fileposition),this._pendingResolveSeekPoint=q.milliseconds}}else{var ce=this._mediaInfo.segments[P];if(ce==null)this._pendingSeekTime=x,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(P);else{var Re=ce.getNearestKeyframe(x);this._internalAbort(),this._remuxer.seek(x),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[P].timestampBase,this._loadSegment(P,Re.fileposition),this._pendingResolveSeekPoint=Re.milliseconds,this._reportSegmentMediaInfo(P)}}this._enableStatisticsReporter()}},{key:"_searchSegmentIndexContains",value:function(x){for(var P=this._mediaDataSource.segments,B=P.length-1,q=0;q<P.length;q++)if(x<P[q].timestampBase){B=q-1;break}return B}},{key:"_onInitChunkArrival",value:function(x,P){var B=this,q=null,ce=0;if(P>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,ce=this._demuxer.parseChunks(x,P);else if((q=ze.probe(x)).match){this._demuxer=new ze(q,this._config),this._remuxer||(this._remuxer=new ve(this._config));var Re=this._mediaDataSource;Re.duration!=null&&!isNaN(Re.duration)&&(this._demuxer.overridedDuration=Re.duration),typeof Re.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=Re.hasAudio),typeof Re.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=Re.hasVideo),this._demuxer.timestampBase=Re.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),ce=this._demuxer.parseChunks(x,P)}else q=null,y.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){B._internalAbort()}),this._emitter.emit(xe.DEMUX_ERROR,A.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),ce=0;return ce}},{key:"_onMediaInfo",value:function(x){var P=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},x),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,ae.prototype));var B=Object.assign({},x);Object.setPrototypeOf(B,ae.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=B,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var q=P._pendingSeekTime;P._pendingSeekTime=null,P.seek(q)})}},{key:"_onMetaDataArrived",value:function(x){this._emitter.emit(xe.METADATA_ARRIVED,x)}},{key:"_onScriptDataArrived",value:function(x){this._emitter.emit(xe.SCRIPTDATA_ARRIVED,x)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(x){var P=x,B=P+1;B<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(B)):(this._remuxer.flushStashedSamples(),this._emitter.emit(xe.LOADING_COMPLETE),this._disableStatisticsReporter())}},{key:"_onIORedirect",value:function(x){var P=this._ioctl.extraData;this._mediaDataSource.segments[P].redirectedURL=x}},{key:"_onIORecoveredEarlyEof",value:function(){this._emitter.emit(xe.RECOVERED_EARLY_EOF)}},{key:"_onIOException",value:function(x,P){y.e(this.TAG,"IOException: type = ".concat(x,", code = ").concat(P.code,", msg = ").concat(P.msg)),this._emitter.emit(xe.IO_ERROR,x,P),this._disableStatisticsReporter()}},{key:"_onDemuxException",value:function(x,P){y.e(this.TAG,"DemuxException: type = ".concat(x,", info = ").concat(P)),this._emitter.emit(xe.DEMUX_ERROR,x,P)}},{key:"_onRemuxerInitSegmentArrival",value:function(x,P){this._emitter.emit(xe.INIT_SEGMENT,x,P)}},{key:"_onRemuxerMediaSegmentArrival",value:function(x,P){if(this._pendingSeekTime!=null)return;if(this._emitter.emit(xe.MEDIA_SEGMENT,x,P),this._pendingResolveSeekPoint!=null&&x==="video"){var B=P.info.syncPoints,q=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,S.safari&&B.length>0&&B[0].originalDts===q&&(q=B[0].pts),this._emitter.emit(xe.RECOMMEND_SEEKPOINT,q)}}},{key:"_enableStatisticsReporter",value:function(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(x){var P=this._mediaInfo.segments[x],B=Object.assign({},P);B.duration=this._mediaInfo.duration,B.segmentCount=this._mediaInfo.segmentCount,delete B.segments,delete B.keyframesIndex,this._emitter.emit(xe.MEDIA_INFO,B)}},{key:"_reportStatisticsInfo",value:function(){var x={};x.url=this._ioctl.currentURL,x.hasRedirect=this._ioctl.hasRedirect,x.hasRedirect&&(x.redirectedURL=this._ioctl.currentRedirectedURL),x.speed=this._ioctl.currentSpeed,x.loaderType=this._ioctl.loaderType,x.currentSegmentIndex=this._currentSegmentIndex,x.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(xe.STATISTICS_INFO,x)}}]),fe}(),Xe=Ue,rt=function(ie){var x="TransmuxingWorker",P=null,B=$e.bind(this);l.install(),ie.addEventListener("message",function(O){switch(O.data.cmd){case"init":P=new Xe(O.data.param[0],O.data.param[1]),P.on(xe.IO_ERROR,Qe.bind(this)),P.on(xe.DEMUX_ERROR,We.bind(this)),P.on(xe.INIT_SEGMENT,q.bind(this)),P.on(xe.MEDIA_SEGMENT,ce.bind(this)),P.on(xe.LOADING_COMPLETE,Re.bind(this)),P.on(xe.RECOVERED_EARLY_EOF,Ie.bind(this)),P.on(xe.MEDIA_INFO,qe.bind(this)),P.on(xe.METADATA_ARRIVED,Je.bind(this)),P.on(xe.SCRIPTDATA_ARRIVED,He.bind(this)),P.on(xe.STATISTICS_INFO,nt.bind(this)),P.on(xe.RECOMMEND_SEEKPOINT,it.bind(this));break;case"destroy":P&&(P.destroy(),P=null),ie.postMessage({msg:"destroyed"});break;case"start":P.start();break;case"stop":P.stop();break;case"seek":P.seek(O.data.param);break;case"pause":P.pause();break;case"resume":P.resume();break;case"logging_config":{var s=O.data.param;ye.applyConfig(s),s.enableCallback===!0?ye.addLogListener(B):ye.removeLogListener(B);break}}});function q(O,s){var f={msg:xe.INIT_SEGMENT,data:{type:O,data:s}};ie.postMessage(f,[s.data])}function ce(O,s){var f={msg:xe.MEDIA_SEGMENT,data:{type:O,data:s}};ie.postMessage(f,[s.data])}function Re(){var O={msg:xe.LOADING_COMPLETE};ie.postMessage(O)}function Ie(){var O={msg:xe.RECOVERED_EARLY_EOF};ie.postMessage(O)}function qe(O){var s={msg:xe.MEDIA_INFO,data:O};ie.postMessage(s)}function Je(O){var s={msg:xe.METADATA_ARRIVED,data:O};ie.postMessage(s)}function He(O){var s={msg:xe.SCRIPTDATA_ARRIVED,data:O};ie.postMessage(s)}function nt(O){var s={msg:xe.STATISTICS_INFO,data:O};ie.postMessage(s)}function Qe(O,s){ie.postMessage({msg:xe.IO_ERROR,data:{type:O,info:s}})}function We(O,s){ie.postMessage({msg:xe.DEMUX_ERROR,data:{type:O,info:s}})}function it(O){ie.postMessage({msg:xe.RECOMMEND_SEEKPOINT,data:O})}function $e(O,s){ie.postMessage({msg:"logcat_callback",data:{type:O,logcat:s}})}},bt=rt,Et=function(){function fe(ie,x){if(Object(Ne.a)(this,fe),this.TAG="Transmuxer",this._emitter=new g.a,x.enableWorker&&typeof Worker!="undefined")try{var P=ne("0r65");this._worker=P(bt),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[ie,x]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},ye.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:ye.getConfig()})}catch(q){y.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new Xe(ie,x)}else this._controller=new Xe(ie,x);if(this._controller){var B=this._controller;B.on(xe.IO_ERROR,this._onIOError.bind(this)),B.on(xe.DEMUX_ERROR,this._onDemuxError.bind(this)),B.on(xe.INIT_SEGMENT,this._onInitSegment.bind(this)),B.on(xe.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),B.on(xe.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),B.on(xe.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),B.on(xe.MEDIA_INFO,this._onMediaInfo.bind(this)),B.on(xe.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),B.on(xe.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),B.on(xe.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),B.on(xe.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Object(Pe.a)(fe,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),ye.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(x,P){this._emitter.addListener(x,P)}},{key:"off",value:function(x,P){this._emitter.removeListener(x,P)}},{key:"hasWorker",value:function(){return this._worker!=null}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(x){this._worker?this._worker.postMessage({cmd:"seek",param:x}):this._controller.seek(x)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(x,P){var B=this;Promise.resolve().then(function(){B._emitter.emit(xe.INIT_SEGMENT,x,P)})}},{key:"_onMediaSegment",value:function(x,P){var B=this;Promise.resolve().then(function(){B._emitter.emit(xe.MEDIA_SEGMENT,x,P)})}},{key:"_onLoadingComplete",value:function(){var x=this;Promise.resolve().then(function(){x._emitter.emit(xe.LOADING_COMPLETE)})}},{key:"_onRecoveredEarlyEof",value:function(){var x=this;Promise.resolve().then(function(){x._emitter.emit(xe.RECOVERED_EARLY_EOF)})}},{key:"_onMediaInfo",value:function(x){var P=this;Promise.resolve().then(function(){P._emitter.emit(xe.MEDIA_INFO,x)})}},{key:"_onMetaDataArrived",value:function(x){var P=this;Promise.resolve().then(function(){P._emitter.emit(xe.METADATA_ARRIVED,x)})}},{key:"_onScriptDataArrived",value:function(x){var P=this;Promise.resolve().then(function(){P._emitter.emit(xe.SCRIPTDATA_ARRIVED,x)})}},{key:"_onStatisticsInfo",value:function(x){var P=this;Promise.resolve().then(function(){P._emitter.emit(xe.STATISTICS_INFO,x)})}},{key:"_onIOError",value:function(x,P){var B=this;Promise.resolve().then(function(){B._emitter.emit(xe.IO_ERROR,x,P)})}},{key:"_onDemuxError",value:function(x,P){var B=this;Promise.resolve().then(function(){B._emitter.emit(xe.DEMUX_ERROR,x,P)})}},{key:"_onRecommendSeekpoint",value:function(x){var P=this;Promise.resolve().then(function(){P._emitter.emit(xe.RECOMMEND_SEEKPOINT,x)})}},{key:"_onLoggingConfigChanged",value:function(x){this._worker&&this._worker.postMessage({cmd:"logging_config",param:x})}},{key:"_onWorkerMessage",value:function(x){var P=x.data,B=P.data;if(P.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(P.msg){case xe.INIT_SEGMENT:case xe.MEDIA_SEGMENT:this._emitter.emit(P.msg,B.type,B.data);break;case xe.LOADING_COMPLETE:case xe.RECOVERED_EARLY_EOF:this._emitter.emit(P.msg);break;case xe.MEDIA_INFO:Object.setPrototypeOf(B,ae.prototype),this._emitter.emit(P.msg,B);break;case xe.METADATA_ARRIVED:case xe.SCRIPTDATA_ARRIVED:case xe.STATISTICS_INFO:this._emitter.emit(P.msg,B);break;case xe.IO_ERROR:case xe.DEMUX_ERROR:this._emitter.emit(P.msg,B.type,B.info);break;case xe.RECOMMEND_SEEKPOINT:this._emitter.emit(P.msg,B);break;case"logcat_callback":y.emitter.emit("log",B.type,B.logcat);break;default:break}}}]),fe}(),_t=Et,vt={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},et=vt,Ye=function(){function fe(ie){Object(Ne.a)(this,fe),this.TAG="MSEController",this._config=ie,this._emitter=new g.a,this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new Le}return Object(Pe.a)(fe,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(x,P){this._emitter.addListener(x,P)}},{key:"off",value:function(x,P){this._emitter.removeListener(x,P)}},{key:"attachMediaElement",value:function(x){if(this._mediaSource)throw new n("MediaSource has been attached to an HTMLMediaElement!");var P=this._mediaSource=new window.MediaSource;P.addEventListener("sourceopen",this.e.onSourceOpen),P.addEventListener("sourceended",this.e.onSourceEnded),P.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=x,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),x.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var x=this._mediaSource;for(var P in this._sourceBuffers){var B=this._pendingSegments[P];B.splice(0,B.length),this._pendingSegments[P]=null,this._pendingRemoveRanges[P]=null,this._lastInitSegments[P]=null;var q=this._sourceBuffers[P];if(q){if(x.readyState!=="closed"){try{x.removeSourceBuffer(q)}catch(ce){y.e(this.TAG,ce.message)}q.removeEventListener("error",this.e.onSourceBufferError),q.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[P]=null,this._sourceBuffers[P]=null}}if(x.readyState==="open")try{x.endOfStream()}catch(ce){y.e(this.TAG,ce.message)}x.removeEventListener("sourceopen",this.e.onSourceOpen),x.removeEventListener("sourceended",this.e.onSourceEnded),x.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(x,P){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(x),this._pendingSegments[x.type].push(x);return}var B=x,q="".concat(B.container);B.codec&&B.codec.length>0&&(q+=";codecs=".concat(B.codec));var ce=!1;if(y.v(this.TAG,"Received Initialization Segment, mimeType: "+q),this._lastInitSegments[B.type]=B,q!==this._mimeTypes[B.type]){if(this._mimeTypes[B.type])y.v(this.TAG,"Notice: ".concat(B.type," mimeType changed, origin: ").concat(this._mimeTypes[B.type],", target: ").concat(q));else{ce=!0;try{var Re=this._sourceBuffers[B.type]=this._mediaSource.addSourceBuffer(q);Re.addEventListener("error",this.e.onSourceBufferError),Re.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(Ie){y.e(this.TAG,Ie.message),this._emitter.emit(et.ERROR,{code:Ie.code,msg:Ie.message});return}}this._mimeTypes[B.type]=q}P||this._pendingSegments[B.type].push(B),ce||this._sourceBuffers[B.type]&&!this._sourceBuffers[B.type].updating&&this._doAppendSegments(),S.safari&&B.container==="audio/mpeg"&&B.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=B.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(x){var P=x;this._pendingSegments[P.type].push(P),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var B=this._sourceBuffers[P.type];B&&!B.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}},{key:"seek",value:function(x){for(var P in this._sourceBuffers){if(!this._sourceBuffers[P])continue;var B=this._sourceBuffers[P];if(this._mediaSource.readyState==="open")try{B.abort()}catch(Je){y.e(this.TAG,Je.message)}this._idrList.clear();var q=this._pendingSegments[P];if(q.splice(0,q.length),this._mediaSource.readyState==="closed")continue;for(var ce=0;ce<B.buffered.length;ce++){var Re=B.buffered.start(ce),Ie=B.buffered.end(ce);this._pendingRemoveRanges[P].push({start:Re,end:Ie})}if(B.updating||this._doRemoveRanges(),S.safari){var qe=this._lastInitSegments[P];qe&&(this._pendingSegments[P].push(qe),B.updating||this._doAppendSegments())}}}},{key:"endOfStream",value:function(){var x=this._mediaSource,P=this._sourceBuffers;if(!x||x.readyState!=="open"){x&&x.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}P.video&&P.video.updating||P.audio&&P.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,x.endOfStream())}},{key:"getNearestKeyframe",value:function(x){return this._idrList.getLastSyncPointBeforeDts(x)}},{key:"_needCleanupSourceBuffer",value:function(){if(!this._config.autoCleanupSourceBuffer)return!1;var x=this._mediaElement.currentTime;for(var P in this._sourceBuffers){var B=this._sourceBuffers[P];if(B){var q=B.buffered;if(q.length>=1&&x-q.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var x=this._mediaElement.currentTime;for(var P in this._sourceBuffers){var B=this._sourceBuffers[P];if(B){for(var q=B.buffered,ce=!1,Re=0;Re<q.length;Re++){var Ie=q.start(Re),qe=q.end(Re);if(Ie<=x&&x<qe+3){if(x-Ie>=this._config.autoCleanupMaxBackwardDuration){ce=!0;var Je=x-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[P].push({start:Ie,end:Je})}}else qe<x&&(ce=!0,this._pendingRemoveRanges[P].push({start:Ie,end:qe}))}ce&&!B.updating&&this._doRemoveRanges()}}}},{key:"_updateMediaSourceDuration",value:function(){var x=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open")return;if(x.video&&x.video.updating||x.audio&&x.audio.updating)return;var P=this._mediaSource.duration,B=this._pendingMediaDuration;B>0&&(isNaN(P)||B>P)&&(y.v(this.TAG,"Update MediaSource duration from ".concat(P," to ").concat(B)),this._mediaSource.duration=B),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},{key:"_doRemoveRanges",value:function(){for(var x in this._pendingRemoveRanges){if(!this._sourceBuffers[x]||this._sourceBuffers[x].updating)continue;for(var P=this._sourceBuffers[x],B=this._pendingRemoveRanges[x];B.length&&!P.updating;){var q=B.shift();P.remove(q.start,q.end)}}}},{key:"_doAppendSegments",value:function(){var x=this._pendingSegments;for(var P in x){if(!this._sourceBuffers[P]||this._sourceBuffers[P].updating)continue;if(x[P].length>0){var B=x[P].shift();if(B.timestampOffset){var q=this._sourceBuffers[P].timestampOffset,ce=B.timestampOffset/1e3,Re=Math.abs(q-ce);Re>.1&&(y.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(q," to ").concat(ce)),this._sourceBuffers[P].timestampOffset=ce),delete B.timestampOffset}if(!B.data||B.data.byteLength===0)continue;try{this._sourceBuffers[P].appendBuffer(B.data),this._isBufferFull=!1,P==="video"&&B.hasOwnProperty("info")&&this._idrList.appendArray(B.info.syncPoints)}catch(Ie){this._pendingSegments[P].unshift(B),Ie.code===22?(this._isBufferFull||this._emitter.emit(et.BUFFER_FULL),this._isBufferFull=!0):(y.e(this.TAG,Ie.message),this._emitter.emit(et.ERROR,{code:Ie.code,msg:Ie.message}))}}}}},{key:"_onSourceOpen",value:function(){if(y.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var x=this._pendingSourceBufferInit;x.length;){var P=x.shift();this.appendInitSegment(P,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(et.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){y.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){y.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var x=this._pendingSegments;return x.video.length>0||x.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var x=this._pendingRemoveRanges;return x.video.length>0||x.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(et.UPDATE_END)}},{key:"_onSourceBufferError",value:function(x){y.e(this.TAG,"SourceBuffer Error: ".concat(x))}}]),fe}(),ut=Ye,st={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},gt={NETWORK_EXCEPTION:i.EXCEPTION,NETWORK_STATUS_CODE_INVALID:i.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:i.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:i.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:A.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:A.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:A.CODEC_UNSUPPORTED},yt=function(){function fe(ie,x){if(Object(Ne.a)(this,fe),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new g.a,this._config=Q(),typeof x=="object"&&Object.assign(this._config,x),ie.type.toLowerCase()!=="flv")throw new a("FlvPlayer requires an flv MediaDataSource input!");ie.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=ie,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var P=S.chrome&&(S.version.major<50||S.version.major===50&&S.version.build<2661);this._alwaysSeekKeyframe=!!(P||S.msedge||S.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Object(Pe.a)(fe,[{key:"destroy",value:function(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(x,P){var B=this;x===Ae.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){B._emitter.emit(Ae.MEDIA_INFO,B.mediaInfo)}):x===Ae.STATISTICS_INFO&&(this._statisticsInfo!=null&&Promise.resolve().then(function(){B._emitter.emit(Ae.STATISTICS_INFO,B.statisticsInfo)})),this._emitter.addListener(x,P)}},{key:"off",value:function(x,P){this._emitter.removeListener(x,P)}},{key:"attachMediaElement",value:function(x){var P=this;if(this._mediaElement=x,x.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),x.addEventListener("seeking",this.e.onvSeeking),x.addEventListener("canplay",this.e.onvCanPlay),x.addEventListener("stalled",this.e.onvStalled),x.addEventListener("progress",this.e.onvProgress),this._msectl=new ut(this._config),this._msectl.on(et.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(et.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(et.SOURCE_OPEN,function(){P._mseSourceOpened=!0,P._hasPendingLoad&&(P._hasPendingLoad=!1,P.load())}),this._msectl.on(et.ERROR,function(B){P._emitter.emit(Ae.ERROR,st.MEDIA_ERROR,gt.MEDIA_MSE_ERROR,B)}),this._msectl.attachMediaElement(x),this._pendingSeekTime!=null)try{x.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(B){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var x=this;if(!this._mediaElement)throw new n("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new n("FlvPlayer.load() has been called, please call unload() first!");if(this._hasPendingLoad)return;if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new _t(this._mediaDataSource,this._config),this._transmuxer.on(xe.INIT_SEGMENT,function(P,B){x._msectl.appendInitSegment(B)}),this._transmuxer.on(xe.MEDIA_SEGMENT,function(P,B){if(x._msectl.appendMediaSegment(B),x._config.lazyLoad&&!x._config.isLive){var q=x._mediaElement.currentTime;B.info.endDts>=(q+x._config.lazyLoadMaxDuration)*1e3&&(x._progressChecker==null&&(y.v(x.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),x._suspendTransmuxer()))}}),this._transmuxer.on(xe.LOADING_COMPLETE,function(){x._msectl.endOfStream(),x._emitter.emit(Ae.LOADING_COMPLETE)}),this._transmuxer.on(xe.RECOVERED_EARLY_EOF,function(){x._emitter.emit(Ae.RECOVERED_EARLY_EOF)}),this._transmuxer.on(xe.IO_ERROR,function(P,B){x._emitter.emit(Ae.ERROR,st.NETWORK_ERROR,P,B)}),this._transmuxer.on(xe.DEMUX_ERROR,function(P,B){x._emitter.emit(Ae.ERROR,st.MEDIA_ERROR,P,{code:-1,msg:B})}),this._transmuxer.on(xe.MEDIA_INFO,function(P){x._mediaInfo=P,x._emitter.emit(Ae.MEDIA_INFO,Object.assign({},P))}),this._transmuxer.on(xe.METADATA_ARRIVED,function(P){x._emitter.emit(Ae.METADATA_ARRIVED,P)}),this._transmuxer.on(xe.SCRIPTDATA_ARRIVED,function(P){x._emitter.emit(Ae.SCRIPTDATA_ARRIVED,P)}),this._transmuxer.on(xe.STATISTICS_INFO,function(P){x._statisticsInfo=x._fillStatisticsInfo(P),x._emitter.emit(Ae.STATISTICS_INFO,Object.assign({},x._statisticsInfo))}),this._transmuxer.on(xe.RECOMMEND_SEEKPOINT,function(P){x._mediaElement&&!x._config.accurateSeek&&(x._requestSetTime=!0,x._mediaElement.currentTime=P/1e3)}),this._transmuxer.open()}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(x){this._mediaElement.volume=x}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(x){this._mediaElement.muted=x}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(x){this._mediaElement?this._internalSeek(x):this._pendingSeekTime=x}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}},{key:"_fillStatisticsInfo",value:function(x){if(x.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return x;var P=!0,B=0,q=0;if(this._mediaElement.getVideoPlaybackQuality){var ce=this._mediaElement.getVideoPlaybackQuality();B=ce.totalVideoFrames,q=ce.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(B=this._mediaElement.webkitDecodedFrameCount,q=this._mediaElement.webkitDroppedFrameCount):P=!1;return P&&(x.decodedFrames=B,x.droppedFrames=q),x}},{key:"_onmseUpdateEnd",value:function(){if(!this._config.lazyLoad||this._config.isLive)return;for(var x=this._mediaElement.buffered,P=this._mediaElement.currentTime,B=0,q=0,ce=0;ce<x.length;ce++){var Re=x.start(ce),Ie=x.end(ce);if(Re<=P&&P<Ie){B=Re,q=Ie;break}}q>=P+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(y.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},{key:"_onmseBufferFull",value:function(){y.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var x=this._mediaElement.currentTime,P=this._mediaElement.buffered,B=!1,q=0;q<P.length;q++){var ce=P.start(q),Re=P.end(q);if(x>=ce&&x<Re){x>=Re-this._config.lazyLoadRecoverDuration&&(B=!0);break}}B&&(window.clearInterval(this._progressChecker),this._progressChecker=null,B&&(y.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(x){for(var P=this._mediaElement.buffered,B=0;B<P.length;B++){var q=P.start(B),ce=P.end(B);if(x>=q&&x<ce)return!0}return!1}},{key:"_internalSeek",value:function(x){var P=this._isTimepointBuffered(x),B=!1,q=0;if(x<1&&this._mediaElement.buffered.length>0){var ce=this._mediaElement.buffered.start(0);(ce<1&&x<ce||S.safari)&&(B=!0,q=S.safari?.1:ce)}if(B)this._requestSetTime=!0,this._mediaElement.currentTime=q;else if(P){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=x;else{var Re=this._msectl.getNearestKeyframe(Math.floor(x*1e3));this._requestSetTime=!0,Re!=null?this._mediaElement.currentTime=Re.dts/1e3:this._mediaElement.currentTime=x}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(x),this._transmuxer.seek(Math.floor(x*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=x)}},{key:"_checkAndApplyUnbufferedSeekpoint",value:function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var x=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(x)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(x),this._transmuxer.seek(Math.floor(x*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=x))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_checkAndResumeStuckPlayback",value:function(x){var P=this._mediaElement;if(x||!this._receivedCanPlay||P.readyState<2){var B=P.buffered;B.length>0&&P.currentTime<B.start(0)&&(y.w(this.TAG,"Playback seems stuck at ".concat(P.currentTime,", seek to ").concat(B.start(0))),this._requestSetTime=!0,this._mediaElement.currentTime=B.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}},{key:"_onvLoadedMetadata",value:function(x){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}},{key:"_onvSeeking",value:function(x){var P=this._mediaElement.currentTime,B=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(P<1&&B.length>0){var q=B.start(0);if(q<1&&P<q||S.safari){this._requestSetTime=!0,this._mediaElement.currentTime=S.safari?.1:q;return}}if(this._isTimepointBuffered(P)){if(this._alwaysSeekKeyframe){var ce=this._msectl.getNearestKeyframe(Math.floor(P*1e3));ce!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=ce.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:P,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_onvCanPlay",value:function(x){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}},{key:"_onvStalled",value:function(x){this._checkAndResumeStuckPlayback(!0)}},{key:"_onvProgress",value:function(x){this._checkAndResumeStuckPlayback()}}]),fe}(),ft=yt,xt=function(){function fe(ie,x){if(Object(Ne.a)(this,fe),this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new g.a,this._config=Q(),typeof x=="object"&&Object.assign(this._config,x),ie.type.toLowerCase()==="flv")throw new a("NativePlayer does't support flv MediaDataSource input!");if(ie.hasOwnProperty("segments"))throw new a("NativePlayer(".concat(ie.type,") doesn't support multipart playback!"));this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=ie,this._mediaElement=null}return Object(Pe.a)(fe,[{key:"destroy",value:function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(x,P){var B=this;x===Ae.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){B._emitter.emit(Ae.MEDIA_INFO,B.mediaInfo)}):x===Ae.STATISTICS_INFO&&(this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){B._emitter.emit(Ae.STATISTICS_INFO,B.statisticsInfo)})),this._emitter.addListener(x,P)}},{key:"off",value:function(x,P){this._emitter.removeListener(x,P)}},{key:"attachMediaElement",value:function(x){if(this._mediaElement=x,x.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{x.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(P){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"load",value:function(){if(!this._mediaElement)throw new n("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(x){this._mediaElement.volume=x}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(x){this._mediaElement.muted=x}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(x){this._mediaElement?this._mediaElement.currentTime=x:this._pendingSeekTime=x}},{key:"mediaInfo",get:function(){var x=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",P={mimeType:x+this._mediaDataSource.type};return this._mediaElement&&(P.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(P.width=this._mediaElement.videoWidth,P.height=this._mediaElement.videoHeight)),P}},{key:"statisticsInfo",get:function(){var x={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return x;var P=!0,B=0,q=0;if(this._mediaElement.getVideoPlaybackQuality){var ce=this._mediaElement.getVideoPlaybackQuality();B=ce.totalVideoFrames,q=ce.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(B=this._mediaElement.webkitDecodedFrameCount,q=this._mediaElement.webkitDroppedFrameCount):P=!1;return P&&(x.decodedFrames=B,x.droppedFrames=q),x}},{key:"_onvLoadedMetadata",value:function(x){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(Ae.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(Ae.STATISTICS_INFO,this.statisticsInfo)}}]),fe}(),At=xt;l.install();function at(fe,ie){var x=fe;if(x==null||typeof x!="object")throw new a("MediaDataSource must be an javascript object!");if(!x.hasOwnProperty("type"))throw new a("MediaDataSource must has type field to indicate video file type!");switch(x.type){case"flv":return new ft(x,ie);default:return new At(x,ie)}}function pt(){return we.supportMSEH264Playback()}function ct(){return we.getFeatureList()}var dt={};dt.createPlayer=at,dt.isSupported=pt,dt.getFeatureList=ct,dt.BaseLoader=v,dt.LoaderStatus=d,dt.LoaderErrors=i,dt.Events=Ae,dt.ErrorTypes=st,dt.ErrorDetails=gt,dt.FlvPlayer=ft,dt.NativePlayer=At,dt.LoggingControl=ye,Object.defineProperty(dt,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Ct=Me.a=dt},GfqC:function(lt,Me,ne){"use strict";var Ne=ne("q1tI"),Pe=ne.n(Ne),De=ne("TSYQ"),l=ne.n(De);function R(se,H){var he="cannot "+se.method+" "+se.action+" "+H.status+"'",Z=new Error(he);return Z.status=H.status,Z.method=se.method,Z.url=se.action,Z}function g(se){var H=se.responseText||se.response;if(!H)return H;try{return JSON.parse(H)}catch(he){return H}}function m(se){var H=new XMLHttpRequest;se.onProgress&&H.upload&&(H.upload.onprogress=function(V){V.total>0&&(V.percent=V.loaded/V.total*100),se.onProgress(V)});var he=new FormData;se.data&&Object.keys(se.data).forEach(function($){var V=se.data[$];if(Array.isArray(V)){V.forEach(function(X){he.append($+"[]",X)});return}he.append($,se.data[$])}),se.file instanceof Blob?he.append(se.filename,se.file,se.file.name):he.append(se.filename,se.file),H.onerror=function(V){se.onError(V)},H.onload=function(){return H.status<200||H.status>=300?se.onError(R(se,H),g(H)):se.onSuccess(g(H),H)},H.open(se.method,se.action,!0),se.withCredentials&&"withCredentials"in H&&(H.withCredentials=!0);var Z=se.headers||{};return Z["X-Requested-With"]!==null&&H.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(Z).forEach(function($){Z[$]!==null&&H.setRequestHeader($,Z[$])}),H.send(he),{abort:function(){H.abort()}}}var y=+new Date,c=0;function o(){return"rc-upload-"+y+"-"+ ++c}function u(se,H){return se.indexOf(H,se.length-H.length)!==-1}var r=function(se,H){if(se&&H){var he=Array.isArray(H)?H:H.split(","),Z=se.name||"",$=se.type||"",V=$.replace(/\/.*$/,"");return he.some(function(X){var Q=X.trim();return Q.charAt(0)==="."?u(Z.toLowerCase(),Q.toLowerCase()):/\/\*$/.test(Q)?V===Q.replace(/\/.*$/,""):$===Q})}return!0};function e(se,H){var he=se.createReader(),Z=[];function $(){he.readEntries(function(V){var X=Array.prototype.slice.apply(V);Z=Z.concat(X);var Q=!X.length;Q?H(Z):$()})}$()}var n=function(H,he,Z){var $=function V(X,Q){Q=Q||"",X.isFile?X.file(function(oe){Z(oe)&&(X.fullPath&&!oe.webkitRelativePath&&(Object.defineProperties(oe,{webkitRelativePath:{writable:!0}}),oe.webkitRelativePath=X.fullPath.replace(/^\//,""),Object.defineProperties(oe,{webkitRelativePath:{writable:!1}})),he([oe]))}):X.isDirectory&&e(X,function(oe){oe.forEach(function(we){V(we,""+Q+X.name+"/")})})};H.forEach(function(V){$(V.webkitGetAsEntry())})},a=n,p=Object.assign||function(se){for(var H=1;H<arguments.length;H++){var he=arguments[H];for(var Z in he)Object.prototype.hasOwnProperty.call(he,Z)&&(se[Z]=he[Z])}return se},d=function(){function se(H,he){var Z=[],$=!0,V=!1,X=void 0;try{for(var Q=H[Symbol.iterator](),oe;!($=(oe=Q.next()).done)&&!(Z.push(oe.value),he&&Z.length===he);$=!0);}catch(we){V=!0,X=we}finally{try{!$&&Q.return&&Q.return()}finally{if(V)throw X}}return Z}return function(H,he){if(Array.isArray(H))return H;if(Symbol.iterator in Object(H))return se(H,he);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function se(H,he){for(var Z=0;Z<he.length;Z++){var $=he[Z];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(H,$.key,$)}}return function(H,he,Z){return he&&se(H.prototype,he),Z&&se(H,Z),H}}();function v(se,H,he){return H in se?Object.defineProperty(se,H,{value:he,enumerable:!0,configurable:!0,writable:!0}):se[H]=he,se}function b(se,H){var he={};for(var Z in se){if(H.indexOf(Z)>=0)continue;if(!Object.prototype.hasOwnProperty.call(se,Z))continue;he[Z]=se[Z]}return he}function _(se,H){if(!(se instanceof H))throw new TypeError("Cannot call a class as a function")}function w(se,H){if(!se)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return H&&(typeof H=="object"||typeof H=="function")?H:se}function T(se,H){if(typeof H!="function"&&H!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof H);se.prototype=Object.create(H&&H.prototype,{constructor:{value:se,enumerable:!1,writable:!0,configurable:!0}}),H&&(Object.setPrototypeOf?Object.setPrototypeOf(se,H):se.__proto__=H)}var C=function(H){return Object.keys(H).reduce(function(he,Z){return(Z.substr(0,5)==="data-"||Z.substr(0,5)==="aria-"||Z==="role")&&(he[Z]=H[Z]),he},{})},S=function(se){T(H,se);function H(){var he,Z,$,V;_(this,H);for(var X=arguments.length,Q=Array(X),oe=0;oe<X;oe++)Q[oe]=arguments[oe];return V=(Z=($=w(this,(he=H.__proto__||Object.getPrototypeOf(H)).call.apply(he,[this].concat(Q))),$),$.state={uid:o()},$.reqs={},$.onChange=function(we){var ge=we.target.files;$.uploadFiles(ge),$.reset()},$.onClick=function(we){var ge=$.fileInput;if(!ge)return;var Ae=$.props,me=Ae.children,ye=Ae.onClick;me&&me.type==="button"&&(ge.parentNode.focus(),ge.parentNode.querySelector("button").blur()),ge.click(),ye&&ye(we)},$.onKeyDown=function(we){we.key==="Enter"&&$.onClick()},$.onFileDrop=function(we){var ge=$.props.multiple;if(we.preventDefault(),we.type==="dragover")return;if($.props.directory)a(Array.prototype.slice.call(we.dataTransfer.items),$.uploadFiles,function(me){return r(me,$.props.accept)});else{var Ae=Array.prototype.slice.call(we.dataTransfer.files).filter(function(me){return r(me,$.props.accept)});ge===!1&&(Ae=Ae.slice(0,1)),$.uploadFiles(Ae)}},$.uploadFiles=function(we){var ge=Array.prototype.slice.call(we);ge.map(function(Ae){return Ae.uid=o(),Ae}).forEach(function(Ae){$.upload(Ae,ge)})},$.saveFileInput=function(we){$.fileInput=we},Z),w($,V)}return i(H,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(Z,$){var V=this,X=this.props;if(!X.beforeUpload)return setTimeout(function(){return V.post(Z)},0);var Q=X.beforeUpload(Z,$);Q&&Q.then?Q.then(function(oe){var we=Object.prototype.toString.call(oe);return we==="[object File]"||we==="[object Blob]"?V.post(oe):V.post(Z)}).catch(function(oe){console.log(oe)}):Q!==!1&&setTimeout(function(){return V.post(Z)},0);return}},{key:"post",value:function(Z){var $=this;if(!this._isMounted)return;var V=this.props,X=V.onStart,Q=V.onProgress,oe=V.transformFile,we=oe===void 0?function(ge){return ge}:oe;new Promise(function(ge){var Ae=V.action;return typeof Ae=="function"&&(Ae=Ae(Z)),ge(Ae)}).then(function(ge){var Ae=Z.uid,me=V.customRequest||m,ye=Promise.resolve(we(Z)).then(function(ue){var ae=V.data;return typeof ae=="function"&&(ae=ae(ue)),Promise.all([ue,ae])}).catch(function(ue){console.error(ue)});ye.then(function(ue){var ae=d(ue,2),ee=ae[0],Ee=ae[1],F={action:ge,filename:V.name,data:Ee,file:ee,headers:V.headers,withCredentials:V.withCredentials,method:V.method||"post",onProgress:Q?function(j){Q(j,Z)}:null,onSuccess:function(de,be){delete $.reqs[Ae],V.onSuccess(de,Z,be)},onError:function(de,be){delete $.reqs[Ae],V.onError(de,be,Z)}};X(Z),$.reqs[Ae]=me(F)})})}},{key:"reset",value:function(){this.setState({uid:o()})}},{key:"abort",value:function(Z){var $=this.reqs;if(Z){var V=Z;Z&&Z.uid&&(V=Z.uid),$[V]&&$[V].abort&&$[V].abort(),delete $[V]}else Object.keys($).forEach(function(X){$[X]&&$[X].abort&&$[X].abort(),delete $[X]})}},{key:"render",value:function(){var Z,$=this.props,V=$.component,X=$.prefixCls,Q=$.className,oe=$.disabled,we=$.id,ge=$.style,Ae=$.multiple,me=$.accept,ye=$.children,ue=$.directory,ae=$.openFileDialogOnClick,ee=$.onMouseEnter,Ee=$.onMouseLeave,F=b($,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),j=l()((Z={},v(Z,X,!0),v(Z,X+"-disabled",oe),v(Z,Q,Q),Z)),de=oe?{}:{onClick:ae?this.onClick:function(){},onKeyDown:ae?this.onKeyDown:function(){},onMouseEnter:ee,onMouseLeave:Ee,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return Pe.a.createElement(V,p({},de,{className:j,role:"button",style:ge}),Pe.a.createElement("input",p({},C(F),{id:we,type:"file",ref:this.saveFileInput,onClick:function(Te){return Te.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:me,directory:ue?"directory":null,webkitdirectory:ue?"webkitdirectory":null,multiple:Ae,onChange:this.onChange})),ye)}}]),H}(Ne.Component),W=S,N=Object.assign||function(se){for(var H=1;H<arguments.length;H++){var he=arguments[H];for(var Z in he)Object.prototype.hasOwnProperty.call(he,Z)&&(se[Z]=he[Z])}return se},E=function(){function se(H,he){for(var Z=0;Z<he.length;Z++){var $=he[Z];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(H,$.key,$)}}return function(H,he,Z){return he&&se(H.prototype,he),Z&&se(H,Z),H}}();function K(se,H){if(!(se instanceof H))throw new TypeError("Cannot call a class as a function")}function z(se,H){if(!se)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return H&&(typeof H=="object"||typeof H=="function")?H:se}function M(se,H){if(typeof H!="function"&&H!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof H);se.prototype=Object.create(H&&H.prototype,{constructor:{value:se,enumerable:!1,writable:!0,configurable:!0}}),H&&(Object.setPrototypeOf?Object.setPrototypeOf(se,H):se.__proto__=H)}function G(){}var J=function(se){M(H,se);function H(){var he,Z,$,V;K(this,H);for(var X=arguments.length,Q=Array(X),oe=0;oe<X;oe++)Q[oe]=arguments[oe];return V=(Z=($=z(this,(he=H.__proto__||Object.getPrototypeOf(H)).call.apply(he,[this].concat(Q))),$),$.saveUploader=function(we){$.uploader=we},Z),z($,V)}return E(H,[{key:"abort",value:function(Z){this.uploader.abort(Z)}},{key:"render",value:function(){return Pe.a.createElement(W,N({},this.props,{ref:this.saveUploader}))}}]),H}(Ne.Component);J.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:G,onError:G,onSuccess:G,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var te=J,re=Me.a=te},Gytx:function(lt,Me){lt.exports=function(Ne,Pe,De,l){var R=De?De.call(l,Ne,Pe):void 0;if(R!==void 0)return!!R;if(Ne===Pe)return!0;if(typeof Ne!="object"||!Ne||typeof Pe!="object"||!Pe)return!1;var g=Object.keys(Ne),m=Object.keys(Pe);if(g.length!==m.length)return!1;for(var y=Object.prototype.hasOwnProperty.bind(Pe),c=0;c<g.length;c++){var o=g[c];if(!y(o))return!1;var u=Ne[o],r=Pe[o];if(R=De?De.call(l,u,r,o):void 0,R===!1||R===void 0&&u!==r)return!1}return!0}},J66h:function(lt,Me,ne){(function(Ne){var Pe,De;(function(l,R){lt.exports=R(l)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Ne!="undefined"?Ne:this,function(l){"use strict";l=l||{};var R=l.Base64,g="2.6.4",m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=function(G){for(var J={},te=0,re=G.length;te<re;te++)J[G.charAt(te)]=te;return J}(m),c=String.fromCharCode,o=function(G){if(G.length<2){var J=G.charCodeAt(0);return J<128?G:J<2048?c(192|J>>>6)+c(128|J&63):c(224|J>>>12&15)+c(128|J>>>6&63)+c(128|J&63)}else{var J=65536+(G.charCodeAt(0)-55296)*1024+(G.charCodeAt(1)-56320);return c(240|J>>>18&7)+c(128|J>>>12&63)+c(128|J>>>6&63)+c(128|J&63)}},u=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,r=function(G){return G.replace(u,o)},e=function(G){var J=[0,2,1][G.length%3],te=G.charCodeAt(0)<<16|(G.length>1?G.charCodeAt(1):0)<<8|(G.length>2?G.charCodeAt(2):0),re=[m.charAt(te>>>18),m.charAt(te>>>12&63),J>=2?"=":m.charAt(te>>>6&63),J>=1?"=":m.charAt(te&63)];return re.join("")},n=l.btoa&&typeof l.btoa=="function"?function(G){return l.btoa(G)}:function(G){if(G.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return G.replace(/[\s\S]{1,3}/g,e)},a=function(G){return n(r(String(G)))},p=function(G){return G.replace(/[+\/]/g,function(J){return J=="+"?"-":"_"}).replace(/=/g,"")},d=function(G,J){return J?p(a(G)):a(G)},i=function(G){return d(G,!0)},v;l.Uint8Array&&(v=function(G,J){for(var te="",re=0,se=G.length;re<se;re+=3){var H=G[re],he=G[re+1],Z=G[re+2],$=H<<16|he<<8|Z;te+=m.charAt($>>>18)+m.charAt($>>>12&63)+(typeof he!="undefined"?m.charAt($>>>6&63):"=")+(typeof Z!="undefined"?m.charAt($&63):"=")}return J?p(te):te});var b=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,_=function(G){switch(G.length){case 4:var J=(7&G.charCodeAt(0))<<18|(63&G.charCodeAt(1))<<12|(63&G.charCodeAt(2))<<6|63&G.charCodeAt(3),te=J-65536;return c((te>>>10)+55296)+c((te&1023)+56320);case 3:return c((15&G.charCodeAt(0))<<12|(63&G.charCodeAt(1))<<6|63&G.charCodeAt(2));default:return c((31&G.charCodeAt(0))<<6|63&G.charCodeAt(1))}},w=function(G){return G.replace(b,_)},T=function(G){var J=G.length,te=J%4,re=(J>0?y[G.charAt(0)]<<18:0)|(J>1?y[G.charAt(1)]<<12:0)|(J>2?y[G.charAt(2)]<<6:0)|(J>3?y[G.charAt(3)]:0),se=[c(re>>>16),c(re>>>8&255),c(re&255)];return se.length-=[0,0,2,1][te],se.join("")},C=l.atob&&typeof l.atob=="function"?function(G){return l.atob(G)}:function(G){return G.replace(/\S{1,4}/g,T)},S=function(G){return C(String(G).replace(/[^A-Za-z0-9\+\/]/g,""))},W=function(G){return w(C(G))},N=function(G){return String(G).replace(/[-_]/g,function(J){return J=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},E=function(G){return W(N(G))},K;l.Uint8Array&&(K=function(G){return Uint8Array.from(S(N(G)),function(J){return J.charCodeAt(0)})});var z=function(){var G=l.Base64;return l.Base64=R,G};if(l.Base64={VERSION:g,atob:S,btoa:n,fromBase64:E,toBase64:d,utob:r,encode:d,encodeURI:i,btou:w,decode:E,noConflict:z,fromUint8Array:v,toUint8Array:K},typeof Object.defineProperty=="function"){var M=function(G){return{value:G,enumerable:!1,writable:!0,configurable:!0}};l.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",M(function(){return E(this)})),Object.defineProperty(String.prototype,"toBase64",M(function(G){return d(this,G)})),Object.defineProperty(String.prototype,"toBase64URI",M(function(){return d(this,!0)}))}}return l.Meteor&&(Base64=l.Base64),lt.exports?lt.exports.Base64=l.Base64:!(Pe=[],De=function(){return l.Base64}.apply(Me,Pe),De!==void 0&&(lt.exports=De)),{Base64:l.Base64}})}).call(this,ne("IyRk"))},JYp7:function(lt,Me,ne){"use strict";ne.d(Me,"c",function(){return Pe}),ne.d(Me,"d",function(){return De}),ne.d(Me,"f",function(){return R}),ne.d(Me,"a",function(){return g}),ne.d(Me,"b",function(){return m}),ne.d(Me,"e",function(){return y});var Ne=function(){var c=function(o,u){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n])},c(o,u)};return function(o,u){c(o,u);function r(){this.constructor=o}o.prototype=u===null?Object.create(u):(r.prototype=u.prototype,new r)}}(),Pe={done:!0,value:void 0},De;(function(c){var o={next:function(){return Pe}};function u(){return o}c.empty=u;function r(w){var T=!1;return{next:function(){return T?Pe:(T=!0,{done:!1,value:w})}}}c.single=r;function e(w,T,C){return T===void 0&&(T=0),C===void 0&&(C=w.length),{next:function(){return T>=C?Pe:{done:!1,value:w[T++]}}}}c.fromArray=e;function n(w){return{next:function(){var T=w.next();return T.done?Pe:{done:!1,value:T.value}}}}c.fromNativeIterator=n;function a(w){return w?Array.isArray(w)?c.fromArray(w):w:c.empty()}c.from=a;function p(w,T){return{next:function(){var C=w.next();return C.done?Pe:{done:!1,value:T(C.value)}}}}c.map=p;function d(w,T){return{next:function(){for(;;){var C=w.next();if(C.done)return Pe;if(T(C.value))return{done:!1,value:C.value}}}}}c.filter=d;function i(w,T){for(var C=w.next();!C.done;C=w.next())T(C.value)}c.forEach=i;function v(w,T){T===void 0&&(T=Number.POSITIVE_INFINITY);var C=[];if(T===0)return C;for(var S=0,W=w.next();!W.done&&!(C.push(W.value),++S>=T);W=w.next());return C}c.collect=v;function b(){for(var w=[],T=0;T<arguments.length;T++)w[T]=arguments[T];var C=0;return{next:function(){if(C>=w.length)return Pe;var S=w[C],W=S.next();return W.done?(C++,this.next()):W}}}c.concat=b;function _(w){return new l(w)}c.chain=_})(De||(De={}));var l=function(){function c(o){this.it=o}return c.prototype.next=function(){return this.it.next()},c}();function R(c){return Array.isArray(c)?De.fromArray(c):c||De.empty()}var g=function(){function c(o,u,r,e){u===void 0&&(u=0),r===void 0&&(r=o.length),e===void 0&&(e=u-1),this.items=o,this.start=u,this.end=r,this.index=e}return c.prototype.first=function(){return this.index=this.start,this.current()},c.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},c.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},c}(),m=function(c){Ne(o,c);function o(u,r,e,n){return r===void 0&&(r=0),e===void 0&&(e=u.length),n===void 0&&(n=r-1),c.call(this,u,r,e,n)||this}return o.prototype.current=function(){return c.prototype.current.call(this)},o.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},o.prototype.first=function(){return this.index=this.start,this.current()},o.prototype.last=function(){return this.index=this.end-1,this.current()},o.prototype.parent=function(){return null},o}(g),y=function(){function c(o,u){this.iterator=o,this.fn=u}return c.prototype.next=function(){return this.fn(this.iterator.next())},c}()},JqQi:function(lt,Me,ne){lt.exports={bg:"bg___31owl",container:"container___2NGOo"}},LdHM:function(lt,Me,ne){"use strict";ne.d(Me,"b",function(){return b}),ne.d(Me,"a",function(){return w});var Ne=ne("1OyB"),Pe=ne("vuIU"),De=ne("Ji7U"),l=ne("LK+K"),R=ne("q1tI"),g=ne("rePB"),m=ne("Ff2n"),y=ne("ODXe"),c=ne("4IlW"),o=ne("bX4T"),u=ne("YrtM"),r=ne("TSYQ"),e=ne.n(r),n=ne("+nKL"),a=ne("8OUc"),p=function(Z,$){var V=Z.prefixCls,X=Z.id,Q=Z.flattenOptions,oe=Z.childrenAsData,we=Z.values,ge=Z.searchValue,Ae=Z.multiple,me=Z.defaultActiveFirstOption,ye=Z.height,ue=Z.itemHeight,ae=Z.notFoundContent,ee=Z.open,Ee=Z.menuItemSelectedIcon,F=Z.virtual,j=Z.onSelect,de=Z.onToggleOpen,be=Z.onActiveValue,Te=Z.onScroll,I=Z.onMouseEnter,t="".concat(V,"-item"),h=Object(u.a)(function(){return Q},[ee,Q],function(je,ke){return ke[0]&&je[1]!==ke[1]}),L=R.useRef(null),A=function(ke){ke.preventDefault()},k=function(ke){L.current&&L.current.scrollTo({index:ke})},le=function(ke){for(var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Oe=h.length,pe=0;pe<Oe;pe+=1){var ve=(ke+pe*Le+Oe)%Oe,Ce=h[ve],xe=Ce.group,Ue=Ce.data;if(!xe&&!Ue.disabled)return ve}return-1},_e=R.useState(function(){return le(0)}),Ge=Object(y.a)(_e,2),ze=Ge[0],Fe=Ge[1],Ke=function(ke){Fe(ke);var Le=h[ke];if(!Le){be(null,-1);return}be(Le.data.value,ke)};R.useEffect(function(){Ke(me!==!1?le(0):-1)},[h.length,ge]),R.useEffect(function(){var je=setTimeout(function(){if(!Ae&&ee&&we.size===1){var ke=Array.from(we)[0],Le=h.findIndex(function(Oe){var pe=Oe.data;return pe.value===ke});Ke(Le),k(Le)}});return function(){return clearTimeout(je)}},[ee]);var ot=function(ke){ke!==void 0&&j(ke,{selected:!we.has(ke)}),Ae||de(!1)};if(R.useImperativeHandle($,function(){return{onKeyDown:function(ke){var Le=ke.which;switch(Le){case c.a.UP:case c.a.DOWN:{var Oe=0;if(Le===c.a.UP?Oe=-1:Le===c.a.DOWN&&(Oe=1),Oe!==0){var pe=le(ze+Oe,Oe);k(pe),Ke(pe)}break}case c.a.ENTER:{var ve=h[ze];ve&&!ve.data.disabled?ot(ve.data.value):ot(void 0),ee&&ke.preventDefault();break}case c.a.ESC:de(!1)}},onKeyUp:function(){},scrollTo:function(ke){k(ke)}}}),h.length===0)return R.createElement("div",{role:"listbox",id:"".concat(X,"_list"),className:"".concat(t,"-empty"),onMouseDown:A},ae);function Be(je){var ke=h[je];if(!ke)return null;var Le=ke.data||{},Oe=Le.value,pe=Le.label,ve=Le.children,Ce=Object(o.a)(Le,!0),xe=oe?ve:pe;return ke?R.createElement("div",Object.assign({"aria-label":typeof xe=="string"?xe:null},Ce,{key:je,role:"option",id:"".concat(X,"_list_").concat(je),"aria-selected":we.has(Oe)}),Oe):null}return R.createElement(R.Fragment,null,R.createElement("div",{role:"listbox",id:"".concat(X,"_list"),style:{height:0,width:0,overflow:"hidden"}},Be(ze-1),Be(ze),Be(ze+1)),R.createElement(n.a,{itemKey:"key",ref:L,data:h,height:ye,itemHeight:ue,fullHeight:!1,onMouseDown:A,onScroll:Te,virtual:F,onMouseEnter:I},function(je,ke){var Le,Oe=je.group,pe=je.groupOption,ve=je.data,Ce=ve.label,xe=ve.key;if(Oe)return R.createElement("div",{className:e()(t,"".concat(t,"-group"))},Ce!==void 0?Ce:xe);var Ue=ve.disabled,Xe=ve.value,rt=ve.title,bt=ve.children,Et=ve.style,_t=ve.className,vt=Object(m.a)(ve,["disabled","value","title","children","style","className"]),et=we.has(Xe),Ye="".concat(t,"-option"),ut=e()(t,Ye,_t,(Le={},Object(g.a)(Le,"".concat(Ye,"-grouped"),pe),Object(g.a)(Le,"".concat(Ye,"-active"),ze===ke&&!Ue),Object(g.a)(Le,"".concat(Ye,"-disabled"),Ue),Object(g.a)(Le,"".concat(Ye,"-selected"),et),Le)),st=oe?bt:Ce,gt=!Ee||typeof Ee=="function"||et;return R.createElement("div",Object.assign({},vt,{"aria-selected":et,className:ut,title:rt,onMouseMove:function(){if(ze===ke||Ue)return;Ke(ke)},onClick:function(){Ue||ot(Xe)},style:Et}),R.createElement("div",{className:"".concat(Ye,"-content")},st||Xe),R.isValidElement(Ee)||et,gt&&R.createElement(a.a,{className:"".concat(t,"-option-state"),customizeIcon:Ee,customizeIconProps:{isSelected:et}},et?"\u2713":null))}))},d=R.forwardRef(p);d.displayName="OptionList";var i=d,v=function(){return null};v.isSelectOption=!0;var b=v,_=function(){return null};_.isSelectOptGroup=!0;var w=_,T=ne("VTBJ"),C=ne("Zm9Q");function S(he){var Z=he.key,$=he.props,V=$.children,X=$.value,Q=Object(m.a)($,["children","value"]);return Object(T.a)({key:Z,value:X!==void 0?X:Z,children:V},Q)}function W(he){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(C.a)(he).map(function($,V){if(!R.isValidElement($)||!$.type)return null;var X=$.type.isSelectOptGroup,Q=$.key,oe=$.props,we=oe.children,ge=Object(m.a)(oe,["children"]);return Z||!X?S($):Object(T.a)(Object(T.a)({key:"__RC_SELECT_GRP__".concat(Q===null?V:Q,"__"),label:Q},ge),{},{options:W(we)})}).filter(function($){return $})}var N=ne("2Qr1"),E=ne("qNPg"),K=ne("U8pU"),z=ne("Kwbf"),M=ne("WKfj");function G(he){var Z=he.mode,$=he.options,V=he.children,X=he.backfill,Q=he.allowClear,oe=he.placeholder,we=he.getInputElement,ge=he.showSearch,Ae=he.onSearch,me=he.defaultOpen,ye=he.autoFocus,ue=he.labelInValue,ae=he.value,ee=he.inputValue,Ee=he.optionLabelProp,F=Z==="multiple"||Z==="tags",j=ge!==void 0?ge:F||Z==="combobox",de=$||W(V);if(Object(z.a)(Z!=="tags"||de.every(function(t){return!t.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Z==="tags"||Z==="combobox"){var be=de.some(function(t){return t.options?t.options.some(function(h){return typeof("value"in h?h.value:h.key)=="number"}):typeof("value"in t?t.value:t.key)=="number"});Object(z.a)(!be,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(z.a)(Z!=="combobox"||!Ee,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(z.a)(Z==="combobox"||!X,"`backfill` only works with `combobox` mode."),Object(z.a)(Z==="combobox"||!we,"`getInputElement` only work with `combobox` mode."),Object(z.b)(Z!=="combobox"||!we||!Q||!oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ae&&!j&&Z!=="combobox"&&Z!=="tags"&&Object(z.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(z.b)(!me||ye,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ae!=null){var Te=Object(M.d)(ae);Object(z.a)(!ue||Te.every(function(t){return Object(K.a)(t)==="object"&&("key"in t||"value"in t)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(z.a)(!F||Array.isArray(ae),"`value` should be array when `mode` is `multiple` or `tags`")}if(V){var I=null;Object(C.a)(V).some(function(t){if(!R.isValidElement(t)||!t.type)return!1;var h=t.type;if(h.isSelectOption)return!1;if(h.isSelectOptGroup){var L=Object(C.a)(t.props.children).every(function(A){return!R.isValidElement(A)||!t.type||A.type.isSelectOption?!0:(I=A.type,!1)});return!L}return I=h,!0}),I&&Object(z.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(I.displayName||I.name||I,"`.")),Object(z.a)(ee===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var J=G,te=Object(E.a)({prefixCls:"rc-select",components:{optionList:i},convertChildrenToData:W,flattenOptions:N.d,getLabeledValue:N.e,filterOptions:N.b,isValueDisabled:N.g,findValueOption:N.c,warningProps:J,fillOptionsWithMissingValue:N.a}),re=function(he){Object(De.a)($,he);var Z=Object(l.a)($);function $(){var V;return Object(Ne.a)(this,$),V=Z.apply(this,arguments),V.selectRef=R.createRef(),V.focus=function(){V.selectRef.current.focus()},V.blur=function(){V.selectRef.current.blur()},V}return Object(Pe.a)($,[{key:"render",value:function(){return R.createElement(te,Object.assign({ref:this.selectRef},this.props))}}]),$}(R.Component);re.Option=b,re.OptGroup=w;var se=re,H=Me.c=se},MI8n:function(lt,Me,ne){"use strict";ne.d(Me,"b",function(){return g}),ne.d(Me,"a",function(){return c}),ne.d(Me,"e",function(){return o}),ne.d(Me,"d",function(){return u}),ne.d(Me,"c",function(){return r}),ne.d(Me,"f",function(){return e});var Ne=ne("/cxE"),Pe=ne("C/vA"),De=ne("pmY6"),l=ne("24hK"),R=function(){var n=function(a,p){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,i){d.__proto__=i}||function(d,i){for(var v in i)i.hasOwnProperty(v)&&(d[v]=i[v])},n(a,p)};return function(a,p){n(a,p);function d(){this.constructor=a}a.prototype=p===null?Object.create(p):(d.prototype=p.prototype,new d)}}(),g;(function(n){n.None=function(){return De.a.None};function a(J){return function(te,re,se){re===void 0&&(re=null);var H=!1,he;return he=J(function(Z){return H?void 0:(he?he.dispose():H=!0,te.call(re,Z))},null,se),H&&he.dispose(),he}}n.once=a;function p(J,te){return w(function(re,se,H){return se===void 0&&(se=null),J(function(he){return re.call(se,te(he))},null,H)})}n.map=p;function d(J,te){return w(function(re,se,H){return se===void 0&&(se=null),J(function(he){te(he),re.call(se,he)},null,H)})}n.forEach=d;function i(J,te){return w(function(re,se,H){return se===void 0&&(se=null),J(function(he){return te(he)&&re.call(se,he)},null,H)})}n.filter=i;function v(J){return J}n.signal=v;function b(){for(var J=[],te=0;te<arguments.length;te++)J[te]=arguments[te];return function(re,se,H){return se===void 0&&(se=null),De.e.apply(void 0,J.map(function(he){return he(function(Z){return re.call(se,Z)},null,H)}))}}n.any=b;function _(J,te,re){var se=re;return p(J,function(H){return se=te(se,H),se})}n.reduce=_;function w(J){var te,re=new c({onFirstListenerAdd:function(){te=J(re.fire,re)},onLastListenerRemove:function(){te.dispose()}});return re.event}n.snapshot=w;function T(J,te,re,se,H){re===void 0&&(re=100),se===void 0&&(se=!1);var he,Z=void 0,$=void 0,V=0,X=new c({leakWarningThreshold:H,onFirstListenerAdd:function(){he=J(function(Q){V++,Z=te(Z,Q),se&&!$&&(X.fire(Z),Z=void 0),clearTimeout($),$=setTimeout(function(){var oe=Z;Z=void 0,$=void 0,(!se||V>1)&&X.fire(oe),V=0},re)})},onLastListenerRemove:function(){he.dispose()}});return X.event}n.debounce=T;function C(J){var te=new Date().getTime();return p(a(J),function(re){return new Date().getTime()-te})}n.stopwatch=C;function S(J){var te=!0,re;return i(J,function(se){var H=te||se!==re;return te=!1,re=se,H})}n.latch=S;function W(J,te,re){te===void 0&&(te=!1),re===void 0&&(re=[]);var se=re.slice(),H=J(function($){se?se.push($):Z.fire($)}),he=function(){se&&se.forEach(function($){return Z.fire($)}),se=null},Z=new c({onFirstListenerAdd:function(){H||(H=J(function($){return Z.fire($)}))},onFirstListenerDidAdd:function(){se&&(te?setTimeout(he):he())},onLastListenerRemove:function(){H&&H.dispose(),H=null}});return Z.event}n.buffer=W;var N=function(){function J(te){this.event=te}return J.prototype.map=function(te){return new J(p(this.event,te))},J.prototype.forEach=function(te){return new J(d(this.event,te))},J.prototype.filter=function(te){return new J(i(this.event,te))},J.prototype.reduce=function(te,re){return new J(_(this.event,te,re))},J.prototype.latch=function(){return new J(S(this.event))},J.prototype.debounce=function(te,re,se,H){return re===void 0&&(re=100),se===void 0&&(se=!1),new J(T(this.event,te,re,se,H))},J.prototype.on=function(te,re,se){return this.event(te,re,se)},J.prototype.once=function(te,re,se){return a(this.event)(te,re,se)},J}();function E(J){return new N(J)}n.chain=E;function K(J,te,re){re===void 0&&(re=function($){return $});var se=function(){for(var $=[],V=0;V<arguments.length;V++)$[V]=arguments[V];return Z.fire(re.apply(void 0,$))},H=function(){return J.on(te,se)},he=function(){return J.removeListener(te,se)},Z=new c({onFirstListenerAdd:H,onLastListenerRemove:he});return Z.event}n.fromNodeEventEmitter=K;function z(J,te,re){re===void 0&&(re=function($){return $});var se=function(){for(var $=[],V=0;V<arguments.length;V++)$[V]=arguments[V];return Z.fire(re.apply(void 0,$))},H=function(){return J.addEventListener(te,se)},he=function(){return J.removeEventListener(te,se)},Z=new c({onFirstListenerAdd:H,onLastListenerRemove:he});return Z.event}n.fromDOMEventEmitter=z;function M(J){var te=new c,re=!1;return J.then(void 0,function(){return null}).then(function(){re?te.fire(void 0):setTimeout(function(){return te.fire(void 0)},0)}),re=!0,te.event}n.fromPromise=M;function G(J){return new Promise(function(te){return a(J)(te)})}n.toPromise=G})(g||(g={}));var m=-1,y=function(){function n(a,p){p===void 0&&(p=Math.random().toString(18).slice(2,5)),this.customThreshold=a,this.name=p,this._warnCountdown=0}return n.prototype.dispose=function(){this._stacks&&this._stacks.clear()},n.prototype.check=function(a){var p=this,d=m;if(typeof this.customThreshold=="number"&&(d=this.customThreshold),d<=0||a<d)return;this._stacks||(this._stacks=new Map);var i=new Error().stack.split(`
|
|
|
`).slice(3).join(`
|
|
|
`),v=this._stacks.get(i)||0;if(this._stacks.set(i,v+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=d*.5;var b,_=0;this._stacks.forEach(function(w,T){(!b||_<w)&&(b=T,_=w)}),console.warn("["+this.name+"] potential listener LEAK detected, having "+a+" listeners already. MOST frequent listener ("+_+"):"),console.warn(b)}return function(){var w=p._stacks.get(i)||0;p._stacks.set(i,w-1)}},n}(),c=function(){function n(a){this._disposed=!1,this._options=a,this._leakageMon=m>0?new y(this._options&&this._options.leakWarningThreshold):void 0}return Object.defineProperty(n.prototype,"event",{get:function(){var a=this;return this._event||(this._event=function(p,d,i){a._listeners||(a._listeners=new l.a);var v=a._listeners.isEmpty();v&&a._options&&a._options.onFirstListenerAdd&&a._options.onFirstListenerAdd(a);var b=a._listeners.push(d?[p,d]:p);v&&a._options&&a._options.onFirstListenerDidAdd&&a._options.onFirstListenerDidAdd(a),a._options&&a._options.onListenerDidAdd&&a._options.onListenerDidAdd(a,p,d);var _;a._leakageMon&&(_=a._leakageMon.check(a._listeners.size));var w;return w={dispose:function(){if(_&&_(),w.dispose=n._noop,!a._disposed&&(b(),a._options&&a._options.onLastListenerRemove)){var T=a._listeners&&!a._listeners.isEmpty();T||a._options.onLastListenerRemove(a)}}},i instanceof De.b?i.add(w):Array.isArray(i)&&i.push(w),w}),this._event},enumerable:!0,configurable:!0}),n.prototype.fire=function(a){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new l.a);for(var p=this._listeners.iterator(),d=p.next();!d.done;d=p.next())this._deliveryQueue.push([d.value,a]);for(;this._deliveryQueue.size>0;){var i=this._deliveryQueue.shift(),v=i[0],b=i[1];try{typeof v=="function"?v.call(void 0,b):v[0].call(v[1],b)}catch(_){Object(Ne.e)(_)}}}},n.prototype.dispose=function(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0},n._noop=function(){},n}(),o=function(n){R(a,n);function a(p){var d=n.call(this,p)||this;return d._isPaused=0,d._eventQueue=new l.a,d._mergeFn=p&&p.merge,d}return a.prototype.pause=function(){this._isPaused++},a.prototype.resume=function(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){var p=this._eventQueue.toArray();this._eventQueue.clear(),n.prototype.fire.call(this,this._mergeFn(p))}else for(;!this._isPaused&&this._eventQueue.size!==0;)n.prototype.fire.call(this,this._eventQueue.shift())},a.prototype.fire=function(p){this._listeners&&(this._isPaused!==0?this._eventQueue.push(p):n.prototype.fire.call(this,p))},a}(c),u=function(){function n(){var a=this;this.hasListeners=!1,this.events=[],this.emitter=new c({onFirstListenerAdd:function(){return a.onFirstListenerAdd()},onLastListenerRemove:function(){return a.onLastListenerRemove()}})}return Object.defineProperty(n.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),n.prototype.add=function(a){var p=this,d={event:a,listener:null};this.events.push(d),this.hasListeners&&this.hook(d);var i=function(){p.hasListeners&&p.unhook(d);var v=p.events.indexOf(d);p.events.splice(v,1)};return Object(De.h)(Object(Pe.a)(i))},n.prototype.onFirstListenerAdd=function(){var a=this;this.hasListeners=!0,this.events.forEach(function(p){return a.hook(p)})},n.prototype.onLastListenerRemove=function(){var a=this;this.hasListeners=!1,this.events.forEach(function(p){return a.unhook(p)})},n.prototype.hook=function(a){var p=this;a.listener=a.event(function(d){return p.emitter.fire(d)})},n.prototype.unhook=function(a){a.listener&&a.listener.dispose(),a.listener=null},n.prototype.dispose=function(){this.emitter.dispose()},n}(),r=function(){function n(){this.buffers=[]}return n.prototype.wrapEvent=function(a){var p=this;return function(d,i,v){return a(function(b){var _=p.buffers[p.buffers.length-1];_?_.push(function(){return d.call(i,b)}):d.call(i,b)},void 0,v)}},n.prototype.bufferEvents=function(a){var p=[];this.buffers.push(p);var d=a();return this.buffers.pop(),p.forEach(function(i){return i()}),d},n}(),e=function(){function n(){var a=this;this.listening=!1,this.inputEvent=g.None,this.inputEventListener=De.a.None,this.emitter=new c({onFirstListenerDidAdd:function(){a.listening=!0,a.inputEventListener=a.inputEvent(a.emitter.fire,a.emitter)},onLastListenerRemove:function(){a.listening=!1,a.inputEventListener.dispose()}}),this.event=this.emitter.event}return Object.defineProperty(n.prototype,"input",{set:function(a){this.inputEvent=a,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=a(this.emitter.fire,this.emitter))},enumerable:!0,configurable:!0}),n.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose()},n}()},MRWH:function(lt,Me,ne){lt.exports={flex_box_center:"flex_box_center___30XbU",flex_space_between:"flex_space_between___3jfWA",flex_box_vertical_center:"flex_box_vertical_center___27kWs",flex_box_center_end:"flex_box_center_end___1RoAS",flex_box_column:"flex_box_column____3Jvr",list:"list___2NJ_T",box:"box___36KCF",title:"title___Kd2ce",gray:"gray___14ob6",brght:"brght___GgzyD",s1:"s1___IhDpz",s2:"s2___3hR0s",s3:"s3___23SCF",active:"active___2_5D5",line:"line___3Croa"}},N0LK:function(lt,Me,ne){"use strict";ne.d(Me,"x",function(){return Ne}),ne.d(Me,"F",function(){return Pe}),ne.d(Me,"r",function(){return l}),ne.d(Me,"o",function(){return R}),ne.d(Me,"p",function(){return g}),ne.d(Me,"Q",function(){return m}),ne.d(Me,"K",function(){return c}),ne.d(Me,"k",function(){return o}),ne.d(Me,"N",function(){return u}),ne.d(Me,"m",function(){return r}),ne.d(Me,"l",function(){return e}),ne.d(Me,"I",function(){return n}),ne.d(Me,"H",function(){return a}),ne.d(Me,"q",function(){return p}),ne.d(Me,"t",function(){return d}),ne.d(Me,"D",function(){return i}),ne.d(Me,"e",function(){return v}),ne.d(Me,"f",function(){return b}),ne.d(Me,"B",function(){return _}),ne.d(Me,"C",function(){return w}),ne.d(Me,"n",function(){return C}),ne.d(Me,"O",function(){return W}),ne.d(Me,"c",function(){return N}),ne.d(Me,"d",function(){return E}),ne.d(Me,"z",function(){return K}),ne.d(Me,"A",function(){return z}),ne.d(Me,"u",function(){return M}),ne.d(Me,"E",function(){return J}),ne.d(Me,"G",function(){return te}),ne.d(Me,"i",function(){return se}),ne.d(Me,"g",function(){return he}),ne.d(Me,"v",function(){return $}),ne.d(Me,"h",function(){return V}),ne.d(Me,"y",function(){return X}),ne.d(Me,"w",function(){return Q}),ne.d(Me,"a",function(){return oe}),ne.d(Me,"P",function(){return we}),ne.d(Me,"L",function(){return ge}),ne.d(Me,"J",function(){return Ae}),ne.d(Me,"j",function(){return me}),ne.d(Me,"M",function(){return ye}),ne.d(Me,"s",function(){return ue}),ne.d(Me,"b",function(){return ae});function Ne(F){return!F||typeof F!="string"?!0:F.trim().length===0}function Pe(F,j,de){de===void 0&&(de="0");for(var be=""+F,Te=[be],I=be.length;I<j;I++)Te.push(de);return Te.reverse().join("")}var De=/{(\d+)}/g;function l(F){for(var j=[],de=1;de<arguments.length;de++)j[de-1]=arguments[de];return j.length===0?F:F.replace(De,function(be,Te){var I=parseInt(Te,10);return isNaN(I)||I<0||I>=j.length?be:j[I]})}function R(F){return F.replace(/[<>&]/g,function(j){switch(j){case"<":return"<";case">":return">";case"&":return"&";default:return j}})}function g(F){return F.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function m(F,j){j===void 0&&(j=" ");var de=y(F,j);return c(de,j)}function y(F,j){if(!F||!j)return F;var de=j.length;if(de===0||F.length===0)return F;for(var be=0;F.indexOf(j,be)===be;)be=be+de;return F.substring(be)}function c(F,j){if(!F||!j)return F;var de=j.length,be=F.length;if(de===0||be===0)return F;for(var Te=be,I=-1;!(I=F.lastIndexOf(j,Te-1),I===-1||I+de!==Te);){if(I===0)return"";Te=I}return F.substring(0,Te)}function o(F){return F.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function u(F,j){if(F.length<j.length)return!1;if(F===j)return!0;for(var de=0;de<j.length;de++)if(F[de]!==j[de])return!1;return!0}function r(F,j){var de=F.length-j.length;return de>0?F.indexOf(j,de)===de:de===0?F===j:!1}function e(F,j,de){if(de===void 0&&(de={}),!F)throw new Error("Cannot create regex from empty string");j||(F=g(F)),de.wholeWord&&(/\B/.test(F.charAt(0))||(F="\\b"+F),/\B/.test(F.charAt(F.length-1))||(F=F+"\\b"));var be="";return de.global&&(be+="g"),de.matchCase||(be+="i"),de.multiline&&(be+="m"),de.unicode&&(be+="u"),new RegExp(F,be)}function n(F){if(F.source==="^"||F.source==="^$"||F.source==="$"||F.source==="^\\s*$")return!1;var j=F.exec("");return!!(j&&F.lastIndex===0)}function a(F){return(F.global?"g":"")+(F.ignoreCase?"i":"")+(F.multiline?"m":"")+(F.unicode?"u":"")}function p(F){for(var j=0,de=F.length;j<de;j++){var be=F.charCodeAt(j);if(be!==32&&be!==9)return j}return-1}function d(F,j,de){j===void 0&&(j=0),de===void 0&&(de=F.length);for(var be=j;be<de;be++){var Te=F.charCodeAt(be);if(Te!==32&&Te!==9)return F.substring(j,be)}return F.substring(j,de)}function i(F,j){j===void 0&&(j=F.length-1);for(var de=j;de>=0;de--){var be=F.charCodeAt(de);if(be!==32&&be!==9)return de}return-1}function v(F,j){return F<j?-1:F>j?1:0}function b(F,j){for(var de=Math.min(F.length,j.length),be=0;be<de;be++){var Te=F.charCodeAt(be),I=j.charCodeAt(be);if(Te===I)continue;w(Te)&&(Te+=32),w(I)&&(I+=32);var t=Te-I;if(t===0)continue;return _(Te)&&_(I)?t:v(F.toLowerCase(),j.toLowerCase())}return F.length<j.length?-1:F.length>j.length?1:0}function _(F){return F>=97&&F<=122}function w(F){return F>=65&&F<=90}function T(F){return _(F)||w(F)}function C(F,j){return F.length===j.length&&S(F,j)}function S(F,j,de){de===void 0&&(de=F.length);for(var be=0;be<de;be++){var Te=F.charCodeAt(be),I=j.charCodeAt(be);if(Te===I)continue;if(T(Te)&&T(I)){var t=Math.abs(Te-I);if(t!==0&&t!==32)return!1}else if(String.fromCharCode(Te).toLowerCase()!==String.fromCharCode(I).toLowerCase())return!1}return!0}function W(F,j){var de=j.length;return j.length>F.length?!1:S(F,j,de)}function N(F,j){var de,be=Math.min(F.length,j.length);for(de=0;de<be;de++)if(F.charCodeAt(de)!==j.charCodeAt(de))return de;return be}function E(F,j){var de,be=Math.min(F.length,j.length),Te=F.length-1,I=j.length-1;for(de=0;de<be;de++)if(F.charCodeAt(Te-de)!==j.charCodeAt(I-de))return de;return be}function K(F){return 55296<=F&&F<=56319}function z(F){return 56320<=F&&F<=57343}function M(F,j,de){var be=F.charCodeAt(de);if(K(be)&&de+1<j){var Te=F.charCodeAt(de+1);if(z(Te))return(be-55296<<10)+(Te-56320)+65536}return be}function G(F,j){var de=F.charCodeAt(j-1);if(z(de)&&j>1){var be=F.charCodeAt(j-2);if(K(be))return(be-55296<<10)+(de-56320)+65536}return de}function J(F,j){var de=ee.getInstance(),be=j,Te=F.length,I=M(F,Te,j);j+=I>=65536?2:1;for(var t=de.getGraphemeBreakType(I);j<Te;){var h=M(F,Te,j),L=de.getGraphemeBreakType(h);if(ae(t,L))break;j+=h>=65536?2:1,t=L}return j-be}function te(F,j){var de=ee.getInstance(),be=j,Te=G(F,j);j-=Te>=65536?2:1;for(var I=de.getGraphemeBreakType(Te);j>0;){var t=G(F,j),h=de.getGraphemeBreakType(t);if(ae(h,I))break;j-=t>=65536?2:1,I=h}return be-j}var re=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function se(F){return re.test(F)}var H=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/;function he(F){return H.test(F)}var Z=/^[\t\n\r\x20-\x7E]*$/;function $(F){return Z.test(F)}function V(F){for(var j=0,de=F.length;j<de;j++)if(X(F.charCodeAt(j)))return!0;return!1}function X(F){return F=+F,F>=11904&&F<=55215||F>=63744&&F<=64255||F>=65281&&F<=65374}function Q(F){return F>=127462&&F<=127487||F>=9728&&F<=10175||F>=127744&&F<=128591||F>=128640&&F<=128764||F>=128992&&F<=129003||F>=129280&&F<=129535||F>=129648&&F<=129651||F>=129656&&F<=129666||F>=129680&&F<=129685}var oe=String.fromCharCode(65279);function we(F){return!!(F&&F.length>0&&F.charCodeAt(0)===65279)}function ge(F){return btoa(encodeURIComponent(F))}function Ae(F,j){for(var de="",be=0;be<j;be++)de+=F;return de}function me(F,j){return j===void 0&&(j=!1),F?(j&&(F=F.replace(/\\./g,"")),F.toLowerCase()!==F):!1}function ye(F){var j=90-65+1;return F=F%(2*j),F<j?String.fromCharCode(97+F):String.fromCharCode(65+F-j)}function ue(F){var j=ee.getInstance();return j.getGraphemeBreakType(F)}function ae(F,j){return F===0?j!==5&&j!==7:F===2&&j===3?!1:F===4||F===2||F===3||(j===4||j===2||j===3)?!0:F===8&&(j===8||j===9||j===11||j===12)||((F===11||F===9)&&(j===9||j===10)||((F===12||F===10)&&j===10||(j===5||j===13||(j===7||(F===1||F===13&&j===14)))))?!1:!(F===6&&j===6)}var ee=function(){function F(){this._data=Ee()}return F.getInstance=function(){return F._INSTANCE||(F._INSTANCE=new F),F._INSTANCE},F.prototype.getGraphemeBreakType=function(j){if(j<32)return j===10?3:j===13?2:4;if(j<127)return 0;for(var de=this._data,be=de.length/3,Te=1;Te<=be;)if(j<de[3*Te])Te=2*Te;else if(j>de[3*Te+1])Te=2*Te+1;else return de[3*Te+2];return 0},F._INSTANCE=null,F}();function Ee(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}},NLgs:function(lt,Me,ne){"use strict";ne.d(Me,"e",function(){return _}),ne.d(Me,"f",function(){return w}),ne.d(Me,"d",function(){return C}),ne.d(Me,"c",function(){return S}),ne.d(Me,"a",function(){return W}),ne.d(Me,"b",function(){return N});var Ne=ne("miYZ"),Pe=ne("tsqr"),De=ne("9og8"),l=ne("2qtc"),R=ne("kLXV"),g=ne("WmNS"),m=ne.n(g),y=ne("q1tI"),c=ne.n(y),o=ne("9kvl"),u=ne("xKgJ"),r=ne("1vsH"),e=ne("RCxd"),n=ne("mOS8"),a=ne.n(n),p=ne("1ZF9"),d=ne.n(p),i=ne("WdTA"),v=ne.n(i),b=ne("m3rI"),_=function(K){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(w(K)&&T(z))},w=function(K){return Object(u.p)()?!0:(K({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},T=function(){var K,z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,M=Object(o.c)()._store.getState(),G=M.user;return(K=G.userInfo)!==null&&K!==void 0&&K.profile_completed?!0:(R.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:z?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){o.d.push("/account/profile/edit")}}),!1)},C=function(){var K,z=Object(o.c)()._store.getState(),M=z.user;return(K=M.userInfo)!==null&&K!==void 0&&K.professional_certification?!0:(R.a.confirm({title:"\u63D0\u793A",centered:!0,content:c.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(r.O)("/account/certification")}}),!1)},S=function(){return Object(u.a)()?!0:(R.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:c.a.createElement("div",{className:"tc",style:{marginLeft:-38}},c.a.createElement("p",null,"\u60A8\u53EF\u4EE5\u626B\u7801\u52A0\u7FA4@\u7FA4\u7BA1\u7406\u5458\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650\u54E6\uFF01"),c.a.createElement("img",{src:Object(u.t)()?v.a:"".concat(b.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},W=function(K,z){return K?!0:(R.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:c.a.createElement("div",null,c.a.createElement("p",null,z||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),c.a.createElement("div",{style:{marginLeft:"110px"}},c.a.createElement("img",{src:d.a,width:200}),c.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(r.O)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},N=function(K){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",M=Object(o.c)()._store.getState(),G=M.shixunsDetail.detail;return(G==null?void 0:G.public)===2||(G==null?void 0:G.public)===1||(G==null?void 0:G.shixun_status)===3?(R.a.info({centered:!0,icon:c.a.createElement(e.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:c.a.createElement("div",{className:"tc",style:{marginLeft:-38}},c.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},c.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(G==null?void 0:G.public)===2?"\u5DF2\u516C\u5F00":(G==null?void 0:G.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",z,"\u3002"),c.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),c.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:a.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(G==null?void 0:G.shixun_status)===2?(R.a.confirm({centered:!0,icon:c.a.createElement(e.a,null),title:"\u63D0\u793A",content:c.a.createElement("div",null,c.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",z,"\u3002"),c.a.createElement("br",null),c.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){R.a.confirm({width:440,centered:!0,icon:c.a.createElement(e.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var te=Object(De.a)(m.a.mark(function se(){var H;return m.a.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return Z.next=2,K({type:"shixunsDetail/cancelRelease",payload:{id:G==null?void 0:G.identifier}});case 2:H=Z.sent,H.status!==401&&(Pe.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),K({type:"shixunsDetail/getShixunsDetail",payload:{id:G==null?void 0:G.identifier}}),K({type:"practiceSetting/getCommonData",payload:{id:G==null?void 0:G.identifier}}));case 4:case"end":return Z.stop()}},se)}));function re(){return te.apply(this,arguments)}return re}()})}}),!0):!1}},OLES:function(lt,Me,ne){"use strict";var Ne=ne("U8pU"),Pe=ne("VTBJ"),De=ne("Ff2n"),l=ne("q1tI"),R=ne("uciX"),g=ne("7ixt"),m=function(e){var n=e.overlay,a=e.prefixCls,p=e.id,d=e.overlayInnerStyle;return l.createElement("div",{className:"".concat(a,"-inner"),id:p,role:"tooltip",style:d},typeof n=="function"?n():n)},y=m,c=function(e,n){var a=e.overlayClassName,p=e.trigger,d=p===void 0?["hover"]:p,i=e.mouseEnterDelay,v=i===void 0?0:i,b=e.mouseLeaveDelay,_=b===void 0?.1:b,w=e.overlayStyle,T=e.prefixCls,C=T===void 0?"rc-tooltip":T,S=e.children,W=e.onVisibleChange,N=e.afterVisibleChange,E=e.transitionName,K=e.animation,z=e.placement,M=z===void 0?"right":z,G=e.align,J=G===void 0?{}:G,te=e.destroyTooltipOnHide,re=te===void 0?!1:te,se=e.defaultVisible,H=e.getTooltipContainer,he=e.overlayInnerStyle,Z=Object(De.a)(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),$=Object(l.useRef)(null);Object(l.useImperativeHandle)(n,function(){return $.current});var V=Object(Pe.a)({},Z);"visible"in e&&(V.popupVisible=e.visible);var X=function(){var Ae=e.arrowContent,me=Ae===void 0?null:Ae,ye=e.overlay,ue=e.id;return[l.createElement("div",{className:"".concat(C,"-arrow"),key:"arrow"},me),l.createElement(y,{key:"content",prefixCls:C,id:ue,overlay:ye,overlayInnerStyle:he})]},Q=!1,oe=!1;if(typeof re=="boolean")Q=re;else if(re&&Object(Ne.a)(re)==="object"){var we=re.keepParent;Q=we===!0,oe=we===!1}return l.createElement(R.a,Object.assign({popupClassName:a,prefixCls:C,popup:X,action:d,builtinPlacements:g.a,popupPlacement:M,ref:$,popupAlign:J,getPopupContainer:H,onPopupVisibleChange:W,afterPopupVisibleChange:N,popupTransitionName:E,popupAnimation:K,defaultPopupVisible:se,destroyPopupOnHide:Q,autoDestroy:oe,mouseLeaveDelay:_,popupStyle:w,mouseEnterDelay:v},V),S)},o=Object(l.forwardRef)(c),u=Me.a=o},QDVR:function(lt,Me,ne){"use strict";ne.d(Me,"e",function(){return Pe}),ne.d(Me,"d",function(){return De}),ne.d(Me,"c",function(){return m}),ne.d(Me,"b",function(){return y}),ne.d(Me,"a",function(){return o});var Ne=function(){var u=function(r,e){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var p in a)a.hasOwnProperty(p)&&(n[p]=a[p])},u(r,e)};return function(r,e){u(r,e);function n(){this.constructor=r}r.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}();function Pe(u){var r=[];return u.forEach(function(e){return r.push(e)}),r}function De(u){var r=[];return u.forEach(function(e,n){return r.push(n)}),r}var l=function(){function u(){this._value="",this._pos=0}return u.prototype.reset=function(r){return this._value=r,this._pos=0,this},u.prototype.next=function(){return this._pos+=1,this},u.prototype.hasNext=function(){return this._pos<this._value.length-1},u.prototype.cmp=function(r){var e=r.charCodeAt(0),n=this._value.charCodeAt(this._pos);return e-n},u.prototype.value=function(){return this._value[this._pos]},u}(),R=function(){function u(r){r===void 0&&(r=!0),this._splitOnBackslash=r}return u.prototype.reset=function(r){return this._value=r.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()},u.prototype.hasNext=function(){return this._to<this._value.length},u.prototype.next=function(){this._from=this._to;for(var r=!0;this._to<this._value.length;this._to++){var e=this._value.charCodeAt(this._to);if(e===47||this._splitOnBackslash&&e===92)if(r)this._from++;else break;else r=!1}return this},u.prototype.cmp=function(r){for(var e=0,n=r.length,a=this._from;e<n&&a<this._to;){var p=r.charCodeAt(e)-this._value.charCodeAt(a);if(p!==0)return p;e+=1,a+=1}return n===this._to-this._from?0:e<n?-1:1},u.prototype.value=function(){return this._value.substring(this._from,this._to)},u}(),g=function(){function u(){}return u}(),m=function(){function u(r){this._iter=r}return u.forPaths=function(){return new u(new R)},u.forStrings=function(){return new u(new l)},u.prototype.clear=function(){this._root=void 0},u.prototype.set=function(r,e){var n=this._iter.reset(r),a;for(this._root||(this._root=new g,this._root.segment=n.value()),a=this._root;;){var p=n.cmp(a.segment);if(p>0)a.left||(a.left=new g,a.left.segment=n.value()),a=a.left;else if(p<0)a.right||(a.right=new g,a.right.segment=n.value()),a=a.right;else if(n.hasNext())n.next(),a.mid||(a.mid=new g,a.mid.segment=n.value()),a=a.mid;else break}var d=a.value;return a.value=e,a.key=r,d},u.prototype.get=function(r){for(var e=this._iter.reset(r),n=this._root;n;){var a=e.cmp(n.segment);if(a>0)n=n.left;else if(a<0)n=n.right;else if(e.hasNext())e.next(),n=n.mid;else break}return n?n.value:void 0},u.prototype.findSubstr=function(r){for(var e=this._iter.reset(r),n=this._root,a=void 0;n;){var p=e.cmp(n.segment);if(p>0)n=n.left;else if(p<0)n=n.right;else if(e.hasNext())e.next(),a=n.value||a,n=n.mid;else break}return n&&n.value||a},u.prototype.forEach=function(r){this._forEach(this._root,r)},u.prototype._forEach=function(r,e){r&&(this._forEach(r.left,e),r.value&&e(r.value,r.key),this._forEach(r.mid,e),this._forEach(r.right,e))},u}(),y=function(){function u(){this.map=new Map,this.ignoreCase=!1}return u.prototype.set=function(r,e){this.map.set(this.toKey(r),e)},u.prototype.get=function(r){return this.map.get(this.toKey(r))},u.prototype.toKey=function(r){var e=r.toString();return this.ignoreCase&&(e=e.toLowerCase()),e},u}(),c=function(){function u(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return u.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},Object.defineProperty(u.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),u.prototype.get=function(r,e){e===void 0&&(e=0);var n=this._map.get(r);return n?(e!==0&&this.touch(n,e),n.value):void 0},u.prototype.set=function(r,e,n){n===void 0&&(n=0);var a=this._map.get(r);if(a)a.value=e,n!==0&&this.touch(a,n);else{a={key:r,value:e,next:void 0,previous:void 0};switch(n){case 0:this.addItemLast(a);break;case 1:this.addItemFirst(a);break;case 2:this.addItemLast(a);break;default:this.addItemLast(a);break}this._map.set(r,a),this._size++}},u.prototype.delete=function(r){return!!this.remove(r)},u.prototype.remove=function(r){var e=this._map.get(r);return e?(this._map.delete(r),this.removeItem(e),this._size--,e.value):void 0},u.prototype.forEach=function(r,e){for(var n=this._head;n;)e?r.bind(e)(n.value,n.key,this):r(n.value,n.key,this),n=n.next},u.prototype.trimOld=function(r){if(r>=this.size)return;if(r===0){this.clear();return}for(var e=this._head,n=this.size;e&&n>r;)this._map.delete(e.key),e=e.next,n--;this._head=e,this._size=n,e&&(e.previous=void 0)},u.prototype.addItemFirst=function(r){if(!this._head&&!this._tail)this._tail=r;else if(this._head)r.next=this._head,this._head.previous=r;else throw new Error("Invalid list");this._head=r},u.prototype.addItemLast=function(r){if(!this._head&&!this._tail)this._head=r;else if(this._tail)r.previous=this._tail,this._tail.next=r;else throw new Error("Invalid list");this._tail=r},u.prototype.removeItem=function(r){if(r===this._head&&r===this._tail)this._head=void 0,this._tail=void 0;else if(r===this._head){if(!r.next)throw new Error("Invalid list");r.next.previous=void 0,this._head=r.next}else if(r===this._tail){if(!r.previous)throw new Error("Invalid list");r.previous.next=void 0,this._tail=r.previous}else{var e=r.next,n=r.previous;if(!e||!n)throw new Error("Invalid list");e.previous=n,n.next=e}r.next=void 0,r.previous=void 0},u.prototype.touch=function(r,e){if(!this._head||!this._tail)throw new Error("Invalid list");if(e!==1&&e!==2)return;if(e===1){if(r===this._head)return;var n=r.next,a=r.previous;r===this._tail?(a.next=void 0,this._tail=a):(n.previous=a,a.next=n),r.previous=void 0,r.next=this._head,this._head.previous=r,this._head=r}else if(e===2){if(r===this._tail)return;var n=r.next,a=r.previous;r===this._head?(n.previous=void 0,this._head=n):(n.previous=a,a.next=n),r.next=void 0,r.previous=this._tail,this._tail.next=r,this._tail=r}},u.prototype.toJSON=function(){var r=[];return this.forEach(function(e,n){r.push([n,e])}),r},u}(),o=function(u){Ne(r,u);function r(e,n){n===void 0&&(n=1);var a=u.call(this)||this;return a._limit=e,a._ratio=Math.min(Math.max(0,n),1),a}return r.prototype.get=function(e){return u.prototype.get.call(this,e,2)},r.prototype.peek=function(e){return u.prototype.get.call(this,e,0)},r.prototype.set=function(e,n){u.prototype.set.call(this,e,n,2),this.checkTrim()},r.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},r}(c)},SJMd:function(lt,Me){/**
|
|
|
* @license
|
|
|
* Copyright (C) 2006 Google Inc.
|
|
|
*
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
* You may obtain a copy of the License at
|
|
|
*
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
*
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
* See the License for the specific language governing permissions and
|
|
|
* limitations under the License.
|
|
|
*/var ne,Ne,Pe,De=!1,l,R;window.PR_SHOULD_USE_CONTINUATION=!0;var g,m;(function(){var y=window,c=["break,continue,do,else,for,if,return,while"],o=[c,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],u=[o,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],r=[u,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],e=[u,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],n=[u,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],a="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",p=[u,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],d="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",i=[c,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],v=[c,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],b=[c,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],_=[r,n,e,p,d,i,v,b],w=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,T="str",C="kwd",S="com",W="typ",N="lit",E="pun",K="pln",z="tag",M="dec",G="src",J="atn",te="atv",re="nocode",se="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function H(j){for(var de=0,be=!1,Te=!1,I=0,t=j.length;I<t;++I){var h=j[I];if(h.ignoreCase)Te=!0;else if(/[a-z]/i.test(h.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){be=!0,Te=!1;break}}var L={b:8,t:9,n:10,v:11,f:12,r:13};function A(ze){var Fe=ze.charCodeAt(0);if(Fe!==92)return Fe;var Ke=ze.charAt(1);return Fe=L[Ke],Fe||("0"<=Ke&&Ke<="7"?parseInt(ze.substring(1),8):Ke==="u"||Ke==="x"?parseInt(ze.substring(2),16):ze.charCodeAt(1))}function k(ze){if(ze<32)return(ze<16?"\\x0":"\\x")+ze.toString(16);var Fe=String.fromCharCode(ze);return Fe==="\\"||Fe==="-"||Fe==="]"||Fe==="^"?"\\"+Fe:Fe}function le(ze){var Fe=ze.substring(1,ze.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),Ke=[],ot=Fe[0]==="^",Be=["["];ot&&Be.push("^");for(var je=ot?1:0,ke=Fe.length;je<ke;++je){var Le=Fe[je];if(/\\[bdsw]/i.test(Le))Be.push(Le);else{var Oe=A(Le),pe;je+2<ke&&Fe[je+1]==="-"?(pe=A(Fe[je+2]),je+=2):pe=Oe,Ke.push([Oe,pe]),pe<65||Oe>122||(pe<65||Oe>90||Ke.push([Math.max(65,Oe)|32,Math.min(pe,90)|32]),pe<97||Oe>122||Ke.push([Math.max(97,Oe)&~32,Math.min(pe,122)&~32]))}}Ke.sort(function(Ue,Xe){return Ue[0]-Xe[0]||Xe[1]-Ue[1]});for(var ve=[],Ce=[],je=0;je<Ke.length;++je){var xe=Ke[je];xe[0]<=Ce[1]+1?Ce[1]=Math.max(Ce[1],xe[1]):ve.push(Ce=xe)}for(var je=0;je<ve.length;++je){var xe=ve[je];Be.push(k(xe[0])),xe[1]>xe[0]&&(xe[1]+1>xe[0]&&Be.push("-"),Be.push(k(xe[1])))}return Be.push("]"),Be.join("")}function _e(ze){for(var Fe=ze.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Ke=Fe.length,ot=[],Be=0,je=0;Be<Ke;++Be){var ke=Fe[Be];if(ke==="(")++je;else if(ke.charAt(0)==="\\"){var Le=+ke.substring(1);Le&&(Le<=je?ot[Le]=-1:Fe[Be]=k(Le))}}for(var Be=1;Be<ot.length;++Be)ot[Be]===-1&&(ot[Be]=++de);for(var Be=0,je=0;Be<Ke;++Be){var ke=Fe[Be];if(ke==="(")++je,ot[je]||(Fe[Be]="(?:");else if(ke.charAt(0)==="\\"){var Le=+ke.substring(1);Le&&Le<=je&&(Fe[Be]="\\"+ot[Le])}}for(var Be=0;Be<Ke;++Be)Fe[Be]==="^"&&Fe[Be+1]!=="^"&&(Fe[Be]="");if(ze.ignoreCase&&be)for(var Be=0;Be<Ke;++Be){var ke=Fe[Be],Oe=ke.charAt(0);ke.length>=2&&Oe==="["?Fe[Be]=le(ke):Oe!=="\\"&&(Fe[Be]=ke.replace(/[a-zA-Z]/g,function(Ce){var xe=Ce.charCodeAt(0);return"["+String.fromCharCode(xe&~32,xe|32)+"]"}))}return Fe.join("")}for(var Ge=[],I=0,t=j.length;I<t;++I){var h=j[I];if(h.global||h.multiline)throw new Error(""+h);Ge.push("(?:"+_e(h)+")")}return new RegExp(Ge.join("|"),Te?"gi":"g")}function he(j,de){var be=/(?:^|\s)nocode(?:\s|$)/,Te=[],I=0,t=[],h=0;function L(A){var k=A.nodeType;if(k==1){if(be.test(A.className))return;for(var le=A.firstChild;le;le=le.nextSibling)L(le);var _e=A.nodeName.toLowerCase();(_e==="br"||_e==="li")&&(Te[h]=`
|
|
|
`,t[h<<1]=I++,t[h++<<1|1]=A)}else if(k==3||k==4){var Ge=A.nodeValue;Ge.length&&(de?Ge=Ge.replace(/\r\n?/g,`
|
|
|
`):Ge=Ge.replace(/[ \t\r\n]+/g," "),Te[h]=Ge,t[h<<1]=I,I+=Ge.length,t[h++<<1|1]=A)}}return L(j),{sourceCode:Te.join("").replace(/\n$/,""),spans:t}}function Z(j,de,be,Te,I){if(!be)return;var t={sourceNode:j,pre:1,langExtension:null,numberLines:null,sourceCode:be,spans:null,basePos:de,decorations:null};Te(t),I.push.apply(I,t.decorations)}var $=/\S/;function V(j){for(var de=void 0,be=j.firstChild;be;be=be.nextSibling){var Te=be.nodeType;de=Te===1?de?j:be:Te===3&&$.test(be.nodeValue)?j:de}return de===j?void 0:de}function X(j,de){var be={},Te;(function(){for(var h=j.concat(de),L=[],A={},k=0,le=h.length;k<le;++k){var _e=h[k],Ge=_e[3];if(Ge)for(var ze=Ge.length;--ze>=0;)be[Ge.charAt(ze)]=_e;var Fe=_e[1],Ke=""+Fe;A.hasOwnProperty(Ke)||(L.push(Fe),A[Ke]=null)}L.push(/[\0-\uffff]/),Te=H(L)})();var I=de.length,t=function(h){for(var L=h.sourceCode,A=h.basePos,k=h.sourceNode,le=[A,K],_e=0,Ge=L.match(Te)||[],ze={},Fe=0,Ke=Ge.length;Fe<Ke;++Fe){var ot=Ge[Fe],Be=ze[ot],je=void 0,ke;if(typeof Be=="string")ke=!1;else{var Le=be[ot.charAt(0)];if(Le)je=ot.match(Le[1]),Be=Le[0];else{for(var Oe=0;Oe<I;++Oe)if(Le=de[Oe],je=ot.match(Le[1]),je){Be=Le[0];break}je||(Be=K)}ke=Be.length>=5&&Be.substring(0,5)==="lang-",ke&&!(je&&typeof je[1]=="string")&&(ke=!1,Be=G),ke||(ze[ot]=Be)}var pe=_e;if(_e+=ot.length,!ke)le.push(A+pe,Be);else{var ve=je[1],Ce=ot.indexOf(ve),xe=Ce+ve.length;je[2]&&(xe=ot.length-je[2].length,Ce=xe-ve.length);var Ue=Be.substring(5);Z(k,A+pe,ot.substring(0,Ce),t,le),Z(k,A+pe+Ce,ve,ye(Ue,ve),le),Z(k,A+pe+xe,ot.substring(xe),t,le)}}h.decorations=le};return t}function Q(j){var de=[],be=[];j.tripleQuotedStrings?de.push([T,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):j.multiLineStrings?de.push([T,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):de.push([T,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),j.verbatimStrings&&be.push([T,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Te=j.hashComments;Te&&(j.cStyleComments?(Te>1?de.push([S,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):de.push([S,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),be.push([T,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):de.push([S,/^#[^\r\n]*/,null,"#"])),j.cStyleComments&&(be.push([S,/^\/\/[^\r\n]*/,null]),be.push([S,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var I=j.regexLiterals;if(I){var t=I>1?"":`
|
|
|
\r`,h=t?".":"[\\S\\s]",L="/(?=[^/*"+t+"])(?:[^/\\x5B\\x5C"+t+"]|\\x5C"+h+"|\\x5B(?:[^\\x5C\\x5D"+t+"]|\\x5C"+h+")*(?:\\x5D|$))+/";be.push(["lang-regex",RegExp("^"+se+"("+L+")")])}var A=j.types;A&&be.push([W,A]);var k=(""+j.keywords).replace(/^ | $/g,"");k.length&&be.push([C,new RegExp("^(?:"+k.replace(/[\s,]+/g,"|")+")\\b"),null]),de.push([K,/^\s+/,null,` \r
|
|
|
\xA0`]);var le="^.[^\\s\\w.$@'\"`/\\\\]*";return j.regexLiterals&&(le+="(?!s*/)"),be.push([N,/^@[a-z_$][a-z_$@0-9]*/i,null],[W,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[K,/^[a-z_$][a-z_$@0-9]*/i,null],[N,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[K,/^\\[\s\S]?/,null],[E,new RegExp(le),null]),X(de,be)}var oe=Q({keywords:_,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function we(j,de,be){for(var Te=/(?:^|\s)nocode(?:\s|$)/,I=/\r\n?|\n/,t=j.ownerDocument,h=t.createElement("li");j.firstChild;)h.appendChild(j.firstChild);var L=[h];function A(Fe){var Ke=Fe.nodeType;if(Ke==1&&!Te.test(Fe.className))if(Fe.nodeName==="br")k(Fe),Fe.parentNode&&Fe.parentNode.removeChild(Fe);else for(var ot=Fe.firstChild;ot;ot=ot.nextSibling)A(ot);else if((Ke==3||Ke==4)&&be){var Be=Fe.nodeValue,je=Be.match(I);if(je){var ke=Be.substring(0,je.index);Fe.nodeValue=ke;var Le=Be.substring(je.index+je[0].length);if(Le){var Oe=Fe.parentNode;Oe.insertBefore(t.createTextNode(Le),Fe.nextSibling)}k(Fe),ke||Fe.parentNode.removeChild(Fe)}}}function k(Fe){for(;!Fe.nextSibling;)if(Fe=Fe.parentNode,!Fe)return;function Ke(je,ke){var Le=ke?je.cloneNode(!1):je,Oe=je.parentNode;if(Oe){var pe=Ke(Oe,1),ve=je.nextSibling;pe.appendChild(Le);for(var Ce=ve;Ce;Ce=ve)ve=Ce.nextSibling,pe.appendChild(Ce)}return Le}for(var ot=Ke(Fe.nextSibling,0),Be;(Be=ot.parentNode)&&Be.nodeType===1;)ot=Be;L.push(ot)}for(var le=0;le<L.length;++le)A(L[le]);de===(de|0)&&L[0].setAttribute("value",de);var _e=t.createElement("ol");_e.className="linenums";for(var Ge=Math.max(0,de-1|0)||0,le=0,ze=L.length;le<ze;++le)h=L[le],h.className="L"+(le+Ge)%10,h.firstChild||h.appendChild(t.createTextNode("\xA0")),_e.appendChild(h);j.appendChild(_e)}function ge(j){var de=/\bMSIE\s(\d+)/.exec(navigator.userAgent);de=de&&+de[1]<=8;var be=/\n/g,Te=j.sourceCode,I=Te.length,t=0,h=j.spans,L=h.length,A=0,k=j.decorations,le=k.length,_e=0;k[le]=I;var Ge,ze;for(ze=Ge=0;ze<le;)k[ze]!==k[ze+2]?(k[Ge++]=k[ze++],k[Ge++]=k[ze++]):ze+=2;for(le=Ge,ze=Ge=0;ze<le;){for(var Fe=k[ze],Ke=k[ze+1],ot=ze+2;ot+2<=le&&k[ot+1]===Ke;)ot+=2;k[Ge++]=Fe,k[Ge++]=Ke,ze=ot}le=k.length=Ge;var Be=j.sourceNode,je="";Be&&(je=Be.style.display,Be.style.display="none");try{for(var ke=null;A<L;){var Le=h[A],Oe=h[A+2]||I,pe=k[_e+2]||I,ot=Math.min(Oe,pe),ve=h[A+1],Ce;if(ve.nodeType!==1&&(Ce=Te.substring(t,ot))){de&&(Ce=Ce.replace(be,"\r")),ve.nodeValue=Ce;var xe=ve.ownerDocument,Ue=xe.createElement("span");Ue.className=k[_e+1];var Xe=ve.parentNode;Xe.replaceChild(Ue,ve),Ue.appendChild(ve),t<Oe&&(h[A+1]=ve=xe.createTextNode(Te.substring(ot,Oe)),Xe.insertBefore(ve,Ue.nextSibling))}t=ot,t>=Oe&&(A+=2),t>=pe&&(_e+=2)}}finally{Be&&(Be.style.display=je)}}var Ae={};function me(j,de){for(var be=de.length;--be>=0;){var Te=de[be];Ae.hasOwnProperty(Te)?y.console&&console.warn("cannot override language handler %s",Te):Ae[Te]=j}}function ye(j,de){return j&&Ae.hasOwnProperty(j)||(j=/^\s*</.test(de)?"default-markup":"default-code"),Ae[j]}me(oe,["default-code"]),me(X([],[[K,/^[^<?]+/],[M,/^<!\w[^>]*(?:>|$)/],[S,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[E,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),me(X([[K,/^[\s]+/,null,` \r
|
|
|
`],[te,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[z,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[J,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[E,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),me(X([],[[te,/^[\s\S]+/]]),["uq.val"]),me(Q({keywords:r,hashComments:!0,cStyleComments:!0,types:w}),["c","cc","cpp","cxx","cyc","m"]),me(Q({keywords:"null,true,false"}),["json"]),me(Q({keywords:n,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:w}),["cs"]),me(Q({keywords:e,cStyleComments:!0}),["java"]),me(Q({keywords:b,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),me(Q({keywords:i,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),me(Q({keywords:d,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),me(Q({keywords:v,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),me(Q({keywords:p,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),me(Q({keywords:a,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),me(X([],[[T,/^[\s\S]+/]]),["regex"]);function ue(j){var de=j.langExtension;try{var be=he(j.sourceNode,j.pre),Te=be.sourceCode;j.sourceCode=Te,j.spans=be.spans,j.basePos=0,ye(de,Te)(j),ge(j)}catch(I){y.console&&console.log(I&&I.stack||I)}}function ae(j,de,be){var Te=be||!1,I=de||null,t=document.createElement("div");t.innerHTML="<pre>"+j+"</pre>",t=t.firstChild,Te&&we(t,Te,!0);var h={langExtension:I,numberLines:Te,sourceNode:t,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return ue(h),t.innerHTML}function ee(j,de){var be=de||document.body,Te=be.ownerDocument||document;function I(Le){return be.getElementsByTagName(Le)}for(var t=[I("pre"),I("code"),I("xmp")],h=[],L=0;L<t.length;++L)for(var A=0,k=t[L].length;A<k;++A)h.push(t[L][A]);t=null;var le=Date;le.now||(le={now:function(){return+new Date}});var _e=0,Ge=/\blang(?:uage)?-([\w.]+)(?!\S)/,ze=/\bprettyprint\b/,Fe=/\bprettyprinted\b/,Ke=/pre|xmp/i,ot=/^code$/i,Be=/^(?:pre|code|xmp)$/i,je={};function ke(){for(var Le=y.PR_SHOULD_USE_CONTINUATION?le.now()+250:Infinity;_e<h.length&&le.now()<Le;_e++){for(var Oe=h[_e],pe=je,ve=Oe;ve=ve.previousSibling;){var Ce=ve.nodeType,xe=(Ce===7||Ce===8)&&ve.nodeValue;if(xe?!/^\??prettify\b/.test(xe):Ce!==3||/\S/.test(ve.nodeValue))break;if(xe){pe={},xe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(yt,ft,xt){pe[ft]=xt});break}}var Ue=Oe.className;if((pe!==je||ze.test(Ue))&&!Fe.test(Ue)){for(var Xe=!1,rt=Oe.parentNode;rt;rt=rt.parentNode){var bt=rt.tagName;if(Be.test(bt)&&rt.className&&ze.test(rt.className)){Xe=!0;break}}if(!Xe){Oe.className+=" prettyprinted";var Et=pe.lang;if(!Et){Et=Ue.match(Ge);var _t;!Et&&(_t=V(Oe))&&ot.test(_t.tagName)&&(Et=_t.className.match(Ge)),Et&&(Et=Et[1])}var vt;if(Ke.test(Oe.tagName))vt=1;else{var et=Oe.currentStyle,Ye=Te.defaultView,ut=et?et.whiteSpace:Ye&&Ye.getComputedStyle?Ye.getComputedStyle(Oe,null).getPropertyValue("white-space"):0;vt=ut&&ut.substring(0,3)==="pre"}var st=pe.linenums;(st=st==="true"||+st)||(st=Ue.match(/\blinenums\b(?::(\d+))?/),st=st?st[1]&&st[1].length?+st[1]:!0:!1),st&&we(Oe,st,vt);var gt={langExtension:Et,sourceNode:Oe,numberLines:st,pre:vt,sourceCode:null,basePos:null,spans:null,decorations:null};ue(gt)}}}_e<h.length?y.setTimeout(ke,250):typeof j=="function"&&j()}ke()}var Ee=y.PR={createSimpleLexer:X,registerLangHandler:me,sourceDecorator:Q,PR_ATTRIB_NAME:J,PR_ATTRIB_VALUE:te,PR_COMMENT:S,PR_DECLARATION:M,PR_KEYWORD:C,PR_LITERAL:N,PR_NOCODE:re,PR_PLAIN:K,PR_PUNCTUATION:E,PR_SOURCE:G,PR_STRING:T,PR_TAG:z,PR_TYPE:W,prettyPrintOne:De?y.prettyPrintOne=ae:g=ae,prettyPrint:m=De?y.prettyPrint=ee:m=ee},F=y.define;typeof F=="function"&&F.amd&&F("google-code-prettify",[],function(){return Ee})})()},T8No:function(lt,Me,ne){"use strict";ne.d(Me,"a",function(){return l}),ne.d(Me,"b",function(){return e}),ne.d(Me,"d",function(){return n}),ne.d(Me,"c",function(){return a}),ne.d(Me,"e",function(){return p});var Ne=ne("N0LK"),Pe=ne("Cg/j"),De=function(){var d=function(i,v){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,_){b.__proto__=_}||function(b,_){for(var w in _)_.hasOwnProperty(w)&&(b[w]=_[w])},d(i,v)};return function(i,v){d(i,v);function b(){this.constructor=i}i.prototype=v===null?Object.create(v):(b.prototype=v.prototype,new b)}}(),l=function(){function d(){}return d.has=function(i){return g.create(i)},d.equals=function(i,v){return m.create(i,v)},d.regex=function(i,v){return o.create(i,v)},d.not=function(i){return c.create(i)},d.and=function(){for(var i=[],v=0;v<arguments.length;v++)i[v]=arguments[v];return r.create(i)},d.or=function(){for(var i=[],v=0;v<arguments.length;v++)i[v]=arguments[v];return e.create(i)},d.deserialize=function(i,v){return v===void 0&&(v=!1),i?this._deserializeOrExpression(i,v):void 0},d._deserializeOrExpression=function(i,v){var b=this,_=i.split("||");return e.create(_.map(function(w){return b._deserializeAndExpression(w,v)}))},d._deserializeAndExpression=function(i,v){var b=this,_=i.split("&&");return r.create(_.map(function(w){return b._deserializeOne(w,v)}))},d._deserializeOne=function(i,v){if(i=i.trim(),i.indexOf("!=")>=0){var b=i.split("!=");return y.create(b[0].trim(),this._deserializeValue(b[1],v))}if(i.indexOf("==")>=0){var b=i.split("==");return m.create(b[0].trim(),this._deserializeValue(b[1],v))}if(i.indexOf("=~")>=0){var b=i.split("=~");return o.create(b[0].trim(),this._deserializeRegexValue(b[1],v))}return/^\!\s*/.test(i)?c.create(i.substr(1).trim()):g.create(i)},d._deserializeValue=function(i,v){if(i=i.trim(),i==="true")return!0;if(i==="false")return!1;var b=/^'([^']*)'$/.exec(i);return b?b[1].trim():i},d._deserializeRegexValue=function(i,v){if(Object(Ne.x)(i)){if(v)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}var b=i.indexOf("/"),_=i.lastIndexOf("/");if(b===_||b<0){if(v)throw new Error("bad regexp-value '"+i+"', missing /-enclosure");return console.warn("bad regexp-value '"+i+"', missing /-enclosure"),null}var w=i.slice(b+1,_),T=i[_+1]==="i"?"i":"";try{return new RegExp(w,T)}catch(C){if(v)throw new Error("bad regexp-value '"+i+"', parse error: "+C);return console.warn("bad regexp-value '"+i+"', parse error: "+C),null}},d}();function R(d,i){var v=d.getType(),b=i.getType();if(v!==b)return v-b;switch(v){case 1:return d.cmp(i);case 2:return d.cmp(i);case 3:return d.cmp(i);case 4:return d.cmp(i);case 6:return d.cmp(i);case 7:return d.cmp(i);case 5:return d.cmp(i);default:throw new Error("Unknown ContextKeyExpr!")}}var g=function(){function d(i){this.key=i}return d.create=function(i){return new d(i)},d.prototype.getType=function(){return 1},d.prototype.cmp=function(i){return this.key<i.key?-1:this.key>i.key?1:0},d.prototype.equals=function(i){return i instanceof d?this.key===i.key:!1},d.prototype.evaluate=function(i){return!!i.getValue(this.key)},d.prototype.keys=function(){return[this.key]},d.prototype.negate=function(){return c.create(this.key)},d}(),m=function(){function d(i,v){this.key=i,this.value=v}return d.create=function(i,v){return typeof v=="boolean"?v?g.create(i):c.create(i):new d(i,v)},d.prototype.getType=function(){return 3},d.prototype.cmp=function(i){return this.key<i.key?-1:this.key>i.key?1:this.value<i.value?-1:this.value>i.value?1:0},d.prototype.equals=function(i){return i instanceof d?this.key===i.key&&this.value===i.value:!1},d.prototype.evaluate=function(i){return i.getValue(this.key)==this.value},d.prototype.keys=function(){return[this.key]},d.prototype.negate=function(){return y.create(this.key,this.value)},d}(),y=function(){function d(i,v){this.key=i,this.value=v}return d.create=function(i,v){return typeof v=="boolean"?v?c.create(i):g.create(i):new d(i,v)},d.prototype.getType=function(){return 4},d.prototype.cmp=function(i){return this.key<i.key?-1:this.key>i.key?1:this.value<i.value?-1:this.value>i.value?1:0},d.prototype.equals=function(i){return i instanceof d?this.key===i.key&&this.value===i.value:!1},d.prototype.evaluate=function(i){return i.getValue(this.key)!=this.value},d.prototype.keys=function(){return[this.key]},d.prototype.negate=function(){return m.create(this.key,this.value)},d}(),c=function(){function d(i){this.key=i}return d.create=function(i){return new d(i)},d.prototype.getType=function(){return 2},d.prototype.cmp=function(i){return this.key<i.key?-1:this.key>i.key?1:0},d.prototype.equals=function(i){return i instanceof d?this.key===i.key:!1},d.prototype.evaluate=function(i){return!i.getValue(this.key)},d.prototype.keys=function(){return[this.key]},d.prototype.negate=function(){return g.create(this.key)},d}(),o=function(){function d(i,v){this.key=i,this.regexp=v}return d.create=function(i,v){return new d(i,v)},d.prototype.getType=function(){return 6},d.prototype.cmp=function(i){if(this.key<i.key)return-1;if(this.key>i.key)return 1;var v=this.regexp?this.regexp.source:"",b=i.regexp?i.regexp.source:"";return v<b?-1:v>b?1:0},d.prototype.equals=function(i){if(i instanceof d){var v=this.regexp?this.regexp.source:"",b=i.regexp?i.regexp.source:"";return this.key===i.key&&v===b}return!1},d.prototype.evaluate=function(i){var v=i.getValue(this.key);return this.regexp?this.regexp.test(v):!1},d.prototype.keys=function(){return[this.key]},d.prototype.negate=function(){return u.create(this)},d}(),u=function(){function d(i){this._actual=i}return d.create=function(i){return new d(i)},d.prototype.getType=function(){return 7},d.prototype.cmp=function(i){return this._actual.cmp(i._actual)},d.prototype.equals=function(i){return i instanceof d?this._actual.equals(i._actual):!1},d.prototype.evaluate=function(i){return!this._actual.evaluate(i)},d.prototype.keys=function(){return this._actual.keys()},d.prototype.negate=function(){return this._actual},d}(),r=function(){function d(i){this.expr=i}return d.create=function(i){var v=d._normalizeArr(i);return v.length===0?void 0:v.length===1?v[0]:new d(v)},d.prototype.getType=function(){return 5},d.prototype.cmp=function(i){if(this.expr.length<i.expr.length)return-1;if(this.expr.length>i.expr.length)return 1;for(var v=0,b=this.expr.length;v<b;v++){var _=R(this.expr[v],i.expr[v]);if(_!==0)return _}return 0},d.prototype.equals=function(i){if(i instanceof d){if(this.expr.length!==i.expr.length)return!1;for(var v=0,b=this.expr.length;v<b;v++)if(!this.expr[v].equals(i.expr[v]))return!1;return!0}return!1},d.prototype.evaluate=function(i){for(var v=0,b=this.expr.length;v<b;v++)if(!this.expr[v].evaluate(i))return!1;return!0},d._normalizeArr=function(i){var v=[];if(i){for(var b=0,_=i.length;b<_;b++){var w=i[b];if(!w)continue;if(w instanceof d){v=v.concat(w.expr);continue}if(w instanceof e)throw new Error('It is not allowed to have an or expression here due to lack of parens! For example "a && (b||c)" is not supported, use "(a&&b) || (a&&c)" instead.');v.push(w)}v.sort(R)}return v},d.prototype.keys=function(){for(var i=[],v=0,b=this.expr;v<b.length;v++){var _=b[v];i.push.apply(i,_.keys())}return i},d.prototype.negate=function(){for(var i=[],v=0,b=this.expr;v<b.length;v++){var _=b[v];i.push(_.negate())}return e.create(i)},d}(),e=function(){function d(i){this.expr=i}return d.create=function(i){var v=d._normalizeArr(i);return v.length===0?void 0:v.length===1?v[0]:new d(v)},d.prototype.getType=function(){return 8},d.prototype.equals=function(i){if(i instanceof d){if(this.expr.length!==i.expr.length)return!1;for(var v=0,b=this.expr.length;v<b;v++)if(!this.expr[v].equals(i.expr[v]))return!1;return!0}return!1},d.prototype.evaluate=function(i){for(var v=0,b=this.expr.length;v<b;v++)if(this.expr[v].evaluate(i))return!0;return!1},d._normalizeArr=function(i){var v=[];if(i){for(var b=0,_=i.length;b<_;b++){var w=i[b];if(!w)continue;if(w instanceof d){v=v.concat(w.expr);continue}v.push(w)}v.sort(R)}return v},d.prototype.keys=function(){for(var i=[],v=0,b=this.expr;v<b.length;v++){var _=b[v];i.push.apply(i,_.keys())}return i},d.prototype.negate=function(){for(var i=[],v=0,b=this.expr;v<b.length;v++){var _=b[v];i.push(_.negate())}for(var w=function(G){return G instanceof d?G.expr:[G]};i.length>1;){for(var T=i.shift(),C=i.shift(),S=[],W=0,N=w(T);W<N.length;W++)for(var E=N[W],K=0,z=w(C);K<z.length;K++){var M=z[K];S.push(l.and(E,M))}i.unshift(l.or.apply(l,S))}return i[0]},d}(),n=function(d){De(i,d);function i(v,b){var _=d.call(this,v)||this;return _._defaultValue=b,_}return i.prototype.bindTo=function(v){return v.createKey(this.key,this._defaultValue)},i.prototype.getValue=function(v){return v.getContextKeyValue(this.key)},i.prototype.toNegated=function(){return l.not(this.key)},i}(g),a=Object(Pe.c)("contextKeyService"),p="setContext"},WdTA:function(lt,Me,ne){lt.exports=ne.p+"static/studnetqun.598eeb43.png"},Y1PL:function(lt,Me,ne){"use strict";ne.r(Me),ne.d(Me,"ResizableTextArea",function(){return V});var Ne=ne("wx14"),Pe=ne("1OyB"),De=ne("vuIU"),l=ne("Ji7U"),R=ne("LK+K"),g=ne("q1tI"),m=ne("VTBJ"),y=ne("rePB"),c=ne("Zm9Q"),o=ne("Kwbf"),u=ne("c+Xe"),r=ne("m+aA"),e=ne("bdgK"),n=new Map;function a(oe){oe.forEach(function(we){var ge,Ae=we.target;(ge=n.get(Ae))===null||ge===void 0||ge.forEach(function(me){return me(Ae)})})}var p=new e.default(a),d=null,i=null;function v(oe,we){n.has(oe)||(n.set(oe,new Set),p.observe(oe)),n.get(oe).add(we)}function b(oe,we){n.has(oe)&&(n.get(oe).delete(we),n.get(oe).size||(p.unobserve(oe),n.delete(oe)))}var _=function(oe){Object(l.a)(ge,oe);var we=Object(R.a)(ge);function ge(){return Object(Pe.a)(this,ge),we.apply(this,arguments)}return Object(De.a)(ge,[{key:"render",value:function(){return this.props.children}}]),ge}(g.Component),w=g.createContext(null);function T(oe){var we=oe.children,ge=oe.onBatchResize,Ae=g.useRef(0),me=g.useRef([]),ye=g.useContext(w),ue=g.useCallback(function(ae,ee,Ee){Ae.current+=1;var F=Ae.current;me.current.push({size:ae,element:ee,data:Ee}),Promise.resolve().then(function(){F===Ae.current&&(ge==null||ge(me.current),me.current=[])}),ye==null||ye(ae,ee,Ee)},[ge,ye]);return g.createElement(w.Provider,{value:ue},we)}function C(oe){var we=oe.children,ge=oe.disabled,Ae=g.useRef(null),me=g.useRef(null),ye=g.useContext(w),ue=g.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),ae=g.isValidElement(we)&&Object(u.c)(we),ee=ae?we.ref:null,Ee=g.useMemo(function(){return Object(u.a)(ee,Ae)},[ee,Ae]),F=g.useRef(oe);F.current=oe;var j=g.useCallback(function(de){var be=F.current,Te=be.onResize,I=be.data,t=de.getBoundingClientRect(),h=t.width,L=t.height,A=de.offsetWidth,k=de.offsetHeight,le=Math.floor(h),_e=Math.floor(L);if(ue.current.width!==le||ue.current.height!==_e||ue.current.offsetWidth!==A||ue.current.offsetHeight!==k){var Ge={width:le,height:_e,offsetWidth:A,offsetHeight:k};ue.current=Ge;var ze=A===Math.round(h)?h:A,Fe=k===Math.round(L)?L:k,Ke=Object(m.a)(Object(m.a)({},Ge),{},{offsetWidth:ze,offsetHeight:Fe});ye==null||ye(Ke,de,I),Te&&Promise.resolve().then(function(){Te(Ke,de)})}},[]);return g.useEffect(function(){var de=Object(r.a)(Ae.current)||Object(r.a)(me.current);return de&&!ge&&v(de,j),function(){return b(de,j)}},[Ae.current,ge]),g.createElement(_,{ref:me},ae?g.cloneElement(we,{ref:Ee}):we)}var S="rc-observer-key";function W(oe){var we=oe.children,ge=Object(c.a)(we);return ge.map(function(Ae,me){var ye=(Ae==null?void 0:Ae.key)||"".concat(S,"-").concat(me);return g.createElement(C,Object(Ne.a)({},oe,{key:ye}),Ae)})}W.Collection=T;var N=W,E=ne("bT9E"),K=ne("TSYQ"),z=ne.n(K),M=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important
|
|
|
`,G=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],J={},te;function re(oe){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ge=oe.getAttribute("id")||oe.getAttribute("data-reactid")||oe.getAttribute("name");if(we&&J[ge])return J[ge];var Ae=window.getComputedStyle(oe),me=Ae.getPropertyValue("box-sizing")||Ae.getPropertyValue("-moz-box-sizing")||Ae.getPropertyValue("-webkit-box-sizing"),ye=parseFloat(Ae.getPropertyValue("padding-bottom"))+parseFloat(Ae.getPropertyValue("padding-top")),ue=parseFloat(Ae.getPropertyValue("border-bottom-width"))+parseFloat(Ae.getPropertyValue("border-top-width")),ae=G.map(function(Ee){return"".concat(Ee,":").concat(Ae.getPropertyValue(Ee))}).join(";"),ee={sizingStyle:ae,paddingSize:ye,borderSize:ue,boxSizing:me};return we&&ge&&(J[ge]=ee),ee}function se(oe){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ae=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;te||(te=document.createElement("textarea"),te.setAttribute("tab-index","-1"),te.setAttribute("aria-hidden","true"),document.body.appendChild(te)),oe.getAttribute("wrap")?te.setAttribute("wrap",oe.getAttribute("wrap")):te.removeAttribute("wrap");var me=re(oe,we),ye=me.paddingSize,ue=me.borderSize,ae=me.boxSizing,ee=me.sizingStyle;te.setAttribute("style","".concat(ee,";").concat(M)),te.value=oe.value||oe.placeholder||"";var Ee=Number.MIN_SAFE_INTEGER,F=Number.MAX_SAFE_INTEGER,j=te.scrollHeight,de;if(ae==="border-box"?j+=ue:ae==="content-box"&&(j-=ye),ge!==null||Ae!==null){te.value=" ";var be=te.scrollHeight-ye;ge!==null&&(Ee=be*ge,ae==="border-box"&&(Ee=Ee+ye+ue),j=Math.max(Ee,j)),Ae!==null&&(F=be*Ae,ae==="border-box"&&(F=F+ye+ue),de=j>F?"":"hidden",j=Math.min(F,j))}return{height:j,minHeight:Ee,maxHeight:F,overflowY:de,resize:"none"}}var H=ne("Gytx"),he=ne.n(H),Z;(function(oe){oe[oe.NONE=0]="NONE",oe[oe.RESIZING=1]="RESIZING",oe[oe.RESIZED=2]="RESIZED"})(Z||(Z={}));var $=function(oe){Object(l.a)(ge,oe);var we=Object(R.a)(ge);function ge(Ae){var me;return Object(Pe.a)(this,ge),me=we.call(this,Ae),me.nextFrameActionId=void 0,me.resizeFrameId=void 0,me.textArea=void 0,me.saveTextArea=function(ye){me.textArea=ye},me.handleResize=function(ye){var ue=me.state.resizeStatus,ae=me.props,ee=ae.autoSize,Ee=ae.onResize;if(ue!==Z.NONE)return;typeof Ee=="function"&&Ee(ye),ee&&me.resizeOnNextFrame()},me.resizeOnNextFrame=function(){cancelAnimationFrame(me.nextFrameActionId),me.nextFrameActionId=requestAnimationFrame(me.resizeTextarea)},me.resizeTextarea=function(){var ye=me.props.autoSize;if(!ye||!me.textArea)return;var ue=ye.minRows,ae=ye.maxRows,ee=se(me.textArea,!1,ue,ae);me.setState({textareaStyles:ee,resizeStatus:Z.RESIZING},function(){cancelAnimationFrame(me.resizeFrameId),me.resizeFrameId=requestAnimationFrame(function(){me.setState({resizeStatus:Z.RESIZED},function(){me.resizeFrameId=requestAnimationFrame(function(){me.setState({resizeStatus:Z.NONE}),me.fixFirefoxAutoScroll()})})})})},me.renderTextArea=function(){var ye=me.props,ue=ye.prefixCls,ae=ue===void 0?"rc-textarea":ue,ee=ye.autoSize,Ee=ye.onResize,F=ye.className,j=ye.disabled,de=me.state,be=de.textareaStyles,Te=de.resizeStatus,I=Object(E.a)(me.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),t=z()(ae,F,Object(y.a)({},"".concat(ae,"-disabled"),j));"value"in I&&(I.value=I.value||"");var h=Object(m.a)(Object(m.a)(Object(m.a)({},me.props.style),be),Te===Z.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return g.createElement(N,{onResize:me.handleResize,disabled:!(ee||Ee)},g.createElement("textarea",Object(Ne.a)({},I,{className:t,style:h,ref:me.saveTextArea})))},me.state={textareaStyles:{},resizeStatus:Z.NONE},me}return Object(De.a)(ge,[{key:"componentDidUpdate",value:function(me){(me.value!==this.props.value||!he()(me.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var me=this.textArea.selectionStart,ye=this.textArea.selectionEnd;this.textArea.setSelectionRange(me,ye)}}catch(ue){}}},{key:"render",value:function(){return this.renderTextArea()}}]),ge}(g.Component),V=$,X=function(oe){Object(l.a)(ge,oe);var we=Object(R.a)(ge);function ge(Ae){var me;Object(Pe.a)(this,ge),me=we.call(this,Ae),me.resizableTextArea=void 0,me.focus=function(){me.resizableTextArea.textArea.focus()},me.saveTextArea=function(ue){me.resizableTextArea=ue},me.handleChange=function(ue){var ae=me.props.onChange;me.setValue(ue.target.value,function(){me.resizableTextArea.resizeTextarea()}),ae&&ae(ue)},me.handleKeyDown=function(ue){var ae=me.props,ee=ae.onPressEnter,Ee=ae.onKeyDown;ue.keyCode===13&&ee&&ee(ue),Ee&&Ee(ue)};var ye=typeof Ae.value=="undefined"||Ae.value===null?Ae.defaultValue:Ae.value;return me.state={value:ye},me}return Object(De.a)(ge,[{key:"setValue",value:function(me,ye){"value"in this.props||this.setState({value:me},ye)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return g.createElement(V,Object(Ne.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(me){return"value"in me?{value:me.value}:null}}]),ge}(g.Component),Q=Me.default=X},ZW9T:function(lt,Me,ne){"use strict";ne.d(Me,"a",function(){return N});var Ne=ne("k1fw"),Pe=ne("oBTY"),De=ne("9og8"),l=ne("miYZ"),R=ne("tsqr"),g=ne("rAM+"),m=ne("tJVT"),y=ne("PpiC"),c=ne("WmNS"),o=ne.n(c),u=ne("q1tI"),r=ne.n(u),e=ne("bdgK");function n(E,K,z,M,G){var J=K.getWordUntilPosition(z),te={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:J.startColumn,endColumn:J.endColumn},re=M.map(function(se){return{label:se,kind:E.languages.CompletionItemKind.Keyword,insertText:se,insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:te}});return G.map(function(se){re.push(Object(Ne.a)(Object(Ne.a)({},se),{},{range:te}))}),re}var a=function(E){var K={label:"ifelse",kind:E.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`),insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet},z=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];E.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(te,re){var se=n(E,te,re,z,[K]);return{suggestions:se}}});var M=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];E.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(te,re){var se=[{label:"print",kind:E.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
|
`),insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet}],H=n(E,te,re,M,se);return{suggestions:H}}});var G=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];E.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(te,re){var se=[K,{label:"main",kind:E.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
|
|
|
`),insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:E.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
|
|
|
`),insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet}],H=n(E,te,re,G,se);return{suggestions:H}}})},p="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",d=ne("fjLI"),i=ne("LvDl"),v=ne("+ua5");function b(E){return/^\d+$/.test(E)?"".concat(E,"px"):E}function _(){}var w=!1,T={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale"};function C(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],K=E;if(Array.isArray(E)){for(var z=0;z<E.length;z++){var M=T[E[z]];if(M)return M}return K[0]}return T[K]||K}var S=null,W=Me.b=function(E){var K=E.width,z=K===void 0?"100%":K,M=E.height,G=M===void 0?"100%":M,J=E.value,te=E.language,re=te===void 0?"javascript":te,se=E.style,H=se===void 0?{}:se,he=E.options,Z=he===void 0?{}:he,$=E.overrideServices,V=$===void 0?{}:$,X=E.theme,Q=X===void 0?"vs-dark":X,oe=E.onEditBlur,we=E.onSave,ge=E.autoHeight,Ae=ge===void 0?!1:ge,me=E.forbidCopy,ye=me===void 0?!1:me,ue=E.onChange,ae=ue===void 0?_:ue,ee=E.editorDidMount,Ee=ee===void 0?_:ee,F=E.onFocus,j=F===void 0?_:F,de=E.onBreakPoint,be=de===void 0?_:de,Te=E.breakPointValue,I=Te===void 0?[]:Te,t=E.filename,h=t===void 0?"educoder.txt":t,L=E.errorLine,A=E.errorContent,k=A===void 0?"":A,le=E.highlightLine,_e=E.openBreakPoint,Ge=_e===void 0?!1:_e,ze=Object(y.a)(E,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint"]),Fe=Object(u.useRef)(),Ke=Object(u.useRef)({}),ot=Object(u.useRef)(),Be=Object(u.useRef)(),je=Object(u.useRef)([]),ke=Object(u.useRef)(!1),Le=Object(u.useRef)(),Oe=Object(u.useState)(!1),pe=Object(m.a)(Oe,2),ve=pe[0],Ce=pe[1];function xe(){var pt;return Fe.current&&(pt=new e.default(function(ct){var dt=Object(g.a)(ct),Ct;try{for(dt.s();!(Ct=dt.n()).done;){var fe=Ct.value;(fe.target.offsetHeight>0||fe.target.offsetWidth>0)&&Ke.current.instance.layout()}}catch(ie){dt.e(ie)}finally{dt.f()}}),pt.observe(Fe.current)),pt}function Ue(){R.b.warn({content:decodeURIComponent(p),key:"monaco-editor-tip"})}var Xe=function(){var ct=Ke.current.instance;if(J!=null&&ct&&ve){var dt=ct.getModel();dt&&J!==dt.getValue()&&(w=!0,dt.setValue(J),ct.layout(),w=!1)}};Object(u.useEffect)(function(){try{var pt,ct=Ke.current.instance;Be.current&&clearTimeout(Be.current),Be.current=setTimeout(function(){Xe()},500),ct==null||((pt=ct.updateOptions)===null||pt===void 0)||pt.call(ct,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(J.split(/\r\n|\r|\n/g).length))+3,5)})}catch(dt){debugger}},[J,ve,Ke.current]),Object(u.useEffect)(function(){try{if(L&&Ke.current&&Ke.current.instance){var pt=Ke.current.instance;pt.changeViewZones(function(dt){var Ct=document.createElement("div");Ct.style.padding="10px 20px",Ct.style.width="calc(100% - 20px)",Ct.className="my-error-line-wrp",Ct.innerHTML=k,dt.addZone({afterLineNumber:L||11,heightInLines:3,domNode:Ct})});var ct={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};pt.addOverlayWidget(ct),pt.revealPositionInCenter({lineNumber:20,column:1})}}catch(dt){debugger}},[L,Ke.current,ve]),Object(u.useEffect)(function(){var pt;if((pt=Ke.current)!==null&&pt!==void 0&&pt.instance&&ve&&Ge){var ct=Ke.current.instance,dt=ct.getModel();if(!dt)return;var Ct=function(){var nt=[],Qe=[],We=dt.getAllDecorations(),it=Object(g.a)(We),$e;try{for(it.s();!($e=it.n()).done;){var O=$e.value;if(O.options.className==="highlighted-line"){var s;nt.push(O==null||((s=O.range)===null||s===void 0)?void 0:s.startLineNumber),Qe.push(O==null?void 0:O.id)}}}catch(D){it.e(D)}finally{it.f()}dt.deltaDecorations(Qe,[]);var f=dt.getLineCount();!!le&&le<=f&&(ct.deltaDecorations([],[{range:new S.Range(le,1,le,dt.getLineMaxColumn(le)),options:{isWholeLine:!0,className:"highlighted-line"}}]),ct.revealLineInCenter(le))};Ct();var fe=function(){var nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Qe=[],We=[],it=dt.getAllDecorations(),$e=Object(g.a)(it),O;try{for($e.s();!(O=$e.n()).done;){var s=O.value;if(s.options.linesDecorationsClassName==="breakpoints"){var f;Qe.push(s==null||((f=s.range)===null||f===void 0)?void 0:f.startLineNumber),We.push(s==null?void 0:s.id)}}}catch(D){$e.e(D)}finally{$e.f()}if(nt)return{lines:Qe,ids:We};be(Qe)},ie=function(){var He=Object(De.a)(o.a.mark(function nt(Qe){var We;return o.a.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return We={range:new S.Range(Qe,1,Qe,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints"}},$e.next=3,dt.deltaDecorations([],[We]);case 3:fe();case 4:case"end":return $e.stop()}},nt)}));return function(Qe){return He.apply(this,arguments)}}(),x=function(){var He=Object(De.a)(o.a.mark(function nt(Qe){var We,it,$e,O,s;return o.a.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:We=[],it=ct.getLineDecorations(Qe),$e=Object(g.a)(it);try{for($e.s();!(O=$e.n()).done;)s=O.value,s.options.linesDecorationsClassName==="breakpoints"&&We.push(s.id)}catch(Y){$e.e(Y)}finally{$e.f()}return D.next=6,dt.deltaDecorations(We,[]);case 6:fe();case 7:case"end":return D.stop()}},nt)}));return function(Qe){return He.apply(this,arguments)}}(),P=function(nt){var Qe=ct.getLineDecorations(nt),We=Object(g.a)(Qe),it;try{for(We.s();!(it=We.n()).done;){var $e=it.value;if($e.options.linesDecorationsClassName==="breakpoints")return!0}}catch(O){We.e(O)}finally{We.f()}return!1};if(!Object(i.isEqual)(I,fe(!0).lines)){dt.deltaDecorations(fe(!0).ids,[]);var B=I.map(function(He){return{range:new S.Range(He,1,He,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints"}}});dt.deltaDecorations([],B)}var q=ct.onDidChangeModelContent(function(He){var nt=ct.getPosition();if(nt){var Qe=nt.lineNumber;dt.getLineContent(Qe).trim()===""?x(Qe):P(Qe)&&(x(Qe),ie(Qe))}}),ce=ct.onMouseDown(function(He){var nt,Qe,We;if(He.target.detail&&(nt=He.target)!==null&&nt!==void 0&&(Qe=nt.element)!==null&&Qe!==void 0&&(We=Qe.className)!==null&&We!==void 0&&We.includes("line-numbers")){var it=He.target.position.lineNumber;if(dt.getLineContent(it).trim()==="")return;P(it)?x(it):ie(it)}}),Re=function(nt){var Qe={range:new S.Range(nt,1,nt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};je.current=ct.deltaDecorations(je.current,[Qe])},Ie=function(){je.current=ct.deltaDecorations(je.current,[])},qe=ct.onMouseMove(function(He){var nt,Qe,We;if(Ie(),He.target.detail&&(nt=He.target)!==null&&nt!==void 0&&(Qe=nt.element)!==null&&Qe!==void 0&&(We=Qe.className)!==null&&We!==void 0&&We.includes("line-numbers")){var it=He.target.position.lineNumber;if(dt.getLineContent(it).trim()==="")return;Re(it)}}),Je=ct.onMouseLeave(function(){Ie()});return function(){q.dispose(),ce.dispose(),qe.dispose(),Je.dispose()}}},[Ke.current,ve,I,le,Ge]);function rt(){var pt=Ke.current.instance;if(pt){var ct=pt.getSelection(),dt=Ke.current.pastePos||{},Ct=new S.Range(dt.startLineNumber||ct.endLineNumber,dt.startColumn||ct.endColumn,dt.endLineNumber||ct.endLineNumber,dt.endColumn||ct.endColumn);setTimeout(function(){pt.executeEdits("",[{range:Ct,text:""}])},300)}}function bt(pt){(window.navigator.platform.match("Mac")?pt.metaKey:pt.ctrlKey)&&pt.keyCode==83&&(pt.preventDefault(),we())}var Et=function(){if(Ae&&Ke.current.instance){var ct=Ke.current.instance.getContentHeight();At(ct<G?G:ct)}else At(G)};function _t(pt){var ct=document.createEvent("MouseEvents");ct.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),pt.dispatchEvent(ct)}var vt=function(ct){var dt=ct.keyCode,Ct=ct.ctrlKey,fe=ct.metaKey,ie=ct.target,x=ct.type;return(x==="paste"||(dt===67||dt===86)&&(fe||Ct))&&ie.nodeName==="TEXTAREA"&&(Ue(),ct.preventDefault()),!1};function et(pt,ct){var dt=window.URL||window.webkitURL||window,Ct=new Blob([ct]),fe=document.createElementNS("http://www.w3.org/1999/xhtml","a");fe.href=dt.createObjectURL(Ct),fe.download=pt,_t(fe)}Object(u.useEffect)(function(){Et()},[Et]),Object(u.useEffect)(function(){Fe.current&&!ve&&ne.e(27).then(ne.t.bind(null,"M/lh",7)).then(function(pt){try{S=pt,Ke.current.instance=S.editor.create(Fe.current,{value:J,language:C(re),theme:Q,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},V);var ct=Ke.current.instance,dt=d.c._menuItems,Ct=Object(Pe.a)(dt).find(function(ie){return ie[0]._debugName=="EditorContext"});if(Ee(ct,S),setTimeout(function(){Et(),Ke.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){et(h||"educoder.txt",ct.getValue())}}),ct.getDomNode().addEventListener("input",function(){ot.current.autoFormat&&ct.getAction("editor.action.formatDocument").run()})},500),Ke.current.subscription=ct.onDidChangeModelContent(function(ie){debugger;ke.current?clearTimeout(Le.current):(Et(),ae(ct.getValue(),ie)),Le.current=setTimeout(function(){ke.current=!1},500)}),window.Monaco||a(S,C(re)),ye&&(Fe.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",vt),window.removeEventListener("paste",vt),window.addEventListener("keydown",vt),window.addEventListener("paste",vt)),window.Monaco=S,oe&&ct.onDidBlurEditorWidget(function(){oe(ct.getValue())}),j&&ct.onDidFocusEditorText(function(){j(ct.getValue())}),ye)try{window.addEventListener("paste",rt)}catch(ie){}var fe=xe();return Ce(!0),function(){var ie=Ke.current.instance;ie.dispose();var x=ie.getModel();x&&x.dispose(),Ke.current.subscription&&Ke.current.subscription.dispose(),ye&&window.removeEventListener("paste",rt),fe.unobserve(Fe.current)}}catch(ie){debugger}})},[]),Object(u.useEffect)(function(){var pt=Ke.current.instance;if(pt&&ve)return document.addEventListener("keydown",bt,!1),function(){document.removeEventListener("keydown",bt)}},[we,ve]),Object(u.useEffect)(function(){var pt=Ke.current.instance;if(pt&&ve){var ct=C(re);S.editor.setModelLanguage(pt.getModel(),ct)}},[re,ve]),Object(u.useEffect)(function(){var pt=Ke.current.instance;pt&&ve&&S.editor.setTheme(Q)},[Q,ve]),Object(u.useEffect)(function(){var pt=Ke.current.instance;ot.current=Z,pt&&ve&&(pt.updateOptions(Object(Ne.a)({},Z)),setTimeout(function(){pt.getModel().updateOptions(Object(Ne.a)({},Z))},200))},[JSON.stringify(Z),ve]),Object(u.useEffect)(function(){var pt=Ke.current.instance;pt&&ve&&pt.layout()},[z,G,ve]);var Ye=Object(u.useState)(b(z)),ut=Object(m.a)(Ye,2),st=ut[0],gt=ut[1],yt=Object(u.useState)(b(G)),ft=Object(m.a)(yt,2),xt=ft[0],At=ft[1],at=Object(Ne.a)(Object(Ne.a)({},H),{},{width:st,height:xt});return r.a.createElement("div",{className:"my-monaco-editor",ref:Fe,style:at})};function N(E){var K=E.width,z=K===void 0?"100%":K,M=E.height,G=M===void 0?"100%":M,J=E.original,te=E.modified,re=E.language,se=E.options,H=se===void 0?{}:se,he=Object(u.useRef)(),Z=Object(u.useState)(null),$=Object(m.a)(Z,2),V=$[0],X=$[1];function Q(Ae){var me;return he.current&&(me=new e.default(function(ye){var ue=Object(g.a)(ye),ae;try{for(ue.s();!(ae=ue.n()).done;){var ee=ae.value;(ee.target.offsetHeight>0||ee.target.offsetWidth>0)&&Ae.layout()}}catch(Ee){ue.e(Ee)}finally{ue.f()}}),me.observe(he.current)),me}Object(u.useEffect)(function(){return he.current&&ne.e(27).then(ne.t.bind(null,"M/lh",7)).then(function(Ae){S=Ae;var me=S.editor.createDiffEditor(he.current,Object(Ne.a)(Object(Ne.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},H),{},{wordWrap:!0}));X(me);var ye=Q(me);return function(){me.dispose();var ue=me.getModel();ue&&ue.dispose(),ye.unobserve(he.current)}}),function(){window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}},[]),Object(u.useEffect)(function(){V&&V.setModel({original:S.editor.createModel(J,re),modified:S.editor.createModel(te,re)})},[J,te,re,V]);var oe=b(z),we=b(G),ge={width:oe,height:we};return r.a.createElement("div",{className:"my-diff-editor",ref:he,style:ge})}},ZpRC:function(lt,Me,ne){"use strict";function Ne(u){return typeof u=="object"&&u!=null&&u.nodeType===1}function Pe(u,r){return(!r||u!=="hidden")&&u!=="visible"&&u!=="clip"}function De(u,r){if(u.clientHeight<u.scrollHeight||u.clientWidth<u.scrollWidth){var e=getComputedStyle(u,null);return Pe(e.overflowY,r)||Pe(e.overflowX,r)||function(n){var a=function(p){if(!p.ownerDocument||!p.ownerDocument.defaultView)return null;try{return p.ownerDocument.defaultView.frameElement}catch(d){return null}}(n);return!!a&&(a.clientHeight<n.scrollHeight||a.clientWidth<n.scrollWidth)}(u)}return!1}function l(u,r,e,n,a,p,d,i){return p<u&&d>r||p>u&&d<r?0:p<=u&&i<=e||d>=r&&i>=e?p-u-n:d>r&&i<e||p<u&&i>e?d-r+a:0}var R=function(u,r){var e=window,n=r.scrollMode,a=r.block,p=r.inline,d=r.boundary,i=r.skipOverflowHiddenElements,v=typeof d=="function"?d:function(be){return be!==d};if(!Ne(u))throw new TypeError("Invalid target");for(var b=document.scrollingElement||document.documentElement,_=[],w=u;Ne(w)&&v(w);){if((w=w.parentElement)===b){_.push(w);break}w!=null&&w===document.body&&De(w)&&!De(document.documentElement)||w!=null&&De(w,i)&&_.push(w)}for(var T=e.visualViewport?e.visualViewport.width:innerWidth,C=e.visualViewport?e.visualViewport.height:innerHeight,S=window.scrollX||pageXOffset,W=window.scrollY||pageYOffset,N=u.getBoundingClientRect(),E=N.height,K=N.width,z=N.top,M=N.right,G=N.bottom,J=N.left,te=a==="start"||a==="nearest"?z:a==="end"?G:z+E/2,re=p==="center"?J+K/2:p==="end"?M:J,se=[],H=0;H<_.length;H++){var he=_[H],Z=he.getBoundingClientRect(),$=Z.height,V=Z.width,X=Z.top,Q=Z.right,oe=Z.bottom,we=Z.left;if(n==="if-needed"&&z>=0&&J>=0&&G<=C&&M<=T&&z>=X&&G<=oe&&J>=we&&M<=Q)return se;var ge=getComputedStyle(he),Ae=parseInt(ge.borderLeftWidth,10),me=parseInt(ge.borderTopWidth,10),ye=parseInt(ge.borderRightWidth,10),ue=parseInt(ge.borderBottomWidth,10),ae=0,ee=0,Ee="offsetWidth"in he?he.offsetWidth-he.clientWidth-Ae-ye:0,F="offsetHeight"in he?he.offsetHeight-he.clientHeight-me-ue:0;if(b===he)ae=a==="start"?te:a==="end"?te-C:a==="nearest"?l(W,W+C,C,me,ue,W+te,W+te+E,E):te-C/2,ee=p==="start"?re:p==="center"?re-T/2:p==="end"?re-T:l(S,S+T,T,Ae,ye,S+re,S+re+K,K),ae=Math.max(0,ae+W),ee=Math.max(0,ee+S);else{ae=a==="start"?te-X-me:a==="end"?te-oe+ue+F:a==="nearest"?l(X,oe,$,me,ue+F,te,te+E,E):te-(X+$/2)+F/2,ee=p==="start"?re-we-Ae:p==="center"?re-(we+V/2)+Ee/2:p==="end"?re-Q+ye+Ee:l(we,Q,V,Ae,ye+Ee,re,re+K,K);var j=he.scrollLeft,de=he.scrollTop;te+=de-(ae=Math.max(0,Math.min(de+ae,he.scrollHeight-$+F))),re+=j-(ee=Math.max(0,Math.min(j+ee,he.scrollWidth-V+Ee)))}se.push({el:he,top:ae,left:ee})}return se};function g(u){return u===Object(u)&&Object.keys(u).length!==0}function m(u,r){r===void 0&&(r="auto");var e="scrollBehavior"in document.body.style;u.forEach(function(n){var a=n.el,p=n.top,d=n.left;a.scroll&&e?a.scroll({top:p,left:d,behavior:r}):(a.scrollTop=p,a.scrollLeft=d)})}function y(u){return u===!1?{block:"end",inline:"nearest"}:g(u)?u:{block:"start",inline:"nearest"}}function c(u,r){var e=!u.ownerDocument.documentElement.contains(u);if(g(r)&&typeof r.behavior=="function")return r.behavior(e?[]:R(u,r));if(e)return;var n=y(r);return m(R(u,n),n.behavior)}var o=Me.a=c},Zss7:function(lt,Me,ne){var Ne;(function(Pe){var De=/^\s+/,l=/\s+$/,R=0,g=Pe.round,m=Pe.min,y=Pe.max,c=Pe.random;function o(ue,ae){if(ue=ue||"",ae=ae||{},ue instanceof o)return ue;if(!(this instanceof o))return new o(ue,ae);var ee=u(ue);this._originalInput=ue,this._r=ee.r,this._g=ee.g,this._b=ee.b,this._a=ee.a,this._roundA=g(100*this._a)/100,this._format=ae.format||ee.format,this._gradientType=ae.gradientType,this._r<1&&(this._r=g(this._r)),this._g<1&&(this._g=g(this._g)),this._b<1&&(this._b=g(this._b)),this._ok=ee.ok,this._tc_id=R++}o.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var ue=this.toRgb();return(ue.r*299+ue.g*587+ue.b*114)/1e3},getLuminance:function(){var ue=this.toRgb(),ae,ee,Ee,F,j,de;return ae=ue.r/255,ee=ue.g/255,Ee=ue.b/255,ae<=.03928?F=ae/12.92:F=Pe.pow((ae+.055)/1.055,2.4),ee<=.03928?j=ee/12.92:j=Pe.pow((ee+.055)/1.055,2.4),Ee<=.03928?de=Ee/12.92:de=Pe.pow((Ee+.055)/1.055,2.4),.2126*F+.7152*j+.0722*de},setAlpha:function(ue){return this._a=se(ue),this._roundA=g(100*this._a)/100,this},toHsv:function(){var ue=a(this._r,this._g,this._b);return{h:ue.h*360,s:ue.s,v:ue.v,a:this._a}},toHsvString:function(){var ue=a(this._r,this._g,this._b),ae=g(ue.h*360),ee=g(ue.s*100),Ee=g(ue.v*100);return this._a==1?"hsv("+ae+", "+ee+"%, "+Ee+"%)":"hsva("+ae+", "+ee+"%, "+Ee+"%, "+this._roundA+")"},toHsl:function(){var ue=e(this._r,this._g,this._b);return{h:ue.h*360,s:ue.s,l:ue.l,a:this._a}},toHslString:function(){var ue=e(this._r,this._g,this._b),ae=g(ue.h*360),ee=g(ue.s*100),Ee=g(ue.l*100);return this._a==1?"hsl("+ae+", "+ee+"%, "+Ee+"%)":"hsla("+ae+", "+ee+"%, "+Ee+"%, "+this._roundA+")"},toHex:function(ue){return d(this._r,this._g,this._b,ue)},toHexString:function(ue){return"#"+this.toHex(ue)},toHex8:function(ue){return i(this._r,this._g,this._b,this._a,ue)},toHex8String:function(ue){return"#"+this.toHex8(ue)},toRgb:function(){return{r:g(this._r),g:g(this._g),b:g(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+g(this._r)+", "+g(this._g)+", "+g(this._b)+")":"rgba("+g(this._r)+", "+g(this._g)+", "+g(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:g(H(this._r,255)*100)+"%",g:g(H(this._g,255)*100)+"%",b:g(H(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+g(H(this._r,255)*100)+"%, "+g(H(this._g,255)*100)+"%, "+g(H(this._b,255)*100)+"%)":"rgba("+g(H(this._r,255)*100)+"%, "+g(H(this._g,255)*100)+"%, "+g(H(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:te[d(this._r,this._g,this._b,!0)]||!1},toFilter:function(ue){var ae="#"+v(this._r,this._g,this._b,this._a),ee=ae,Ee=this._gradientType?"GradientType = 1, ":"";if(ue){var F=o(ue);ee="#"+v(F._r,F._g,F._b,F._a)}return"progid:DXImageTransform.Microsoft.gradient("+Ee+"startColorstr="+ae+",endColorstr="+ee+")"},toString:function(ue){var ae=!!ue;ue=ue||this._format;var ee=!1,Ee=this._a<1&&this._a>=0,F=!ae&&Ee&&(ue==="hex"||ue==="hex6"||ue==="hex3"||ue==="hex4"||ue==="hex8"||ue==="name");return F?ue==="name"&&this._a===0?this.toName():this.toRgbString():(ue==="rgb"&&(ee=this.toRgbString()),ue==="prgb"&&(ee=this.toPercentageRgbString()),(ue==="hex"||ue==="hex6")&&(ee=this.toHexString()),ue==="hex3"&&(ee=this.toHexString(!0)),ue==="hex4"&&(ee=this.toHex8String(!0)),ue==="hex8"&&(ee=this.toHex8String()),ue==="name"&&(ee=this.toName()),ue==="hsl"&&(ee=this.toHslString()),ue==="hsv"&&(ee=this.toHsvString()),ee||this.toHexString())},clone:function(){return o(this.toString())},_applyModification:function(ue,ae){var ee=ue.apply(null,[this].concat([].slice.call(ae)));return this._r=ee._r,this._g=ee._g,this._b=ee._b,this.setAlpha(ee._a),this},lighten:function(){return this._applyModification(T,arguments)},brighten:function(){return this._applyModification(C,arguments)},darken:function(){return this._applyModification(S,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(w,arguments)},spin:function(){return this._applyModification(W,arguments)},_applyCombination:function(ue,ae){return ue.apply(null,[this].concat([].slice.call(ae)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(N,arguments)},monochromatic:function(){return this._applyCombination(G,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(K,arguments)}},o.fromRatio=function(ue,ae){if(typeof ue=="object"){var ee={};for(var Ee in ue)ue.hasOwnProperty(Ee)&&(Ee==="a"?ee[Ee]=ue[Ee]:ee[Ee]=Q(ue[Ee]));ue=ee}return o(ue,ae)};function u(ue){var ae={r:0,g:0,b:0},ee=1,Ee=null,F=null,j=null,de=!1,be=!1;return typeof ue=="string"&&(ue=me(ue)),typeof ue=="object"&&(Ae(ue.r)&&Ae(ue.g)&&Ae(ue.b)?(ae=r(ue.r,ue.g,ue.b),de=!0,be=String(ue.r).substr(-1)==="%"?"prgb":"rgb"):Ae(ue.h)&&Ae(ue.s)&&Ae(ue.v)?(Ee=Q(ue.s),F=Q(ue.v),ae=p(ue.h,Ee,F),de=!0,be="hsv"):Ae(ue.h)&&Ae(ue.s)&&Ae(ue.l)&&(Ee=Q(ue.s),j=Q(ue.l),ae=n(ue.h,Ee,j),de=!0,be="hsl"),ue.hasOwnProperty("a")&&(ee=ue.a)),ee=se(ee),{ok:de,format:ue.format||be,r:m(255,y(ae.r,0)),g:m(255,y(ae.g,0)),b:m(255,y(ae.b,0)),a:ee}}function r(ue,ae,ee){return{r:H(ue,255)*255,g:H(ae,255)*255,b:H(ee,255)*255}}function e(ue,ae,ee){ue=H(ue,255),ae=H(ae,255),ee=H(ee,255);var Ee=y(ue,ae,ee),F=m(ue,ae,ee),j,de,be=(Ee+F)/2;if(Ee==F)j=de=0;else{var Te=Ee-F;de=be>.5?Te/(2-Ee-F):Te/(Ee+F);switch(Ee){case ue:j=(ae-ee)/Te+(ae<ee?6:0);break;case ae:j=(ee-ue)/Te+2;break;case ee:j=(ue-ae)/Te+4;break}j/=6}return{h:j,s:de,l:be}}function n(ue,ae,ee){var Ee,F,j;ue=H(ue,360),ae=H(ae,100),ee=H(ee,100);function de(I,t,h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?I+(t-I)*6*h:h<1/2?t:h<2/3?I+(t-I)*(2/3-h)*6:I}if(ae===0)Ee=F=j=ee;else{var be=ee<.5?ee*(1+ae):ee+ae-ee*ae,Te=2*ee-be;Ee=de(Te,be,ue+1/3),F=de(Te,be,ue),j=de(Te,be,ue-1/3)}return{r:Ee*255,g:F*255,b:j*255}}function a(ue,ae,ee){ue=H(ue,255),ae=H(ae,255),ee=H(ee,255);var Ee=y(ue,ae,ee),F=m(ue,ae,ee),j,de,be=Ee,Te=Ee-F;if(de=Ee===0?0:Te/Ee,Ee==F)j=0;else{switch(Ee){case ue:j=(ae-ee)/Te+(ae<ee?6:0);break;case ae:j=(ee-ue)/Te+2;break;case ee:j=(ue-ae)/Te+4;break}j/=6}return{h:j,s:de,v:be}}function p(ue,ae,ee){ue=H(ue,360)*6,ae=H(ae,100),ee=H(ee,100);var Ee=Pe.floor(ue),F=ue-Ee,j=ee*(1-ae),de=ee*(1-F*ae),be=ee*(1-(1-F)*ae),Te=Ee%6,I=[ee,de,j,j,be,ee][Te],t=[be,ee,ee,de,j,j][Te],h=[j,j,be,ee,ee,de][Te];return{r:I*255,g:t*255,b:h*255}}function d(ue,ae,ee,Ee){var F=[X(g(ue).toString(16)),X(g(ae).toString(16)),X(g(ee).toString(16))];return Ee&&F[0].charAt(0)==F[0].charAt(1)&&F[1].charAt(0)==F[1].charAt(1)&&F[2].charAt(0)==F[2].charAt(1)?F[0].charAt(0)+F[1].charAt(0)+F[2].charAt(0):F.join("")}function i(ue,ae,ee,Ee,F){var j=[X(g(ue).toString(16)),X(g(ae).toString(16)),X(g(ee).toString(16)),X(oe(Ee))];return F&&j[0].charAt(0)==j[0].charAt(1)&&j[1].charAt(0)==j[1].charAt(1)&&j[2].charAt(0)==j[2].charAt(1)&&j[3].charAt(0)==j[3].charAt(1)?j[0].charAt(0)+j[1].charAt(0)+j[2].charAt(0)+j[3].charAt(0):j.join("")}function v(ue,ae,ee,Ee){var F=[X(oe(Ee)),X(g(ue).toString(16)),X(g(ae).toString(16)),X(g(ee).toString(16))];return F.join("")}o.equals=function(ue,ae){return!ue||!ae?!1:o(ue).toRgbString()==o(ae).toRgbString()},o.random=function(){return o.fromRatio({r:c(),g:c(),b:c()})};function b(ue,ae){ae=ae===0?0:ae||10;var ee=o(ue).toHsl();return ee.s-=ae/100,ee.s=he(ee.s),o(ee)}function _(ue,ae){ae=ae===0?0:ae||10;var ee=o(ue).toHsl();return ee.s+=ae/100,ee.s=he(ee.s),o(ee)}function w(ue){return o(ue).desaturate(100)}function T(ue,ae){ae=ae===0?0:ae||10;var ee=o(ue).toHsl();return ee.l+=ae/100,ee.l=he(ee.l),o(ee)}function C(ue,ae){ae=ae===0?0:ae||10;var ee=o(ue).toRgb();return ee.r=y(0,m(255,ee.r-g(255*-(ae/100)))),ee.g=y(0,m(255,ee.g-g(255*-(ae/100)))),ee.b=y(0,m(255,ee.b-g(255*-(ae/100)))),o(ee)}function S(ue,ae){ae=ae===0?0:ae||10;var ee=o(ue).toHsl();return ee.l-=ae/100,ee.l=he(ee.l),o(ee)}function W(ue,ae){var ee=o(ue).toHsl(),Ee=(ee.h+ae)%360;return ee.h=Ee<0?360+Ee:Ee,o(ee)}function N(ue){var ae=o(ue).toHsl();return ae.h=(ae.h+180)%360,o(ae)}function E(ue){var ae=o(ue).toHsl(),ee=ae.h;return[o(ue),o({h:(ee+120)%360,s:ae.s,l:ae.l}),o({h:(ee+240)%360,s:ae.s,l:ae.l})]}function K(ue){var ae=o(ue).toHsl(),ee=ae.h;return[o(ue),o({h:(ee+90)%360,s:ae.s,l:ae.l}),o({h:(ee+180)%360,s:ae.s,l:ae.l}),o({h:(ee+270)%360,s:ae.s,l:ae.l})]}function z(ue){var ae=o(ue).toHsl(),ee=ae.h;return[o(ue),o({h:(ee+72)%360,s:ae.s,l:ae.l}),o({h:(ee+216)%360,s:ae.s,l:ae.l})]}function M(ue,ae,ee){ae=ae||6,ee=ee||30;var Ee=o(ue).toHsl(),F=360/ee,j=[o(ue)];for(Ee.h=(Ee.h-(F*ae>>1)+720)%360;--ae;)Ee.h=(Ee.h+F)%360,j.push(o(Ee));return j}function G(ue,ae){ae=ae||6;for(var ee=o(ue).toHsv(),Ee=ee.h,F=ee.s,j=ee.v,de=[],be=1/ae;ae--;)de.push(o({h:Ee,s:F,v:j})),j=(j+be)%1;return de}o.mix=function(ue,ae,ee){ee=ee===0?0:ee||50;var Ee=o(ue).toRgb(),F=o(ae).toRgb(),j=ee/100,de={r:(F.r-Ee.r)*j+Ee.r,g:(F.g-Ee.g)*j+Ee.g,b:(F.b-Ee.b)*j+Ee.b,a:(F.a-Ee.a)*j+Ee.a};return o(de)},o.readability=function(ue,ae){var ee=o(ue),Ee=o(ae);return(Pe.max(ee.getLuminance(),Ee.getLuminance())+.05)/(Pe.min(ee.getLuminance(),Ee.getLuminance())+.05)},o.isReadable=function(ue,ae,ee){var Ee=o.readability(ue,ae),F,j;j=!1,F=ye(ee);switch(F.level+F.size){case"AAsmall":case"AAAlarge":j=Ee>=4.5;break;case"AAlarge":j=Ee>=3;break;case"AAAsmall":j=Ee>=7;break}return j},o.mostReadable=function(ue,ae,ee){var Ee=null,F=0,j,de,be,Te;ee=ee||{},de=ee.includeFallbackColors,be=ee.level,Te=ee.size;for(var I=0;I<ae.length;I++)j=o.readability(ue,ae[I]),j>F&&(F=j,Ee=o(ae[I]));return o.isReadable(ue,Ee,{level:be,size:Te})||!de?Ee:(ee.includeFallbackColors=!1,o.mostReadable(ue,["#fff","#000"],ee))};var J=o.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},te=o.hexNames=re(J);function re(ue){var ae={};for(var ee in ue)ue.hasOwnProperty(ee)&&(ae[ue[ee]]=ee);return ae}function se(ue){return ue=parseFloat(ue),(isNaN(ue)||ue<0||ue>1)&&(ue=1),ue}function H(ue,ae){$(ue)&&(ue="100%");var ee=V(ue);return ue=m(ae,y(0,parseFloat(ue))),ee&&(ue=parseInt(ue*ae,10)/100),Pe.abs(ue-ae)<1e-6?1:ue%ae/parseFloat(ae)}function he(ue){return m(1,y(0,ue))}function Z(ue){return parseInt(ue,16)}function $(ue){return typeof ue=="string"&&ue.indexOf(".")!=-1&&parseFloat(ue)===1}function V(ue){return typeof ue=="string"&&ue.indexOf("%")!=-1}function X(ue){return ue.length==1?"0"+ue:""+ue}function Q(ue){return ue<=1&&(ue=ue*100+"%"),ue}function oe(ue){return Pe.round(parseFloat(ue)*255).toString(16)}function we(ue){return Z(ue)/255}var ge=function(){var ue="[-\\+]?\\d+%?",ae="[-\\+]?\\d*\\.\\d+%?",ee="(?:"+ae+")|(?:"+ue+")",Ee="[\\s|\\(]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")\\s*\\)?",F="[\\s|\\(]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")\\s*\\)?";return{CSS_UNIT:new RegExp(ee),rgb:new RegExp("rgb"+Ee),rgba:new RegExp("rgba"+F),hsl:new RegExp("hsl"+Ee),hsla:new RegExp("hsla"+F),hsv:new RegExp("hsv"+Ee),hsva:new RegExp("hsva"+F),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Ae(ue){return!!ge.CSS_UNIT.exec(ue)}function me(ue){ue=ue.replace(De,"").replace(l,"").toLowerCase();var ae=!1;if(J[ue])ue=J[ue],ae=!0;else if(ue=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ee;return(ee=ge.rgb.exec(ue))?{r:ee[1],g:ee[2],b:ee[3]}:(ee=ge.rgba.exec(ue))?{r:ee[1],g:ee[2],b:ee[3],a:ee[4]}:(ee=ge.hsl.exec(ue))?{h:ee[1],s:ee[2],l:ee[3]}:(ee=ge.hsla.exec(ue))?{h:ee[1],s:ee[2],l:ee[3],a:ee[4]}:(ee=ge.hsv.exec(ue))?{h:ee[1],s:ee[2],v:ee[3]}:(ee=ge.hsva.exec(ue))?{h:ee[1],s:ee[2],v:ee[3],a:ee[4]}:(ee=ge.hex8.exec(ue))?{r:Z(ee[1]),g:Z(ee[2]),b:Z(ee[3]),a:we(ee[4]),format:ae?"name":"hex8"}:(ee=ge.hex6.exec(ue))?{r:Z(ee[1]),g:Z(ee[2]),b:Z(ee[3]),format:ae?"name":"hex"}:(ee=ge.hex4.exec(ue))?{r:Z(ee[1]+""+ee[1]),g:Z(ee[2]+""+ee[2]),b:Z(ee[3]+""+ee[3]),a:we(ee[4]+""+ee[4]),format:ae?"name":"hex8"}:(ee=ge.hex3.exec(ue))?{r:Z(ee[1]+""+ee[1]),g:Z(ee[2]+""+ee[2]),b:Z(ee[3]+""+ee[3]),format:ae?"name":"hex"}:!1}function ye(ue){var ae,ee;return ue=ue||{level:"AA",size:"small"},ae=(ue.level||"AA").toUpperCase(),ee=(ue.size||"small").toLowerCase(),ae!=="AA"&&ae!=="AAA"&&(ae="AA"),ee!=="small"&&ee!=="large"&&(ee="small"),{level:ae,size:ee}}lt.exports?lt.exports=o:!(Ne=function(){return o}.call(Me,ne,Me,lt),Ne!==void 0&&(lt.exports=Ne))})(Math)},b57q:function(lt,Me,ne){lt.exports={officeContainer:"officeContainer___z7fd9"}},bT9E:function(lt,Me,ne){"use strict";ne.d(Me,"a",function(){return Pe});var Ne=ne("VTBJ");function Pe(De,l){var R=Object(Ne.a)({},De);return Array.isArray(l)&&l.forEach(function(g){delete R[g]}),R}},eoI0:function(lt,Me,ne){lt.exports={selectSchool:"selectSchool___2Vrh7",delete:"delete___qM8Jm"}},fjLI:function(lt,Me,ne){"use strict";ne.d(Me,"e",function(){return o}),ne.d(Me,"a",function(){return u}),ne.d(Me,"c",function(){return r}),ne.d(Me,"d",function(){return n}),ne.d(Me,"b",function(){return a});var Ne=ne("8HAY"),Pe=ne("Cg/j"),De=ne("T8No"),l=ne("nnTU"),R=ne("MI8n"),g=function(){var p=function(d,i){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,b){v.__proto__=b}||function(v,b){for(var _ in b)b.hasOwnProperty(_)&&(v[_]=b[_])},p(d,i)};return function(d,i){p(d,i);function v(){this.constructor=d}d.prototype=i===null?Object.create(i):(v.prototype=i.prototype,new v)}}(),m=function(p,d,i,v){var b=arguments.length,_=b<3?d:v===null?v=Object.getOwnPropertyDescriptor(d,i):v,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(p,d,i,v);else for(var T=p.length-1;T>=0;T--)(w=p[T])&&(_=(b<3?w(_):b>3?w(d,i,_):w(d,i))||_);return b>3&&_&&Object.defineProperty(d,i,_),_},y=function(p,d){return function(i,v){d(i,v,p)}},c=function(){for(var p=0,d=0,i=arguments.length;d<i;d++)p+=arguments[d].length;for(var v=Array(p),b=0,d=0;d<i;d++)for(var _=arguments[d],w=0,T=_.length;w<T;w++,b++)v[b]=_[w];return v};function o(p){return p.command!==void 0}var u=Object(Pe.c)("menuService"),r=new(function(){function p(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new R.a,this.onDidChangeMenu=this._onDidChangeMenu.event}return p.prototype.addCommand=function(d){var i=this;return this._commands.set(d.id,d),this._onDidChangeMenu.fire(0),{dispose:function(){i._commands.delete(d.id)&&i._onDidChangeMenu.fire(0)}}},p.prototype.getCommand=function(d){return this._commands.get(d)},p.prototype.getCommands=function(){var d=new Map;return this._commands.forEach(function(i,v){return d.set(v,i)}),d},p.prototype.appendMenuItem=function(d,i){var v=this,b=this._menuItems.get(d);return b?b.push(i):(b=[i],this._menuItems.set(d,b)),this._onDidChangeMenu.fire(d),{dispose:function(){var _=b.indexOf(i);_>=0&&(b.splice(_,1),v._onDidChangeMenu.fire(d))}}},p.prototype.getMenuItems=function(d){var i=(this._menuItems.get(d)||[]).slice(0);return d===0&&this._appendImplicitItems(i),i},p.prototype._appendImplicitItems=function(d){for(var i=new Set,v=d.filter(function(S){return o(S)}),b=0,_=v;b<_.length;b++){var w=_[b],T=w.command,C=w.alt;i.add(T.id),C&&i.add(C.id)}this._commands.forEach(function(S,W){i.has(W)||d.push({command:S})})},p}()),e=function(p){g(d,p);function d(i,v,b){var _=p.call(this,i,v)||this;return _._commandService=b,_}return d.prototype.run=function(){for(var i,v=[],b=0;b<arguments.length;b++)v[b]=arguments[b];return(i=this._commandService).executeCommand.apply(i,c([this.id],v))},d=m([y(2,l.b)],d),d}(Ne.a),n=function(p){g(d,p);function d(i){var v=this;return typeof i.title=="string"?v=p.call(this,"",i.title,"submenu")||this:v=p.call(this,"",i.title.value,"submenu")||this,v.item=i,v}return d}(Ne.a),a=function(p){g(d,p);function d(i,v,b,_,w){var T=this;return typeof i.title=="string"?T=p.call(this,i.id,i.title,w)||this:T=p.call(this,i.id,i.title.value,w)||this,T._cssClass=void 0,T._enabled=!i.precondition||_.contextMatchesRules(i.precondition),T._checked=Boolean(i.toggled&&_.contextMatchesRules(i.toggled)),T._options=b||{},T.item=i,T.alt=v?new d(v,void 0,T._options,_,w):void 0,T}return d.prototype.dispose=function(){this.alt&&this.alt.dispose(),p.prototype.dispose.call(this)},d.prototype.run=function(){for(var i=[],v=0;v<arguments.length;v++)i[v]=arguments[v];var b=[];return this._options.arg&&(b=c(b,[this._options.arg])),this._options.shouldForwardArgs&&(b=c(b,i)),p.prototype.run.apply(this,b)},d=m([y(3,De.c),y(4,l.b)],d),d}(e)},"h/US":function(lt,Me,ne){"use strict";var Ne=ne("DZo9"),Pe=ne("8z0m"),De=ne("+L6B"),l=ne("2/Rp"),R=ne("tJVT"),g=ne("q1tI"),m=ne.n(g),y=ne("z7Xi"),c=ne("jN4g"),o=ne("m3rI"),u=ne("w8Aa"),r=ne.n(u),e=function(a){var p=a.value,d=a.onChange,i=a.getFileProgress,v=Object(g.useState)(!1),b=Object(R.a)(v,2),_=b[0],w=b[1],T=m.a.createElement(l.a,{loading:_,icon:m.a.createElement(y.a,null)},"\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6"),C=function(){return m.a.createElement("div",{className:r.a.img},m.a.createElement("img",{src:o.a.API_SERVER+"/api/attachments/"+p,alt:"avatar",style:{width:288}}),m.a.createElement("div",null,m.a.createElement(c.a,{onClick:function(){return d("")},style:{fontSize:"16px",color:"red"}})))},S=function(N){if(i&&i(N),N.file.status==="uploading"){w(!0);return}if(N.file.status==="done"){var E,K;w(!1),d(N==null||((E=N.file)===null||E===void 0||((K=E.response)===null||K===void 0))?void 0:K.id)}};return m.a.createElement(m.a.Fragment,null,p?C():m.a.createElement("div",null,m.a.createElement(Pe.a,{withCredentials:!0,name:"file",showUploadList:!1,action:"".concat(o.a.API_SERVER,"/api/attachments.json"),onChange:S,accept:"image/*"},T),m.a.createElement("div",{className:"mt20 c-light-black"},"\u8BF4\u660E\uFF1A\u652F\u6301\u4E0A\u4F20jpg/png\u7B49\u683C\u5F0F\u6587\u4EF6\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC72M,\u5EFA\u8BAE\u4F7F\u7528288*158\u50CF\u7D20\uFF1B"),m.a.createElement("div",{className:"c-light-black"},"\u5982\u4E0D\u4E0A\u4F20\uFF0C\u9ED8\u8BA4\u4F7F\u7528\u7CFB\u7EDF\u56FE\u7247\u3002")))};Me.a=e},h78n:function(lt,Me,ne){"use strict";ne.d(Me,"a",function(){return G});var Ne=ne("q1tI"),Pe=ne.n(Ne),De=ne("TSYQ"),l=ne.n(De),R={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},g=function(re){var se=re.map(function(){return Object(Ne.useRef)()}),H=Object(Ne.useRef)();return Object(Ne.useEffect)(function(){var he=Date.now(),Z=!1;Object.keys(se).forEach(function($){var V=se[$].current;if(!V)return;Z=!0;var X=V.style;X.transitionDuration=".3s, .3s, .3s, .06s",H.current&&he-H.current<100&&(X.transitionDuration="0s, 0s")}),Z&&(H.current=Date.now())}),[se]};function m(){return m=Object.assign||function(te){for(var re=1;re<arguments.length;re++){var se=arguments[re];for(var H in se)Object.prototype.hasOwnProperty.call(se,H)&&(te[H]=se[H])}return te},m.apply(this,arguments)}function y(te,re){return e(te)||r(te,re)||o(te,re)||c()}function c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o(te,re){if(!te)return;if(typeof te=="string")return u(te,re);var se=Object.prototype.toString.call(te).slice(8,-1);if(se==="Object"&&te.constructor&&(se=te.constructor.name),se==="Map"||se==="Set")return Array.from(te);if(se==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(se))return u(te,re)}function u(te,re){(re==null||re>te.length)&&(re=te.length);for(var se=0,H=new Array(re);se<re;se++)H[se]=te[se];return H}function r(te,re){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(te)))return;var se=[],H=!0,he=!1,Z=void 0;try{for(var $=te[Symbol.iterator](),V;!(H=(V=$.next()).done)&&!(se.push(V.value),re&&se.length===re);H=!0);}catch(X){he=!0,Z=X}finally{try{!H&&$.return!=null&&$.return()}finally{if(he)throw Z}}return se}function e(te){if(Array.isArray(te))return te}function n(te,re){if(te==null)return{};var se=a(te,re),H,he;if(Object.getOwnPropertySymbols){var Z=Object.getOwnPropertySymbols(te);for(he=0;he<Z.length;he++){if(H=Z[he],re.indexOf(H)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(te,H))continue;se[H]=te[H]}}return se}function a(te,re){if(te==null)return{};var se={},H=Object.keys(te),he,Z;for(Z=0;Z<H.length;Z++){if(he=H[Z],re.indexOf(he)>=0)continue;se[he]=te[he]}return se}var p=function(re){var se=re.className,H=re.percent,he=re.prefixCls,Z=re.strokeColor,$=re.strokeLinecap,V=re.strokeWidth,X=re.style,Q=re.trailColor,oe=re.trailWidth,we=re.transition,ge=n(re,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete ge.gapPosition;var Ae=Array.isArray(H)?H:[H],me=Array.isArray(Z)?Z:[Z],ye=g(Ae),ue=y(ye,1),ae=ue[0],ee=V/2,Ee=100-V/2,F="M ".concat($==="round"?ee:0,",").concat(ee,`
|
|
|
L `).concat($==="round"?Ee:100,",").concat(ee),j="0 0 100 ".concat(V),de=0;return Pe.a.createElement("svg",m({className:l()("".concat(he,"-line"),se),viewBox:j,preserveAspectRatio:"none",style:X},ge),Pe.a.createElement("path",{className:"".concat(he,"-line-trail"),d:F,strokeLinecap:$,stroke:Q,strokeWidth:oe||V,fillOpacity:"0"}),Ae.map(function(be,Te){var I={strokeDasharray:"".concat(be,"px, 100px"),strokeDashoffset:"-".concat(de,"px"),transition:we||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},t=me[Te]||me[me.length-1];return de+=be,Pe.a.createElement("path",{key:Te,className:"".concat(he,"-line-path"),d:F,strokeLinecap:$,stroke:t,strokeWidth:V,fillOpacity:"0",ref:ae[Te],style:I})}))};p.defaultProps=R;var d=p;function i(){return i=Object.assign||function(te){for(var re=1;re<arguments.length;re++){var se=arguments[re];for(var H in se)Object.prototype.hasOwnProperty.call(se,H)&&(te[H]=se[H])}return te},i.apply(this,arguments)}function v(te,re){return C(te)||T(te,re)||_(te,re)||b()}function b(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _(te,re){if(!te)return;if(typeof te=="string")return w(te,re);var se=Object.prototype.toString.call(te).slice(8,-1);if(se==="Object"&&te.constructor&&(se=te.constructor.name),se==="Map"||se==="Set")return Array.from(te);if(se==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(se))return w(te,re)}function w(te,re){(re==null||re>te.length)&&(re=te.length);for(var se=0,H=new Array(re);se<re;se++)H[se]=te[se];return H}function T(te,re){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(te)))return;var se=[],H=!0,he=!1,Z=void 0;try{for(var $=te[Symbol.iterator](),V;!(H=(V=$.next()).done)&&!(se.push(V.value),re&&se.length===re);H=!0);}catch(X){he=!0,Z=X}finally{try{!H&&$.return!=null&&$.return()}finally{if(he)throw Z}}return se}function C(te){if(Array.isArray(te))return te}function S(te,re){if(te==null)return{};var se=W(te,re),H,he;if(Object.getOwnPropertySymbols){var Z=Object.getOwnPropertySymbols(te);for(he=0;he<Z.length;he++){if(H=Z[he],re.indexOf(H)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(te,H))continue;se[H]=te[H]}}return se}function W(te,re){if(te==null)return{};var se={},H=Object.keys(te),he,Z;for(Z=0;Z<H.length;Z++){if(he=H[Z],re.indexOf(he)>=0)continue;se[he]=te[he]}return se}var N=0;function E(te){return+te.replace("%","")}function K(te){return Array.isArray(te)?te:[te]}function z(te,re,se,H){var he=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,Z=arguments.length>5?arguments[5]:void 0,$=50-H/2,V=0,X=-$,Q=0,oe=-2*$;switch(Z){case"left":V=-$,X=0,Q=2*$,oe=0;break;case"right":V=$,X=0,Q=-2*$,oe=0;break;case"bottom":X=$,oe=2*$;break;default:}var we="M 50,50 m ".concat(V,",").concat(X,`
|
|
|
a `).concat($,",").concat($," 0 1 1 ").concat(Q,",").concat(-oe,`
|
|
|
a `).concat($,",").concat($," 0 1 1 ").concat(-Q,",").concat(oe),ge=Math.PI*2*$,Ae={stroke:se,strokeDasharray:"".concat(re/100*(ge-he),"px ").concat(ge,"px"),strokeDashoffset:"-".concat(he/2+te/100*(ge-he),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:we,pathStyle:Ae}}var M=function(re){var se=re.prefixCls,H=re.strokeWidth,he=re.trailWidth,Z=re.gapDegree,$=re.gapPosition,V=re.trailColor,X=re.strokeLinecap,Q=re.style,oe=re.className,we=re.strokeColor,ge=re.percent,Ae=S(re,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),me=Object(Ne.useMemo)(function(){return N+=1,N},[]),ye=z(0,100,V,H,Z,$),ue=ye.pathString,ae=ye.pathStyle,ee=K(ge),Ee=K(we),F=Ee.find(function(I){return Object.prototype.toString.call(I)==="[object Object]"}),j=g(ee),de=v(j,1),be=de[0],Te=function(){var t=0;return ee.map(function(h,L){var A=Ee[L]||Ee[Ee.length-1],k=Object.prototype.toString.call(A)==="[object Object]"?"url(#".concat(se,"-gradient-").concat(me,")"):"",le=z(t,h,A,H,Z,$);return t+=h,Pe.a.createElement("path",{key:L,className:"".concat(se,"-circle-path"),d:le.pathString,stroke:k,strokeLinecap:X,strokeWidth:H,opacity:h===0?0:1,fillOpacity:"0",style:le.pathStyle,ref:be[L]})})};return Pe.a.createElement("svg",i({className:l()("".concat(se,"-circle"),oe),viewBox:"0 0 100 100",style:Q},Ae),F&&Pe.a.createElement("defs",null,Pe.a.createElement("linearGradient",{id:"".concat(se,"-gradient-").concat(me),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(F).sort(function(I,t){return E(I)-E(t)}).map(function(I,t){return Pe.a.createElement("stop",{key:t,offset:I,stopColor:F[I]})}))),Pe.a.createElement("path",{className:"".concat(se,"-circle-trail"),d:ue,stroke:V,strokeLinecap:X,strokeWidth:he||H,fillOpacity:"0",style:ae}),Te().reverse())};M.defaultProps=R;var G=M,J={Line:d,Circle:G}},hgre:function(lt,Me,ne){"use strict";var Ne=ne("miYZ"),Pe=ne("tsqr"),De=ne("9og8"),l=ne("WmNS"),R=ne.n(l),g=ne("q1tI"),m=ne.n(g),y=ne("GUcZ"),c=ne("ulZh"),o=ne.n(c),u=ne("xKgJ"),r=ne("bntm"),e=ne("4xil"),n=ne.n(e);function a(v){if(isNaN(v))return{minutes:"00",seconds:"00"};var b=new Date(v*1e3).toISOString().substr(11,8);return{minutes:b.substr(3,2),seconds:b.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function p(v,b){return v-b}function d(v){v.sort(p);for(var b=0,_=0;_<v.length-1;_++){var w=Math.abs(v[_+1]-v[_]);w<21&&(b+=w)}return b}var i=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;Me.a=Object(g.forwardRef)(function(v,b){var _,w=v.src,T=v.toLog,C=v.videoId,S=v.logWatchHistory,W=v.courseId,N=W===void 0?null:W,E=v.startTime,K=v.handlePause,z=K===void 0?function(){}:K,M=v.handlePlay,G=M===void 0?function(){}:M,J=v.handlePlayEnded,te=J===void 0?function(){}:J,re=v.videoSpeed,se=re===void 0?1:re,H=w==null||((_=w.split("."))===null||_===void 0)?void 0:_.pop(),he=H==="flv",Z=Object(g.useRef)(),$=Object(g.useRef)(),V=Object(g.useRef)(),X=Object(g.useRef)(),Q=Object(g.useRef)(),oe=Object(g.useRef)(),we=Object(g.useRef)(),ge=Object(g.useRef)(),Ae=Object(g.useRef)(),me=Object(g.useRef)(),ye=Object(g.useRef)(),ue=Object(g.useRef)(),ae=Object(g.useRef)(),ee=Object(g.useRef)(),Ee=navigator.userAgent.toLowerCase().match(i),F=Ee?Ee[0]:"pc",j=Object(g.useRef)(!1),de=Object(u.x)(),be=0,Te=0,I=0,t=null,h=!1,L=20,A=1,k=!1,le=!1,_e=[];Object(g.useImperativeHandle)(b,function(){return{getLastUpdatedTime:function(){return Z.current.currentTime},getDuration:function(){return Z.current.duration}}});var Ge=Object(g.useCallback)(function(Be){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ke={point:Z.current.currentTime};t?(ke.log_id=t,ke.watch_duration=d(_e),ke.total_duration=Te):(N?(ke.video_id=parseInt(C,10),ke.course_id=N):ke.video_id=C,ke.duration=be,ke.device=F),je&&(ke.ed="1");function Le(){return Oe.apply(this,arguments)}function Oe(){return Oe=Object(De.a)(R.a.mark(function pe(){var ve;return R.a.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return k=!0,xe.next=3,S(ke);case 3:ve=xe.sent,t=ve,k=!1,Be&&Be();case 7:case"end":return xe.stop()}},pe)})),Oe.apply(this,arguments)}Le()},[C,N]);Object(g.useEffect)(function(){Pe.b.destroy();var Be=null;return y.a.isSupported&&he&&w&&(w==null?void 0:w.indexOf(".m3u8"))<0?(Be=y.a.createPlayer({type:"flv",volume:.8,cors:!0,url:w,muted:!1}),Z.current&&(Be.attachMediaElement(Z.current),Be.load())):Z.current.setAttribute("src",w),Fe(),function(){Be&&(Be.unload(),Be.pause(),Be.destroy(),Be=null)}},[Z,he,w]);function ze(){Z.current.paused?(X.current.style.display="none",Q.current.style.display="block"):(X.current.style.display="block",Q.current.style.display="none")}function Fe(){ye.current.style.display="none",ae.current.style.display="none",ue.current.style.display="none",Z.current.muted||Z.current.volume===0?ye.current.style.display="block":Z.current.volume>0&&Z.current.volume<=.5?ae.current.style.display="block":ue.current.style.display="block"}Object(g.useEffect)(function(){var Be=document.getElementById("play"),je=document.querySelectorAll(".playback-icons use");function ke(){G(),E&&!j.current&&(Z.current.currentTime=E),j.current=!0,_e.push(Z.current.currentTime),h||(h=!0,T&&Ge())}function Le(){return Oe.apply(this,arguments)}function Oe(){return Oe=Object(De.a)(R.a.mark(function et(){return R.a.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:ze(),_e.push(Z.current.currentTime),T&&Ge(function(){t=null,I=0,h=!1,k=!1,le=!1,_e=[],Te=0,A=1},!0);case 3:case"end":return ut.stop()}},et)})),Oe.apply(this,arguments)}function pe(){oe.current.value=Math.floor(Z.current.currentTime),we.current.value=Math.floor(Z.current.currentTime)}function ve(){var et=a(Math.round(Z.current.currentTime));Ae.current.innerText="".concat(et.minutes,":").concat(et.seconds),Ae.current.setAttribute("datetime","".concat(et.minutes,"m ").concat(et.seconds,"s"))}function Ce(){var et=Math.round(Z.current.duration);oe.current.setAttribute("max",et),we.current.setAttribute("max",et);var Ye=a(et);ge.current.innerText="".concat(Ye.minutes,":").concat(Ye.seconds),ge.current.setAttribute("datetime","".concat(Ye.minutes,"m ").concat(Ye.seconds,"s"))}function xe(){var et=Math.round(Z.current.duration);oe.current.setAttribute("max",et),we.current.setAttribute("max",et);var Ye=a(et);ge.current.innerText="".concat(Ye.minutes,":").concat(Ye.seconds),ge.current.setAttribute("datetime","".concat(Ye.minutes,"m ").concat(Ye.seconds,"s")),pe(),ve();var ut=$.current.getBoundingClientRect(),st=ut.width,gt=ut.height,yt=ut.x,ft=ut.y;if(yt<0||ft<0||!st)return;if(!le){var xt=Z.current.currentTime,At=xt-I;Math.abs(At)<10?(Te+=Math.abs(At),I=xt,k||Te-A*L>=0&&(A++,_e.push(I),T&&Ge())):(I=xt,T&&Ge())}}function Ue(){le=!0}function Xe(){Z.current.playing&&_e.push(Z.current.currentTime,I),I=Z.current.currentTime,le=!1}function rt(){be=Z.current.duration,be<=20&&(L=be/3),Z.current.addEventListener("play",ke)}function bt(et){et.preventDefault(),Object(r.a)()?(Z.current.style.width="100%",Z.current.style.height="100%"):Z.current.style.cssText=""}function Et(){z()}function _t(et){var Ye=et.target.dataset.seek?et.target.dataset.seek:et.target.value;Z.current.currentTime=Ye,we.current.value=Ye,oe.current.value=Ye}function vt(et){var Ye=Math.round(et.offsetX/et.target.clientWidth*parseInt(et.target.getAttribute("max"),10));oe.current.setAttribute("data-seek",Ye);var ut=a(Ye);me.current.textContent="".concat(ut.minutes,":").concat(ut.seconds);var st=Z.current.getBoundingClientRect();me.current.style.left="".concat(et.pageX-st.left,"px")}return V.current.addEventListener(Object(r.c)(),bt),Z.current.addEventListener("canplay",rt),Z.current.addEventListener("ended",Le),Z.current.addEventListener("seeking",Ue),Z.current.addEventListener("seeked",Xe),Z.current.addEventListener("loadedmetadata",Ce),oe.current.addEventListener("mousemove",vt),oe.current.addEventListener("input",_t),Z.current.addEventListener("timeupdate",xe),Z.current.addEventListener("pause",Et),Z.current.addEventListener("volumechange",Fe),function(){Z.current.removeEventListener("canplay",rt),Z.current.removeEventListener("play",ke),Z.current.removeEventListener("ended",Le),Z.current.removeEventListener("seeking",Ue),Z.current.removeEventListener("seeked",Xe),oe.current.removeEventListener("mousemove",vt),oe.current.removeEventListener("input",_t),Z.current.removeEventListener("timeupdate",xe),Z.current.removeEventListener("pause",Et),Z.current.removeEventListener("loadedmetadata",Ce),Z.current.removeEventListener("volumechange",Fe),Z.current.playing&&(_e.push(I,Z.current.currentTime),T&&Ge())}},[Z,w]),Object(g.useEffect)(function(){if(Z.current.onended=function(){te(Z)},Z.current.oncontextmenu=function(){return!1},(w==null?void 0:w.indexOf(".m3u8"))>-1){if(Z.current.canPlayType("application/vnd.apple.mpegurl"))Z.current.src=w;else if(o.a.isSupported()){var Be=new o.a;Be.loadSource(w),Be.attachMedia(Z.current)}}},[w]),Object(g.useEffect)(function(){Z.current.playbackRate=se},[se]);var Ke=function(){Z.current.paused||Z.current.ended?Z.current.play():Z.current.pause(),ze()};function ot(){Z.current.muted=!Z.current.muted,Z.current.muted?(ee.current.setAttribute("data-volume",volume.value),ee.current.value=0):ee.current.value=ee.current.dataset.volume}return m.a.createElement("div",{style:{position:"relative"},ref:V},m.a.createElement("div",{ref:$,className:"".concat(n.a.watermark," animated_alternate animate__animated_10s animate__infinite animate__stepstart ").concat(n.a.animate__loop)},de?de.login:" "),m.a.createElement("div",{className:n.a.container},m.a.createElement("div",{className:n.a["video-container"],id:"video-container"},m.a.createElement("div",{className:n.a["playback-animation"],id:"playback-animation"},m.a.createElement("svg",{className:n.a["playback-icons"]},m.a.createElement("use",{className:"hidden",href:"#play-icon"}),m.a.createElement("use",{href:"#pause"}))),m.a.createElement("video",{className:n.a.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:Z,autoPlay:!1}),m.a.createElement("div",{className:"".concat(n.a["video-controls"]," "),id:"video-controls"},m.a.createElement("div",{className:n.a["bottom-controls"]},m.a.createElement("div",{className:n.a["left-controls"]},m.a.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:Ke},m.a.createElement("svg",{className:n.a["playback-icons"]},m.a.createElement("use",{ref:Q,href:"#play-icon"}),m.a.createElement("use",{ref:X,style:{display:"none"},href:"#pause"}))),m.a.createElement("div",{className:n.a.time},m.a.createElement("time",{id:"time-elapsed",ref:Ae},"00:00"),m.a.createElement("span",null," / "),m.a.createElement("time",{id:"duration",ref:ge},"00:00"))),m.a.createElement("div",{className:n.a["right-controls"]},m.a.createElement("div",{className:n.a["volume-controls"]},m.a.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:n.a["volume-button"],id:"volume-button",onClick:ot},m.a.createElement("svg",null,m.a.createElement("use",{ref:ye,href:"#volume-mute"}),m.a.createElement("use",{ref:ae,href:"#volume-low"}),m.a.createElement("use",{ref:ue,href:"#volume-high"}))),m.a.createElement("input",{className:n.a.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:ee,style:{display:"none"},onClick:Fe})),m.a.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:n.a["fullscreen-button"],onClick:function(){Object(r.a)()?Object(r.b)():Object(r.d)(V.current)}},m.a.createElement("svg",null,m.a.createElement("use",{href:"#fullscreen"}),m.a.createElement("use",{href:"#fullscreen-exit",className:"hidden"}))))),m.a.createElement("div",{className:n.a["video-progress"]},m.a.createElement("progress",{ref:we,value:"0",min:"0"}),m.a.createElement("input",{className:n.a.seek,ref:oe,value:"0",min:"0",type:"range",step:"1"}),m.a.createElement("div",{className:n.a["seek-tooltip"],ref:me,id:"seek-tooltip"},"00:00"))))),m.a.createElement("svg",{style:{display:"none"}},m.a.createElement("defs",null,m.a.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},m.a.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),m.a.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},m.a.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),m.a.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},m.a.createElement("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})),m.a.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},m.a.createElement("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})),m.a.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},m.a.createElement("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})),m.a.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},m.a.createElement("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})),m.a.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},m.a.createElement("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})),m.a.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},m.a.createElement("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})))))})},kwm0:function(lt,Me,ne){lt.exports={modal:"modal___1jX7c",uploadWrap:"uploadWrap___3-sVK",upload:"upload___2LemY",uploadLink:"uploadLink___j9Fsx",fileProgress:"fileProgress___11p3K",fileCancel:"fileCancel___3Mx9l",videoName:"videoName___2a-ZN",contentItem:"contentItem___1gUuj","tagsList-content":"tagsList-content___3Yj4d"}},lppi:function(lt,Me,ne){lt.exports={pdfContainer:"pdfContainer___ECPbw",loading:"loading___2tzD5"}},mOS8:function(lt,Me,ne){lt.exports=ne.p+"static/403Qrcode.6c17b6f4.png"},nUhQ:function(lt,Me,ne){lt.exports={flex_box_center:"flex_box_center___1OQ1z",flex_space_between:"flex_space_between___22uwF",flex_box_vertical_center:"flex_box_vertical_center___1xWAr",flex_box_center_end:"flex_box_center_end___1QTe3",flex_box_column:"flex_box_column___lWxZG",banner:"banner___1Hzq6",wrap:"wrap___1D5RS",title:"title___1LzGm",contentWrap:"contentWrap___19oxo",button:"button___3chJs",rating:"rating___3ODxx"}},nnTU:function(lt,Me,ne){"use strict";ne.d(Me,"b",function(){return y}),ne.d(Me,"a",function(){return c});var Ne=ne("pmY6"),Pe=ne("746U"),De=ne("Cg/j"),l=ne("MI8n"),R=ne("24hK"),g=ne("QDVR"),m=function(){for(var o=0,u=0,r=arguments.length;u<r;u++)o+=arguments[u].length;for(var e=Array(o),n=0,u=0;u<r;u++)for(var a=arguments[u],p=0,d=a.length;p<d;p++,n++)e[n]=a[p];return e},y=Object(De.c)("commandService"),c=new(function(){function o(){this._commands=new Map,this._onDidRegisterCommand=new l.a,this.onDidRegisterCommand=this._onDidRegisterCommand.event}return o.prototype.registerCommand=function(u,r){var e=this;if(!u)throw new Error("invalid command");if(typeof u=="string"){if(!r)throw new Error("invalid command");return this.registerCommand({id:u,handler:r})}if(u.description){for(var n=[],a=0,p=u.description.args;a<p.length;a++){var d=p[a];n.push(d.constraint)}var i=u.handler;u.handler=function(T){for(var C=[],S=1;S<arguments.length;S++)C[S-1]=arguments[S];return Object(Pe.m)(C,n),i.apply(void 0,m([T],C))}}var v=u.id,b=this._commands.get(v);b||(b=new R.a,this._commands.set(v,b));var _=b.unshift(u),w=Object(Ne.h)(function(){_();var T=e._commands.get(v);(T==null?void 0:T.isEmpty())&&e._commands.delete(v)});return this._onDidRegisterCommand.fire(v),w},o.prototype.registerCommandAlias=function(u,r){return c.registerCommand(u,function(e){for(var n,a=[],p=1;p<arguments.length;p++)a[p-1]=arguments[p];return(n=e.get(y)).executeCommand.apply(n,m([r],a))})},o.prototype.getCommand=function(u){var r=this._commands.get(u);return!r||r.isEmpty()?void 0:r.iterator().next().value},o.prototype.getCommands=function(){for(var u=new Map,r=0,e=Object(g.d)(this._commands);r<e.length;r++){var n=e[r],a=this.getCommand(n);a&&u.set(n,a)}return u},o}())},p5ED:function(lt,Me,ne){"use strict";var Ne=ne("+L6B"),Pe=ne("2/Rp"),De=ne("5Dmo"),l=ne("3S7+"),R=ne("k1fw"),g=ne("9og8"),m=ne("tJVT"),y=ne("WmNS"),c=ne.n(y),o=ne("q1tI"),u=ne.n(o),r=ne("vHTk"),e=ne.n(r),n=ne("yEEn"),a=ne("ZW9T"),p=ne("1vsH"),d=ne("V0Rq"),i=ne("m3rI");Me.a=function(v){var b,_,w,T,C,S,W=v.editOffice,N=W===void 0?"view":W,E=v.name,K=v.data,z=v.theme,M=v.type,G=v.filename,J=v.monacoEditor,te=v.className,re=v.style,se=v.close,H=v.onClose,he=v.hasMask,Z=v.disabledDownload,$=v.onImgDimensions,V=v.otherData,X=Object(o.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),Q=Object(m.a)(X,2),oe=Q[0],we=Q[1],ge=Object(o.useState)(""),Ae=Object(m.a)(ge,2),me=Ae[0],ye=Ae[1],ue=Object(o.useState)(),ae=Object(m.a)(ue,2),ee=ae[0],Ee=ae[1],F=window.ENV==="build"?"/react/build":"",j=location.host.startsWith("localhost")?i.a.PROXY_SERVER:i.a.API_SERVER,de,be=1024*1024,Te=10*be,I=Object(o.useRef)();(b=K)!==null&&b!==void 0&&b.startsWith("/api")&&M!=="txt"&&(K=i.a.API_SERVER+K),M==="office"&&(de=Object(p.P)(K).filesize,de>Te&&(M="other")),G&&(J.filename=G),Object(o.useEffect)(function(){var A,k,le=(A=document.cookie)===null||A===void 0||((k=A.replace(/\s/g,""))===null||k===void 0)?void 0:k.split(";");le==null||le.map(function(_e){var Ge=_e.split("=");Ge[0]==="_educoder_session"&&ye(Ge[1])})},[]),Object(o.useEffect)(function(){M==="office"&&t()},[M,K]);var t=function(){var A=Object(g.a)(c.a.mark(function k(){var le,_e,Ge;return c.a.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return console.log("data:",K),le=K,K.startsWith("http")||(le=location.origin+le),_e=new URL(le).pathname.split("/").pop(),Fe.next=6,Object(d.U)({attachment_id:_e});case 6:Ge=Fe.sent,Ee(Ge);case 8:case"end":return Fe.stop()}},k)}));return function(){return A.apply(this,arguments)}}(),h=function(){if(K.startsWith("http")||K.startsWith("blob:")){L();return}Object(p.x)(G||"educoder",K,G)},L=function(){Object(p.v)(G||"educoder",decodeURIComponent(K))};return u.a.createElement("div",{style:Object(R.a)({},re||{}),className:"".concat(he&&e.a.bgBlack," ").concat(M?e.a.wrp:"hide")},se&&u.a.createElement("div",{className:e.a.close,ref:I},!!$&&u.a.createElement(l.a,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:function(){return I.current}},u.a.createElement("span",{onClick:function(){H(),$()}},u.a.createElement("i",{className:"icon-yulanpizhu"}))),!Z&&u.a.createElement(l.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return I.current}},u.a.createElement("span",{onClick:L},u.a.createElement("i",{className:"icon-quxiaozhiding"}))),u.a.createElement(l.a,{title:"\u5173\u95ED",getPopupContainer:function(){return I.current}},u.a.createElement("span",{className:"",onClick:H},u.a.createElement("i",{className:"icon-guanbi1"})))),u.a.createElement("div",{className:"".concat(e.a[te]," ").concat(te," ").concat(e.a.monaco," ").concat(M==="txt"?"show":"hide")},M==="txt"&&u.a.createElement(a.b,J)),M==="audio"&&u.a.createElement("audio",{src:"".concat(((_=K)===null||_===void 0?void 0:_.indexOf("http://"))>-1||((w=K)===null||w===void 0?void 0:w.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(K),autoPlay:!0}),M==="video"&&u.a.createElement(u.a.Fragment,null,((T=K)===null||T===void 0?void 0:T.indexOf("http"))>-1?u.a.createElement("video",{controls:!0,src:"".concat(K),autoPlay:!0}):u.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(K),autoPlay:!0})),M==="office"&&ee&&u.a.createElement("iframe",{src:"".concat(F,"/office.html?key=").concat(ee.key,"&url=").concat(j+ee.url,"&callbackUrl=").concat(j+ee.callbackUrl,"&fileType=").concat(ee.fileType,"&title=").concat(ee.title,"&model=").concat(N,"&officeServer=").concat(i.a.OFFICE_SERVER,"&disabledDownload=").concat(!!Z)}),(M==="xlsx"||M==="doc"||M==="pptx"||M==="docx")&&u.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(V.key,"&url=").concat(i.a.API_SERVER+V.url,"&callbackUrl=").concat(i.a.API_SERVER+V.callbackUrl,"&fileType=").concat(V.fileType,"&title=").concat(V.title,"&model=").concat(V.model)}),M==="html"&&u.a.createElement("iframe",{src:K+"&disposition=inline"}),M==="pdf"&&u.a.createElement("embed",{className:e.a.embed,src:K}),M==="image"&&u.a.createElement("img",{src:"".concat(((C=K)===null||C===void 0?void 0:C.indexOf("http://"))>-1||((S=K)===null||S===void 0?void 0:S.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(K)}),M==="other"&&u.a.createElement("div",null,u.a.createElement(Pe.a,{type:"primary",size:"large",onClick:h},u.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),M==="download"&&u.a.createElement(Pe.a,{type:"primary",size:"large",onClick:h},u.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},pmY6:function(lt,Me,ne){"use strict";ne.d(Me,"g",function(){return R}),ne.d(Me,"f",function(){return g}),ne.d(Me,"e",function(){return m}),ne.d(Me,"h",function(){return y}),ne.d(Me,"b",function(){return c}),ne.d(Me,"a",function(){return o}),ne.d(Me,"d",function(){return u}),ne.d(Me,"c",function(){return r});var Ne=!1,Pe="__is_disposable_tracked__";function De(e){if(!Ne)return;if(e&&e!==o.None)try{e[Pe]=!0}catch(n){}}function l(e){if(!Ne)return e;var n=new Error("Potentially leaked disposable").stack;return setTimeout(function(){e[Pe]||console.log(n)},3e3),e}function R(e){return typeof e.dispose=="function"&&e.dispose.length===0}function g(e){return Array.isArray(e)?(e.forEach(function(n){n&&(De(n),n.dispose())}),[]):e?(De(e),e.dispose(),e):void 0}function m(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.forEach(De),l({dispose:function(){return g(e)}})}function y(e){var n=l({dispose:function(){De(n),e()}});return n}var c=function(){function e(){this._toDispose=new Set,this._isDisposed=!1}return e.prototype.dispose=function(){if(this._isDisposed)return;De(this),this._isDisposed=!0,this.clear()},e.prototype.clear=function(){this._toDispose.forEach(function(n){return n.dispose()}),this._toDispose.clear()},e.prototype.add=function(n){if(!n)return n;if(n===this)throw new Error("Cannot register a disposable on itself!");return De(n),this._isDisposed?console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(n),n},e}(),o=function(){function e(){this._store=new c,l(this)}return e.prototype.dispose=function(){De(this),this._store.dispose()},e.prototype._register=function(n){if(n===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(n)},e.None=Object.freeze({dispose:function(){}}),e}(),u=function(){function e(){this._isDisposed=!1,l(this)}return Object.defineProperty(e.prototype,"value",{get:function(){return this._isDisposed?void 0:this._value},set:function(n){if(this._isDisposed||n===this._value)return;this._value&&this._value.dispose(),n&&De(n),this._value=n},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this.value=void 0},e.prototype.dispose=function(){this._isDisposed=!0,De(this),this._value&&this._value.dispose(),this._value=void 0},e}(),r=function(){function e(n){this.object=n}return e.prototype.dispose=function(){},e}()},ppsT:function(lt,Me,ne){(function(Ne){var Pe,Pe;!function(De){if(!0)window.OSS=De(),lt.exports=De();else var l}(function(){var De;return function(){function l(R,g,m){function y(u,r){if(!g[u]){if(!R[u]){var e=typeof Pe=="function"&&Pe;if(!r&&e)return Pe(u,!0);if(c)return c(u,!0);var n=new Error("Cannot find module '"+u+"'");throw n.code="MODULE_NOT_FOUND",n}var a=g[u]={exports:{}};R[u][0].call(a.exports,function(p){return y(R[u][1][p]||p)},a,a.exports,l,R,g,m)}return g[u].exports}for(var c=typeof Pe=="function"&&Pe,o=0;o<m.length;o++)y(m[o]);return y}return l}()({1:[function(l,R,g){"use strict";var m=l("./browser/client");m.Buffer=l("buffer").Buffer,m.co=l("co"),m.urllib=l("../shims/xhr"),m.version=l("./browser/version").version,R.exports=m},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(l,R,g){(function(m,y){"use strict";function c($){return $&&$.__esModule?$:{default:$}}function o($,V){return $[V]||$[V.toLowerCase()]}function u($,V){var X=E.parse($);if(!X.protocol){var Q=V?"https://":"http://";X=E.parse(Q+$)}if(X.protocol!=="http:"&&X.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return X}function r($,V,X){var Q=X?"https://":"http://",oe=V?"-internal.aliyuncs.com":".aliyuncs.com";return $.substr(0,"vpc100-oss-cn-".length)==="vpc100-oss-cn-"&&(oe=".aliyuncs.com"),E.parse(Q+$+oe)}function e(){return document&&document.location&&document.location.protocol==="https:"}function n($,V){if(!(this instanceof n))return new n($,V);$&&$.inited?this.options=$:this.options=n.initOptions($),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=G,this.agent=this.options.agent||he),this.ctx=V,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}var a=l("babel-runtime/regenerator"),p=c(a),d=l("babel-runtime/core-js/object/keys"),i=c(d),v=l("debug")("ali-oss"),b=l("./../../shims/crypto/crypto.js"),_=l("path"),w=l("copy-to"),T=l("mime"),C=l("xml2js"),S=l("humanize-ms"),W=l("agentkeepalive"),N=l("merge-descriptors"),E=l("url"),K=l("is-type-of"),z=l("platform"),M=l("utility"),G=l("urllib"),J=l("./version"),te=l("dateformat"),re=l("bowser"),se=l("../common/signUtils"),H=l("../common/utils"),he=new W;R.exports=n,n.initOptions=function($){if(!$||!$.accessKeyId||!$.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var V=e(),X={region:"oss-cn-hangzhou",internal:!1,secure:V,bucket:null,endpoint:null,cname:!1};if((0,i.default)($).forEach(function(Q){$[Q]!==void 0&&(X[Q]=$[Q])}),X.accessKeyId=X.accessKeyId.trim(),X.accessKeySecret=X.accessKeySecret.trim(),X.timeout&&(X.timeout=S(X.timeout)),X.endpoint)X.endpoint=u(X.endpoint,X.secure);else{if(!X.region)throw new Error("require options.endpoint or options.region");X.endpoint=r(X.region,X.internal,X.secure)}return X.inited=!0,X};var Z=n.prototype;N(Z,l("./object")),N(Z,l("./managed_upload")),N(Z,l("../common/multipart")),N(Z,l("../common/thunkpool.js")),n.Wrapper=l("./wrapper"),Z.signature=function($){return v("authorization stringToSign: %s",$),se.computeSignature(this.options.accessKeySecret,$)},Z.authorization=function($,V,X,Q){var oe=se.buildCanonicalString($.toUpperCase(),V,{headers:Q,parameters:X});return se.authorization(this.options.accessKeyId,this.options.accessKeySecret,oe)},Z.createRequest=function($){var V={"x-oss-date":te(+new Date+this.options.amendTimeSkewed,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.options.stsToken&&(V["x-oss-security-token"]=this.options.stsToken),w($.headers).to(V),o(V,"Content-Type")||($.mime===T.default_type&&($.mime=""),$.mime&&$.mime.indexOf("/")>0?V["Content-Type"]=$.mime:V["Content-Type"]=T.getType($.mime||_.extname($.object||""))||"application/octet-stream"),$.content&&(V["Content-Md5"]=b.createHash("md5").update(new y($.content,"utf8")).digest("base64"),V["Content-Length"]||(V["Content-Length"]=$.content.length));var X=this._getResource($);V.authorization=this.authorization($.method,X,$.subres,V);var Q=this._getReqUrl($);v("request %s %s, with headers %j, !!stream: %s",$.method,Q,V,!!$.stream);var oe=$.timeout||this.options.timeout;return{url:Q,params:{agent:this.agent,method:$.method,content:$.content,stream:$.stream,headers:V,timeout:oe,writeStream:$.writeStream,customResponse:$.customResponse,ctx:$.ctx||this.ctx}}},Z.request=p.default.mark(function $(V){var X,Q,oe,we;return p.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return X=this.createRequest(V),Q=void 0,oe=void 0,ge.prev=3,ge.next=6,this.urllib.request(X.url,X.params);case 6:Q=ge.sent,v("response %s %s, got %s, headers: %j",V.method,X.url,Q.status,Q.headers),ge.next=13;break;case 10:ge.prev=10,ge.t0=ge.catch(3),oe=ge.t0;case 13:if(we=void 0,!Q||!V.successStatuses||V.successStatuses.indexOf(Q.status)!==-1){ge.next=26;break}return ge.next=17,this.requestError(Q);case 17:if(we=ge.sent,we.code!=="RequestTimeTooSkewed"){ge.next=23;break}return this.options.amendTimeSkewed=+new Date(we.serverTime)-new Date,ge.next=22,this.request(V);case 22:return ge.abrupt("return",ge.sent);case 23:we.params=V,ge.next=30;break;case 26:if(!oe){ge.next=30;break}return ge.next=29,this.requestError(oe);case 29:we=ge.sent;case 30:if(!we){ge.next=32;break}throw we;case 32:if(!V.xmlResponse){ge.next=36;break}return ge.next=35,this.parseXML(Q.data);case 35:Q.data=ge.sent;case 36:return ge.abrupt("return",Q);case 37:case"end":return ge.stop()}},$,this,[[3,10]])}),Z._getResource=function($){var V="/";return $.bucket&&(V+=$.bucket+"/"),$.object&&(V+=$.object),V},Z._isIP=function($){return H._isIP($)},Z._escape=function($){return M.encodeURIComponent($).replace(/%2F/g,"/")},Z._getReqUrl=function($){var V={};w(this.options.endpoint).to(V);var X=this._isIP(V.hostname),Q=this.options.cname;!$.bucket||Q||X||(V.host=$.bucket+"."+V.host);var oe="/";$.bucket&&X&&(oe+=$.bucket+"/"),$.object&&(oe+=this._escape($.object).replace(/\+/g,"%2B")),V.pathname=oe;var we={};if($.query&&N(we,$.query),$.subres){var ge={};K.string($.subres)?ge[$.subres]="":K.array($.subres)?$.subres.forEach(function(Ae){ge[Ae]=""}):ge=$.subres,N(we,ge)}return V.query=we,E.format(V)},Z._getUserAgent=function(){var $=m&&m.browser?"js":"nodejs",V="aliyun-sdk-"+$+"/"+J.version,X=z.description;return!X&&m&&(X="Node.js "+m.version.slice(1)+" on "+m.platform+" "+m.arch),this._checkUserAgent(V+" "+X)},Z._checkUserAgent=function($){return $.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},Z.checkBrowserAndVersion=function($,V){return re.name===$&&re.version.split(".")[0]===V},Z.parseXML=function($){return function(V){y.isBuffer($)&&($=$.toString()),C.parseString($,{explicitRoot:!1,explicitArray:!1},V)}},Z.requestError=p.default.mark(function $(V){var X,Q,oe,we;return p.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:if(X=null,V.data&&V.data.length){ge.next=5;break}V.status===-1||V.status===-2?(X=new Error(V.message),X.name=V.name,X.status=V.status,X.code=V.name):(V.status===404?(X=new Error("Object not exists"),X.name="NoSuchKeyError",X.status=404,X.code="NoSuchKey"):V.status===412?(X=new Error("Pre condition failed"),X.name="PreconditionFailedError",X.status=412,X.code="PreconditionFailed"):(X=new Error("Unknow error, status: "+V.status),X.name="UnknowError",X.status=V.status),X.requestId=V.headers["x-oss-request-id"],X.host=""),ge.next=30;break;case 5:return Q=String(V.data),v("request response error data: %s",Q),oe=void 0,ge.prev=8,ge.next=11,this.parseXML(Q)||{};case 11:oe=ge.sent,ge.next=21;break;case 14:return ge.prev=14,ge.t0=ge.catch(8),v(Q),ge.t0.message+=`
|
|
|
raw xml: `+Q,ge.t0.status=V.status,ge.t0.requestId=V.headers["x-oss-request-id"],ge.abrupt("return",ge.t0);case 21:we=oe.Message||"unknow request error, status: "+V.status,oe.Condition&&(we+=" (condition: "+oe.Condition+")"),X=new Error(we),X.name=oe.Code?oe.Code+"Error":"UnknowError",X.status=V.status,X.code=oe.Code,X.requestId=oe.RequestId,X.hostId=oe.HostId,X.serverTime=oe.ServerTime;case 30:return v("generate error %j",X),ge.abrupt("return",X);case 32:case"end":return ge.stop()}},$,this,[[8,14]])})}).call(this,l("_process"),l("buffer").Buffer)},{"../common/multipart":8,"../common/signUtils":9,"../common/thunkpool.js":10,"../common/utils":11,"./../../shims/crypto/crypto.js":237,"./managed_upload":3,"./object":4,"./version":5,"./wrapper":6,_process:173,agentkeepalive:12,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,bowser:35,buffer:38,"copy-to":43,dateformat:154,debug:155,"humanize-ms":160,"is-type-of":165,"merge-descriptors":168,mime:242,path:170,platform:171,url:203,urllib:244,utility:243,xml2js:213}],3:[function(l,R,g){(function(m){"use strict";function y(w){return w&&w.__esModule?w:{default:w}}function c(w,T){if(!(this instanceof c))return new c(w,T);_.call(this,T),this.file=w,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var o=l("babel-runtime/core-js/array/from"),u=y(o),r=l("babel-runtime/regenerator"),e=y(r),n=l("is-type-of"),a=l("util"),p=l("path"),d=l("mime"),i=l("copy-to"),v=g;v.multipartUpload=e.default.mark(function w(T,C,S){var W,N,E,K,z,M,G,J,te;return e.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(this.resetCancelFlag(),S=S||{},!S.checkpoint||!S.checkpoint.uploadId){re.next=6;break}return re.next=5,this._resumeMultipart(S.checkpoint,S);case 5:return re.abrupt("return",re.sent);case 6:return W=102400,S.mime||(n.file(C)?S.mime=d.getType(p.extname(C.name)):n.blob(C)?S.mime=C.type:S.mime=d.getType(p.extname(C))),S.headers=S.headers||{},this._convertMetaToHeaders(S.meta,S.headers),re.next=12,this._getFileSize(C);case 12:if(!((N=re.sent)<W)){re.next=25;break}return E=this._createStream(C,0,N),S.contentLength=N,re.next=18,this.putStream(T,E,S);case 18:if(K=re.sent,!S||!S.progress){re.next=22;break}return re.next=22,S.progress(1);case 22:return z={res:K.res,bucket:this.options.bucket,name:T,etag:K.res.headers.etag},(S.headers&&S.headers["x-oss-callback"]||S.callback)&&(z.data=K.data),re.abrupt("return",z);case 25:if(!(S.partSize&&S.partSize<W)){re.next=27;break}throw new Error("partSize must not be smaller than "+W);case 27:return re.next=29,this.initMultipartUpload(T,S);case 29:if(M=re.sent,G=M.uploadId,J=this._getPartSize(N,S.partSize),te={file:C,name:T,fileSize:N,partSize:J,uploadId:G,doneParts:[]},!S||!S.progress){re.next=36;break}return re.next=36,S.progress(0,te,M.res);case 36:return re.next=38,this._resumeMultipart(te,S);case 38:return re.abrupt("return",re.sent);case 39:case"end":return re.stop()}},w,this)}),v._resumeMultipart=e.default.mark(function w(T,C){var S,W,N,E,K,z,M,G,J,te,re,se,H,he,Z,$,V,X,Q,oe,we;return e.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:if(!this.isCancel()){ge.next=2;break}throw this._makeCancelEvent();case 2:if(S=T.file,W=T.fileSize,N=T.partSize,E=T.uploadId,K=T.doneParts,z=T.name,M=[],K.length>0&&i(K).to(M),G=this._divideParts(W,N),J=G.length,te=!1,re=e.default.mark(function Ae(me,ye){var ue,ae,ee;return e.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:if(me.isCancel()){Ee.next=21;break}return Ee.prev=1,ue=G[ye-1],ae={stream:me._createStream(S,ue.start,ue.end),size:ue.end-ue.start},Ee.next=6,me._uploadPart(z,E,ye,ae);case 6:if(ee=Ee.sent,me.isCancel()||te){Ee.next=13;break}if(T.doneParts.push({number:ye,etag:ee.res.headers.etag}),M.push({number:ye,etag:ee.res.headers.etag}),!C||!C.progress){Ee.next=13;break}return Ee.next=13,C.progress(K.length/J,T,ee.res);case 13:Ee.next=21;break;case 15:if(Ee.prev=15,Ee.t0=Ee.catch(1),me.isCancel()){Ee.next=21;break}throw me.cancel(),Ee.t0.partNum=ye,Ee.t0;case 21:case"end":return Ee.stop()}},Ae,this,[[1,15]])}),se=(0,u.default)(new Array(J),function(Ae,me){return me+1}),H=M.map(function(Ae){return Ae.number}),he=se.filter(function(Ae){return H.indexOf(Ae)<0}),Z=5,$=C.parallel||Z,!this.checkBrowserAndVersion("Internet Explorer","10")&&$!==1){ge.next=26;break}V=0;case 16:if(!(V<he.length)){ge.next=24;break}if(!this.isCancel()){ge.next=19;break}throw this._makeCancelEvent();case 19:return ge.next=21,re(this,he[V]);case 21:V++,ge.next=16;break;case 24:ge.next=40;break;case 26:for(X=[],Q=0;Q<he.length;Q++)X.push(re(this,he[Q]));return ge.next=30,this._thunkPool(X,$);case 30:if(oe=ge.sent,te=!0,!(oe&&oe.length>0)){ge.next=37;break}throw this.resetCancelFlag(),we=oe[0],we.message="Failed to upload some parts with error: "+we.toString()+" part_num: "+we.partNum,we;case 37:if(!this.isCancel()){ge.next=40;break}throw X=null,this._makeCancelEvent();case 40:return ge.next=42,this.completeMultipartUpload(z,E,M,C);case 42:return ge.abrupt("return",ge.sent);case 43:case"end":return ge.stop()}},w,this)}),n.file=function(w){return typeof File!="undefined"&&w instanceof File},n.blob=function(w){return typeof Blob!="undefined"&&w instanceof Blob},v._getFileSize=e.default.mark(function w(T){var C;return e.default.wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(!n.buffer(T)){S.next=4;break}return S.abrupt("return",T.length);case 4:if(!n.blob(T)&&!n.file(T)){S.next=6;break}return S.abrupt("return",T.size);case 6:if(!n.string(T)){S.next=11;break}return S.next=9,this._statFile(T);case 9:return C=S.sent,S.abrupt("return",C.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return S.stop()}},w,this)});var b=l("stream"),_=b.Readable;a.inherits(c,_),c.prototype.readFileAndPush=function(w){if(this.fileBuffer)for(var T=!0;T&&this.fileBuffer&&this.start<this.fileBuffer.length;){var C=this.start,S=C+w;S=S>this.fileBuffer.length?this.fileBuffer.length:S,this.start=S,T=this.push(this.fileBuffer.slice(C,S))}},c.prototype._read=function(w){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);w=w||16384;var T=this;this.reader.onload=function(C){T.fileBuffer=new m(new Uint8Array(C.target.result)),T.file=null,T.readFileAndPush(w)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(w)},v._createStream=function(w,T,C){if(n.blob(w)||n.file(w))return new c(w.slice(T,C));throw new Error("_createStream requires File/String.")},v._getPartSize=function(w,T){return T?Math.max(Math.ceil(w/1e4),T):1048576},v._divideParts=function(w,T){for(var C=Math.ceil(w/T),S=[],W=0;W<C;W++){var N=T*W,E=Math.min(N+T,w);S.push({start:N,end:E})}return S},v._makeCancelEvent=function(){return{status:0,name:"cancel"}}}).call(this,l("buffer").Buffer)},{"babel-runtime/core-js/array/from":16,"babel-runtime/regenerator":33,buffer:38,"copy-to":43,"is-type-of":165,mime:242,path:170,stream:195,util:207}],4:[function(l,R,g){"use strict";function m(T){return T&&T.__esModule?T:{default:T}}var y=l("babel-runtime/core-js/object/keys"),c=m(y),o=l("babel-runtime/regenerator"),u=m(o),r=l("debug")("ali-oss:object"),e=l("utility"),n=l("fs"),a=l("is-type-of"),p=l("url"),d=l("copy-to"),i=l("path"),v=l("mime"),b=l("../common/callback"),_=l("../common/signUtils"),w=g;w.append=u.default.mark(function T(C,S,W){var N;return u.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return W=W||{},W.position===void 0&&(W.position="0"),W.subres={append:"",position:W.position},W.method="POST",E.next=6,this.put(C,S,W);case 6:return N=E.sent,N.nextAppendPosition=N.res.headers["x-oss-next-append-position"],E.abrupt("return",N);case 9:case"end":return E.stop()}},T,this)}),w.put=u.default.mark(function T(C,S,W){var N,E,K,z,M,G;return u.default.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:if(N=void 0,W=W||{},!a.buffer(S)){J.next=6;break}N=S,J.next=18;break;case 6:if(!a.blob(S)&&!a.file(S)){J.next=17;break}return W.mime||(a.file(S)?W.mime=v.getType(i.extname(S.name)):W.mime=S.type),E=this._createStream(S,0,S.size),J.next=11,this._getFileSize(S);case 11:return W.contentLength=J.sent,J.next=14,this.putStream(C,E,W);case 14:return J.abrupt("return",J.sent);case 17:throw new TypeError("Must provide Buffer/Blob for put.");case 18:return W.headers=W.headers||{},this._convertMetaToHeaders(W.meta,W.headers),K=W.method||"PUT",z=this._objectRequestParams(K,C,W),b.encodeCallback(z,W),z.mime=W.mime,z.content=N,z.successStatuses=[200],J.next=28,this.request(z);case 28:return M=J.sent,G={name:C,url:this._objectUrl(C),res:M.res},z.headers&&z.headers["x-oss-callback"]&&(G.data=JSON.parse(M.data.toString())),J.abrupt("return",G);case 32:case"end":return J.stop()}},T,this)}),w.putStream=u.default.mark(function T(C,S,W){var N,E,K,z;return u.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return W=W||{},W.headers=W.headers||{},W.contentLength?W.headers["Content-Length"]=W.contentLength:W.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(W.meta,W.headers),N=W.method||"PUT",E=this._objectRequestParams(N,C,W),b.encodeCallback(E,W),E.mime=W.mime,E.stream=S,E.successStatuses=[200],M.next=12,this.request(E);case 12:return K=M.sent,z={name:C,url:this._objectUrl(C),res:K.res},E.headers&&E.headers["x-oss-callback"]&&(z.data=JSON.parse(K.data.toString())),M.abrupt("return",z);case 16:case"end":return M.stop()}},T,this)}),w.head=u.default.mark(function T(C,S){var W,N,E;return u.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return W=this._objectRequestParams("HEAD",C,S),W.successStatuses=[200,304],K.next=4,this.request(W);case 4:return N=K.sent,E={meta:null,res:N.res,status:N.status},N.status===200&&(0,c.default)(N.headers).forEach(function(z){z.indexOf("x-oss-meta-")===0&&(E.meta||(E.meta={}),E.meta[z.substring(11)]=N.headers[z])}),K.abrupt("return",E);case 8:case"end":return K.stop()}},T,this)}),w.get=u.default.mark(function T(C,S,W){var N,E,K,z;return u.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return N=null,E=!1,a.writableStream(S)?N=S:a.string(S)?(N=n.createWriteStream(S),E=!0):W=S,W=W||{},W.process&&(W.subres=W.subres||{},W.subres["x-oss-process"]=W.process),K=void 0,M.prev=6,z=this._objectRequestParams("GET",C,W),z.writeStream=N,z.successStatuses=[200,206,304],M.next=12,this.request(z);case 12:K=M.sent,E&&N.destroy(),M.next=24;break;case 16:if(M.prev=16,M.t0=M.catch(6),!E){M.next=23;break}return N.destroy(),r("get error: %s, delete the exists file %s",M.t0,S),M.next=23,this._deleteFileSafe(S);case 23:throw M.t0;case 24:return M.abrupt("return",{res:K.res,content:K.data});case 25:case"end":return M.stop()}},T,this,[[6,16]])}),w.getStream=u.default.mark(function T(C,S){var W,N;return u.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return S=S||{},W=this._objectRequestParams("GET",C,S),W.customResponse=!0,W.successStatuses=[200,206,304],E.next=6,this.request(W);case 6:return N=E.sent,E.abrupt("return",{stream:N.res,res:{status:N.status,headers:N.headers}});case 8:case"end":return E.stop()}},T,this)}),w.delete=u.default.mark(function T(C,S){var W,N;return u.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return W=this._objectRequestParams("DELETE",C,S),W.successStatuses=[204],E.next=4,this.request(W);case 4:return N=E.sent,E.abrupt("return",{res:N.res});case 6:case"end":return E.stop()}},T,this)}),w.deleteMulti=u.default.mark(function T(C,S){var W,N,E,K,z,M;return u.default.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:for(S=S||{},W=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<Delete>
|
|
|
`,S.quiet?W+=` <Quiet>true</Quiet>
|
|
|
`:W+=` <Quiet>false</Quiet>
|
|
|
`,N=0;N<C.length;N++)W+=" <Object><Key>"+e.escape(this._objectName(C[N]))+`</Key></Object>
|
|
|
`;return W+="</Delete>",r("delete multi objects: %s",W),S.subres="delete",E=this._objectRequestParams("POST","",S),E.mime="xml",E.content=W,E.xmlResponse=!0,E.successStatuses=[200],G.next=14,this.request(E);case 14:return K=G.sent,z=K.data,M=z&&z.Deleted||null,M&&(Array.isArray(M)||(M=[M]),M=M.map(function(J){return J.Key})),G.abrupt("return",{res:K.res,deleted:M});case 19:case"end":return G.stop()}},T,this)}),w.copy=u.default.mark(function T(C,S,W){var N,E,K;return u.default.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return W=W||{},W.headers=W.headers||{},(0,c.default)(W.headers).forEach(function(M){W.headers["x-oss-copy-source-"+M.toLowerCase()]=W.headers[M]}),W.meta&&(W.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(W.meta,W.headers),S=S[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(S):"/"+encodeURIComponent(S.slice(1)),W.headers["x-oss-copy-source"]=S,N=this._objectRequestParams("PUT",C,W),N.xmlResponse=!0,N.successStatuses=[200,304],z.next=12,this.request(N);case 12:return E=z.sent,K=E.data,K&&(K={etag:K.ETag,lastModified:K.LastModified}),z.abrupt("return",{data:K,res:E.res});case 16:case"end":return z.stop()}},T,this)}),w.putMeta=u.default.mark(function T(C,S,W){return u.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return N.next=2,this.copy(C,C,{meta:S||{},timeout:W&&W.timeout,ctx:W&&W.ctx});case 2:return N.abrupt("return",N.sent);case 3:case"end":return N.stop()}},T,this)}),w.list=u.default.mark(function T(C,S){var W,N,E,K,z;return u.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return W=this._objectRequestParams("GET","",S),W.query=C,W.xmlResponse=!0,W.successStatuses=[200],M.next=6,this.request(W);case 6:return N=M.sent,E=N.data.Contents,K=this,E&&(Array.isArray(E)||(E=[E]),E=E.map(function(G){return{name:G.Key,url:K._objectUrl(G.Key),lastModified:G.LastModified,etag:G.ETag,type:G.Type,size:Number(G.Size),storageClass:G.StorageClass,owner:{id:G.Owner.ID,displayName:G.Owner.DisplayName}}})),z=N.data.CommonPrefixes||null,z&&(Array.isArray(z)||(z=[z]),z=z.map(function(G){return G.Prefix})),M.abrupt("return",{res:N.res,objects:E,prefixes:z,nextMarker:N.data.NextMarker||null,isTruncated:N.data.IsTruncated==="true"});case 13:case"end":return M.stop()}},T,this)}),w.putACL=u.default.mark(function T(C,S,W){var N,E;return u.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return W=W||{},W.subres="acl",W.headers=W.headers||{},W.headers["x-oss-object-acl"]=S,C=this._objectName(C),N=this._objectRequestParams("PUT",C,W),N.successStatuses=[200],K.next=9,this.request(N);case 9:return E=K.sent,K.abrupt("return",{res:E.res});case 11:case"end":return K.stop()}},T,this)}),w.getACL=u.default.mark(function T(C,S){var W,N;return u.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return S=S||{},S.subres="acl",C=this._objectName(C),W=this._objectRequestParams("GET",C,S),W.successStatuses=[200],W.xmlResponse=!0,E.next=8,this.request(W);case 8:return N=E.sent,E.abrupt("return",{acl:N.data.AccessControlList.Grant,owner:{id:N.data.Owner.ID,displayName:N.data.Owner.DisplayName},res:N.res});case 10:case"end":return E.stop()}},T,this)}),w.restore=u.default.mark(function T(C,S){var W,N;return u.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return S=S||{},S.subres="restore",W=this._objectRequestParams("POST",C,S),W.successStatuses=[202],E.next=6,this.request(W);case 6:return N=E.sent,E.abrupt("return",{res:N.res});case 8:case"end":return E.stop()}},T,this)}),w.signatureUrl=function(T,C){C=C||{},T=this._objectName(T),C.method=C.method||"GET";var S=e.timestamp()+(C.expires||1800),W={bucket:this.options.bucket,object:T},N=this._getResource(W);this.options.stsToken&&(C["security-token"]=this.options.stsToken);var E=_._signatureForURL(this.options.accessKeySecret,C,N,S),K=p.parse(this._getReqUrl(W));return K.query={OSSAccessKeyId:this.options.accessKeyId,Expires:S,Signature:E.Signature},d(E.subResource).to(K.query),K.format()},w.getObjectUrl=function(T,C){return C?C[C.length-1]!=="/"&&(C+="/"):C=this.options.endpoint.format(),C+this._escape(this._objectName(T))},w._objectUrl=function(T){return this._getReqUrl({bucket:this.options.bucket,object:T})},w.generateObjectUrl=function(T,C){if(C)C[C.length-1]!=="/"&&(C+="/");else{C=this.options.endpoint.format();var S=p.parse(C),W=this.options.bucket;S.hostname=W+"."+S.hostname,S.host=W+"."+S.host,C=S.format()}return C+this._escape(this._objectName(T))},w._objectRequestParams=function(T,C,S){if(!this.options.bucket)throw new Error("Please create a bucket first");S=S||{},C=this._objectName(C);var W={object:C,bucket:this.options.bucket,method:T,subres:S&&S.subres,timeout:S&&S.timeout,ctx:S&&S.ctx};return S.headers&&(W.headers={},d(S.headers).to(W.headers)),W},w._objectName=function(T){return T.replace(/^\/+/,"")},w._statFile=function(T){return function(C){n.stat(T,C)}},w._convertMetaToHeaders=function(T,C){T&&(0,c.default)(T).forEach(function(S){C["x-oss-meta-"+S]=T[S]})},w._deleteFileSafe=function(T){return function(C){n.exists(T,function(S){S?n.unlink(T,function(W){W&&r("unlink %j error: %s",T,W),C()}):C()})}}},{"../common/callback":7,"../common/signUtils":9,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,"copy-to":43,debug:155,fs:36,"is-type-of":165,mime:242,path:170,url:203,utility:243}],5:[function(l,R,g){"use strict";g.version="5.3.1"},{}],6:[function(l,R,g){"use strict";function m(i){return i&&i.__esModule?i:{default:i}}function y(i){return i&&typeof i.next=="function"&&typeof i.throw=="function"}function c(i){if(!i)return!1;var v=i.constructor;return!!v&&(v.name==="GeneratorFunction"||v.displayName==="GeneratorFunction"||y(v.prototype)||y(i.prototype))}function o(i,v){var b=new i(v),_=(0,a.default)(b),w=(0,a.default)((0,e.default)(b));_.concat(w).forEach(function(T){c(b[T])?this[T]=p.wrap(b[T]).bind(b):this[T]=b[T]},this)}function u(i){if(!(this instanceof u))return new u(i);o.call(this,d,i)}var r=l("babel-runtime/core-js/object/get-prototype-of"),e=m(r),n=l("babel-runtime/core-js/object/keys"),a=m(n),p=l("co"),d=l("./client");R.exports=u,u.STS=function i(v){if(!(this instanceof i))return new i(v);o.call(this,d.STS,v)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(l,R,g){(function(m){"use strict";function y(e){return e&&e.__esModule?e:{default:e}}var c=l("babel-runtime/core-js/object/keys"),o=y(c),u=l("babel-runtime/core-js/json/stringify"),r=y(u);g.encodeCallback=function(e,n){if(e.headers=e.headers||{},!Object.prototype.hasOwnProperty.call(e.headers,"x-oss-callback")&&n.callback){var a={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};n.callback.host&&(a.callbackHost=n.callback.host),n.callback.contentType&&(a.callbackBodyType=n.callback.contentType);var p=new m((0,r.default)(a)).toString("base64");if(e.headers["x-oss-callback"]=p,n.callback.customValue){var d={};(0,o.default)(n.callback.customValue).forEach(function(i){d["x:"+i]=n.callback.customValue[i]}),e.headers["x-oss-callback-var"]=new m((0,r.default)(d)).toString("base64")}}}}).call(this,l("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(l,R,g){"use strict";var m=l("babel-runtime/regenerator"),y=function(r){return r&&r.__esModule?r:{default:r}}(m),c=l("copy-to"),o=l("./callback"),u=g;u.listUploads=y.default.mark(function r(e,n){var a,p,d,i;return y.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return n=n||{},a={},c(n).to(a),a.subres="uploads",p=this._objectRequestParams("GET","",a),p.query=e,p.xmlResponse=!0,p.successStatuses=[200],v.next=10,this.request(p);case 10:return d=v.sent,i=d.data.Upload||[],Array.isArray(i)||(i=[i]),i=i.map(function(b){return{name:b.Key,uploadId:b.UploadId,initiated:b.Initiated}}),v.abrupt("return",{res:d.res,uploads:i,bucket:d.data.Bucket,nextKeyMarker:d.data.NextKeyMarker,nextUploadIdMarker:d.data.NextUploadIdMarker,isTruncated:d.data.IsTruncated==="true"});case 15:case"end":return v.stop()}},r,this)}),u.listParts=y.default.mark(function r(e,n,a,p){var d,i,v;return y.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return p=p||{},d={},c(p).to(d),d.subres={uploadId:n},i=this._objectRequestParams("GET",e,d),i.query=a,i.xmlResponse=!0,i.successStatuses=[200],b.next=10,this.request(i);case 10:return v=b.sent,b.abrupt("return",{res:v.res,uploadId:v.data.UploadId,bucket:v.data.Bucket,name:v.data.Key,partNumberMarker:v.data.PartNumberMarker,nextPartNumberMarker:v.data.NextPartNumberMarker,maxParts:v.data.MaxParts,isTruncated:v.data.IsTruncated,parts:v.data.Part||[]});case 12:case"end":return b.stop()}},r,this)}),u.abortMultipartUpload=y.default.mark(function r(e,n,a){var p,d,i;return y.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return this.cancel(),a=a||{},p={},c(a).to(p),p.subres={uploadId:n},d=this._objectRequestParams("DELETE",e,p),d.successStatuses=[204],v.next=9,this.request(d);case 9:return i=v.sent,v.abrupt("return",{res:i.res});case 11:case"end":return v.stop()}},r,this)}),u.initMultipartUpload=y.default.mark(function r(e,n){var a,p,d;return y.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return n=n||{},a={},c(n).to(a),a.headers=a.headers||{},this._convertMetaToHeaders(n.meta,a.headers),a.subres="uploads",p=this._objectRequestParams("POST",e,a),p.mime=n.mime,p.xmlResponse=!0,p.successStatuses=[200],i.next=12,this.request(p);case 12:return d=i.sent,i.abrupt("return",{res:d.res,bucket:d.data.Bucket,name:d.data.Key,uploadId:d.data.UploadId});case 14:case"end":return i.stop()}},r,this)}),u.uploadPart=y.default.mark(function r(e,n,a,p,d,i,v){var b;return y.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return b={stream:this._createStream(p,d,i),size:i-d},_.next=3,this._uploadPart(e,n,a,b,v);case 3:return _.abrupt("return",_.sent);case 4:case"end":return _.stop()}},r,this)}),u.completeMultipartUpload=y.default.mark(function r(e,n,a,p){var d,i,v,b,_,w,T,C;return y.default.wrap(function(S){for(;;)switch(S.prev=S.next){case 0:for(d=a.concat().sort(function(W,N){return W.number-N.number}).filter(function(W,N,E){return!N||W.number!==E[N-1].number}),i=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,v=0;v<d.length;v++)b=d[v],i+=`<Part>
|
|
|
`,i+="<PartNumber>"+b.number+`</PartNumber>
|
|
|
`,i+="<ETag>"+b.etag+`</ETag>
|
|
|
`,i+=`</Part>
|
|
|
`;return i+="</CompleteMultipartUpload>",p=p||{},_={},c(p).to(_),_.subres={uploadId:n},w=this._objectRequestParams("POST",e,_),o.encodeCallback(w,_),w.mime="xml",w.content=i,w.headers&&w.headers["x-oss-callback"]||(w.xmlResponse=!0),w.successStatuses=[200],S.next=16,this.request(w);case 16:return T=S.sent,C={res:T.res,bucket:w.bucket,name:e,etag:T.res.headers.etag},w.headers&&w.headers["x-oss-callback"]&&(C.data=JSON.parse(T.data.toString())),S.abrupt("return",C);case 20:case"end":return S.stop()}},r,this)}),u._uploadPart=y.default.mark(function r(e,n,a,p,d){var i,v,b;return y.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return d=d||{},i={},c(d).to(i),i.headers={"Content-Length":p.size},i.subres={partNumber:a,uploadId:n},v=this._objectRequestParams("PUT",e,i),v.mime=i.mime,v.stream=p.stream,v.successStatuses=[200],_.next=11,this.request(v);case 11:return b=_.sent,p.stream=null,v.stream=null,_.abrupt("return",{name:e,etag:b.res.headers.etag,res:b.res});case 15:case"end":return _.stop()}},r,this)})},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(l,R,g){(function(m){"use strict";function y(a){return a&&a.__esModule?a:{default:a}}var c=l("babel-runtime/core-js/json/stringify"),o=y(c),u=l("babel-runtime/core-js/object/keys"),r=y(u),e=l("./../../shims/crypto/crypto.js"),n=l("is-type-of");g.buildCanonicalizedResource=function(a,p){var d=""+a,i="?";if(n.string(p)&&p.trim()!=="")d+=i+p;else if(n.array(p))p.sort(),d+=i+p.join("&");else if(p){var v=function(_,w){return _[0]>w[0]?1:_[0]<w[0]?-1:0},b=function(_){d+=i+_,p[_]&&(d+="="+p[_]),i="&"};(0,r.default)(p).sort(v).forEach(b)}return d},g.buildCanonicalString=function(a,p,d,i){d=d||{};var v=d.headers||{},b=[],_={},w=[a.toUpperCase(),v["Content-Md5"]||"",v["Content-Type"]||v["Content-Type".toLowerCase()],i||v["x-oss-date"]];return(0,r.default)(v).forEach(function(T){var C=T.toLowerCase();C.indexOf("x-oss-")===0&&(_[C]=String(v[T]).trim())}),(0,r.default)(_).sort().forEach(function(T){b.push(T+":"+_[T])}),w=w.concat(b),w.push(this.buildCanonicalizedResource(p,d.parameters)),w.join(`
|
|
|
`)},g.computeSignature=function(a,p){return e.createHmac("sha1",a).update(new m(p,"utf8")).digest("base64")},g.authorization=function(a,p,d){return"OSS "+a+":"+this.computeSignature(p,d)},g._signatureForURL=function(a,p,d,i){var v={},b={};if(p.process&&(b["x-oss-process"]=p.process),p.response&&(0,r.default)(p.response).forEach(function(C){var S="response-"+C.toLowerCase();b[S]=p.response[C]}),(0,r.default)(p).forEach(function(C){var S=C.toLowerCase(),W=p[C];S.indexOf("x-oss-")===0?v[S]=W:S.indexOf("content-md5")===0||S.indexOf("content-type")===0?v[C]=W:S!=="expires"&&S!=="response"&&S!=="process"&&S!=="method"&&(b[S]=W)}),Object.prototype.hasOwnProperty.call(p,"security-token")&&(b["security-token"]=p["security-token"]),Object.prototype.hasOwnProperty.call(p,"callback")){var _={callbackUrl:encodeURI(p.callback.url),callbackBody:p.callback.body};if(p.callback.host&&(_.callbackHost=p.callback.host),p.callback.contentType&&(_.callbackBodyType=p.callback.contentType),b.callback=new m((0,o.default)(_)).toString("base64"),p.callback.customValue){var w={};(0,r.default)(p.callback.customValue).forEach(function(C){w["x:"+C]=p.callback.customValue[C]}),b["callback-var"]=new m((0,o.default)(w)).toString("base64")}}var T=this.buildCanonicalString(p.method,d,{headers:v,parameters:b},i.toString());return{Signature:this.computeSignature(a,T),subResource:b}}}).call(this,l("buffer").Buffer)},{"./../../shims/crypto/crypto.js":237,"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38,"is-type-of":165}],10:[function(l,R,g){"use strict";var m=l("babel-runtime/regenerator"),y=function(e){return e&&e.__esModule?e:{default:e}}(m),c=l("co"),o=l("co-priority-queue"),u=l("any-promise"),r=g;r._thunkPool=function(e,n){function a(b,_){++i===b.length&&_(v)}function p(b,_){function w(){var E;return y.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:E=void 0;case 1:if(d.isCancel()){K.next=9;break}return K.next=4,S.next();case 4:return E=K.sent,K.next=7,E();case 7:K.next=1;break;case 9:W+=1,W===b&&(S.fns=[],S.buffer=[],_(v));case 11:case"end":return K.stop()}},C,this)}function T(E){console.error(E.stack)}for(var C=y.default.mark(w),S=new o,W=0,N=0;N<b;N++)c(w).catch(T);return function(E,K){return function(z){S.push(y.default.mark(function M(){return y.default.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return G.prev=0,G.t0=z,G.next=4,E;case 4:G.t1=G.sent,(0,G.t0)(null,G.t1),G.next=11;break;case 8:G.prev=8,G.t2=G.catch(0),z(G.t2);case 11:case"end":return G.stop()}},M,this,[[0,8]])}),K)}}}var d=this,i=0,v=[];return new u(function(b){function _(W){return y.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return N.next=2,C(e[W]);case 2:a(e,b);case 3:case"end":return N.stop()}},T,this)}function w(W){v.push(W),a(e,b)}for(var T=y.default.mark(_),C=new p(n,b),S=0;S<e.length;S++)c(_(S)).catch(w)})},r.cancel=function(){this.options.cancelFlag=!0},r.isCancel=function(){return this.options.cancelFlag},r.resetCancelFlag=function(){this.options.cancelFlag=!1}},{"any-promise":13,"babel-runtime/regenerator":33,co:41,"co-priority-queue":40}],11:[function(l,R,g){"use strict";g._isIP=function(m){var y=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,c=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return y.test(m)||c.test(m)}},{}],12:[function(l,R,g){function m(){}R.exports=m,R.exports.HttpsAgent=m},{}],13:[function(l,R,g){R.exports=l("./register")().Promise},{"./register":15}],14:[function(l,R,g){"use strict";var m=null;R.exports=function(y,c){return function(o,u){o=o||null,u=u||{};var r=u.global!==!1;if(m===null&&r&&(m=y["@@any-promise/REGISTRATION"]||null),m!==null&&o!==null&&m.implementation!==o)throw new Error('any-promise already defined as "'+m.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return m===null&&(m=o!==null&&u.Promise!==void 0?{Promise:u.Promise,implementation:o}:c(o),r&&(y["@@any-promise/REGISTRATION"]=m)),m}}},{}],15:[function(l,R,g){"use strict";function m(){if(window.Promise===void 0)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}R.exports=l("./loader")(window,m)},{"./loader":14}],16:[function(l,R,g){R.exports={default:l("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(l,R,g){R.exports={default:l("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(l,R,g){R.exports={default:l("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(l,R,g){R.exports={default:l("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(l,R,g){R.exports={default:l("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(l,R,g){R.exports={default:l("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":49}],22:[function(l,R,g){R.exports={default:l("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":50}],23:[function(l,R,g){R.exports={default:l("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(l,R,g){R.exports={default:l("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(l,R,g){R.exports={default:l("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(l,R,g){R.exports={default:l("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":54}],27:[function(l,R,g){R.exports={default:l("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(l,R,g){R.exports={default:l("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(l,R,g){R.exports={default:l("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(l,R,g){"use strict";g.__esModule=!0,g.default=function(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(l,R,g){"use strict";g.__esModule=!0;var m=l("../core-js/object/define-property"),y=function(c){return c&&c.__esModule?c:{default:c}}(m);g.default=function(){function c(o,u){for(var r=0;r<u.length;r++){var e=u[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),(0,y.default)(o,e.key,e)}}return function(o,u,r){return u&&c(o.prototype,u),r&&c(o,r),o}}()},{"../core-js/object/define-property":20}],32:[function(l,R,g){"use strict";function m(e){return e&&e.__esModule?e:{default:e}}g.__esModule=!0;var y=l("../core-js/symbol/iterator"),c=m(y),o=l("../core-js/symbol"),u=m(o),r=typeof u.default=="function"&&typeof c.default=="symbol"?function(e){return typeof e}:function(e){return e&&typeof u.default=="function"&&e.constructor===u.default&&e!==u.default.prototype?"symbol":typeof e};g.default=typeof u.default=="function"&&r(c.default)==="symbol"?function(e){return e===void 0?"undefined":r(e)}:function(e){return e&&typeof u.default=="function"&&e.constructor===u.default&&e!==u.default.prototype?"symbol":e===void 0?"undefined":r(e)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(l,R,g){R.exports=l("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(l,R,g){"use strict";function m(b){var _=b.length;if(_%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var w=b.indexOf("=");return w===-1&&(w=_),[w,w===_?0:4-w%4]}function y(b){var _=m(b),w=_[0],T=_[1];return 3*(w+T)/4-T}function c(b,_,w){return 3*(_+w)/4-w}function o(b){for(var _,w=m(b),T=w[0],C=w[1],S=new p(c(b,T,C)),W=0,N=C>0?T-4:T,E=0;E<N;E+=4)_=a[b.charCodeAt(E)]<<18|a[b.charCodeAt(E+1)]<<12|a[b.charCodeAt(E+2)]<<6|a[b.charCodeAt(E+3)],S[W++]=_>>16&255,S[W++]=_>>8&255,S[W++]=255&_;return C===2&&(_=a[b.charCodeAt(E)]<<2|a[b.charCodeAt(E+1)]>>4,S[W++]=255&_),C===1&&(_=a[b.charCodeAt(E)]<<10|a[b.charCodeAt(E+1)]<<4|a[b.charCodeAt(E+2)]>>2,S[W++]=_>>8&255,S[W++]=255&_),S}function u(b){return n[b>>18&63]+n[b>>12&63]+n[b>>6&63]+n[63&b]}function r(b,_,w){for(var T,C=[],S=_;S<w;S+=3)T=(b[S]<<16&16711680)+(b[S+1]<<8&65280)+(255&b[S+2]),C.push(u(T));return C.join("")}function e(b){for(var _,w=b.length,T=w%3,C=[],S=0,W=w-T;S<W;S+=16383)C.push(r(b,S,S+16383>W?W:S+16383));return T===1?(_=b[w-1],C.push(n[_>>2]+n[_<<4&63]+"==")):T===2&&(_=(b[w-2]<<8)+b[w-1],C.push(n[_>>10]+n[_>>4&63]+n[_<<2&63]+"=")),C.join("")}g.byteLength=y,g.toByteArray=o,g.fromByteArray=e;for(var n=[],a=[],p=typeof Uint8Array!="undefined"?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,v=d.length;i<v;++i)n[i]=d[i],a[d.charCodeAt(i)]=i;a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],35:[function(l,R,g){!function(m,y,c){R!==void 0&&R.exports?R.exports=c():typeof De=="function"&&De.amd?De("bowser",c):m.bowser=c()}(this,0,function(){function m(a){function p($){var V=a.match($);return V&&V.length>1&&V[1]||""}function d($){var V=a.match($);return V&&V.length>1&&V[2]||""}var i,v=p(/(ipod|iphone|ipad)/i).toLowerCase(),b=/like android/i.test(a),_=!b&&/android/i.test(a),w=/nexus\s*[0-6]\s*/i.test(a),T=!w&&/nexus\s*[0-9]+/i.test(a),C=/CrOS/.test(a),S=/silk/i.test(a),W=/sailfish/i.test(a),N=/tizen/i.test(a),E=/(web|hpw)os/i.test(a),K=/windows phone/i.test(a),z=(/SamsungBrowser/i.test(a),!K&&/windows/i.test(a)),M=!v&&!S&&/macintosh/i.test(a),G=!_&&!W&&!N&&!E&&/linux/i.test(a),J=d(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),te=p(/version\/(\d+(\.\d+)?)/i),re=/tablet/i.test(a)&&!/tablet pc/i.test(a),se=!re&&/[^-]mobi/i.test(a),H=/xbox/i.test(a);/opera/i.test(a)?i={name:"Opera",opera:e,version:te||p(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(a)?i={name:"Opera",opera:e,version:p(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||te}:/SamsungBrowser/i.test(a)?i={name:"Samsung Internet for Android",samsungBrowser:e,version:te||p(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(a)?i={name:"Opera Coast",coast:e,version:te||p(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(a)?i={name:"Yandex Browser",yandexbrowser:e,version:te||p(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(a)?i={name:"UC Browser",ucbrowser:e,version:p(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(a)?i={name:"Maxthon",maxthon:e,version:p(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(a)?i={name:"Epiphany",epiphany:e,version:p(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(a)?i={name:"Puffin",puffin:e,version:p(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(a)?i={name:"Sleipnir",sleipnir:e,version:p(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(a)?i={name:"K-Meleon",kMeleon:e,version:p(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:K?(i={name:"Windows Phone",osname:"Windows Phone",windowsphone:e},J?(i.msedge=e,i.version=J):(i.msie=e,i.version=p(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(a)?i={name:"Internet Explorer",msie:e,version:p(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:C?i={name:"Chrome",osname:"Chrome OS",chromeos:e,chromeBook:e,chrome:e,version:p(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(a)?i={name:"Microsoft Edge",msedge:e,version:J}:/vivaldi/i.test(a)?i={name:"Vivaldi",vivaldi:e,version:p(/vivaldi\/(\d+(\.\d+)?)/i)||te}:W?i={name:"Sailfish",osname:"Sailfish OS",sailfish:e,version:p(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(a)?i={name:"SeaMonkey",seamonkey:e,version:p(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(a)?(i={name:"Firefox",firefox:e,version:p(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(a)&&(i.firefoxos=e,i.osname="Firefox OS")):S?i={name:"Amazon Silk",silk:e,version:p(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(a)?i={name:"PhantomJS",phantom:e,version:p(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(a)?i={name:"SlimerJS",slimer:e,version:p(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(a)||/rim\stablet/i.test(a)?i={name:"BlackBerry",osname:"BlackBerry OS",blackberry:e,version:te||p(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:E?(i={name:"WebOS",osname:"WebOS",webos:e,version:te||p(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(a)&&(i.touchpad=e)):/bada/i.test(a)?i={name:"Bada",osname:"Bada",bada:e,version:p(/dolfin\/(\d+(\.\d+)?)/i)}:N?i={name:"Tizen",osname:"Tizen",tizen:e,version:p(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||te}:/qupzilla/i.test(a)?i={name:"QupZilla",qupzilla:e,version:p(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||te}:/chromium/i.test(a)?i={name:"Chromium",chromium:e,version:p(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||te}:/chrome|crios|crmo/i.test(a)?i={name:"Chrome",chrome:e,version:p(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:_?i={name:"Android",version:te}:/safari|applewebkit/i.test(a)?(i={name:"Safari",safari:e},te&&(i.version=te)):v?(i={name:v=="iphone"?"iPhone":v=="ipad"?"iPad":"iPod"},te&&(i.version=te)):i=/googlebot/i.test(a)?{name:"Googlebot",googlebot:e,version:p(/googlebot\/(\d+(\.\d+))/i)||te}:{name:p(/^(.*)\/(.*) /),version:d(/^(.*)\/(.*) /)},!i.msedge&&/(apple)?webkit/i.test(a)?(/(apple)?webkit\/537\.36/i.test(a)?(i.name=i.name||"Blink",i.blink=e):(i.name=i.name||"Webkit",i.webkit=e),!i.version&&te&&(i.version=te)):!i.opera&&/gecko\//i.test(a)&&(i.name=i.name||"Gecko",i.gecko=e,i.version=i.version||p(/gecko\/(\d+(\.\d+)?)/i)),i.windowsphone||!_&&!i.silk?!i.windowsphone&&v?(i[v]=e,i.ios=e,i.osname="iOS"):M?(i.mac=e,i.osname="macOS"):H?(i.xbox=e,i.osname="Xbox"):z?(i.windows=e,i.osname="Windows"):G&&(i.linux=e,i.osname="Linux"):(i.android=e,i.osname="Android");var he="";i.windows?he=function($){switch($){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}(p(/Windows ((NT|XP)( \d\d?.\d)?)/i)):i.windowsphone?he=p(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):i.mac?(he=p(/Mac OS X (\d+([_\.\s]\d+)*)/i),he=he.replace(/[_\s]/g,".")):v?(he=p(/os (\d+([_\s]\d+)*) like mac os x/i),he=he.replace(/[_\s]/g,".")):_?he=p(/android[ \/-](\d+(\.\d+)*)/i):i.webos?he=p(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):i.blackberry?he=p(/rim\stablet\sos\s(\d+(\.\d+)*)/i):i.bada?he=p(/bada\/(\d+(\.\d+)*)/i):i.tizen&&(he=p(/tizen[\/\s](\d+(\.\d+)*)/i)),he&&(i.osversion=he);var Z=!i.windows&&he.split(".")[0];return re||T||v=="ipad"||_&&(Z==3||Z>=4&&!se)||i.silk?i.tablet=e:(se||v=="iphone"||v=="ipod"||_||w||i.blackberry||i.webos||i.bada)&&(i.mobile=e),i.msedge||i.msie&&i.version>=10||i.yandexbrowser&&i.version>=15||i.vivaldi&&i.version>=1||i.chrome&&i.version>=20||i.samsungBrowser&&i.version>=4||i.firefox&&i.version>=20||i.safari&&i.version>=6||i.opera&&i.version>=10||i.ios&&i.osversion&&i.osversion.split(".")[0]>=6||i.blackberry&&i.version>=10.1||i.chromium&&i.version>=20?i.a=e:i.msie&&i.version<10||i.chrome&&i.version<20||i.firefox&&i.version<20||i.safari&&i.version<6||i.opera&&i.version<10||i.ios&&i.osversion&&i.osversion.split(".")[0]<6||i.chromium&&i.version<20?i.c=e:i.x=e,i}function y(a){return a.split(".").length}function c(a,p){var d,i=[];if(Array.prototype.map)return Array.prototype.map.call(a,p);for(d=0;d<a.length;d++)i.push(p(a[d]));return i}function o(a){for(var p=Math.max(y(a[0]),y(a[1])),d=c(a,function(i){var v=p-y(i);return i+=new Array(v+1).join(".0"),c(i.split("."),function(b){return new Array(20-b.length).join("0")+b}).reverse()});--p>=0;){if(d[0][p]>d[1][p])return 1;if(d[0][p]!==d[1][p])return-1;if(p===0)return 0}}function u(a,p,d){var i=n;typeof p=="string"&&(d=p,p=void 0),p===void 0&&(p=!1),d&&(i=m(d));var v=""+i.version;for(var b in a)if(a.hasOwnProperty(b)&&i[b]){if(typeof a[b]!="string")throw new Error("Browser version in the minVersion map should be a string: "+b+": "+String(a));return o([v,a[b]])<0}return p}function r(a,p,d){return!u(a,p,d)}var e=!0,n=m(typeof navigator!="undefined"&&navigator.userAgent||"");return n.test=function(a){for(var p=0;p<a.length;++p){var d=a[p];if(typeof d=="string"&&d in n)return!0}return!1},n.isUnsupportedBrowser=u,n.compareVersions=o,n.check=r,n._detect=m,n.detect=m,n})},{}],36:[function(l,R,g){},{}],37:[function(l,R,g){function m(n){if(n&&!r(n))throw new Error("Unknown encoding: "+n)}function y(n){return n.toString(this.encoding)}function c(n){this.charReceived=n.length%2,this.charLength=this.charReceived?2:0}function o(n){this.charReceived=n.length%3,this.charLength=this.charReceived?3:0}var u=l("buffer").Buffer,r=u.isEncoding||function(n){switch(n&&n.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},e=g.StringDecoder=function(n){switch(this.encoding=(n||"utf8").toLowerCase().replace(/[-_]/,""),m(n),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=c;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=o;break;default:return void(this.write=y)}this.charBuffer=new u(6),this.charReceived=0,this.charLength=0};e.prototype.write=function(n){for(var a="";this.charLength;){var p=n.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:n.length;if(n.copy(this.charBuffer,this.charReceived,0,p),this.charReceived+=p,this.charReceived<this.charLength)return"";n=n.slice(p,n.length),a=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var i=a.charCodeAt(a.length-1);if(!(i>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,n.length===0)return a;break}this.charLength+=this.surrogateSize,a=""}this.detectIncompleteChar(n);var d=n.length;this.charLength&&(n.copy(this.charBuffer,0,n.length-this.charReceived,d),d-=this.charReceived),a+=n.toString(this.encoding,0,d);var d=a.length-1,i=a.charCodeAt(d);if(i>=55296&&i<=56319){var v=this.surrogateSize;return this.charLength+=v,this.charReceived+=v,this.charBuffer.copy(this.charBuffer,v,0,v),n.copy(this.charBuffer,0,0,v),a.substring(0,d)}return a},e.prototype.detectIncompleteChar=function(n){for(var a=n.length>=3?3:n.length;a>0;a--){var p=n[n.length-a];if(a==1&&p>>5==6){this.charLength=2;break}if(a<=2&&p>>4==14){this.charLength=3;break}if(a<=3&&p>>3==30){this.charLength=4;break}}this.charReceived=a},e.prototype.end=function(n){var a="";if(n&&n.length&&(a=this.write(n)),this.charReceived){var p=this.charReceived,d=this.charBuffer,i=this.encoding;a+=d.slice(0,p).toString(i)}return a}},{buffer:38}],38:[function(l,R,g){(function(m){"use strict";function y(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(t,h){if(y()<h)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(h),t.__proto__=o.prototype):(t===null&&(t=new o(h)),t.length=h),t}function o(t,h,L){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(t,h,L);if(typeof t=="number"){if(typeof h=="string")throw new Error("If encoding is specified then the first argument must be a string");return n(this,t)}return u(this,t,h,L)}function u(t,h,L,A){if(typeof h=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&h instanceof ArrayBuffer?d(t,h,L,A):typeof h=="string"?a(t,h,L):i(t,h)}function r(t){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function e(t,h,L,A){return r(h),h<=0?c(t,h):L!==void 0?typeof A=="string"?c(t,h).fill(L,A):c(t,h).fill(L):c(t,h)}function n(t,h){if(r(h),t=c(t,h<0?0:0|v(h)),!o.TYPED_ARRAY_SUPPORT)for(var L=0;L<h;++L)t[L]=0;return t}function a(t,h,L){if(typeof L=="string"&&L!==""||(L="utf8"),!o.isEncoding(L))throw new TypeError('"encoding" must be a valid string encoding');var A=0|_(h,L);t=c(t,A);var k=t.write(h,L);return k!==A&&(t=t.slice(0,k)),t}function p(t,h){var L=h.length<0?0:0|v(h.length);t=c(t,L);for(var A=0;A<L;A+=1)t[A]=255&h[A];return t}function d(t,h,L,A){if(h.byteLength,L<0||h.byteLength<L)throw new RangeError("'offset' is out of bounds");if(h.byteLength<L+(A||0))throw new RangeError("'length' is out of bounds");return h=L===void 0&&A===void 0?new Uint8Array(h):A===void 0?new Uint8Array(h,L):new Uint8Array(h,L,A),o.TYPED_ARRAY_SUPPORT?(t=h,t.__proto__=o.prototype):t=p(t,h),t}function i(t,h){if(o.isBuffer(h)){var L=0|v(h.length);return t=c(t,L),t.length===0||h.copy(t,0,0,L),t}if(h){if(typeof ArrayBuffer!="undefined"&&h.buffer instanceof ArrayBuffer||"length"in h)return typeof h.length!="number"||F(h.length)?c(t,0):p(t,h);if(h.type==="Buffer"&&be(h.data))return p(t,h.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function v(t){if(t>=y())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+y().toString(16)+" bytes");return 0|t}function b(t){return+t!=t&&(t=0),o.alloc(+t)}function _(t,h){if(o.isBuffer(t))return t.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var L=t.length;if(L===0)return 0;for(var A=!1;;)switch(h){case"ascii":case"latin1":case"binary":return L;case"utf8":case"utf-8":case void 0:return ye(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*L;case"hex":return L>>>1;case"base64":return ee(t).length;default:if(A)return ye(t).length;h=(""+h).toLowerCase(),A=!0}}function w(t,h,L){var A=!1;if((h===void 0||h<0)&&(h=0),h>this.length)return"";if((L===void 0||L>this.length)&&(L=this.length),L<=0)return"";if(L>>>=0,h>>>=0,L<=h)return"";for(t||(t="utf8");;)switch(t){case"hex":return H(this,h,L);case"utf8":case"utf-8":return J(this,h,L);case"ascii":return re(this,h,L);case"latin1":case"binary":return se(this,h,L);case"base64":return G(this,h,L);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return he(this,h,L);default:if(A)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),A=!0}}function T(t,h,L){var A=t[h];t[h]=t[L],t[L]=A}function C(t,h,L,A,k){if(t.length===0)return-1;if(typeof L=="string"?(A=L,L=0):L>2147483647?L=2147483647:L<-2147483648&&(L=-2147483648),L=+L,isNaN(L)&&(L=k?0:t.length-1),L<0&&(L=t.length+L),L>=t.length){if(k)return-1;L=t.length-1}else if(L<0){if(!k)return-1;L=0}if(typeof h=="string"&&(h=o.from(h,A)),o.isBuffer(h))return h.length===0?-1:S(t,h,L,A,k);if(typeof h=="number")return h&=255,o.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?k?Uint8Array.prototype.indexOf.call(t,h,L):Uint8Array.prototype.lastIndexOf.call(t,h,L):S(t,[h],L,A,k);throw new TypeError("val must be string, number or Buffer")}function S(t,h,L,A,k){function le(je,ke){return _e===1?je[ke]:je.readUInt16BE(ke*_e)}var _e=1,Ge=t.length,ze=h.length;if(A!==void 0&&((A=String(A).toLowerCase())==="ucs2"||A==="ucs-2"||A==="utf16le"||A==="utf-16le")){if(t.length<2||h.length<2)return-1;_e=2,Ge/=2,ze/=2,L/=2}var Fe;if(k){var Ke=-1;for(Fe=L;Fe<Ge;Fe++)if(le(t,Fe)===le(h,Ke===-1?0:Fe-Ke)){if(Ke===-1&&(Ke=Fe),Fe-Ke+1===ze)return Ke*_e}else Ke!==-1&&(Fe-=Fe-Ke),Ke=-1}else for(L+ze>Ge&&(L=Ge-ze),Fe=L;Fe>=0;Fe--){for(var ot=!0,Be=0;Be<ze;Be++)if(le(t,Fe+Be)!==le(h,Be)){ot=!1;break}if(ot)return Fe}return-1}function W(t,h,L,A){L=Number(L)||0;var k=t.length-L;A?(A=Number(A))>k&&(A=k):A=k;var le=h.length;if(le%2!=0)throw new TypeError("Invalid hex string");A>le/2&&(A=le/2);for(var _e=0;_e<A;++_e){var Ge=parseInt(h.substr(2*_e,2),16);if(isNaN(Ge))return _e;t[L+_e]=Ge}return _e}function N(t,h,L,A){return Ee(ye(h,t.length-L),t,L,A)}function E(t,h,L,A){return Ee(ue(h),t,L,A)}function K(t,h,L,A){return E(t,h,L,A)}function z(t,h,L,A){return Ee(ee(h),t,L,A)}function M(t,h,L,A){return Ee(ae(h,t.length-L),t,L,A)}function G(t,h,L){return h===0&&L===t.length?j.fromByteArray(t):j.fromByteArray(t.slice(h,L))}function J(t,h,L){L=Math.min(t.length,L);for(var A=[],k=h;k<L;){var le=t[k],_e=null,Ge=le>239?4:le>223?3:le>191?2:1;if(k+Ge<=L){var ze,Fe,Ke,ot;switch(Ge){case 1:le<128&&(_e=le);break;case 2:ze=t[k+1],(192&ze)==128&&(ot=(31&le)<<6|63&ze)>127&&(_e=ot);break;case 3:ze=t[k+1],Fe=t[k+2],(192&ze)==128&&(192&Fe)==128&&(ot=(15&le)<<12|(63&ze)<<6|63&Fe)>2047&&(ot<55296||ot>57343)&&(_e=ot);break;case 4:ze=t[k+1],Fe=t[k+2],Ke=t[k+3],(192&ze)==128&&(192&Fe)==128&&(192&Ke)==128&&(ot=(15&le)<<18|(63&ze)<<12|(63&Fe)<<6|63&Ke)>65535&&ot<1114112&&(_e=ot)}}_e===null?(_e=65533,Ge=1):_e>65535&&(_e-=65536,A.push(_e>>>10&1023|55296),_e=56320|1023&_e),A.push(_e),k+=Ge}return te(A)}function te(t){var h=t.length;if(h<=Te)return String.fromCharCode.apply(String,t);for(var L="",A=0;A<h;)L+=String.fromCharCode.apply(String,t.slice(A,A+=Te));return L}function re(t,h,L){var A="";L=Math.min(t.length,L);for(var k=h;k<L;++k)A+=String.fromCharCode(127&t[k]);return A}function se(t,h,L){var A="";L=Math.min(t.length,L);for(var k=h;k<L;++k)A+=String.fromCharCode(t[k]);return A}function H(t,h,L){var A=t.length;(!h||h<0)&&(h=0),(!L||L<0||L>A)&&(L=A);for(var k="",le=h;le<L;++le)k+=me(t[le]);return k}function he(t,h,L){for(var A=t.slice(h,L),k="",le=0;le<A.length;le+=2)k+=String.fromCharCode(A[le]+256*A[le+1]);return k}function Z(t,h,L){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+h>L)throw new RangeError("Trying to access beyond buffer length")}function $(t,h,L,A,k,le){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>k||h<le)throw new RangeError('"value" argument is out of bounds');if(L+A>t.length)throw new RangeError("Index out of range")}function V(t,h,L,A){h<0&&(h=65535+h+1);for(var k=0,le=Math.min(t.length-L,2);k<le;++k)t[L+k]=(h&255<<8*(A?k:1-k))>>>8*(A?k:1-k)}function X(t,h,L,A){h<0&&(h=4294967295+h+1);for(var k=0,le=Math.min(t.length-L,4);k<le;++k)t[L+k]=h>>>8*(A?k:3-k)&255}function Q(t,h,L,A,k,le){if(L+A>t.length)throw new RangeError("Index out of range");if(L<0)throw new RangeError("Index out of range")}function oe(t,h,L,A,k){return k||Q(t,h,L,4,34028234663852886e22,-34028234663852886e22),de.write(t,h,L,A,23,4),L+4}function we(t,h,L,A,k){return k||Q(t,h,L,8,17976931348623157e292,-17976931348623157e292),de.write(t,h,L,A,52,8),L+8}function ge(t){if(t=Ae(t).replace(I,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function Ae(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function me(t){return t<16?"0"+t.toString(16):t.toString(16)}function ye(t,h){h=h||1/0;for(var L,A=t.length,k=null,le=[],_e=0;_e<A;++_e){if((L=t.charCodeAt(_e))>55295&&L<57344){if(!k){if(L>56319){(h-=3)>-1&&le.push(239,191,189);continue}if(_e+1===A){(h-=3)>-1&&le.push(239,191,189);continue}k=L;continue}if(L<56320){(h-=3)>-1&&le.push(239,191,189),k=L;continue}L=65536+(k-55296<<10|L-56320)}else k&&(h-=3)>-1&&le.push(239,191,189);if(k=null,L<128){if((h-=1)<0)break;le.push(L)}else if(L<2048){if((h-=2)<0)break;le.push(L>>6|192,63&L|128)}else if(L<65536){if((h-=3)<0)break;le.push(L>>12|224,L>>6&63|128,63&L|128)}else{if(!(L<1114112))throw new Error("Invalid code point");if((h-=4)<0)break;le.push(L>>18|240,L>>12&63|128,L>>6&63|128,63&L|128)}}return le}function ue(t){for(var h=[],L=0;L<t.length;++L)h.push(255&t.charCodeAt(L));return h}function ae(t,h){for(var L,A,k,le=[],_e=0;_e<t.length&&!((h-=2)<0);++_e)L=t.charCodeAt(_e),A=L>>8,k=L%256,le.push(k),le.push(A);return le}function ee(t){return j.toByteArray(ge(t))}function Ee(t,h,L,A){for(var k=0;k<A&&!(k+L>=h.length||k>=t.length);++k)h[k+L]=t[k];return k}function F(t){return t!==t}var j=l("base64-js"),de=l("ieee754"),be=l("isarray");g.Buffer=o,g.SlowBuffer=b,g.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=m.TYPED_ARRAY_SUPPORT!==void 0?m.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},t.foo()===42&&typeof t.subarray=="function"&&t.subarray(1,1).byteLength===0}catch(h){return!1}}(),g.kMaxLength=y(),o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,h,L){return u(null,t,h,L)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,h,L){return e(null,t,h,L)},o.allocUnsafe=function(t){return n(null,t)},o.allocUnsafeSlow=function(t){return n(null,t)},o.isBuffer=function(t){return!(t==null||!t._isBuffer)},o.compare=function(t,h){if(!o.isBuffer(t)||!o.isBuffer(h))throw new TypeError("Arguments must be Buffers");if(t===h)return 0;for(var L=t.length,A=h.length,k=0,le=Math.min(L,A);k<le;++k)if(t[k]!==h[k]){L=t[k],A=h[k];break}return L<A?-1:A<L?1:0},o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(t,h){if(!be(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return o.alloc(0);var L;if(h===void 0)for(h=0,L=0;L<t.length;++L)h+=t[L].length;var A=o.allocUnsafe(h),k=0;for(L=0;L<t.length;++L){var le=t[L];if(!o.isBuffer(le))throw new TypeError('"list" argument must be an Array of Buffers');le.copy(A,k),k+=le.length}return A},o.byteLength=_,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var h=0;h<t;h+=2)T(this,h,h+1);return this},o.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var h=0;h<t;h+=4)T(this,h,h+3),T(this,h+1,h+2);return this},o.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var h=0;h<t;h+=8)T(this,h,h+7),T(this,h+1,h+6),T(this,h+2,h+5),T(this,h+3,h+4);return this},o.prototype.toString=function(){var t=0|this.length;return t===0?"":arguments.length===0?J(this,0,t):w.apply(this,arguments)},o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||o.compare(this,t)===0},o.prototype.inspect=function(){var t="",h=g.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,h).match(/.{2}/g).join(" "),this.length>h&&(t+=" ... ")),"<Buffer "+t+">"},o.prototype.compare=function(t,h,L,A,k){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(h===void 0&&(h=0),L===void 0&&(L=t?t.length:0),A===void 0&&(A=0),k===void 0&&(k=this.length),h<0||L>t.length||A<0||k>this.length)throw new RangeError("out of range index");if(A>=k&&h>=L)return 0;if(A>=k)return-1;if(h>=L)return 1;if(h>>>=0,L>>>=0,A>>>=0,k>>>=0,this===t)return 0;for(var le=k-A,_e=L-h,Ge=Math.min(le,_e),ze=this.slice(A,k),Fe=t.slice(h,L),Ke=0;Ke<Ge;++Ke)if(ze[Ke]!==Fe[Ke]){le=ze[Ke],_e=Fe[Ke];break}return le<_e?-1:_e<le?1:0},o.prototype.includes=function(t,h,L){return this.indexOf(t,h,L)!==-1},o.prototype.indexOf=function(t,h,L){return C(this,t,h,L,!0)},o.prototype.lastIndexOf=function(t,h,L){return C(this,t,h,L,!1)},o.prototype.write=function(t,h,L,A){if(h===void 0)A="utf8",L=this.length,h=0;else if(L===void 0&&typeof h=="string")A=h,L=this.length,h=0;else{if(!isFinite(h))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");h|=0,isFinite(L)?(L|=0,A===void 0&&(A="utf8")):(A=L,L=void 0)}var k=this.length-h;if((L===void 0||L>k)&&(L=k),t.length>0&&(L<0||h<0)||h>this.length)throw new RangeError("Attempt to write outside buffer bounds");A||(A="utf8");for(var le=!1;;)switch(A){case"hex":return W(this,t,h,L);case"utf8":case"utf-8":return N(this,t,h,L);case"ascii":return E(this,t,h,L);case"latin1":case"binary":return K(this,t,h,L);case"base64":return z(this,t,h,L);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,h,L);default:if(le)throw new TypeError("Unknown encoding: "+A);A=(""+A).toLowerCase(),le=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Te=4096;o.prototype.slice=function(t,h){var L=this.length;t=~~t,h=h===void 0?L:~~h,t<0?(t+=L)<0&&(t=0):t>L&&(t=L),h<0?(h+=L)<0&&(h=0):h>L&&(h=L),h<t&&(h=t);var A;if(o.TYPED_ARRAY_SUPPORT)A=this.subarray(t,h),A.__proto__=o.prototype;else{var k=h-t;A=new o(k,void 0);for(var le=0;le<k;++le)A[le]=this[le+t]}return A},o.prototype.readUIntLE=function(t,h,L){t|=0,h|=0,L||Z(t,h,this.length);for(var A=this[t],k=1,le=0;++le<h&&(k*=256);)A+=this[t+le]*k;return A},o.prototype.readUIntBE=function(t,h,L){t|=0,h|=0,L||Z(t,h,this.length);for(var A=this[t+--h],k=1;h>0&&(k*=256);)A+=this[t+--h]*k;return A},o.prototype.readUInt8=function(t,h){return h||Z(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,h){return h||Z(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,h){return h||Z(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,h){return h||Z(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,h){return h||Z(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,h,L){t|=0,h|=0,L||Z(t,h,this.length);for(var A=this[t],k=1,le=0;++le<h&&(k*=256);)A+=this[t+le]*k;return k*=128,A>=k&&(A-=Math.pow(2,8*h)),A},o.prototype.readIntBE=function(t,h,L){t|=0,h|=0,L||Z(t,h,this.length);for(var A=h,k=1,le=this[t+--A];A>0&&(k*=256);)le+=this[t+--A]*k;return k*=128,le>=k&&(le-=Math.pow(2,8*h)),le},o.prototype.readInt8=function(t,h){return h||Z(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,h){h||Z(t,2,this.length);var L=this[t]|this[t+1]<<8;return 32768&L?4294901760|L:L},o.prototype.readInt16BE=function(t,h){h||Z(t,2,this.length);var L=this[t+1]|this[t]<<8;return 32768&L?4294901760|L:L},o.prototype.readInt32LE=function(t,h){return h||Z(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,h){return h||Z(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,h){return h||Z(t,4,this.length),de.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,h){return h||Z(t,4,this.length),de.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,h){return h||Z(t,8,this.length),de.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,h){return h||Z(t,8,this.length),de.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,h,L,A){(t=+t,h|=0,L|=0,!A)&&$(this,t,h,L,Math.pow(2,8*L)-1,0);var k=1,le=0;for(this[h]=255&t;++le<L&&(k*=256);)this[h+le]=t/k&255;return h+L},o.prototype.writeUIntBE=function(t,h,L,A){(t=+t,h|=0,L|=0,!A)&&$(this,t,h,L,Math.pow(2,8*L)-1,0);var k=L-1,le=1;for(this[h+k]=255&t;--k>=0&&(le*=256);)this[h+k]=t/le&255;return h+L},o.prototype.writeUInt8=function(t,h,L){return t=+t,h|=0,L||$(this,t,h,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[h]=255&t,h+1},o.prototype.writeUInt16LE=function(t,h,L){return t=+t,h|=0,L||$(this,t,h,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[h]=255&t,this[h+1]=t>>>8):V(this,t,h,!0),h+2},o.prototype.writeUInt16BE=function(t,h,L){return t=+t,h|=0,L||$(this,t,h,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[h]=t>>>8,this[h+1]=255&t):V(this,t,h,!1),h+2},o.prototype.writeUInt32LE=function(t,h,L){return t=+t,h|=0,L||$(this,t,h,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[h+3]=t>>>24,this[h+2]=t>>>16,this[h+1]=t>>>8,this[h]=255&t):X(this,t,h,!0),h+4},o.prototype.writeUInt32BE=function(t,h,L){return t=+t,h|=0,L||$(this,t,h,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[h]=t>>>24,this[h+1]=t>>>16,this[h+2]=t>>>8,this[h+3]=255&t):X(this,t,h,!1),h+4},o.prototype.writeIntLE=function(t,h,L,A){if(t=+t,h|=0,!A){var k=Math.pow(2,8*L-1);$(this,t,h,L,k-1,-k)}var le=0,_e=1,Ge=0;for(this[h]=255&t;++le<L&&(_e*=256);)t<0&&Ge===0&&this[h+le-1]!==0&&(Ge=1),this[h+le]=(t/_e>>0)-Ge&255;return h+L},o.prototype.writeIntBE=function(t,h,L,A){if(t=+t,h|=0,!A){var k=Math.pow(2,8*L-1);$(this,t,h,L,k-1,-k)}var le=L-1,_e=1,Ge=0;for(this[h+le]=255&t;--le>=0&&(_e*=256);)t<0&&Ge===0&&this[h+le+1]!==0&&(Ge=1),this[h+le]=(t/_e>>0)-Ge&255;return h+L},o.prototype.writeInt8=function(t,h,L){return t=+t,h|=0,L||$(this,t,h,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[h]=255&t,h+1},o.prototype.writeInt16LE=function(t,h,L){return t=+t,h|=0,L||$(this,t,h,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[h]=255&t,this[h+1]=t>>>8):V(this,t,h,!0),h+2},o.prototype.writeInt16BE=function(t,h,L){return t=+t,h|=0,L||$(this,t,h,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[h]=t>>>8,this[h+1]=255&t):V(this,t,h,!1),h+2},o.prototype.writeInt32LE=function(t,h,L){return t=+t,h|=0,L||$(this,t,h,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[h]=255&t,this[h+1]=t>>>8,this[h+2]=t>>>16,this[h+3]=t>>>24):X(this,t,h,!0),h+4},o.prototype.writeInt32BE=function(t,h,L){return t=+t,h|=0,L||$(this,t,h,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[h]=t>>>24,this[h+1]=t>>>16,this[h+2]=t>>>8,this[h+3]=255&t):X(this,t,h,!1),h+4},o.prototype.writeFloatLE=function(t,h,L){return oe(this,t,h,!0,L)},o.prototype.writeFloatBE=function(t,h,L){return oe(this,t,h,!1,L)},o.prototype.writeDoubleLE=function(t,h,L){return we(this,t,h,!0,L)},o.prototype.writeDoubleBE=function(t,h,L){return we(this,t,h,!1,L)},o.prototype.copy=function(t,h,L,A){if(L||(L=0),A||A===0||(A=this.length),h>=t.length&&(h=t.length),h||(h=0),A>0&&A<L&&(A=L),A===L)return 0;if(t.length===0||this.length===0)return 0;if(h<0)throw new RangeError("targetStart out of bounds");if(L<0||L>=this.length)throw new RangeError("sourceStart out of bounds");if(A<0)throw new RangeError("sourceEnd out of bounds");A>this.length&&(A=this.length),t.length-h<A-L&&(A=t.length-h+L);var k,le=A-L;if(this===t&&L<h&&h<A)for(k=le-1;k>=0;--k)t[k+h]=this[k+L];else if(le<1e3||!o.TYPED_ARRAY_SUPPORT)for(k=0;k<le;++k)t[k+h]=this[k+L];else Uint8Array.prototype.set.call(t,this.subarray(L,L+le),h);return le},o.prototype.fill=function(t,h,L,A){if(typeof t=="string"){if(typeof h=="string"?(A=h,h=0,L=this.length):typeof L=="string"&&(A=L,L=this.length),t.length===1){var k=t.charCodeAt(0);k<256&&(t=k)}if(A!==void 0&&typeof A!="string")throw new TypeError("encoding must be a string");if(typeof A=="string"&&!o.isEncoding(A))throw new TypeError("Unknown encoding: "+A)}else typeof t=="number"&&(t&=255);if(h<0||this.length<h||this.length<L)throw new RangeError("Out of range index");if(L<=h)return this;h>>>=0,L=L===void 0?this.length:L>>>0,t||(t=0);var le;if(typeof t=="number")for(le=h;le<L;++le)this[le]=t;else{var _e=o.isBuffer(t)?t:ye(new o(t,A).toString()),Ge=_e.length;for(le=0;le<L-h;++le)this[le+h]=_e[le%Ge]}return this};var I=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof Ne!="undefined"?Ne:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(l,R,g){R.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],40:[function(l,R,g){"use strict";var m=function(){this.buffer=[],this.fns=[]};m.prototype.push=function(c,o){if(this.fns.length)return this.fns.shift()(null,c);var u={data:c,priority:o},r=y(this.buffer,u,function(e){return e.priority});this.buffer.splice(r,0,u)},m.prototype.next=function(){var c=this;return function(o){if(c.buffer.length)return o(null,c.buffer.pop().data);c.fns.push(o)}};var y=function(c,o,u){o=u(o);for(var r=0,e=c?c.length:r;r<e;){var n=r+e>>>1;u(c[n])<o?r=n+1:e=n}return r};R.exports=m},{}],41:[function(l,R,g){function m(d){var i=this,v=p.call(arguments,1);return new Promise(function(b,_){function w(S){var W;try{W=d.next(S)}catch(N){return _(N)}C(W)}function T(S){var W;try{W=d.throw(S)}catch(N){return _(N)}C(W)}function C(S){if(S.done)return b(S.value);var W=y.call(i,S.value);return W&&r(W)?W.then(w,T):T(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(S.value)+'"'))}if(typeof d=="function"&&(d=d.apply(i,v)),!d||typeof d.next!="function")return b(d);w()})}function y(d){return d&&(r(d)?d:n(d)||e(d)?m.call(this,d):typeof d=="function"?c.call(this,d):Array.isArray(d)?o.call(this,d):a(d)?u.call(this,d):d)}function c(d){var i=this;return new Promise(function(v,b){d.call(i,function(_,w){if(_)return b(_);arguments.length>2&&(w=p.call(arguments,1)),v(w)})})}function o(d){return Promise.all(d.map(y,this))}function u(d){for(var i=new d.constructor,v=Object.keys(d),b=[],_=0;_<v.length;_++){var w=v[_],T=y.call(this,d[w]);T&&r(T)?function(C,S){i[S]=void 0,b.push(C.then(function(W){i[S]=W}))}(T,w):i[w]=d[w]}return Promise.all(b).then(function(){return i})}function r(d){return typeof d.then=="function"}function e(d){return typeof d.next=="function"&&typeof d.throw=="function"}function n(d){var i=d.constructor;return!!i&&(i.name==="GeneratorFunction"||i.displayName==="GeneratorFunction"||e(i.prototype))}function a(d){return Object==d.constructor}var p=Array.prototype.slice;R.exports=m.default=m.co=m,m.wrap=function(d){function i(){return m.call(this,d.apply(this,arguments))}return i.__generatorFunction__=d,i}},{}],42:[function(l,R,g){R.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],43:[function(l,R,g){"use strict";function m(o,u){if(!(this instanceof m))return new m(o,u);this.src=o,this._withAccess=u}function y(o,u){return o[u]===void 0&&o.__lookupGetter__(u)===void 0&&o.__lookupSetter__(u)===void 0}var c=Array.prototype.slice;R.exports=m,m.prototype.withAccess=function(o){return this._withAccess=o!==!1,this},m.prototype.pick=function(o){return Array.isArray(o)||(o=c.call(arguments)),o.length&&(this.keys=o),this},m.prototype.to=function(o){if(o=o||{},!this.src)return o;var u=this.keys||Object.keys(this.src);if(!this._withAccess){for(var r=0;r<u.length;r++)e=u[r],o[e]===void 0&&(o[e]=this.src[e]);return o}for(var r=0;r<u.length;r++){var e=u[r];if(y(o,e)){var n=this.src.__lookupGetter__(e),a=this.src.__lookupSetter__(e);n&&o.__defineGetter__(e,n),a&&o.__defineSetter__(e,a),n||a||(o[e]=this.src[e])}}return o},m.prototype.toCover=function(o){for(var u=this.keys||Object.keys(this.src),r=0;r<u.length;r++){var e=u[r];delete o[e];var n=this.src.__lookupGetter__(e),a=this.src.__lookupSetter__(e);n&&o.__defineGetter__(e,n),a&&o.__defineSetter__(e,a),n||a||(o[e]=this.src[e])}},m.prototype.override=m.prototype.toCover,m.prototype.and=function(o){var u={};return this.to(u),this.src=o,this.to(u),this.src=u,this}},{}],44:[function(l,R,g){l("../../modules/es6.string.iterator"),l("../../modules/es6.array.from"),R.exports=l("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(l,R,g){var m=l("../../modules/_core"),y=m.JSON||(m.JSON={stringify:JSON.stringify});R.exports=function(c){return y.stringify.apply(y,arguments)}},{"../../modules/_core":65}],46:[function(l,R,g){l("../../modules/es6.object.assign"),R.exports=l("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(l,R,g){l("../../modules/es6.object.create");var m=l("../../modules/_core").Object;R.exports=function(y,c){return m.create(y,c)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(l,R,g){l("../../modules/es6.object.define-property");var m=l("../../modules/_core").Object;R.exports=function(y,c,o){return m.defineProperty(y,c,o)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(l,R,g){l("../../modules/es6.object.get-own-property-names");var m=l("../../modules/_core").Object;R.exports=function(y){return m.getOwnPropertyNames(y)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(l,R,g){l("../../modules/es6.object.get-prototype-of"),R.exports=l("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(l,R,g){l("../../modules/es6.object.keys"),R.exports=l("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(l,R,g){l("../modules/es6.object.to-string"),l("../modules/es6.string.iterator"),l("../modules/web.dom.iterable"),l("../modules/es6.promise"),l("../modules/es7.promise.finally"),l("../modules/es7.promise.try"),R.exports=l("../modules/_core").Promise},{"../modules/_core":65,"../modules/es6.object.to-string":142,"../modules/es6.promise":143,"../modules/es6.string.iterator":145,"../modules/es7.promise.finally":147,"../modules/es7.promise.try":148,"../modules/web.dom.iterable":151}],53:[function(l,R,g){l("../modules/web.immediate"),R.exports=l("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(l,R,g){l("../../modules/es6.string.from-code-point"),R.exports=l("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(l,R,g){l("../../modules/es6.function.has-instance"),R.exports=l("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(l,R,g){l("../../modules/es6.symbol"),l("../../modules/es6.object.to-string"),l("../../modules/es7.symbol.async-iterator"),l("../../modules/es7.symbol.observable"),R.exports=l("../../modules/_core").Symbol},{"../../modules/_core":65,"../../modules/es6.object.to-string":142,"../../modules/es6.symbol":146,"../../modules/es7.symbol.async-iterator":149,"../../modules/es7.symbol.observable":150}],57:[function(l,R,g){l("../../modules/es6.string.iterator"),l("../../modules/web.dom.iterable"),R.exports=l("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(l,R,g){R.exports=function(m){if(typeof m!="function")throw TypeError(m+" is not a function!");return m}},{}],59:[function(l,R,g){R.exports=function(){}},{}],60:[function(l,R,g){R.exports=function(m,y,c,o){if(!(m instanceof y)||o!==void 0&&o in m)throw TypeError(c+": incorrect invocation!");return m}},{}],61:[function(l,R,g){var m=l("./_is-object");R.exports=function(y){if(!m(y))throw TypeError(y+" is not an object!");return y}},{"./_is-object":85}],62:[function(l,R,g){var m=l("./_to-iobject"),y=l("./_to-length"),c=l("./_to-absolute-index");R.exports=function(o){return function(u,r,e){var n,a=m(u),p=y(a.length),d=c(e,p);if(o&&r!=r){for(;p>d;)if((n=a[d++])!=n)return!0}else for(;p>d;d++)if((o||d in a)&&a[d]===r)return o||d||0;return!o&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(l,R,g){var m=l("./_cof"),y=l("./_wks")("toStringTag"),c=m(function(){return arguments}())=="Arguments",o=function(u,r){try{return u[r]}catch(e){}};R.exports=function(u){var r,e,n;return u===void 0?"Undefined":u===null?"Null":typeof(e=o(r=Object(u),y))=="string"?e:c?m(r):(n=m(r))=="Object"&&typeof r.callee=="function"?"Arguments":n}},{"./_cof":64,"./_wks":131}],64:[function(l,R,g){var m={}.toString;R.exports=function(y){return m.call(y).slice(8,-1)}},{}],65:[function(l,R,g){var m=R.exports={version:"2.5.7"};typeof __e=="number"&&(__e=m)},{}],66:[function(l,R,g){"use strict";var m=l("./_object-dp"),y=l("./_property-desc");R.exports=function(c,o,u){o in c?m.f(c,o,y(0,u)):c[o]=u}},{"./_object-dp":98,"./_property-desc":111}],67:[function(l,R,g){var m=l("./_a-function");R.exports=function(y,c,o){if(m(y),c===void 0)return y;switch(o){case 1:return function(u){return y.call(c,u)};case 2:return function(u,r){return y.call(c,u,r)};case 3:return function(u,r,e){return y.call(c,u,r,e)}}return function(){return y.apply(c,arguments)}}},{"./_a-function":58}],68:[function(l,R,g){R.exports=function(m){if(m==null)throw TypeError("Can't call method on "+m);return m}},{}],69:[function(l,R,g){R.exports=!l("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(l,R,g){var m=l("./_is-object"),y=l("./_global").document,c=m(y)&&m(y.createElement);R.exports=function(o){return c?y.createElement(o):{}}},{"./_global":76,"./_is-object":85}],71:[function(l,R,g){R.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(l,R,g){var m=l("./_object-keys"),y=l("./_object-gops"),c=l("./_object-pie");R.exports=function(o){var u=m(o),r=y.f;if(r)for(var e,n=r(o),a=c.f,p=0;n.length>p;)a.call(o,e=n[p++])&&u.push(e);return u}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(l,R,g){var m=l("./_global"),y=l("./_core"),c=l("./_ctx"),o=l("./_hide"),u=l("./_has"),r=function(e,n,a){var p,d,i,v=e&r.F,b=e&r.G,_=e&r.S,w=e&r.P,T=e&r.B,C=e&r.W,S=b?y:y[n]||(y[n]={}),W=S.prototype,N=b?m:_?m[n]:(m[n]||{}).prototype;b&&(a=n);for(p in a)(d=!v&&N&&N[p]!==void 0)&&u(S,p)||(i=d?N[p]:a[p],S[p]=b&&typeof N[p]!="function"?a[p]:T&&d?c(i,m):C&&N[p]==i?function(E){var K=function(z,M,G){if(this instanceof E){switch(arguments.length){case 0:return new E;case 1:return new E(z);case 2:return new E(z,M)}return new E(z,M,G)}return E.apply(this,arguments)};return K.prototype=E.prototype,K}(i):w&&typeof i=="function"?c(Function.call,i):i,w&&((S.virtual||(S.virtual={}))[p]=i,e&r.R&&W&&!W[p]&&o(W,p,i)))};r.F=1,r.G=2,r.S=4,r.P=8,r.B=16,r.W=32,r.U=64,r.R=128,R.exports=r},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(l,R,g){R.exports=function(m){try{return!!m()}catch(y){return!0}}},{}],75:[function(l,R,g){var m=l("./_ctx"),y=l("./_iter-call"),c=l("./_is-array-iter"),o=l("./_an-object"),u=l("./_to-length"),r=l("./core.get-iterator-method"),e={},n={},g=R.exports=function(a,p,d,i,v){var b,_,w,T,C=v?function(){return a}:r(a),S=m(d,i,p?2:1),W=0;if(typeof C!="function")throw TypeError(a+" is not iterable!");if(c(C)){for(b=u(a.length);b>W;W++)if((T=p?S(o(_=a[W])[0],_[1]):S(a[W]))===e||T===n)return T}else for(w=C.call(a);!(_=w.next()).done;)if((T=y(w,S,_.value,p))===e||T===n)return T};g.BREAK=e,g.RETURN=n},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(l,R,g){var m=R.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=m)},{}],77:[function(l,R,g){var m={}.hasOwnProperty;R.exports=function(y,c){return m.call(y,c)}},{}],78:[function(l,R,g){var m=l("./_object-dp"),y=l("./_property-desc");R.exports=l("./_descriptors")?function(c,o,u){return m.f(c,o,y(1,u))}:function(c,o,u){return c[o]=u,c}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(l,R,g){var m=l("./_global").document;R.exports=m&&m.documentElement},{"./_global":76}],80:[function(l,R,g){R.exports=!l("./_descriptors")&&!l("./_fails")(function(){return Object.defineProperty(l("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(l,R,g){R.exports=function(m,y,c){var o=c===void 0;switch(y.length){case 0:return o?m():m.call(c);case 1:return o?m(y[0]):m.call(c,y[0]);case 2:return o?m(y[0],y[1]):m.call(c,y[0],y[1]);case 3:return o?m(y[0],y[1],y[2]):m.call(c,y[0],y[1],y[2]);case 4:return o?m(y[0],y[1],y[2],y[3]):m.call(c,y[0],y[1],y[2],y[3])}return m.apply(c,y)}},{}],82:[function(l,R,g){var m=l("./_cof");R.exports=Object("z").propertyIsEnumerable(0)?Object:function(y){return m(y)=="String"?y.split(""):Object(y)}},{"./_cof":64}],83:[function(l,R,g){var m=l("./_iterators"),y=l("./_wks")("iterator"),c=Array.prototype;R.exports=function(o){return o!==void 0&&(m.Array===o||c[y]===o)}},{"./_iterators":91,"./_wks":131}],84:[function(l,R,g){var m=l("./_cof");R.exports=Array.isArray||function(y){return m(y)=="Array"}},{"./_cof":64}],85:[function(l,R,g){R.exports=function(m){return typeof m=="object"?m!==null:typeof m=="function"}},{}],86:[function(l,R,g){var m=l("./_an-object");R.exports=function(y,c,o,u){try{return u?c(m(o)[0],o[1]):c(o)}catch(e){var r=y.return;throw r!==void 0&&m(r.call(y)),e}}},{"./_an-object":61}],87:[function(l,R,g){"use strict";var m=l("./_object-create"),y=l("./_property-desc"),c=l("./_set-to-string-tag"),o={};l("./_hide")(o,l("./_wks")("iterator"),function(){return this}),R.exports=function(u,r,e){u.prototype=m(o,{next:y(1,e)}),c(u,r+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(l,R,g){"use strict";var m=l("./_library"),y=l("./_export"),c=l("./_redefine"),o=l("./_hide"),u=l("./_iterators"),r=l("./_iter-create"),e=l("./_set-to-string-tag"),n=l("./_object-gpo"),a=l("./_wks")("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};R.exports=function(i,v,b,_,w,T,C){r(b,v,_);var S,W,N,E=function(H){if(!p&&H in G)return G[H];switch(H){case"keys":case"values":return function(){return new b(this,H)}}return function(){return new b(this,H)}},K=v+" Iterator",z=w=="values",M=!1,G=i.prototype,J=G[a]||G["@@iterator"]||w&&G[w],te=J||E(w),re=w?z?E("entries"):te:void 0,se=v=="Array"&&G.entries||J;if(se&&(N=n(se.call(new i)))!==Object.prototype&&N.next&&(e(N,K,!0),m||typeof N[a]=="function"||o(N,a,d)),z&&J&&J.name!=="values"&&(M=!0,te=function(){return J.call(this)}),m&&!C||!p&&!M&&G[a]||o(G,a,te),u[v]=te,u[K]=d,w)if(S={values:z?te:E("values"),keys:T?te:E("keys"),entries:re},C)for(W in S)W in G||c(G,W,S[W]);else y(y.P+y.F*(p||M),v,S);return S}},{"./_export":73,"./_hide":78,"./_iter-create":87,"./_iterators":91,"./_library":92,"./_object-gpo":104,"./_redefine":113,"./_set-to-string-tag":115,"./_wks":131}],89:[function(l,R,g){var m=l("./_wks")("iterator"),y=!1;try{var c=[7][m]();c.return=function(){y=!0},Array.from(c,function(){throw 2})}catch(o){}R.exports=function(o,u){if(!u&&!y)return!1;var r=!1;try{var e=[7],n=e[m]();n.next=function(){return{done:r=!0}},e[m]=function(){return n},o(e)}catch(a){}return r}},{"./_wks":131}],90:[function(l,R,g){R.exports=function(m,y){return{value:y,done:!!m}}},{}],91:[function(l,R,g){R.exports={}},{}],92:[function(l,R,g){R.exports=!0},{}],93:[function(l,R,g){var m=l("./_uid")("meta"),y=l("./_is-object"),c=l("./_has"),o=l("./_object-dp").f,u=0,r=Object.isExtensible||function(){return!0},e=!l("./_fails")(function(){return r(Object.preventExtensions({}))}),n=function(v){o(v,m,{value:{i:"O"+ ++u,w:{}}})},a=function(v,b){if(!y(v))return typeof v=="symbol"?v:(typeof v=="string"?"S":"P")+v;if(!c(v,m)){if(!r(v))return"F";if(!b)return"E";n(v)}return v[m].i},p=function(v,b){if(!c(v,m)){if(!r(v))return!0;if(!b)return!1;n(v)}return v[m].w},d=function(v){return e&&i.NEED&&r(v)&&!c(v,m)&&n(v),v},i=R.exports={KEY:m,NEED:!1,fastKey:a,getWeak:p,onFreeze:d}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(l,R,g){var m=l("./_global"),y=l("./_task").set,c=m.MutationObserver||m.WebKitMutationObserver,o=m.process,u=m.Promise,r=l("./_cof")(o)=="process";R.exports=function(){var e,n,a,p=function(){var b,_;for(r&&(b=o.domain)&&b.exit();e;){_=e.fn,e=e.next;try{_()}catch(w){throw e?a():n=void 0,w}}n=void 0,b&&b.enter()};if(r)a=function(){o.nextTick(p)};else if(!c||m.navigator&&m.navigator.standalone)if(u&&u.resolve){var d=u.resolve(void 0);a=function(){d.then(p)}}else a=function(){y.call(m,p)};else{var i=!0,v=document.createTextNode("");new c(p).observe(v,{characterData:!0}),a=function(){v.data=i=!i}}return function(b){var _={fn:b,next:void 0};n&&(n.next=_),e||(e=_,a()),n=_}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(l,R,g){"use strict";function m(c){var o,u;this.promise=new c(function(r,e){if(o!==void 0||u!==void 0)throw TypeError("Bad Promise constructor");o=r,u=e}),this.resolve=y(o),this.reject=y(u)}var y=l("./_a-function");R.exports.f=function(c){return new m(c)}},{"./_a-function":58}],96:[function(l,R,g){"use strict";var m=l("./_object-keys"),y=l("./_object-gops"),c=l("./_object-pie"),o=l("./_to-object"),u=l("./_iobject"),r=Object.assign;R.exports=!r||l("./_fails")(function(){var e={},n={},a=Symbol(),p="abcdefghijklmnopqrst";return e[a]=7,p.split("").forEach(function(d){n[d]=d}),r({},e)[a]!=7||Object.keys(r({},n)).join("")!=p})?function(e,n){for(var a=o(e),p=arguments.length,d=1,i=y.f,v=c.f;p>d;)for(var b,_=u(arguments[d++]),w=i?m(_).concat(i(_)):m(_),T=w.length,C=0;T>C;)v.call(_,b=w[C++])&&(a[b]=_[b]);return a}:r},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(l,R,g){var m=l("./_an-object"),y=l("./_object-dps"),c=l("./_enum-bug-keys"),o=l("./_shared-key")("IE_PROTO"),u=function(){},r=function(){var e,n=l("./_dom-create")("iframe"),a=c.length;for(n.style.display="none",l("./_html").appendChild(n),n.src="javascript:",e=n.contentWindow.document,e.open(),e.write("<script>document.F=Object</script>"),e.close(),r=e.F;a--;)delete r.prototype[c[a]];return r()};R.exports=Object.create||function(e,n){var a;return e!==null?(u.prototype=m(e),a=new u,u.prototype=null,a[o]=e):a=r(),n===void 0?a:y(a,n)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(l,R,g){var m=l("./_an-object"),y=l("./_ie8-dom-define"),c=l("./_to-primitive"),o=Object.defineProperty;g.f=l("./_descriptors")?Object.defineProperty:function(u,r,e){if(m(u),r=c(r,!0),m(e),y)try{return o(u,r,e)}catch(n){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(u[r]=e.value),u}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(l,R,g){var m=l("./_object-dp"),y=l("./_an-object"),c=l("./_object-keys");R.exports=l("./_descriptors")?Object.defineProperties:function(o,u){y(o);for(var r,e=c(u),n=e.length,a=0;n>a;)m.f(o,r=e[a++],u[r]);return o}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(l,R,g){var m=l("./_object-pie"),y=l("./_property-desc"),c=l("./_to-iobject"),o=l("./_to-primitive"),u=l("./_has"),r=l("./_ie8-dom-define"),e=Object.getOwnPropertyDescriptor;g.f=l("./_descriptors")?e:function(n,a){if(n=c(n),a=o(a,!0),r)try{return e(n,a)}catch(p){}if(u(n,a))return y(!m.f.call(n,a),n[a])}},{"./_descriptors":69,"./_has":77,"./_ie8-dom-define":80,"./_object-pie":107,"./_property-desc":111,"./_to-iobject":123,"./_to-primitive":126}],101:[function(l,R,g){var m=l("./_to-iobject"),y=l("./_object-gopn").f,c={}.toString,o=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(r){try{return y(r)}catch(e){return o.slice()}};R.exports.f=function(r){return o&&c.call(r)=="[object Window]"?u(r):y(m(r))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(l,R,g){var m=l("./_object-keys-internal"),y=l("./_enum-bug-keys").concat("length","prototype");g.f=Object.getOwnPropertyNames||function(c){return m(c,y)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(l,R,g){g.f=Object.getOwnPropertySymbols},{}],104:[function(l,R,g){var m=l("./_has"),y=l("./_to-object"),c=l("./_shared-key")("IE_PROTO"),o=Object.prototype;R.exports=Object.getPrototypeOf||function(u){return u=y(u),m(u,c)?u[c]:typeof u.constructor=="function"&&u instanceof u.constructor?u.constructor.prototype:u instanceof Object?o:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(l,R,g){var m=l("./_has"),y=l("./_to-iobject"),c=l("./_array-includes")(!1),o=l("./_shared-key")("IE_PROTO");R.exports=function(u,r){var e,n=y(u),a=0,p=[];for(e in n)e!=o&&m(n,e)&&p.push(e);for(;r.length>a;)m(n,e=r[a++])&&(~c(p,e)||p.push(e));return p}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(l,R,g){var m=l("./_object-keys-internal"),y=l("./_enum-bug-keys");R.exports=Object.keys||function(c){return m(c,y)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(l,R,g){g.f={}.propertyIsEnumerable},{}],108:[function(l,R,g){var m=l("./_export"),y=l("./_core"),c=l("./_fails");R.exports=function(o,u){var r=(y.Object||{})[o]||Object[o],e={};e[o]=u(r),m(m.S+m.F*c(function(){r(1)}),"Object",e)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(l,R,g){R.exports=function(m){try{return{e:!1,v:m()}}catch(y){return{e:!0,v:y}}}},{}],110:[function(l,R,g){var m=l("./_an-object"),y=l("./_is-object"),c=l("./_new-promise-capability");R.exports=function(o,u){if(m(o),y(u)&&u.constructor===o)return u;var r=c.f(o);return(0,r.resolve)(u),r.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(l,R,g){R.exports=function(m,y){return{enumerable:!(1&m),configurable:!(2&m),writable:!(4&m),value:y}}},{}],112:[function(l,R,g){var m=l("./_hide");R.exports=function(y,c,o){for(var u in c)o&&y[u]?y[u]=c[u]:m(y,u,c[u]);return y}},{"./_hide":78}],113:[function(l,R,g){R.exports=l("./_hide")},{"./_hide":78}],114:[function(l,R,g){"use strict";var m=l("./_global"),y=l("./_core"),c=l("./_object-dp"),o=l("./_descriptors"),u=l("./_wks")("species");R.exports=function(r){var e=typeof y[r]=="function"?y[r]:m[r];o&&e&&!e[u]&&c.f(e,u,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(l,R,g){var m=l("./_object-dp").f,y=l("./_has"),c=l("./_wks")("toStringTag");R.exports=function(o,u,r){o&&!y(o=r?o:o.prototype,c)&&m(o,c,{configurable:!0,value:u})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(l,R,g){var m=l("./_shared")("keys"),y=l("./_uid");R.exports=function(c){return m[c]||(m[c]=y(c))}},{"./_shared":117,"./_uid":127}],117:[function(l,R,g){var m=l("./_core"),y=l("./_global"),c=y["__core-js_shared__"]||(y["__core-js_shared__"]={});(R.exports=function(o,u){return c[o]||(c[o]=u!==void 0?u:{})})("versions",[]).push({version:m.version,mode:l("./_library")?"pure":"global",copyright:"\u6F0F 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(l,R,g){var m=l("./_an-object"),y=l("./_a-function"),c=l("./_wks")("species");R.exports=function(o,u){var r,e=m(o).constructor;return e===void 0||(r=m(e)[c])==null?u:y(r)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(l,R,g){var m=l("./_to-integer"),y=l("./_defined");R.exports=function(c){return function(o,u){var r,e,n=String(y(o)),a=m(u),p=n.length;return a<0||a>=p?c?"":void 0:(r=n.charCodeAt(a),r<55296||r>56319||a+1===p||(e=n.charCodeAt(a+1))<56320||e>57343?c?n.charAt(a):r:c?n.slice(a,a+2):e-56320+(r-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(l,R,g){var m,y,c,o=l("./_ctx"),u=l("./_invoke"),r=l("./_html"),e=l("./_dom-create"),n=l("./_global"),a=n.process,p=n.setImmediate,d=n.clearImmediate,i=n.MessageChannel,v=n.Dispatch,b=0,_={},w=function(){var C=+this;if(_.hasOwnProperty(C)){var S=_[C];delete _[C],S()}},T=function(C){w.call(C.data)};p&&d||(p=function(C){for(var S=[],W=1;arguments.length>W;)S.push(arguments[W++]);return _[++b]=function(){u(typeof C=="function"?C:Function(C),S)},m(b),b},d=function(C){delete _[C]},l("./_cof")(a)=="process"?m=function(C){a.nextTick(o(w,C,1))}:v&&v.now?m=function(C){v.now(o(w,C,1))}:i?(y=new i,c=y.port2,y.port1.onmessage=T,m=o(c.postMessage,c,1)):n.addEventListener&&typeof postMessage=="function"&&!n.importScripts?(m=function(C){n.postMessage(C+"","*")},n.addEventListener("message",T,!1)):m="onreadystatechange"in e("script")?function(C){r.appendChild(e("script")).onreadystatechange=function(){r.removeChild(this),w.call(C)}}:function(C){setTimeout(o(w,C,1),0)}),R.exports={set:p,clear:d}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(l,R,g){var m=l("./_to-integer"),y=Math.max,c=Math.min;R.exports=function(o,u){return o=m(o),o<0?y(o+u,0):c(o,u)}},{"./_to-integer":122}],122:[function(l,R,g){var m=Math.ceil,y=Math.floor;R.exports=function(c){return isNaN(c=+c)?0:(c>0?y:m)(c)}},{}],123:[function(l,R,g){var m=l("./_iobject"),y=l("./_defined");R.exports=function(c){return m(y(c))}},{"./_defined":68,"./_iobject":82}],124:[function(l,R,g){var m=l("./_to-integer"),y=Math.min;R.exports=function(c){return c>0?y(m(c),9007199254740991):0}},{"./_to-integer":122}],125:[function(l,R,g){var m=l("./_defined");R.exports=function(y){return Object(m(y))}},{"./_defined":68}],126:[function(l,R,g){var m=l("./_is-object");R.exports=function(y,c){if(!m(y))return y;var o,u;if(c&&typeof(o=y.toString)=="function"&&!m(u=o.call(y)))return u;if(typeof(o=y.valueOf)=="function"&&!m(u=o.call(y)))return u;if(!c&&typeof(o=y.toString)=="function"&&!m(u=o.call(y)))return u;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(l,R,g){var m=0,y=Math.random();R.exports=function(c){return"Symbol(".concat(c===void 0?"":c,")_",(++m+y).toString(36))}},{}],128:[function(l,R,g){var m=l("./_global"),y=m.navigator;R.exports=y&&y.userAgent||""},{"./_global":76}],129:[function(l,R,g){var m=l("./_global"),y=l("./_core"),c=l("./_library"),o=l("./_wks-ext"),u=l("./_object-dp").f;R.exports=function(r){var e=y.Symbol||(y.Symbol=c?{}:m.Symbol||{});r.charAt(0)=="_"||r in e||u(e,r,{value:o.f(r)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(l,R,g){g.f=l("./_wks")},{"./_wks":131}],131:[function(l,R,g){var m=l("./_shared")("wks"),y=l("./_uid"),c=l("./_global").Symbol,o=typeof c=="function";(R.exports=function(u){return m[u]||(m[u]=o&&c[u]||(o?c:y)("Symbol."+u))}).store=m},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(l,R,g){var m=l("./_classof"),y=l("./_wks")("iterator"),c=l("./_iterators");R.exports=l("./_core").getIteratorMethod=function(o){if(o!=null)return o[y]||o["@@iterator"]||c[m(o)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(l,R,g){"use strict";var m=l("./_ctx"),y=l("./_export"),c=l("./_to-object"),o=l("./_iter-call"),u=l("./_is-array-iter"),r=l("./_to-length"),e=l("./_create-property"),n=l("./core.get-iterator-method");y(y.S+y.F*!l("./_iter-detect")(function(a){Array.from(a)}),"Array",{from:function(a){var p,d,i,v,b=c(a),_=typeof this=="function"?this:Array,w=arguments.length,T=w>1?arguments[1]:void 0,C=T!==void 0,S=0,W=n(b);if(C&&(T=m(T,w>2?arguments[2]:void 0,2)),W==null||_==Array&&u(W))for(p=r(b.length),d=new _(p);p>S;S++)e(d,S,C?T(b[S],S):b[S]);else for(v=W.call(b),d=new _;!(i=v.next()).done;S++)e(d,S,C?o(v,T,[i.value,S],!0):i.value);return d.length=S,d}})},{"./_create-property":66,"./_ctx":67,"./_export":73,"./_is-array-iter":83,"./_iter-call":86,"./_iter-detect":89,"./_to-length":124,"./_to-object":125,"./core.get-iterator-method":132}],134:[function(l,R,g){"use strict";var m=l("./_add-to-unscopables"),y=l("./_iter-step"),c=l("./_iterators"),o=l("./_to-iobject");R.exports=l("./_iter-define")(Array,"Array",function(u,r){this._t=o(u),this._i=0,this._k=r},function(){var u=this._t,r=this._k,e=this._i++;return!u||e>=u.length?(this._t=void 0,y(1)):r=="keys"?y(0,e):r=="values"?y(0,u[e]):y(0,[e,u[e]])},"values"),c.Arguments=c.Array,m("keys"),m("values"),m("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(l,R,g){"use strict";var m=l("./_is-object"),y=l("./_object-gpo"),c=l("./_wks")("hasInstance"),o=Function.prototype;c in o||l("./_object-dp").f(o,c,{value:function(u){if(typeof this!="function"||!m(u))return!1;if(!m(this.prototype))return u instanceof this;for(;u=y(u);)if(this.prototype===u)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(l,R,g){var m=l("./_export");m(m.S+m.F,"Object",{assign:l("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(l,R,g){var m=l("./_export");m(m.S,"Object",{create:l("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(l,R,g){var m=l("./_export");m(m.S+m.F*!l("./_descriptors"),"Object",{defineProperty:l("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(l,R,g){l("./_object-sap")("getOwnPropertyNames",function(){return l("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(l,R,g){var m=l("./_to-object"),y=l("./_object-gpo");l("./_object-sap")("getPrototypeOf",function(){return function(c){return y(m(c))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(l,R,g){var m=l("./_to-object"),y=l("./_object-keys");l("./_object-sap")("keys",function(){return function(c){return y(m(c))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(l,R,g){arguments[4][36][0].apply(g,arguments)},{dup:36}],143:[function(l,R,g){"use strict";var m,y,c,o,u=l("./_library"),r=l("./_global"),e=l("./_ctx"),n=l("./_classof"),a=l("./_export"),p=l("./_is-object"),d=l("./_a-function"),i=l("./_an-instance"),v=l("./_for-of"),b=l("./_species-constructor"),_=l("./_task").set,w=l("./_microtask")(),T=l("./_new-promise-capability"),C=l("./_perform"),S=l("./_user-agent"),W=l("./_promise-resolve"),N=r.TypeError,E=r.process,K=E&&E.versions,z=K&&K.v8||"",M=r.Promise,G=n(E)=="process",J=function(){},te=y=T.f,re=!!function(){try{var Q=M.resolve(1),oe=(Q.constructor={})[l("./_wks")("species")]=function(we){we(J,J)};return(G||typeof PromiseRejectionEvent=="function")&&Q.then(J)instanceof oe&&z.indexOf("6.6")!==0&&S.indexOf("Chrome/66")===-1}catch(we){}}(),se=function(Q){var oe;return!(!p(Q)||typeof(oe=Q.then)!="function")&&oe},H=function(Q,oe){if(!Q._n){Q._n=!0;var we=Q._c;w(function(){for(var ge=Q._v,Ae=Q._s==1,me=0;we.length>me;)!function(ye){var ue,ae,ee,Ee=Ae?ye.ok:ye.fail,F=ye.resolve,j=ye.reject,de=ye.domain;try{Ee?(Ae||(Q._h==2&&$(Q),Q._h=1),Ee===!0?ue=ge:(de&&de.enter(),ue=Ee(ge),de&&(de.exit(),ee=!0)),ue===ye.promise?j(N("Promise-chain cycle")):(ae=se(ue))?ae.call(ue,F,j):F(ue)):j(ge)}catch(be){de&&!ee&&de.exit(),j(be)}}(we[me++]);Q._c=[],Q._n=!1,oe&&!Q._h&&he(Q)})}},he=function(Q){_.call(r,function(){var oe,we,ge,Ae=Q._v,me=Z(Q);if(me&&(oe=C(function(){G?E.emit("unhandledRejection",Ae,Q):(we=r.onunhandledrejection)?we({promise:Q,reason:Ae}):(ge=r.console)&&ge.error&&ge.error("Unhandled promise rejection",Ae)}),Q._h=G||Z(Q)?2:1),Q._a=void 0,me&&oe.e)throw oe.v})},Z=function(Q){return Q._h!==1&&(Q._a||Q._c).length===0},$=function(Q){_.call(r,function(){var oe;G?E.emit("rejectionHandled",Q):(oe=r.onrejectionhandled)&&oe({promise:Q,reason:Q._v})})},V=function(Q){var oe=this;oe._d||(oe._d=!0,oe=oe._w||oe,oe._v=Q,oe._s=2,oe._a||(oe._a=oe._c.slice()),H(oe,!0))},X=function(Q){var oe,we=this;if(!we._d){we._d=!0,we=we._w||we;try{if(we===Q)throw N("Promise can't be resolved itself");(oe=se(Q))?w(function(){var ge={_w:we,_d:!1};try{oe.call(Q,e(X,ge,1),e(V,ge,1))}catch(Ae){V.call(ge,Ae)}}):(we._v=Q,we._s=1,H(we,!1))}catch(ge){V.call({_w:we,_d:!1},ge)}}};re||(M=function(Q){i(this,M,"Promise","_h"),d(Q),m.call(this);try{Q(e(X,this,1),e(V,this,1))}catch(oe){V.call(this,oe)}},m=function(Q){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},m.prototype=l("./_redefine-all")(M.prototype,{then:function(Q,oe){var we=te(b(this,M));return we.ok=typeof Q!="function"||Q,we.fail=typeof oe=="function"&&oe,we.domain=G?E.domain:void 0,this._c.push(we),this._a&&this._a.push(we),this._s&&H(this,!1),we.promise},catch:function(Q){return this.then(void 0,Q)}}),c=function(){var Q=new m;this.promise=Q,this.resolve=e(X,Q,1),this.reject=e(V,Q,1)},T.f=te=function(Q){return Q===M||Q===o?new c(Q):y(Q)}),a(a.G+a.W+a.F*!re,{Promise:M}),l("./_set-to-string-tag")(M,"Promise"),l("./_set-species")("Promise"),o=l("./_core").Promise,a(a.S+a.F*!re,"Promise",{reject:function(Q){var oe=te(this);return(0,oe.reject)(Q),oe.promise}}),a(a.S+a.F*(u||!re),"Promise",{resolve:function(Q){return W(u&&this===o?M:this,Q)}}),a(a.S+a.F*!(re&&l("./_iter-detect")(function(Q){M.all(Q).catch(J)})),"Promise",{all:function(Q){var oe=this,we=te(oe),ge=we.resolve,Ae=we.reject,me=C(function(){var ye=[],ue=0,ae=1;v(Q,!1,function(ee){var Ee=ue++,F=!1;ye.push(void 0),ae++,oe.resolve(ee).then(function(j){F||(F=!0,ye[Ee]=j,--ae||ge(ye))},Ae)}),--ae||ge(ye)});return me.e&&Ae(me.v),we.promise},race:function(Q){var oe=this,we=te(oe),ge=we.reject,Ae=C(function(){v(Q,!1,function(me){oe.resolve(me).then(we.resolve,ge)})});return Ae.e&&ge(Ae.v),we.promise}})},{"./_a-function":58,"./_an-instance":60,"./_classof":63,"./_core":65,"./_ctx":67,"./_export":73,"./_for-of":75,"./_global":76,"./_is-object":85,"./_iter-detect":89,"./_library":92,"./_microtask":94,"./_new-promise-capability":95,"./_perform":109,"./_promise-resolve":110,"./_redefine-all":112,"./_set-species":114,"./_set-to-string-tag":115,"./_species-constructor":118,"./_task":120,"./_user-agent":128,"./_wks":131}],144:[function(l,R,g){var m=l("./_export"),y=l("./_to-absolute-index"),c=String.fromCharCode,o=String.fromCodePoint;m(m.S+m.F*(!!o&&o.length!=1),"String",{fromCodePoint:function(u){for(var r,e=[],n=arguments.length,a=0;n>a;){if(r=+arguments[a++],y(r,1114111)!==r)throw RangeError(r+" is not a valid code point");e.push(r<65536?c(r):c(55296+((r-=65536)>>10),r%1024+56320))}return e.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(l,R,g){"use strict";var m=l("./_string-at")(!0);l("./_iter-define")(String,"String",function(y){this._t=String(y),this._i=0},function(){var y,c=this._t,o=this._i;return o>=c.length?{value:void 0,done:!0}:(y=m(c,o),this._i+=y.length,{value:y,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(l,R,g){"use strict";var m=l("./_global"),y=l("./_has"),c=l("./_descriptors"),o=l("./_export"),u=l("./_redefine"),r=l("./_meta").KEY,e=l("./_fails"),n=l("./_shared"),a=l("./_set-to-string-tag"),p=l("./_uid"),d=l("./_wks"),i=l("./_wks-ext"),v=l("./_wks-define"),b=l("./_enum-keys"),_=l("./_is-array"),w=l("./_an-object"),T=l("./_is-object"),C=l("./_to-iobject"),S=l("./_to-primitive"),W=l("./_property-desc"),N=l("./_object-create"),E=l("./_object-gopn-ext"),K=l("./_object-gopd"),z=l("./_object-dp"),M=l("./_object-keys"),G=K.f,J=z.f,te=E.f,re=m.Symbol,se=m.JSON,H=se&&se.stringify,he=d("_hidden"),Z=d("toPrimitive"),$={}.propertyIsEnumerable,V=n("symbol-registry"),X=n("symbols"),Q=n("op-symbols"),oe=Object.prototype,we=typeof re=="function",ge=m.QObject,Ae=!ge||!ge.prototype||!ge.prototype.findChild,me=c&&e(function(){return N(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a!=7})?function(L,A,k){var le=G(oe,A);le&&delete oe[A],J(L,A,k),le&&L!==oe&&J(oe,A,le)}:J,ye=function(L){var A=X[L]=N(re.prototype);return A._k=L,A},ue=we&&typeof re.iterator=="symbol"?function(L){return typeof L=="symbol"}:function(L){return L instanceof re},ae=function(L,A,k){return L===oe&&ae(Q,A,k),w(L),A=S(A,!0),w(k),y(X,A)?(k.enumerable?(y(L,he)&&L[he][A]&&(L[he][A]=!1),k=N(k,{enumerable:W(0,!1)})):(y(L,he)||J(L,he,W(1,{})),L[he][A]=!0),me(L,A,k)):J(L,A,k)},ee=function(L,A){w(L);for(var k,le=b(A=C(A)),_e=0,Ge=le.length;Ge>_e;)ae(L,k=le[_e++],A[k]);return L},Ee=function(L,A){return A===void 0?N(L):ee(N(L),A)},F=function(L){var A=$.call(this,L=S(L,!0));return!(this===oe&&y(X,L)&&!y(Q,L))&&(!(A||!y(this,L)||!y(X,L)||y(this,he)&&this[he][L])||A)},j=function(L,A){if(L=C(L),A=S(A,!0),L!==oe||!y(X,A)||y(Q,A)){var k=G(L,A);return!k||!y(X,A)||y(L,he)&&L[he][A]||(k.enumerable=!0),k}},de=function(L){for(var A,k=te(C(L)),le=[],_e=0;k.length>_e;)y(X,A=k[_e++])||A==he||A==r||le.push(A);return le},be=function(L){for(var A,k=L===oe,le=te(k?Q:C(L)),_e=[],Ge=0;le.length>Ge;)!y(X,A=le[Ge++])||k&&!y(oe,A)||_e.push(X[A]);return _e};we||(re=function(){if(this instanceof re)throw TypeError("Symbol is not a constructor!");var L=p(arguments.length>0?arguments[0]:void 0),A=function(k){this===oe&&A.call(Q,k),y(this,he)&&y(this[he],L)&&(this[he][L]=!1),me(this,L,W(1,k))};return c&&Ae&&me(oe,L,{configurable:!0,set:A}),ye(L)},u(re.prototype,"toString",function(){return this._k}),K.f=j,z.f=ae,l("./_object-gopn").f=E.f=de,l("./_object-pie").f=F,l("./_object-gops").f=be,c&&!l("./_library")&&u(oe,"propertyIsEnumerable",F,!0),i.f=function(L){return ye(d(L))}),o(o.G+o.W+o.F*!we,{Symbol:re});for(var Te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),I=0;Te.length>I;)d(Te[I++]);for(var t=M(d.store),h=0;t.length>h;)v(t[h++]);o(o.S+o.F*!we,"Symbol",{for:function(L){return y(V,L+="")?V[L]:V[L]=re(L)},keyFor:function(L){if(!ue(L))throw TypeError(L+" is not a symbol!");for(var A in V)if(V[A]===L)return A},useSetter:function(){Ae=!0},useSimple:function(){Ae=!1}}),o(o.S+o.F*!we,"Object",{create:Ee,defineProperty:ae,defineProperties:ee,getOwnPropertyDescriptor:j,getOwnPropertyNames:de,getOwnPropertySymbols:be}),se&&o(o.S+o.F*(!we||e(function(){var L=re();return H([L])!="[null]"||H({a:L})!="{}"||H(Object(L))!="{}"})),"JSON",{stringify:function(L){for(var A,k,le=[L],_e=1;arguments.length>_e;)le.push(arguments[_e++]);if(k=A=le[1],(T(A)||L!==void 0)&&!ue(L))return _(A)||(A=function(Ge,ze){if(typeof k=="function"&&(ze=k.call(this,Ge,ze)),!ue(ze))return ze}),le[1]=A,H.apply(se,le)}}),re.prototype[Z]||l("./_hide")(re.prototype,Z,re.prototype.valueOf),a(re,"Symbol"),a(Math,"Math",!0),a(m.JSON,"JSON",!0)},{"./_an-object":61,"./_descriptors":69,"./_enum-keys":72,"./_export":73,"./_fails":74,"./_global":76,"./_has":77,"./_hide":78,"./_is-array":84,"./_is-object":85,"./_library":92,"./_meta":93,"./_object-create":97,"./_object-dp":98,"./_object-gopd":100,"./_object-gopn":102,"./_object-gopn-ext":101,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_property-desc":111,"./_redefine":113,"./_set-to-string-tag":115,"./_shared":117,"./_to-iobject":123,"./_to-primitive":126,"./_uid":127,"./_wks":131,"./_wks-define":129,"./_wks-ext":130}],147:[function(l,R,g){"use strict";var m=l("./_export"),y=l("./_core"),c=l("./_global"),o=l("./_species-constructor"),u=l("./_promise-resolve");m(m.P+m.R,"Promise",{finally:function(r){var e=o(this,y.Promise||c.Promise),n=typeof r=="function";return this.then(n?function(a){return u(e,r()).then(function(){return a})}:r,n?function(a){return u(e,r()).then(function(){throw a})}:r)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(l,R,g){"use strict";var m=l("./_export"),y=l("./_new-promise-capability"),c=l("./_perform");m(m.S,"Promise",{try:function(o){var u=y.f(this),r=c(o);return(r.e?u.reject:u.resolve)(r.v),u.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(l,R,g){l("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(l,R,g){l("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(l,R,g){l("./es6.array.iterator");for(var m=l("./_global"),y=l("./_hide"),c=l("./_iterators"),o=l("./_wks")("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),r=0;r<u.length;r++){var e=u[r],n=m[e],a=n&&n.prototype;a&&!a[o]&&y(a,o,e),c[e]=c.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(l,R,g){var m=l("./_export"),y=l("./_task");m(m.G+m.B,{setImmediate:y.set,clearImmediate:y.clear})},{"./_export":73,"./_task":120}],153:[function(l,R,g){(function(m){"use strict";function y(S){return Array.isArray?Array.isArray(S):w(S)==="[object Array]"}function c(S){return typeof S=="boolean"}function o(S){return S===null}function u(S){return S==null}function r(S){return typeof S=="number"}function e(S){return typeof S=="string"}function n(S){return(S===void 0?"undefined":(0,C.default)(S))==="symbol"}function a(S){return S===void 0}function p(S){return w(S)==="[object RegExp]"}function d(S){return(S===void 0?"undefined":(0,C.default)(S))==="object"&&S!==null}function i(S){return w(S)==="[object Date]"}function v(S){return w(S)==="[object Error]"||S instanceof Error}function b(S){return typeof S=="function"}function _(S){return S===null||typeof S=="boolean"||typeof S=="number"||typeof S=="string"||(S===void 0?"undefined":(0,C.default)(S))==="symbol"||S===void 0}function w(S){return Object.prototype.toString.call(S)}var T=l("babel-runtime/helpers/typeof"),C=function(S){return S&&S.__esModule?S:{default:S}}(T);g.isArray=y,g.isBoolean=c,g.isNull=o,g.isNullOrUndefined=u,g.isNumber=r,g.isString=e,g.isSymbol=n,g.isUndefined=a,g.isRegExp=p,g.isObject=d,g.isDate=i,g.isError=v,g.isFunction=b,g.isPrimitive=_,g.isBuffer=m.isBuffer}).call(this,{isBuffer:l("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(l,R,g){"use strict";var m=l("babel-runtime/helpers/typeof"),y=function(c){return c&&c.__esModule?c:{default:c}}(m);!function(c){function o(a,p){for(a=String(a),p=p||2;a.length<p;)a="0"+a;return a}function u(a){var p=new Date(a.getFullYear(),a.getMonth(),a.getDate());p.setDate(p.getDate()-(p.getDay()+6)%7+3);var d=new Date(p.getFullYear(),0,4);d.setDate(d.getDate()-(d.getDay()+6)%7+3);var i=p.getTimezoneOffset()-d.getTimezoneOffset();p.setHours(p.getHours()-i);var v=(p-d)/6048e5;return 1+Math.floor(v)}function r(a){var p=a.getDay();return p===0&&(p=7),p}function e(a){return a===null?"null":a===void 0?"undefined":(a===void 0?"undefined":(0,y.default)(a))!=="object"?a===void 0?"undefined":(0,y.default)(a):Array.isArray(a)?"array":{}.toString.call(a).slice(8,-1).toLowerCase()}var n=function(){var a=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,p=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g;return function(i,v,b,_){if(arguments.length!==1||e(i)!=="string"||/\d/.test(i)||(v=i,i=void 0),i=i||new Date,i instanceof Date||(i=new Date(i)),isNaN(i))throw TypeError("Invalid date");v=String(n.masks[v]||v||n.masks.default);var w=v.slice(0,4);w!=="UTC:"&&w!=="GMT:"||(v=v.slice(4),b=!0,w==="GMT:"&&(_=!0));var T=b?"getUTC":"get",C=i[T+"Date"](),S=i[T+"Day"](),W=i[T+"Month"](),N=i[T+"FullYear"](),E=i[T+"Hours"](),K=i[T+"Minutes"](),z=i[T+"Seconds"](),M=i[T+"Milliseconds"](),G=b?0:i.getTimezoneOffset(),J=u(i),te=r(i),re={d:C,dd:o(C),ddd:n.i18n.dayNames[S],dddd:n.i18n.dayNames[S+7],m:W+1,mm:o(W+1),mmm:n.i18n.monthNames[W],mmmm:n.i18n.monthNames[W+12],yy:String(N).slice(2),yyyy:N,h:E%12||12,hh:o(E%12||12),H:E,HH:o(E),M:K,MM:o(K),s:z,ss:o(z),l:o(M,3),L:o(Math.round(M/10)),t:E<12?"a":"p",tt:E<12?"am":"pm",T:E<12?"A":"P",TT:E<12?"AM":"PM",Z:_?"GMT":b?"UTC":(String(i).match(p)||[""]).pop().replace(d,""),o:(G>0?"-":"+")+o(100*Math.floor(Math.abs(G)/60)+Math.abs(G)%60,4),S:["th","st","nd","rd"][C%10>3?0:(C%100-C%10!=10)*C%10],W:J,N:te};return v.replace(a,function(se){return se in re?re[se]:se.slice(1,se.length-1)})}}();n.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},n.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},typeof De=="function"&&De.amd?De(function(){return n}):(g===void 0?"undefined":(0,y.default)(g))==="object"?R.exports=n:c.dateFormat=n}(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(l,R,g){(function(m){function y(){return!(typeof window=="undefined"||!window.process||window.process.type!=="renderer")||typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function c(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+g.humanize(this.diff),n){var a="color: "+this.color;e.splice(1,0,a,"color: inherit");var p=0,d=0;e[0].replace(/%[a-zA-Z%]/g,function(i){i!=="%%"&&(p++,i==="%c"&&(d=p))}),e.splice(d,0,a)}}function o(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function u(e){try{e==null?g.storage.removeItem("debug"):g.storage.debug=e}catch(n){}}function r(){var e;try{e=g.storage.debug}catch(n){}return!e&&m!==void 0&&"env"in m&&(e=m.env.DEBUG),e}g=R.exports=l("./debug"),g.log=o,g.formatArgs=c,g.save=u,g.load=r,g.useColors=y,g.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),g.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],g.formatters.j=function(e){try{return JSON.stringify(e)}catch(n){return"[UnexpectedJSONParseError]: "+n.message}},g.enable(r())}).call(this,l("_process"))},{"./debug":156,_process:173}],156:[function(l,R,g){function m(n){var a,p=0;for(a in n)p=(p<<5)-p+n.charCodeAt(a),p|=0;return g.colors[Math.abs(p)%g.colors.length]}function y(n){function a(){if(a.enabled){var p=a,d=+new Date,i=d-(e||d);p.diff=i,p.prev=e,p.curr=d,e=d;for(var v=new Array(arguments.length),b=0;b<v.length;b++)v[b]=arguments[b];v[0]=g.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");var _=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,function(w,T){if(w==="%%")return w;_++;var C=g.formatters[T];if(typeof C=="function"){var S=v[_];w=C.call(p,S),v.splice(_,1),_--}return w}),g.formatArgs.call(p,v),(a.log||g.log||console.log.bind(console)).apply(p,v)}}return a.namespace=n,a.enabled=g.enabled(n),a.useColors=g.useColors(),a.color=m(n),typeof g.init=="function"&&g.init(a),a}function c(n){g.save(n),g.names=[],g.skips=[];for(var a=(typeof n=="string"?n:"").split(/[\s,]+/),p=a.length,d=0;d<p;d++)a[d]&&(n=a[d].replace(/\*/g,".*?"),n[0]==="-"?g.skips.push(new RegExp("^"+n.substr(1)+"$")):g.names.push(new RegExp("^"+n+"$")))}function o(){g.enable("")}function u(n){var a,p;for(a=0,p=g.skips.length;a<p;a++)if(g.skips[a].test(n))return!1;for(a=0,p=g.names.length;a<p;a++)if(g.names[a].test(n))return!0;return!1}function r(n){return n instanceof Error?n.stack||n.message:n}g=R.exports=y.debug=y.default=y,g.coerce=r,g.disable=o,g.enable=c,g.enabled=u,g.humanize=l("ms"),g.names=[],g.skips=[],g.formatters={};var e},{ms:169}],157:[function(l,R,g){"use strict";function m(c){var o=""+c,u=y.exec(o);if(!u)return o;var r,e="",n=0,a=0;for(n=u.index;n<o.length;n++){switch(o.charCodeAt(n)){case 34:r=""";break;case 38:r="&";break;case 39:r="'";break;case 60:r="<";break;case 62:r=">";break;default:continue}a!==n&&(e+=o.substring(a,n)),a=n+1,e+=r}return a!==n?e+o.substring(a,n):e}var y=/["'&<>]/;R.exports=m},{}],158:[function(l,R,g){function m(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function y(r){return typeof r=="function"}function c(r){return typeof r=="number"}function o(r){return typeof r=="object"&&r!==null}function u(r){return r===void 0}R.exports=m,m.EventEmitter=m,m.prototype._events=void 0,m.prototype._maxListeners=void 0,m.defaultMaxListeners=10,m.prototype.setMaxListeners=function(r){if(!c(r)||r<0||isNaN(r))throw TypeError("n must be a positive number");return this._maxListeners=r,this},m.prototype.emit=function(r){var e,n,a,p,d,i;if(this._events||(this._events={}),r==="error"&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var v=new Error('Uncaught, unspecified "error" event. ('+e+")");throw v.context=e,v}if(n=this._events[r],u(n))return!1;if(y(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:p=Array.prototype.slice.call(arguments,1),n.apply(this,p)}else if(o(n))for(p=Array.prototype.slice.call(arguments,1),i=n.slice(),a=i.length,d=0;d<a;d++)i[d].apply(this,p);return!0},m.prototype.addListener=function(r,e){var n;if(!y(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",r,y(e.listener)?e.listener:e),this._events[r]?o(this._events[r])?this._events[r].push(e):this._events[r]=[this._events[r],e]:this._events[r]=e,o(this._events[r])&&!this._events[r].warned&&(n=u(this._maxListeners)?m.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[r].length>n&&(this._events[r].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[r].length),typeof console.trace=="function"&&console.trace()),this},m.prototype.on=m.prototype.addListener,m.prototype.once=function(r,e){function n(){this.removeListener(r,n),a||(a=!0,e.apply(this,arguments))}if(!y(e))throw TypeError("listener must be a function");var a=!1;return n.listener=e,this.on(r,n),this},m.prototype.removeListener=function(r,e){var n,a,p,d;if(!y(e))throw TypeError("listener must be a function");if(!this._events||!this._events[r])return this;if(n=this._events[r],p=n.length,a=-1,n===e||y(n.listener)&&n.listener===e)delete this._events[r],this._events.removeListener&&this.emit("removeListener",r,e);else if(o(n)){for(d=p;d-- >0;)if(n[d]===e||n[d].listener&&n[d].listener===e){a=d;break}if(a<0)return this;n.length===1?(n.length=0,delete this._events[r]):n.splice(a,1),this._events.removeListener&&this.emit("removeListener",r,e)}return this},m.prototype.removeAllListeners=function(r){var e,n;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[r]&&delete this._events[r],this;if(arguments.length===0){for(e in this._events)e!=="removeListener"&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[r],y(n))this.removeListener(r,n);else if(n)for(;n.length;)this.removeListener(r,n[n.length-1]);return delete this._events[r],this},m.prototype.listeners=function(r){return this._events&&this._events[r]?y(this._events[r])?[this._events[r]]:this._events[r].slice():[]},m.prototype.listenerCount=function(r){if(this._events){var e=this._events[r];if(y(e))return 1;if(e)return e.length}return 0},m.listenerCount=function(r,e){return r.listenerCount(e)}},{}],159:[function(l,R,g){var m=l("http"),y=R.exports;for(var c in m)m.hasOwnProperty(c)&&(y[c]=m[c]);y.request=function(o,u){return o||(o={}),o.scheme="https",o.protocol="https:",m.request.call(this,o,u)}},{http:196}],160:[function(l,R,g){"use strict";var m=l("util"),y=l("ms");R.exports=function(c){if(typeof c=="number")return c;var o=y(c);if(o===void 0){var u=new Error(m.format("humanize-ms(%j) result undefined",c));console.warn(u.stack)}return o}},{ms:169,util:207}],161:[function(l,R,g){g.read=function(m,y,c,o,u){var r,e,n=8*u-o-1,a=(1<<n)-1,p=a>>1,d=-7,i=c?u-1:0,v=c?-1:1,b=m[y+i];for(i+=v,r=b&(1<<-d)-1,b>>=-d,d+=n;d>0;r=256*r+m[y+i],i+=v,d-=8);for(e=r&(1<<-d)-1,r>>=-d,d+=o;d>0;e=256*e+m[y+i],i+=v,d-=8);if(r===0)r=1-p;else{if(r===a)return e?NaN:1/0*(b?-1:1);e+=Math.pow(2,o),r-=p}return(b?-1:1)*e*Math.pow(2,r-o)},g.write=function(m,y,c,o,u,r){var e,n,a,p=8*r-u-1,d=(1<<p)-1,i=d>>1,v=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=o?0:r-1,_=o?1:-1,w=y<0||y===0&&1/y<0?1:0;for(y=Math.abs(y),isNaN(y)||y===1/0?(n=isNaN(y)?1:0,e=d):(e=Math.floor(Math.log(y)/Math.LN2),y*(a=Math.pow(2,-e))<1&&(e--,a*=2),y+=e+i>=1?v/a:v*Math.pow(2,1-i),y*a>=2&&(e++,a/=2),e+i>=d?(n=0,e=d):e+i>=1?(n=(y*a-1)*Math.pow(2,u),e+=i):(n=y*Math.pow(2,i-1)*Math.pow(2,u),e=0));u>=8;m[c+b]=255&n,b+=_,n/=256,u-=8);for(e=e<<u|n,p+=u;p>0;m[c+b]=255&e,b+=_,e/=256,p-=8);m[c+b-_]|=128*w}},{}],162:[function(l,R,g){typeof Object.create=="function"?R.exports=function(m,y){m.super_=y,m.prototype=Object.create(y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}})}:R.exports=function(m,y){m.super_=y;var c=function(){};c.prototype=y.prototype,m.prototype=new c,m.prototype.constructor=m}},{}],163:[function(l,R,g){function m(c){return!!c.constructor&&typeof c.constructor.isBuffer=="function"&&c.constructor.isBuffer(c)}function y(c){return typeof c.readFloatLE=="function"&&typeof c.slice=="function"&&m(c.slice(0,0))}R.exports=function(c){return c!=null&&(m(c)||y(c)||!!c._isBuffer)}},{}],164:[function(l,R,g){!function(m){function y(u){return o.call(u).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function c(u){return typeof u=="function"&&(/^class(\s|\{\}$)/.test(o.call(u))||/^.*classCallCheck\(/.test(y(u)))}var o=Function.prototype.toString;g!==void 0?(R!==void 0&&R.exports&&(g=R.exports=c),g.isClass=c):typeof De=="function"&&De.amd?De([],function(){return c}):m.isClass=c}(this)},{}],165:[function(l,R,g){"use strict";function m(r){var e=r.slice(2);return e=e[0].toLowerCase()+e.slice(1)}var y=l("core-util-is"),c=l("isstream"),o=l("is-class");Object.keys(y).map(function(r){g[m(r)]=y[r]}),g.stream=c,g.readableStream=c.isReadable,g.writableStream=c.isWritable,g.duplexStream=c.isDuplex,g.class=o,g.finite=function(r){return Number.isFinite(r)},g.NaN=function(r){return Number.isNaN(r)},g.generator=function(r){return r&&typeof r.next=="function"&&typeof r.throw=="function"},g.generatorFunction=function(r){return r&&r.constructor&&r.constructor.name==="GeneratorFunction"},g.asyncFunction=function(r){return r&&r.constructor&&r.constructor.name==="AsyncFunction"},g.promise=function(r){return r&&typeof r.then=="function"};var u=Math.pow(2,31);g.int=function(r){return y.isNumber(r)&&r%1==0},g.int32=function(r){return g.int(r)&&r<u&&r>=-u},g.long=function(r){return g.int(r)&&(r>=u||r<-u)},g.Long=function(r){return g.object(r)&&g.number(r.high)&&g.number(r.low)},g.double=function(r){return y.isNumber(r)&&!isNaN(r)&&r%1!=0},g.date=function(r){return r instanceof Date},g.regExp=function(r){return r instanceof RegExp},g.regexp=g.regExp,g.error=function(r){return r instanceof Error},g.array=function(r){return Array.isArray(r)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(l,R,g){var m={}.toString;R.exports=Array.isArray||function(y){return m.call(y)=="[object Array]"}},{}],167:[function(l,R,g){function m(r){return r instanceof u.Stream}function y(r){return m(r)&&typeof r._read=="function"&&typeof r._readableState=="object"}function c(r){return m(r)&&typeof r._write=="function"&&typeof r._writableState=="object"}function o(r){return y(r)&&c(r)}var u=l("stream");R.exports=m,R.exports.isReadable=y,R.exports.isWritable=c,R.exports.isDuplex=o},{stream:195}],168:[function(l,R,g){"use strict";function m(c,o,u){if(!c)throw new TypeError("argument dest is required");if(!o)throw new TypeError("argument src is required");return u===void 0&&(u=!0),Object.getOwnPropertyNames(o).forEach(function(r){if(u||!y.call(c,r)){var e=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(c,r,e)}}),c}R.exports=m;var y=Object.prototype.hasOwnProperty},{}],169:[function(l,R,g){function m(p){if(p=String(p),!(p.length>100)){var d=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(p);if(d){var i=parseFloat(d[1]);switch((d[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return i*a;case"days":case"day":case"d":return i*n;case"hours":case"hour":case"hrs":case"hr":case"h":return i*e;case"minutes":case"minute":case"mins":case"min":case"m":return i*r;case"seconds":case"second":case"secs":case"sec":case"s":return i*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}function y(p){return p>=n?Math.round(p/n)+"d":p>=e?Math.round(p/e)+"h":p>=r?Math.round(p/r)+"m":p>=u?Math.round(p/u)+"s":p+"ms"}function c(p){return o(p,n,"day")||o(p,e,"hour")||o(p,r,"minute")||o(p,u,"second")||p+" ms"}function o(p,d,i){if(!(p<d))return p<1.5*d?Math.floor(p/d)+" "+i:Math.ceil(p/d)+" "+i+"s"}var u=1e3,r=60*u,e=60*r,n=24*e,a=365.25*n;R.exports=function(p,d){d=d||{};var i=typeof p;if(i==="string"&&p.length>0)return m(p);if(i==="number"&&isNaN(p)===!1)return d.long?c(p):y(p);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(p))}},{}],170:[function(l,R,g){(function(m){function y(r,e){for(var n=0,a=r.length-1;a>=0;a--){var p=r[a];p==="."?r.splice(a,1):p===".."?(r.splice(a,1),n++):n&&(r.splice(a,1),n--)}if(e)for(;n--;n)r.unshift("..");return r}function c(r){typeof r!="string"&&(r+="");var e,n=0,a=-1,p=!0;for(e=r.length-1;e>=0;--e)if(r.charCodeAt(e)===47){if(!p){n=e+1;break}}else a===-1&&(p=!1,a=e+1);return a===-1?"":r.slice(n,a)}function o(r,e){if(r.filter)return r.filter(e);for(var n=[],a=0;a<r.length;a++)e(r[a],a,r)&&n.push(r[a]);return n}g.resolve=function(){for(var r="",e=!1,n=arguments.length-1;n>=-1&&!e;n--){var a=n>=0?arguments[n]:m.cwd();if(typeof a!="string")throw new TypeError("Arguments to path.resolve must be strings");a&&(r=a+"/"+r,e=a.charAt(0)==="/")}return r=y(o(r.split("/"),function(p){return!!p}),!e).join("/"),(e?"/":"")+r||"."},g.normalize=function(r){var e=g.isAbsolute(r),n=u(r,-1)==="/";return r=y(o(r.split("/"),function(a){return!!a}),!e).join("/"),r||e||(r="."),r&&n&&(r+="/"),(e?"/":"")+r},g.isAbsolute=function(r){return r.charAt(0)==="/"},g.join=function(){var r=Array.prototype.slice.call(arguments,0);return g.normalize(o(r,function(e,n){if(typeof e!="string")throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},g.relative=function(r,e){function n(_){for(var w=0;w<_.length&&_[w]==="";w++);for(var T=_.length-1;T>=0&&_[T]==="";T--);return w>T?[]:_.slice(w,T-w+1)}r=g.resolve(r).substr(1),e=g.resolve(e).substr(1);for(var a=n(r.split("/")),p=n(e.split("/")),d=Math.min(a.length,p.length),i=d,v=0;v<d;v++)if(a[v]!==p[v]){i=v;break}for(var b=[],v=i;v<a.length;v++)b.push("..");return b=b.concat(p.slice(i)),b.join("/")},g.sep="/",g.delimiter=":",g.dirname=function(r){if(typeof r!="string"&&(r+=""),r.length===0)return".";for(var e=r.charCodeAt(0),n=e===47,a=-1,p=!0,d=r.length-1;d>=1;--d)if((e=r.charCodeAt(d))===47){if(!p){a=d;break}}else p=!1;return a===-1?n?"/":".":n&&a===1?"/":r.slice(0,a)},g.basename=function(r,e){var n=c(r);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},g.extname=function(r){typeof r!="string"&&(r+="");for(var e=-1,n=0,a=-1,p=!0,d=0,i=r.length-1;i>=0;--i){var v=r.charCodeAt(i);if(v!==47)a===-1&&(p=!1,a=i+1),v===46?e===-1?e=i:d!==1&&(d=1):e!==-1&&(d=-1);else if(!p){n=i+1;break}}return e===-1||a===-1||d===0||d===1&&e===a-1&&e===n+1?"":r.slice(e,a)};var u="ab".substr(-1)==="b"?function(r,e,n){return r.substr(e,n)}:function(r,e,n){return e<0&&(e=r.length+e),r.substr(e,n)}}).call(this,l("_process"))},{_process:173}],171:[function(l,R,g){(function(m){(function(){"use strict";function y(z){return z=String(z),z.charAt(0).toUpperCase()+z.slice(1)}function c(z,M,G){var J={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return M&&G&&/^Win/i.test(z)&&!/^Windows Phone /i.test(z)&&(J=J[/[\d.]+$/.exec(z)])&&(z="Windows "+J),z=String(z),M&&G&&(z=z.replace(RegExp(M,"i"),G)),z=u(z.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}function o(z,M){var G=-1,J=z?z.length:0;if(typeof J=="number"&&J>-1&&J<=C)for(;++G<J;)M(z[G],G,z);else r(z,M)}function u(z){return z=d(z),/^(?:webOS|i(?:OS|P))/.test(z)?z:y(z)}function r(z,M){for(var G in z)N.call(z,G)&&M(z[G],G,z)}function e(z){return z==null?y(z):E.call(z).slice(8,-1)}function n(z,M){var G=z!=null?typeof z[M]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(G)||G=="object"&&!z[M])}function a(z){return String(z).replace(/([ -])(?!$)/g,"$1?")}function p(z,M){var G=null;return o(z,function(J,te){G=M(G,J,te,z)}),G}function d(z){return String(z).replace(/^ +| +$/g,"")}function i(z){function M(L){return p(L,function(A,k){var le=k.pattern||a(k);return!A&&(A=RegExp("\\b"+le+" *\\d+[.\\w_]*","i").exec(z)||RegExp("\\b"+le+" *\\w+-[\\w]*","i").exec(z)||RegExp("\\b"+le+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(z))&&((A=String(k.label&&!RegExp(le,"i").test(k.label)?k.label:A).split("/"))[1]&&!/[\d.]+/.test(A[0])&&(A[0]+=" "+A[1]),k=k.label||k,A=u(A[0].replace(RegExp(le,"i"),k).replace(RegExp("; *(?:"+k+"[_-])?","i")," ").replace(RegExp("("+k+")[-_.]?(\\w)","i"),"$1 $2"))),A})}function G(){return this.description||""}var J=b,te=z&&typeof z=="object"&&e(z)!="String";te&&(J=z,z=null);var re=J.navigator||{},se=re.userAgent||"";z||(z=se);var H,he,Z=te?!!re.likeChrome:/\bChrome\b/.test(z)&&!/internal|\n/i.test(E.toString()),$=te?"Object":"ScriptBridgingProxyObject",V=te?"Object":"Environment",X=te&&J.java?"JavaPackage":e(J.java),Q=te?"Object":"RuntimeObject",oe=/\bJava/.test(X)&&J.java,we=oe&&e(J.environment)==V,ge=oe?"a":"\u4F2A",Ae=oe?"b":"\u5C3E",me=J.document||{},ye=J.operamini||J.opera,ue=S.test(ue=te&&ye?ye["[[Class]]"]:e(ye))?ue:ye=null,ae=z,ee=[],Ee=null,F=z==se,j=F&&ye&&typeof ye.version=="function"&&ye.version(),de=function(L){return p(L,function(A,k){return A||RegExp("\\b"+(k.pattern||a(k))+"\\b","i").exec(z)&&(k.label||k)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),be=function(L){return p(L,function(A,k){return A||RegExp("\\b"+(k.pattern||a(k))+"\\b","i").exec(z)&&(k.label||k)})}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),Te=M([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),I=function(L){return p(L,function(A,k,le){return A||(k[Te]||k[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Te)]||RegExp("\\b"+a(le)+"(?:\\b|\\w*\\d)","i").exec(z))&&le})}({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),t=function(L){return p(L,function(A,k){var le=k.pattern||a(k);return!A&&(A=RegExp("\\b"+le+"(?:/[\\d.]+|[ \\w.]*)","i").exec(z))&&(A=c(A,le,k.label||k)),A})}(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);if(de&&(de=[de]),I&&!Te&&(Te=M([I])),(H=/\bGoogle TV\b/.exec(Te))&&(Te=H[0]),/\bSimulator\b/i.test(z)&&(Te=(Te?Te+" ":"")+"Simulator"),be=="Opera Mini"&&/\bOPiOS\b/.test(z)&&ee.push("running in Turbo/Uncompressed mode"),be=="IE"&&/\blike iPhone OS\b/.test(z)?(H=i(z.replace(/like iPhone OS/,"")),I=H.manufacturer,Te=H.product):/^iP/.test(Te)?(be||(be="Safari"),t="iOS"+((H=/ OS ([\d_]+)/i.exec(z))?" "+H[1].replace(/_/g,"."):"")):be!="Konqueror"||/buntu/i.test(t)?I&&I!="Google"&&(/Chrome/.test(be)&&!/\bMobile Safari\b/i.test(z)||/\bVita\b/.test(Te))||/\bAndroid\b/.test(t)&&/^Chrome/.test(be)&&/\bVersion\//i.test(z)?(be="Android Browser",t=/\bAndroid\b/.test(t)?t:"Android"):be=="Silk"?(/\bMobi/i.test(z)||(t="Android",ee.unshift("desktop mode")),/Accelerated *= *true/i.test(z)&&ee.unshift("accelerated")):be=="PaleMoon"&&(H=/\bFirefox\/([\d.]+)\b/.exec(z))?ee.push("identifying as Firefox "+H[1]):be=="Firefox"&&(H=/\b(Mobile|Tablet|TV)\b/i.exec(z))?(t||(t="Firefox OS"),Te||(Te=H[1])):!be||(H=!/\bMinefield\b/i.test(z)&&/\b(?:Firefox|Safari)\b/.exec(be))?(be&&!Te&&/[\/,]|^[^(]+?\)/.test(z.slice(z.indexOf(H+"/")+8))&&(be=null),(H=Te||I||t)&&(Te||I||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(t))&&(be=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(t)?t:H)+" Browser")):be=="Electron"&&(H=(/\bChrome\/([\d.]+)\b/.exec(z)||0)[1])&&ee.push("Chromium "+H):t="Kubuntu",j||(j=function(L){return p(L,function(A,k){return A||(RegExp(k+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(z)||0)[1]||null})}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",a(be),"(?:Firefox|Minefield|NetFront)"])),(H=de=="iCab"&&parseFloat(j)>3&&"WebKit"||/\bOpera\b/.test(be)&&(/\bOPR\b/.test(z)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(z)&&!/^(?:Trident|EdgeHTML)$/.test(de)&&"WebKit"||!de&&/\bMSIE\b/i.test(z)&&(t=="Mac OS"?"Tasman":"Trident")||de=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(be)&&"NetFront")&&(de=[H]),be=="IE"&&(H=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(z)||0)[1])?(be+=" Mobile",t="Windows Phone "+(/\+$/.test(H)?H:H+".x"),ee.unshift("desktop mode")):/\bWPDesktop\b/i.test(z)?(be="IE Mobile",t="Windows Phone 8.x",ee.unshift("desktop mode"),j||(j=(/\brv:([\d.]+)/.exec(z)||0)[1])):be!="IE"&&de=="Trident"&&(H=/\brv:([\d.]+)/.exec(z))&&(be&&ee.push("identifying as "+be+(j?" "+j:"")),be="IE",j=H[1]),F){if(n(J,"global"))if(oe&&(H=oe.lang.System,ae=H.getProperty("os.arch"),t=t||H.getProperty("os.name")+" "+H.getProperty("os.version")),we){try{j=J.require("ringo/engine").version.join("."),be="RingoJS"}catch(L){(H=J.system)&&H.global.system==J.system&&(be="Narwhal",t||(t=H[0].os||null))}be||(be="Rhino")}else typeof J.process=="object"&&!J.process.browser&&(H=J.process)&&(typeof H.versions=="object"&&(typeof H.versions.electron=="string"?(ee.push("Node "+H.versions.node),be="Electron",j=H.versions.electron):typeof H.versions.nw=="string"&&(ee.push("Chromium "+j,"Node "+H.versions.node),be="NW.js",j=H.versions.nw)),be||(be="Node.js",ae=H.arch,t=H.platform,j=/[\d.]+/.exec(H.version),j=j?j[0]:null));else e(H=J.runtime)==$?(be="Adobe AIR",t=H.flash.system.Capabilities.os):e(H=J.phantom)==Q?(be="PhantomJS",j=(H=H.version||null)&&H.major+"."+H.minor+"."+H.patch):typeof me.documentMode=="number"&&(H=/\bTrident\/(\d+)/i.exec(z))?(j=[j,me.documentMode],(H=+H[1]+4)!=j[1]&&(ee.push("IE "+j[1]+" mode"),de&&(de[1]=""),j[1]=H),j=be=="IE"?String(j[1].toFixed(1)):j[0]):typeof me.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(be)&&(ee.push("masking as "+be+" "+j),be="IE",j="11.0",de=["Trident"],t="Windows");t=t&&u(t)}if(j&&(H=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(j)||/(?:alpha|beta)(?: ?\d)?/i.exec(z+";"+(F&&re.appMinorVersion))||/\bMinefield\b/i.test(z)&&"a")&&(Ee=/b/i.test(H)?"beta":"alpha",j=j.replace(RegExp(H+"\\+?$"),"")+(Ee=="beta"?Ae:ge)+(/\d+\+?/.exec(H)||"")),be=="Fennec"||be=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(t))be="Firefox Mobile";else if(be=="Maxthon"&&j)j=j.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Te))Te=="Xbox 360"&&(t=null),Te=="Xbox 360"&&/\bIEMobile\b/.test(z)&&ee.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(be)&&(!be||Te||/Browser|Mobi/.test(be))||t!="Windows CE"&&!/Mobi/i.test(z))if(be=="IE"&&F)try{J.external===null&&ee.unshift("platform preview")}catch(L){ee.unshift("embedded")}else(/\bBlackBerry\b/.test(Te)||/\bBB10\b/.test(z))&&(H=(RegExp(Te.replace(/ +/g," *")+"/([.\\d]+)","i").exec(z)||0)[1]||j)?(H=[H,/BB10/.test(z)],t=(H[1]?(Te=null,I="BlackBerry"):"Device Software")+" "+H[0],j=null):this!=r&&Te!="Wii"&&(F&&ye||/Opera/.test(be)&&/\b(?:MSIE|Firefox)\b/i.test(z)||be=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(t)||be=="IE"&&(t&&!/^Win/.test(t)&&j>5.5||/\bWindows XP\b/.test(t)&&j>8||j==8&&!/\bTrident\b/.test(z)))&&!S.test(H=i.call(r,z.replace(S,"")+";"))&&H.name&&(H="ing as "+H.name+((H=H.version)?" "+H:""),S.test(be)?(/\bIE\b/.test(H)&&t=="Mac OS"&&(t=null),H="identify"+H):(H="mask"+H,be=ue?u(ue.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(H)&&(t=null),F||(j=null)),de=["Presto"],ee.push(H));else be+=" Mobile";(H=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(z)||0)[1])&&(H=[parseFloat(H.replace(/\.(\d)$/,".0$1")),H],be=="Safari"&&H[1].slice(-1)=="+"?(be="WebKit Nightly",Ee="alpha",j=H[1].slice(0,-1)):j!=H[1]&&j!=(H[2]=(/\bSafari\/([\d.]+\+?)/i.exec(z)||0)[1])||(j=null),H[1]=(/\bChrome\/([\d.]+)/i.exec(z)||0)[1],H[0]==537.36&&H[2]==537.36&&parseFloat(H[1])>=28&&de=="WebKit"&&(de=["Blink"]),F&&(Z||H[1])?(de&&(de[1]="like Chrome"),H=H[1]||(H=H[0],H<530?1:H<532?2:H<532.05?3:H<533?4:H<534.03?5:H<534.07?6:H<534.1?7:H<534.13?8:H<534.16?9:H<534.24?10:H<534.3?11:H<535.01?12:H<535.02?"13+":H<535.07?15:H<535.11?16:H<535.19?17:H<536.05?18:H<536.1?19:H<537.01?20:H<537.11?"21+":H<537.13?23:H<537.18?24:H<537.24?25:H<537.36?26:de!="Blink"?"27":"28")):(de&&(de[1]="like Safari"),H=H[0],H=H<400?1:H<500?2:H<526?3:H<533?4:H<534?"4+":H<535?5:H<537?6:H<538?7:H<601?8:"8"),de&&(de[1]+=" "+(H+=typeof H=="number"?".x":/[.+]/.test(H)?"":"+")),be=="Safari"&&(!j||parseInt(j)>45)&&(j=H)),be=="Opera"&&(H=/\bzbov|zvav$/.exec(t))?(be+=" ",ee.unshift("desktop mode"),H=="zvav"?(be+="Mini",j=null):be+="Mobile",t=t.replace(RegExp(" *"+H+"$"),"")):be=="Safari"&&/\bChrome\b/.exec(de&&de[1])&&(ee.unshift("desktop mode"),be="Chrome Mobile",j=null,/\bOS X\b/.test(t)?(I="Apple",t="iOS 4.3+"):t=null),j&&j.indexOf(H=/[\d.]+$/.exec(t))==0&&z.indexOf("/"+H+"-")>-1&&(t=d(t.replace(H,""))),de&&!/\b(?:Avant|Nook)\b/.test(be)&&(/Browser|Lunascape|Maxthon/.test(be)||be!="Safari"&&/^iOS/.test(t)&&/\bSafari\b/.test(de[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(be)&&de[1])&&(H=de[de.length-1])&&ee.push(H),ee.length&&(ee=["("+ee.join("; ")+")"]),I&&Te&&Te.indexOf(I)<0&&ee.push("on "+I),Te&&ee.push((/^on /.test(ee[ee.length-1])?"":"on ")+Te),t&&(H=/ ([\d.+]+)$/.exec(t),he=H&&t.charAt(t.length-H[0].length-1)=="/",t={architecture:32,family:H&&!he?t.replace(H[0],""):t,version:H?H[1]:null,toString:function(){var L=this.version;return this.family+(L&&!he?" "+L:"")+(this.architecture==64?" 64-bit":"")}}),(H=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(ae))&&!/\bi686\b/i.test(ae)?(t&&(t.architecture=64,t.family=t.family.replace(RegExp(" *"+H),"")),be&&(/\bWOW64\b/i.test(z)||F&&/\w(?:86|32)$/.test(re.cpuClass||re.platform)&&!/\bWin64; x64\b/i.test(z))&&ee.unshift("32-bit")):t&&/^OS X/.test(t.family)&&be=="Chrome"&&parseFloat(j)>=39&&(t.architecture=64),z||(z=null);var h={};return h.description=z,h.layout=de&&de[0],h.manufacturer=I,h.name=be,h.prerelease=Ee,h.product=Te,h.ua=z,h.version=be&&j,h.os=t||{architecture:null,family:null,version:null,toString:function(){return"null"}},h.parse=i,h.toString=G,h.version&&ee.unshift(j),h.name&&ee.unshift(be),t&&be&&(t!=String(t).split(" ")[0]||t!=be.split(" ")[0]&&!Te)&&ee.push(Te?"("+t+")":"on "+t),ee.length&&(h.description=ee.join(" ")),h}var v={function:!0,object:!0},b=v[typeof window]&&window||this,_=v[typeof g]&&g,w=v[typeof R]&&R&&!R.nodeType&&R,T=_&&w&&typeof m=="object"&&m;!T||T.global!==T&&T.window!==T&&T.self!==T||(b=T);var C=Math.pow(2,53)-1,S=/\bOpera/,W=Object.prototype,N=W.hasOwnProperty,E=W.toString,K=i();typeof De=="function"&&typeof De.amd=="object"&&De.amd?(b.platform=K,De(function(){return K})):_&&w?r(K,function(z,M){_[M]=z}):b.platform=K}).call(this)}).call(this,typeof Ne!="undefined"?Ne:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(l,R,g){(function(m){"use strict";function y(c,o,u,r){if(typeof c!="function")throw new TypeError('"callback" argument must be a function');var e,n,a=arguments.length;switch(a){case 0:case 1:return m.nextTick(c);case 2:return m.nextTick(function(){c.call(null,o)});case 3:return m.nextTick(function(){c.call(null,o,u)});case 4:return m.nextTick(function(){c.call(null,o,u,r)});default:for(e=new Array(a-1),n=0;n<e.length;)e[n++]=arguments[n];return m.nextTick(function(){c.apply(null,e)})}}!m.version||m.version.indexOf("v0.")===0||m.version.indexOf("v1.")===0&&m.version.indexOf("v1.8.")!==0?R.exports={nextTick:y}:R.exports=m}).call(this,l("_process"))},{_process:173}],173:[function(l,R,g){function m(){throw new Error("setTimeout has not been defined")}function y(){throw new Error("clearTimeout has not been defined")}function c(w){if(a===setTimeout)return setTimeout(w,0);if((a===m||!a)&&setTimeout)return a=setTimeout,setTimeout(w,0);try{return a(w,0)}catch(T){try{return a.call(null,w,0)}catch(C){return a.call(this,w,0)}}}function o(w){if(p===clearTimeout)return clearTimeout(w);if((p===y||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(w);try{return p(w)}catch(T){try{return p.call(null,w)}catch(C){return p.call(this,w)}}}function u(){b&&i&&(b=!1,i.length?v=i.concat(v):_=-1,v.length&&r())}function r(){if(!b){var w=c(u);b=!0;for(var T=v.length;T;){for(i=v,v=[];++_<T;)i&&i[_].run();_=-1,T=v.length}i=null,b=!1,o(w)}}function e(w,T){this.fun=w,this.array=T}function n(){}var a,p,d=R.exports={};!function(){try{a=typeof setTimeout=="function"?setTimeout:m}catch(w){a=m}try{p=typeof clearTimeout=="function"?clearTimeout:y}catch(w){p=y}}();var i,v=[],b=!1,_=-1;d.nextTick=function(w){var T=new Array(arguments.length-1);if(arguments.length>1)for(var C=1;C<arguments.length;C++)T[C-1]=arguments[C];v.push(new e(w,T)),v.length!==1||b||c(r)},e.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=n,d.addListener=n,d.once=n,d.off=n,d.removeListener=n,d.removeAllListeners=n,d.emit=n,d.prependListener=n,d.prependOnceListener=n,d.listeners=function(w){return[]},d.binding=function(w){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(w){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},{}],174:[function(l,R,g){(function(m){!function(y){function c(X){throw new RangeError(he[X])}function o(X,Q){for(var oe=X.length,we=[];oe--;)we[oe]=Q(X[oe]);return we}function u(X,Q){var oe=X.split("@"),we="";return oe.length>1&&(we=oe[0]+"@",X=oe[1]),X=X.replace(H,"."),we+o(X.split("."),Q).join(".")}function r(X){for(var Q,oe,we=[],ge=0,Ae=X.length;ge<Ae;)Q=X.charCodeAt(ge++),Q>=55296&&Q<=56319&&ge<Ae?(oe=X.charCodeAt(ge++),(64512&oe)==56320?we.push(((1023&Q)<<10)+(1023&oe)+65536):(we.push(Q),ge--)):we.push(Q);return we}function e(X){return o(X,function(Q){var oe="";return Q>65535&&(Q-=65536,oe+=V(Q>>>10&1023|55296),Q=56320|1023&Q),oe+=V(Q)}).join("")}function n(X){return X-48<10?X-22:X-65<26?X-65:X-97<26?X-97:N}function a(X,Q){return X+22+75*(X<26)-((Q!=0)<<5)}function p(X,Q,oe){var we=0;for(X=oe?$(X/M):X>>1,X+=$(X/Q);X>Z*K>>1;we+=N)X=$(X/Z);return $(we+(Z+1)*X/(X+z))}function d(X){var Q,oe,we,ge,Ae,me,ye,ue,ae,ee,Ee=[],F=X.length,j=0,de=J,be=G;for(oe=X.lastIndexOf(te),oe<0&&(oe=0),we=0;we<oe;++we)X.charCodeAt(we)>=128&&c("not-basic"),Ee.push(X.charCodeAt(we));for(ge=oe>0?oe+1:0;ge<F;){for(Ae=j,me=1,ye=N;ge>=F&&c("invalid-input"),ue=n(X.charCodeAt(ge++)),(ue>=N||ue>$((W-j)/me))&&c("overflow"),j+=ue*me,ae=ye<=be?E:ye>=be+K?K:ye-be,!(ue<ae);ye+=N)ee=N-ae,me>$(W/ee)&&c("overflow"),me*=ee;Q=Ee.length+1,be=p(j-Ae,Q,Ae==0),$(j/Q)>W-de&&c("overflow"),de+=$(j/Q),j%=Q,Ee.splice(j++,0,de)}return e(Ee)}function i(X){var Q,oe,we,ge,Ae,me,ye,ue,ae,ee,Ee,F,j,de,be,Te=[];for(X=r(X),F=X.length,Q=J,oe=0,Ae=G,me=0;me<F;++me)(Ee=X[me])<128&&Te.push(V(Ee));for(we=ge=Te.length,ge&&Te.push(te);we<F;){for(ye=W,me=0;me<F;++me)(Ee=X[me])>=Q&&Ee<ye&&(ye=Ee);for(j=we+1,ye-Q>$((W-oe)/j)&&c("overflow"),oe+=(ye-Q)*j,Q=ye,me=0;me<F;++me)if(Ee=X[me],Ee<Q&&++oe>W&&c("overflow"),Ee==Q){for(ue=oe,ae=N;ee=ae<=Ae?E:ae>=Ae+K?K:ae-Ae,!(ue<ee);ae+=N)be=ue-ee,de=N-ee,Te.push(V(a(ee+be%de,0))),ue=$(be/de);Te.push(V(a(ue,0))),Ae=p(oe,j,we==ge),oe=0,++we}++oe,++Q}return Te.join("")}function v(X){return u(X,function(Q){return re.test(Q)?d(Q.slice(4).toLowerCase()):Q})}function b(X){return u(X,function(Q){return se.test(Q)?"xn--"+i(Q):Q})}var _=typeof g=="object"&&g&&!g.nodeType&&g,w=typeof R=="object"&&R&&!R.nodeType&&R,T=typeof m=="object"&&m;T.global!==T&&T.window!==T&&T.self!==T||(y=T);var C,S,W=2147483647,N=36,E=1,K=26,z=38,M=700,G=72,J=128,te="-",re=/^xn--/,se=/[^\x20-\x7E]/,H=/[\x2E\u3002\uFF0E\uFF61]/g,he={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Z=N-E,$=Math.floor,V=String.fromCharCode;if(C={version:"1.4.1",ucs2:{decode:r,encode:e},decode:d,encode:i,toASCII:b,toUnicode:v},typeof De=="function"&&typeof De.amd=="object"&&De.amd)De("punycode",function(){return C});else if(_&&w)if(R.exports==_)w.exports=C;else for(S in C)C.hasOwnProperty(S)&&(_[S]=C[S]);else y.punycode=C}(this)}).call(this,typeof Ne!="undefined"?Ne:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(l,R,g){"use strict";function m(c,o){return Object.prototype.hasOwnProperty.call(c,o)}R.exports=function(c,o,u,r){o=o||"&",u=u||"=";var e={};if(typeof c!="string"||c.length===0)return e;var n=/\+/g;c=c.split(o);var a=1e3;r&&typeof r.maxKeys=="number"&&(a=r.maxKeys);var p=c.length;a>0&&p>a&&(p=a);for(var d=0;d<p;++d){var i,v,b,_,w=c[d].replace(n,"%20"),T=w.indexOf(u);T>=0?(i=w.substr(0,T),v=w.substr(T+1)):(i=w,v=""),b=decodeURIComponent(i),_=decodeURIComponent(v),m(e,b)?y(e[b])?e[b].push(_):e[b]=[e[b],_]:e[b]=_}return e};var y=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"}},{}],176:[function(l,R,g){"use strict";function m(u,r){if(u.map)return u.map(r);for(var e=[],n=0;n<u.length;n++)e.push(r(u[n],n));return e}var y=function(u){switch(typeof u){case"string":return u;case"boolean":return u?"true":"false";case"number":return isFinite(u)?u:"";default:return""}};R.exports=function(u,r,e,n){return r=r||"&",e=e||"=",u===null&&(u=void 0),typeof u=="object"?m(o(u),function(a){var p=encodeURIComponent(y(a))+e;return c(u[a])?m(u[a],function(d){return p+encodeURIComponent(y(d))}).join(r):p+encodeURIComponent(y(u[a]))}).join(r):n?encodeURIComponent(y(n))+e+encodeURIComponent(y(u)):""};var c=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"},o=Object.keys||function(u){var r=[];for(var e in u)Object.prototype.hasOwnProperty.call(u,e)&&r.push(e);return r}},{}],177:[function(l,R,g){"use strict";g.decode=g.parse=l("./decode"),g.encode=g.stringify=l("./encode")},{"./decode":175,"./encode":176}],178:[function(l,R,g){R.exports=l("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(l,R,g){"use strict";function m(b){if(!(this instanceof m))return new m(b);a.call(this,b),p.call(this,b),b&&b.readable===!1&&(this.readable=!1),b&&b.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,b&&b.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",y)}function y(){this.allowHalfOpen||this._writableState.ended||r.nextTick(c,this)}function c(b){b.end()}var o=l("babel-runtime/core-js/object/keys"),u=function(b){return b&&b.__esModule?b:{default:b}}(o),r=l("process-nextick-args"),e=u.default||function(b){var _=[];for(var w in b)_.push(w);return _};R.exports=m;var n=l("core-util-is");n.inherits=l("inherits");var a=l("./_stream_readable"),p=l("./_stream_writable");n.inherits(m,a);for(var d=e(p.prototype),i=0;i<d.length;i++){var v=d[i];m.prototype[v]||(m.prototype[v]=p.prototype[v])}Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(m.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(b){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=b,this._writableState.destroyed=b)}}),m.prototype._destroy=function(b,_){this.push(null),this.end(),r.nextTick(_,b)}},{"./_stream_readable":181,"./_stream_writable":183,"babel-runtime/core-js/object/keys":23,"core-util-is":153,inherits:162,"process-nextick-args":172}],180:[function(l,R,g){"use strict";function m(o){if(!(this instanceof m))return new m(o);y.call(this,o)}R.exports=m;var y=l("./_stream_transform"),c=l("core-util-is");c.inherits=l("inherits"),c.inherits(m,y),m.prototype._transform=function(o,u,r){r(null,o)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(l,R,g){(function(m,y){"use strict";function c(F){return oe.from(F)}function o(F){return oe.isBuffer(F)||F instanceof we}function u(F,j,de){if(typeof F.prependListener=="function")return F.prependListener(j,de);F._events&&F._events[j]?V(F._events[j])?F._events[j].unshift(de):F._events[j]=[de,F._events[j]]:F.on(j,de)}function r(F,j){$=$||l("./_stream_duplex"),F=F||{};var de=j instanceof $;this.objectMode=!!F.objectMode,de&&(this.objectMode=this.objectMode||!!F.readableObjectMode);var be=F.highWaterMark,Te=F.readableHighWaterMark,I=this.objectMode?16:16384;this.highWaterMark=be||be===0?be:de&&(Te||Te===0)?Te:I,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new ue,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=F.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,F.encoding&&(ye||(ye=l("string_decoder/").StringDecoder),this.decoder=new ye(F.encoding),this.encoding=F.encoding)}function e(F){if($=$||l("./_stream_duplex"),!(this instanceof e))return new e(F);this._readableState=new r(F,this),this.readable=!0,F&&(typeof F.read=="function"&&(this._read=F.read),typeof F.destroy=="function"&&(this._destroy=F.destroy)),Q.call(this)}function n(F,j,de,be,Te){var I=F._readableState;if(j===null)I.reading=!1,b(F,I);else{var t;Te||(t=p(I,j)),t?F.emit("error",t):I.objectMode||j&&j.length>0?(typeof j=="string"||I.objectMode||(0,he.default)(j)===oe.prototype||(j=c(j)),be?I.endEmitted?F.emit("error",new Error("stream.unshift() after end event")):a(F,I,j,!0):I.ended?F.emit("error",new Error("stream.push() after EOF")):(I.reading=!1,I.decoder&&!de?(j=I.decoder.write(j),I.objectMode||j.length!==0?a(F,I,j,!1):T(F,I)):a(F,I,j,!1))):be||(I.reading=!1)}return d(I)}function a(F,j,de,be){j.flowing&&j.length===0&&!j.sync?(F.emit("data",de),F.read(0)):(j.length+=j.objectMode?1:de.length,be?j.buffer.unshift(de):j.buffer.push(de),j.needReadable&&_(F)),T(F,j)}function p(F,j){var de;return o(j)||typeof j=="string"||j===void 0||F.objectMode||(de=new TypeError("Invalid non-string/buffer chunk")),de}function d(F){return!F.ended&&(F.needReadable||F.length<F.highWaterMark||F.length===0)}function i(F){return F>=Ee?F=Ee:(F--,F|=F>>>1,F|=F>>>2,F|=F>>>4,F|=F>>>8,F|=F>>>16,F++),F}function v(F,j){return F<=0||j.length===0&&j.ended?0:j.objectMode?1:F!==F?j.flowing&&j.length?j.buffer.head.data.length:j.length:(F>j.highWaterMark&&(j.highWaterMark=i(F)),F<=j.length?F:j.ended?j.length:(j.needReadable=!0,0))}function b(F,j){if(!j.ended){if(j.decoder){var de=j.decoder.end();de&&de.length&&(j.buffer.push(de),j.length+=j.objectMode?1:de.length)}j.ended=!0,_(F)}}function _(F){var j=F._readableState;j.needReadable=!1,j.emittedReadable||(me("emitReadable",j.flowing),j.emittedReadable=!0,j.sync?Z.nextTick(w,F):w(F))}function w(F){me("emit readable"),F.emit("readable"),K(F)}function T(F,j){j.readingMore||(j.readingMore=!0,Z.nextTick(C,F,j))}function C(F,j){for(var de=j.length;!j.reading&&!j.flowing&&!j.ended&&j.length<j.highWaterMark&&(me("maybeReadMore read 0"),F.read(0),de!==j.length);)de=j.length;j.readingMore=!1}function S(F){return function(){var j=F._readableState;me("pipeOnDrain",j.awaitDrain),j.awaitDrain&&j.awaitDrain--,j.awaitDrain===0&&X(F,"data")&&(j.flowing=!0,K(F))}}function W(F){me("readable nexttick read 0"),F.read(0)}function N(F,j){j.resumeScheduled||(j.resumeScheduled=!0,Z.nextTick(E,F,j))}function E(F,j){j.reading||(me("resume read 0"),F.read(0)),j.resumeScheduled=!1,j.awaitDrain=0,F.emit("resume"),K(F),j.flowing&&!j.reading&&F.read(0)}function K(F){var j=F._readableState;for(me("flow",j.flowing);j.flowing&&F.read()!==null;);}function z(F,j){if(j.length===0)return null;var de;return j.objectMode?de=j.buffer.shift():!F||F>=j.length?(de=j.decoder?j.buffer.join(""):j.buffer.length===1?j.buffer.head.data:j.buffer.concat(j.length),j.buffer.clear()):de=M(F,j.buffer,j.decoder),de}function M(F,j,de){var be;return F<j.head.data.length?(be=j.head.data.slice(0,F),j.head.data=j.head.data.slice(F)):be=F===j.head.data.length?j.shift():de?G(F,j):J(F,j),be}function G(F,j){var de=j.head,be=1,Te=de.data;for(F-=Te.length;de=de.next;){var I=de.data,t=F>I.length?I.length:F;if(t===I.length?Te+=I:Te+=I.slice(0,F),(F-=t)===0){t===I.length?(++be,de.next?j.head=de.next:j.head=j.tail=null):(j.head=de,de.data=I.slice(t));break}++be}return j.length-=be,Te}function J(F,j){var de=oe.allocUnsafe(F),be=j.head,Te=1;for(be.data.copy(de),F-=be.data.length;be=be.next;){var I=be.data,t=F>I.length?I.length:F;if(I.copy(de,de.length-F,0,t),(F-=t)===0){t===I.length?(++Te,be.next?j.head=be.next:j.head=j.tail=null):(j.head=be,be.data=I.slice(t));break}++Te}return j.length-=Te,de}function te(F){var j=F._readableState;if(j.length>0)throw new Error('"endReadable()" called on non-empty stream');j.endEmitted||(j.ended=!0,Z.nextTick(re,j,F))}function re(F,j){F.endEmitted||F.length!==0||(F.endEmitted=!0,j.readable=!1,j.emit("end"))}function se(F,j){for(var de=0,be=F.length;de<be;de++)if(F[de]===j)return de;return-1}var H=l("babel-runtime/core-js/object/get-prototype-of"),he=function(F){return F&&F.__esModule?F:{default:F}}(H),Z=l("process-nextick-args");R.exports=e;var $,V=l("isarray");e.ReadableState=r;var X=(l("events").EventEmitter,function(F,j){return F.listeners(j).length}),Q=l("./internal/streams/stream"),oe=l("safe-buffer").Buffer,we=y.Uint8Array||function(){},ge=l("core-util-is");ge.inherits=l("inherits");var Ae=l("util"),me=void 0;me=Ae&&Ae.debuglog?Ae.debuglog("stream"):function(){};var ye,ue=l("./internal/streams/BufferList"),ae=l("./internal/streams/destroy");ge.inherits(e,Q);var ee=["error","close","destroy","pause","resume"];Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(F){this._readableState&&(this._readableState.destroyed=F)}}),e.prototype.destroy=ae.destroy,e.prototype._undestroy=ae.undestroy,e.prototype._destroy=function(F,j){this.push(null),j(F)},e.prototype.push=function(F,j){var de,be=this._readableState;return be.objectMode?de=!0:typeof F=="string"&&(j=j||be.defaultEncoding,j!==be.encoding&&(F=oe.from(F,j),j=""),de=!0),n(this,F,j,!1,de)},e.prototype.unshift=function(F){return n(this,F,null,!0,!1)},e.prototype.isPaused=function(){return this._readableState.flowing===!1},e.prototype.setEncoding=function(F){return ye||(ye=l("string_decoder/").StringDecoder),this._readableState.decoder=new ye(F),this._readableState.encoding=F,this};var Ee=8388608;e.prototype.read=function(F){me("read",F),F=parseInt(F,10);var j=this._readableState,de=F;if(F!==0&&(j.emittedReadable=!1),F===0&&j.needReadable&&(j.length>=j.highWaterMark||j.ended))return me("read: emitReadable",j.length,j.ended),j.length===0&&j.ended?te(this):_(this),null;if((F=v(F,j))===0&&j.ended)return j.length===0&&te(this),null;var be=j.needReadable;me("need readable",be),(j.length===0||j.length-F<j.highWaterMark)&&(be=!0,me("length less than watermark",be)),j.ended||j.reading?(be=!1,me("reading or ended",be)):be&&(me("do read"),j.reading=!0,j.sync=!0,j.length===0&&(j.needReadable=!0),this._read(j.highWaterMark),j.sync=!1,j.reading||(F=v(de,j)));var Te;return Te=F>0?z(F,j):null,Te===null?(j.needReadable=!0,F=0):j.length-=F,j.length===0&&(j.ended||(j.needReadable=!0),de!==F&&j.ended&&te(this)),Te!==null&&this.emit("data",Te),Te},e.prototype._read=function(F){this.emit("error",new Error("_read() is not implemented"))},e.prototype.pipe=function(F,j){function de(ot,Be){me("onunpipe"),ot===k&&Be&&Be.hasUnpiped===!1&&(Be.hasUnpiped=!0,Te())}function be(){me("onend"),F.end()}function Te(){me("cleanup"),F.removeListener("close",h),F.removeListener("finish",L),F.removeListener("drain",ze),F.removeListener("error",t),F.removeListener("unpipe",de),k.removeListener("end",be),k.removeListener("end",A),k.removeListener("data",I),Fe=!0,!le.awaitDrain||F._writableState&&!F._writableState.needDrain||ze()}function I(ot){me("ondata"),Ke=!1,F.write(ot)!==!1||Ke||((le.pipesCount===1&&le.pipes===F||le.pipesCount>1&&se(le.pipes,F)!==-1)&&!Fe&&(me("false write response, pause",k._readableState.awaitDrain),k._readableState.awaitDrain++,Ke=!0),k.pause())}function t(ot){me("onerror",ot),A(),F.removeListener("error",t),X(F,"error")===0&&F.emit("error",ot)}function h(){F.removeListener("finish",L),A()}function L(){me("onfinish"),F.removeListener("close",h),A()}function A(){me("unpipe"),k.unpipe(F)}var k=this,le=this._readableState;switch(le.pipesCount){case 0:le.pipes=F;break;case 1:le.pipes=[le.pipes,F];break;default:le.pipes.push(F)}le.pipesCount+=1,me("pipe count=%d opts=%j",le.pipesCount,j);var _e=(!j||j.end!==!1)&&F!==m.stdout&&F!==m.stderr,Ge=_e?be:A;le.endEmitted?Z.nextTick(Ge):k.once("end",Ge),F.on("unpipe",de);var ze=S(k);F.on("drain",ze);var Fe=!1,Ke=!1;return k.on("data",I),u(F,"error",t),F.once("close",h),F.once("finish",L),F.emit("pipe",k),le.flowing||(me("pipe resume"),k.resume()),F},e.prototype.unpipe=function(F){var j=this._readableState,de={hasUnpiped:!1};if(j.pipesCount===0)return this;if(j.pipesCount===1)return F&&F!==j.pipes?this:(F||(F=j.pipes),j.pipes=null,j.pipesCount=0,j.flowing=!1,F&&F.emit("unpipe",this,de),this);if(!F){var be=j.pipes,Te=j.pipesCount;j.pipes=null,j.pipesCount=0,j.flowing=!1;for(var I=0;I<Te;I++)be[I].emit("unpipe",this,de);return this}var t=se(j.pipes,F);return t===-1?this:(j.pipes.splice(t,1),j.pipesCount-=1,j.pipesCount===1&&(j.pipes=j.pipes[0]),F.emit("unpipe",this,de),this)},e.prototype.on=function(F,j){var de=Q.prototype.on.call(this,F,j);if(F==="data")this._readableState.flowing!==!1&&this.resume();else if(F==="readable"){var be=this._readableState;be.endEmitted||be.readableListening||(be.readableListening=be.needReadable=!0,be.emittedReadable=!1,be.reading?be.length&&_(this):Z.nextTick(W,this))}return de},e.prototype.addListener=e.prototype.on,e.prototype.resume=function(){var F=this._readableState;return F.flowing||(me("resume"),F.flowing=!0,N(this,F)),this},e.prototype.pause=function(){return me("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(me("pause"),this._readableState.flowing=!1,this.emit("pause")),this},e.prototype.wrap=function(F){var j=this,de=this._readableState,be=!1;F.on("end",function(){if(me("wrapped end"),de.decoder&&!de.ended){var t=de.decoder.end();t&&t.length&&j.push(t)}j.push(null)}),F.on("data",function(t){(me("wrapped data"),de.decoder&&(t=de.decoder.write(t)),(!de.objectMode||t!=null)&&(de.objectMode||t&&t.length))&&(j.push(t)||(be=!0,F.pause()))});for(var Te in F)this[Te]===void 0&&typeof F[Te]=="function"&&(this[Te]=function(t){return function(){return F[t].apply(F,arguments)}}(Te));for(var I=0;I<ee.length;I++)F.on(ee[I],this.emit.bind(this,ee[I]));return this._read=function(t){me("wrapped _read",t),be&&(be=!1,F.resume())},this},Object.defineProperty(e.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),e._fromList=z}).call(this,l("_process"),typeof Ne!="undefined"?Ne:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/BufferList":184,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/get-prototype-of":22,"core-util-is":153,events:158,inherits:162,isarray:166,"process-nextick-args":172,"safe-buffer":193,"string_decoder/":200,util:36}],182:[function(l,R,g){"use strict";function m(e,n){var a=this._transformState;a.transforming=!1;var p=a.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));a.writechunk=null,a.writecb=null,n!=null&&this.push(n),p(e);var d=this._readableState;d.reading=!1,(d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}function y(e){if(!(this instanceof y))return new y(e);u.call(this,e),this._transformState={afterTransform:m.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;typeof this._flush=="function"?this._flush(function(n,a){o(e,n,a)}):o(this,null,null)}function o(e,n,a){if(n)return e.emit("error",n);if(a!=null&&e.push(a),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}R.exports=y;var u=l("./_stream_duplex"),r=l("core-util-is");r.inherits=l("inherits"),r.inherits(y,u),y.prototype.push=function(e,n){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,n)},y.prototype._transform=function(e,n,a){throw new Error("_transform() is not implemented")},y.prototype._write=function(e,n,a){var p=this._transformState;if(p.writecb=a,p.writechunk=e,p.writeencoding=n,!p.transforming){var d=this._readableState;(p.needTransform||d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}},y.prototype._read=function(e){var n=this._transformState;n.writechunk!==null&&n.writecb&&!n.transforming?(n.transforming=!0,this._transform(n.writechunk,n.writeencoding,n.afterTransform)):n.needTransform=!0},y.prototype._destroy=function(e,n){var a=this;u.prototype._destroy.call(this,e,function(p){n(p),a.emit("close")})}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(l,R,g){(function(m,y){"use strict";function c(ae){return ae&&ae.__esModule?ae:{default:ae}}function o(ae){var ee=this;this.next=null,this.entry=null,this.finish=function(){G(ee,ae)}}function u(ae){return Ae.from(ae)}function r(ae){return Ae.isBuffer(ae)||ae instanceof me}function e(){}function n(ae,ee){X=X||l("./_stream_duplex"),ae=ae||{};var Ee=ee instanceof X;this.objectMode=!!ae.objectMode,Ee&&(this.objectMode=this.objectMode||!!ae.writableObjectMode);var F=ae.highWaterMark,j=ae.writableHighWaterMark,de=this.objectMode?16:16384;this.highWaterMark=F||F===0?F:Ee&&(j||j===0)?j:de,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var be=ae.decodeStrings===!1;this.decodeStrings=!be,this.defaultEncoding=ae.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Te){T(ee,Te)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function a(ae){if(X=X||l("./_stream_duplex"),!(ue.call(a,this)||this instanceof X))return new a(ae);this._writableState=new n(ae,this),this.writable=!0,ae&&(typeof ae.write=="function"&&(this._write=ae.write),typeof ae.writev=="function"&&(this._writev=ae.writev),typeof ae.destroy=="function"&&(this._destroy=ae.destroy),typeof ae.final=="function"&&(this._final=ae.final)),ge.call(this)}function p(ae,ee){var Ee=new Error("write after end");ae.emit("error",Ee),V.nextTick(ee,Ee)}function d(ae,ee,Ee,F){var j=!0,de=!1;return Ee===null?de=new TypeError("May not write null values to stream"):typeof Ee=="string"||Ee===void 0||ee.objectMode||(de=new TypeError("Invalid non-string/buffer chunk")),de&&(ae.emit("error",de),V.nextTick(F,de),j=!1),j}function i(ae,ee,Ee){return ae.objectMode||ae.decodeStrings===!1||typeof ee!="string"||(ee=Ae.from(ee,Ee)),ee}function v(ae,ee,Ee,F,j,de){if(!Ee){var be=i(ee,F,j);F!==be&&(Ee=!0,j="buffer",F=be)}var Te=ee.objectMode?1:F.length;ee.length+=Te;var I=ee.length<ee.highWaterMark;if(I||(ee.needDrain=!0),ee.writing||ee.corked){var t=ee.lastBufferedRequest;ee.lastBufferedRequest={chunk:F,encoding:j,isBuf:Ee,callback:de,next:null},t?t.next=ee.lastBufferedRequest:ee.bufferedRequest=ee.lastBufferedRequest,ee.bufferedRequestCount+=1}else b(ae,ee,!1,Te,F,j,de);return I}function b(ae,ee,Ee,F,j,de,be){ee.writelen=F,ee.writecb=be,ee.writing=!0,ee.sync=!0,Ee?ae._writev(j,ee.onwrite):ae._write(j,de,ee.onwrite),ee.sync=!1}function _(ae,ee,Ee,F,j){--ee.pendingcb,Ee?(V.nextTick(j,F),V.nextTick(z,ae,ee),ae._writableState.errorEmitted=!0,ae.emit("error",F)):(j(F),ae._writableState.errorEmitted=!0,ae.emit("error",F),z(ae,ee))}function w(ae){ae.writing=!1,ae.writecb=null,ae.length-=ae.writelen,ae.writelen=0}function T(ae,ee){var Ee=ae._writableState,F=Ee.sync,j=Ee.writecb;if(w(Ee),ee)_(ae,Ee,F,ee,j);else{var de=N(Ee);de||Ee.corked||Ee.bufferProcessing||!Ee.bufferedRequest||W(ae,Ee),F?Q(C,ae,Ee,de,j):C(ae,Ee,de,j)}}function C(ae,ee,Ee,F){Ee||S(ae,ee),ee.pendingcb--,F(),z(ae,ee)}function S(ae,ee){ee.length===0&&ee.needDrain&&(ee.needDrain=!1,ae.emit("drain"))}function W(ae,ee){ee.bufferProcessing=!0;var Ee=ee.bufferedRequest;if(ae._writev&&Ee&&Ee.next){var F=ee.bufferedRequestCount,j=new Array(F),de=ee.corkedRequestsFree;de.entry=Ee;for(var be=0,Te=!0;Ee;)j[be]=Ee,Ee.isBuf||(Te=!1),Ee=Ee.next,be+=1;j.allBuffers=Te,b(ae,ee,!0,ee.length,j,"",de.finish),ee.pendingcb++,ee.lastBufferedRequest=null,de.next?(ee.corkedRequestsFree=de.next,de.next=null):ee.corkedRequestsFree=new o(ee),ee.bufferedRequestCount=0}else{for(;Ee;){var I=Ee.chunk,t=Ee.encoding,h=Ee.callback;if(b(ae,ee,!1,ee.objectMode?1:I.length,I,t,h),Ee=Ee.next,ee.bufferedRequestCount--,ee.writing)break}Ee===null&&(ee.lastBufferedRequest=null)}ee.bufferedRequest=Ee,ee.bufferProcessing=!1}function N(ae){return ae.ending&&ae.length===0&&ae.bufferedRequest===null&&!ae.finished&&!ae.writing}function E(ae,ee){ae._final(function(Ee){ee.pendingcb--,Ee&&ae.emit("error",Ee),ee.prefinished=!0,ae.emit("prefinish"),z(ae,ee)})}function K(ae,ee){ee.prefinished||ee.finalCalled||(typeof ae._final=="function"?(ee.pendingcb++,ee.finalCalled=!0,V.nextTick(E,ae,ee)):(ee.prefinished=!0,ae.emit("prefinish")))}function z(ae,ee){var Ee=N(ee);return Ee&&(K(ae,ee),ee.pendingcb===0&&(ee.finished=!0,ae.emit("finish"))),Ee}function M(ae,ee,Ee){ee.ending=!0,z(ae,ee),Ee&&(ee.finished?V.nextTick(Ee):ae.once("finish",Ee)),ee.ended=!0,ae.writable=!1}function G(ae,ee,Ee){var F=ae.entry;for(ae.entry=null;F;){var j=F.callback;ee.pendingcb--,j(Ee),F=F.next}ee.corkedRequestsFree?ee.corkedRequestsFree.next=ae:ee.corkedRequestsFree=ae}var J=l("babel-runtime/core-js/object/define-property"),te=c(J),re=l("babel-runtime/core-js/symbol/has-instance"),se=c(re),H=l("babel-runtime/core-js/symbol"),he=c(H),Z=l("babel-runtime/core-js/set-immediate"),$=c(Z),V=l("process-nextick-args");R.exports=a;var X,Q=!m.browser&&["v0.10","v0.9."].indexOf(m.version.slice(0,5))>-1?$.default:V.nextTick;a.WritableState=n;var oe=l("core-util-is");oe.inherits=l("inherits");var we={deprecate:l("util-deprecate")},ge=l("./internal/streams/stream"),Ae=l("safe-buffer").Buffer,me=y.Uint8Array||function(){},ye=l("./internal/streams/destroy");oe.inherits(a,ge),n.prototype.getBuffer=function(){for(var ae=this.bufferedRequest,ee=[];ae;)ee.push(ae),ae=ae.next;return ee},function(){try{Object.defineProperty(n.prototype,"buffer",{get:we.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ae){}}();var ue;typeof he.default=="function"&&se.default&&typeof Function.prototype[se.default]=="function"?(ue=Function.prototype[se.default],(0,te.default)(a,se.default,{value:function(ae){return!!ue.call(this,ae)||this===a&&ae&&ae._writableState instanceof n}})):ue=function(ae){return ae instanceof this},a.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},a.prototype.write=function(ae,ee,Ee){var F=this._writableState,j=!1,de=!F.objectMode&&r(ae);return de&&!Ae.isBuffer(ae)&&(ae=u(ae)),typeof ee=="function"&&(Ee=ee,ee=null),de?ee="buffer":ee||(ee=F.defaultEncoding),typeof Ee!="function"&&(Ee=e),F.ended?p(this,Ee):(de||d(this,F,ae,Ee))&&(F.pendingcb++,j=v(this,F,de,ae,ee,Ee)),j},a.prototype.cork=function(){this._writableState.corked++},a.prototype.uncork=function(){var ae=this._writableState;ae.corked&&(ae.corked--,ae.writing||ae.corked||ae.finished||ae.bufferProcessing||!ae.bufferedRequest||W(this,ae))},a.prototype.setDefaultEncoding=function(ae){if(typeof ae=="string"&&(ae=ae.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ae+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ae);return this._writableState.defaultEncoding=ae,this},Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),a.prototype._write=function(ae,ee,Ee){Ee(new Error("_write() is not implemented"))},a.prototype._writev=null,a.prototype.end=function(ae,ee,Ee){var F=this._writableState;typeof ae=="function"?(Ee=ae,ae=null,ee=null):typeof ee=="function"&&(Ee=ee,ee=null),ae!=null&&this.write(ae,ee),F.corked&&(F.corked=1,this.uncork()),F.ending||F.finished||M(this,F,Ee)},Object.defineProperty(a.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(ae){this._writableState&&(this._writableState.destroyed=ae)}}),a.prototype.destroy=ye.destroy,a.prototype._undestroy=ye.undestroy,a.prototype._destroy=function(ae,ee){this.end(),ee(ae)}}).call(this,l("_process"),typeof Ne!="undefined"?Ne:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/set-immediate":25,"babel-runtime/core-js/symbol":27,"babel-runtime/core-js/symbol/has-instance":28,"core-util-is":153,inherits:162,"process-nextick-args":172,"safe-buffer":193,"util-deprecate":205}],184:[function(l,R,g){"use strict";function m(u,r){if(!(u instanceof r))throw new TypeError("Cannot call a class as a function")}function y(u,r,e){u.copy(r,e)}var c=l("safe-buffer").Buffer,o=l("util");R.exports=function(){function u(){m(this,u),this.head=null,this.tail=null,this.length=0}return u.prototype.push=function(r){var e={data:r,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},u.prototype.unshift=function(r){var e={data:r,next:this.head};this.length===0&&(this.tail=e),this.head=e,++this.length},u.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},u.prototype.clear=function(){this.head=this.tail=null,this.length=0},u.prototype.join=function(r){if(this.length===0)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=r+e.data;return n},u.prototype.concat=function(r){if(this.length===0)return c.alloc(0);if(this.length===1)return this.head.data;for(var e=c.allocUnsafe(r>>>0),n=this.head,a=0;n;)y(n.data,e,a),a+=n.data.length,n=n.next;return e},u}(),o&&o.inspect&&o.inspect.custom&&(R.exports.prototype[o.inspect.custom]=function(){var u=o.inspect({length:this.length});return this.constructor.name+" "+u})},{"safe-buffer":193,util:36}],185:[function(l,R,g){"use strict";function m(u,r){var e=this,n=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return n||a?(r?r(u):!u||this._writableState&&this._writableState.errorEmitted||o.nextTick(c,this,u),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(u||null,function(p){!r&&p?(o.nextTick(c,e,p),e._writableState&&(e._writableState.errorEmitted=!0)):r&&r(p)}),this)}function y(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function c(u,r){u.emit("error",r)}var o=l("process-nextick-args");R.exports={destroy:m,undestroy:y}},{"process-nextick-args":172}],186:[function(l,R,g){"use strict";R.exports=l("events").EventEmitter},{events:158}],187:[function(l,R,g){R.exports=l("./readable").PassThrough},{"./readable":188}],188:[function(l,R,g){g=R.exports=l("./lib/_stream_readable.js"),g.Stream=g,g.Readable=g,g.Writable=l("./lib/_stream_writable.js"),g.Duplex=l("./lib/_stream_duplex.js"),g.Transform=l("./lib/_stream_transform.js"),g.PassThrough=l("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":179,"./lib/_stream_passthrough.js":180,"./lib/_stream_readable.js":181,"./lib/_stream_transform.js":182,"./lib/_stream_writable.js":183}],189:[function(l,R,g){R.exports=l("./readable").Transform},{"./readable":188}],190:[function(l,R,g){R.exports=l("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(l,R,g){var m=function(){return this}()||Function("return this")(),y=m.regeneratorRuntime&&Object.getOwnPropertyNames(m).indexOf("regeneratorRuntime")>=0,c=y&&m.regeneratorRuntime;if(m.regeneratorRuntime=void 0,R.exports=l("./runtime"),y)m.regeneratorRuntime=c;else try{delete m.regeneratorRuntime}catch(o){m.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(l,R,g){!function(m){"use strict";function y($,V,X,Q){var oe=V&&V.prototype instanceof o?V:o,we=Object.create(oe.prototype),ge=new v(Q||[]);return we._invoke=a($,X,ge),we}function c($,V,X){try{return{type:"normal",arg:$.call(V,X)}}catch(Q){return{type:"throw",arg:Q}}}function o(){}function u(){}function r(){}function e($){["next","throw","return"].forEach(function(V){$[V]=function(X){return this._invoke(V,X)}})}function n($){function V(oe,we,ge,Ae){var me=c($[oe],$,we);if(me.type!=="throw"){var ye=me.arg,ue=ye.value;return ue&&typeof ue=="object"&&C.call(ue,"__await")?Promise.resolve(ue.__await).then(function(ae){V("next",ae,ge,Ae)},function(ae){V("throw",ae,ge,Ae)}):Promise.resolve(ue).then(function(ae){ye.value=ae,ge(ye)},Ae)}Ae(me.arg)}function X(oe,we){function ge(){return new Promise(function(Ae,me){V(oe,we,Ae,me)})}return Q=Q?Q.then(ge,ge):ge()}var Q;this._invoke=X}function a($,V,X){var Q=M;return function(oe,we){if(Q===J)throw new Error("Generator is already running");if(Q===te){if(oe==="throw")throw we;return _()}for(X.method=oe,X.arg=we;;){var ge=X.delegate;if(ge){var Ae=p(ge,X);if(Ae){if(Ae===re)continue;return Ae}}if(X.method==="next")X.sent=X._sent=X.arg;else if(X.method==="throw"){if(Q===M)throw Q=te,X.arg;X.dispatchException(X.arg)}else X.method==="return"&&X.abrupt("return",X.arg);Q=J;var me=c($,V,X);if(me.type==="normal"){if(Q=X.done?te:G,me.arg===re)continue;return{value:me.arg,done:X.done}}me.type==="throw"&&(Q=te,X.method="throw",X.arg=me.arg)}}}function p($,V){var X=$.iterator[V.method];if(X===w){if(V.delegate=null,V.method==="throw"){if($.iterator.return&&(V.method="return",V.arg=w,p($,V),V.method==="throw"))return re;V.method="throw",V.arg=new TypeError("The iterator does not provide a 'throw' method")}return re}var Q=c(X,$.iterator,V.arg);if(Q.type==="throw")return V.method="throw",V.arg=Q.arg,V.delegate=null,re;var oe=Q.arg;return oe?oe.done?(V[$.resultName]=oe.value,V.next=$.nextLoc,V.method!=="return"&&(V.method="next",V.arg=w),V.delegate=null,re):oe:(V.method="throw",V.arg=new TypeError("iterator result is not an object"),V.delegate=null,re)}function d($){var V={tryLoc:$[0]};1 in $&&(V.catchLoc=$[1]),2 in $&&(V.finallyLoc=$[2],V.afterLoc=$[3]),this.tryEntries.push(V)}function i($){var V=$.completion||{};V.type="normal",delete V.arg,$.completion=V}function v($){this.tryEntries=[{tryLoc:"root"}],$.forEach(d,this),this.reset(!0)}function b($){if($){var V=$[W];if(V)return V.call($);if(typeof $.next=="function")return $;if(!isNaN($.length)){var X=-1,Q=function oe(){for(;++X<$.length;)if(C.call($,X))return oe.value=$[X],oe.done=!1,oe;return oe.value=w,oe.done=!0,oe};return Q.next=Q}}return{next:_}}function _(){return{value:w,done:!0}}var w,T=Object.prototype,C=T.hasOwnProperty,S=typeof Symbol=="function"?Symbol:{},W=S.iterator||"@@iterator",N=S.asyncIterator||"@@asyncIterator",E=S.toStringTag||"@@toStringTag",K=typeof R=="object",z=m.regeneratorRuntime;if(z)return void(K&&(R.exports=z));z=m.regeneratorRuntime=K?R.exports:{},z.wrap=y;var M="suspendedStart",G="suspendedYield",J="executing",te="completed",re={},se={};se[W]=function(){return this};var H=Object.getPrototypeOf,he=H&&H(H(b([])));he&&he!==T&&C.call(he,W)&&(se=he);var Z=r.prototype=o.prototype=Object.create(se);u.prototype=Z.constructor=r,r.constructor=u,r[E]=u.displayName="GeneratorFunction",z.isGeneratorFunction=function($){var V=typeof $=="function"&&$.constructor;return!!V&&(V===u||(V.displayName||V.name)==="GeneratorFunction")},z.mark=function($){return Object.setPrototypeOf?Object.setPrototypeOf($,r):($.__proto__=r,E in $||($[E]="GeneratorFunction")),$.prototype=Object.create(Z),$},z.awrap=function($){return{__await:$}},e(n.prototype),n.prototype[N]=function(){return this},z.AsyncIterator=n,z.async=function($,V,X,Q){var oe=new n(y($,V,X,Q));return z.isGeneratorFunction(V)?oe:oe.next().then(function(we){return we.done?we.value:oe.next()})},e(Z),Z[E]="Generator",Z[W]=function(){return this},Z.toString=function(){return"[object Generator]"},z.keys=function($){var V=[];for(var X in $)V.push(X);return V.reverse(),function Q(){for(;V.length;){var oe=V.pop();if(oe in $)return Q.value=oe,Q.done=!1,Q}return Q.done=!0,Q}},z.values=b,v.prototype={constructor:v,reset:function($){if(this.prev=0,this.next=0,this.sent=this._sent=w,this.done=!1,this.delegate=null,this.method="next",this.arg=w,this.tryEntries.forEach(i),!$)for(var V in this)V.charAt(0)==="t"&&C.call(this,V)&&!isNaN(+V.slice(1))&&(this[V]=w)},stop:function(){this.done=!0;var $=this.tryEntries[0],V=$.completion;if(V.type==="throw")throw V.arg;return this.rval},dispatchException:function($){function V(me,ye){return we.type="throw",we.arg=$,X.next=me,ye&&(X.method="next",X.arg=w),!!ye}if(this.done)throw $;for(var X=this,Q=this.tryEntries.length-1;Q>=0;--Q){var oe=this.tryEntries[Q],we=oe.completion;if(oe.tryLoc==="root")return V("end");if(oe.tryLoc<=this.prev){var ge=C.call(oe,"catchLoc"),Ae=C.call(oe,"finallyLoc");if(ge&&Ae){if(this.prev<oe.catchLoc)return V(oe.catchLoc,!0);if(this.prev<oe.finallyLoc)return V(oe.finallyLoc)}else if(ge){if(this.prev<oe.catchLoc)return V(oe.catchLoc,!0)}else{if(!Ae)throw new Error("try statement without catch or finally");if(this.prev<oe.finallyLoc)return V(oe.finallyLoc)}}}},abrupt:function($,V){for(var X=this.tryEntries.length-1;X>=0;--X){var Q=this.tryEntries[X];if(Q.tryLoc<=this.prev&&C.call(Q,"finallyLoc")&&this.prev<Q.finallyLoc){var oe=Q;break}}oe&&($==="break"||$==="continue")&&oe.tryLoc<=V&&V<=oe.finallyLoc&&(oe=null);var we=oe?oe.completion:{};return we.type=$,we.arg=V,oe?(this.method="next",this.next=oe.finallyLoc,re):this.complete(we)},complete:function($,V){if($.type==="throw")throw $.arg;return $.type==="break"||$.type==="continue"?this.next=$.arg:$.type==="return"?(this.rval=this.arg=$.arg,this.method="return",this.next="end"):$.type==="normal"&&V&&(this.next=V),re},finish:function($){for(var V=this.tryEntries.length-1;V>=0;--V){var X=this.tryEntries[V];if(X.finallyLoc===$)return this.complete(X.completion,X.afterLoc),i(X),re}},catch:function($){for(var V=this.tryEntries.length-1;V>=0;--V){var X=this.tryEntries[V];if(X.tryLoc===$){var Q=X.completion;if(Q.type==="throw"){var oe=Q.arg;i(X)}return oe}}throw new Error("illegal catch attempt")},delegateYield:function($,V,X){return this.delegate={iterator:b($),resultName:V,nextLoc:X},this.method==="next"&&(this.arg=w),re}}}(function(){return this}()||Function("return this")())},{}],193:[function(l,R,g){function m(u,r){for(var e in u)r[e]=u[e]}function y(u,r,e){return o(u,r,e)}var c=l("buffer"),o=c.Buffer;o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?R.exports=c:(m(c,g),g.Buffer=y),m(o,y),y.from=function(u,r,e){if(typeof u=="number")throw new TypeError("Argument must not be a number");return o(u,r,e)},y.alloc=function(u,r,e){if(typeof u!="number")throw new TypeError("Argument must be a number");var n=o(u);return r!==void 0?typeof e=="string"?n.fill(r,e):n.fill(r):n.fill(0),n},y.allocUnsafe=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return o(u)},y.allocUnsafeSlow=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return c.SlowBuffer(u)}},{buffer:38}],194:[function(l,R,g){(function(m){"use strict";function y(_){return _&&_.__esModule?_:{default:_}}var c=l("babel-runtime/core-js/string/from-code-point"),o=y(c),u=l("babel-runtime/core-js/json/stringify"),r=y(u),e=l("babel-runtime/helpers/typeof"),n=y(e),a=l("babel-runtime/core-js/object/define-property"),p=y(a),d=l("babel-runtime/core-js/object/keys"),i=y(d),v=l("babel-runtime/core-js/object/create"),b=y(v);!function(_){function w(A,k){if(!(this instanceof w))return new w(A,k);var le=this;C(le),le.q=le.c="",le.bufferCheckPosition=_.MAX_BUFFER_LENGTH,le.opt=k||{},le.opt.lowercase=le.opt.lowercase||le.opt.lowercasetags,le.looseCase=le.opt.lowercase?"toLowerCase":"toUpperCase",le.tags=[],le.closed=le.closedRoot=le.sawRoot=!1,le.tag=le.error=null,le.strict=!!A,le.noscript=!(!A&&!le.opt.noscript),le.state=h.BEGIN,le.strictEntities=le.opt.strictEntities,le.ENTITIES=le.strictEntities?(0,b.default)(_.XML_ENTITIES):(0,b.default)(_.ENTITIES),le.attribList=[],le.opt.xmlns&&(le.ns=(0,b.default)(de)),le.trackPosition=le.opt.position!==!1,le.trackPosition&&(le.position=le.line=le.column=0),J(le,"onready")}function T(A){for(var k=Math.max(_.MAX_BUFFER_LENGTH,10),le=0,_e=0,Ge=ye.length;_e<Ge;_e++){var ze=A[ye[_e]].length;if(ze>k)switch(ye[_e]){case"textNode":re(A);break;case"cdata":te(A,"oncdata",A.cdata),A.cdata="";break;case"script":te(A,"onscript",A.script),A.script="";break;default:H(A,"Max buffer length exceeded: "+ye[_e])}le=Math.max(le,ze)}var Fe=_.MAX_BUFFER_LENGTH-le;A.bufferCheckPosition=Fe+A.position}function C(A){for(var k=0,le=ye.length;k<le;k++)A[ye[k]]=""}function S(A){re(A),A.cdata!==""&&(te(A,"oncdata",A.cdata),A.cdata=""),A.script!==""&&(te(A,"onscript",A.script),A.script="")}function W(A,k){return new N(A,k)}function N(A,k){if(!(this instanceof N))return new N(A,k);ue.apply(this),this._parser=new w(A,k),this.writable=!0,this.readable=!0;var le=this;this._parser.onend=function(){le.emit("end")},this._parser.onerror=function(_e){le.emit("error",_e),le._parser.error=null},this._decoder=null,ae.forEach(function(_e){(0,p.default)(le,"on"+_e,{get:function(){return le._parser["on"+_e]},set:function(Ge){if(!Ge)return le.removeAllListeners(_e),le._parser["on"+_e]=Ge,Ge;le.on(_e,Ge)},enumerable:!0,configurable:!1})})}function E(A){return A===" "||A===`
|
|
|
`||A==="\r"||A===" "}function K(A){return A==='"'||A==="'"}function z(A){return A===">"||E(A)}function M(A,k){return A.test(k)}function G(A,k){return!M(A,k)}function J(A,k,le){A[k]&&A[k](le)}function te(A,k,le){A.textNode&&re(A),J(A,k,le)}function re(A){A.textNode=se(A.opt,A.textNode),A.textNode&&J(A,"ontext",A.textNode),A.textNode=""}function se(A,k){return A.trim&&(k=k.trim()),A.normalize&&(k=k.replace(/\s+/g," ")),k}function H(A,k){return re(A),A.trackPosition&&(k+=`
|
|
|
Line: `+A.line+`
|
|
|
Column: `+A.column+`
|
|
|
Char: `+A.c),k=new Error(k),A.error=k,J(A,"onerror",k),A}function he(A){return A.sawRoot&&!A.closedRoot&&Z(A,"Unclosed root tag"),A.state!==h.BEGIN&&A.state!==h.BEGIN_WHITESPACE&&A.state!==h.TEXT&&H(A,"Unexpected end"),re(A),A.c="",A.closed=!0,J(A,"onend"),w.call(A,A.strict,A.opt),A}function Z(A,k){if((A===void 0?"undefined":(0,n.default)(A))!=="object"||!(A instanceof w))throw new Error("bad call to strictFail");A.strict&&H(A,k)}function $(A){A.strict||(A.tagName=A.tagName[A.looseCase]());var k=A.tags[A.tags.length-1]||A,le=A.tag={name:A.tagName,attributes:{}};A.opt.xmlns&&(le.ns=k.ns),A.attribList.length=0,te(A,"onopentagstart",le)}function V(A,k){var le=A.indexOf(":"),_e=le<0?["",A]:A.split(":"),Ge=_e[0],ze=_e[1];return k&&A==="xmlns"&&(Ge="xmlns",ze=""),{prefix:Ge,local:ze}}function X(A){if(A.strict||(A.attribName=A.attribName[A.looseCase]()),A.attribList.indexOf(A.attribName)!==-1||A.tag.attributes.hasOwnProperty(A.attribName))return void(A.attribName=A.attribValue="");if(A.opt.xmlns){var k=V(A.attribName,!0),le=k.prefix,_e=k.local;if(le==="xmlns")if(_e==="xml"&&A.attribValue!==F)Z(A,"xml: prefix must be bound to "+F+`
|
|
|
Actual: `+A.attribValue);else if(_e==="xmlns"&&A.attribValue!==j)Z(A,"xmlns: prefix must be bound to "+j+`
|
|
|
Actual: `+A.attribValue);else{var Ge=A.tag,ze=A.tags[A.tags.length-1]||A;Ge.ns===ze.ns&&(Ge.ns=(0,b.default)(ze.ns)),Ge.ns[_e]=A.attribValue}A.attribList.push([A.attribName,A.attribValue])}else A.tag.attributes[A.attribName]=A.attribValue,te(A,"onattribute",{name:A.attribName,value:A.attribValue});A.attribName=A.attribValue=""}function Q(A,k){if(A.opt.xmlns){var le=A.tag,_e=V(A.tagName);le.prefix=_e.prefix,le.local=_e.local,le.uri=le.ns[_e.prefix]||"",le.prefix&&!le.uri&&(Z(A,"Unbound namespace prefix: "+(0,r.default)(A.tagName)),le.uri=_e.prefix);var Ge=A.tags[A.tags.length-1]||A;le.ns&&Ge.ns!==le.ns&&(0,i.default)(le.ns).forEach(function(ve){te(A,"onopennamespace",{prefix:ve,uri:le.ns[ve]})});for(var ze=0,Fe=A.attribList.length;ze<Fe;ze++){var Ke=A.attribList[ze],ot=Ke[0],Be=Ke[1],je=V(ot,!0),ke=je.prefix,Le=je.local,Oe=ke===""?"":le.ns[ke]||"",pe={name:ot,value:Be,prefix:ke,local:Le,uri:Oe};ke&&ke!=="xmlns"&&!Oe&&(Z(A,"Unbound namespace prefix: "+(0,r.default)(ke)),pe.uri=ke),A.tag.attributes[ot]=pe,te(A,"onattribute",pe)}A.attribList.length=0}A.tag.isSelfClosing=!!k,A.sawRoot=!0,A.tags.push(A.tag),te(A,"onopentag",A.tag),k||(A.noscript||A.tagName.toLowerCase()!=="script"?A.state=h.TEXT:A.state=h.SCRIPT,A.tag=null,A.tagName=""),A.attribName=A.attribValue="",A.attribList.length=0}function oe(A){if(!A.tagName)return Z(A,"Weird empty close tag."),A.textNode+="</>",void(A.state=h.TEXT);if(A.script){if(A.tagName!=="script")return A.script+="</"+A.tagName+">",A.tagName="",void(A.state=h.SCRIPT);te(A,"onscript",A.script),A.script=""}var k=A.tags.length,le=A.tagName;A.strict||(le=le[A.looseCase]());for(var _e=le;k--&&!(A.tags[k].name===_e);)Z(A,"Unexpected close tag");if(k<0)return Z(A,"Unmatched closing tag: "+A.tagName),A.textNode+="</"+A.tagName+">",void(A.state=h.TEXT);A.tagName=le;for(var Ge=A.tags.length;Ge-- >k;){var ze=A.tag=A.tags.pop();A.tagName=A.tag.name,te(A,"onclosetag",A.tagName);var Fe={};for(var Ke in ze.ns)Fe[Ke]=ze.ns[Ke];var ot=A.tags[A.tags.length-1]||A;A.opt.xmlns&&ze.ns!==ot.ns&&(0,i.default)(ze.ns).forEach(function(Be){var je=ze.ns[Be];te(A,"onclosenamespace",{prefix:Be,uri:je})})}k===0&&(A.closedRoot=!0),A.tagName=A.attribValue=A.attribName="",A.attribList.length=0,A.state=h.TEXT}function we(A){var k,le=A.entity,_e=le.toLowerCase(),Ge="";return A.ENTITIES[le]?A.ENTITIES[le]:A.ENTITIES[_e]?A.ENTITIES[_e]:(le=_e,le.charAt(0)==="#"&&(le.charAt(1)==="x"?(le=le.slice(2),k=parseInt(le,16),Ge=k.toString(16)):(le=le.slice(1),k=parseInt(le,10),Ge=k.toString(10))),le=le.replace(/^0+/,""),isNaN(k)||Ge.toLowerCase()!==le?(Z(A,"Invalid character entity"),"&"+A.entity+";"):(0,o.default)(k))}function ge(A,k){k==="<"?(A.state=h.OPEN_WAKA,A.startTagPosition=A.position):E(k)||(Z(A,"Non-whitespace before first tag."),A.textNode=k,A.state=h.TEXT)}function Ae(A,k){var le="";return k<A.length&&(le=A.charAt(k)),le}function me(A){var k=this;if(this.error)throw this.error;if(k.closed)return H(k,"Cannot write after close. Assign an onready handler.");if(A===null)return he(k);(A===void 0?"undefined":(0,n.default)(A))==="object"&&(A=A.toString());for(var le=0,_e="";!(_e=Ae(A,le++),k.c=_e,!_e);)switch(k.trackPosition&&(k.position++,_e===`
|
|
|
`?(k.line++,k.column=0):k.column++),k.state){case h.BEGIN:if(k.state=h.BEGIN_WHITESPACE,_e==="\uFEFF")continue;ge(k,_e);continue;case h.BEGIN_WHITESPACE:ge(k,_e);continue;case h.TEXT:if(k.sawRoot&&!k.closedRoot){for(var Ge=le-1;_e&&_e!=="<"&&_e!=="&";)(_e=Ae(A,le++))&&k.trackPosition&&(k.position++,_e===`
|
|
|
`?(k.line++,k.column=0):k.column++);k.textNode+=A.substring(Ge,le-1)}_e!=="<"||k.sawRoot&&k.closedRoot&&!k.strict?(E(_e)||k.sawRoot&&!k.closedRoot||Z(k,"Text data outside of root node."),_e==="&"?k.state=h.TEXT_ENTITY:k.textNode+=_e):(k.state=h.OPEN_WAKA,k.startTagPosition=k.position);continue;case h.SCRIPT:_e==="<"?k.state=h.SCRIPT_ENDING:k.script+=_e;continue;case h.SCRIPT_ENDING:_e==="/"?k.state=h.CLOSE_TAG:(k.script+="<"+_e,k.state=h.SCRIPT);continue;case h.OPEN_WAKA:if(_e==="!")k.state=h.SGML_DECL,k.sgmlDecl="";else if(!E(_e))if(M(be,_e))k.state=h.OPEN_TAG,k.tagName=_e;else if(_e==="/")k.state=h.CLOSE_TAG,k.tagName="";else if(_e==="?")k.state=h.PROC_INST,k.procInstName=k.procInstBody="";else{if(Z(k,"Unencoded <"),k.startTagPosition+1<k.position){var ze=k.position-k.startTagPosition;_e=new Array(ze).join(" ")+_e}k.textNode+="<"+_e,k.state=h.TEXT}continue;case h.SGML_DECL:(k.sgmlDecl+_e).toUpperCase()===ee?(te(k,"onopencdata"),k.state=h.CDATA,k.sgmlDecl="",k.cdata=""):k.sgmlDecl+_e==="--"?(k.state=h.COMMENT,k.comment="",k.sgmlDecl=""):(k.sgmlDecl+_e).toUpperCase()===Ee?(k.state=h.DOCTYPE,(k.doctype||k.sawRoot)&&Z(k,"Inappropriately located doctype declaration"),k.doctype="",k.sgmlDecl=""):_e===">"?(te(k,"onsgmldeclaration",k.sgmlDecl),k.sgmlDecl="",k.state=h.TEXT):(K(_e)&&(k.state=h.SGML_DECL_QUOTED),k.sgmlDecl+=_e);continue;case h.SGML_DECL_QUOTED:_e===k.q&&(k.state=h.SGML_DECL,k.q=""),k.sgmlDecl+=_e;continue;case h.DOCTYPE:_e===">"?(k.state=h.TEXT,te(k,"ondoctype",k.doctype),k.doctype=!0):(k.doctype+=_e,_e==="["?k.state=h.DOCTYPE_DTD:K(_e)&&(k.state=h.DOCTYPE_QUOTED,k.q=_e));continue;case h.DOCTYPE_QUOTED:k.doctype+=_e,_e===k.q&&(k.q="",k.state=h.DOCTYPE);continue;case h.DOCTYPE_DTD:k.doctype+=_e,_e==="]"?k.state=h.DOCTYPE:K(_e)&&(k.state=h.DOCTYPE_DTD_QUOTED,k.q=_e);continue;case h.DOCTYPE_DTD_QUOTED:k.doctype+=_e,_e===k.q&&(k.state=h.DOCTYPE_DTD,k.q="");continue;case h.COMMENT:_e==="-"?k.state=h.COMMENT_ENDING:k.comment+=_e;continue;case h.COMMENT_ENDING:_e==="-"?(k.state=h.COMMENT_ENDED,k.comment=se(k.opt,k.comment),k.comment&&te(k,"oncomment",k.comment),k.comment=""):(k.comment+="-"+_e,k.state=h.COMMENT);continue;case h.COMMENT_ENDED:_e!==">"?(Z(k,"Malformed comment"),k.comment+="--"+_e,k.state=h.COMMENT):k.state=h.TEXT;continue;case h.CDATA:_e==="]"?k.state=h.CDATA_ENDING:k.cdata+=_e;continue;case h.CDATA_ENDING:_e==="]"?k.state=h.CDATA_ENDING_2:(k.cdata+="]"+_e,k.state=h.CDATA);continue;case h.CDATA_ENDING_2:_e===">"?(k.cdata&&te(k,"oncdata",k.cdata),te(k,"onclosecdata"),k.cdata="",k.state=h.TEXT):_e==="]"?k.cdata+="]":(k.cdata+="]]"+_e,k.state=h.CDATA);continue;case h.PROC_INST:_e==="?"?k.state=h.PROC_INST_ENDING:E(_e)?k.state=h.PROC_INST_BODY:k.procInstName+=_e;continue;case h.PROC_INST_BODY:if(!k.procInstBody&&E(_e))continue;_e==="?"?k.state=h.PROC_INST_ENDING:k.procInstBody+=_e;continue;case h.PROC_INST_ENDING:_e===">"?(te(k,"onprocessinginstruction",{name:k.procInstName,body:k.procInstBody}),k.procInstName=k.procInstBody="",k.state=h.TEXT):(k.procInstBody+="?"+_e,k.state=h.PROC_INST_BODY);continue;case h.OPEN_TAG:M(Te,_e)?k.tagName+=_e:($(k),_e===">"?Q(k):_e==="/"?k.state=h.OPEN_TAG_SLASH:(E(_e)||Z(k,"Invalid character in tag name"),k.state=h.ATTRIB));continue;case h.OPEN_TAG_SLASH:_e===">"?(Q(k,!0),oe(k)):(Z(k,"Forward-slash in opening tag not followed by >"),k.state=h.ATTRIB);continue;case h.ATTRIB:if(E(_e))continue;_e===">"?Q(k):_e==="/"?k.state=h.OPEN_TAG_SLASH:M(be,_e)?(k.attribName=_e,k.attribValue="",k.state=h.ATTRIB_NAME):Z(k,"Invalid attribute name");continue;case h.ATTRIB_NAME:_e==="="?k.state=h.ATTRIB_VALUE:_e===">"?(Z(k,"Attribute without value"),k.attribValue=k.attribName,X(k),Q(k)):E(_e)?k.state=h.ATTRIB_NAME_SAW_WHITE:M(Te,_e)?k.attribName+=_e:Z(k,"Invalid attribute name");continue;case h.ATTRIB_NAME_SAW_WHITE:if(_e==="=")k.state=h.ATTRIB_VALUE;else{if(E(_e))continue;Z(k,"Attribute without value"),k.tag.attributes[k.attribName]="",k.attribValue="",te(k,"onattribute",{name:k.attribName,value:""}),k.attribName="",_e===">"?Q(k):M(be,_e)?(k.attribName=_e,k.state=h.ATTRIB_NAME):(Z(k,"Invalid attribute name"),k.state=h.ATTRIB)}continue;case h.ATTRIB_VALUE:if(E(_e))continue;K(_e)?(k.q=_e,k.state=h.ATTRIB_VALUE_QUOTED):(Z(k,"Unquoted attribute value"),k.state=h.ATTRIB_VALUE_UNQUOTED,k.attribValue=_e);continue;case h.ATTRIB_VALUE_QUOTED:if(_e!==k.q){_e==="&"?k.state=h.ATTRIB_VALUE_ENTITY_Q:k.attribValue+=_e;continue}X(k),k.q="",k.state=h.ATTRIB_VALUE_CLOSED;continue;case h.ATTRIB_VALUE_CLOSED:E(_e)?k.state=h.ATTRIB:_e===">"?Q(k):_e==="/"?k.state=h.OPEN_TAG_SLASH:M(be,_e)?(Z(k,"No whitespace between attributes"),k.attribName=_e,k.attribValue="",k.state=h.ATTRIB_NAME):Z(k,"Invalid attribute name");continue;case h.ATTRIB_VALUE_UNQUOTED:if(!z(_e)){_e==="&"?k.state=h.ATTRIB_VALUE_ENTITY_U:k.attribValue+=_e;continue}X(k),_e===">"?Q(k):k.state=h.ATTRIB;continue;case h.CLOSE_TAG:if(k.tagName)_e===">"?oe(k):M(Te,_e)?k.tagName+=_e:k.script?(k.script+="</"+k.tagName,k.tagName="",k.state=h.SCRIPT):(E(_e)||Z(k,"Invalid tagname in closing tag"),k.state=h.CLOSE_TAG_SAW_WHITE);else{if(E(_e))continue;G(be,_e)?k.script?(k.script+="</"+_e,k.state=h.SCRIPT):Z(k,"Invalid tagname in closing tag."):k.tagName=_e}continue;case h.CLOSE_TAG_SAW_WHITE:if(E(_e))continue;_e===">"?oe(k):Z(k,"Invalid characters in closing tag");continue;case h.TEXT_ENTITY:case h.ATTRIB_VALUE_ENTITY_Q:case h.ATTRIB_VALUE_ENTITY_U:var Fe,Ke;switch(k.state){case h.TEXT_ENTITY:Fe=h.TEXT,Ke="textNode";break;case h.ATTRIB_VALUE_ENTITY_Q:Fe=h.ATTRIB_VALUE_QUOTED,Ke="attribValue";break;case h.ATTRIB_VALUE_ENTITY_U:Fe=h.ATTRIB_VALUE_UNQUOTED,Ke="attribValue"}_e===";"?(k[Ke]+=we(k),k.entity="",k.state=Fe):M(k.entity.length?t:I,_e)?k.entity+=_e:(Z(k,"Invalid character in entity name"),k[Ke]+="&"+k.entity+_e,k.entity="",k.state=Fe);continue;default:throw new Error(k,"Unknown state: "+k.state)}return k.position>=k.bufferCheckPosition&&T(k),k}_.parser=function(A,k){return new w(A,k)},_.SAXParser=w,_.SAXStream=N,_.createStream=W,_.MAX_BUFFER_LENGTH=65536;var ye=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];_.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],b.default||(Object.create=function(A){function k(){}return k.prototype=A,new k}),i.default||(Object.keys=function(A){var k=[];for(var le in A)A.hasOwnProperty(le)&&k.push(le);return k}),w.prototype={end:function(){he(this)},write:me,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){S(this)}};var ue;try{ue=l("stream").Stream}catch(A){ue=function(){}}var ae=_.EVENTS.filter(function(A){return A!=="error"&&A!=="end"});N.prototype=(0,b.default)(ue.prototype,{constructor:{value:N}}),N.prototype.write=function(A){if(typeof m=="function"&&typeof m.isBuffer=="function"&&m.isBuffer(A)){if(!this._decoder){var k=l("string_decoder").StringDecoder;this._decoder=new k("utf8")}A=this._decoder.write(A)}return this._parser.write(A.toString()),this.emit("data",A),!0},N.prototype.end=function(A){return A&&A.length&&this.write(A),this._parser.end(),!0},N.prototype.on=function(A,k){var le=this;return le._parser["on"+A]||ae.indexOf(A)===-1||(le._parser["on"+A]=function(){var _e=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);_e.splice(0,0,A),le.emit.apply(le,_e)}),ue.prototype.on.call(le,A,k)};var ee="[CDATA[",Ee="DOCTYPE",F="http://www.w3.org/XML/1998/namespace",j="http://www.w3.org/2000/xmlns/",de={xml:F,xmlns:j},be=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Te=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,I=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,t=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,h=0;_.STATE={BEGIN:h++,BEGIN_WHITESPACE:h++,TEXT:h++,TEXT_ENTITY:h++,OPEN_WAKA:h++,SGML_DECL:h++,SGML_DECL_QUOTED:h++,DOCTYPE:h++,DOCTYPE_QUOTED:h++,DOCTYPE_DTD:h++,DOCTYPE_DTD_QUOTED:h++,COMMENT_STARTING:h++,COMMENT:h++,COMMENT_ENDING:h++,COMMENT_ENDED:h++,CDATA:h++,CDATA_ENDING:h++,CDATA_ENDING_2:h++,PROC_INST:h++,PROC_INST_BODY:h++,PROC_INST_ENDING:h++,OPEN_TAG:h++,OPEN_TAG_SLASH:h++,ATTRIB:h++,ATTRIB_NAME:h++,ATTRIB_NAME_SAW_WHITE:h++,ATTRIB_VALUE:h++,ATTRIB_VALUE_QUOTED:h++,ATTRIB_VALUE_CLOSED:h++,ATTRIB_VALUE_UNQUOTED:h++,ATTRIB_VALUE_ENTITY_Q:h++,ATTRIB_VALUE_ENTITY_U:h++,CLOSE_TAG:h++,CLOSE_TAG_SAW_WHITE:h++,SCRIPT:h++,SCRIPT_ENDING:h++},_.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},_.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,i.default)(_.ENTITIES).forEach(function(A){var k=_.ENTITIES[A],le=typeof k=="number"?String.fromCharCode(k):k;_.ENTITIES[A]=le});for(var L in _.STATE)_.STATE[_.STATE[L]]=L;h=_.STATE,o.default||function(){var A=String.fromCharCode,k=Math.floor,le=function(){var _e,Ge,ze=[],Fe=-1,Ke=arguments.length;if(!Ke)return"";for(var ot="";++Fe<Ke;){var Be=Number(arguments[Fe]);if(!isFinite(Be)||Be<0||Be>1114111||k(Be)!==Be)throw RangeError("Invalid code point: "+Be);Be<=65535?ze.push(Be):(Be-=65536,_e=55296+(Be>>10),Ge=Be%1024+56320,ze.push(_e,Ge)),(Fe+1===Ke||ze.length>16384)&&(ot+=A.apply(null,ze),ze.length=0)}return ot};p.default?Object.defineProperty(String,"fromCodePoint",{value:le,configurable:!0,writable:!0}):String.fromCodePoint=le}()}(g===void 0?(void 0).sax={}:g)}).call(this,l("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/create":19,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/object/keys":23,"babel-runtime/core-js/string/from-code-point":26,"babel-runtime/helpers/typeof":32,buffer:38,stream:195,string_decoder:37}],195:[function(l,R,g){function m(){y.call(this)}R.exports=m;var y=l("events").EventEmitter;l("inherits")(m,y),m.Readable=l("readable-stream/readable.js"),m.Writable=l("readable-stream/writable.js"),m.Duplex=l("readable-stream/duplex.js"),m.Transform=l("readable-stream/transform.js"),m.PassThrough=l("readable-stream/passthrough.js"),m.Stream=m,m.prototype.pipe=function(c,o){function u(v){c.writable&&c.write(v)===!1&&d.pause&&d.pause()}function r(){d.readable&&d.resume&&d.resume()}function e(){i||(i=!0,c.end())}function n(){i||(i=!0,typeof c.destroy=="function"&&c.destroy())}function a(v){if(p(),y.listenerCount(this,"error")===0)throw v}function p(){d.removeListener("data",u),c.removeListener("drain",r),d.removeListener("end",e),d.removeListener("close",n),d.removeListener("error",a),c.removeListener("error",a),d.removeListener("end",p),d.removeListener("close",p),c.removeListener("close",p)}var d=this;d.on("data",u),c.on("drain",r),c._isStdio||o&&o.end===!1||(d.on("end",e),d.on("close",n));var i=!1;return d.on("error",a),c.on("error",a),d.on("end",p),d.on("close",p),c.on("close",p),c.emit("pipe",d),c}},{events:158,inherits:162,"readable-stream/duplex.js":178,"readable-stream/passthrough.js":187,"readable-stream/readable.js":188,"readable-stream/transform.js":189,"readable-stream/writable.js":190}],196:[function(l,R,g){(function(m){var y=l("./lib/request"),c=l("./lib/response"),o=l("xtend"),u=l("builtin-status-codes"),r=l("url"),e=g;e.request=function(n,a){n=typeof n=="string"?r.parse(n):o(n);var p=m.location.protocol.search(/^https?:$/)===-1?"http:":"",d=n.protocol||p,i=n.hostname||n.host,v=n.port,b=n.path||"/";i&&i.indexOf(":")!==-1&&(i="["+i+"]"),n.url=(i?d+"//"+i:"")+(v?":"+v:"")+b,n.method=(n.method||"GET").toUpperCase(),n.headers=n.headers||{};var _=new y(n);return a&&_.on("response",a),_},e.get=function(n,a){var p=e.request(n,a);return p.end(),p},e.ClientRequest=y,e.IncomingMessage=c.IncomingMessage,e.Agent=function(){},e.Agent.defaultMaxSockets=4,e.globalAgent=new e.Agent,e.STATUS_CODES=u,e.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof Ne!="undefined"?Ne:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":198,"./lib/response":199,"builtin-status-codes":39,url:203,xtend:236}],197:[function(l,R,g){(function(m){"use strict";function y(){if(u!==void 0)return u;if(m.XMLHttpRequest){u=new m.XMLHttpRequest;try{u.open("GET",m.XDomainRequest?"/":"https://example.com")}catch(n){u=null}}else u=null;return u}function c(n){var a=y();if(!a)return!1;try{return a.responseType=n,a.responseType===n}catch(p){}return!1}function o(n){return typeof n=="function"}g.fetch=o(m.fetch)&&o(m.ReadableStream),g.writableStream=o(m.WritableStream),g.abortController=o(m.AbortController),g.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),g.blobConstructor=!0}catch(n){}var u,r=m.ArrayBuffer!==void 0,e=r&&o(m.ArrayBuffer.prototype.slice);g.arraybuffer=g.fetch||r&&c("arraybuffer"),g.msstream=!g.fetch&&e&&c("ms-stream"),g.mozchunkedarraybuffer=!g.fetch&&r&&c("moz-chunked-arraybuffer"),g.overrideMimeType=g.fetch||!!y()&&o(y().overrideMimeType),g.vbArray=o(m.VBArray),u=null}).call(this,typeof Ne!="undefined"?Ne:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(l,R,g){(function(m,y,c){"use strict";function o(T,C){return n.fetch&&C?"fetch":n.mozchunkedarraybuffer?"moz-chunked-arraybuffer":n.msstream?"ms-stream":n.arraybuffer&&T?"arraybuffer":n.vbArray&&T?"text:vbarray":"text"}function u(T){try{var C=T.status;return C!==null&&C!==0}catch(S){return!1}}var r=l("babel-runtime/core-js/object/keys"),e=function(T){return T&&T.__esModule?T:{default:T}}(r),n=l("./capability"),a=l("inherits"),p=l("./response"),d=l("readable-stream"),i=l("to-arraybuffer"),v=p.IncomingMessage,b=p.readyStates,_=R.exports=function(T){var C=this;d.Writable.call(C),C._opts=T,C._body=[],C._headers={},T.auth&&C.setHeader("Authorization","Basic "+new c(T.auth).toString("base64")),(0,e.default)(T.headers).forEach(function(N){C.setHeader(N,T.headers[N])});var S,W=!0;if(T.mode==="disable-fetch"||"requestTimeout"in T&&!n.abortController)W=!1,S=!0;else if(T.mode==="prefer-streaming")S=!1;else if(T.mode==="allow-wrong-content-type")S=!n.overrideMimeType;else{if(T.mode&&T.mode!=="default"&&T.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");S=!0}C._mode=o(S,W),C._fetchTimer=null,C.on("finish",function(){C._onFinish()})};a(_,d.Writable),_.prototype.setHeader=function(T,C){var S=this,W=T.toLowerCase();w.indexOf(W)===-1&&(S._headers[W]={name:T,value:C})},_.prototype.getHeader=function(T){var C=this._headers[T.toLowerCase()];return C?C.value:null},_.prototype.removeHeader=function(T){delete this._headers[T.toLowerCase()]},_.prototype._onFinish=function(){var T=this;if(!T._destroyed){var C=T._opts,S=T._headers,W=null;C.method!=="GET"&&C.method!=="HEAD"&&(W=n.arraybuffer?i(c.concat(T._body)):n.blobConstructor?new y.Blob(T._body.map(function(M){return i(M)}),{type:(S["content-type"]||{}).value||""}):c.concat(T._body).toString());var N=[];if((0,e.default)(S).forEach(function(M){var G=S[M].name,J=S[M].value;Array.isArray(J)?J.forEach(function(te){N.push([G,te])}):N.push([G,J])}),T._mode==="fetch"){var E=null;if(n.abortController){var K=new AbortController;E=K.signal,T._fetchAbortController=K,"requestTimeout"in C&&C.requestTimeout!==0&&(T._fetchTimer=y.setTimeout(function(){T.emit("requestTimeout"),T._fetchAbortController&&T._fetchAbortController.abort()},C.requestTimeout))}y.fetch(T._opts.url,{method:T._opts.method,headers:N,body:W||void 0,mode:"cors",credentials:C.withCredentials?"include":"same-origin",signal:E}).then(function(M){T._fetchResponse=M,T._connect()},function(M){y.clearTimeout(T._fetchTimer),T._destroyed||T.emit("error",M)})}else{var z=T._xhr=new y.XMLHttpRequest;try{z.open(T._opts.method,T._opts.url,!0)}catch(M){return void m.nextTick(function(){T.emit("error",M)})}"responseType"in z&&(z.responseType=T._mode.split(":")[0]),"withCredentials"in z&&(z.withCredentials=!!C.withCredentials),T._mode==="text"&&"overrideMimeType"in z&&z.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in C&&(z.timeout=C.requestTimeout,z.ontimeout=function(){T.emit("requestTimeout")}),N.forEach(function(M){z.setRequestHeader(M[0],M[1])}),T._response=null,z.onreadystatechange=function(){switch(z.readyState){case b.LOADING:case b.DONE:T._onXHRProgress()}},T._mode==="moz-chunked-arraybuffer"&&(z.onprogress=function(){T._onXHRProgress()}),z.onerror=function(){T._destroyed||T.emit("error",new Error("XHR error"))};try{z.send(W)}catch(M){return void m.nextTick(function(){T.emit("error",M)})}}}},_.prototype._onXHRProgress=function(){var T=this;u(T._xhr)&&!T._destroyed&&(T._response||T._connect(),T._response._onXHRProgress())},_.prototype._connect=function(){var T=this;T._destroyed||(T._response=new v(T._xhr,T._fetchResponse,T._mode,T._fetchTimer),T._response.on("error",function(C){T.emit("error",C)}),T.emit("response",T._response))},_.prototype._write=function(T,C,S){this._body.push(T),S()},_.prototype.abort=_.prototype.destroy=function(){var T=this;T._destroyed=!0,y.clearTimeout(T._fetchTimer),T._response&&(T._response._destroyed=!0),T._xhr?T._xhr.abort():T._fetchAbortController&&T._fetchAbortController.abort()},_.prototype.end=function(T,C,S){var W=this;typeof T=="function"&&(S=T,T=void 0),d.Writable.prototype.end.call(W,T,C,S)},_.prototype.flushHeaders=function(){},_.prototype.setTimeout=function(){},_.prototype.setNoDelay=function(){},_.prototype.setSocketKeepAlive=function(){};var w=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,l("_process"),typeof Ne!="undefined"?Ne:typeof self!="undefined"?self:typeof window!="undefined"?window:{},l("buffer").Buffer)},{"./capability":197,"./response":199,_process:173,"babel-runtime/core-js/object/keys":23,buffer:38,inherits:162,"readable-stream":188,"to-arraybuffer":202}],199:[function(l,R,g){(function(m,y,c){"use strict";var o=l("babel-runtime/core-js/promise"),u=function(d){return d&&d.__esModule?d:{default:d}}(o),r=l("./capability"),e=l("inherits"),n=l("readable-stream"),a=g.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},p=g.IncomingMessage=function(d,i,v,b){var _=this;if(n.Readable.call(_),_._mode=v,_.headers={},_.rawHeaders=[],_.trailers={},_.rawTrailers=[],_.on("end",function(){m.nextTick(function(){_.emit("close")})}),v==="fetch"){if(_._fetchResponse=i,_.url=i.url,_.statusCode=i.status,_.statusMessage=i.statusText,i.headers.forEach(function(W,N){_.headers[N.toLowerCase()]=W,_.rawHeaders.push(N,W)}),r.writableStream){var w=new WritableStream({write:function(W){return new u.default(function(N,E){_._destroyed?E():_.push(new c(W))?N():_._resumeFetch=N})},close:function(){y.clearTimeout(b),_._destroyed||_.push(null)},abort:function(W){_._destroyed||_.emit("error",W)}});try{return void i.body.pipeTo(w).catch(function(W){y.clearTimeout(b),_._destroyed||_.emit("error",W)})}catch(W){}}var T=i.body.getReader();!function W(){T.read().then(function(N){if(!_._destroyed){if(N.done)return y.clearTimeout(b),void _.push(null);_.push(new c(N.value)),W()}}).catch(function(N){y.clearTimeout(b),_._destroyed||_.emit("error",N)})}()}else if(_._xhr=d,_._pos=0,_.url=d.responseURL,_.statusCode=d.status,_.statusMessage=d.statusText,d.getAllResponseHeaders().split(/\r?\n/).forEach(function(W){var N=W.match(/^([^:]+):\s*(.*)/);if(N){var E=N[1].toLowerCase();E==="set-cookie"?(_.headers[E]===void 0&&(_.headers[E]=[]),_.headers[E].push(N[2])):_.headers[E]!==void 0?_.headers[E]+=", "+N[2]:_.headers[E]=N[2],_.rawHeaders.push(N[1],N[2])}}),_._charset="x-user-defined",!r.overrideMimeType){var C=_.rawHeaders["mime-type"];if(C){var S=C.match(/;\s*charset=([^;])(;|$)/);S&&(_._charset=S[1].toLowerCase())}_._charset||(_._charset="utf-8")}};e(p,n.Readable),p.prototype._read=function(){var d=this,i=d._resumeFetch;i&&(d._resumeFetch=null,i())},p.prototype._onXHRProgress=function(){var d=this,i=d._xhr,v=null;switch(d._mode){case"text:vbarray":if(i.readyState!==a.DONE)break;try{v=new y.VBArray(i.responseBody).toArray()}catch(C){}if(v!==null){d.push(new c(v));break}case"text":try{v=i.responseText}catch(C){d._mode="text:vbarray";break}if(v.length>d._pos){var b=v.substr(d._pos);if(d._charset==="x-user-defined"){for(var _=new c(b.length),w=0;w<b.length;w++)_[w]=255&b.charCodeAt(w);d.push(_)}else d.push(b,d._charset);d._pos=v.length}break;case"arraybuffer":if(i.readyState!==a.DONE||!i.response)break;v=i.response,d.push(new c(new Uint8Array(v)));break;case"moz-chunked-arraybuffer":if(v=i.response,i.readyState!==a.LOADING||!v)break;d.push(new c(new Uint8Array(v)));break;case"ms-stream":if(v=i.response,i.readyState!==a.LOADING)break;var T=new y.MSStreamReader;T.onprogress=function(){T.result.byteLength>d._pos&&(d.push(new c(new Uint8Array(T.result.slice(d._pos)))),d._pos=T.result.byteLength)},T.onload=function(){d.push(null)},T.readAsArrayBuffer(v)}d._xhr.readyState===a.DONE&&d._mode!=="ms-stream"&&d.push(null)}}).call(this,l("_process"),typeof Ne!="undefined"?Ne:typeof self!="undefined"?self:typeof window!="undefined"?window:{},l("buffer").Buffer)},{"./capability":197,_process:173,"babel-runtime/core-js/promise":24,buffer:38,inherits:162,"readable-stream":188}],200:[function(l,R,g){"use strict";function m(C){if(!C)return"utf8";for(var S;;)switch(C){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return C;default:if(S)return;C=(""+C).toLowerCase(),S=!0}}function y(C){var S=m(C);if(typeof S!="string"&&(w.isEncoding===T||!T(C)))throw new Error("Unknown encoding: "+C);return S||C}function c(C){this.encoding=y(C);var S;switch(this.encoding){case"utf16le":this.text=p,this.end=d,S=4;break;case"utf8":this.fillLast=e,S=4;break;case"base64":this.text=i,this.end=v,S=3;break;default:return this.write=b,void(this.end=_)}this.lastNeed=0,this.lastTotal=0,this.lastChar=w.allocUnsafe(S)}function o(C){return C<=127?0:C>>5==6?2:C>>4==14?3:C>>3==30?4:C>>6==2?-1:-2}function u(C,S,W){var N=S.length-1;if(N<W)return 0;var E=o(S[N]);return E>=0?(E>0&&(C.lastNeed=E-1),E):--N<W||E===-2?0:(E=o(S[N]))>=0?(E>0&&(C.lastNeed=E-2),E):--N<W||E===-2?0:(E=o(S[N]),E>=0?(E>0&&(E===2?E=0:C.lastNeed=E-3),E):0)}function r(C,S,W){if((192&S[0])!=128)return C.lastNeed=0,"\u951F\uFFFD";if(C.lastNeed>1&&S.length>1){if((192&S[1])!=128)return C.lastNeed=1,"\u951F\uFFFD";if(C.lastNeed>2&&S.length>2&&(192&S[2])!=128)return C.lastNeed=2,"\u951F\uFFFD"}}function e(C){var S=this.lastTotal-this.lastNeed,W=r(this,C,S);return W!==void 0?W:this.lastNeed<=C.length?(C.copy(this.lastChar,S,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(C.copy(this.lastChar,S,0,C.length),void(this.lastNeed-=C.length))}function n(C,S){var W=u(this,C,S);if(!this.lastNeed)return C.toString("utf8",S);this.lastTotal=W;var N=C.length-(W-this.lastNeed);return C.copy(this.lastChar,0,N),C.toString("utf8",S,N)}function a(C){var S=C&&C.length?this.write(C):"";return this.lastNeed?S+"\u951F\uFFFD":S}function p(C,S){if((C.length-S)%2==0){var W=C.toString("utf16le",S);if(W){var N=W.charCodeAt(W.length-1);if(N>=55296&&N<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=C[C.length-2],this.lastChar[1]=C[C.length-1],W.slice(0,-1)}return W}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=C[C.length-1],C.toString("utf16le",S,C.length-1)}function d(C){var S=C&&C.length?this.write(C):"";if(this.lastNeed){var W=this.lastTotal-this.lastNeed;return S+this.lastChar.toString("utf16le",0,W)}return S}function i(C,S){var W=(C.length-S)%3;return W===0?C.toString("base64",S):(this.lastNeed=3-W,this.lastTotal=3,W===1?this.lastChar[0]=C[C.length-1]:(this.lastChar[0]=C[C.length-2],this.lastChar[1]=C[C.length-1]),C.toString("base64",S,C.length-W))}function v(C){var S=C&&C.length?this.write(C):"";return this.lastNeed?S+this.lastChar.toString("base64",0,3-this.lastNeed):S}function b(C){return C.toString(this.encoding)}function _(C){return C&&C.length?this.write(C):""}var w=l("safe-buffer").Buffer,T=w.isEncoding||function(C){switch((C=""+C)&&C.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};g.StringDecoder=c,c.prototype.write=function(C){if(C.length===0)return"";var S,W;if(this.lastNeed){if((S=this.fillLast(C))===void 0)return"";W=this.lastNeed,this.lastNeed=0}else W=0;return W<C.length?S?S+this.text(C,W):this.text(C,W):S||""},c.prototype.end=a,c.prototype.text=n,c.prototype.fillLast=function(C){if(this.lastNeed<=C.length)return C.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);C.copy(this.lastChar,this.lastTotal-this.lastNeed,0,C.length),this.lastNeed-=C.length}},{"safe-buffer":193}],201:[function(l,R,g){(function(m,y){function c(a,p){this._id=a,this._clearFn=p}var o=l("process/browser.js").nextTick,u=Function.prototype.apply,r=Array.prototype.slice,e={},n=0;g.setTimeout=function(){return new c(u.call(setTimeout,window,arguments),clearTimeout)},g.setInterval=function(){return new c(u.call(setInterval,window,arguments),clearInterval)},g.clearTimeout=g.clearInterval=function(a){a.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},g.enroll=function(a,p){clearTimeout(a._idleTimeoutId),a._idleTimeout=p},g.unenroll=function(a){clearTimeout(a._idleTimeoutId),a._idleTimeout=-1},g._unrefActive=g.active=function(a){clearTimeout(a._idleTimeoutId);var p=a._idleTimeout;p>=0&&(a._idleTimeoutId=setTimeout(function(){a._onTimeout&&a._onTimeout()},p))},g.setImmediate=typeof m=="function"?m:function(a){var p=n++,d=!(arguments.length<2)&&r.call(arguments,1);return e[p]=!0,o(function(){e[p]&&(d?a.apply(null,d):a.call(null),g.clearImmediate(p))}),p},g.clearImmediate=typeof y=="function"?y:function(a){delete e[a]}}).call(this,l("timers").setImmediate,l("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(l,R,g){var m=l("buffer").Buffer;R.exports=function(y){if(y instanceof Uint8Array){if(y.byteOffset===0&&y.byteLength===y.buffer.byteLength)return y.buffer;if(typeof y.buffer.slice=="function")return y.buffer.slice(y.byteOffset,y.byteOffset+y.byteLength)}if(m.isBuffer(y)){for(var c=new Uint8Array(y.length),o=y.length,u=0;u<o;u++)c[u]=y[u];return c.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(l,R,g){"use strict";function m(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function y(E,K,z){if(E&&e.isObject(E)&&E instanceof m)return E;var M=new m;return M.parse(E,K,z),M}function c(E){return e.isString(E)&&(E=y(E)),E instanceof m?E.format():m.prototype.format.call(E)}function o(E,K){return y(E,!1,!0).resolve(K)}function u(E,K){return E?y(E,!1,!0).resolveObject(K):K}var r=l("punycode"),e=l("./util");g.parse=y,g.resolve=o,g.resolveObject=u,g.format=c,g.Url=m;var n=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,p=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],i=["{","}","|","\\","^","`"].concat(d),v=["'"].concat(i),b=["%","/","?",";","#"].concat(v),_=["/","?","#"],w=/^[+a-z0-9A-Z_-]{0,63}$/,T=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,C={javascript:!0,"javascript:":!0},S={javascript:!0,"javascript:":!0},W={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},N=l("querystring");m.prototype.parse=function(E,K,z){if(!e.isString(E))throw new TypeError("Parameter 'url' must be a string, not "+typeof E);var M=E.indexOf("?"),G=M!==-1&&M<E.indexOf("#")?"?":"#",J=E.split(G),te=/\\/g;J[0]=J[0].replace(te,"/"),E=J.join(G);var re=E;if(re=re.trim(),!z&&E.split("#").length===1){var se=p.exec(re);if(se)return this.path=re,this.href=re,this.pathname=se[1],se[2]?(this.search=se[2],this.query=K?N.parse(this.search.substr(1)):this.search.substr(1)):K&&(this.search="",this.query={}),this}var H=n.exec(re);if(H){H=H[0];var he=H.toLowerCase();this.protocol=he,re=re.substr(H.length)}if(z||H||re.match(/^\/\/[^@\/]+@[^@\/]+/)){var Z=re.substr(0,2)==="//";!Z||H&&S[H]||(re=re.substr(2),this.slashes=!0)}if(!S[H]&&(Z||H&&!W[H])){for(var $=-1,V=0;V<_.length;V++){var X=re.indexOf(_[V]);X!==-1&&($===-1||X<$)&&($=X)}var Q,oe;oe=$===-1?re.lastIndexOf("@"):re.lastIndexOf("@",$),oe!==-1&&(Q=re.slice(0,oe),re=re.slice(oe+1),this.auth=decodeURIComponent(Q)),$=-1;for(var V=0;V<b.length;V++){var X=re.indexOf(b[V]);X!==-1&&($===-1||X<$)&&($=X)}$===-1&&($=re.length),this.host=re.slice(0,$),re=re.slice($),this.parseHost(),this.hostname=this.hostname||"";var we=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!we)for(var ge=this.hostname.split(/\./),V=0,Ae=ge.length;V<Ae;V++){var me=ge[V];if(me&&!me.match(w)){for(var ye="",ue=0,ae=me.length;ue<ae;ue++)me.charCodeAt(ue)>127?ye+="x":ye+=me[ue];if(!ye.match(w)){var ee=ge.slice(0,V),Ee=ge.slice(V+1),F=me.match(T);F&&(ee.push(F[1]),Ee.unshift(F[2])),Ee.length&&(re="/"+Ee.join(".")+re),this.hostname=ee.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),we||(this.hostname=r.toASCII(this.hostname));var j=this.port?":"+this.port:"",de=this.hostname||"";this.host=de+j,this.href+=this.host,we&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),re[0]!=="/"&&(re="/"+re))}if(!C[he])for(var V=0,Ae=v.length;V<Ae;V++){var be=v[V];if(re.indexOf(be)!==-1){var Te=encodeURIComponent(be);Te===be&&(Te=escape(be)),re=re.split(be).join(Te)}}var I=re.indexOf("#");I!==-1&&(this.hash=re.substr(I),re=re.slice(0,I));var t=re.indexOf("?");if(t!==-1?(this.search=re.substr(t),this.query=re.substr(t+1),K&&(this.query=N.parse(this.query)),re=re.slice(0,t)):K&&(this.search="",this.query={}),re&&(this.pathname=re),W[he]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var j=this.pathname||"",h=this.search||"";this.path=j+h}return this.href=this.format(),this},m.prototype.format=function(){var E=this.auth||"";E&&(E=encodeURIComponent(E),E=E.replace(/%3A/i,":"),E+="@");var K=this.protocol||"",z=this.pathname||"",M=this.hash||"",G=!1,J="";this.host?G=E+this.host:this.hostname&&(G=E+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(G+=":"+this.port)),this.query&&e.isObject(this.query)&&Object.keys(this.query).length&&(J=N.stringify(this.query));var te=this.search||J&&"?"+J||"";return K&&K.substr(-1)!==":"&&(K+=":"),this.slashes||(!K||W[K])&&G!==!1?(G="//"+(G||""),z&&z.charAt(0)!=="/"&&(z="/"+z)):G||(G=""),M&&M.charAt(0)!=="#"&&(M="#"+M),te&&te.charAt(0)!=="?"&&(te="?"+te),z=z.replace(/[?#]/g,function(re){return encodeURIComponent(re)}),te=te.replace("#","%23"),K+G+z+te+M},m.prototype.resolve=function(E){return this.resolveObject(y(E,!1,!0)).format()},m.prototype.resolveObject=function(E){if(e.isString(E)){var K=new m;K.parse(E,!1,!0),E=K}for(var z=new m,M=Object.keys(this),G=0;G<M.length;G++){var J=M[G];z[J]=this[J]}if(z.hash=E.hash,E.href==="")return z.href=z.format(),z;if(E.slashes&&!E.protocol){for(var te=Object.keys(E),re=0;re<te.length;re++){var se=te[re];se!=="protocol"&&(z[se]=E[se])}return W[z.protocol]&&z.hostname&&!z.pathname&&(z.path=z.pathname="/"),z.href=z.format(),z}if(E.protocol&&E.protocol!==z.protocol){if(!W[E.protocol]){for(var H=Object.keys(E),he=0;he<H.length;he++){var Z=H[he];z[Z]=E[Z]}return z.href=z.format(),z}if(z.protocol=E.protocol,E.host||S[E.protocol])z.pathname=E.pathname;else{for(var Ae=(E.pathname||"").split("/");Ae.length&&!(E.host=Ae.shift()););E.host||(E.host=""),E.hostname||(E.hostname=""),Ae[0]!==""&&Ae.unshift(""),Ae.length<2&&Ae.unshift(""),z.pathname=Ae.join("/")}if(z.search=E.search,z.query=E.query,z.host=E.host||"",z.auth=E.auth,z.hostname=E.hostname||E.host,z.port=E.port,z.pathname||z.search){var $=z.pathname||"",V=z.search||"";z.path=$+V}return z.slashes=z.slashes||E.slashes,z.href=z.format(),z}var X=z.pathname&&z.pathname.charAt(0)==="/",Q=E.host||E.pathname&&E.pathname.charAt(0)==="/",oe=Q||X||z.host&&E.pathname,we=oe,ge=z.pathname&&z.pathname.split("/")||[],Ae=E.pathname&&E.pathname.split("/")||[],me=z.protocol&&!W[z.protocol];if(me&&(z.hostname="",z.port=null,z.host&&(ge[0]===""?ge[0]=z.host:ge.unshift(z.host)),z.host="",E.protocol&&(E.hostname=null,E.port=null,E.host&&(Ae[0]===""?Ae[0]=E.host:Ae.unshift(E.host)),E.host=null),oe=oe&&(Ae[0]===""||ge[0]==="")),Q)z.host=E.host||E.host===""?E.host:z.host,z.hostname=E.hostname||E.hostname===""?E.hostname:z.hostname,z.search=E.search,z.query=E.query,ge=Ae;else if(Ae.length)ge||(ge=[]),ge.pop(),ge=ge.concat(Ae),z.search=E.search,z.query=E.query;else if(!e.isNullOrUndefined(E.search)){if(me){z.hostname=z.host=ge.shift();var ye=!!(z.host&&z.host.indexOf("@")>0)&&z.host.split("@");ye&&(z.auth=ye.shift(),z.host=z.hostname=ye.shift())}return z.search=E.search,z.query=E.query,e.isNull(z.pathname)&&e.isNull(z.search)||(z.path=(z.pathname?z.pathname:"")+(z.search?z.search:"")),z.href=z.format(),z}if(!ge.length)return z.pathname=null,z.search?z.path="/"+z.search:z.path=null,z.href=z.format(),z;for(var ue=ge.slice(-1)[0],ae=(z.host||E.host||ge.length>1)&&(ue==="."||ue==="..")||ue==="",ee=0,Ee=ge.length;Ee>=0;Ee--)ue=ge[Ee],ue==="."?ge.splice(Ee,1):ue===".."?(ge.splice(Ee,1),ee++):ee&&(ge.splice(Ee,1),ee--);if(!oe&&!we)for(;ee--;ee)ge.unshift("..");!oe||ge[0]===""||ge[0]&&ge[0].charAt(0)==="/"||ge.unshift(""),ae&&ge.join("/").substr(-1)!=="/"&&ge.push("");var F=ge[0]===""||ge[0]&&ge[0].charAt(0)==="/";if(me){z.hostname=z.host=F?"":ge.length?ge.shift():"";var ye=!!(z.host&&z.host.indexOf("@")>0)&&z.host.split("@");ye&&(z.auth=ye.shift(),z.host=z.hostname=ye.shift())}return oe=oe||z.host&&ge.length,oe&&!F&&ge.unshift(""),ge.length?z.pathname=ge.join("/"):(z.pathname=null,z.path=null),e.isNull(z.pathname)&&e.isNull(z.search)||(z.path=(z.pathname?z.pathname:"")+(z.search?z.search:"")),z.auth=E.auth||z.auth,z.slashes=z.slashes||E.slashes,z.href=z.format(),z},m.prototype.parseHost=function(){var E=this.host,K=a.exec(E);K&&(K=K[0],K!==":"&&(this.port=K.substr(1)),E=E.substr(0,E.length-K.length)),E&&(this.hostname=E)}},{"./util":204,punycode:174,querystring:177}],204:[function(l,R,g){"use strict";R.exports={isString:function(m){return typeof m=="string"},isObject:function(m){return typeof m=="object"&&m!==null},isNull:function(m){return m===null},isNullOrUndefined:function(m){return m==null}}},{}],205:[function(l,R,g){(function(m){function y(o,u){function r(){if(!e){if(c("throwDeprecation"))throw new Error(u);c("traceDeprecation")?console.trace(u):console.warn(u),e=!0}return o.apply(this,arguments)}if(c("noDeprecation"))return o;var e=!1;return r}function c(o){try{if(!m.localStorage)return!1}catch(r){return!1}var u=m.localStorage[o];return u!=null&&String(u).toLowerCase()==="true"}R.exports=y}).call(this,typeof Ne!="undefined"?Ne:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(l,R,g){R.exports=function(m){return m&&typeof m=="object"&&typeof m.copy=="function"&&typeof m.fill=="function"&&typeof m.readUInt8=="function"}},{}],207:[function(l,R,g){(function(m,y){function c(V,X){var Q={seen:[],stylize:u};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),b(X)?Q.showHidden=X:X&&g._extend(Q,X),W(Q.showHidden)&&(Q.showHidden=!1),W(Q.depth)&&(Q.depth=2),W(Q.colors)&&(Q.colors=!1),W(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=o),e(Q,V,Q.depth)}function o(V,X){var Q=c.styles[X];return Q?"["+c.colors[Q][0]+"m"+V+"["+c.colors[Q][1]+"m":V}function u(V,X){return V}function r(V){var X={};return V.forEach(function(Q,oe){X[Q]=!0}),X}function e(V,X,Q){if(V.customInspect&&X&&M(X.inspect)&&X.inspect!==g.inspect&&(!X.constructor||X.constructor.prototype!==X)){var oe=X.inspect(Q,V);return C(oe)||(oe=e(V,oe,Q)),oe}var we=n(V,X);if(we)return we;var ge=Object.keys(X),Ae=r(ge);if(V.showHidden&&(ge=Object.getOwnPropertyNames(X)),z(X)&&(ge.indexOf("message")>=0||ge.indexOf("description")>=0))return a(X);if(ge.length===0){if(M(X)){var me=X.name?": "+X.name:"";return V.stylize("[Function"+me+"]","special")}if(N(X))return V.stylize(RegExp.prototype.toString.call(X),"regexp");if(K(X))return V.stylize(Date.prototype.toString.call(X),"date");if(z(X))return a(X)}var ye="",ue=!1,ae=["{","}"];if((v(X)&&(ue=!0,ae=["[","]"]),M(X))&&(ye=" [Function"+(X.name?": "+X.name:"")+"]"),N(X)&&(ye=" "+RegExp.prototype.toString.call(X)),K(X)&&(ye=" "+Date.prototype.toUTCString.call(X)),z(X)&&(ye=" "+a(X)),ge.length===0&&(!ue||X.length==0))return ae[0]+ye+ae[1];if(Q<0)return N(X)?V.stylize(RegExp.prototype.toString.call(X),"regexp"):V.stylize("[Object]","special");V.seen.push(X);var ee;return ee=ue?p(V,X,Q,Ae,ge):ge.map(function(Ee){return d(V,X,Q,Ae,Ee,ue)}),V.seen.pop(),i(ee,ye,ae)}function n(V,X){if(W(X))return V.stylize("undefined","undefined");if(C(X)){var Q="'"+JSON.stringify(X).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return V.stylize(Q,"string")}return T(X)?V.stylize(""+X,"number"):b(X)?V.stylize(""+X,"boolean"):_(X)?V.stylize("null","null"):void 0}function a(V){return"["+Error.prototype.toString.call(V)+"]"}function p(V,X,Q,oe,we){for(var ge=[],Ae=0,me=X.length;Ae<me;++Ae)se(X,String(Ae))?ge.push(d(V,X,Q,oe,String(Ae),!0)):ge.push("");return we.forEach(function(ye){ye.match(/^\d+$/)||ge.push(d(V,X,Q,oe,ye,!0))}),ge}function d(V,X,Q,oe,we,ge){var Ae,me,ye;if(ye=Object.getOwnPropertyDescriptor(X,we)||{value:X[we]},ye.get?me=ye.set?V.stylize("[Getter/Setter]","special"):V.stylize("[Getter]","special"):ye.set&&(me=V.stylize("[Setter]","special")),se(oe,we)||(Ae="["+we+"]"),me||(V.seen.indexOf(ye.value)<0?(me=_(Q)?e(V,ye.value,null):e(V,ye.value,Q-1),me.indexOf(`
|
|
|
`)>-1&&(me=ge?me.split(`
|
|
|
`).map(function(ue){return" "+ue}).join(`
|
|
|
`).substr(2):`
|
|
|
`+me.split(`
|
|
|
`).map(function(ue){return" "+ue}).join(`
|
|
|
`))):me=V.stylize("[Circular]","special")),W(Ae)){if(ge&&we.match(/^\d+$/))return me;Ae=JSON.stringify(""+we),Ae.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Ae=Ae.substr(1,Ae.length-2),Ae=V.stylize(Ae,"name")):(Ae=Ae.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Ae=V.stylize(Ae,"string"))}return Ae+": "+me}function i(V,X,Q){var oe=0;return V.reduce(function(we,ge){return oe++,ge.indexOf(`
|
|
|
`)>=0&&oe++,we+ge.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?Q[0]+(X===""?"":X+`
|
|
|
`)+" "+V.join(`,
|
|
|
`)+" "+Q[1]:Q[0]+X+" "+V.join(", ")+" "+Q[1]}function v(V){return Array.isArray(V)}function b(V){return typeof V=="boolean"}function _(V){return V===null}function w(V){return V==null}function T(V){return typeof V=="number"}function C(V){return typeof V=="string"}function S(V){return typeof V=="symbol"}function W(V){return V===void 0}function N(V){return E(V)&&J(V)==="[object RegExp]"}function E(V){return typeof V=="object"&&V!==null}function K(V){return E(V)&&J(V)==="[object Date]"}function z(V){return E(V)&&(J(V)==="[object Error]"||V instanceof Error)}function M(V){return typeof V=="function"}function G(V){return V===null||typeof V=="boolean"||typeof V=="number"||typeof V=="string"||typeof V=="symbol"||V===void 0}function J(V){return Object.prototype.toString.call(V)}function te(V){return V<10?"0"+V.toString(10):V.toString(10)}function re(){var V=new Date,X=[te(V.getHours()),te(V.getMinutes()),te(V.getSeconds())].join(":");return[V.getDate(),$[V.getMonth()],X].join(" ")}function se(V,X){return Object.prototype.hasOwnProperty.call(V,X)}var H=/%[sdj%]/g;g.format=function(V){if(!C(V)){for(var X=[],Q=0;Q<arguments.length;Q++)X.push(c(arguments[Q]));return X.join(" ")}for(var Q=1,oe=arguments,we=oe.length,ge=String(V).replace(H,function(ye){if(ye==="%%")return"%";if(Q>=we)return ye;switch(ye){case"%s":return String(oe[Q++]);case"%d":return Number(oe[Q++]);case"%j":try{return JSON.stringify(oe[Q++])}catch(ue){return"[Circular]"}default:return ye}}),Ae=oe[Q];Q<we;Ae=oe[++Q])_(Ae)||!E(Ae)?ge+=" "+Ae:ge+=" "+c(Ae);return ge},g.deprecate=function(V,X){function Q(){if(!oe){if(m.throwDeprecation)throw new Error(X);m.traceDeprecation?console.trace(X):console.error(X),oe=!0}return V.apply(this,arguments)}if(W(y.process))return function(){return g.deprecate(V,X).apply(this,arguments)};if(m.noDeprecation===!0)return V;var oe=!1;return Q};var he,Z={};g.debuglog=function(V){if(W(he)&&(he=m.env.NODE_DEBUG||""),V=V.toUpperCase(),!Z[V])if(new RegExp("\\b"+V+"\\b","i").test(he)){var X=m.pid;Z[V]=function(){var Q=g.format.apply(g,arguments);console.error("%s %d: %s",V,X,Q)}}else Z[V]=function(){};return Z[V]},g.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},g.isArray=v,g.isBoolean=b,g.isNull=_,g.isNullOrUndefined=w,g.isNumber=T,g.isString=C,g.isSymbol=S,g.isUndefined=W,g.isRegExp=N,g.isObject=E,g.isDate=K,g.isError=z,g.isFunction=M,g.isPrimitive=G,g.isBuffer=l("./support/isBuffer");var $=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];g.log=function(){console.log("%s - %s",re(),g.format.apply(g,arguments))},g.inherits=l("inherits"),g._extend=function(V,X){if(!X||!E(X))return V;for(var Q=Object.keys(X),oe=Q.length;oe--;)V[Q[oe]]=X[Q[oe]];return V}}).call(this,l("_process"),typeof Ne!="undefined"?Ne:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":206,_process:173,inherits:162}],208:[function(l,R,g){"use strict";(function(){g.stripBOM=function(m){return m[0]==="\uFEFF"?m.substring(1):m}}).call(void 0)},{}],209:[function(l,R,g){"use strict";function m(r){return r&&r.__esModule?r:{default:r}}var y=l("babel-runtime/helpers/typeof"),c=m(y),o=l("babel-runtime/core-js/object/keys"),u=m(o);(function(){var r,e,n,a,p,d={}.hasOwnProperty;r=l("xmlbuilder"),e=l("./defaults").defaults,a=function(i){return typeof i=="string"&&(i.indexOf("&")>=0||i.indexOf(">")>=0||i.indexOf("<")>=0)},p=function(i){return"<![CDATA["+n(i)+"]]>"},n=function(i){return i.replace("]]>","]]]]><![CDATA[>")},g.Builder=function(){function i(v){var b,_,w;this.options={},_=e[.2];for(b in _)d.call(_,b)&&(w=_[b],this.options[b]=w);for(b in v)d.call(v,b)&&(w=v[b],this.options[b]=w)}return i.prototype.buildObject=function(v){var b,_,w,T,C;return b=this.options.attrkey,_=this.options.charkey,(0,u.default)(v).length===1&&this.options.rootName===e[.2].rootName?(C=(0,u.default)(v)[0],v=v[C]):C=this.options.rootName,w=function(S){return function(W,N){var E,K,z,M,G,J;if((N===void 0?"undefined":(0,c.default)(N))!=="object")S.options.cdata&&a(N)?W.raw(p(N)):W.txt(N);else if(Array.isArray(N)){for(M in N)if(d.call(N,M)){K=N[M];for(G in K)z=K[G],W=w(W.ele(G),z).up()}}else for(G in N)if(d.call(N,G))if(K=N[G],G===b){if((K===void 0?"undefined":(0,c.default)(K))==="object")for(E in K)J=K[E],W=W.att(E,J)}else if(G===_)W=S.options.cdata&&a(K)?W.raw(p(K)):W.txt(K);else if(Array.isArray(K))for(M in K)d.call(K,M)&&(z=K[M],W=typeof z=="string"?S.options.cdata&&a(z)?W.ele(G).raw(p(z)).up():W.ele(G,z).up():w(W.ele(G),z).up());else(K===void 0?"undefined":(0,c.default)(K))==="object"?W=w(W.ele(G),K).up():typeof K=="string"&&S.options.cdata&&a(K)?W=W.ele(G).raw(p(K)).up():(K==null&&(K=""),W=W.ele(G,K.toString()).up());return W}}(this),T=r.create(C,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),w(T,v).end(this.options.renderOpts)},i}()}).call(void 0)},{"./defaults":210,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,xmlbuilder:235}],210:[function(l,R,g){"use strict";(function(){g.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
|
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],211:[function(l,R,g){"use strict";function m(n){return n&&n.__esModule?n:{default:n}}var y=l("babel-runtime/core-js/object/get-own-property-names"),c=m(y),o=l("babel-runtime/core-js/object/keys"),u=m(o),r=l("babel-runtime/helpers/typeof"),e=m(r);(function(){var n,a,p,d,i,v,b,_,w=function(S,W){return function(){return S.apply(W,arguments)}},T=function(S,W){function N(){this.constructor=S}for(var E in W)C.call(W,E)&&(S[E]=W[E]);return N.prototype=W.prototype,S.prototype=new N,S.__super__=W.prototype,S},C={}.hasOwnProperty;b=l("sax"),p=l("events"),n=l("./bom"),v=l("./processors"),_=l("timers").setImmediate,a=l("./defaults").defaults,d=function(S){return(S===void 0?"undefined":(0,e.default)(S))==="object"&&S!=null&&(0,u.default)(S).length===0},i=function(S,W,N){var E,K,z;for(E=0,K=S.length;E<K;E++)z=S[E],W=z(W,N);return W},g.Parser=function(S){function W(N){this.parseString=w(this.parseString,this),this.reset=w(this.reset,this),this.assignOrPush=w(this.assignOrPush,this),this.processAsync=w(this.processAsync,this);var E,K,z;if(!(this instanceof g.Parser))return new g.Parser(N);this.options={},K=a[.2];for(E in K)C.call(K,E)&&(z=K[E],this.options[E]=z);for(E in N)C.call(N,E)&&(z=N[E],this.options[E]=z);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(v.normalize)),this.reset()}return T(W,S),W.prototype.processAsync=function(){var N,E;try{return this.remaining.length<=this.options.chunkSize?(N=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(N),this.saxParser.close()):(N=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(N),_(this.processAsync))}catch(K){if(E=K,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(E)}},W.prototype.assignOrPush=function(N,E,K){return E in N?(N[E]instanceof Array||(N[E]=[N[E]]),N[E].push(K)):this.options.explicitArray?N[E]=[K]:N[E]=K},W.prototype.reset=function(){var N,E,K,z;return this.removeAllListeners(),this.saxParser=b.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(M){return function(G){if(M.saxParser.resume(),!M.saxParser.errThrown)return M.saxParser.errThrown=!0,M.emit("error",G)}}(this),this.saxParser.onend=function(M){return function(){if(!M.saxParser.ended)return M.saxParser.ended=!0,M.emit("end",M.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,z=[],N=this.options.attrkey,E=this.options.charkey,this.saxParser.onopentag=function(M){return function(G){var J,te,re,se,H;if(re={},re[E]="",!M.options.ignoreAttrs){H=G.attributes;for(J in H)C.call(H,J)&&(N in re||M.options.mergeAttrs||(re[N]={}),te=M.options.attrValueProcessors?i(M.options.attrValueProcessors,G.attributes[J],J):G.attributes[J],se=M.options.attrNameProcessors?i(M.options.attrNameProcessors,J):J,M.options.mergeAttrs?M.assignOrPush(re,se,te):re[N][se]=te)}return re["#name"]=M.options.tagNameProcessors?i(M.options.tagNameProcessors,G.name):G.name,M.options.xmlns&&(re[M.options.xmlnskey]={uri:G.uri,local:G.local}),z.push(re)}}(this),this.saxParser.onclosetag=function(M){return function(){var G,J,te,re,se,H,he,Z,$,V;if(H=z.pop(),se=H["#name"],M.options.explicitChildren&&M.options.preserveChildrenOrder||delete H["#name"],H.cdata===!0&&(G=H.cdata,delete H.cdata),$=z[z.length-1],H[E].match(/^\s*$/)&&!G?(J=H[E],delete H[E]):(M.options.trim&&(H[E]=H[E].trim()),M.options.normalize&&(H[E]=H[E].replace(/\s{2,}/g," ").trim()),H[E]=M.options.valueProcessors?i(M.options.valueProcessors,H[E],se):H[E],(0,u.default)(H).length===1&&E in H&&!M.EXPLICIT_CHARKEY&&(H=H[E])),d(H)&&(H=M.options.emptyTag!==""?M.options.emptyTag:J),M.options.validator!=null&&(V="/"+function(){var X,Q,oe;for(oe=[],X=0,Q=z.length;X<Q;X++)re=z[X],oe.push(re["#name"]);return oe}().concat(se).join("/"),function(){var X;try{H=M.options.validator(V,$&&$[se],H)}catch(Q){return X=Q,M.emit("error",X)}}()),M.options.explicitChildren&&!M.options.mergeAttrs&&(H===void 0?"undefined":(0,e.default)(H))==="object")if(M.options.preserveChildrenOrder){if($){$[M.options.childkey]=$[M.options.childkey]||[],he={};for(te in H)C.call(H,te)&&(he[te]=H[te]);$[M.options.childkey].push(he),delete H["#name"],(0,u.default)(H).length===1&&E in H&&!M.EXPLICIT_CHARKEY&&(H=H[E])}}else re={},M.options.attrkey in H&&(re[M.options.attrkey]=H[M.options.attrkey],delete H[M.options.attrkey]),!M.options.charsAsChildren&&M.options.charkey in H&&(re[M.options.charkey]=H[M.options.charkey],delete H[M.options.charkey]),(0,c.default)(H).length>0&&(re[M.options.childkey]=H),H=re;return z.length>0?M.assignOrPush($,se,H):(M.options.explicitRoot&&(Z=H,H={},H[se]=Z),M.resultObject=H,M.saxParser.ended=!0,M.emit("end",M.resultObject))}}(this),K=function(M){return function(G){var J,te;if(te=z[z.length-1])return te[E]+=G,M.options.explicitChildren&&M.options.preserveChildrenOrder&&M.options.charsAsChildren&&(M.options.includeWhiteChars||G.replace(/\\n/g,"").trim()!=="")&&(te[M.options.childkey]=te[M.options.childkey]||[],J={"#name":"__text__"},J[E]=G,M.options.normalize&&(J[E]=J[E].replace(/\s{2,}/g," ").trim()),te[M.options.childkey].push(J)),te}}(this),this.saxParser.ontext=K,this.saxParser.oncdata=function(M){return function(G){var J;if(J=K(G))return J.cdata=!0}}()},W.prototype.parseString=function(N,E){var K;E!=null&&typeof E=="function"&&(this.on("end",function(z){return this.reset(),E(null,z)}),this.on("error",function(z){return this.reset(),E(z)}));try{return N=N.toString(),N.trim()===""?(this.emit("end",null),!0):(N=n.stripBOM(N),this.options.async?(this.remaining=N,_(this.processAsync),this.saxParser):this.saxParser.write(N).close())}catch(z){if(K=z,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",K),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw K}},W}(p.EventEmitter),g.parseString=function(S,W,N){var E,K,z;return N!=null?(typeof N=="function"&&(E=N),(W===void 0?"undefined":(0,e.default)(W))==="object"&&(K=W)):(typeof W=="function"&&(E=W),K={}),z=new g.Parser(K),z.parseString(S,E)}}).call(void 0)},{"./bom":208,"./defaults":210,"./processors":212,"babel-runtime/core-js/object/get-own-property-names":21,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,events:158,sax:194,timers:201}],212:[function(l,R,g){"use strict";(function(){var m;m=new RegExp(/(?!xmlns)^.*:/),g.normalize=function(y){return y.toLowerCase()},g.firstCharLowerCase=function(y){return y.charAt(0).toLowerCase()+y.slice(1)},g.stripPrefix=function(y){return y.replace(m,"")},g.parseNumbers=function(y){return isNaN(y)||(y=y%1==0?parseInt(y,10):parseFloat(y)),y},g.parseBooleans=function(y){return/^(?:true|false)$/i.test(y)&&(y=y.toLowerCase()==="true"),y}}).call(void 0)},{}],213:[function(l,R,g){"use strict";(function(){var m,y,c,o,u=function(e,n){function a(){this.constructor=e}for(var p in n)r.call(n,p)&&(e[p]=n[p]);return a.prototype=n.prototype,e.prototype=new a,e.__super__=n.prototype,e},r={}.hasOwnProperty;y=l("./defaults"),m=l("./builder"),c=l("./parser"),o=l("./processors"),g.defaults=y.defaults,g.processors=o,g.ValidationError=function(e){function n(a){this.message=a}return u(n,e),n}(Error),g.Builder=m.Builder,g.Parser=c.Parser,g.parseString=c.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(l,R,g){"use strict";function m(n){return n&&n.__esModule?n:{default:n}}var y=l("babel-runtime/core-js/object/get-prototype-of"),c=m(y),o=l("babel-runtime/helpers/typeof"),u=m(o),r=l("babel-runtime/core-js/object/assign"),e=m(r);(function(){var n,a,p,d,i,v,b=[].slice,_={}.hasOwnProperty;n=function(){var w,T,C,S,W,N;if(N=arguments[0],W=2<=arguments.length?b.call(arguments,1):[],d(e.default))e.default.apply(null,arguments);else for(w=0,C=W.length;w<C;w++)if((S=W[w])!=null)for(T in S)_.call(S,T)&&(N[T]=S[T]);return N},d=function(w){return!!w&&Object.prototype.toString.call(w)==="[object Function]"},i=function(w){var T;return!!w&&((T=w===void 0?"undefined":(0,u.default)(w))==="function"||T==="object")},a=function(w){return d(Array.isArray)?Array.isArray(w):Object.prototype.toString.call(w)==="[object Array]"},p=function(w){var T;if(a(w))return!w.length;for(T in w)if(_.call(w,T))return!1;return!0},v=function(w){var T,C;return i(w)&&(C=(0,c.default)(w))&&(T=C.constructor)&&typeof T=="function"&&T instanceof T&&Function.prototype.toString.call(T)===Function.prototype.toString.call(Object)},R.exports.assign=n,R.exports.isFunction=d,R.exports.isObject=i,R.exports.isArray=a,R.exports.isEmpty=p,R.exports.isPlainObject=v}).call(void 0)},{"babel-runtime/core-js/object/assign":18,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/helpers/typeof":32}],215:[function(l,R,g){"use strict";var m=l("babel-runtime/core-js/object/create"),y=function(c){return c&&c.__esModule?c:{default:c}}(m);(function(){R.exports=function(){function c(o,u,r){if(this.options=o.options,this.stringify=o.stringify,u==null)throw new Error("Missing attribute name of element "+o.name);if(r==null)throw new Error("Missing attribute value for attribute "+u+" of element "+o.name);this.name=this.stringify.attName(u),this.value=this.stringify.attValue(r)}return c.prototype.clone=function(){return(0,y.default)(this)},c.prototype.toString=function(o){return this.options.writer.set(o).attribute(this)},c}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(l,R,g){"use strict";var m=l("babel-runtime/core-js/object/create"),y=function(c){return c&&c.__esModule?c:{default:c}}(m);(function(){var c,o=function(r,e){function n(){this.constructor=r}for(var a in e)u.call(e,a)&&(r[a]=e[a]);return n.prototype=e.prototype,r.prototype=new n,r.__super__=e.prototype,r},u={}.hasOwnProperty;c=l("./XMLNode"),R.exports=function(r){function e(n,a){if(e.__super__.constructor.call(this,n),a==null)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(a)}return o(e,r),e.prototype.clone=function(){return(0,y.default)(this)},e.prototype.toString=function(n){return this.options.writer.set(n).cdata(this)},e}(c)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(l,R,g){"use strict";var m=l("babel-runtime/core-js/object/create"),y=function(c){return c&&c.__esModule?c:{default:c}}(m);(function(){var c,o=function(r,e){function n(){this.constructor=r}for(var a in e)u.call(e,a)&&(r[a]=e[a]);return n.prototype=e.prototype,r.prototype=new n,r.__super__=e.prototype,r},u={}.hasOwnProperty;c=l("./XMLNode"),R.exports=function(r){function e(n,a){if(e.__super__.constructor.call(this,n),a==null)throw new Error("Missing comment text");this.text=this.stringify.comment(a)}return o(e,r),e.prototype.clone=function(){return(0,y.default)(this)},e.prototype.toString=function(n){return this.options.writer.set(n).comment(this)},e}(c)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(l,R,g){"use strict";(function(){var m,y=function(o,u){function r(){this.constructor=o}for(var e in u)c.call(u,e)&&(o[e]=u[e]);return r.prototype=u.prototype,o.prototype=new r,o.__super__=u.prototype,o},c={}.hasOwnProperty;m=l("./XMLNode"),R.exports=function(o){function u(r,e,n,a,p,d){if(u.__super__.constructor.call(this,r),e==null)throw new Error("Missing DTD element name");if(n==null)throw new Error("Missing DTD attribute name");if(!a)throw new Error("Missing DTD attribute type");if(!p)throw new Error("Missing DTD attribute default");if(p.indexOf("#")!==0&&(p="#"+p),!p.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(d&&!p.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(e),this.attributeName=this.stringify.attName(n),this.attributeType=this.stringify.dtdAttType(a),this.defaultValue=this.stringify.dtdAttDefault(d),this.defaultValueType=p}return y(u,o),u.prototype.toString=function(r){return this.options.writer.set(r).dtdAttList(this)},u}(m)}).call(void 0)},{"./XMLNode":227}],219:[function(l,R,g){"use strict";(function(){var m,y=function(o,u){function r(){this.constructor=o}for(var e in u)c.call(u,e)&&(o[e]=u[e]);return r.prototype=u.prototype,o.prototype=new r,o.__super__=u.prototype,o},c={}.hasOwnProperty;m=l("./XMLNode"),R.exports=function(o){function u(r,e,n){if(u.__super__.constructor.call(this,r),e==null)throw new Error("Missing DTD element name");n||(n="(#PCDATA)"),Array.isArray(n)&&(n="("+n.join(",")+")"),this.name=this.stringify.eleName(e),this.value=this.stringify.dtdElementValue(n)}return y(u,o),u.prototype.toString=function(r){return this.options.writer.set(r).dtdElement(this)},u}(m)}).call(void 0)},{"./XMLNode":227}],220:[function(l,R,g){"use strict";(function(){var m,y,c=function(u,r){function e(){this.constructor=u}for(var n in r)o.call(r,n)&&(u[n]=r[n]);return e.prototype=r.prototype,u.prototype=new e,u.__super__=r.prototype,u},o={}.hasOwnProperty;y=l("./Utility").isObject,m=l("./XMLNode"),R.exports=function(u){function r(e,n,a,p){if(r.__super__.constructor.call(this,e),a==null)throw new Error("Missing entity name");if(p==null)throw new Error("Missing entity value");if(this.pe=!!n,this.name=this.stringify.eleName(a),y(p)){if(!p.pubID&&!p.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(p.pubID&&!p.sysID)throw new Error("System identifier is required for a public external entity");if(p.pubID!=null&&(this.pubID=this.stringify.dtdPubID(p.pubID)),p.sysID!=null&&(this.sysID=this.stringify.dtdSysID(p.sysID)),p.nData!=null&&(this.nData=this.stringify.dtdNData(p.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(p)}return c(r,u),r.prototype.toString=function(e){return this.options.writer.set(e).dtdEntity(this)},r}(m)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(l,R,g){"use strict";(function(){var m,y=function(o,u){function r(){this.constructor=o}for(var e in u)c.call(u,e)&&(o[e]=u[e]);return r.prototype=u.prototype,o.prototype=new r,o.__super__=u.prototype,o},c={}.hasOwnProperty;m=l("./XMLNode"),R.exports=function(o){function u(r,e,n){if(u.__super__.constructor.call(this,r),e==null)throw new Error("Missing notation name");if(!n.pubID&&!n.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(e),n.pubID!=null&&(this.pubID=this.stringify.dtdPubID(n.pubID)),n.sysID!=null&&(this.sysID=this.stringify.dtdSysID(n.sysID))}return y(u,o),u.prototype.toString=function(r){return this.options.writer.set(r).dtdNotation(this)},u}(m)}).call(void 0)},{"./XMLNode":227}],222:[function(l,R,g){"use strict";(function(){var m,y,c=function(u,r){function e(){this.constructor=u}for(var n in r)o.call(r,n)&&(u[n]=r[n]);return e.prototype=r.prototype,u.prototype=new e,u.__super__=r.prototype,u},o={}.hasOwnProperty;y=l("./Utility").isObject,m=l("./XMLNode"),R.exports=function(u){function r(e,n,a,p){var d;r.__super__.constructor.call(this,e),y(n)&&(d=n,n=d.version,a=d.encoding,p=d.standalone),n||(n="1.0"),this.version=this.stringify.xmlVersion(n),a!=null&&(this.encoding=this.stringify.xmlEncoding(a)),p!=null&&(this.standalone=this.stringify.xmlStandalone(p))}return c(r,u),r.prototype.toString=function(e){return this.options.writer.set(e).declaration(this)},r}(m)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(l,R,g){"use strict";(function(){var m,y,c,o,u,r,e=function(a,p){function d(){this.constructor=a}for(var i in p)n.call(p,i)&&(a[i]=p[i]);return d.prototype=p.prototype,a.prototype=new d,a.__super__=p.prototype,a},n={}.hasOwnProperty;r=l("./Utility").isObject,u=l("./XMLNode"),m=l("./XMLDTDAttList"),c=l("./XMLDTDEntity"),y=l("./XMLDTDElement"),o=l("./XMLDTDNotation"),R.exports=function(a){function p(d,i,v){var b,_;p.__super__.constructor.call(this,d),this.documentObject=d,r(i)&&(b=i,i=b.pubID,v=b.sysID),v==null&&(_=[i,v],v=_[0],i=_[1]),i!=null&&(this.pubID=this.stringify.dtdPubID(i)),v!=null&&(this.sysID=this.stringify.dtdSysID(v))}return e(p,a),p.prototype.element=function(d,i){var v;return v=new y(this,d,i),this.children.push(v),this},p.prototype.attList=function(d,i,v,b,_){var w;return w=new m(this,d,i,v,b,_),this.children.push(w),this},p.prototype.entity=function(d,i){var v;return v=new c(this,!1,d,i),this.children.push(v),this},p.prototype.pEntity=function(d,i){var v;return v=new c(this,!0,d,i),this.children.push(v),this},p.prototype.notation=function(d,i){var v;return v=new o(this,d,i),this.children.push(v),this},p.prototype.toString=function(d){return this.options.writer.set(d).docType(this)},p.prototype.ele=function(d,i){return this.element(d,i)},p.prototype.att=function(d,i,v,b,_){return this.attList(d,i,v,b,_)},p.prototype.ent=function(d,i){return this.entity(d,i)},p.prototype.pent=function(d,i){return this.pEntity(d,i)},p.prototype.not=function(d,i){return this.notation(d,i)},p.prototype.up=function(){return this.root()||this.documentObject},p}(u)}).call(void 0)},{"./Utility":214,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLNode":227}],224:[function(l,R,g){"use strict";(function(){var m,y,c,o,u=function(e,n){function a(){this.constructor=e}for(var p in n)r.call(n,p)&&(e[p]=n[p]);return a.prototype=n.prototype,e.prototype=new a,e.__super__=n.prototype,e},r={}.hasOwnProperty;o=l("./Utility").isPlainObject,m=l("./XMLNode"),c=l("./XMLStringifier"),y=l("./XMLStringWriter"),R.exports=function(e){function n(a){n.__super__.constructor.call(this,null),a||(a={}),a.writer||(a.writer=new y),this.options=a,this.stringify=new c(a),this.isDocument=!0}return u(n,e),n.prototype.end=function(a){var p;return a?o(a)&&(p=a,a=this.options.writer.set(p)):a=this.options.writer,a.document(this)},n.prototype.toString=function(a){return this.options.writer.set(a).document(this)},n}(m)}).call(void 0)},{"./Utility":214,"./XMLNode":227,"./XMLStringWriter":231,"./XMLStringifier":232}],225:[function(l,R,g){"use strict";(function(){var m,y,c,o,u,r,e,n,a,p,d,i,v,b,_,w,T,C,S,W={}.hasOwnProperty;S=l("./Utility"),T=S.isObject,w=S.isFunction,C=S.isPlainObject,p=l("./XMLElement"),y=l("./XMLCData"),c=l("./XMLComment"),i=l("./XMLRaw"),_=l("./XMLText"),d=l("./XMLProcessingInstruction"),n=l("./XMLDeclaration"),a=l("./XMLDocType"),o=l("./XMLDTDAttList"),r=l("./XMLDTDEntity"),u=l("./XMLDTDElement"),e=l("./XMLDTDNotation"),m=l("./XMLAttribute"),b=l("./XMLStringifier"),v=l("./XMLStringWriter"),R.exports=function(){function N(E,K,z){var M;E||(E={}),E.writer?C(E.writer)&&(M=E.writer,E.writer=new v(M)):E.writer=new v(E),this.options=E,this.writer=E.writer,this.stringify=new b(E),this.onDataCallback=K||function(){},this.onEndCallback=z||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return N.prototype.node=function(E,K,z){var M;if(E==null)throw new Error("Missing node name");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node");return this.openCurrent(),E=E.valueOf(),K==null&&(K={}),K=K.valueOf(),T(K)||(M=[K,z],z=M[0],K=M[1]),this.currentNode=new p(this,E,K),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,z!=null&&this.text(z),this},N.prototype.element=function(E,K,z){return this.currentNode&&this.currentNode instanceof a?this.dtdElement.apply(this,arguments):this.node(E,K,z)},N.prototype.attribute=function(E,K){var z,M;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(E!=null&&(E=E.valueOf()),T(E))for(z in E)W.call(E,z)&&(M=E[z],this.attribute(z,M));else w(K)&&(K=K.apply()),this.options.skipNullAttributes&&K==null||(this.currentNode.attributes[E]=new m(this,E,K));return this},N.prototype.text=function(E){var K;return this.openCurrent(),K=new _(this,E),this.onData(this.writer.text(K,this.currentLevel+1)),this},N.prototype.cdata=function(E){var K;return this.openCurrent(),K=new y(this,E),this.onData(this.writer.cdata(K,this.currentLevel+1)),this},N.prototype.comment=function(E){var K;return this.openCurrent(),K=new c(this,E),this.onData(this.writer.comment(K,this.currentLevel+1)),this},N.prototype.raw=function(E){var K;return this.openCurrent(),K=new i(this,E),this.onData(this.writer.raw(K,this.currentLevel+1)),this},N.prototype.instruction=function(E,K){var z,M,G,J,te;if(this.openCurrent(),E!=null&&(E=E.valueOf()),K!=null&&(K=K.valueOf()),Array.isArray(E))for(z=0,J=E.length;z<J;z++)M=E[z],this.instruction(M);else if(T(E))for(M in E)W.call(E,M)&&(G=E[M],this.instruction(M,G));else w(K)&&(K=K.apply()),te=new d(this,E,K),this.onData(this.writer.processingInstruction(te,this.currentLevel+1));return this},N.prototype.declaration=function(E,K,z){var M;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return M=new n(this,E,K,z),this.onData(this.writer.declaration(M,this.currentLevel+1)),this},N.prototype.doctype=function(E,K,z){if(this.openCurrent(),E==null)throw new Error("Missing root node name");if(this.root)throw new Error("dtd() must come before the root node");return this.currentNode=new a(this,K,z),this.currentNode.rootNodeName=E,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},N.prototype.dtdElement=function(E,K){var z;return this.openCurrent(),z=new u(this,E,K),this.onData(this.writer.dtdElement(z,this.currentLevel+1)),this},N.prototype.attList=function(E,K,z,M,G){var J;return this.openCurrent(),J=new o(this,E,K,z,M,G),this.onData(this.writer.dtdAttList(J,this.currentLevel+1)),this},N.prototype.entity=function(E,K){var z;return this.openCurrent(),z=new r(this,!1,E,K),this.onData(this.writer.dtdEntity(z,this.currentLevel+1)),this},N.prototype.pEntity=function(E,K){var z;return this.openCurrent(),z=new r(this,!0,E,K),this.onData(this.writer.dtdEntity(z,this.currentLevel+1)),this},N.prototype.notation=function(E,K){var z;return this.openCurrent(),z=new e(this,E,K),this.onData(this.writer.dtdNotation(z,this.currentLevel+1)),this},N.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},N.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},N.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},N.prototype.openNode=function(E){if(!E.isOpen)return!this.root&&this.currentLevel===0&&E instanceof p&&(this.root=E),this.onData(this.writer.openNode(E,this.currentLevel)),E.isOpen=!0},N.prototype.closeNode=function(E){if(!E.isClosed)return this.onData(this.writer.closeNode(E,this.currentLevel)),E.isClosed=!0},N.prototype.onData=function(E){return this.documentStarted=!0,this.onDataCallback(E)},N.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},N.prototype.ele=function(){return this.element.apply(this,arguments)},N.prototype.nod=function(E,K,z){return this.node(E,K,z)},N.prototype.txt=function(E){return this.text(E)},N.prototype.dat=function(E){return this.cdata(E)},N.prototype.com=function(E){return this.comment(E)},N.prototype.ins=function(E,K){return this.instruction(E,K)},N.prototype.dec=function(E,K,z){return this.declaration(E,K,z)},N.prototype.dtd=function(E,K,z){return this.doctype(E,K,z)},N.prototype.e=function(E,K,z){return this.element(E,K,z)},N.prototype.n=function(E,K,z){return this.node(E,K,z)},N.prototype.t=function(E){return this.text(E)},N.prototype.d=function(E){return this.cdata(E)},N.prototype.c=function(E){return this.comment(E)},N.prototype.r=function(E){return this.raw(E)},N.prototype.i=function(E,K){return this.instruction(E,K)},N.prototype.att=function(){return this.currentNode&&this.currentNode instanceof a?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},N.prototype.a=function(){return this.currentNode&&this.currentNode instanceof a?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},N.prototype.ent=function(E,K){return this.entity(E,K)},N.prototype.pent=function(E,K){return this.pEntity(E,K)},N.prototype.not=function(E,K){return this.notation(E,K)},N}()}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLStringWriter":231,"./XMLStringifier":232,"./XMLText":233}],226:[function(l,R,g){"use strict";var m=l("babel-runtime/core-js/object/create"),y=function(c){return c&&c.__esModule?c:{default:c}}(m);(function(){var c,o,u,r,e,n=function(p,d){function i(){this.constructor=p}for(var v in d)a.call(d,v)&&(p[v]=d[v]);return i.prototype=d.prototype,p.prototype=new i,p.__super__=d.prototype,p},a={}.hasOwnProperty;e=l("./Utility"),r=e.isObject,u=e.isFunction,o=l("./XMLNode"),c=l("./XMLAttribute"),R.exports=function(p){function d(i,v,b){if(d.__super__.constructor.call(this,i),v==null)throw new Error("Missing element name");this.name=this.stringify.eleName(v),this.attributes={},b!=null&&this.attribute(b),i.isDocument&&(this.isRoot=!0,this.documentObject=i,i.rootObject=this)}return n(d,p),d.prototype.clone=function(){var i,v,b,_;b=(0,y.default)(this),b.isRoot&&(b.documentObject=null),b.attributes={},_=this.attributes;for(v in _)a.call(_,v)&&(i=_[v],b.attributes[v]=i.clone());return b.children=[],this.children.forEach(function(w){var T;return T=w.clone(),T.parent=b,b.children.push(T)}),b},d.prototype.attribute=function(i,v){var b,_;if(i!=null&&(i=i.valueOf()),r(i))for(b in i)a.call(i,b)&&(_=i[b],this.attribute(b,_));else u(v)&&(v=v.apply()),this.options.skipNullAttributes&&v==null||(this.attributes[i]=new c(this,i,v));return this},d.prototype.removeAttribute=function(i){var v,b,_;if(i==null)throw new Error("Missing attribute name");if(i=i.valueOf(),Array.isArray(i))for(b=0,_=i.length;b<_;b++)v=i[b],delete this.attributes[v];else delete this.attributes[i];return this},d.prototype.toString=function(i){return this.options.writer.set(i).element(this)},d.prototype.att=function(i,v){return this.attribute(i,v)},d.prototype.a=function(i,v){return this.attribute(i,v)},d}(o)}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLNode":227,"babel-runtime/core-js/object/create":19}],227:[function(l,R,g){"use strict";(function(){var m,y,c,o,u,r,e,n,a,p,d,i,v={}.hasOwnProperty;i=l("./Utility"),d=i.isObject,p=i.isFunction,a=i.isEmpty,u=null,m=null,y=null,c=null,o=null,e=null,n=null,r=null,R.exports=function(){function b(_){this.parent=_,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],u||(u=l("./XMLElement"),m=l("./XMLCData"),y=l("./XMLComment"),c=l("./XMLDeclaration"),o=l("./XMLDocType"),e=l("./XMLRaw"),n=l("./XMLText"),r=l("./XMLProcessingInstruction"))}return b.prototype.element=function(_,w,T){var C,S,W,N,E,K,z,M,G,J;if(K=null,w==null&&(w={}),w=w.valueOf(),d(w)||(G=[w,T],T=G[0],w=G[1]),_!=null&&(_=_.valueOf()),Array.isArray(_))for(W=0,z=_.length;W<z;W++)S=_[W],K=this.element(S);else if(p(_))K=this.element(_.apply());else if(d(_)){for(E in _)if(v.call(_,E))if(J=_[E],p(J)&&(J=J.apply()),d(J)&&a(J)&&(J=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&E.indexOf(this.stringify.convertAttKey)===0)K=this.attribute(E.substr(this.stringify.convertAttKey.length),J);else if(!this.options.separateArrayItems&&Array.isArray(J))for(N=0,M=J.length;N<M;N++)S=J[N],C={},C[E]=S,K=this.element(C);else d(J)?(K=this.element(E),K.element(J)):K=this.element(E,J)}else K=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&_.indexOf(this.stringify.convertTextKey)===0?this.text(T):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&_.indexOf(this.stringify.convertCDataKey)===0?this.cdata(T):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&_.indexOf(this.stringify.convertCommentKey)===0?this.comment(T):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&_.indexOf(this.stringify.convertRawKey)===0?this.raw(T):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&_.indexOf(this.stringify.convertPIKey)===0?this.instruction(_.substr(this.stringify.convertPIKey.length),T):this.node(_,w,T);if(K==null)throw new Error("Could not create any elements with: "+_);return K},b.prototype.insertBefore=function(_,w,T){var C,S,W;if(this.isRoot)throw new Error("Cannot insert elements at root level");return S=this.parent.children.indexOf(this),W=this.parent.children.splice(S),C=this.parent.element(_,w,T),Array.prototype.push.apply(this.parent.children,W),C},b.prototype.insertAfter=function(_,w,T){var C,S,W;if(this.isRoot)throw new Error("Cannot insert elements at root level");return S=this.parent.children.indexOf(this),W=this.parent.children.splice(S+1),C=this.parent.element(_,w,T),Array.prototype.push.apply(this.parent.children,W),C},b.prototype.remove=function(){var _;if(this.isRoot)throw new Error("Cannot remove the root element");return _=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[_,_-_+1].concat([])),this.parent},b.prototype.node=function(_,w,T){var C,S;return _!=null&&(_=_.valueOf()),w||(w={}),w=w.valueOf(),d(w)||(S=[w,T],T=S[0],w=S[1]),C=new u(this,_,w),T!=null&&C.text(T),this.children.push(C),C},b.prototype.text=function(_){var w;return w=new n(this,_),this.children.push(w),this},b.prototype.cdata=function(_){var w;return w=new m(this,_),this.children.push(w),this},b.prototype.comment=function(_){var w;return w=new y(this,_),this.children.push(w),this},b.prototype.commentBefore=function(_){var w,T;return w=this.parent.children.indexOf(this),T=this.parent.children.splice(w),this.parent.comment(_),Array.prototype.push.apply(this.parent.children,T),this},b.prototype.commentAfter=function(_){var w,T;return w=this.parent.children.indexOf(this),T=this.parent.children.splice(w+1),this.parent.comment(_),Array.prototype.push.apply(this.parent.children,T),this},b.prototype.raw=function(_){var w;return w=new e(this,_),this.children.push(w),this},b.prototype.instruction=function(_,w){var T,C,S,W,N;if(_!=null&&(_=_.valueOf()),w!=null&&(w=w.valueOf()),Array.isArray(_))for(W=0,N=_.length;W<N;W++)T=_[W],this.instruction(T);else if(d(_))for(T in _)v.call(_,T)&&(C=_[T],this.instruction(T,C));else p(w)&&(w=w.apply()),S=new r(this,_,w),this.children.push(S);return this},b.prototype.instructionBefore=function(_,w){var T,C;return T=this.parent.children.indexOf(this),C=this.parent.children.splice(T),this.parent.instruction(_,w),Array.prototype.push.apply(this.parent.children,C),this},b.prototype.instructionAfter=function(_,w){var T,C;return T=this.parent.children.indexOf(this),C=this.parent.children.splice(T+1),this.parent.instruction(_,w),Array.prototype.push.apply(this.parent.children,C),this},b.prototype.declaration=function(_,w,T){var C,S;return C=this.document(),S=new c(C,_,w,T),C.children[0]instanceof c?C.children[0]=S:C.children.unshift(S),C.root()||C},b.prototype.doctype=function(_,w){var T,C,S,W,N,E,K,z,M,G;for(C=this.document(),S=new o(C,_,w),M=C.children,W=N=0,K=M.length;N<K;W=++N)if((T=M[W])instanceof o)return C.children[W]=S,S;for(G=C.children,W=E=0,z=G.length;E<z;W=++E)if(T=G[W],T.isRoot)return C.children.splice(W,0,S),S;return C.children.push(S),S},b.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},b.prototype.root=function(){var _;for(_=this;_;){if(_.isDocument)return _.rootObject;if(_.isRoot)return _;_=_.parent}},b.prototype.document=function(){var _;for(_=this;_;){if(_.isDocument)return _;_=_.parent}},b.prototype.end=function(_){return this.document().end(_)},b.prototype.prev=function(){var _;if((_=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node");return this.parent.children[_-1]},b.prototype.next=function(){var _;if((_=this.parent.children.indexOf(this))===-1||_===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[_+1]},b.prototype.importDocument=function(_){var w;return w=_.root().clone(),w.parent=this,w.isRoot=!1,this.children.push(w),this},b.prototype.ele=function(_,w,T){return this.element(_,w,T)},b.prototype.nod=function(_,w,T){return this.node(_,w,T)},b.prototype.txt=function(_){return this.text(_)},b.prototype.dat=function(_){return this.cdata(_)},b.prototype.com=function(_){return this.comment(_)},b.prototype.ins=function(_,w){return this.instruction(_,w)},b.prototype.doc=function(){return this.document()},b.prototype.dec=function(_,w,T){return this.declaration(_,w,T)},b.prototype.dtd=function(_,w){return this.doctype(_,w)},b.prototype.e=function(_,w,T){return this.element(_,w,T)},b.prototype.n=function(_,w,T){return this.node(_,w,T)},b.prototype.t=function(_){return this.text(_)},b.prototype.d=function(_){return this.cdata(_)},b.prototype.c=function(_){return this.comment(_)},b.prototype.r=function(_){return this.raw(_)},b.prototype.i=function(_,w){return this.instruction(_,w)},b.prototype.u=function(){return this.up()},b.prototype.importXMLBuilder=function(_){return this.importDocument(_)},b}()}).call(void 0)},{"./Utility":214,"./XMLCData":216,"./XMLComment":217,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233}],228:[function(l,R,g){"use strict";var m=l("babel-runtime/core-js/object/create"),y=function(c){return c&&c.__esModule?c:{default:c}}(m);(function(){var c,o=function(r,e){function n(){this.constructor=r}for(var a in e)u.call(e,a)&&(r[a]=e[a]);return n.prototype=e.prototype,r.prototype=new n,r.__super__=e.prototype,r},u={}.hasOwnProperty;c=l("./XMLNode"),R.exports=function(r){function e(n,a,p){if(e.__super__.constructor.call(this,n),a==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(a),p&&(this.value=this.stringify.insValue(p))}return o(e,r),e.prototype.clone=function(){return(0,y.default)(this)},e.prototype.toString=function(n){return this.options.writer.set(n).processingInstruction(this)},e}(c)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(l,R,g){"use strict";var m=l("babel-runtime/core-js/object/create"),y=function(c){return c&&c.__esModule?c:{default:c}}(m);(function(){var c,o=function(r,e){function n(){this.constructor=r}for(var a in e)u.call(e,a)&&(r[a]=e[a]);return n.prototype=e.prototype,r.prototype=new n,r.__super__=e.prototype,r},u={}.hasOwnProperty;c=l("./XMLNode"),R.exports=function(r){function e(n,a){if(e.__super__.constructor.call(this,n),a==null)throw new Error("Missing raw text");this.value=this.stringify.raw(a)}return o(e,r),e.prototype.clone=function(){return(0,y.default)(this)},e.prototype.toString=function(n){return this.options.writer.set(n).raw(this)},e}(c)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(l,R,g){"use strict";(function(){var m,y,c,o,u,r,e,n,a,p,d,i,v,b=function(w,T){function C(){this.constructor=w}for(var S in T)_.call(T,S)&&(w[S]=T[S]);return C.prototype=T.prototype,w.prototype=new C,w.__super__=T.prototype,w},_={}.hasOwnProperty;e=l("./XMLDeclaration"),n=l("./XMLDocType"),m=l("./XMLCData"),y=l("./XMLComment"),a=l("./XMLElement"),d=l("./XMLRaw"),i=l("./XMLText"),p=l("./XMLProcessingInstruction"),c=l("./XMLDTDAttList"),o=l("./XMLDTDElement"),u=l("./XMLDTDEntity"),r=l("./XMLDTDNotation"),v=l("./XMLWriterBase"),R.exports=function(w){function T(C,S){T.__super__.constructor.call(this,S),this.stream=C}return b(T,w),T.prototype.document=function(C){var S,W,N,E,K,z,M,G;for(z=C.children,W=0,E=z.length;W<E;W++)S=z[W],S.isLastRootNode=!1;for(C.children[C.children.length-1].isLastRootNode=!0,M=C.children,G=[],N=0,K=M.length;N<K;N++)switch(S=M[N],!1){case!(S instanceof e):G.push(this.declaration(S));break;case!(S instanceof n):G.push(this.docType(S));break;case!(S instanceof y):G.push(this.comment(S));break;case!(S instanceof p):G.push(this.processingInstruction(S));break;default:G.push(this.element(S))}return G},T.prototype.attribute=function(C){return this.stream.write(" "+C.name+'="'+C.value+'"')},T.prototype.cdata=function(C,S){return this.stream.write(this.space(S)+"<![CDATA["+C.text+"]]>"+this.endline(C))},T.prototype.comment=function(C,S){return this.stream.write(this.space(S)+"<!-- "+C.text+" -->"+this.endline(C))},T.prototype.declaration=function(C,S){return this.stream.write(this.space(S)),this.stream.write('<?xml version="'+C.version+'"'),C.encoding!=null&&this.stream.write(' encoding="'+C.encoding+'"'),C.standalone!=null&&this.stream.write(' standalone="'+C.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(C))},T.prototype.docType=function(C,S){var W,N,E,K;if(S||(S=0),this.stream.write(this.space(S)),this.stream.write("<!DOCTYPE "+C.root().name),C.pubID&&C.sysID?this.stream.write(' PUBLIC "'+C.pubID+'" "'+C.sysID+'"'):C.sysID&&this.stream.write(' SYSTEM "'+C.sysID+'"'),C.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(C)),K=C.children,N=0,E=K.length;N<E;N++)switch(W=K[N],!1){case!(W instanceof c):this.dtdAttList(W,S+1);break;case!(W instanceof o):this.dtdElement(W,S+1);break;case!(W instanceof u):this.dtdEntity(W,S+1);break;case!(W instanceof r):this.dtdNotation(W,S+1);break;case!(W instanceof m):this.cdata(W,S+1);break;case!(W instanceof y):this.comment(W,S+1);break;case!(W instanceof p):this.processingInstruction(W,S+1);break;default:throw new Error("Unknown DTD node type: "+W.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(C))},T.prototype.element=function(C,S){var W,N,E,K,z,M,G,J;S||(S=0),J=this.space(S),this.stream.write(J+"<"+C.name),M=C.attributes;for(z in M)_.call(M,z)&&(W=M[z],this.attribute(W));if(C.children.length===0||C.children.every(function(te){return te.value===""}))this.allowEmpty?this.stream.write("></"+C.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&C.children.length===1&&C.children[0].value!=null)this.stream.write(">"),this.stream.write(C.children[0].value),this.stream.write("</"+C.name+">");else{for(this.stream.write(">"+this.newline),G=C.children,E=0,K=G.length;E<K;E++)switch(N=G[E],!1){case!(N instanceof m):this.cdata(N,S+1);break;case!(N instanceof y):this.comment(N,S+1);break;case!(N instanceof a):this.element(N,S+1);break;case!(N instanceof d):this.raw(N,S+1);break;case!(N instanceof i):this.text(N,S+1);break;case!(N instanceof p):this.processingInstruction(N,S+1);break;default:throw new Error("Unknown XML node type: "+N.constructor.name)}this.stream.write(J+"</"+C.name+">")}return this.stream.write(this.endline(C))},T.prototype.processingInstruction=function(C,S){return this.stream.write(this.space(S)+"<?"+C.target),C.value&&this.stream.write(" "+C.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(C))},T.prototype.raw=function(C,S){return this.stream.write(this.space(S)+C.value+this.endline(C))},T.prototype.text=function(C,S){return this.stream.write(this.space(S)+C.value+this.endline(C))},T.prototype.dtdAttList=function(C,S){return this.stream.write(this.space(S)+"<!ATTLIST "+C.elementName+" "+C.attributeName+" "+C.attributeType),C.defaultValueType!=="#DEFAULT"&&this.stream.write(" "+C.defaultValueType),C.defaultValue&&this.stream.write(' "'+C.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(C))},T.prototype.dtdElement=function(C,S){return this.stream.write(this.space(S)+"<!ELEMENT "+C.name+" "+C.value),this.stream.write(this.spacebeforeslash+">"+this.endline(C))},T.prototype.dtdEntity=function(C,S){return this.stream.write(this.space(S)+"<!ENTITY"),C.pe&&this.stream.write(" %"),this.stream.write(" "+C.name),C.value?this.stream.write(' "'+C.value+'"'):(C.pubID&&C.sysID?this.stream.write(' PUBLIC "'+C.pubID+'" "'+C.sysID+'"'):C.sysID&&this.stream.write(' SYSTEM "'+C.sysID+'"'),C.nData&&this.stream.write(" NDATA "+C.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(C))},T.prototype.dtdNotation=function(C,S){return this.stream.write(this.space(S)+"<!NOTATION "+C.name),C.pubID&&C.sysID?this.stream.write(' PUBLIC "'+C.pubID+'" "'+C.sysID+'"'):C.pubID?this.stream.write(' PUBLIC "'+C.pubID+'"'):C.sysID&&this.stream.write(' SYSTEM "'+C.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(C))},T.prototype.endline=function(C){return C.isLastRootNode?"":this.newline},T}(v)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],231:[function(l,R,g){"use strict";(function(){var m,y,c,o,u,r,e,n,a,p,d,i,v,b=function(w,T){function C(){this.constructor=w}for(var S in T)_.call(T,S)&&(w[S]=T[S]);return C.prototype=T.prototype,w.prototype=new C,w.__super__=T.prototype,w},_={}.hasOwnProperty;e=l("./XMLDeclaration"),n=l("./XMLDocType"),m=l("./XMLCData"),y=l("./XMLComment"),a=l("./XMLElement"),d=l("./XMLRaw"),i=l("./XMLText"),p=l("./XMLProcessingInstruction"),c=l("./XMLDTDAttList"),o=l("./XMLDTDElement"),u=l("./XMLDTDEntity"),r=l("./XMLDTDNotation"),v=l("./XMLWriterBase"),R.exports=function(w){function T(C){T.__super__.constructor.call(this,C)}return b(T,w),T.prototype.document=function(C){var S,W,N,E,K;for(this.textispresent=!1,E="",K=C.children,W=0,N=K.length;W<N;W++)S=K[W],E+=function(){switch(!1){case!(S instanceof e):return this.declaration(S);case!(S instanceof n):return this.docType(S);case!(S instanceof y):return this.comment(S);case!(S instanceof p):return this.processingInstruction(S);default:return this.element(S,0)}}.call(this);return this.pretty&&E.slice(-this.newline.length)===this.newline&&(E=E.slice(0,-this.newline.length)),E},T.prototype.attribute=function(C){return" "+C.name+'="'+C.value+'"'},T.prototype.cdata=function(C,S){return this.space(S)+"<![CDATA["+C.text+"]]>"+this.newline},T.prototype.comment=function(C,S){return this.space(S)+"<!-- "+C.text+" -->"+this.newline},T.prototype.declaration=function(C,S){var W;return W=this.space(S),W+='<?xml version="'+C.version+'"',C.encoding!=null&&(W+=' encoding="'+C.encoding+'"'),C.standalone!=null&&(W+=' standalone="'+C.standalone+'"'),W+=this.spacebeforeslash+"?>",W+=this.newline},T.prototype.docType=function(C,S){var W,N,E,K,z;if(S||(S=0),K=this.space(S),K+="<!DOCTYPE "+C.root().name,C.pubID&&C.sysID?K+=' PUBLIC "'+C.pubID+'" "'+C.sysID+'"':C.sysID&&(K+=' SYSTEM "'+C.sysID+'"'),C.children.length>0){for(K+=" [",K+=this.newline,z=C.children,N=0,E=z.length;N<E;N++)W=z[N],K+=function(){switch(!1){case!(W instanceof c):return this.dtdAttList(W,S+1);case!(W instanceof o):return this.dtdElement(W,S+1);case!(W instanceof u):return this.dtdEntity(W,S+1);case!(W instanceof r):return this.dtdNotation(W,S+1);case!(W instanceof m):return this.cdata(W,S+1);case!(W instanceof y):return this.comment(W,S+1);case!(W instanceof p):return this.processingInstruction(W,S+1);default:throw new Error("Unknown DTD node type: "+W.constructor.name)}}.call(this);K+="]"}return K+=this.spacebeforeslash+">",K+=this.newline},T.prototype.element=function(C,S){var W,N,E,K,z,M,G,J,te,re,se,H,he;S||(S=0),he=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),H=this.space(S),J="",J+=H+"<"+C.name,te=C.attributes;for(G in te)_.call(te,G)&&(W=te[G],J+=this.attribute(W));if(C.children.length===0||C.children.every(function(Z){return Z.value===""}))this.allowEmpty?J+="></"+C.name+">"+this.newline:J+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&C.children.length===1&&C.children[0].value!=null)J+=">",J+=C.children[0].value,J+="</"+C.name+">"+this.newline;else{if(this.dontprettytextnodes){for(re=C.children,E=0,z=re.length;E<z;E++)if(N=re[E],N.value!=null){this.textispresent++,he=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,H=this.space(S)),J+=">"+this.newline,se=C.children,K=0,M=se.length;K<M;K++)N=se[K],J+=function(){switch(!1){case!(N instanceof m):return this.cdata(N,S+1);case!(N instanceof y):return this.comment(N,S+1);case!(N instanceof a):return this.element(N,S+1);case!(N instanceof d):return this.raw(N,S+1);case!(N instanceof i):return this.text(N,S+1);case!(N instanceof p):return this.processingInstruction(N,S+1);default:throw new Error("Unknown XML node type: "+N.constructor.name)}}.call(this);he&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),J+=H+"</"+C.name+">"+this.newline}return J},T.prototype.processingInstruction=function(C,S){var W;return W=this.space(S)+"<?"+C.target,C.value&&(W+=" "+C.value),W+=this.spacebeforeslash+"?>"+this.newline},T.prototype.raw=function(C,S){return this.space(S)+C.value+this.newline},T.prototype.text=function(C,S){return this.space(S)+C.value+this.newline},T.prototype.dtdAttList=function(C,S){var W;return W=this.space(S)+"<!ATTLIST "+C.elementName+" "+C.attributeName+" "+C.attributeType,C.defaultValueType!=="#DEFAULT"&&(W+=" "+C.defaultValueType),C.defaultValue&&(W+=' "'+C.defaultValue+'"'),W+=this.spacebeforeslash+">"+this.newline},T.prototype.dtdElement=function(C,S){return this.space(S)+"<!ELEMENT "+C.name+" "+C.value+this.spacebeforeslash+">"+this.newline},T.prototype.dtdEntity=function(C,S){var W;return W=this.space(S)+"<!ENTITY",C.pe&&(W+=" %"),W+=" "+C.name,C.value?W+=' "'+C.value+'"':(C.pubID&&C.sysID?W+=' PUBLIC "'+C.pubID+'" "'+C.sysID+'"':C.sysID&&(W+=' SYSTEM "'+C.sysID+'"'),C.nData&&(W+=" NDATA "+C.nData)),W+=this.spacebeforeslash+">"+this.newline},T.prototype.dtdNotation=function(C,S){var W;return W=this.space(S)+"<!NOTATION "+C.name,C.pubID&&C.sysID?W+=' PUBLIC "'+C.pubID+'" "'+C.sysID+'"':C.pubID?W+=' PUBLIC "'+C.pubID+'"':C.sysID&&(W+=' SYSTEM "'+C.sysID+'"'),W+=this.spacebeforeslash+">"+this.newline},T.prototype.openNode=function(C,S){var W,N,E,K;if(S||(S=0),C instanceof a){E=this.space(S)+"<"+C.name,K=C.attributes;for(N in K)_.call(K,N)&&(W=K[N],E+=this.attribute(W));return E+=(C.children?">":"/>")+this.newline}return E=this.space(S)+"<!DOCTYPE "+C.rootNodeName,C.pubID&&C.sysID?E+=' PUBLIC "'+C.pubID+'" "'+C.sysID+'"':C.sysID&&(E+=' SYSTEM "'+C.sysID+'"'),E+=(C.children?" [":">")+this.newline},T.prototype.closeNode=function(C,S){switch(S||(S=0),!1){case!(C instanceof a):return this.space(S)+"</"+C.name+">"+this.newline;case!(C instanceof n):return this.space(S)+"]>"+this.newline}},T}(v)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],232:[function(l,R,g){"use strict";(function(){var m=function(c,o){return function(){return c.apply(o,arguments)}},y={}.hasOwnProperty;R.exports=function(){function c(o){this.assertLegalChar=m(this.assertLegalChar,this);var u,r,e;o||(o={}),this.noDoubleEncoding=o.noDoubleEncoding,r=o.stringify||{};for(u in r)y.call(r,u)&&(e=r[u],this[u]=e)}return c.prototype.eleName=function(o){return o=""+o||"",this.assertLegalChar(o)},c.prototype.eleText=function(o){return o=""+o||"",this.assertLegalChar(this.elEscape(o))},c.prototype.cdata=function(o){return o=""+o||"",o=o.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(o)},c.prototype.comment=function(o){if(o=""+o||"",o.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+o);return this.assertLegalChar(o)},c.prototype.raw=function(o){return""+o||""},c.prototype.attName=function(o){return o=""+o||""},c.prototype.attValue=function(o){return o=""+o||"",this.attEscape(o)},c.prototype.insTarget=function(o){return""+o||""},c.prototype.insValue=function(o){if(o=""+o||"",o.match(/\?>/))throw new Error("Invalid processing instruction value: "+o);return o},c.prototype.xmlVersion=function(o){if(o=""+o||"",!o.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+o);return o},c.prototype.xmlEncoding=function(o){if(o=""+o||"",!o.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+o);return o},c.prototype.xmlStandalone=function(o){return o?"yes":"no"},c.prototype.dtdPubID=function(o){return""+o||""},c.prototype.dtdSysID=function(o){return""+o||""},c.prototype.dtdElementValue=function(o){return""+o||""},c.prototype.dtdAttType=function(o){return""+o||""},c.prototype.dtdAttDefault=function(o){return o!=null?""+o||"":o},c.prototype.dtdEntityValue=function(o){return""+o||""},c.prototype.dtdNData=function(o){return""+o||""},c.prototype.convertAttKey="@",c.prototype.convertPIKey="?",c.prototype.convertTextKey="#text",c.prototype.convertCDataKey="#cdata",c.prototype.convertCommentKey="#comment",c.prototype.convertRawKey="#raw",c.prototype.assertLegalChar=function(o){var u;if(u=o.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+o+" at index "+u.index);return o},c.prototype.elEscape=function(o){var u;return u=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,o.replace(u,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")},c.prototype.attEscape=function(o){var u;return u=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,o.replace(u,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")},c}()}).call(void 0)},{}],233:[function(l,R,g){"use strict";var m=l("babel-runtime/core-js/object/create"),y=function(c){return c&&c.__esModule?c:{default:c}}(m);(function(){var c,o=function(r,e){function n(){this.constructor=r}for(var a in e)u.call(e,a)&&(r[a]=e[a]);return n.prototype=e.prototype,r.prototype=new n,r.__super__=e.prototype,r},u={}.hasOwnProperty;c=l("./XMLNode"),R.exports=function(r){function e(n,a){if(e.__super__.constructor.call(this,n),a==null)throw new Error("Missing element text");this.value=this.stringify.eleText(a)}return o(e,r),e.prototype.clone=function(){return(0,y.default)(this)},e.prototype.toString=function(n){return this.options.writer.set(n).text(this)},e}(c)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(l,R,g){"use strict";(function(){var m={}.hasOwnProperty;R.exports=function(){function y(c){var o,u,r,e,n,a,p,d,i;c||(c={}),this.pretty=c.pretty||!1,this.allowEmpty=(u=c.allowEmpty)!=null&&u,this.pretty?(this.indent=(r=c.indent)!=null?r:" ",this.newline=(e=c.newline)!=null?e:`
|
|
|
`,this.offset=(n=c.offset)!=null?n:0,this.dontprettytextnodes=(a=c.dontprettytextnodes)!=null?a:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=(p=c.spacebeforeslash)!=null?p:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,d=c.writer||{};for(o in d)m.call(d,o)&&(i=d[o],this[o]=i)}return y.prototype.set=function(c){var o,u,r;c||(c={}),"pretty"in c&&(this.pretty=c.pretty),"allowEmpty"in c&&(this.allowEmpty=c.allowEmpty),this.pretty?(this.indent="indent"in c?c.indent:" ",this.newline="newline"in c?c.newline:`
|
|
|
`,this.offset="offset"in c?c.offset:0,this.dontprettytextnodes="dontprettytextnodes"in c?c.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in c?c.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,u=c.writer||{};for(o in u)m.call(u,o)&&(r=u[o],this[o]=r);return this},y.prototype.space=function(c){var o;return this.pretty?(o=(c||0)+this.offset+1,o>0?new Array(o).join(this.indent):""):""},y}()}).call(void 0)},{}],235:[function(l,R,g){"use strict";(function(){var m,y,c,o,u,r,e;e=l("./Utility"),u=e.assign,r=e.isFunction,m=l("./XMLDocument"),y=l("./XMLDocumentCB"),o=l("./XMLStringWriter"),c=l("./XMLStreamWriter"),R.exports.create=function(n,a,p,d){var i,v;if(n==null)throw new Error("Root element needs a name");return d=u({},a,p,d),i=new m(d),v=i.element(n),d.headless||(i.declaration(d),d.pubID==null&&d.sysID==null||i.doctype(d)),v},R.exports.begin=function(n,a,p){var d;return r(n)&&(d=[n,a],a=d[0],p=d[1],n={}),a?new y(n,a,p):new m(n)},R.exports.stringWriter=function(n){return new o(n)},R.exports.streamWriter=function(n,a){return new c(n,a)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(l,R,g){function m(){for(var c={},o=0;o<arguments.length;o++){var u=arguments[o];for(var r in u)y.call(u,r)&&(c[r]=u[r])}return c}R.exports=m;var y=Object.prototype.hasOwnProperty},{}],237:[function(l,R,g){"use strict";function m(d,i,v){o.isBuffer(i)||(i=new o(i)),o.isBuffer(v)||(v=new o(v)),i.length>a?i=d(i):i.length<a&&(i=o.concat([i,p],a));for(var b=new o(a),_=new o(a),w=0;w<a;w++)b[w]=54^i[w],_[w]=92^i[w];var T=d(o.concat([b,v]));return d(o.concat([_,T]))}function y(d,i){d=d||"sha1";var v=n[d],b=[],_=0;return v||c("algorithm:",d,"is not yet supported"),{update:function(w){return o.isBuffer(w)||(w=new o(w)),b.push(w),_+=w.length,this},digest:function(w){var T=o.concat(b),C=i?m(v,i,T):v(T);return b=null,w?C.toString(w):C}}}function c(){var d=[].slice.call(arguments).join(" ");throw new Error([d,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}var o=l("buffer").Buffer,u=l("./sha"),r=l("./sha256"),e=l("./md5"),n={sha1:u,sha256:r,md5:e},a=64,p=new o(a);p.fill(0),g.createHash=function(d){return y(d)},g.createHmac=function(d,i){return y(d,i)},function(d,i){for(var v in d)i(d[v],v)}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(d){g[d]=function(){c("sorry,",d,"is not implemented yet")}})},{"./md5":239,"./sha":240,"./sha256":241,buffer:38}],238:[function(l,R,g){"use strict";function m(n,a){if(n.length%u!=0){var p=n.length+(u-n.length%u);n=o.concat([n,r],p)}for(var d=[],i=a?n.readInt32BE:n.readInt32LE,v=0;v<n.length;v+=u)d.push(i.call(n,v));return d}function y(n,a,p){for(var d=new o(a),i=p?d.writeInt32BE:d.writeInt32LE,v=0;v<n.length;v++)i.call(d,n[v],4*v,!0);return d}function c(n,a,p,d){return o.isBuffer(n)||(n=new o(n)),y(a(m(n,d),n.length*e),p,d)}var o=l("buffer").Buffer,u=4,r=new o(u);r.fill(0);var e=8;R.exports={hash:c}},{buffer:38}],239:[function(l,R,g){"use strict";function m(p,d){p[d>>5]|=128<<d%32,p[14+(d+64>>>9<<4)]=d;for(var i=1732584193,v=-271733879,b=-1732584194,_=271733878,w=0;w<p.length;w+=16){var T=i,C=v,S=b,W=_;i=c(i,v,b,_,p[w+0],7,-680876936),_=c(_,i,v,b,p[w+1],12,-389564586),b=c(b,_,i,v,p[w+2],17,606105819),v=c(v,b,_,i,p[w+3],22,-1044525330),i=c(i,v,b,_,p[w+4],7,-176418897),_=c(_,i,v,b,p[w+5],12,1200080426),b=c(b,_,i,v,p[w+6],17,-1473231341),v=c(v,b,_,i,p[w+7],22,-45705983),i=c(i,v,b,_,p[w+8],7,1770035416),_=c(_,i,v,b,p[w+9],12,-1958414417),b=c(b,_,i,v,p[w+10],17,-42063),v=c(v,b,_,i,p[w+11],22,-1990404162),i=c(i,v,b,_,p[w+12],7,1804603682),_=c(_,i,v,b,p[w+13],12,-40341101),b=c(b,_,i,v,p[w+14],17,-1502002290),v=c(v,b,_,i,p[w+15],22,1236535329),i=o(i,v,b,_,p[w+1],5,-165796510),_=o(_,i,v,b,p[w+6],9,-1069501632),b=o(b,_,i,v,p[w+11],14,643717713),v=o(v,b,_,i,p[w+0],20,-373897302),i=o(i,v,b,_,p[w+5],5,-701558691),_=o(_,i,v,b,p[w+10],9,38016083),b=o(b,_,i,v,p[w+15],14,-660478335),v=o(v,b,_,i,p[w+4],20,-405537848),i=o(i,v,b,_,p[w+9],5,568446438),_=o(_,i,v,b,p[w+14],9,-1019803690),b=o(b,_,i,v,p[w+3],14,-187363961),v=o(v,b,_,i,p[w+8],20,1163531501),i=o(i,v,b,_,p[w+13],5,-1444681467),_=o(_,i,v,b,p[w+2],9,-51403784),b=o(b,_,i,v,p[w+7],14,1735328473),v=o(v,b,_,i,p[w+12],20,-1926607734),i=u(i,v,b,_,p[w+5],4,-378558),_=u(_,i,v,b,p[w+8],11,-2022574463),b=u(b,_,i,v,p[w+11],16,1839030562),v=u(v,b,_,i,p[w+14],23,-35309556),i=u(i,v,b,_,p[w+1],4,-1530992060),_=u(_,i,v,b,p[w+4],11,1272893353),b=u(b,_,i,v,p[w+7],16,-155497632),v=u(v,b,_,i,p[w+10],23,-1094730640),i=u(i,v,b,_,p[w+13],4,681279174),_=u(_,i,v,b,p[w+0],11,-358537222),b=u(b,_,i,v,p[w+3],16,-722521979),v=u(v,b,_,i,p[w+6],23,76029189),i=u(i,v,b,_,p[w+9],4,-640364487),_=u(_,i,v,b,p[w+12],11,-421815835),b=u(b,_,i,v,p[w+15],16,530742520),v=u(v,b,_,i,p[w+2],23,-995338651),i=r(i,v,b,_,p[w+0],6,-198630844),_=r(_,i,v,b,p[w+7],10,1126891415),b=r(b,_,i,v,p[w+14],15,-1416354905),v=r(v,b,_,i,p[w+5],21,-57434055),i=r(i,v,b,_,p[w+12],6,1700485571),_=r(_,i,v,b,p[w+3],10,-1894986606),b=r(b,_,i,v,p[w+10],15,-1051523),v=r(v,b,_,i,p[w+1],21,-2054922799),i=r(i,v,b,_,p[w+8],6,1873313359),_=r(_,i,v,b,p[w+15],10,-30611744),b=r(b,_,i,v,p[w+6],15,-1560198380),v=r(v,b,_,i,p[w+13],21,1309151649),i=r(i,v,b,_,p[w+4],6,-145523070),_=r(_,i,v,b,p[w+11],10,-1120210379),b=r(b,_,i,v,p[w+2],15,718787259),v=r(v,b,_,i,p[w+9],21,-343485551),i=e(i,T),v=e(v,C),b=e(b,S),_=e(_,W)}return Array(i,v,b,_)}function y(p,d,i,v,b,_){return e(n(e(e(d,p),e(v,_)),b),i)}function c(p,d,i,v,b,_,w){return y(d&i|~d&v,p,d,b,_,w)}function o(p,d,i,v,b,_,w){return y(d&v|i&~v,p,d,b,_,w)}function u(p,d,i,v,b,_,w){return y(d^i^v,p,d,b,_,w)}function r(p,d,i,v,b,_,w){return y(i^(d|~v),p,d,b,_,w)}function e(p,d){var i=(65535&p)+(65535&d);return(p>>16)+(d>>16)+(i>>16)<<16|65535&i}function n(p,d){return p<<d|p>>>32-d}var a=l("./helpers");R.exports=function(p){return a.hash(p,m,16)}},{"./helpers":238}],240:[function(l,R,g){"use strict";function m(e,n){e[n>>5]|=128<<24-n%32,e[15+(n+64>>9<<4)]=n;for(var a=Array(80),p=1732584193,d=-271733879,i=-1732584194,v=271733878,b=-1009589776,_=0;_<e.length;_+=16){for(var w=p,T=d,C=i,S=v,W=b,N=0;N<80;N++){a[N]=N<16?e[_+N]:u(a[N-3]^a[N-8]^a[N-14]^a[N-16],1);var E=o(o(u(p,5),y(N,d,i,v)),o(o(b,a[N]),c(N)));b=v,v=i,i=u(d,30),d=p,p=E}p=o(p,w),d=o(d,T),i=o(i,C),v=o(v,S),b=o(b,W)}return Array(p,d,i,v,b)}function y(e,n,a,p){return e<20?n&a|~n&p:e<40?n^a^p:e<60?n&a|n&p|a&p:n^a^p}function c(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function o(e,n){var a=(65535&e)+(65535&n);return(e>>16)+(n>>16)+(a>>16)<<16|65535&a}function u(e,n){return e<<n|e>>>32-n}var r=l("./helpers");R.exports=function(e){return r.hash(e,m,20,!0)}},{"./helpers":238}],241:[function(l,R,g){"use strict";var m=l("./helpers"),y=function(i,v){var b=(65535&i)+(65535&v);return(i>>16)+(v>>16)+(b>>16)<<16|65535&b},c=function(i,v){return i>>>v|i<<32-v},o=function(i,v){return i>>>v},u=function(i,v,b){return i&v^~i&b},r=function(i,v,b){return i&v^i&b^v&b},e=function(i){return c(i,2)^c(i,13)^c(i,22)},n=function(i){return c(i,6)^c(i,11)^c(i,25)},a=function(i){return c(i,7)^c(i,18)^o(i,3)},p=function(i){return c(i,17)^c(i,19)^o(i,10)},d=function(i,v){var b,_,w,T,C,S,W,N,E,K,z,M,G=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),J=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),te=new Array(64);i[v>>5]|=128<<24-v%32,i[15+(v+64>>9<<4)]=v;for(var E=0;E<i.length;E+=16){b=J[0],_=J[1],w=J[2],T=J[3],C=J[4],S=J[5],W=J[6],N=J[7];for(var K=0;K<64;K++)te[K]=K<16?i[K+E]:y(y(y(p(te[K-2]),te[K-7]),a(te[K-15])),te[K-16]),z=y(y(y(y(N,n(C)),u(C,S,W)),G[K]),te[K]),M=y(e(b),r(b,_,w)),N=W,W=S,S=C,C=y(T,z),T=w,w=_,_=b,b=y(z,M);J[0]=y(b,J[0]),J[1]=y(_,J[1]),J[2]=y(w,J[2]),J[3]=y(T,J[3]),J[4]=y(C,J[4]),J[5]=y(S,J[5]),J[6]=y(W,J[6]),J[7]=y(N,J[7])}return J};R.exports=function(i){return m.hash(i,d,32,!0)}},{"./helpers":238}],242:[function(l,R,g){(function(m){"use strict";function y(d){return d&&d.__esModule?d:{default:d}}var c=l("babel-runtime/core-js/object/create"),o=y(c),u=l("babel-runtime/helpers/classCallCheck"),r=y(u),e=l("babel-runtime/helpers/createClass"),n=y(e),a=l("babel-runtime/helpers/typeof"),p=y(a);!function(d){if((g===void 0?"undefined":(0,p.default)(g))==="object"&&R!==void 0)R.exports=d();else if(typeof De=="function"&&De.amd)De([],d);else{var i;i=typeof window!="undefined"?window:m!==void 0?m:typeof self!="undefined"?self:this,i.mime=d()}}(function(){return function d(i,v,b){function _(C,S){if(!v[C]){if(!i[C]){var W=typeof l=="function"&&l;if(!S&&W)return W(C,!0);if(w)return w(C,!0);var N=new Error("Cannot find module '"+C+"'");throw N.code="MODULE_NOT_FOUND",N}var E=v[C]={exports:{}};i[C][0].call(E.exports,function(K){var z=i[C][1][K];return _(z||K)},E,E.exports,d,i,v,b)}return v[C].exports}for(var w=typeof l=="function"&&l,T=0;T<b.length;T++)_(b[T]);return _}({1:[function(d,i,v){var b=function(){function _(){(0,r.default)(this,_),this._types=(0,o.default)(null),this._extensions=(0,o.default)(null);for(var w=0;w<arguments.length;w++)this.define(arguments[w])}return(0,n.default)(_,[{key:"define",value:function(w,T){for(var C in w){for(var S=w[C],W=0;W<S.length;W++){var N=S[W];if(!T&&N in this._types)throw new Error('Attempt to change mapping for "'+N+'" extension from "'+this._types[N]+'" to "'+C+'". Pass `force=true` to allow this, otherwise remove "'+N+'" from the list of extensions for "'+C+'".');this._types[N]=C}!T&&this._extensions[C]||(this._extensions[C]=S[0])}}},{key:"getType",value:function(w){w=String(w);var T=w.replace(/^.*[\/\\]/,"").toLowerCase(),C=T.replace(/^.*\./,"").toLowerCase(),S=T.length<w.length;return(C.length<T.length-1||!S)&&this._types[C]||null}},{key:"getExtension",value:function(w){return(w=/^\s*([^;\s]*)/.test(w)&&RegExp.$1)&&this._extensions[w.toLowerCase()]||null}}]),_}();i.exports=b},{}],2:[function(d,i,v){var b=d("./Mime");i.exports=new b(d("./types/standard"),d("./types/other"))},{"./Mime":1,"./types/other":3,"./types/standard":4}],3:[function(d,i,v){i.exports={"application/prs.cww":["cww"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":[],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}},{}],4:[function(d,i,v){i.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":["woff"],"application/font-woff2":["woff2"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/xm":["xm"],"font/otf":["otf"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/webp":["webp"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}]},{},[2])(2)})}).call(this,typeof Ne!="undefined"?Ne:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"babel-runtime/core-js/object/create":19,"babel-runtime/helpers/classCallCheck":30,"babel-runtime/helpers/createClass":31,"babel-runtime/helpers/typeof":32}],243:[function(l,R,g){"use strict";g.encodeURIComponent=function(m){try{return encodeURIComponent(m)}catch(y){return m}},g.escape=l("escape-html"),g.timestamp=function(m){if(m){var y=m;return typeof y=="string"&&(y=Number(y)),String(m).length===10&&(y*=1e3),new Date(y)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(l,R,g){(function(m,y){"use strict";function c(N){return N&&N.__esModule?N:{default:N}}function o(N,E){return N===void 0?E:N}function u(N,E){return function(K,z,M){if(K)return E(K);N({data:z,status:M.statusCode,headers:M.headers,res:M})}}var r,e=l("babel-runtime/core-js/json/stringify"),n=c(e),a=l("babel-runtime/helpers/typeof"),p=c(a),d=l("util"),i=l("url"),v=l("http"),b=l("https"),_=l("debug")("urllib"),w=l("humanize-ms"),T=0,C=Math.pow(2,31)-10,S=/^https?:\/\//i;g.TIMEOUTS=[w("300s"),w("300s")];var W=["json","text"];g.request=function(N,E,K){return arguments.length===2&&typeof E=="function"&&(K=E,E=null),typeof K=="function"?g.requestWithCallback(N,E,K):(r||(r=l("any-promise")),new r(function(z,M){g.requestWithCallback(N,E,u(z,M))}))},g.requestWithCallback=function(N,E,K){function z(){Te&&(clearTimeout(Te),Te=null)}function M(){I&&(clearTimeout(I),I=null)}function G(je,ke,Le){if(M(),!K)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Z,m.pid,me.method,N),void(je&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),Z,m.pid,je.name,je.message,je.stack));var Oe=K;K=null;var pe={};if(Le&&(k=Le.statusCode,pe=Le.headers),k===401&&pe["www-authenticate"]&&(!E.headers||!E.headers.Authorization)&&E.digestAuth){var ve=pe["www-authenticate"];if(ve.indexOf("Digest ")>=0)return _("Request#%d %s: got digest auth header WWW-Authenticate: %s",Z,N,ve),E.headers=E.headers||{},E.headers.Authorization=digestAuthHeader(me.method,me.path,ve,E.digestAuth),_("Request#%d %s: auth with digest header: %s",Z,N,E.headers.Authorization),Le.headers["set-cookie"]&&(E.headers.Cookie=Le.headers["set-cookie"].join(";")),g.requestWithCallback(N,E,Oe)}var Ce=Date.now()-X;ze&&(ze.contentDownload=Ce),_("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Ce,A,k,me.method,me.host,me.path,L,ze);var xe={status:k,statusCode:k,headers:pe,size:A,aborted:le,rt:Ce,keepAliveSocket:L,data:ke,requestUrls:E.requestUrls,timing:ze,remoteAddress:_e,remotePort:Ge};if(je){var Ue="";ge&&typeof ge.getCurrentStatus=="function"&&(Ue=", agent status: "+(0,n.default)(ge.getCurrentStatus())),je.message+=", "+me.method+" "+N+" "+k+" (connected: "+h+", keepalive socket: "+L+Ue+`)
|
|
|
headers: `+(0,n.default)(pe),je.data=ke,je.path=me.path,je.status=k,je.headers=pe,je.res=xe}Oe(je,ke,E.streaming?Le:xe),E.emitter&&($.url=N,$.socket=Be&&Be.connection,$.options=me,$.size=de,E.emitter.emit("response",{requestId:Z,error:je,ctx:E.ctx,req:$,res:xe}))}function J(je){var ke=null;if(E.followRedirect&&statuses.redirect[je.statusCode]){E._followRedirectCount=(E._followRedirectCount||0)+1;var Le=je.headers.location;if(Le){if(!(E._followRedirectCount>E.maxRedirects)){var Oe=E.formatRedirectUrl?E.formatRedirectUrl(N,Le):i.resolve(N,Le);_("Request#%d %s: `redirected` from %s to %s",Z,me.path,N,Oe),M(),E.headers&&E.headers.Host&&S.test(Le)&&(E.headers.Host=null);var pe=K;return K=null,g.requestWithCallback(Oe,E,pe),{redirect:!0,error:null}}ke=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+N),ke.name="MaxRedirectError"}else ke=new Error("Got statusCode "+je.statusCode+" but cannot resolve next location from headers"),ke.name="FollowRedirectError"}return{redirect:!1,error:ke}}function te(je,ke,Le){return Le(null,ke,je.headers["content-encoding"])}function re(je){if(ze&&(ze.waiting=Date.now()-X),_("Request#%d %s `req response` event emit: status %d, headers: %j",Z,N,je.statusCode,je.headers),E.streaming){var ke=J(je);return ke.redirect?void je.resume():ke.error?(je.resume(),G(ke.error,null,je)):G(null,null,je)}if(je.on("close",function(){_("Request#%d %s: `res close` event emit, total size %d",Z,N,A)}),je.on("error",function(){_("Request#%d %s: `res error` event emit, total size %d",Z,N,A)}),je.on("aborted",function(){le=!0,_("Request#%d %s: `res aborted` event emit, total size %d",Z,N,A)}),Fe){var ke=J(je);return ke.redirect?void je.resume():ke.error?(je.resume(),Fe.end(),G(ke.error,null,je)):(E.consumeWriteStream===!1?je.on("end",G.bind(null,null,null,je)):isNode010||isNode012?first([[Fe,"close"],[je,"aborted"]],function(pe,ve,Ce){_("Request#%d %s: writeStream or res %s event emitted",Z,N,Ce),G(t||null,null,je)}):Fe.on("close",function(){_("Request#%d %s: writeStream close event emitted",Z,N),G(t||null,null,je)}),je.pipe(Fe))}var Le=[];je.on("data",function(Oe){_("Request#%d %s: `res data` event emit, size %d",Z,N,Oe.length),A+=Oe.length,Le.push(Oe)}),je.on("end",function(){var Oe=y.concat(Le,A);if(_("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Z,N,A,je._dumped),t)return G(t,Oe,je);var pe=J(je);if(pe.error)return G(pe.error,Oe,je);pe.redirect||te(je,Oe,function(ve,Ce,xe){if(ve)return G(ve,Oe,je);if(!xe&&W.indexOf(E.dataType)>=0){try{Ce=decodeBodyByCharset(Ce,je)}catch(Xe){return _("decodeBodyByCharset error: %s",Xe),G(null,Ce,je)}if(E.dataType==="json")if(A===0)Ce=null;else{var Ue=parseJSON(Ce,Ae);Ue.error?ve=Ue.error:Ce=Ue.data}}le&&_("Request#%d %s: Remote socket was terminated before `response.end()` was called",Z,N),G(ve,Ce,je)})})}function se(){_("Response timer ticking, timeout: %d",ot),I=setTimeout(function(){I=null;var je="Response timeout for "+ot+"ms";t=new Error(je),t.name="ResponseTimeoutError",t.requestId=Z,_("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Z,N,t.name,je,h),H()},ot)}function H(){_("Request#%d %s abort, connected: %s",Z,N,h),Be.socket||(t.noSocket=!0,G(t)),Be.abort()}if(!N||typeof N!="string"&&(N===void 0?"undefined":(0,p.default)(N))!=="object"){var he=d.format("expect request url to be a string or a http request options, but got %j",N);throw new Error(he)}arguments.length===2&&typeof E=="function"&&(K=E,E=null),E=E||{},T>=C&&(T=0);var Z=++T;E.requestUrls=E.requestUrls||[];var $={requestId:Z,url:N,args:E,ctx:E.ctx};E.emitter&&E.emitter.emit("request",$),E.timeout=E.timeout||g.TIMEOUTS,E.maxRedirects=E.maxRedirects||10,E.streaming=E.streaming||E.customResponse;var V,X=Date.now();typeof N=="string"?(S.test(N)||(N="http://"+N),V=i.parse(N)):V=N;var Q=(E.type||E.method||V.method||"GET").toUpperCase(),oe=V.port||80,we=v,ge=o(E.agent,g.agent),Ae=E.fixJSONCtlChars;V.protocol==="https:"&&(we=b,ge=o(E.httpsAgent,g.httpsAgent),V.port||(oe=443));var me={host:V.hostname||V.host||"localhost",path:V.path||"/",method:Q,port:oe,agent:ge,headers:E.headers||{},lookup:E.lookup};Array.isArray(E.timeout)?me.requestTimeout=E.timeout[E.timeout.length-1]:E.timeout!==void 0&&(me.requestTimeout=E.timeout);for(var ye=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],ue=0;ue<ye.length;ue++){var ae=ye[ue];E.hasOwnProperty(ae)&&(me[ae]=E[ae])}me.rejectUnauthorized!==!1||me.hasOwnProperty("secureOptions")||(me.secureOptions=l("constants").SSL_OP_NO_TLSv1_2);var ee=E.auth||V.auth;ee&&(me.auth=ee);var Ee=E.content||E.data,F=Q==="GET"||Q==="HEAD"||E.dataAsQueryString;if(!E.content&&Ee&&typeof Ee!="string"&&!y.isBuffer(Ee))if(F)Ee=E.nestedQuerystring?qs.stringify(Ee):querystring.stringify(Ee);else{var j=me.headers["Content-Type"]||me.headers["content-type"];j||(j=E.contentType==="json"?"application/json":"application/x-www-form-urlencoded",me.headers["Content-Type"]=j),Ee=parseContentType(j).type==="application/json"?(0,n.default)(Ee):E.nestedQuerystring?qs.stringify(Ee):querystring.stringify(Ee)}F&&Ee&&(me.path+=(V.query?"&":"?")+Ee,Ee=null);var de=0;if(Ee){var be=Ee.length;y.isBuffer(Ee)||(be=y.byteLength(Ee)),de=me.headers["Content-Length"]=be}E.dataType==="json"&&(me.headers.Accept="application/json"),typeof E.beforeRequest=="function"&&E.beforeRequest(me);var Te=null,I=null,t=null,h=!1,L=!1,A=0,k=-1,le=!1,_e="",Ge="",ze=null;E.timing&&(ze={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),me.headers["User-Agent"]||me.headers["user-agent"]||(me.headers["User-Agent"]=navigator.userAgent),E.gzip&&(me.headers["Accept-Encoding"]||me.headers["accept-encoding"]||(me.headers["Accept-Encoding"]="gzip"));var Fe=E.writeStream;_("Request#%d %s %s with headers %j, options.path: %s",Z,Q,N,me.headers,me.path),E.requestUrls.push(N);var Ke,ot;Array.isArray(E.timeout)?(Ke=w(E.timeout[0]),ot=w(E.timeout[1])):Ke=ot=w(E.timeout),_("ConnectTimeout: %d, ResponseTimeout: %d",Ke,ot);var Be;try{Be=we.request(me,re)}catch(je){return G(je)}return typeof window=="undefined"?function(){_("Connect timer ticking, timeout: %d",Ke),Te=setTimeout(function(){Te=null,k===-1&&(k=-2);var je="Connect timeout for "+Ke+"ms",ke="ConnectionTimeoutError";Be.socket||(ke="SocketAssignTimeoutError",je+=", working sockets is full"),t=new Error(je),t.name=ke,t.requestId=Z,_("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Z,N,t.name,je,h),H()},Ke)}():Be.on("requestTimeout",function(){k===-1&&(k=-2);var je="Connect timeout for "+Ke+"ms";t=new Error(je),t.name="ConnectionTimeoutError",t.requestId=Z,H()}),ze&&Be.on("finish",function(){ze.requestSent=Date.now()-X}),Be.once("socket",function(je){ze&&(ze.queuing=Date.now()-X),isNode010&&je.socket&&(je=je.socket);var ke=je.readyState;if(ke==="opening")return je.once("lookup",function(Le,Oe,pe){_("Request#%d %s lookup: %s, %s, %s",Z,N,Le,Oe,pe),ze&&(ze.dnslookup=Date.now()-X),Oe&&(_e=Oe)}),void je.once("connect",function(){ze&&(ze.connected=Date.now()-X),z(),se(),_("Request#%d %s new socket connected",Z,N),h=!0,_e||(_e=je.remoteAddress),Ge=je.remotePort});_("Request#%d %s reuse socket connected, readyState: %s",Z,N,ke),h=!0,L=!0,_e||(_e=je.remoteAddress),Ge=je.remotePort,z(),se()}),Be.on("error",function(je){je.name!=="Error"&&je.name!=="TypeError"||(je.name=h?"ResponseError":"RequestError"),je.message+=' (req "error")',_("Request#%d %s `req error` event emit, %s: %s",Z,N,je.name,je.message),G(t||je)}),Fe&&Fe.once("error",function(je){je.message+=' (writeStream "error")',t=je,_("Request#%d %s `writeStream error` event emit, %s: %s",Z,N,je.name,je.message),H()}),E.stream?(E.stream.pipe(Be),E.stream.once("error",function(je){je.message+=' (stream "error")',t=je,_("Request#%d %s `readStream error` event emit, %s: %s",Z,N,je.name,je.message),H()})):Be.end(Ee),Be.requestId=Z,Be}}).call(this,l("_process"),l("buffer").Buffer)},{_process:173,"any-promise":13,"babel-runtime/core-js/json/stringify":17,"babel-runtime/helpers/typeof":32,buffer:38,constants:42,debug:155,http:196,https:159,"humanize-ms":160,url:203,util:207}]},{},[1])(1)}),!function(De){function l(g){if(R[g])return R[g].exports;var m=R[g]={i:g,l:!1,exports:{}};return De[g].call(m.exports,m,m.exports,l),m.l=!0,m.exports}var R={};l.m=De,l.c=R,l.d=function(g,m,y){l.o(g,m)||Object.defineProperty(g,m,{configurable:!1,enumerable:!0,get:y})},l.n=function(g){var m=g&&g.__esModule?function(){return g.default}:function(){return g};return l.d(m,"a",m),m},l.o=function(g,m){return Object.prototype.hasOwnProperty.call(g,m)},l.p="",l(l.s=12)}([function(De,l,R){!function(g,m){De.exports=l=m()}(0,function(){var g=g||function(m,y){var c=Object.create||function(){function b(){}return function(_){var w;return b.prototype=_,w=new b,b.prototype=null,w}}(),o={},u=o.lib={},r=u.Base=function(){return{extend:function(b){var _=c(this);return b&&_.mixIn(b),_.hasOwnProperty("init")&&this.init!==_.init||(_.init=function(){_.$super.init.apply(this,arguments)}),_.init.prototype=_,_.$super=this,_},create:function(){var b=this.extend();return b.init.apply(b,arguments),b},init:function(){},mixIn:function(b){for(var _ in b)b.hasOwnProperty(_)&&(this[_]=b[_]);b.hasOwnProperty("toString")&&(this.toString=b.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),e=u.WordArray=r.extend({init:function(b,_){b=this.words=b||[],this.sigBytes=_!=null?_:4*b.length},toString:function(b){return(b||a).stringify(this)},concat:function(b){var _=this.words,w=b.words,T=this.sigBytes,C=b.sigBytes;if(this.clamp(),T%4)for(var S=0;S<C;S++){var W=w[S>>>2]>>>24-S%4*8&255;_[T+S>>>2]|=W<<24-(T+S)%4*8}else for(var S=0;S<C;S+=4)_[T+S>>>2]=w[S>>>2];return this.sigBytes+=C,this},clamp:function(){var b=this.words,_=this.sigBytes;b[_>>>2]&=4294967295<<32-_%4*8,b.length=m.ceil(_/4)},clone:function(){var b=r.clone.call(this);return b.words=this.words.slice(0),b},random:function(b){for(var _,w=[],T=0;T<b;T+=4){var C=function(S){var S=S,W=987654321,N=4294967295;return function(){W=36969*(65535&W)+(W>>16)&N,S=18e3*(65535&S)+(S>>16)&N;var E=(W<<16)+S&N;return E/=4294967296,(E+=.5)*(m.random()>.5?1:-1)}}(4294967296*(_||m.random()));_=987654071*C(),w.push(4294967296*C()|0)}return new e.init(w,b)}}),n=o.enc={},a=n.Hex={stringify:function(b){for(var _=b.words,w=b.sigBytes,T=[],C=0;C<w;C++){var S=_[C>>>2]>>>24-C%4*8&255;T.push((S>>>4).toString(16)),T.push((15&S).toString(16))}return T.join("")},parse:function(b){for(var _=b.length,w=[],T=0;T<_;T+=2)w[T>>>3]|=parseInt(b.substr(T,2),16)<<24-T%8*4;return new e.init(w,_/2)}},p=n.Latin1={stringify:function(b){for(var _=b.words,w=b.sigBytes,T=[],C=0;C<w;C++){var S=_[C>>>2]>>>24-C%4*8&255;T.push(String.fromCharCode(S))}return T.join("")},parse:function(b){for(var _=b.length,w=[],T=0;T<_;T++)w[T>>>2]|=(255&b.charCodeAt(T))<<24-T%4*8;return new e.init(w,_)}},d=n.Utf8={stringify:function(b){try{return decodeURIComponent(escape(p.stringify(b)))}catch(_){throw new Error("Malformed UTF-8 data")}},parse:function(b){return p.parse(unescape(encodeURIComponent(b)))}},i=u.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new e.init,this._nDataBytes=0},_append:function(b){typeof b=="string"&&(b=d.parse(b)),this._data.concat(b),this._nDataBytes+=b.sigBytes},_process:function(b){var _=this._data,w=_.words,T=_.sigBytes,C=this.blockSize,S=4*C,W=T/S;W=b?m.ceil(W):m.max((0|W)-this._minBufferSize,0);var N=W*C,E=m.min(4*N,T);if(N){for(var K=0;K<N;K+=C)this._doProcessBlock(w,K);var z=w.splice(0,N);_.sigBytes-=E}return new e.init(z,E)},clone:function(){var b=r.clone.call(this);return b._data=this._data.clone(),b},_minBufferSize:0}),v=(u.Hasher=i.extend({cfg:r.extend(),init:function(b){this.cfg=this.cfg.extend(b),this.reset()},reset:function(){i.reset.call(this),this._doReset()},update:function(b){return this._append(b),this._process(),this},finalize:function(b){return b&&this._append(b),this._doFinalize()},blockSize:16,_createHelper:function(b){return function(_,w){return new b.init(w).finalize(_)}},_createHmacHelper:function(b){return function(_,w){return new v.HMAC.init(b,w).finalize(_)}}}),o.algo={});return o}(Math);return g})},function(De,l,R){"use strict";function g(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(l,"__esModule",{value:!0});var m=function(){function c(o,u){for(var r=0;r<u.length;r++){var e=u[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(o,e.key,e)}}return function(o,u,r){return u&&c(o.prototype,u),r&&c(o,r),o}}(),y=function(){function c(){g(this,c)}return m(c,null,[{key:"detectIEVersion",value:function(){for(var o=4,u=document.createElement("div"),r=u.getElementsByTagName("i");u.innerHTML="<!--[if gt IE "+o+"]><i></i><![endif]-->",r[0];)o++;return o>4&&o}},{key:"extend",value:function(o,u){for(var r in u)Object.prototype.hasOwnProperty.call(u,r)&&u[r]&&(o[r]=u[r])}},{key:"isArray",value:function(o){return Object.prototype.toString.call(arg)==="[object Array]"}},{key:"getFileType",value:function(o){return o=o.toLowerCase(),/.mp4|.flv|.m3u8|.avi|.rm|.rmvb|.mpeg|.mpg|.mov|.wmv|.3gp|.asf|.dat|.dv|.f4v|.gif|.m2t|.m4v|.mj2|.mjpeg|.mpe|.mts|.ogg|.qt|.swf|.ts|.vob|.wmv|.webm/.test(o)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(o)?"audio":/.bmp|.jpg|.jpeg|.png/.test(o)?"img":"other"}},{key:"isImage",value:function(o){return o=o.toLowerCase(),!!/.jpg|.jpeg|.png/.test(o)}},{key:"ISODateString",value:function(o){function u(r){return r<10?"0"+r:r}return o.getUTCFullYear()+"-"+u(o.getUTCMonth()+1)+"-"+u(o.getUTCDate())+"T"+u(o.getUTCHours())+":"+u(o.getUTCMinutes())+":"+u(o.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(o){return!!/^\d+$/.test(o)}}]),c}();l.default=y},function(De,l,R){!function(g,m){De.exports=l=m(R(0))}(0,function(g){return function(m){function y(v,b,_,w,T,C,S){var W=v+(b&_|~b&w)+T+S;return(W<<C|W>>>32-C)+b}function c(v,b,_,w,T,C,S){var W=v+(b&w|_&~w)+T+S;return(W<<C|W>>>32-C)+b}function o(v,b,_,w,T,C,S){var W=v+(b^_^w)+T+S;return(W<<C|W>>>32-C)+b}function u(v,b,_,w,T,C,S){var W=v+(_^(b|~w))+T+S;return(W<<C|W>>>32-C)+b}var r=g,e=r.lib,n=e.WordArray,a=e.Hasher,p=r.algo,d=[];!function(){for(var v=0;v<64;v++)d[v]=4294967296*m.abs(m.sin(v+1))|0}();var i=p.MD5=a.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(v,b){for(var _=0;_<16;_++){var w=b+_,T=v[w];v[w]=16711935&(T<<8|T>>>24)|4278255360&(T<<24|T>>>8)}var C=this._hash.words,S=v[b+0],W=v[b+1],N=v[b+2],E=v[b+3],K=v[b+4],z=v[b+5],M=v[b+6],G=v[b+7],J=v[b+8],te=v[b+9],re=v[b+10],se=v[b+11],H=v[b+12],he=v[b+13],Z=v[b+14],$=v[b+15],V=C[0],X=C[1],Q=C[2],oe=C[3];V=y(V,X,Q,oe,S,7,d[0]),oe=y(oe,V,X,Q,W,12,d[1]),Q=y(Q,oe,V,X,N,17,d[2]),X=y(X,Q,oe,V,E,22,d[3]),V=y(V,X,Q,oe,K,7,d[4]),oe=y(oe,V,X,Q,z,12,d[5]),Q=y(Q,oe,V,X,M,17,d[6]),X=y(X,Q,oe,V,G,22,d[7]),V=y(V,X,Q,oe,J,7,d[8]),oe=y(oe,V,X,Q,te,12,d[9]),Q=y(Q,oe,V,X,re,17,d[10]),X=y(X,Q,oe,V,se,22,d[11]),V=y(V,X,Q,oe,H,7,d[12]),oe=y(oe,V,X,Q,he,12,d[13]),Q=y(Q,oe,V,X,Z,17,d[14]),X=y(X,Q,oe,V,$,22,d[15]),V=c(V,X,Q,oe,W,5,d[16]),oe=c(oe,V,X,Q,M,9,d[17]),Q=c(Q,oe,V,X,se,14,d[18]),X=c(X,Q,oe,V,S,20,d[19]),V=c(V,X,Q,oe,z,5,d[20]),oe=c(oe,V,X,Q,re,9,d[21]),Q=c(Q,oe,V,X,$,14,d[22]),X=c(X,Q,oe,V,K,20,d[23]),V=c(V,X,Q,oe,te,5,d[24]),oe=c(oe,V,X,Q,Z,9,d[25]),Q=c(Q,oe,V,X,E,14,d[26]),X=c(X,Q,oe,V,J,20,d[27]),V=c(V,X,Q,oe,he,5,d[28]),oe=c(oe,V,X,Q,N,9,d[29]),Q=c(Q,oe,V,X,G,14,d[30]),X=c(X,Q,oe,V,H,20,d[31]),V=o(V,X,Q,oe,z,4,d[32]),oe=o(oe,V,X,Q,J,11,d[33]),Q=o(Q,oe,V,X,se,16,d[34]),X=o(X,Q,oe,V,Z,23,d[35]),V=o(V,X,Q,oe,W,4,d[36]),oe=o(oe,V,X,Q,K,11,d[37]),Q=o(Q,oe,V,X,G,16,d[38]),X=o(X,Q,oe,V,re,23,d[39]),V=o(V,X,Q,oe,he,4,d[40]),oe=o(oe,V,X,Q,S,11,d[41]),Q=o(Q,oe,V,X,E,16,d[42]),X=o(X,Q,oe,V,M,23,d[43]),V=o(V,X,Q,oe,te,4,d[44]),oe=o(oe,V,X,Q,H,11,d[45]),Q=o(Q,oe,V,X,$,16,d[46]),X=o(X,Q,oe,V,N,23,d[47]),V=u(V,X,Q,oe,S,6,d[48]),oe=u(oe,V,X,Q,G,10,d[49]),Q=u(Q,oe,V,X,Z,15,d[50]),X=u(X,Q,oe,V,z,21,d[51]),V=u(V,X,Q,oe,H,6,d[52]),oe=u(oe,V,X,Q,E,10,d[53]),Q=u(Q,oe,V,X,re,15,d[54]),X=u(X,Q,oe,V,W,21,d[55]),V=u(V,X,Q,oe,J,6,d[56]),oe=u(oe,V,X,Q,$,10,d[57]),Q=u(Q,oe,V,X,M,15,d[58]),X=u(X,Q,oe,V,he,21,d[59]),V=u(V,X,Q,oe,K,6,d[60]),oe=u(oe,V,X,Q,se,10,d[61]),Q=u(Q,oe,V,X,N,15,d[62]),X=u(X,Q,oe,V,te,21,d[63]),C[0]=C[0]+V|0,C[1]=C[1]+X|0,C[2]=C[2]+Q|0,C[3]=C[3]+oe|0},_doFinalize:function(){var v=this._data,b=v.words,_=8*this._nDataBytes,w=8*v.sigBytes;b[w>>>5]|=128<<24-w%32;var T=m.floor(_/4294967296),C=_;b[15+(w+64>>>9<<4)]=16711935&(T<<8|T>>>24)|4278255360&(T<<24|T>>>8),b[14+(w+64>>>9<<4)]=16711935&(C<<8|C>>>24)|4278255360&(C<<24|C>>>8),v.sigBytes=4*(b.length+1),this._process();for(var S=this._hash,W=S.words,N=0;N<4;N++){var E=W[N];W[N]=16711935&(E<<8|E>>>24)|4278255360&(E<<24|E>>>8)}return S},clone:function(){var v=a.clone.call(this);return v._hash=this._hash.clone(),v}});r.MD5=a._createHelper(i),r.HmacMD5=a._createHmacHelper(i)}(Math),g.MD5})},function(De,l,R){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},l.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},l.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(De,l,R){"use strict";function g(i){return i&&i.__esModule?i:{default:i}}function m(i,v){if(!(i instanceof v))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(l,"__esModule",{value:!0});var y=function(){function i(v,b){for(var _=0;_<b.length;_++){var w=b[_];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}return function(v,b,_){return b&&i(v.prototype,b),_&&i(v,_),v}}(),c=R(5),o=g(c),u=R(25),r=g(u),e=R(6),n=g(e),a=R(7),p=g(a),d=function(){function i(v){m(this,i);var b=p.default.os.name,_=p.default.os.version||"",w=p.default.browser.name,T=p.default.browser.version||"",C=window.location.href,S="";C&&(S=p.default.getHost(C));var W="pc";p.default.os.ipad?W="pad":(p.default.os.iphone||p.default.os.android)&&(W="phone"),this._ri=o.default.create(),this.initParam={APIVersion:"0.6.0",lv:"1",av:n.default.version,pd:"upload",sm:"upload",md:"uploader",uuid:i.getUuid(),os:b,ov:_,et:w,ev:T,uat:navigator.userAgent,app_n:S,tt:W,dm:"h5",ut:""}}return y(i,[{key:"log",value:function(v,b){b&&b.ri?(this._ri=b.ri,delete b.ri):this._ri=o.default.create(),b&&b.ut&&(this.initParam.ut=b.ut,delete b.ut),this.initParam.t=new Date().getTime(),this.initParam.ll=v=="20006"?"error":"info",this.initParam.ri=this._ri,this.initParam.e=v;var _=[];if(b)for(var w in b)_.push(w+"="+b[w]);var T=_.join("&");this.initParam.args=encodeURIComponent(T==""?"0":T);var C=[];for(var w in this.initParam)C.push(w+"="+this.initParam[w]);var S=C.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(S):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+S}}],[{key:"getUuid",value:function(){var v=r.default.get("p_h5_upload_u");return v||(v=o.default.create(),r.default.set("p_h5_upload_u",v,730)),v}},{key:"getClientId",value:function(){return r.default.get("p_h5_upload_clientId")}},{key:"setClientId",value:function(v){return v||(v=o.default.create()),r.default.set("p_h5_upload_clientId",v,730),v}}]),i}();l.default=d},function(De,l,R){"use strict";function g(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(l,"__esModule",{value:!0});var m=function(){function c(o,u){for(var r=0;r<u.length;r++){var e=u[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(o,e.key,e)}}return function(o,u,r){return u&&c(o.prototype,u),r&&c(o,r),o}}(),y=function(){function c(){g(this,c)}return m(c,null,[{key:"create",value:function(o,u){var r,e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),n=[];if(u=u||e.length,o)for(r=0;r<o;r++)n[r]=e[0|Math.random()*u];else{var a;for(n[8]=n[13]=n[18]=n[23]="-",n[14]="4",r=0;r<36;r++)n[r]||(a=0|16*Math.random(),n[r]=e[r==19?3&a|8:a])}return n.join("")}}]),c}();l.default=y},function(De,l,R){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var g={version:"1.5.0"};l.default=g},function(De,l,R){"use strict";function g(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(l,"__esModule",{value:!0});var m=function(){function e(n,a){for(var p=0;p<a.length;p++){var d=a[p];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(n,d.key,d)}}return function(n,a,p){return a&&e(n.prototype,a),p&&e(n,p),n}}(),y=function(e){var n=navigator.userAgent,a="other";if(e.ios)return"iOS";if(e.android)return"android";if(n.indexOf("Baiduspider")>-1)return"Baiduspider";if(n.indexOf("PlayStation")>-1)return"PS4";var p=navigator.platform=="Win32"||navigator.platform=="Windows"||n.indexOf("Windows")>-1,d=navigator.platform=="Mac68K"||navigator.platform=="MacPPC"||navigator.platform=="Macintosh"||navigator.platform=="MacIntel";return d&&(a="macOS"),navigator.platform=="X11"&&!p&&!d&&(a="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(a="Linux"),p?"windows":a},c=function(){var e=navigator.userAgent,n="";return(e.indexOf("Windows NT 5.0")>-1||e.indexOf("Windows 2000")>-1)&&(n="2000"),(e.indexOf("Windows NT 5.1")>-1||e.indexOf("Windows XP")>-1)&&(n="XP"),(e.indexOf("Windows NT 5.2")>-1||e.indexOf("Windows 2003")>-1)&&(n="2003"),(e.indexOf("Windows NT 6.0")>-1||e.indexOf("Windows Vista")>-1)&&(n="Vista"),(e.indexOf("Windows NT 6.1")>-1||e.indexOf("Windows 7")>-1)&&(n="7"),(e.indexOf("Windows NT 6.2")>-1||e.indexOf("Windows 8")>-1)&&(n="8"),(e.indexOf("Windows NT 6.3")>-1||e.indexOf("Windows 8.1")>-1)&&(n="8.1"),(e.indexOf("Windows NT 10")>-1||e.indexOf("Windows 10")>-1)&&(n="10"),n},o=function(e){var n=navigator.userAgent.toLowerCase();return e.chrome?"Chrome":e.firefox?"Firefox":e.safari?"Safari":e.webview?"webview":e.ie?/edge/.test(n)?"Edge":"IE":/baiduspider/.test(n)?"Baiduspider":/ucweb/.test(n)||/UCBrowser/.test(n)?"UC":/opera/.test(n)?"Opera":/ucweb/.test(n)?"UC":/360se/.test(n)?"360\u6D4F\u89C8\u5668":/bidubrowser/.test(n)?"\u767E\u5EA6\u6D4F\u89C8\u5668":/metasr/.test(n)?"\u641C\u72D7\u6D4F\u89C8\u5668":/lbbrowser/.test(n)?"\u730E\u8C79\u6D4F\u89C8\u5668":/micromessenger/.test(n)?"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668":/qqbrowser/.test(n)?"QQ\u6D4F\u89C8\u5668":/playstation/.test(n)?"PS4\u6D4F\u89C8\u5668":void 0},u=function(){var e={},n={},a=navigator.userAgent,p=navigator.platform,d=a.match(/Web[kK]it[\/]{0,1}([\d.]+)/),i=a.match(/(Android);?[\s\/]+([\d.]+)?/),v=!!a.match(/\(Macintosh\; Intel /),b=a.match(/(iPad).*OS\s([\d_]+)/),_=a.match(/(iPod)(.*OS\s([\d_]+))?/),w=!b&&a.match(/(iPhone\sOS)\s([\d_]+)/),T=a.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),C=/Win\d{2}|Windows/.test(p),S=a.match(/Windows Phone ([\d.]+)/),W=T&&a.match(/TouchPad/),N=a.match(/Kindle\/([\d.]+)/),E=a.match(/Silk\/([\d._]+)/),K=a.match(/(BlackBerry).*Version\/([\d.]+)/),z=a.match(/(BB10).*Version\/([\d.]+)/),M=a.match(/(RIM\sTablet\sOS)\s([\d.]+)/),G=a.match(/PlayBook/),J=a.match(/Chrome\/([\d.]+)/)||a.match(/CriOS\/([\d.]+)/),te=a.match(/Firefox\/([\d.]+)/),re=a.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),se=a.match(/MSIE\s([\d.]+)/)||a.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),H=!J&&a.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),he=H||a.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((n.webkit=!!d)&&(n.version=d[1]),i&&(e.android=!0,e.version=i[2]),w&&!_&&(e.ios=e.iphone=!0,e.version=w[2].replace(/_/g,".")),b&&(e.ios=e.ipad=!0,e.version=b[2].replace(/_/g,".")),_&&(e.ios=e.ipod=!0,e.version=_[3]?_[3].replace(/_/g,"."):null),S&&(e.wp=!0,e.version=S[1]),T&&(e.webos=!0,e.version=T[2]),W&&(e.touchpad=!0),K&&(e.blackberry=!0,e.version=K[2]),z&&(e.bb10=!0,e.version=z[2]),M&&(e.rimtabletos=!0,e.version=M[2]),G&&(n.playbook=!0),N&&(e.kindle=!0,e.version=N[1]),E&&(n.silk=!0,n.version=E[1]),!E&&e.android&&a.match(/Kindle Fire/)&&(n.silk=!0),J&&(n.chrome=!0,n.version=J[1]),te&&(n.firefox=!0,n.version=te[1]),re&&(e.firefoxos=!0,e.version=re[1]),se&&(n.ie=!0,n.version=se[1]),he&&(v||e.ios||C||i)&&(n.safari=!0,e.ios||(n.version=he[1])),H&&(n.webview=!0),v){var Z=a.match(/[\d]*_[\d]*_[\d]*/);Z&&Z.length>0&&Z[0]&&(e.version=Z[0].replace(/_/g,"."))}return e.tablet=!!(b||G||i&&!a.match(/Mobile/)||te&&a.match(/Tablet/)||se&&!a.match(/Phone/)&&a.match(/Touch/)),e.phone=!(e.tablet||e.ipod||!(i||w||T||K||z||J&&a.match(/Android/)||J&&a.match(/CriOS\/([\d.]+)/)||te&&a.match(/Mobile/)||se&&a.match(/Touch/))),e.pc=!e.tablet&&!e.phone,v?e.name="macOS":C?(e.name="windows",e.version=c()):e.name=y(e),n.name=o(n),{os:e,browser:n}}(),r=function(){function e(){g(this,e)}return m(e,null,[{key:"getHost",value:function(n){var a="";if(n===void 0||n==null||n=="")return"";var p=n.indexOf("//"),d=n;p>-1&&(d=n.substring(p+2));var a=d,i=d.split("/");return i&&i.length>0&&(a=i[0]),i=a.split(":"),i&&i.length>0&&(a=i[0]),a}},{key:"os",get:function(){return u.os}},{key:"browser",get:function(){var n=u.browser;return n.name||(n.name=o()),n}}]),e}();l.default=r},function(De,l,R){"use strict";function g(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(l,"__esModule",{value:!0});var m=function(){function c(o,u){for(var r=0;r<u.length;r++){var e=u[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(o,e.key,e)}}return function(o,u,r){return u&&c(o.prototype,u),r&&c(o,r),o}}(),y=function(){function c(){g(this,c)}return m(c,null,[{key:"get",value:function(o,u,r,e,n){var a;r=r||function(){},typeof XMLHttpRequest=="undefined"&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(p){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(p){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(p){}throw new Error("This browser does not support XMLHttpRequest.")}),a=new XMLHttpRequest,a.onreadystatechange=function(){a.readyState===4&&(a.status===200?u(a.responseText):r(a.responseText))};try{e===void 0&&(e=!0),a.open("GET",o,e),n&&(a.withCredentials=!0)}catch(p){return void r(p)}try{a.send()}catch(p){r(p)}}}]),c}();l.default=y},function(De,l,R){"use strict";function g(u,r){if(!(u instanceof r))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(l,"__esModule",{value:!0});var m=function(){function u(r,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,e,n){return e&&u(r.prototype,e),n&&u(r,n),r}}(),y=R(27),c=R(30),o=(R(10),function(){function u(){g(this,u)}return m(u,null,[{key:"randomUUID",value:function(){for(var r=[],e="0123456789abcdef",n=0;n<36;n++)r[n]=e.substr(Math.floor(16*Math.random()),1);return r[14]="4",r[19]=e.substr(3&r[19]|8,1),r[8]=r[13]=r[18]=r[23]="-",r.join("")}},{key:"aliyunEncodeURI",value:function(r){var e=encodeURIComponent(r);return e=e.replace(/\+/g,"%20").replace(/\*/g,"%2A").replace(/%7E/g,"~").replace(/!/g,"%21").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27")}},{key:"makeUTF8sort",value:function(r,e,n){if(!r)throw new Error("PrismPlayer Error: vid should not be null!");var a=[];for(var p in r)a.push(p);for(var d=a.sort(),i="",v=d.length,p=0;p<v;p++){var b=u.aliyunEncodeURI(d[p]),_=u.aliyunEncodeURI(r[d[p]]);i==""?i=b+e+_:i+=n+b+e+_}return i}},{key:"makeChangeSiga",value:function(r,e){if(!r)throw new Error("PrismPlayer Error: vid should not be null!");return c.stringify(y("GET&"+u.aliyunEncodeURI("/")+"&"+u.aliyunEncodeURI(u.makeUTF8sort(r,"=","&")),e+"&"))}}]),u}());l.default=o},function(De,l,R){!function(g,m){De.exports=l=m(R(0))}(0,function(g){return g.enc.Utf8})},function(De,l,R){!function(g,m){De.exports=l=m(R(0))}(0,function(g){return g.enc.Hex})},function(De,l,R){De.exports=R(13)},function(De,l,R){"use strict";var g,m,y=(typeof Symbol=="function"&&Symbol.iterator,R(14)),c=function(u){return u&&u.__esModule?u:{default:u}}(y),o={Vod:c.default};g=[],(m=function(){return o}.apply(l,g))!==void 0&&(De.exports=m),window.AliyunUpload=o,lt.exports=AliyunUpload},function(De,l,R){"use strict";function g(z){return z&&z.__esModule?z:{default:z}}function m(z,M){if(!(z instanceof M))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(l,"__esModule",{value:!0});var y=function(){function z(M,G){for(var J=0;J<G.length;J++){var te=G[J];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(M,te.key,te)}}return function(M,G,J){return G&&z(M.prototype,G),J&&z(M,J),M}}(),c=R(15),o=R(3),u=R(16),r=g(u),e=R(18),n=g(e),a=R(24),p=g(a),d=R(4),i=g(d),v=R(1),b=g(v),_=R(5),w=g(_),T=R(26),C=g(T),S=R(31),W=g(S),N=R(32),E=g(N),K=(R(2),function(){function z(M){m(this,z),this.options=M,this.options.partSize=this.options.partSize||o.UPLOADDEFAULT.PARTSIZE,this.options.parallel=this.options.parallel||o.UPLOADDEFAULT.PARALLEL,this.options.region=this.options.region||"cn-shanghai",this.options.cname=this.options.cname||!1,this.options.localCheckpoint=this.options.localCheckpoint||!1,this.options.enableUploadProgress===void 0&&(this.options.enableUploadProgress=!0),this._ossCreditor=new Object,this._state=c.VODSTATE.INIT,this._uploadList=[],this._curIndex=-1,this._ossUpload=null,this._log=new i.default,this._retryCount=0,this._retryTotal=this.options.retryCount||3,this._retryDuration=this.options.retryDuration||2,this._state=c.VODSTATE.INIT,this._uploadWay="vod",this._onbeforeunload=!1,this._invalidUserId=!1,this._initEvent()}return y(z,[{key:"init",value:function(M,G,J,te){return this._retryCount=0,!(J&&!te||!J&&te)&&!(M&&!G||!M&&G)&&(this._ossCreditor.accessKeyId=M,this._ossCreditor.accessKeySecret=G,this._ossCreditor.securityToken=J,this._ossCreditor.expireTime=te,!0)}},{key:"addFile",value:function(M,G,J,te,re,se){if(!M)return!1;if(M.size==0)try{this.options.onUploadFailed({file:M},"EmptyFile","\u6587\u4EF6\u5927\u5C0F\u4E3A0\uFF0C\u4E0D\u80FD\u4E0A\u4F20")}catch($){console.log($)}for(var H=(this.options,0);H<this._uploadList.length;H++)if(this._uploadList[H].file==M)return!1;var he=new Object;if(he.file=M,he._endpoint=G,he._bucket=J,he._object=te,he.state=c.UPLOADSTATE.INIT,he.isImage=b.default.isImage(M.name),!he.isImage&&this.options.enableUploadProgress){var Z=this;E.default.getMd5(M,function($){he.fileHash=$;var V=Z._getCheckoutpoint(he);Z.options.localCheckpoint||V||Z._getCheckoutpointFromCloud(he,function(X){if(X.UploadPoint){var Q=JSON.parse(X.UploadPoint);Q.loaded!=1&&(he.checkpoint=Q.checkpoint,he.loaded=Q.loaded,he.videoId=X.VideoId,Z._saveCheckoutpoint(he,Q.checkpoint))}},function(X){try{if((X=JSON.parse(X))&&X.Code=="InvalidParameter"&&X.Message.indexOf("UserId")>0){Z._invalidUserId=!0;var Q=X.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(Q)}}catch(oe){console.log(oe)}})})}re&&(he.videoInfo=re?JSON.parse(re).Vod:{},he.userData=n.default.encode(re)),he.ri=w.default.create(),this._uploadList.push(he),this._reportLog("20001",he,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(he)}catch($){console.log($)}return!0}},{key:"deleteFile",value:function(M){return!!this.cancelFile(M)&&(this._uploadList.splice(M,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(M){if(this.options,M<0||M>=this._uploadList.length)return!1;var G=this._uploadList[M];if(M==this._curIndex&&G.state==c.UPLOADSTATE.UPLOADING){G.state=c.UPLOADSTATE.CANCELED;var J=this._getCheckoutpoint(G);J&&J.checkpoint&&(J=J.checkpoint),J&&this._ossUpload.abort(G),this._removeCheckoutpoint(G),this.nextUpload()}else G.state!=c.UPLOADSTATE.SUCCESS&&(G.state=c.UPLOADSTATE.CANCELED);return this._reportLog("20008",G),!0}},{key:"resumeFile",value:function(M){if(this.options,M<0||M>=this._uploadList.length)return!1;var G=this._uploadList[M];return G.state==c.UPLOADSTATE.CANCELED&&(G.state=c.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(M){return this._getCheckoutpoint({file:M})}},{key:"startUpload",value:function(M){if(this._retryCount=0,this.options,this._state==c.VODSTATE.START||this._state==c.VODSTATE.EXPIRE)return void console.log("already started or expired");if(this._initState(),this._curIndex=this._findUploadIndex(),this._curIndex==-1)return void(this._state=c.VODSTATE.END);var G=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(G),this._state=c.VODSTATE.START}},{key:"nextUpload",value:function(){var M=this.options;if(this._state==c.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),this._curIndex!=-1){var G=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(G)}else{this._state=c.VODSTATE.END;try{M.onUploadEnd&&M.onUploadEnd(G)}catch(J){console.log(J)}}}},{key:"clear",value:function(M){for(var G=this.options,J=0,te=0;te<this._uploadList.length;te++)G.uploadList[te].state==c.UPLOADSTATE.SUCCESS&&J++,this._uploadList[te].state==M&&(G.uploadList.splice(te,1),te--);G.onClear&&G.onClear(G.uploadList.length,J)}},{key:"stopUpload",value:function(){if((this._state==c.VODSTATE.START||this._state==c.VODSTATE.FAILURE||this._curIndex==-1)&&this._curIndex!=-1){var M=this._uploadList[this._curIndex];this._state=c.VODSTATE.STOP,M.state=c.UPLOADSTATE.STOPED,this._changeState(M,c.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(M){var G=this;if(!M)return!1;var J=JSON.parse(n.default.decode(M));return!!(J.AccessKeyId&&J.AccessKeySecret&&J.SecurityToken&&J.Expiration)&&G.resumeUploadWithToken(J.AccessKeyId,J.AccessKeySecret,J.SecurityToken,J.Expiration)}},{key:"resumeUploadWithToken",value:function(M,G,J,te){if(this.options,!(M&&G&&J&&te))return!1;if(this._state!=c.VODSTATE.EXPIRE)return!1;if(this._curIndex==-1)return!1;var re="";return this._uploadList.length>this._curIndex&&(re=this._uploadList[this._curIndex]),re&&(this.init(M,G,J,te),this._state=c.VODSTATE.START,this._ossUpload=null,this._uploadCore(re,re.retry),re.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(M,G,J){if(this._curIndex==-1)return!1;if(this._state!=c.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var te=this._uploadList[this._curIndex];te.object?this._refreshSTSTokenUpload(te,M,G,J):this.setSTSToken(te,M,G,J)}}},{key:"setSTSTokenDirectlyUpload",value:function(M,G,J,te,re){if(!(G&&J&&te&&re))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var se=M;this.init(G,J,te,re),se.endpoint=se._endpoint,se.bucket=se._bucket,se.object=se._object,this._ossUpload=null,this._uploadCore(se,M.retry),M.retry=!1}},{key:"setSTSToken",value:function(M,G,J,te){if(!G||!J||!te)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var re=M.videoInfo,se={accessKeyId:G,securityToken:te,accessKeySecret:J,fileName:M.file.name,title:re.Title,requestId:M.ri,region:this.options.region};re.ImageType&&(se.imageType=re.ImageType),re.ImageExt&&(se.imageExt=re.ImageExt),re.FileSize&&(se.fileSize=re.FileSize),re.Description&&(se.description=re.Description),re.CateId&&(se.cateId=re.CateId),re.Tags&&(se.tags=re.Tags),re.TemplateGroupId&&(se.templateGroupId=re.TemplateGroupId),re.StorageLocation&&(se.storageLocation=re.StorageLocation),re.CoverURL&&(se.coverUrl=re.CoverURL),re.TransCodeMode&&(se.transCodeMode=re.TransCodeMode),re.UserData&&(se.userData=re.UserData);var H=this,he="getUploadAuth";M.videoId?(se.videoId=M.videoId,he="refreshUploadAuth"):M.isImage&&(he="getImageUploadAuth"),C.default[he](se,function(Z){M.videoId=Z.VideoId?Z.VideoId:M.videoId,H.setUploadAuthAndAddress(M,Z.UploadAuth,Z.UploadAddress),H._state=c.VODSTATE.START},function(Z){H._error(M,{name:Z.Code,code:Z.Code,message:Z.Message,requestId:Z.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(M,G,J,te){if(!M||!G||!J)return!1;var re=JSON.parse(n.default.decode(G));if(!(re.AccessKeyId&&re.AccessKeySecret&&re.SecurityToken&&re.Expiration))return console.error("uploadauth is invalid"),!1;var se={},H=M;if(J){if(se=JSON.parse(n.default.decode(J)),!se.Endpoint||!se.Bucket||!se.FileName)return console.error("uploadAddress is invalid"),!1}else se.Endpoint=H.endpoint,se.Bucket=H.bucket,se.FileName=H.object;this._ut="vod",this._uploadWay="vod",this.options.region=re.Region||this.options.region,this.init(re.AccessKeyId,re.AccessKeySecret,re.SecurityToken,re.Expiration),H.endpoint=H._endpoint?H._endpoint:se.Endpoint,H.bucket=H._bucket?H._bucket:se.Bucket,H.object=H._object?H._object:se.FileName,H.region=this.options.region,te&&(H.videoId=te),this._ossUpload=null,this._uploadCore(H,M.retry),M.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(M,G,J,te){if(!G||!J||!te)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var re={accessKeyId:G,securityToken:te,accessKeySecret:J,videoId:M.object,requestId:M.ri,region:this.options.region},se=this,H="refreshUploadAuth";M.isImage&&(H="getImageUploadAuth"),C.default[H](re,function(he){se.setUploadAuthAndAddress(M,he.UploadAuth,UploadAddress),se._state=c.VODSTATE.START},function(he){se._error(M,{name:he.Code,code:he.Code,message:he.Message,requestId:he.RequestId})})}},{key:"_upload",value:function(M){var G=arguments.length>1&&arguments[1]!==void 0&&arguments[1],J=this.options;if(M.retry=G,J.onUploadstarted&&!G)try{var te=this._getCheckoutpoint(M);te&&te.state!=c.UPLOADSTATE.UPLOADING&&(M.checkpoint=te,M.videoId=te.videoId),J.onUploadstarted(M)}catch(re){console.log(re)}}},{key:"_uploadCore",value:function(M){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1],!this._ossCreditor.accessKeyId||!this._ossCreditor.accessKeySecret||!this._ossCreditor.securityToken)throw new Error("AccessKeyId\u3001AccessKeySecret\u3001securityToken should not be null");if(M.state=c.UPLOADSTATE.UPLOADING,!this._ossUpload){M.endpoint=M.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var G=this;this._ossUpload=new r.default({bucket:M.bucket,endpoint:M.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(Z,$){G._error.call(G,Z,$)},oncomplete:function(Z,$){G._complete.call(G,Z,$)},onprogress:function(Z,$,V){G._progress.call(G,Z,$,V)}})}var J=b.default.getFileType(M.file.name),te=this._getCheckoutpoint(M),re="",se="";te&&te.checkpoint&&(se=te.state,re=te.videoId,te=te.checkpoint),te&&re==M.videoId&&se!=c.UPLOADSTATE.UPLOADING&&(te.file=M.file,M.checkpoint=te,te.uploadId);var H=this._adjustPartSize(M);this._reportLog("20002",M,{ft:J,fs:M.file.size,bu:M.bucket,ok:M.object,vid:M.videoId||"",fn:M.file.name,fw:null,fh:null,ps:H});var he={headers:{"x-oss-notification":M.userData?M.userData:""},partSize:H,parallel:this.options.parallel};this._ossUpload.upload(M,he)}},{key:"_findUploadIndex",value:function(){for(var M=-1,G=0;G<this._uploadList.length;G++)if(this._uploadList[G].state==c.UPLOADSTATE.INIT){M=G;break}return M}},{key:"_error",value:function(M,G){if(G.name=="cancel")try{this.options.onUploadCanceled(M,G)}catch(te){console.log(te)}else{if(G.message.indexOf("InvalidAccessKeyIdError")>0||G.name=="SignatureDoesNotMatchError"||G.code=="SecurityTokenExpired"||G.code=="InvalidSecurityToken.Expired"||G.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=c.VODSTATE.EXPIRE,M.state=c.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(M,G)}catch(te){console.log(te)}}return}if((G.name=="RequestTimeoutError"||G.name=="ConnectionTimeout"||G.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var J=this;return setTimeout(function(){J._uploadCore(M,!0)},1e3*J._retryDuration),void this._retryCount++}G.name=="NoSuchUploadError"&&this._removeCheckoutpoint(M),this._handleError(M,G)}}},{key:"_handleError",value:function(M,G){var J=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],te=c.UPLOADSTATE.FAIlURE;if(M.state!=c.UPLOADSTATE.CANCELED&&(M.state=c.UPLOADSTATE.FAIlURE,this._state=c.VODSTATE.FAILURE,this.options.onUploadFailed&&G&&G.code&&G.message))try{this.options.onUploadFailed(M,G.code,G.message)}catch(se){console.log(se)}if(J&&this._changeState(M,te),this._reportLog("20006",M,{code:G.name,message:G.message,requestId:G.requestId,fs:M.file.size,bu:M.bucket,ok:M.object,fn:M.file.name}),this._reportLog("20004",M,{requestId:G.requestId,fs:M.file.size,bu:M.bucket,ok:M.object,fn:M.file.name}),M.ri=w.default.create(),this._findUploadIndex()!=-1){var re=this;this._state=c.VODSTATE.START,setTimeout(function(){re.nextUpload()},100)}}},{key:"_complete",value:function(M,G){if(M.state=c.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(M)}catch(re){console.log(re)}var J=0;G&&G.res&&G.res.headers&&(J=G.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(M);var te=this;setTimeout(function(){te.nextUpload()},100),this._retryCount=0,this._reportLog("20003",M,{requestId:J})}},{key:"_progress",value:function(M,G,J){if(this.options.onUploadProgress)try{M.loaded=G.loaded,this.options.onUploadProgress(M,G.total,G.loaded)}catch($){console.log($)}var te=G.checkpoint,re=0;te&&(M.checkpoint=te,this._saveCheckoutpoint(M,te,c.UPLOADSTATE.UPLOADING),re=te.uploadId),this._retryCount=0;var se=this._getPortNumber(te),H=0;if(J&&J.headers&&(H=J.headers["x-oss-request-id"]),G.loaded!=0&&this._reportLog("20007",M,{pn:se,requestId:H}),G.loaded!=1&&this._reportLog("20005",M,{UploadId:re,pn:se+1,pr:M.retry?1:0,fs:M.file.size,bu:M.bucket,ok:M.object,fn:M.file.name}),!this._invalidUserId&&!M.isImage&&this._ut=="vod"&&this.options.enableUploadProgress){var he={file:M.file,checkpoint:G,userId:this.options.userId,videoId:M.videoId,region:this.options.region,fileHash:M.fileHash};try{var Z=this;W.default.upload(he,function(){},function($){if(($=JSON.parse($))&&$.Code=="InvalidParameter"&&$.Message.indexOf("UserId")>0){Z._invalidUserId=!0;var V=$.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(V)}})}catch($){console.log($)}}}},{key:"_getPortNumber",value:function(M){if(M){var G=M.doneParts;if(G&&G.length>0)return G[G.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(M){var G=this._getCheckoutpointKey(M);p.default.remove(G)}},{key:"_getCheckoutpoint",value:function(M){var G=this._getCheckoutpointKey(M),J=p.default.get(G);if(J)try{return JSON.parse(J)}catch(te){}return""}},{key:"_saveCheckoutpoint",value:function(M,G,J){if(G){var te=this._getCheckoutpointKey(M),re=M.file,se={fileName:re.name,lastModified:re.lastModified,size:re.size,object:M.object,videoId:M.videoId,bucket:M.bucket,endpoint:M.endpoint,checkpoint:G,loaded:M.loaded,state:J};p.default.set(te,JSON.stringify(se))}}},{key:"_changeState",value:function(M,G){var J=this._getCheckoutpoint(M);J&&((this._onbeforeunload=!0)&&(G=c.UPLOADSTATE.STOPED),this._saveCheckoutpoint(M,J.checkpoint,G))}},{key:"_getCheckoutpointKey",value:function(M){return"upload_"+M.file.lastModified+"_"+M.file.name+"_"+M.file.size}},{key:"_getCheckoutpointFromCloud",value:function(M,G,J){var te={userId:this.options.userId,uploadInfoList:[{FileName:M.file.name,FileSize:M.file.size,FileCreateTime:M.file.lastModified,FileHash:M.fileHash}],region:this.options.region};W.default.get(te,function(re){G(re)},J)}},{key:"_reportLog",value:function(M,G,J){J||(J={}),J.ri=G.ri,this._ut&&(J.ut=this._ut),this._log.log(M,J)}},{key:"_initEvent",value:function(){var M=this;window&&(window.onbeforeunload=function(G){if(M._onbeforeunload=!0,M._curIndex!=-1&&M._uploadList.length>M._curIndex){var J=M._uploadList[M._curIndex];M._changeState(J,c.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var M=0;M<this._uploadList.length;M++){var G=this._uploadList[M];G.state!=c.UPLOADSTATE.FAIlURE&&G.state!=c.UPLOADSTATE.STOPED||(G.state=c.UPLOADSTATE.INIT)}this._state=c.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(M){return M.file.size/this.options.partSize>1e4?M.file.size/9999:this.options.partSize}}]),z}());l.default=K},function(De,l,R){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),l.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},l.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(De,l,R){"use strict";function g(e){return e&&e.__esModule?e:{default:e}}function m(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(l,"__esModule",{value:!0});var y=function(){function e(n,a){for(var p=0;p<a.length;p++){var d=a[p];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(n,d.key,d)}}return function(n,a,p){return a&&e(n.prototype,a),p&&e(n,p),n}}(),c=R(3),o=R(17),u=(g(o),R(1)),r=(g(u),function(){function e(n,a){if(m(this,e),n){this._config=n,this.create(this._config),this._uploadInfo=null,this._callback={};var p=function(){};this._callback.onerror=a.onerror||p,this._callback.oncomplete=a.oncomplete||p,this._callback.onprogress=a.onprogress||p}}return y(e,[{key:"create",value:function(n){if(n.endpoint=n.endpoint||this._config.endpoint,n.bucket=n.bucket||this._config.bucket,!(n.AccessKeyId&&n.AccessKeySecret&&n.endpoint&&n.SecurityToken))throw new Error("AccessKeyId\u3001AccessKeySecret\u3001endpoint should not be null");var a={accessKeyId:n.AccessKeyId,accessKeySecret:n.AccessKeySecret,stsToken:n.SecurityToken,endpoint:n.endpoint||this._config.endpoint,bucket:n.bucket||this._config.bucket,secure:!0,cname:n.cname};n.timeout&&(a.timeout=n.timeout),this.oss=new OSS.Wrapper(a)}},{key:"abort",value:function(n){if(n.checkpoint){var a=n.checkpoint.uploadId;this.oss.abortMultipartUpload(n.object,a)}}},{key:"getVersion",value:function(){}},{key:"cancel",value:function(){this.oss.cancel&&this.oss.cancel()}},{key:"upload",value:function(n,a){this._uploadInfo=n;var p=this,d=function(v,b,_){return function(w){p._progress(v,b,_),w()}},i={parallel:a.parallel||this._config.parallel||c.UPLOADDEFAULT.PARALLEL,partSize:a.partSize||this._config.partSize||c.UPLOADDEFAULT.PARTSIZE,progress:d};a.headers&&(i.headers=a.headers),n.checkpoint&&(i.checkpoint=n.checkpoint),n.bucket||(this.oss.options.bucket=n.bucket),n.endpoint||(this.oss.options.endpoint=n.endpoint),this.oss.multipartUpload(n.object,n.file,i).then(function(v,b){p._complete(v)}).catch(function(v){p.oss.cancel&&(p.oss&&p.oss.isCancel()?console.log("oss is cancel as error"):p.oss.cancel()),p._error(v)})}},{key:"header",value:function(n,a,p){this.oss.get(n.object).then(function(d){a(d)}).catch(function(d){p(d)})}},{key:"_progress",value:function(n,a,p){this._callback.onprogress(this._uploadInfo,{loaded:n,total:this._uploadInfo.file.size,checkpoint:a},p)}},{key:"_error",value:function(n){this._callback.onerror(this._uploadInfo,n)}},{key:"_complete",value:function(n){this._callback.oncomplete(this._uploadInfo,n)}}]),e}());l.default=r},function(De,l,R){"use strict";function g(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(l,"__esModule",{value:!0});var m=function(){function c(o,u){for(var r=0;r<u.length;r++){var e=u[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(o,e.key,e)}}return function(o,u,r){return u&&c(o.prototype,u),r&&c(o,r),o}}(),y=function(){function c(){g(this,c)}return m(c,null,[{key:"format",value:function(o){if(arguments.length<2)return null;for(var u=arguments[1],r=1;r<arguments.length;r++){var e=new RegExp("\\{"+(r-1)+"\\}","gm");u=u.replace(e,arguments[r+1])}return{code:o,message:u}}},{key:"CODE",get:function(){return{SUCCESS:"Successful",EmptyValue:"InvalidParameter.EmptyValue",STSInvalid:"InvalidParameter.TokenInvalid",ReadFileError:"ReadFileError",FILEDUPLICATION:"FileDuplication",UploadALEADRYSTARTED:"UploadAlearyStarted"}}},{key:"MESSAGE",get:function(){return{SUCCESS:"Successful",EmptyValue:"\u53C2\u6570 {0} \u4E0D\u80FD\u4E3A\u7A7A\u3002",STSInvalid:"STS\u53C2\u6570\u975E\u6CD5\uFF0C accessKeyId\u3001accessKeySecret\u3001secretToken\u3001expireTime\u90FD\u4E0D\u80FD\u4E3A\u7A7A\u3002",ReadFileError:"\u8BFB\u53D6\u6587\u4EF6{0}{1}\u5931\u8D25.",FILEDUPLICATION:"\u6587\u4EF6\u91CD\u590D\u6DFB\u52A0 {0}",UploadALEADRYSTARTED:"\u91CD\u590D\u5F00\u59CB."}}}]),c}();l.default=y},function(De,l,R){"use strict";(function(g){function m(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(l,"__esModule",{value:!0});var y=function(){function o(u,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(u,n.key,n)}}return function(u,r,e){return r&&o(u.prototype,r),e&&o(u,e),u}}(),c=function(){function o(){m(this,o)}return y(o,null,[{key:"encode",value:function(u){return new g(u).toString("base64")}},{key:"decode",value:function(u){return new g(u,"base64").toString()}}]),o}();l.default=c}).call(l,R(19).Buffer)},function(De,l,R){"use strict";(function(g){function m(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function y(I,t){if(m()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(I=new Uint8Array(t),I.__proto__=c.prototype):(I===null&&(I=new c(t)),I.length=t),I}function c(I,t,h){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(I,t,h);if(typeof I=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return e(this,I)}return o(this,I,t,h)}function o(I,t,h,L){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?p(I,t,h,L):typeof t=="string"?n(I,t,h):d(I,t)}function u(I){if(typeof I!="number")throw new TypeError('"size" argument must be a number');if(I<0)throw new RangeError('"size" argument must not be negative')}function r(I,t,h,L){return u(t),t<=0?y(I,t):h!==void 0?typeof L=="string"?y(I,t).fill(h,L):y(I,t).fill(h):y(I,t)}function e(I,t){if(u(t),I=y(I,t<0?0:0|i(t)),!c.TYPED_ARRAY_SUPPORT)for(var h=0;h<t;++h)I[h]=0;return I}function n(I,t,h){if(typeof h=="string"&&h!==""||(h="utf8"),!c.isEncoding(h))throw new TypeError('"encoding" must be a valid string encoding');var L=0|b(t,h);I=y(I,L);var A=I.write(t,h);return A!==L&&(I=I.slice(0,A)),I}function a(I,t){var h=t.length<0?0:0|i(t.length);I=y(I,h);for(var L=0;L<h;L+=1)I[L]=255&t[L];return I}function p(I,t,h,L){if(t.byteLength,h<0||t.byteLength<h)throw new RangeError("'offset' is out of bounds");if(t.byteLength<h+(L||0))throw new RangeError("'length' is out of bounds");return t=h===void 0&&L===void 0?new Uint8Array(t):L===void 0?new Uint8Array(t,h):new Uint8Array(t,h,L),c.TYPED_ARRAY_SUPPORT?(I=t,I.__proto__=c.prototype):I=a(I,t),I}function d(I,t){if(c.isBuffer(t)){var h=0|i(t.length);return I=y(I,h),I.length===0||t.copy(I,0,0,h),I}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||Ee(t.length)?y(I,0):a(I,t);if(t.type==="Buffer"&&de(t.data))return a(I,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function i(I){if(I>=m())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+m().toString(16)+" bytes");return 0|I}function v(I){return+I!=I&&(I=0),c.alloc(+I)}function b(I,t){if(c.isBuffer(I))return I.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(I)||I instanceof ArrayBuffer))return I.byteLength;typeof I!="string"&&(I=""+I);var h=I.length;if(h===0)return 0;for(var L=!1;;)switch(t){case"ascii":case"latin1":case"binary":return h;case"utf8":case"utf-8":case void 0:return me(I).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*h;case"hex":return h>>>1;case"base64":return ae(I).length;default:if(L)return me(I).length;t=(""+t).toLowerCase(),L=!0}}function _(I,t,h){var L=!1;if((t===void 0||t<0)&&(t=0),t>this.length)return"";if((h===void 0||h>this.length)&&(h=this.length),h<=0)return"";if(h>>>=0,t>>>=0,h<=t)return"";for(I||(I="utf8");;)switch(I){case"hex":return se(this,t,h);case"utf8":case"utf-8":return G(this,t,h);case"ascii":return te(this,t,h);case"latin1":case"binary":return re(this,t,h);case"base64":return M(this,t,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,t,h);default:if(L)throw new TypeError("Unknown encoding: "+I);I=(I+"").toLowerCase(),L=!0}}function w(I,t,h){var L=I[t];I[t]=I[h],I[h]=L}function T(I,t,h,L,A){if(I.length===0)return-1;if(typeof h=="string"?(L=h,h=0):h>2147483647?h=2147483647:h<-2147483648&&(h=-2147483648),h=+h,isNaN(h)&&(h=A?0:I.length-1),h<0&&(h=I.length+h),h>=I.length){if(A)return-1;h=I.length-1}else if(h<0){if(!A)return-1;h=0}if(typeof t=="string"&&(t=c.from(t,L)),c.isBuffer(t))return t.length===0?-1:C(I,t,h,L,A);if(typeof t=="number")return t&=255,c.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?A?Uint8Array.prototype.indexOf.call(I,t,h):Uint8Array.prototype.lastIndexOf.call(I,t,h):C(I,[t],h,L,A);throw new TypeError("val must be string, number or Buffer")}function C(I,t,h,L,A){function k(Be,je){return le===1?Be[je]:Be.readUInt16BE(je*le)}var le=1,_e=I.length,Ge=t.length;if(L!==void 0&&((L=String(L).toLowerCase())==="ucs2"||L==="ucs-2"||L==="utf16le"||L==="utf-16le")){if(I.length<2||t.length<2)return-1;le=2,_e/=2,Ge/=2,h/=2}var ze;if(A){var Fe=-1;for(ze=h;ze<_e;ze++)if(k(I,ze)===k(t,Fe===-1?0:ze-Fe)){if(Fe===-1&&(Fe=ze),ze-Fe+1===Ge)return Fe*le}else Fe!==-1&&(ze-=ze-Fe),Fe=-1}else for(h+Ge>_e&&(h=_e-Ge),ze=h;ze>=0;ze--){for(var Ke=!0,ot=0;ot<Ge;ot++)if(k(I,ze+ot)!==k(t,ot)){Ke=!1;break}if(Ke)return ze}return-1}function S(I,t,h,L){h=Number(h)||0;var A=I.length-h;L?(L=Number(L))>A&&(L=A):L=A;var k=t.length;if(k%2!=0)throw new TypeError("Invalid hex string");L>k/2&&(L=k/2);for(var le=0;le<L;++le){var _e=parseInt(t.substr(2*le,2),16);if(isNaN(_e))return le;I[h+le]=_e}return le}function W(I,t,h,L){return ee(me(t,I.length-h),I,h,L)}function N(I,t,h,L){return ee(ye(t),I,h,L)}function E(I,t,h,L){return N(I,t,h,L)}function K(I,t,h,L){return ee(ae(t),I,h,L)}function z(I,t,h,L){return ee(ue(t,I.length-h),I,h,L)}function M(I,t,h){return t===0&&h===I.length?F.fromByteArray(I):F.fromByteArray(I.slice(t,h))}function G(I,t,h){h=Math.min(I.length,h);for(var L=[],A=t;A<h;){var k=I[A],le=null,_e=k>239?4:k>223?3:k>191?2:1;if(A+_e<=h){var Ge,ze,Fe,Ke;switch(_e){case 1:k<128&&(le=k);break;case 2:Ge=I[A+1],(192&Ge)==128&&(Ke=(31&k)<<6|63&Ge)>127&&(le=Ke);break;case 3:Ge=I[A+1],ze=I[A+2],(192&Ge)==128&&(192&ze)==128&&(Ke=(15&k)<<12|(63&Ge)<<6|63&ze)>2047&&(Ke<55296||Ke>57343)&&(le=Ke);break;case 4:Ge=I[A+1],ze=I[A+2],Fe=I[A+3],(192&Ge)==128&&(192&ze)==128&&(192&Fe)==128&&(Ke=(15&k)<<18|(63&Ge)<<12|(63&ze)<<6|63&Fe)>65535&&Ke<1114112&&(le=Ke)}}le===null?(le=65533,_e=1):le>65535&&(le-=65536,L.push(le>>>10&1023|55296),le=56320|1023&le),L.push(le),A+=_e}return J(L)}function J(I){var t=I.length;if(t<=be)return String.fromCharCode.apply(String,I);for(var h="",L=0;L<t;)h+=String.fromCharCode.apply(String,I.slice(L,L+=be));return h}function te(I,t,h){var L="";h=Math.min(I.length,h);for(var A=t;A<h;++A)L+=String.fromCharCode(127&I[A]);return L}function re(I,t,h){var L="";h=Math.min(I.length,h);for(var A=t;A<h;++A)L+=String.fromCharCode(I[A]);return L}function se(I,t,h){var L=I.length;(!t||t<0)&&(t=0),(!h||h<0||h>L)&&(h=L);for(var A="",k=t;k<h;++k)A+=Ae(I[k]);return A}function H(I,t,h){for(var L=I.slice(t,h),A="",k=0;k<L.length;k+=2)A+=String.fromCharCode(L[k]+256*L[k+1]);return A}function he(I,t,h){if(I%1!=0||I<0)throw new RangeError("offset is not uint");if(I+t>h)throw new RangeError("Trying to access beyond buffer length")}function Z(I,t,h,L,A,k){if(!c.isBuffer(I))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>A||t<k)throw new RangeError('"value" argument is out of bounds');if(h+L>I.length)throw new RangeError("Index out of range")}function $(I,t,h,L){t<0&&(t=65535+t+1);for(var A=0,k=Math.min(I.length-h,2);A<k;++A)I[h+A]=(t&255<<8*(L?A:1-A))>>>8*(L?A:1-A)}function V(I,t,h,L){t<0&&(t=4294967295+t+1);for(var A=0,k=Math.min(I.length-h,4);A<k;++A)I[h+A]=t>>>8*(L?A:3-A)&255}function X(I,t,h,L,A,k){if(h+L>I.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("Index out of range")}function Q(I,t,h,L,A){return A||X(I,t,h,4,34028234663852886e22,-34028234663852886e22),j.write(I,t,h,L,23,4),h+4}function oe(I,t,h,L,A){return A||X(I,t,h,8,17976931348623157e292,-17976931348623157e292),j.write(I,t,h,L,52,8),h+8}function we(I){if(I=ge(I).replace(Te,""),I.length<2)return"";for(;I.length%4!=0;)I+="=";return I}function ge(I){return I.trim?I.trim():I.replace(/^\s+|\s+$/g,"")}function Ae(I){return I<16?"0"+I.toString(16):I.toString(16)}function me(I,t){t=t||1/0;for(var h,L=I.length,A=null,k=[],le=0;le<L;++le){if((h=I.charCodeAt(le))>55295&&h<57344){if(!A){if(h>56319){(t-=3)>-1&&k.push(239,191,189);continue}if(le+1===L){(t-=3)>-1&&k.push(239,191,189);continue}A=h;continue}if(h<56320){(t-=3)>-1&&k.push(239,191,189),A=h;continue}h=65536+(A-55296<<10|h-56320)}else A&&(t-=3)>-1&&k.push(239,191,189);if(A=null,h<128){if((t-=1)<0)break;k.push(h)}else if(h<2048){if((t-=2)<0)break;k.push(h>>6|192,63&h|128)}else if(h<65536){if((t-=3)<0)break;k.push(h>>12|224,h>>6&63|128,63&h|128)}else{if(!(h<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;k.push(h>>18|240,h>>12&63|128,h>>6&63|128,63&h|128)}}return k}function ye(I){for(var t=[],h=0;h<I.length;++h)t.push(255&I.charCodeAt(h));return t}function ue(I,t){for(var h,L,A,k=[],le=0;le<I.length&&!((t-=2)<0);++le)h=I.charCodeAt(le),L=h>>8,A=h%256,k.push(A),k.push(L);return k}function ae(I){return F.toByteArray(we(I))}function ee(I,t,h,L){for(var A=0;A<L&&!(A+h>=t.length||A>=I.length);++A)t[A+h]=I[A];return A}function Ee(I){return I!==I}/*!
|
|
|
* The buffer module from node.js, for the browser.
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
|
* @license MIT
|
|
|
*/var F=R(21),j=R(22),de=R(23);l.Buffer=c,l.SlowBuffer=v,l.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=g.TYPED_ARRAY_SUPPORT!==void 0?g.TYPED_ARRAY_SUPPORT:function(){try{var I=new Uint8Array(1);return I.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},I.foo()===42&&typeof I.subarray=="function"&&I.subarray(1,1).byteLength===0}catch(t){return!1}}(),l.kMaxLength=m(),c.poolSize=8192,c._augment=function(I){return I.__proto__=c.prototype,I},c.from=function(I,t,h){return o(null,I,t,h)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(I,t,h){return r(null,I,t,h)},c.allocUnsafe=function(I){return e(null,I)},c.allocUnsafeSlow=function(I){return e(null,I)},c.isBuffer=function(I){return!(I==null||!I._isBuffer)},c.compare=function(I,t){if(!c.isBuffer(I)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(I===t)return 0;for(var h=I.length,L=t.length,A=0,k=Math.min(h,L);A<k;++A)if(I[A]!==t[A]){h=I[A],L=t[A];break}return h<L?-1:L<h?1:0},c.isEncoding=function(I){switch(String(I).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(I,t){if(!de(I))throw new TypeError('"list" argument must be an Array of Buffers');if(I.length===0)return c.alloc(0);var h;if(t===void 0)for(t=0,h=0;h<I.length;++h)t+=I[h].length;var L=c.allocUnsafe(t),A=0;for(h=0;h<I.length;++h){var k=I[h];if(!c.isBuffer(k))throw new TypeError('"list" argument must be an Array of Buffers');k.copy(L,A),A+=k.length}return L},c.byteLength=b,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var I=this.length;if(I%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<I;t+=2)w(this,t,t+1);return this},c.prototype.swap32=function(){var I=this.length;if(I%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<I;t+=4)w(this,t,t+3),w(this,t+1,t+2);return this},c.prototype.swap64=function(){var I=this.length;if(I%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<I;t+=8)w(this,t,t+7),w(this,t+1,t+6),w(this,t+2,t+5),w(this,t+3,t+4);return this},c.prototype.toString=function(){var I=0|this.length;return I===0?"":arguments.length===0?G(this,0,I):_.apply(this,arguments)},c.prototype.equals=function(I){if(!c.isBuffer(I))throw new TypeError("Argument must be a Buffer");return this===I||c.compare(this,I)===0},c.prototype.inspect=function(){var I="",t=l.INSPECT_MAX_BYTES;return this.length>0&&(I=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(I+=" ... ")),"<Buffer "+I+">"},c.prototype.compare=function(I,t,h,L,A){if(!c.isBuffer(I))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),h===void 0&&(h=I?I.length:0),L===void 0&&(L=0),A===void 0&&(A=this.length),t<0||h>I.length||L<0||A>this.length)throw new RangeError("out of range index");if(L>=A&&t>=h)return 0;if(L>=A)return-1;if(t>=h)return 1;if(t>>>=0,h>>>=0,L>>>=0,A>>>=0,this===I)return 0;for(var k=A-L,le=h-t,_e=Math.min(k,le),Ge=this.slice(L,A),ze=I.slice(t,h),Fe=0;Fe<_e;++Fe)if(Ge[Fe]!==ze[Fe]){k=Ge[Fe],le=ze[Fe];break}return k<le?-1:le<k?1:0},c.prototype.includes=function(I,t,h){return this.indexOf(I,t,h)!==-1},c.prototype.indexOf=function(I,t,h){return T(this,I,t,h,!0)},c.prototype.lastIndexOf=function(I,t,h){return T(this,I,t,h,!1)},c.prototype.write=function(I,t,h,L){if(t===void 0)L="utf8",h=this.length,t=0;else if(h===void 0&&typeof t=="string")L=t,h=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(h)?(h|=0,L===void 0&&(L="utf8")):(L=h,h=void 0)}var A=this.length-t;if((h===void 0||h>A)&&(h=A),I.length>0&&(h<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");L||(L="utf8");for(var k=!1;;)switch(L){case"hex":return S(this,I,t,h);case"utf8":case"utf-8":return W(this,I,t,h);case"ascii":return N(this,I,t,h);case"latin1":case"binary":return E(this,I,t,h);case"base64":return K(this,I,t,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,I,t,h);default:if(k)throw new TypeError("Unknown encoding: "+L);L=(""+L).toLowerCase(),k=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var be=4096;c.prototype.slice=function(I,t){var h=this.length;I=~~I,t=t===void 0?h:~~t,I<0?(I+=h)<0&&(I=0):I>h&&(I=h),t<0?(t+=h)<0&&(t=0):t>h&&(t=h),t<I&&(t=I);var L;if(c.TYPED_ARRAY_SUPPORT)L=this.subarray(I,t),L.__proto__=c.prototype;else{var A=t-I;L=new c(A,void 0);for(var k=0;k<A;++k)L[k]=this[k+I]}return L},c.prototype.readUIntLE=function(I,t,h){I|=0,t|=0,h||he(I,t,this.length);for(var L=this[I],A=1,k=0;++k<t&&(A*=256);)L+=this[I+k]*A;return L},c.prototype.readUIntBE=function(I,t,h){I|=0,t|=0,h||he(I,t,this.length);for(var L=this[I+--t],A=1;t>0&&(A*=256);)L+=this[I+--t]*A;return L},c.prototype.readUInt8=function(I,t){return t||he(I,1,this.length),this[I]},c.prototype.readUInt16LE=function(I,t){return t||he(I,2,this.length),this[I]|this[I+1]<<8},c.prototype.readUInt16BE=function(I,t){return t||he(I,2,this.length),this[I]<<8|this[I+1]},c.prototype.readUInt32LE=function(I,t){return t||he(I,4,this.length),(this[I]|this[I+1]<<8|this[I+2]<<16)+16777216*this[I+3]},c.prototype.readUInt32BE=function(I,t){return t||he(I,4,this.length),16777216*this[I]+(this[I+1]<<16|this[I+2]<<8|this[I+3])},c.prototype.readIntLE=function(I,t,h){I|=0,t|=0,h||he(I,t,this.length);for(var L=this[I],A=1,k=0;++k<t&&(A*=256);)L+=this[I+k]*A;return A*=128,L>=A&&(L-=Math.pow(2,8*t)),L},c.prototype.readIntBE=function(I,t,h){I|=0,t|=0,h||he(I,t,this.length);for(var L=t,A=1,k=this[I+--L];L>0&&(A*=256);)k+=this[I+--L]*A;return A*=128,k>=A&&(k-=Math.pow(2,8*t)),k},c.prototype.readInt8=function(I,t){return t||he(I,1,this.length),128&this[I]?-1*(255-this[I]+1):this[I]},c.prototype.readInt16LE=function(I,t){t||he(I,2,this.length);var h=this[I]|this[I+1]<<8;return 32768&h?4294901760|h:h},c.prototype.readInt16BE=function(I,t){t||he(I,2,this.length);var h=this[I+1]|this[I]<<8;return 32768&h?4294901760|h:h},c.prototype.readInt32LE=function(I,t){return t||he(I,4,this.length),this[I]|this[I+1]<<8|this[I+2]<<16|this[I+3]<<24},c.prototype.readInt32BE=function(I,t){return t||he(I,4,this.length),this[I]<<24|this[I+1]<<16|this[I+2]<<8|this[I+3]},c.prototype.readFloatLE=function(I,t){return t||he(I,4,this.length),j.read(this,I,!0,23,4)},c.prototype.readFloatBE=function(I,t){return t||he(I,4,this.length),j.read(this,I,!1,23,4)},c.prototype.readDoubleLE=function(I,t){return t||he(I,8,this.length),j.read(this,I,!0,52,8)},c.prototype.readDoubleBE=function(I,t){return t||he(I,8,this.length),j.read(this,I,!1,52,8)},c.prototype.writeUIntLE=function(I,t,h,L){(I=+I,t|=0,h|=0,!L)&&Z(this,I,t,h,Math.pow(2,8*h)-1,0);var A=1,k=0;for(this[t]=255&I;++k<h&&(A*=256);)this[t+k]=I/A&255;return t+h},c.prototype.writeUIntBE=function(I,t,h,L){(I=+I,t|=0,h|=0,!L)&&Z(this,I,t,h,Math.pow(2,8*h)-1,0);var A=h-1,k=1;for(this[t+A]=255&I;--A>=0&&(k*=256);)this[t+A]=I/k&255;return t+h},c.prototype.writeUInt8=function(I,t,h){return I=+I,t|=0,h||Z(this,I,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(I=Math.floor(I)),this[t]=255&I,t+1},c.prototype.writeUInt16LE=function(I,t,h){return I=+I,t|=0,h||Z(this,I,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&I,this[t+1]=I>>>8):$(this,I,t,!0),t+2},c.prototype.writeUInt16BE=function(I,t,h){return I=+I,t|=0,h||Z(this,I,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=I>>>8,this[t+1]=255&I):$(this,I,t,!1),t+2},c.prototype.writeUInt32LE=function(I,t,h){return I=+I,t|=0,h||Z(this,I,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=I>>>24,this[t+2]=I>>>16,this[t+1]=I>>>8,this[t]=255&I):V(this,I,t,!0),t+4},c.prototype.writeUInt32BE=function(I,t,h){return I=+I,t|=0,h||Z(this,I,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=I>>>24,this[t+1]=I>>>16,this[t+2]=I>>>8,this[t+3]=255&I):V(this,I,t,!1),t+4},c.prototype.writeIntLE=function(I,t,h,L){if(I=+I,t|=0,!L){var A=Math.pow(2,8*h-1);Z(this,I,t,h,A-1,-A)}var k=0,le=1,_e=0;for(this[t]=255&I;++k<h&&(le*=256);)I<0&&_e===0&&this[t+k-1]!==0&&(_e=1),this[t+k]=(I/le>>0)-_e&255;return t+h},c.prototype.writeIntBE=function(I,t,h,L){if(I=+I,t|=0,!L){var A=Math.pow(2,8*h-1);Z(this,I,t,h,A-1,-A)}var k=h-1,le=1,_e=0;for(this[t+k]=255&I;--k>=0&&(le*=256);)I<0&&_e===0&&this[t+k+1]!==0&&(_e=1),this[t+k]=(I/le>>0)-_e&255;return t+h},c.prototype.writeInt8=function(I,t,h){return I=+I,t|=0,h||Z(this,I,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(I=Math.floor(I)),I<0&&(I=255+I+1),this[t]=255&I,t+1},c.prototype.writeInt16LE=function(I,t,h){return I=+I,t|=0,h||Z(this,I,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&I,this[t+1]=I>>>8):$(this,I,t,!0),t+2},c.prototype.writeInt16BE=function(I,t,h){return I=+I,t|=0,h||Z(this,I,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=I>>>8,this[t+1]=255&I):$(this,I,t,!1),t+2},c.prototype.writeInt32LE=function(I,t,h){return I=+I,t|=0,h||Z(this,I,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&I,this[t+1]=I>>>8,this[t+2]=I>>>16,this[t+3]=I>>>24):V(this,I,t,!0),t+4},c.prototype.writeInt32BE=function(I,t,h){return I=+I,t|=0,h||Z(this,I,t,4,2147483647,-2147483648),I<0&&(I=4294967295+I+1),c.TYPED_ARRAY_SUPPORT?(this[t]=I>>>24,this[t+1]=I>>>16,this[t+2]=I>>>8,this[t+3]=255&I):V(this,I,t,!1),t+4},c.prototype.writeFloatLE=function(I,t,h){return Q(this,I,t,!0,h)},c.prototype.writeFloatBE=function(I,t,h){return Q(this,I,t,!1,h)},c.prototype.writeDoubleLE=function(I,t,h){return oe(this,I,t,!0,h)},c.prototype.writeDoubleBE=function(I,t,h){return oe(this,I,t,!1,h)},c.prototype.copy=function(I,t,h,L){if(h||(h=0),L||L===0||(L=this.length),t>=I.length&&(t=I.length),t||(t=0),L>0&&L<h&&(L=h),L===h)return 0;if(I.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(h<0||h>=this.length)throw new RangeError("sourceStart out of bounds");if(L<0)throw new RangeError("sourceEnd out of bounds");L>this.length&&(L=this.length),I.length-t<L-h&&(L=I.length-t+h);var A,k=L-h;if(this===I&&h<t&&t<L)for(A=k-1;A>=0;--A)I[A+t]=this[A+h];else if(k<1e3||!c.TYPED_ARRAY_SUPPORT)for(A=0;A<k;++A)I[A+t]=this[A+h];else Uint8Array.prototype.set.call(I,this.subarray(h,h+k),t);return k},c.prototype.fill=function(I,t,h,L){if(typeof I=="string"){if(typeof t=="string"?(L=t,t=0,h=this.length):typeof h=="string"&&(L=h,h=this.length),I.length===1){var A=I.charCodeAt(0);A<256&&(I=A)}if(L!==void 0&&typeof L!="string")throw new TypeError("encoding must be a string");if(typeof L=="string"&&!c.isEncoding(L))throw new TypeError("Unknown encoding: "+L)}else typeof I=="number"&&(I&=255);if(t<0||this.length<t||this.length<h)throw new RangeError("Out of range index");if(h<=t)return this;t>>>=0,h=h===void 0?this.length:h>>>0,I||(I=0);var k;if(typeof I=="number")for(k=t;k<h;++k)this[k]=I;else{var le=c.isBuffer(I)?I:me(new c(I,L).toString()),_e=le.length;for(k=0;k<h-t;++k)this[k+t]=le[k%_e]}return this};var Te=/[^+\/0-9A-Za-z-_]/g}).call(l,R(20))},function(De,l){var R;R=function(){return this}();try{R=R||Function("return this")()||(0,eval)("this")}catch(g){typeof window=="object"&&(R=window)}De.exports=R},function(De,l,R){"use strict";function g(i){var v=i.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return i[v-2]==="="?2:i[v-1]==="="?1:0}function m(i){return 3*i.length/4-g(i)}function y(i){var v,b,_,w,T,C=i.length;w=g(i),T=new n(3*C/4-w),b=w>0?C-4:C;var S=0;for(v=0;v<b;v+=4)_=e[i.charCodeAt(v)]<<18|e[i.charCodeAt(v+1)]<<12|e[i.charCodeAt(v+2)]<<6|e[i.charCodeAt(v+3)],T[S++]=_>>16&255,T[S++]=_>>8&255,T[S++]=255&_;return w===2?(_=e[i.charCodeAt(v)]<<2|e[i.charCodeAt(v+1)]>>4,T[S++]=255&_):w===1&&(_=e[i.charCodeAt(v)]<<10|e[i.charCodeAt(v+1)]<<4|e[i.charCodeAt(v+2)]>>2,T[S++]=_>>8&255,T[S++]=255&_),T}function c(i){return r[i>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]}function o(i,v,b){for(var _,w=[],T=v;T<b;T+=3)_=(i[T]<<16)+(i[T+1]<<8)+i[T+2],w.push(c(_));return w.join("")}function u(i){for(var v,b=i.length,_=b%3,w="",T=[],C=0,S=b-_;C<S;C+=16383)T.push(o(i,C,C+16383>S?S:C+16383));return _===1?(v=i[b-1],w+=r[v>>2],w+=r[v<<4&63],w+="=="):_===2&&(v=(i[b-2]<<8)+i[b-1],w+=r[v>>10],w+=r[v>>4&63],w+=r[v<<2&63],w+="="),T.push(w),T.join("")}l.byteLength=m,l.toByteArray=y,l.fromByteArray=u;for(var r=[],e=[],n=typeof Uint8Array!="undefined"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,d=a.length;p<d;++p)r[p]=a[p],e[a.charCodeAt(p)]=p;e["-".charCodeAt(0)]=62,e["_".charCodeAt(0)]=63},function(De,l){l.read=function(R,g,m,y,c){var o,u,r=8*c-y-1,e=(1<<r)-1,n=e>>1,a=-7,p=m?c-1:0,d=m?-1:1,i=R[g+p];for(p+=d,o=i&(1<<-a)-1,i>>=-a,a+=r;a>0;o=256*o+R[g+p],p+=d,a-=8);for(u=o&(1<<-a)-1,o>>=-a,a+=y;a>0;u=256*u+R[g+p],p+=d,a-=8);if(o===0)o=1-n;else{if(o===e)return u?NaN:1/0*(i?-1:1);u+=Math.pow(2,y),o-=n}return(i?-1:1)*u*Math.pow(2,o-y)},l.write=function(R,g,m,y,c,o){var u,r,e,n=8*o-c-1,a=(1<<n)-1,p=a>>1,d=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=y?0:o-1,v=y?1:-1,b=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(r=isNaN(g)?1:0,u=a):(u=Math.floor(Math.log(g)/Math.LN2),g*(e=Math.pow(2,-u))<1&&(u--,e*=2),g+=u+p>=1?d/e:d*Math.pow(2,1-p),g*e>=2&&(u++,e/=2),u+p>=a?(r=0,u=a):u+p>=1?(r=(g*e-1)*Math.pow(2,c),u+=p):(r=g*Math.pow(2,p-1)*Math.pow(2,c),u=0));c>=8;R[m+i]=255&r,i+=v,r/=256,c-=8);for(u=u<<c|r,n+=c;n>0;R[m+i]=255&u,i+=v,u/=256,n-=8);R[m+i-v]|=128*b}},function(De,l){var R={}.toString;De.exports=Array.isArray||function(g){return R.call(g)=="[object Array]"}},function(De,l,R){"use strict";function g(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(l,"__esModule",{value:!0});var m=function(){function c(o,u){for(var r=0;r<u.length;r++){var e=u[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(o,e.key,e)}}return function(o,u,r){return u&&c(o.prototype,u),r&&c(o,r),o}}(),y=function(){function c(){g(this,c)}return m(c,null,[{key:"set",value:function(o,u){try{window.localStorage&&localStorage.setItem(o,u)}catch(r){window[o+"_localStorage"]=u}}},{key:"get",value:function(o){try{if(window.localStorage)return localStorage.getItem(o)}catch(u){return window[o+"_localStorage"]}return""}},{key:"remove",value:function(o){try{window.localStorage&&localStorage.removeItem(o)}catch(u){delete window[o+"_localStorage"]}}}]),c}();l.default=y},function(De,l,R){"use strict";function g(c,o){if(!(c instanceof o))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(l,"__esModule",{value:!0});var m=function(){function c(o,u){for(var r=0;r<u.length;r++){var e=u[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(o,e.key,e)}}return function(o,u,r){return u&&c(o.prototype,u),r&&c(o,r),o}}(),y=function(){function c(){g(this,c)}return m(c,null,[{key:"get",value:function(o){for(var u=o+"",r=document.cookie.split(";"),e=0;e<r.length;e++){var n=r[e].trim();if(n.indexOf(u)==0)return unescape(n.substring(u.length+1,n.length))}return""}},{key:"set",value:function(o,u,r){var e=new Date;e.setTime(e.getTime()+24*r*60*60*1e3);var n="expires="+e.toGMTString();document.cookie=o+"="+escape(u)+"; "+n}}]),c}();l.default=y},function(De,l,R){"use strict";function g(n){return n&&n.__esModule?n:{default:n}}function m(n,a){if(!(n instanceof a))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(l,"__esModule",{value:!0});var y=function(){function n(a,p){for(var d=0;d<p.length;d++){var i=p[d];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(a,i.key,i)}}return function(a,p,d){return p&&n(a.prototype,p),d&&n(a,d),a}}(),c=R(8),o=g(c),u=R(9),r=g(u),e=function(){function n(){m(this,n)}return y(n,null,[{key:"refreshUploadAuth",value:function(a,p,d){var i=(r.default.randomUUID(),r.default.randomUUID()),v={AccessKeyId:a.accessKeyId,SecurityToken:a.securityToken,Action:"RefreshUploadVideo",VideoId:a.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:i,RequestId:a.requestId},b=r.default.makeUTF8sort(v,"=","&")+"&Signature="+r.default.aliyunEncodeURI(r.default.makeChangeSiga(v,a.accessKeySecret)),_="https://vod."+a.region+".aliyuncs.com/?"+b;o.default.get(_,function(w){var w=JSON.parse(w);p&&p(w)},function(w){if(d){var T=JSON.parse(w);d(T)}})}},{key:"getUploadAuth",value:function(a,p,d){var i=(r.default.randomUUID(),r.default.randomUUID()),v={AccessKeyId:a.accessKeyId,SecurityToken:a.securityToken,Action:"CreateUploadVideo",Title:a.title,FileName:a.fileName,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:i,RequestId:a.requestId};a.fileSize&&(v.FileSize=a.fileSize),a.description&&(v.Description=a.description),a.cateId&&(v.CateId=a.cateId),a.tags&&(v.Tags=a.tags),a.templateGroupId&&(v.TemplateGroupId=a.templateGroupId),a.storageLocation&&(v.StorageLocation=a.storageLocation),a.coverUrl&&(v.CoverURL=a.coverUrl),a.transCodeMode&&(v.TransCodeMode=a.transCodeMode),a.userData&&(v.UserData=JSON.stringify(a.userData));var b=r.default.makeUTF8sort(v,"=","&")+"&Signature="+r.default.aliyunEncodeURI(r.default.makeChangeSiga(v,a.accessKeySecret)),_="https://vod."+a.region+".aliyuncs.com/?"+b;o.default.get(_,function(w){try{w=JSON.parse(w)}catch(T){if(d)return void d({Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"})}p&&p(w)},function(w){if(d){var T={Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"};try{T=JSON.parse(w)}catch(C){}d(T)}})}},{key:"getImageUploadAuth",value:function(a,p,d){var i=(r.default.randomUUID(),r.default.randomUUID()),v={AccessKeyId:a.accessKeyId,SecurityToken:a.securityToken,Action:"CreateUploadImage",ImageType:a.imageType?a.imageType:"default",Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:i,RequestId:a.requestId};a.title&&(v.Title=a.title),a.imageExt&&(v.ImageExt=a.imageExt),a.tags&&(v.Tags=a.tags),a.storageLocation&&(v.StorageLocation=a.storageLocation);var b=r.default.makeUTF8sort(v,"=","&")+"&Signature="+r.default.aliyunEncodeURI(r.default.makeChangeSiga(v,a.accessKeySecret)),_="https://vod."+a.region+".aliyuncs.com/?"+b;o.default.get(_,function(w){w=JSON.parse(w),p&&p(w)},function(w){if(d){var T=JSON.parse(w);d(T)}})}}]),n}();l.default=e},function(De,l,R){!function(g,m,y){De.exports=l=m(R(0),R(28),R(29))}(0,function(g){return g.HmacSHA1})},function(De,l,R){!function(g,m){De.exports=l=m(R(0))}(0,function(g){return function(){var m=g,y=m.lib,c=y.WordArray,o=y.Hasher,u=m.algo,r=[],e=u.SHA1=o.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(n,a){for(var p=this._hash.words,d=p[0],i=p[1],v=p[2],b=p[3],_=p[4],w=0;w<80;w++){if(w<16)r[w]=0|n[a+w];else{var T=r[w-3]^r[w-8]^r[w-14]^r[w-16];r[w]=T<<1|T>>>31}var C=(d<<5|d>>>27)+_+r[w];C+=w<20?1518500249+(i&v|~i&b):w<40?1859775393+(i^v^b):w<60?(i&v|i&b|v&b)-1894007588:(i^v^b)-899497514,_=b,b=v,v=i<<30|i>>>2,i=d,d=C}p[0]=p[0]+d|0,p[1]=p[1]+i|0,p[2]=p[2]+v|0,p[3]=p[3]+b|0,p[4]=p[4]+_|0},_doFinalize:function(){var n=this._data,a=n.words,p=8*this._nDataBytes,d=8*n.sigBytes;return a[d>>>5]|=128<<24-d%32,a[14+(d+64>>>9<<4)]=Math.floor(p/4294967296),a[15+(d+64>>>9<<4)]=p,n.sigBytes=4*a.length,this._process(),this._hash},clone:function(){var n=o.clone.call(this);return n._hash=this._hash.clone(),n}});m.SHA1=o._createHelper(e),m.HmacSHA1=o._createHmacHelper(e)}(),g.SHA1})},function(De,l,R){!function(g,m){De.exports=l=m(R(0))}(0,function(g){!function(){var m=g,y=m.lib,c=y.Base,o=m.enc,u=o.Utf8,r=m.algo;r.HMAC=c.extend({init:function(e,n){e=this._hasher=new e.init,typeof n=="string"&&(n=u.parse(n));var a=e.blockSize,p=4*a;n.sigBytes>p&&(n=e.finalize(n)),n.clamp();for(var d=this._oKey=n.clone(),i=this._iKey=n.clone(),v=d.words,b=i.words,_=0;_<a;_++)v[_]^=1549556828,b[_]^=909522486;d.sigBytes=i.sigBytes=p,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var n=this._hasher,a=n.finalize(e);return n.reset(),n.finalize(this._oKey.clone().concat(a))}})}()})},function(De,l,R){!function(g,m){De.exports=l=m(R(0))}(0,function(g){return function(){function m(r,e,n){for(var a=[],p=0,d=0;d<e;d++)if(d%4){var i=n[r.charCodeAt(d-1)]<<d%4*2,v=n[r.charCodeAt(d)]>>>6-d%4*2;a[p>>>2]|=(i|v)<<24-p%4*8,p++}return o.create(a,p)}var y=g,c=y.lib,o=c.WordArray,u=y.enc;u.Base64={stringify:function(r){var e=r.words,n=r.sigBytes,a=this._map;r.clamp();for(var p=[],d=0;d<n;d+=3)for(var i=e[d>>>2]>>>24-d%4*8&255,v=e[d+1>>>2]>>>24-(d+1)%4*8&255,b=e[d+2>>>2]>>>24-(d+2)%4*8&255,_=i<<16|v<<8|b,w=0;w<4&&d+.75*w<n;w++)p.push(a.charAt(_>>>6*(3-w)&63));var T=a.charAt(64);if(T)for(;p.length%4;)p.push(T);return p.join("")},parse:function(r){var e=r.length,n=this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var p=0;p<n.length;p++)a[n.charCodeAt(p)]=p}var d=n.charAt(64);if(d){var i=r.indexOf(d);i!==-1&&(e=i)}return m(r,e,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),g.enc.Base64})},function(De,l,R){"use strict";function g(S){return S&&S.__esModule?S:{default:S}}function m(S,W){if(!(S instanceof W))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(l,"__esModule",{value:!0});var y=function(){function S(W,N){for(var E=0;E<N.length;E++){var K=N[E];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(W,K.key,K)}}return function(W,N,E){return N&&S(W.prototype,N),E&&S(W,E),W}}(),c=R(8),o=g(c),u=R(7),r=g(u),e=R(4),n=g(e),a=R(6),p=g(a),d=R(1),i=g(d),v=R(9),b=g(v),_=R(2),w=R(11),T=R(10),C=function(){function S(){m(this,S)}return y(S,null,[{key:"getAuthInfo",value:function(W,N,E){var K=W+"|f#Ylm&^1TppeRhLg|"+E;return N&&(K=W+"|"+N+"|f#Ylm&^1TppeRhLg|"+E),_(T.parse(K)).toString(w)}},{key:"upload",value:function(W,N,E){var K=i.default.ISODateString(new Date),z=Math.floor(new Date().valueOf()/1e3),M=n.default.getClientId();M=n.default.setClientId(M);var G=S.getAuthInfo(W.userId,M,z),J=b.default.randomUUID(),te={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:r.default.browser.name+(r.default.browser.version||""),AppVersion:p.default.version,AuthTimestamp:z,Timestamp:K,AuthInfo:G,FileName:W.file.name,FileSize:W.file.size,FileCreateTime:W.file.lastModified,FileHash:W.fileHash,UploadId:W.checkpoint.checkpoint.uploadId,PartSize:W.checkpoint.checkpoint.partSize,DonePartsCount:W.checkpoint.checkpoint.doneParts.length,UploadPoint:JSON.stringify(W.checkpoint),UploadRatio:W.checkpoint.loaded,UserId:W.userId,VideoId:W.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:J};M&&(te.ClientId=M);var re=b.default.makeUTF8sort(te,"=","&")+"&Signature="+b.default.aliyunEncodeURI(b.default.makeChangeSiga(te,W.accessKeySecret)),se="https://vod."+W.region+".aliyuncs.com/?"+re;o.default.get(se,function(H){N&&N()},function(H){H&&(E(H),console.log(H))})}},{key:"get",value:function(W,N,E){var K=i.default.ISODateString(new Date),z=Math.floor(new Date().valueOf()/1e3),M=n.default.getClientId(),G=S.getAuthInfo(W.userId,M,z),J=b.default.randomUUID(),te={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:r.default.browser.name+(r.default.browser.version||""),AppVersion:p.default.version,AuthTimestamp:z,Timestamp:K,AuthInfo:G,UserId:W.userId,UploadInfoList:JSON.stringify(W.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:J};M&&(te.ClientId=M);var re=b.default.makeUTF8sort(te,"=","&")+"&Signature="+b.default.aliyunEncodeURI(b.default.makeChangeSiga(te,W.accessKeySecret)),se="https://vod."+W.region+".aliyuncs.com/?"+re;o.default.get(se,function(H){var he={},Z=M;H=H?JSON.parse(H):{},H.UploadProgress&&H.UploadProgress.UploadProgressList&&H.UploadProgress.UploadProgressList.length>0&&(he=H.UploadProgress.UploadProgressList[0],Z=he.ClientId),n.default.setClientId(Z),N&&N(he)},function(H){H&&(E(H),console.log(H))})}}]),S}();l.default=C},function(De,l,R){"use strict";function g(u,r){if(!(u instanceof r))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(l,"__esModule",{value:!0});var m=function(){function u(r,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,e,n){return e&&u(r.prototype,e),n&&u(r,n),r}}(),y=R(2),c=R(33),o=(R(11),function(){function u(){g(this,u)}return m(u,null,[{key:"getMd5",value:function(r,e,n){var a=new FileReader;a.onload=function(i){try{if(i&&i.target){var v=y(c.parse(i.target.result)),b=v.toString();e(b)}}catch(_){console.log(_)}},a.onerror=function(i){console.log(i),errorCallback(i)};var p=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,d=p.call(r,0,1024);a.readAsBinaryString(d)}}]),u}());l.default=o},function(De,l,R){!function(g,m){De.exports=l=m(R(0))}(0,function(g){return g.enc.Latin1})}])}).call(this,ne("IyRk"))},"rAM+":function(lt,Me,ne){"use strict";ne.d(Me,"a",function(){return Pe});var Ne=ne("Qw5x");function Pe(De,l){var R;if(typeof Symbol=="undefined"||De[Symbol.iterator]==null){if(Array.isArray(De)||(R=Object(Ne.a)(De))||l&&De&&typeof De.length=="number"){R&&(De=R);var g=0,m=function(){};return{s:m,n:function(){return g>=De.length?{done:!0}:{done:!1,value:De[g++]}},e:function(r){throw r},f:m}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var y=!0,c=!1,o;return{s:function(){R=De[Symbol.iterator]()},n:function(){var r=R.next();return y=r.done,r},e:function(r){c=!0,o=r},f:function(){try{!y&&R.return!=null&&R.return()}finally{if(c)throw o}}}}},rUJ1:function(lt,Me){const ne=/[&<>"']/,Ne=/[&<>"']/g,Pe=/[<>"']|&(?!#?\w+;)/,De=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},R=S=>l[S];function g(S,W){if(W){if(ne.test(S))return S.replace(Ne,R)}else if(Pe.test(S))return S.replace(De,R);return S}const m=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function y(S){return S.replace(m,(W,N)=>(N=N.toLowerCase(),N==="colon"?":":N.charAt(0)==="#"?N.charAt(1)==="x"?String.fromCharCode(parseInt(N.substring(2),16)):String.fromCharCode(+N.substring(1)):""))}const c=/(^|[^\[])\^/g;function o(S,W){S=S.source||S,W=W||"";const N={replace:(E,K)=>(K=K.source||K,K=K.replace(c,"$1"),S=S.replace(E,K),N),getRegex:()=>new RegExp(S,W)};return N}const u=/[^\w:]/g,r=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function e(S,W,N){if(S){let E;try{E=decodeURIComponent(y(N)).replace(u,"").toLowerCase()}catch(K){return null}if(E.indexOf("javascript:")===0||E.indexOf("vbscript:")===0||E.indexOf("data:")===0)return null}W&&!r.test(N)&&(N=i(W,N));try{N=encodeURI(N).replace(/%25/g,"%")}catch(E){return null}return N}const n={},a=/^[^:]+:\/*[^/]*$/,p=/^([^:]+:)[\s\S]*$/,d=/^([^:]+:\/*[^/]*)[\s\S]*$/;function i(S,W){n[" "+S]||(a.test(S)?n[" "+S]=S+"/":n[" "+S]=w(S,"/",!0)),S=n[" "+S];const N=S.indexOf(":")===-1;return W.substring(0,2)==="//"?N?W:S.replace(p,"$1")+W:W.charAt(0)==="/"?N?W:S.replace(d,"$1")+W:S+W}const v={exec:function(){}};function b(S){let W=1,N,E;for(;W<arguments.length;W++){N=arguments[W];for(E in N)Object.prototype.hasOwnProperty.call(N,E)&&(S[E]=N[E])}return S}function _(S,W){const N=S.replace(/\|/g,(z,M,G)=>{let J=!1,te=M;for(;--te>=0&&G[te]==="\\";)J=!J;return J?"|":" |"}),E=N.split(/ \|/);let K=0;if(E.length>W)E.splice(W);else for(;E.length<W;)E.push("");for(;K<E.length;K++)E[K]=E[K].trim().replace(/\\\|/g,"|");return E}function w(S,W,N){const E=S.length;if(E===0)return"";let K=0;for(;K<E;){const z=S.charAt(E-K-1);if(z===W&&!N)K++;else if(z!==W&&N)K++;else break}return S.substr(0,E-K)}function T(S,W){if(S.indexOf(W[1])===-1)return-1;const N=S.length;let E=0,K=0;for(;K<N;K++)if(S[K]==="\\")K++;else if(S[K]===W[0])E++;else if(S[K]===W[1]&&(E--,E<0))return K;return-1}function C(S){S&&S.sanitize&&!S.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}lt.exports={escape:g,unescape:y,edit:o,cleanUrl:e,resolveUrl:i,noopTest:v,merge:b,splitCells:_,rtrim:w,findClosingBracket:T,checkSanitizeDeprecation:C}},sBCT:function(lt,Me,ne){"use strict";var Ne=ne("DZo9"),Pe=ne("8z0m"),De=ne("+L6B"),l=ne("2/Rp"),R=ne("MXD1"),g=ne("CFYs"),m=ne("9og8"),y=ne("2qtc"),c=ne("kLXV"),o=ne("miYZ"),u=ne("tsqr"),r=ne("y8nQ"),e=ne("Vl3Y"),n=ne("tJVT"),a=ne("k1fw"),p=ne("oBTY"),d=ne("5NDa"),i=ne("5rEg"),v=ne("WmNS"),b=ne.n(v),_=ne("q1tI"),w=ne.n(_),T=ne("Ty5D"),C=ne("55Ip"),S=ne("9kvl"),W=ne("kwm0"),N=ne.n(W),E=ne("Aky1"),K=ne("h/US"),z=ne("m3rI"),M=i.a.TextArea,G=1024,J=function(se,H){var he,Z=H.payload||{},$=Z.uploadInfo,V=$===void 0?{}:$;switch(H.type){case"addVideo":return{videoList:[].concat(Object(p.a)(se.videoList),[{name:V.file.name,size:V.file.size,type:V.file.type,fileHash:V.fileHash,state:V.state,videoId:V.videoId,loaded:V.loaded||0,title:""}])};case"removeVideo":return{videoList:se.videoList.filter(function(X){return X.name!==H.payload.name})};case"removeAll":return{videoList:[]};case"updateProgress":return{videoList:se.videoList.map(function(X){return X.name===H.payload.uploadInfo.file.name?Object(a.a)(Object(a.a)({},X),{loaded:H.payload.progressPercent,videoId:V.videoId,fileHash:V.fileHash}):X})};case"updateTitle":return{videoList:(he=se.videoList)===null||he===void 0?void 0:he.map(function(X){return X.name===H.payload.item.name?Object(a.a)(Object(a.a)({},X),{title:H.payload.title}):X})};default:return{videoList:[]}}},te=function(se){var H,he=se.user,Z=se.globalSetting,$=se.loading,V=se.dispatch,X=se.visible,Q=se.editData,oe=se.onCancel,we=oe===void 0?function(){}:oe,ge=se.onOk,Ae=ge===void 0?function(){}:ge,me=Object(T.i)(),ye=e.a.useForm(),ue=Object(n.a)(ye,1),ae=ue[0],ee=Object(_.useReducer)(J,{videoList:[]}),Ee=Object(n.a)(ee,2),F=Ee[0],j=Ee[1],de=Object(_.useState)(!1),be=Object(n.a)(de,2),Te=be[0],I=be[1],t=Object(_.useRef)(),h=Object(_.useState)(),L=Object(n.a)(h,2),A=L[0],k=L[1],le=Object(_.useState)(!1),_e=Object(n.a)(le,2),Ge=_e[0],ze=_e[1],Fe=Object(_.useState)(!1),Ke=Object(n.a)(Fe,2),ot=Ke[0],Be=Ke[1],je=Object(_.useState)([]),ke=Object(n.a)(je,2),Le=ke[0],Oe=ke[1],pe=Object(_.useState)([]),ve=Object(n.a)(pe,2),Ce=ve[0],xe=ve[1];Object(_.useEffect)(function(){if(!Q)return;ze(Q.is_link),k(Q.link),!Q.is_link&&j({type:"addVideo",payload:{uploadInfo:{file:{name:Q.file_name},videoId:Q.video_id,loaded:100}}}),ae.setFieldsValue({name:Q.name,description:Q.description,attachment_id:Q==null?void 0:Q.attachment_id})},[Q]);var Ue=function(){var st=document.getElementById("fileUpload");st.value=""},Xe=function(st){var gt;ze(!1);var yt=st.target.files[0];if(!yt){Ue();return}var ft=yt.name.toLowerCase();if(ft&&ft.indexOf(".avi")==-1&&ft.indexOf(".flv")==-1&&ft.indexOf(".f4v")==-1&&ft.indexOf(".m4v")==-1&&ft.indexOf(".mov")==-1&&ft.indexOf(".mp4")==-1&&ft.indexOf(".rmvb")==-1&&ft.indexOf(".swf")==-1&&ft.indexOf(".webm")==-1&&ft.indexOf(".wmv")==-1){u.b.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),Ue();return}if(yt.size>G*1024*1024){u.b.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71G"),Ue();return}if((gt=F.videoList)!==null&>!==void 0&>.find(function(xt){return xt.name===yt.name})){u.b.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),Ue();return}bt(yt)},rt=function(st,gt){c.a.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:w.a.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",gt?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:function(){Ue(),j({type:"removeVideo",payload:{name:st}})}})},bt=function(st){var gt,yt='{"Vod":{}}';if(I(!0),t.current){t.current.addFile(st,null,null,null,yt);return}Object(E.a)((gt=he.userInfo)===null||gt===void 0?void 0:gt.login,{create:!t,addFileSuccess:function(xt){j({type:"addVideo",payload:{uploadInfo:xt}})},onUploadProgress:function(xt,At,at){var pt=Math.ceil(at*100);j({type:"updateProgress",payload:{uploadInfo:xt,progressPercent:pt}}),Ue()},onUploadFailed:function(xt){u.b.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:function(xt){I(!1)},onUploadSucceed:function(xt){I(!1)},onUploadError:function(xt){I(!1)},gotUploader:function(xt){xt.addFile(st,null,null,null,yt),t.current=xt}})},Et=function(){var ut=Object(m.a)(b.a.mark(function st(){var gt,yt,ft,xt;return b.a.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:return at.next=2,ae.validateFields();case 2:if(!(!Ge&&!((gt=F.videoList)!==null&>!==void 0&>.length)||Ge&&!A)){at.next=5;break}return u.b.info("\u8BF7\u5148\u4E0A\u4F20\u89C6\u9891\u6216\u8005\u6DFB\u52A0\u5916\u94FE"),at.abrupt("return");case 5:Be(!0),ft=Ge?{link:A}:{video_id:(yt=F.videoList)===null||yt===void 0?void 0:yt[0].videoId};debugger;return at.next=10,Ae(Object(a.a)(Object(a.a)({},ft),{name:ae.getFieldValue("name"),attachment_id:ae.getFieldValue("attachment_id"),description:ae.getFieldValue("description")}));case 10:xt=at.sent,Be(!1),xt.id&&_t();case 13:case"end":return at.stop()}},st)}));return function(){return ut.apply(this,arguments)}}(),_t=function(){ae.resetFields(),j({type:"removeAll"}),k(null),ze(null)},vt=function(){we(),_t()},et={name:"file",multiple:!0,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*",action:z.a.API_SERVER+"/api/attachments.json",withCredentials:!0,onRemove:function(st){xe([])},onChange:function(st){var gt=st.file.status;if(gt!=="uploading",gt==="removed"&&Oe(st.fileList),gt==="done"){var yt,ft,xt;Oe(st==null||((yt=st.fileList)===null||yt===void 0)?void 0:yt.slice(-1)),j({type:"addVideo",payload:{uploadInfo:{videoId:st==null||((ft=st.fileList[0])===null||ft===void 0||((xt=ft.response)===null||xt===void 0))?void 0:xt.id,loaded:100,file:Object(a.a)({},st==null?void 0:st.fileList[0])}}}),ze(!1),u.b.success("".concat(st.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))}else gt==="error"&&u.b.error("".concat(st.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(st){var gt=st.size/1024/1024<1e3;return gt||u.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),gt}},Ye=function(){var st,gt,yt,ft,xt,At,at,pt,ct,dt,Ct,fe;return w.a.createElement(w.a.Fragment,null,!Ge&&!!((st=F.videoList)!==null&&st!==void 0&&st.length)&&w.a.createElement("div",{className:N.a.fileProgress},((gt=F.videoList)===null||gt===void 0||((yt=gt[0])===null||yt===void 0)?void 0:yt.loaded)==100?w.a.createElement("div",{className:"".concat(N.a.videoName," font14")},(ft=F.videoList)===null||ft===void 0||((xt=ft[0])===null||xt===void 0)?void 0:xt.name):w.a.createElement(g.a,{style:{width:"80%"},percent:(At=F.videoList)===null||At===void 0||((at=At[0])===null||at===void 0)?void 0:at.loaded,status:((pt=F.videoList)===null||pt===void 0||((ct=pt[0])===null||ct===void 0)?void 0:ct.loaded)==100?"normal":"active"}),w.a.createElement("div",{className:N.a.fileCancel,onClick:function(){var x,P,B,q;return rt((x=F.videoList)===null||x===void 0||((P=x[0])===null||P===void 0)?void 0:P.name,((B=F.videoList)===null||B===void 0||((q=B[0])===null||q===void 0)?void 0:q.loaded)==100)}},((dt=F.videoList)===null||dt===void 0||((Ct=dt[0])===null||Ct===void 0)?void 0:Ct.loaded)===100?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20")),!((fe=F.videoList)!==null&&fe!==void 0&&fe.length)&&w.a.createElement("div",{className:N.a.uploadWrap},w.a.createElement("label",{htmlFor:"fileUpload",style:{marginRight:"30px"}},w.a.createElement(Pe.a,et,w.a.createElement(l.a,{className:N.a.upload,disabled:(Ce==null?void 0:Ce.length)>0},w.a.createElement("i",{className:"iconfont icon-shangchuanshipin1 mr5"}),"\u4E0A\u4F20\u89C6\u9891"))),w.a.createElement("label",{className:"".concat(N.a.upload," ").concat(N.a.uploadLink),onClick:function(){return ze(!0)}},w.a.createElement("i",{className:"iconfont icon-lianjie1 mr5"}),"\u6DFB\u52A0\u5916\u94FE")),Ge&&w.a.createElement(i.a,{className:"mt5",placeholder:"\u8BF7\u8F93\u5165\u89C6\u9891\u94FE\u63A5",value:A,onChange:function(x){return k(x.target.value)}}))};return w.a.createElement(c.a,{centered:!0,maskClosable:!1,title:Q?"\u7F16\u8F91\u89C6\u9891\u9879\u76EE":"\u65B0\u5EFA\u89C6\u9891\u9879\u76EE",width:740,className:N.a.modal,visible:X,confirmLoading:ot,onOk:Et,onCancel:vt},w.a.createElement(e.a,{form:ae},w.a.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:Xe,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}),w.a.createElement(e.a.Item,{label:"\u9879\u76EE\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9879\u76EE\u540D\u79F0"}]},w.a.createElement(i.a,{maxLength:40,placeholder:"\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC740\u5B57\u7684\u9879\u76EE\u540D\u79F0"})),w.a.createElement(e.a.Item,{label:"\u9879\u76EE\u5185\u5BB9",name:"content",className:N.a.contentItem},Ye()),w.a.createElement(e.a.Item,{name:"attachment_id",label:"\u4E0A\u4F20\u5C01\u9762\u56FE:"},w.a.createElement(K.a,{getFileProgress:function(st){if(st.file.status==="uploading"){Be(!0);return}st.file.status==="done"&&Be(!1)}})),w.a.createElement(e.a.Item,{label:"\u9879\u76EE\u7B80\u4ECB",name:"description",className:"ml8"},w.a.createElement(M,{rows:5,maxLength:800,placeholder:"\u8BF7\u8F93\u5165\u672C\u89C6\u9891\u7B80\u4ECB\uFF0C\u6700\u591A\u4E0D\u8D85\u8FC7800\u5B57"})),w.a.createElement("div",{className:"c-grey-999"},w.a.createElement("div",null,"\u6CE8\u610F\uFF1A"),w.a.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",w.a.createElement(C.a,{to:"/users/".concat((H=he.userInfo)===null||H===void 0?void 0:H.login,"/videos/protocol"),target:"_blank",className:N.a.colorBlue},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),w.a.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),w.a.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"),w.a.createElement("div",null,"4\u3001\u5982\u679C\u89C6\u9891\u6765\u81EA\u4E8E\u5916\u90E8\u94FE\u63A5\uFF0C\u672C\u7F51\u7AD9\u4E0D\u63D0\u4F9B\u64AD\u653E\u9875\u9762\uFF0C\u65E0\u6CD5\u63D0\u4F9B\u7EDF\u8BA1\u6570\u636E\u3002"))))};Me.a=Object(S.a)(function(re){var se=re.user,H=re.loading,he=re.globalSetting;return{user:se,globalSetting:he,loading:H}})(te)},sWEp:function(lt,Me,ne){lt.exports={wrap:"wrap___3nJXB",title:"title___3AYM5",radioWrap:"radioWrap___dbSML",radio:"radio___3h-_z",colorFF0000:"colorFF0000___2d_ZE",pagination:"pagination___3WP6s"}},vHTk:function(lt,Me,ne){lt.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vZDz:function(lt,Me,ne){lt.exports={contentWrap:"contentWrap___3Fc2r",footer:"footer___4nxVN",radioGroup:"radioGroup___359yE",wrap:"wrap___1OqR3",introName:"introName___3saG-",rating:"rating___3X95K",modalRating:"modalRating___A4qeN"}},w8Aa:function(lt,Me,ne){lt.exports={img:"img___3e4yQ"}}}]);
|