You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Competitions__Detail.95d...

1439 lines
1.7 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(window.webpackJsonp=window.webpackJsonp||[]).push([[120,5,6,7,8,10,16,17],{"+NIl":
/*!***************************************************!*\
!*** ./node_modules/codemirror/mode/stex/stex.js ***!
\***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.defineMode("stex",(function(e,t){function n(e,t){e.cmdState.push(t)}function r(e){return e.cmdState.length>0?e.cmdState[e.cmdState.length-1]:null}function i(e,t,n){return function(){this.name=e,this.bracketNo=0,this.style=t,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var o={};function a(e,t){e.f=t}function s(e,t){var i;if(e.match(/^\\[a-zA-Z@]+/)){var s=e.current().slice(1);return n(t,i=new(i=o.hasOwnProperty(s)?o[s]:o.DEFAULT)),a(t,c),i.style}if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/\\]/))return"tag";if(e.match("\\["))return a(t,(function(e,t){return l(e,t,"\\]")})),"keyword";if(e.match("\\("))return a(t,(function(e,t){return l(e,t,"\\)")})),"keyword";if(e.match("$$"))return a(t,(function(e,t){return l(e,t,"$$")})),"keyword";if(e.match("$"))return a(t,(function(e,t){return l(e,t,"$")})),"keyword";var u=e.next();return"%"==u?(e.skipToEnd(),"comment"):"}"==u||"]"==u?(i=r(t))?(i.closeBracket(u),a(t,c),"bracket"):"error":"{"==u||"["==u?(n(t,i=new(i=o.DEFAULT)),"bracket"):/\d/.test(u)?(e.eatWhile(/[\w.%]/),"atom"):(e.eatWhile(/[\w\-_]/),"begin"==(i=function(e){for(var t=e.cmdState,n=t.length-1;n>=0;n--){var r=t[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(t)).name&&(i.argument=e.current()),i.styleIdentifier())}function l(e,t,n){if(e.eatSpace())return null;if(n&&e.match(n))return a(t,s),"keyword";if(e.match(/^\\[a-zA-Z@]+/))return"tag";if(e.match(/^[a-zA-Z]+/))return"variable-2";if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/]/))return"tag";if(e.match(/^[\^_&]/))return"tag";if(e.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(e.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=e.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(e.skipToEnd(),"comment"):"error"}function c(e,t){var n=e.peek();return"{"==n||"["==n?(r(t).openBracket(n),e.eat(n),a(t,s),"bracket"):/[ \t\r]/.test(n)?(e.eat(n),null):(a(t,s),function(e){var t=e.cmdState.pop();t&&t.closeBracket()}(t),s(e,t))}return o.importmodule=i("importmodule","tag",["string","builtin"]),o.documentclass=i("documentclass","tag",["","atom"]),o.usepackage=i("usepackage","tag",["atom"]),o.begin=i("begin","tag",["atom"]),o.end=i("end","tag",["atom"]),o.label=i("label","tag",["atom"]),o.ref=i("ref","tag",["atom"]),o.eqref=i("eqref","tag",["atom"]),o.cite=i("cite","tag",["atom"]),o.bibitem=i("bibitem","tag",["atom"]),o.Bibitem=i("Bibitem","tag",["atom"]),o.RBibitem=i("RBibitem","tag",["atom"]),o.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:t.inMathMode?function(e,t){return l(e,t)}:s}},copyState:function(e){return{cmdState:e.cmdState.slice(),f:e.f}},token:function(e,t){return t.f(e,t)},blankLine:function(e){e.f=s,e.cmdState.length=0},lineComment:"%"}})),e.defineMIME("text/x-stex","stex"),e.defineMIME("text/x-latex","stex")}(n(/*! ../../lib/codemirror */"VrN/"))},"19Vz":
/*!**************************************************************!*\
!*** ./node_modules/codemirror/addon/display/placeholder.js ***!
\**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){o(e)&&n(e)}function i(e){var r=e.getWrapperElement(),i=o(e);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(e):t(e)}function o(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(o,a,s){var l=s&&s!=e.Init;if(a&&!l)o.on("blur",r),o.on("change",i),o.on("swapDoc",i),e.on(o.getInputField(),"compositionupdate",o.state.placeholderCompose=function(){!function(e){setTimeout((function(){var r=!1,i=e.getInputField();"TEXTAREA"==i.nodeName?r=!i.value:1==e.lineCount()&&(r=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),r?n(e):t(e)}),20)}(o)}),i(o);else if(!a&&l){o.off("blur",r),o.off("change",i),o.off("swapDoc",i),e.off(o.getInputField(),"compositionupdate",o.state.placeholderCompose),t(o);var c=o.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}a&&!o.hasFocus()&&r(o)}))}(n(/*! ../../lib/codemirror */"VrN/"))},"1ZF9":
/*!*****************************************!*\
!*** ./src/assets/images/Authorize.png ***!
\*****************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/Authorize.cc9c212f.png"},"1eCo":
/*!*************************************************!*\
!*** ./node_modules/codemirror/mode/xml/xml.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var o,a,s=r.indentUnit,l={},c=i.htmlMode?t:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function h(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(f("atom","]]>")):null:e.match("--")?n(f("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==i){if(1==t){r.tokenize=h;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=f("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=d,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function d(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=h,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){t.tokenize=h,t.state=v,t.tagName=t.tagStart=null;var a=t.tokenize(e,t);return a?a+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=d;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=h;break}n.next()}return e}}function p(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function m(e){e.context&&(e.context=e.context.prev)}function g(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;m(e)}}function v(e,t,n){return"openTag"==e?(n.tagStart=t.column(),y):"closeTag"==e?b:v}function y(e,t,n){return"word"==e?(n.tagName=t.current(),a="tag",E):l.allowMissingTagName&&"endTag"==e?(a="tag bracket",E(e,0,n)):(a="error",y)}function b(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&m(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(a="tag",x):(a="tag error",w)}return l.allowMissingTagName&&"endTag"==e?(a="tag bracket",x(e,0,n)):(a="error",w)}function x(e,t,n){return"endTag"!=e?(a="error",x):(m(n),v)}function w(e,t,n){return a="error",x(e,0,n)}function E(e,t,n){if("word"==e)return a="attribute",S;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?g(n,r):(g(n,r),n.context=new p(n,r,i==n.indented)),v}return a="error",E}function S(e,t,n){return"equals"==e?C:(l.allowMissing||(a="error"),E(e,0,n))}function C(e,t,n){return"string"==e?k:"word"==e&&l.allowUnquoted?(a="string",E):(a="error",E(e,0,n))}function k(e,t,n){return"string"==e?k:E(e,0,n)}return h.isInText=!0,{startState:function(e){var t={tokenize:h,state:v,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(a=null,t.state=t.state(o||n,e,t),a&&(n="error"==a?n+" error":a)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=d&&t.tokenize!=h)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var o=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(o&&o[1])for(;i;){if(i.tagName==o[2]){i=i.prev;break}if(!l.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(o)for(;i;){var a=l.contextGrabbers[i.tagName];if(!a||!a.hasOwnProperty(o[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+s:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==C&&(e.state=E)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(/*! ../../lib/codemirror */"VrN/"))},"1uat":
/*!******************************************!*\
!*** ./node_modules/crypto-js/sha512.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./x64-core */"MlIO"),function(){var e=r,t=e.lib.Hasher,n=e.x64,i=n.Word,o=n.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var u=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],h=n[6],d=n[7],f=r.high,p=r.low,m=i.high,g=i.low,v=o.high,y=o.low,b=a.high,x=a.low,w=s.high,E=s.low,S=u.high,C=u.low,k=h.high,_=h.low,T=d.high,O=d.low,A=f,L=p,D=m,I=g,R=v,M=y,N=b,j=x,P=w,B=E,F=S,U=C,H=k,z=_,G=T,V=O,W=0;W<80;W++){var K,q,X=c[W];if(W<16)q=X.high=0|e[t+2*W],K=X.low=0|e[t+2*W+1];else{var Y=c[W-15],$=Y.high,J=Y.low,Z=($>>>1|J<<31)^($>>>8|J<<24)^$>>>7,Q=(J>>>1|$<<31)^(J>>>8|$<<24)^(J>>>7|$<<25),ee=c[W-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=c[W-7],ae=oe.high,se=oe.low,le=c[W-16],ce=le.high,ue=le.low;q=(q=(q=Z+ae+((K=Q+se)>>>0<Q>>>0?1:0))+re+((K+=ie)>>>0<ie>>>0?1:0))+ce+((K+=ue)>>>0<ue>>>0?1:0),X.high=q,X.low=K}var he,de=P&F^~P&H,fe=B&U^~B&z,pe=A&D^A&R^D&R,me=L&I^L&M^I&M,ge=(A>>>28|L<<4)^(A<<30|L>>>2)^(A<<25|L>>>7),ve=(L>>>28|A<<4)^(L<<30|A>>>2)^(L<<25|A>>>7),ye=(P>>>14|B<<18)^(P>>>18|B<<14)^(P<<23|B>>>9),be=(B>>>14|P<<18)^(B>>>18|P<<14)^(B<<23|P>>>9),xe=l[W],we=xe.high,Ee=xe.low,Se=G+ye+((he=V+be)>>>0<V>>>0?1:0),Ce=ve+me;G=H,V=z,H=F,z=U,F=P,U=B,P=N+(Se=(Se=(Se=Se+de+((he+=fe)>>>0<fe>>>0?1:0))+we+((he+=Ee)>>>0<Ee>>>0?1:0))+q+((he+=K)>>>0<K>>>0?1:0))+((B=j+he|0)>>>0<j>>>0?1:0)|0,N=R,j=M,R=D,M=I,D=A,I=L,A=Se+(ge+pe+(Ce>>>0<ve>>>0?1:0))+((L=he+Ce|0)>>>0<he>>>0?1:0)|0}p=r.low=p+L,r.high=f+A+(p>>>0<L>>>0?1:0),g=i.low=g+I,i.high=m+D+(g>>>0<I>>>0?1:0),y=o.low=y+M,o.high=v+R+(y>>>0<M>>>0?1:0),x=a.low=x+j,a.high=b+N+(x>>>0<j>>>0?1:0),E=s.low=E+B,s.high=w+P+(E>>>0<B>>>0?1:0),C=u.low=C+U,u.high=S+F+(C>>>0<U>>>0?1:0),_=h.low=_+z,h.high=k+H+(_>>>0<z>>>0?1:0),O=d.low=O+V,d.high=T+G+(O>>>0<V>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(u),e.HmacSHA512=t._createHmacHelper(u)}(),r.SHA512)},"3y9D":
/*!****************************************!*\
!*** ./node_modules/crypto-js/sha1.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o,a,s,l,c,u;e.exports=(u=n(/*! ./core */"Ib8C"),i=(r=u).lib,o=i.WordArray,a=i.Hasher,s=r.algo,l=[],c=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=0;c<80;c++){if(c<16)l[c]=0|e[t+c];else{var u=l[c-3]^l[c-8]^l[c-14]^l[c-16];l[c]=u<<1|u>>>31}var h=(r<<5|r>>>27)+s+l[c];h+=c<20?1518500249+(i&o|~i&a):c<40?1859775393+(i^o^a):c<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=r,r=h}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=a._createHelper(c),r.HmacSHA1=a._createHmacHelper(c),u.SHA1)},4:
/*!************************!*\
!*** crypto (ignored) ***!
\************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){},"55Ip":
/*!***************************************************************!*\
!*** ./node_modules/react-router-dom/esm/react-router-dom.js ***!
\***************************************************************/
/*! exports provided: MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, BrowserRouter, HashRouter, Link, NavLink */
/*! exports used: Link, NavLink */function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return b}));var r=n(/*! react-router */"Ty5D"),i=n(/*! @babel/runtime/helpers/esm/inheritsLoose */"dI71"),o=n(/*! react */"q1tI"),a=n.n(o),s=n(/*! history */"YS25"),l=(n(/*! prop-types */"17x9"),n(/*! @babel/runtime/helpers/esm/extends */"wx14")),c=n(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */"zLVn"),u=n(/*! tiny-invariant */"9R94");a.a.Component;a.a.Component;var h=function(e,t){return"function"==typeof e?e(t):e},d=function(e,t){return"string"==typeof e?Object(s.c)(e,null,null,t):e},f=function(e){return e},p=a.a.forwardRef;void 0===p&&(p=f);var m=p((function(e,t){var n=e.innerRef,r=e.navigate,i=e.onClick,o=Object(c.a)(e,["innerRef","navigate","onClick"]),s=o.target,u=Object(l.a)({},o,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return u.ref=f!==p&&t||n,a.a.createElement("a",u)}));var g=p((function(e,t){var n=e.component,i=void 0===n?m:n,o=e.replace,s=e.to,g=e.innerRef,v=Object(c.a)(e,["component","replace","to","innerRef"]);return a.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=e.history,r=d(h(s,e.location),e.location),c=r?n.createHref(r):"",m=Object(l.a)({},v,{href:c,navigate:function(){var t=h(s,e.location);(o?n.replace:n.push)(t)}});return f!==p?m.ref=t||g:m.innerRef=g,a.a.createElement(i,m)}))})),v=function(e){return e},y=a.a.forwardRef;void 0===y&&(y=v);var b=y((function(e,t){var n=e["aria-current"],i=void 0===n?"page":n,o=e.activeClassName,s=void 0===o?"active":o,f=e.activeStyle,p=e.className,m=e.exact,b=e.isActive,x=e.location,w=e.sensitive,E=e.strict,S=e.style,C=e.to,k=e.innerRef,_=Object(c.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return a.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=x||e.location,o=d(h(C,n),n),c=o.pathname,T=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),O=T?Object(r.f)(n.pathname,{path:T,exact:m,sensitive:w,strict:E}):null,A=!!(b?b(O,n):O),L=A?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(p,s):p,D=A?Object(l.a)({},S,{},f):S,I=Object(l.a)({"aria-current":A&&i||null,className:L,style:D,to:o},_);return v!==y?I.ref=t||k:I.innerRef=k,a.a.createElement(g,I)}))}))},"5hvy":
/*!****************************************!*\
!*** ./node_modules/crypto-js/sha3.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./x64-core */"MlIO"),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.x64.Word,s=t.algo,l=[],c=[],u=[];!function(){for(var e=1,t=0,n=0;n<24;n++){l[e+5*t]=(n+1)*(n+2)/2%64;var r=(2*e+3*t)%5;e=t%5,t=r}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,h=0,d=0;d<7;d++){if(1&i){var f=(1<<d)-1;f<32?h^=1<<f:s^=1<<f-32}128&i?i=i<<1^113:i<<=1}u[o]=a.create(s,h)}}();var h=[];!function(){for(var e=0;e<25;e++)h[e]=a.create()}();var d=s.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var n=this._state,r=this.blockSize/2,i=0;i<r;i++){var o=e[t+2*i],a=e[t+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(O=n[i]).high^=a,O.low^=o}for(var s=0;s<24;s++){for(var d=0;d<5;d++){for(var f=0,p=0,m=0;m<5;m++)f^=(O=n[d+5*m]).high,p^=O.low;var g=h[d];g.high=f,g.low=p}for(d=0;d<5;d++){var v=h[(d+4)%5],y=h[(d+1)%5],b=y.high,x=y.low;for(f=v.high^(b<<1|x>>>31),p=v.low^(x<<1|b>>>31),m=0;m<5;m++)(O=n[d+5*m]).high^=f,O.low^=p}for(var w=1;w<25;w++){var E=(O=n[w]).high,S=O.low,C=l[w];C<32?(f=E<<C|S>>>32-C,p=S<<C|E>>>32-C):(f=S<<C-32|E>>>64-C,p=E<<C-32|S>>>64-C);var k=h[c[w]];k.high=f,k.low=p}var _=h[0],T=n[0];for(_.high=T.high,_.low=T.low,d=0;d<5;d++)for(m=0;m<5;m++){var O=n[w=d+5*m],A=h[w],L=h[(d+1)%5+5*m],D=h[(d+2)%5+5*m];O.high=A.high^~L.high&D.high,O.low=A.low^~L.low&D.low}O=n[0];var I=u[s];O.high^=I.high,O.low^=I.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u<l;u++){var h=a[u],d=h.high,f=h.low;d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c.push(f),c.push(d)}return new i.init(c,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=o._createHelper(d),t.HmacSHA3=o._createHmacHelper(d)}(Math),r.SHA3)},"6+eU":
/*!************************************************************!*\
!*** ./node_modules/rc-pagination/es/index.js + 4 modules ***!
\************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/zh_CN.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r=n("wx14"),i=n("rePB"),o=n("VTBJ"),a=n("1OyB"),s=n("vuIU"),l=n("Ji7U"),c=n("LK+K"),u=n("q1tI"),h=n.n(u),d=n("TSYQ"),f=n.n(d),p=function(e){var t,n="".concat(e.rootPrefixCls,"-item"),r=f()(n,"".concat(n,"-").concat(e.page),(t={},Object(i.a)(t,"".concat(n,"-active"),e.active),Object(i.a)(t,e.className,!!e.className),Object(i.a)(t,"".concat(n,"-disabled"),!e.page),t));return h.a.createElement("li",{title:e.showTitle?e.page:null,className:r,onClick:function(){e.onClick(e.page)},onKeyPress:function(t){e.onKeyPress(t,e.onClick,e.page)},tabIndex:"0"},e.itemRender(e.page,"page",h.a.createElement("a",{rel:"nofollow"},e.page)))},m=13,g=38,v=40,y=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).state={goInputText:""},e.buildOptionText=function(t){return"".concat(t," ").concat(e.props.locale.items_per_page)},e.changeSize=function(t){e.props.changeSize(Number(t))},e.handleChange=function(t){e.setState({goInputText:t.target.value})},e.handleBlur=function(t){var n=e.props,r=n.goButton,i=n.quickGo,o=n.rootPrefixCls,a=e.state.goInputText;r||""===a||t.relatedTarget&&(t.relatedTarget.className.indexOf("".concat(o,"-prev"))>=0||t.relatedTarget.className.indexOf("".concat(o,"-next"))>=0)||(e.setState({goInputText:""}),i(e.getValidValue()))},e.go=function(t){""!==e.state.goInputText&&(t.keyCode!==m&&"click"!==t.type||(e.setState({goInputText:""}),e.props.quickGo(e.getValidValue())))},e}return Object(s.a)(n,[{key:"getValidValue",value:function(){var e=this.state,t=e.goInputText,n=e.current;return!t||isNaN(t)?n:Number(t)}},{key:"getPageSizeOptions",value:function(){var e=this.props,t=e.pageSize,n=e.pageSizeOptions;return n.some((function(e){return e.toString()===t.toString()}))?n:n.concat([t.toString()]).sort((function(e,t){return(isNaN(Number(e))?0:Number(e))-(isNaN(Number(t))?0:Number(t))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.pageSize,r=t.locale,i=t.rootPrefixCls,o=t.changeSize,a=t.quickGo,s=t.goButton,l=t.selectComponentClass,c=t.buildOptionText,u=t.selectPrefixCls,d=t.disabled,f=this.state.goInputText,p="".concat(i,"-options"),m=l,g=null,v=null,y=null;if(!o&&!a)return null;var b=this.getPageSizeOptions();if(o&&m){var x=b.map((function(t,n){return h.a.createElement(m.Option,{key:n,value:t.toString()},(c||e.buildOptionText)(t))}));g=h.a.createElement(m,{disabled:d,prefixCls:u,showSearch:!1,className:"".concat(p,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||b[0]).toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode}},x)}return a&&(s&&(y="boolean"==typeof s?h.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:d,className:"".concat(p,"-quick-jumper-button")},r.jump_to_confirm):h.a.createElement("span",{onClick:this.go,onKeyUp:this.go},s)),v=h.a.createElement("div",{className:"".concat(p,"-quick-jumper")},r.jump_to,h.a.createElement("input",{disabled:d,type:"text",value:f,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),r.page,y)),h.a.createElement("li",{className:"".concat(p)},g,v)}}]),n}(h.a.Component);y.defaultProps={pageSizeOptions:["10","20","50","100"]};var b=y,x=n("N2Kk");function w(){}function E(e,t,n){var r=void 0===e?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var S=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(a.a)(this,n),(r=t.call(this,e)).getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(E(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(e,t){var n=r.props.prefixCls,i=e||h.a.createElement("button",{type:"button","aria-label":t,className:"".concat(n,"-item-link")});return"function"==typeof e&&(i=h.a.createElement(e,Object(o.a)({},r.props))),i},r.savePaginationNode=function(e){r.paginationNode=e},r.isValid=function(e){return"number"==typeof(t=e)&&isFinite(t)&&Math.floor(t)===t&&e!==r.state.current;var t},r.shouldDisplayQuickJumper=function(){var e=r.props,t=e.showQuickJumper,n=e.pageSize;return!(e.total<=n)&&t},r.handleKeyDown=function(e){e.keyCode!==g&&e.keyCode!==v||e.preventDefault()},r.handleKeyUp=function(e){var t=r.getValidValue(e);t!==r.state.currentInputValue&&r.setState({currentInputValue:t}),e.keyCode===m?r.handleChange(t):e.keyCode===g?r.handleChange(t-1):e.keyCode===v&&r.handleChange(t+1)},r.changePageSize=function(e){var t=r.state.current,n=E(e,r.state,r.props);t=t>n?n:t,0===n&&(t=r.state.current),"number"==typeof e&&("pageSize"in r.props||r.setState({pageSize:e}),"current"in r.props||r.setState({current:t,currentInputValue:t})),r.props.onShowSizeChange(t,e),"onChange"in r.props&&r.props.onChange&&r.props.onChange(t,e)},r.handleChange=function(e){var t=r.props.disabled,n=e;if(r.isValid(n)&&!t){var i=E(void 0,r.state,r.props);n>i?n=i:n<1&&(n=1),"current"in r.props||r.setState({current:n,currentInputValue:n});var o=r.state.pageSize;return r.props.onChange(n,o),n}return r.state.current},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current<E(void 0,r.state,r.props)},r.runIfEnter=function(e,t){if("Enter"===e.key||13===e.charCode){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];t.apply(void 0,r)}},r.runIfEnterPrev=function(e){r.runIfEnter(e,r.prev)},r.runIfEnterNext=function(e){r.runIfEnter(e,r.next)},r.runIfEnterJumpPrev=function(e){r.runIfEnter(e,r.jumpPrev)},r.runIfEnterJumpNext=function(e){r.runIfEnter(e,r.jumpNext)},r.handleGoTO=function(e){e.keyCode!==m&&"click"!==e.type||r.handleChange(r.state.currentInputValue)};var i=e.onChange!==w;"current"in e&&!i&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var s=e.defaultCurrent;"current"in e&&(s=e.current);var l=e.defaultPageSize;return"pageSize"in e&&(l=e.pageSize),s=Math.min(s,E(l,void 0,e)),r.state={current:s,currentInputValue:s,pageSize:l},r}return Object(s.a)(n,[{key:"componentDidUpdate",value:function(e,t){var n=this.props.prefixCls;if(t.current!==this.state.current&&this.paginationNode){var r=this.paginationNode.querySelector(".".concat(n,"-item-").concat(t.current));r&&document.activeElement===r&&r.blur()}}},{key:"getValidValue",value:function(e){var t=e.target.value,n=E(void 0,this.state,this.props),r=this.state.currentInputValue;return""===t?t:isNaN(Number(t))?r:t>=n?n:Number(t)}},{key:"getShowSizeChanger",value:function(){var e=this.props,t=e.showSizeChanger,n=e.total,r=e.totalBoundaryShowSizeChanger;return void 0!==t?t:n>r}},{key:"renderPrev",value:function(e){var t=this.props,n=t.prevIcon,r=(0,t.itemRender)(e,"prev",this.getItemIcon(n,"prev page")),i=!this.hasPrev();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"renderNext",value:function(e){var t=this.props,n=t.nextIcon,r=(0,t.itemRender)(e,"next",this.getItemIcon(n,"next page")),i=!this.hasNext();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,o=t.className,a=t.style,s=t.disabled,l=t.hideOnSinglePage,c=t.total,d=t.locale,m=t.showQuickJumper,g=t.showLessItems,v=t.showTitle,y=t.showTotal,x=t.simple,w=t.itemRender,S=t.showPrevNextJumpers,C=t.jumpPrevIcon,k=t.jumpNextIcon,_=t.selectComponentClass,T=t.selectPrefixCls,O=t.pageSizeOptions,A=this.state,L=A.current,D=A.pageSize,I=A.currentInputValue;if(!0===l&&c<=D)return null;var R=E(void 0,this.state,this.props),M=[],N=null,j=null,P=null,B=null,F=null,U=m&&m.goButton,H=g?1:2,z=L-1>0?L-1:0,G=L+1<R?L+1:R,V=Object.keys(this.props).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(t[n]=e.props[n]),t}),{});if(x)return U&&(F="boolean"==typeof U?h.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},d.jump_to_confirm):h.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},U),F=h.a.createElement("li",{title:v?"".concat(d.jump_to).concat(L,"/").concat(R):null,className:"".concat(n,"-simple-pager")},F)),h.a.createElement("ul",Object(r.a)({className:f()(n,"".concat(n,"-simple"),Object(i.a)({},"".concat(n,"-disabled"),s),o),style:a,ref:this.savePaginationNode},V),h.a.createElement("li",{title:v?d.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:f()("".concat(n,"-prev"),Object(i.a)({},"".concat(n,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(z)),h.a.createElement("li",{title:v?"".concat(L,"/").concat(R):null,className:"".concat(n,"-simple-pager")},h.a.createElement("input",{type:"text",value:I,disabled:s,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),h.a.createElement("span",{className:"".concat(n,"-slash")},"/"),R),h.a.createElement("li",{title:v?d.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:f()("".concat(n,"-next"),Object(i.a)({},"".concat(n,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(G)),F);if(R<=3+2*H){var W={locale:d,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:v,itemRender:w};R||M.push(h.a.createElement(p,Object(r.a)({},W,{key:"noPager",page:R,className:"".concat(n,"-disabled")})));for(var K=1;K<=R;K+=1){var q=L===K;M.push(h.a.createElement(p,Object(r.a)({},W,{key:K,page:K,active:q})))}}else{var X=g?d.prev_3:d.prev_5,Y=g?d.next_3:d.next_5;S&&(N=h.a.createElement("li",{title:v?X:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:f()("".concat(n,"-jump-prev"),Object(i.a)({},"".concat(n,"-jump-prev-custom-icon"),!!C))},w(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(C,"prev page"))),j=h.a.createElement("li",{title:v?Y:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:f()("".concat(n,"-jump-next"),Object(i.a)({},"".concat(n,"-jump-next-custom-icon"),!!k))},w(this.getJumpNextPage(),"jump-next",this.getItemIcon(k,"next page")))),B=h.a.createElement(p,{locale:d,last:!0,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:R,page:R,active:!1,showTitle:v,itemRender:w}),P=h.a.createElement(p,{locale:d,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:v,itemRender:w});var $=Math.max(1,L-H),J=Math.min(L+H,R);L-1<=H&&(J=1+2*H),R-L<=H&&($=R-2*H);for(var Z=$;Z<=J;Z+=1){var Q=L===Z;M.push(h.a.createElement(p,{locale:d,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Z,page:Z,active:Q,showTitle:v,itemRender:w}))}L-1>=2*H&&3!==L&&(M[0]=Object(u.cloneElement)(M[0],{className:"".concat(n,"-item-after-jump-prev")}),M.unshift(N)),R-L>=2*H&&L!==R-2&&(M[M.length-1]=Object(u.cloneElement)(M[M.length-1],{className:"".concat(n,"-item-before-jump-next")}),M.push(j)),1!==$&&M.unshift(P),J!==R&&M.push(B)}var ee=null;y&&(ee=h.a.createElement("li",{className:"".concat(n,"-total-text")},y(c,[0===c?0:(L-1)*D+1,L*D>c?c:L*D])));var te=!this.hasPrev()||!R,ne=!this.hasNext()||!R;return h.a.createElement("ul",Object(r.a)({className:f()(n,o,Object(i.a)({},"".concat(n,"-disabled"),s)),style:a,unselectable:"unselectable",ref:this.savePaginationNode},V),ee,h.a.createElement("li",{title:v?d.prev_page:null,onClick:this.prev,tabIndex:te?null:0,onKeyPress:this.runIfEnterPrev,className:f()("".concat(n,"-prev"),Object(i.a)({},"".concat(n,"-disabled"),te)),"aria-disabled":te},this.renderPrev(z)),M,h.a.createElement("li",{title:v?d.next_page:null,onClick:this.next,tabIndex:ne?null:0,onKeyPress:this.runIfEnterNext,className:f()("".concat(n,"-next"),Object(i.a)({},"".concat(n,"-disabled"),ne)),"aria-disabled":ne},this.renderNext(G)),h.a.createElement(b,{disabled:s,locale:d,rootPrefixCls:n,selectComponentClass:_,selectPrefixCls:T,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:L,pageSize:D,pageSizeOptions:O,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:U}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};if("current"in e&&(n.current=e.current,e.current!==t.current&&(n.currentInputValue=n.current)),"pageSize"in e&&e.pageSize!==t.pageSize){var r=t.current,i=E(e.pageSize,t,e);r=r>i?i:r,"current"in e||(n.current=r,n.currentInputValue=r),n.pageSize=e.pageSize}return n}}]),n}(h.a.Component);S.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:w,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:w,locale:x.a,style:{},itemRender:function(e,t,n){return n},totalBoundaryShowSizeChanger:50};var C=S},"6RRn":
/*!*******************************************!*\
!*** ./node_modules/rc-table/es/index.js ***!
\*******************************************/
/*! exports provided: Summary, Column, ColumnGroup, INTERNAL_COL_DEFINE, default */
/*! exports used: INTERNAL_COL_DEFINE, Summary, default */function(e,t,n){"use strict";var r=n(/*! ./Table */"wCXF"),i=n(/*! ./Footer */"n6Qo");n.d(t,"b",(function(){return i.a}));n(/*! ./sugar/Column */"IBYe"),n(/*! ./sugar/ColumnGroup */"6eGT");var o=n(/*! ./utils/legacyUtil */"hW8S");n.d(t,"a",(function(){return o.a})),t.c=r.b},"6eGT":
/*!*******************************************************!*\
!*** ./node_modules/rc-table/es/sugar/ColumnGroup.js ***!
\*******************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";t.a=function(e){return null}},"7Cbv":
/*!**************************************************************!*\
!*** ./node_modules/uuid/dist/esm-browser/v4.js + 4 modules ***!
\**************************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16);function o(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var s=function(e){return"string"==typeof e&&a.test(e)},l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));var u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};t.a=function(e,t,n){var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return u(r)}},"7ahc":
/*!*************************************************************!*\
!*** ./src/components/markdown-editor/code-block/index.tsx ***!
\*************************************************************/
/*! exports provided: default, MyCodeMirror */
/*! exports used: MyCodeMirror, default */function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),o=(n(/*! antd/es/button/style */"+L6B"),n(/*! antd/es/button */"2/Rp")),a=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),c=n(/*! react */"q1tI"),u=n.n(c),h=n(/*! codemirror */"VrN/"),d=n.n(h),f=(n(/*! codemirror/lib/codemirror.css */"p77/"),n(/*! codemirror/theme/blackboard.css */"c5Ni"),l.a.Option),p={labelCol:{span:4},wrapperCol:{span:20}},m={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function g(e){var t=e.value,n=e.onChange,i=e.mode,o=e.options,a=void 0===o?{}:o,l=Object(c.useRef)(),h=Object(c.useState)(),f=Object(s.a)(h,2),p=f[0],m=f[1];return Object(c.useEffect)((function(){if(p){function e(e){var t=e.getValue();n&&n(t)}return p.on("change",e),function(){p.off("change",e)}}}),[p,n]),Object(c.useEffect)((function(){p&&p.setOption("mode",i)}),[p,i]),Object(c.useEffect)((function(){p&&(t===p.getValue()&&""!==t||setTimeout((function(){p.setValue(t||" ")}),300))}),[p,t]),Object(c.useEffect)((function(){if(l.current&&!p){var e=d.a.fromTextArea(l.current,Object(r.a)({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},a));m(e)}}),[l.current,p]),u.a.createElement("div",{className:"my-codemirror-container"},u.a.createElement("textarea",{ref:l}))}t.b=function(e){var t=e.callback,n=e.onCancel,r=Object(c.useState)("python"),h=Object(s.a)(r,2),d=h[0],v=h[1];return u.a.createElement(a.a,Object(i.a)({},p,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){t(e)}}),u.a.createElement(a.a.Item,{label:"代码语言",name:"language"},u.a.createElement(l.a,{onChange:function(e){v(m[e][1])}},Object.keys(m).map((function(e){return u.a.createElement(f,{key:e,value:e},m[e][0])})))),u.a.createElement(a.a.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}]},u.a.createElement(g,{mode:d})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(o.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(o.a,{type:"ghost",onClick:n},"取消")))}},"815F":
/*!***************************************************!*\
!*** ./node_modules/rc-tree/es/utils/treeUtil.js ***!
\***************************************************/
/*! exports provided: getKey, warningWithoutKey, convertTreeToData, flattenTreeData, traverseDataNodes, convertDataToEntities, getTreeNodeProps, convertNodePropsToEventData */
/*! exports used: convertDataToEntities, convertNodePropsToEventData, convertTreeToData, flattenTreeData, getKey, getTreeNodeProps */function(e,t,n){"use strict";n.d(t,"e",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return h})),n.d(t,"a",(function(){return f})),n.d(t,"f",(function(){return p})),n.d(t,"b",(function(){return m}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),o=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),a=n(/*! rc-util/es/Children/toArray */"Zm9Q"),s=n(/*! rc-util/es/warning */"Kwbf"),l=n(/*! ../util */"OZM5");function c(e,t){return null!=e?e:t}function u(e){return function e(t){return Object(a.a)(t).map((function(t){if(!Object(l.i)(t))return Object(s.a)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,r=t.props,a=r.children,c=Object(o.a)(r,["children"]),u=Object(i.a)({key:n},c),h=e(a);return h.length&&(u.children=h),u})).filter((function(e){return e}))}(e)}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=new Set(!0===t?[]:t),o=[];function a(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.map((function(u,h){var d=Object(l.h)(s?s.pos:"0",h),f=c(u.key,d),p=Object(i.a)(Object(i.a)({},u),{},{parent:s,pos:d,children:null,data:u,isStart:[].concat(Object(r.a)(s?s.isStart:[]),[0===h]),isEnd:[].concat(Object(r.a)(s?s.isEnd:[]),[h===e.length-1])});return o.push(p),!0===t||n.has(f)?p.children=a(u.children||[],p):p.children=[],p}))}return a(e),o}function d(e,t,n){var r;n?"string"==typeof n?r=function(e){return e[n]}:"function"==typeof n&&(r=function(e){return n(e)}):r=function(e,t){return c(e.key,t)},function n(i,o,a){var s=i?i.children:e,c=i?Object(l.h)(a.pos,o):"0";if(i){var u=r(i,c),h={node:i,index:o,pos:c,key:u,parentPos:a.node?a.pos:null,level:a.level+1};t(h)}s&&s.forEach((function(e,t){n(e,t,{node:i,pos:c,level:a?a.level+1:-1})}))}(null)}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,r=t.processEntity,i=t.onProcessFinished,o=arguments.length>2?arguments[2]:void 0,a={},s={},l={posEntities:a,keyEntities:s};return n&&(l=n(l)||l),d(e,(function(e){var t=e.node,n=e.index,i=e.pos,o=e.key,u=e.parentPos,h={node:t,index:n,key:o,pos:i,level:e.level},d=c(o,i);a[i]=h,s[d]=h,h.parent=a[u],h.parent&&(h.parent.children=h.parent.children||[],h.parent.children.push(h)),r&&r(h,l)}),o),i&&i(l),l}function p(e,t){var n=t.expandedKeys,r=t.selectedKeys,i=t.loadedKeys,o=t.loadingKeys,a=t.checkedKeys,s=t.halfCheckedKeys,l=t.dragOverNodeKey,c=t.dropPosition,u=t.keyEntities[e];return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==i.indexOf(e),loading:-1!==o.indexOf(e),checked:-1!==a.indexOf(e),halfChecked:-1!==s.indexOf(e),pos:String(u?u.pos:""),dragOver:l===e&&0===c,dragOverGapTop:l===e&&-1===c,dragOverGapBottom:l===e&&1===c}}function m(e){var t=e.data,n=e.expanded,r=e.selected,o=e.checked,a=e.loaded,l=e.loading,c=e.halfChecked,u=e.dragOver,h=e.dragOverGapTop,d=e.dragOverGapBottom,f=e.pos,p=e.active,m=Object(i.a)(Object(i.a)({},t),{},{expanded:n,selected:r,checked:o,loaded:a,loading:l,halfChecked:c,dragOver:u,dragOverGapTop:h,dragOverGapBottom:d,pos:f,active:p});return"props"in m||Object.defineProperty(m,"props",{get:function(){return Object(s.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}},"8EBN":
/*!**********************************************!*\
!*** ./node_modules/codemirror/mode/meta.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes)for(var i=0;i<r.mimes.length;i++)if(r.mimes[i]==t)return r}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext)for(var i=0;i<r.ext.length;i++)if(r.ext[i]==t)return r}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var i=t.lastIndexOf("."),o=i>-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias)for(var i=0;i<r.alias.length;i++)if(r.alias[i].toLowerCase()==t)return r}}}(n(/*! ../lib/codemirror */"VrN/"))},"8hTe":
/*!******************************************************!*\
!*** ./src/components/RenderHtml/index.less?modules ***!
\******************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={button:"button___1wy9m"}},"9Bee":
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 3 modules ***!
\*********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/PreviewAll/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hls.js/dist/hls.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/katex/dist/katex.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/lib/marked.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/src/helpers.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n("DYRE");var r=n("zeV3"),i=(n("+L6B"),n("2/Rp")),o=n("k1fw"),a=n("9og8"),s=n("tJVT"),l=n("WmNS"),c=n.n(l),u=n("q1tI"),h=n.n(u),d=(n("vg9a"),n("DlQD")),f=n.n(d),p=n("rUJ1");var m=[],g=["<ul>"],v=new f.a.Renderer,y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){m.length=0,g=["<ul>"]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function w(){return function e(t,n,r,i){if(n>=t.length||t[n].level<=r)return n;var o=t[n];i.push("<li><a href='#"+o.anchor+"'>"+o.text+"</a>");var a=[];return n=e(t,++n,o.level,a),a.length>0&&(i.push("<ul>"),a.forEach((function(e){i.push(e)})),i.push("</ul>")),i.push("</li>"),n=e(t,n,r,i)}(m,0,0,g),g.push("</ul>"),g.join("")}var E={heading:function(e){var t=y.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:Object(s.a)(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||""),i=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(i)>=0){var o=k(),a=r;r=o,_[o]={type:"block",expression:a}}return{type:"code",raw:n,lang:i,text:r}}}},S=/(?:\${2})([^\n`]+?)(?:\${2})/gi,C=0,k=function(){return"__special_katext_id_".concat(C++,"__")},_={};function T(){C=0,_={}}function O(e){return e=e.replace(S,(function(e,t){var n=k();return _[n]={type:"inline",expression:t},n}))}var A=v.listitem;v.listitem=function(e){return A(O(e))};var L=v.paragraph;v.paragraph=function(e){return L(O(e))};var D=v.tablecell;v.tablecell=function(e,t){return D(O(e),t)},v.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(t,'">').concat(n?e:Object(p.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(n?e:Object(p.escape)(e,!0))+"</code></pre>"},v.heading=function(e,t,n){var r=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return m.push({anchor:r,level:t,text:e}),"<h"+t+' id="'+r+'">'+e+"</h"+t+">"},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:E,renderer:v});var I=f.a,R=(n("SJMd"),n("ulZh")),M=n.n(R),N=n("m3rI"),j=n("Oy/b"),P=n("p5ED"),B=n("ErOA"),F=function(e,t){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function U(e,t){function n(){this.constructor=e}F(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function H(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function z(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function G(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var V=function(){function e(){}return e.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},e.setAttributes=function(e,t){for(var n=0,r=t;n<r.length;n++){var i=r[n],o=i[0],a=i[1];e.setAttribute(o,a)}},e.createRect=function(t,n,r){var i=document.createElementNS("http://www.w3.org/2000/svg","rect");return i.setAttribute("width",t.toString()),i.setAttribute("height",n.toString()),r&&e.setAttributes(i,r),i},e.createLine=function(t,n,r,i,o){var a=document.createElementNS("http://www.w3.org/2000/svg","line");return a.setAttribute("x1",t.toString()),a.setAttribute("y1",n.toString()),a.setAttribute("x2",r.toString()),a.setAttribute("y2",i.toString()),o&&e.setAttributes(a,o),a},e.createPolygon=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","polygon");return r.setAttribute("points",t),n&&e.setAttributes(r,n),r},e.createCircle=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","circle");return r.setAttribute("cx",(t/2).toString()),r.setAttribute("cy",(t/2).toString()),r.setAttribute("r",t.toString()),n&&e.setAttributes(r,n),r},e.createEllipse=function(t,n,r){var i=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return i.setAttribute("cx",(t/2).toString()),i.setAttribute("cy",(n/2).toString()),i.setAttribute("rx",(t/2).toString()),i.setAttribute("ry",(n/2).toString()),r&&e.setAttributes(i,r),i},e.createGroup=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","g");return t&&e.setAttributes(n,t),n},e.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},e.createMarker=function(t,n,r,i,o,a,s){var l=document.createElementNS("http://www.w3.org/2000/svg","marker");return e.setAttributes(l,[["id",t],["orient",n],["markerWidth",r.toString()],["markerHeight",i.toString()],["refX",o.toString()],["refY",a.toString()]]),l.appendChild(s),l},e.createText=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","text");return n.setAttribute("x","0"),n.setAttribute("y","0"),t&&e.setAttributes(n,t),n},e.createTSpan=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","tspan");return r.textContent=t,n&&e.setAttributes(r,n),r},e.createImage=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","image");return t&&e.setAttributes(n,t),n},e.createPoint=function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return n.x=e,n.y=t,n},e.createPath=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d",t),n&&e.setAttributes(r,n),r},e}(),W=function(){function e(){}return e.addKey=function(t){e.key=t},Object.defineProperty(e,"isLicensed",{get:function(){return!!e.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(e.key)},enumerable:!1,configurable:!0}),e}(),K=function(){function e(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return e.prototype.rasterize=function(e,t,n){var r=this;return new Promise((function(i){var o=void 0!==n?n:document.createElement("canvas");null===e&&(r.markersOnly=!0,r.naturalSize=!1);var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("width",t.width.baseVal.valueAsString),a.setAttribute("height",t.height.baseVal.valueAsString),a.setAttribute("viewBox","0 0 "+t.viewBox.baseVal.width.toString()+" "+t.viewBox.baseVal.height.toString()),a.innerHTML=t.innerHTML,!0===r.naturalSize?(a.width.baseVal.value=e.naturalWidth,a.height.baseVal.value=e.naturalHeight):void 0!==r.width&&void 0!==r.height&&(a.width.baseVal.value=r.width,a.height.baseVal.value=r.height),o.width=a.width.baseVal.value,o.height=a.height.baseVal.value;var s=a.outerHTML,l=o.getContext("2d");!0!==r.markersOnly&&l.drawImage(e,0,0,o.width,o.height);var c=window.URL,u=new Image(o.width,o.height);u.setAttribute("crossOrigin","anonymous");var h=new Blob([s],{type:"image/svg+xml"}),d=c.createObjectURL(h);u.onload=function(){l.drawImage(u,0,0),c.revokeObjectURL(d);var e=o.toDataURL(r.imageType,r.imageQuality);i(e)},u.src=d}))},e}(),q=function(){},X=function(){function e(e){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+e+"_"}return Object.defineProperty(e.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(e.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(e.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),e.prototype.addClass=function(e){return void 0===this.styleSheet&&this.addStyleSheet(),e.name=""+this.classNamePrefix+e.localName,this.classes.push(e),this.styleSheet.sheet.insertRule("."+e.name+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length),e},e.prototype.addRule=function(e){void 0===this.styleSheet&&this.addStyleSheet(),this.rules.push(e),this.styleSheet.sheet.insertRule(e.selector+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length)},e.prototype.addStyleSheet=function(){var e;this.styleSheet=document.createElement("style"),(null!==(e=this.styleSheetRoot)&&void 0!==e?e:document.head).appendChild(this.styleSheet),this.addRule(new Y("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Y("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames","\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n ")),this.addRule(new Y("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames","\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n ")),this.addClass(new $("fade_in","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_in_animation_frames;\n ")),this.addClass(new $("fade_out","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_out_animation_frames;\n "))},e.prototype.removeStyleSheet=function(){var e;this.styleSheet&&((null!==(e=this.styleSheetRoot)&&void 0!==e?e:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},e}(),Y=function(e,t){this.selector=e,this.style=t},$=function(e,t){this.localName=e,this.style=t},J=function(){function e(e,t,n,r,i){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=e,this.displayMode=t,this.markerItems=n,this.uiStyleSettings=r,this.styles=i,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return e.prototype.show=function(e){var t=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var n=document.createElement("div");n.className=this.toolbarBlockStyleClass.name,n.style.whiteSpace="nowrap",this.uiContainer.appendChild(n),this.addActionButton(n,'<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(n,'<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(n,'<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(n,'<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(n,'<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(n,'<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(n,'<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(n,'<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(e){var n=document.createElement("div");n.className=""+t.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",e.typeName),n.innerHTML=e.icon,n.addEventListener("click",(function(){t.markerToolbarButtonClicked(n,e)})),t.buttons.push(n),t.markerButtons.push(n)})),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 r=document.createElement("div");r.className=this.toolbarBlockStyleClass.name,r.style.whiteSpace="nowrap",r.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(r),this.addActionButton(r,'<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(r,'<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()},e.prototype.addButtonClickListener=function(e){this.buttonClickListeners.push(e)},e.prototype.removeButtonClickListener=function(e){this.buttonClickListeners.indexOf(e)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(e),1)},e.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},e.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var e=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var t=0;t<this.markerButtons.length;t++)t<e||t===e&&this.markerButtons.length-1===e?this.markerButtonBlock.appendChild(this.markerButtons[t]):(t===e&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[t]))}},e.prototype.overflowButtonClicked=function(){"none"!==this.markerButtonOverflowBlock.style.display?(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")},e.prototype.resetButtonStyles=function(){var e=this;this.buttons.forEach((function(t){t.className=t.className.replace(e.uiStyleSettings.toolbarButtonStyleColorsClassName?e.uiStyleSettings.toolbarButtonStyleColorsClassName:e.toolbarButtonStyleColorsClass.name,"").trim(),t.className=t.className.replace(e.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?e.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:e.toolbarActiveButtonStyleColorsClass.name,"").trim(),t.className+=" "+(e.uiStyleSettings.toolbarButtonStyleColorsClassName?e.uiStyleSettings.toolbarButtonStyleColorsClassName:e.toolbarButtonStyleColorsClass.name)}))},e.prototype.addActionButton=function(e,t,n){var r=this,i=document.createElement("div");switch(i.className=""+this.toolbarButtonStyleClass.name,i.innerHTML=t,i.setAttribute("data-action",n),i.addEventListener("click",(function(){r.actionToolbarButtonClicked(i,n)})),n){case"select":i.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":i.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":i.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":i.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":i.style.fill=this.uiStyleSettings.closeButtonColor}e.appendChild(i),this.buttons.push(i)},e.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new $("toolbar","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.uiStyleSettings.toolbarHeight+"px;\n box-sizing: content-box;\n "+("inline"===this.displayMode?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new $("toolbar_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n box-shadow: 0px 3px rgba(33, 33, 33, 0.1);\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new $("toolbar-block","\n display: inline-block;\n box-sizing: content-box;\n ")),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new $("toolbar-overflow-block","\n position: absolute;\n top: "+this.uiStyleSettings.toolbarHeight+"px;\n max-width: "+2*this.uiStyleSettings.toolbarHeight+"px;\n z-index: 10;\n box-sizing: content-box;\n ")),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new $("toolbar-overflow-block_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new $("toolbar_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new $("toolbar_button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new $("toolbar_active_button","\n fill: "+this.uiStyleSettings.toolbarColor+";\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new Y("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n ")),this.styles.addRule(new Y("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n "))},e.prototype.markerToolbarButtonClicked=function(e,t){this.setActiveButton(e),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(e){return e("marker",t)})),this.markerButtonOverflowBlock.style.display="none"},e.prototype.actionToolbarButtonClicked=function(e,t){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(e){return e("action",t)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},e.prototype.setActiveButton=function(e){this.resetButtonStyles(),e.className=e.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),e.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},e.prototype.setActiveMarkerButton=function(e){var t=this.markerButtons.find((function(t){return t.getAttribute("data-type-name")===e}));t&&this.setActiveButton(t)},e.prototype.setCurrentMarker=function(e){var t=this;this.currentMarker=e,this.buttons.filter((function(e){return/delete|notes/.test(e.getAttribute("data-action"))})).forEach((function(e){void 0===t.currentMarker?(e.style.fillOpacity="0.4",e.style.pointerEvents="none"):(e.style.fillOpacity="1",e.style.pointerEvents="all")}))},e}(),Z=function(){function e(e,t,n,r){this.panels=[],this.panelButtons=[],this.markerjsContainer=e,this.displayMode=t,this.uiStyleSettings=n,this.styles=r,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return e.prototype.addStyles=function(){var e;this.toolboxStyleClass=this.styles.addClass(new $("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new $("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var t=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new $("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new $("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new $("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new $("toolbox-panel-row_colors","\n background-color: "+(null!==(e=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==e?e:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new $("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new $("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new $("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new Y("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new Y("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},e.prototype.show=function(e){var t;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==t?t:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},e.prototype.setPanelButtons=function(e){var t,n,r=this;this.panels=e,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==t?t:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(n=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==n?n:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(e){var t;e.uiStyleSettings=r.uiStyleSettings;var n=document.createElement("div");n.className=r.toolboxButtonStyleClass.name+" "+(null!==(t=r.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==t?t:r.toolboxButtonStyleColorsClass.name),n.innerHTML=e.icon,n.title=e.title,n.addEventListener("click",(function(){r.panelButtonClick(e)})),r.panelButtons.push(n),r.buttonRow.appendChild(n)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},e.prototype.panelButtonClick=function(e){var t=this,n=-1;if(e!==this.activePanel){n=this.panels.indexOf(e),this.panelRow.innerHTML="";var r=e.getUi();r.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(r),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=e}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===t.displayMode?t.panelRow.style.display="none":t.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(e,r){var i,o;e.className=t.toolboxButtonStyleClass.name+" "+(r===n?""+(null!==(i=t.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==i?i:t.toolboxActiveButtonStyleColorsClass.name):""+(null!==(o=t.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==o?o:t.toolboxButtonStyleColorsClass.name))}))},e}(),Q=function(e,t){this.title=e,this.icon=t},ee=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'<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 o.colors=[],o.addTransparent=!1,o.colorBoxes=[],o.colors=n,o.currentColor=r,o.setCurrentColor=o.setCurrentColor.bind(o),o.getColorBox=o.getColorBox.bind(o),o}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.whiteSpace="nowrap",this.colors.forEach((function(n){var r=e.getColorBox(n);t.appendChild(r),e.colorBoxes.push(r)})),t},t.prototype.getColorBox=function(e){var t=this,n=this.uiStyleSettings.toolbarHeight/4,r=this.uiStyleSettings.toolbarHeight-n,i=document.createElement("div");i.style.display="inline-block",i.style.boxSizing="content-box",i.style.width=r-2+"px",i.style.height=r-2+"px",i.style.padding="1px",i.style.marginRight="2px",i.style.marginBottom="2px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderRadius=(r+2)/2+"px",i.style.borderColor=e===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentColor(e,i)}));var o=document.createElement("div");return o.style.display="inline-block",o.style.width=r-2+"px",o.style.height=r-2+"px",o.style.backgroundColor=e,o.style.borderRadius=r/2+"px","transparent"===e&&(o.style.fill=this.uiStyleSettings.toolboxAccentColor,o.innerHTML='<svg viewBox="0 0 24 24">\n <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" />\n </svg>'),i.appendChild(o),i},t.prototype.setCurrentColor=function(e,t){var n=this;this.currentColor=e,this.colorBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(e)},t}(Q),te=function(){function e(e,t,n){this._state="new",this._isSelected=!1,this._container=e,this._overlayContainer=t,this.globalSettings=n,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(e.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!1},Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),e.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},e.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},e.prototype.pointerDown=function(e,t){},e.prototype.dblClick=function(e,t){},e.prototype.manipulate=function(e){},e.prototype.pointerUp=function(e){this.stateChanged()},e.prototype.dispose=function(){},e.prototype.addMarkerVisualToContainer=function(e){this.container.childNodes.length>0?this.container.insertBefore(e,this.container.childNodes[0]):this.container.appendChild(e)},e.prototype.getState=function(){return{typeName:e.typeName,state:this.state,notes:this.notes}},e.prototype.restoreState=function(e){this._state=e.state,this.notes=e.notes},e.prototype.scale=function(e,t){},e.prototype.colorChanged=function(e){this.onColorChanged&&this.onColorChanged(e),this.stateChanged()},e.prototype.fillColorChanged=function(e){this.onFillColorChanged&&this.onFillColorChanged(e),this.stateChanged()},e.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var e=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),e.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(e)&&this.onStateChanged(this)}},e.typeName="MarkerBase",e}(),ne=function(){function e(){this.findGripByVisual=this.findGripByVisual.bind(this)}return e.prototype.findGripByVisual=function(e){return this.topLeft.ownsTarget(e)?this.topLeft:this.topCenter.ownsTarget(e)?this.topCenter:this.topRight.ownsTarget(e)?this.topRight:this.centerLeft.ownsTarget(e)?this.centerLeft:this.centerRight.ownsTarget(e)?this.centerRight:this.bottomLeft.ownsTarget(e)?this.bottomLeft:this.bottomCenter.ownsTarget(e)?this.bottomCenter:this.bottomRight.ownsTarget(e)?this.bottomRight:void 0},e}(),re=function(){function e(){this.GRIP_SIZE=10,this.visual=V.createGroup(),this.visual.appendChild(V.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(V.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e}(),ie=function(){function e(){}return e.toITransformMatrix=function(e){return{a:e.a,b:e.b,c:e.c,d:e.d,e:e.e,f:e.f}},e.toSVGMatrix=function(e,t){return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e},e}(),oe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.left=0,i.top=0,i.width=0,i.height=0,i.defaultSize={x:50,y:20},i.offsetX=0,i.offsetY=0,i.rotationAngle=0,i.CB_DISTANCE=10,i._suppressMarkerCreateEvent=!1,i.container.transform.baseVal.appendItem(V.createTransform()),i.setupControlBox(),i}return U(t,e),Object.defineProperty(t.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visual",{get:function(){return this._visual},set:function(e){this._visual=e;var t=V.createTransform();this._visual.transform.baseVal.appendItem(t)},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!!(void 0!==this.controlGrips.findGripByVisual(t)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.left=t.x,this.top=t.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var r=this.unrotatePoint(t);if(this.manipulationStartX=r.x,this.manipulationStartY=r.y,this.offsetX=r.x-this.left,this.offsetY=r.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(n),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(n)){this.activeGrip=this.rotatorGrip;var i=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=i.x-this.width/2,this.top=i.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var o=this.container.transform.baseVal.getItem(0);o.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(o,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(t),this._state="select","creating"===n&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},t.prototype.moveVisual=function(e){this.visual.style.transform="translate("+e.x+"px, "+e.y+"px)"},t.prototype.manipulate=function(e){var t=this.unrotatePoint(e);"creating"===this.state?this.resize(e):"move"===this.state?(this.left=this.manipulationStartLeft+(t.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(t.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(t):"rotate"===this.state&&this.rotate(e)},t.prototype.resize=function(e){var t=this.manipulationStartLeft,n=this.manipulationStartWidth,r=this.manipulationStartTop,i=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:t=this.manipulationStartLeft+e.x-this.manipulationStartX,n=this.manipulationStartWidth+this.manipulationStartLeft-t;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:n=this.manipulationStartWidth+e.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:r=this.manipulationStartTop+e.y-this.manipulationStartY,i=this.manipulationStartHeight+this.manipulationStartTop-r;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:i=this.manipulationStartHeight+e.y-this.manipulationStartY}n>=0?(this.left=t,this.width=n):(this.left=t+n,this.width=-n),i>=0?(this.top=r,this.height=i):(this.top=r+i,this.height=-i),this.setSize()},t.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},t.prototype.rotate=function(e){if(Math.abs(e.x-this.centerX)>.1){var t=Math.sign(e.x-this.centerX);this.rotationAngle=180*Math.atan((e.y-this.centerY)/(e.x-this.centerX))/Math.PI+90*t,this.applyRotation()}},t.prototype.applyRotation=function(){var e=this.container.transform.baseVal.getItem(0);e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(e,0)},t.prototype.rotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM(),n=V.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.unrotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM();t=t.inverse();var n=V.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=V.createGroup();var e=V.createTransform();e.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(e),this.container.appendChild(this.controlBox),this.controlRect=V.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),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=V.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 ne,this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){var e=this.controlBox.transform.baseVal.getItem(0);e.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(e,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(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()},t.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(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},t.prototype.createGrip=function(){var e=new re;return e.visual.transform.baseVal.appendItem(V.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.controlGrips.topLeft.GRIP_SIZE,t=-e/2,n=t,r=(this.width+this.CB_DISTANCE)/2-e/2,i=(this.height+this.CB_DISTANCE)/2-e/2,o=this.height+this.CB_DISTANCE-e/2,a=this.width+this.CB_DISTANCE-e/2;this.positionGrip(this.controlGrips.topLeft.visual,t,n),this.positionGrip(this.controlGrips.topCenter.visual,r,n),this.positionGrip(this.controlGrips.topRight.visual,a,n),this.positionGrip(this.controlGrips.centerLeft.visual,t,i),this.positionGrip(this.controlGrips.centerRight.visual,a,i),this.positionGrip(this.controlGrips.bottomLeft.visual,t,o),this.positionGrip(this.controlGrips.bottomCenter.visual,r,o),this.positionGrip(this.controlGrips.bottomRight.visual,a,o),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,r,n-3*this.CB_DISTANCE)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.hideControlBox=function(){this.controlBox.style.display="none"},t.prototype.showControlBox=function(){this.controlBox.style.display=""},t.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ie.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ie.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.left=n.left,this.top=n.top,this.width=n.width,this.height=n.height,this.rotationAngle=n.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ie.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,n.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ie.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,n.containerTransformMatrix))},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n);var r=this.rotatePoint({x:this.left,y:this.top}),i=this.unrotatePoint({x:r.x*t,y:r.y*n});this.left=i.x,this.top=i.y,this.width=this.width*t,this.height=this.height*n,this.adjustControlBox()},t}(te),ae=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual)},t.prototype.createVisual=function(){this.visual=V.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.setSize=function(){e.prototype.setSize.call(this),V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.visual&&V.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.visual&&V.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.visual&&V.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.visual&&V.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},t.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.title="Rectangle marker",t}(oe),se=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return o.widths=[],o.widthBoxes=[],o.widths=n,o.currentWidth=r,o.setCurrentWidth=o.setCurrentWidth.bind(o),o}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.widths.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.flexGrow="2",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=n===e.currentWidth?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentWidth(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=n.toString(),i.style.marginRight="5px",r.appendChild(i);var o=document.createElement("div");o.style.minHeight="20px",o.style.flexGrow="2",o.style.display="flex",o.style.alignItems="center";var a=document.createElement("hr");a.style.minWidth="20px",a.style.border="0px",a.style.borderTop=n+"px solid "+e.uiStyleSettings.toolboxColor,a.style.flexGrow="2",o.appendChild(a),r.appendChild(o),e.widthBoxes.push(r)})),t},t.prototype.setCurrentWidth=function(e,t){var n=this;this.currentWidth=e,this.widthBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},t}(Q),le=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'<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 o.styles=[],o.styleBoxes=[],o.styles=n,o.currentStyle=r,o.setCurrentStyle=o.setCurrentStyle.bind(o),o}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.styles.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/e.styles.length-5+"%",r.style.borderColor=n===e.currentStyle?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentStyle(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.minHeight="20px",i.style.flexGrow="2",i.style.overflow="hidden";var o='<svg width="100" height="20">\n <line x1="0" y1="10" x2="100" y2="10" stroke="'+e.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(""!==n?'stroke-dasharray="'+n+'"':"")+" />\n </svg>";i.innerHTML=o,r.appendChild(i),e.styleBoxes.push(r)})),t},t.prototype.setCurrentStyle=function(e,t){var n=this;this.currentStyle=e,this.styleBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},t}(Q),ce=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="FrameMarker",t.title="Frame marker",t.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',t}(ae),ue=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},he=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.x1=0,i.y1=0,i.x2=0,i.y2=0,i.defaultLength=50,i.manipulationStartX=0,i.manipulationStartY=0,i.manipulationStartX1=0,i.manipulationStartY1=0,i.manipulationStartX2=0,i.manipulationStartY2=0,i.setupControlBox(),i}return U(t,e),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!(!this.grip1.ownsTarget(t)&&!this.grip2.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartX=t.x,this.manipulationStartY=t.y,"new"===this.state&&(this.x1=t.x,this.y1=t.y,this.x2=t.x,this.y2=t.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(n)?this.activeGrip=this.grip1:this.grip2.ownsTarget(n)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&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(t),this._state="select","creating"===n&&this.onMarkerCreated&&this.onMarkerCreated(this)},t.prototype.adjustVisual=function(){},t.prototype.manipulate=function(e){"creating"===this.state?this.resize(e):"move"===this.state?(this.x1=this.manipulationStartX1+e.x-this.manipulationStartX,this.y1=this.manipulationStartY1+e.y-this.manipulationStartY,this.x2=this.manipulationStartX2+e.x-this.manipulationStartX,this.y2=this.manipulationStartY2+e.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(e)},t.prototype.resize=function(e){switch(this.activeGrip){case this.grip1:this.x1=e.x,this.y1=e.y;break;case this.grip2:case void 0:this.x2=e.x,this.y2=e.y}this.adjustVisual(),this.adjustControlBox()},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=V.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){this.positionGrips()},t.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},t.prototype.createGrip=function(){var e=new re;return e.visual.transform.baseVal.appendItem(V.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-e/2,this.y1-e/2),this.positionGrip(this.grip2.visual,this.x2-e/2,this.y2-e/2)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.x1=n.x1,this.y1=n.y1,this.x2=n.x2,this.y2=n.y2},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.x1=this.x1*t,this.y1=this.y1*n,this.x2=this.x2*t,this.y2=this.y2*n,this.adjustVisual(),this.adjustControlBox()},t}(te),de=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorLine&&t!==this.visibleLine)},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.selectorLine=V.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=V.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},t.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()),V.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),V.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),V.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.createVisual(),this.adjustVisual()},t.typeName="LineMarker",t.title="Line marker",t.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',t}(he),fe=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'<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 o.fonts=[],o.fontBoxes=[],o.fonts=n,o.currentFont=r,o.setCurrentFont=o.setCurrentFont.bind(o),o}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.flexGrow="2",this.fonts.forEach((function(n){var r=document.createElement("div");r.style.display="inline-block",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/e.fonts.length-5+"%",r.style.borderColor=n===e.currentFont?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentFont(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.display="flex",i.style.minHeight="20px",i.style.flexGrow="2",i.style.fontFamily=n,i.style.overflow="hidden";var o=document.createElement("div");o.style.whiteSpace="nowrap",o.style.overflow="hidden",o.style.textOverflow="ellipsis",o.innerHTML="The quick brown fox jumps over the lazy dog",i.appendChild(o),r.appendChild(i),e.fontBoxes.push(r)})),t},t.prototype.setCurrentFont=function(e,t){var n=this;this.currentFont=e,this.fontBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},t}(Q),pe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.padding=5,i.DEFAULT_TEXT="your text here",i.text=i.DEFAULT_TEXT,i.isMoved=!1,i.color=r.defaultColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setColor=i.setColor.bind(i),i.setFont=i.setFont.bind(i),i.renderText=i.renderText.bind(i),i.sizeText=i.sizeText.bind(i),i.textEditDivClicked=i.textEditDivClicked.bind(i),i.showTextEditor=i.showTextEditor.bind(i),i.setSize=i.setSize.bind(i),i.positionTextEditor=i.positionTextEditor.bind(i),i.colorPanel=new ee("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.fontFamilyPanel=new fe("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i}return U(t,e),t.prototype.ownsTarget=function(t){if(e.prototype.ownsTarget.call(this,t)||t===this.visual||t===this.textElement||t===this.bgRectangle)return!0;var n=!1;return this.textElement.childNodes.forEach((function(e){e===t&&(n=!0)})),n},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.bgRectangle=V.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=V.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(V.createTransform()),this.textElement.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.renderText=function(){var e=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(t){e.textElement.appendChild(V.createTSpan(""===t.trim()?" ":t.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},t.prototype.getTextScale=function(){var e=this.textElement.getBBox(),t=1;if(e.width>0&&e.height>0){var n=(1*this.width-this.width*this.padding*2/100)/e.width,r=(1*this.height-this.height*this.padding*2/100)/e.height;t=Math.min(n,r)}return t},t.prototype.getTextPosition=function(e){var t=this.textElement.getBBox(),n=0,r=0;return t.width>0&&t.height>0&&(n=(this.width-t.width*e)/2,r=this.height/2-t.height*e/2),{x:n,y:r}},t.prototype.sizeText=function(){var e=this.textElement.getBBox(),t=this.getTextScale(),n=this.getTextPosition(t);n.y-=e.y*t,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+n.x+"px, "+n.y+"px) scale("+t+", "+t+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(n.x,n.y),this.textElement.transform.baseVal.getItem(1).setScale(t,t))},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.isMoved=!0,this.setSize(),this.sizeText()},t.prototype.setSize=function(){e.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},t.prototype.pointerUp=function(t){var n=this.state;"creating"===n&&(this._suppressMarkerCreateEvent=!0),e.prototype.pointerUp.call(this,t),this.setSize(),("creating"===n||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},t.prototype.showTextEditor=function(){var e=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(e){e.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var t=Number.parseFloat(e.textEditor.style.fontSize);e.textEditor.clientWidth>=Number.parseInt(e.textEditor.style.maxWidth)&&t>.9;)t-=.1,e.textEditor.style.fontSize=Math.max(t,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(e){e.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(e){if(e.clipboardData){var t=e.clipboardData.getData("text"),n=window.getSelection();if(!n.rangeCount)return!1;n.deleteFromDocument(),n.getRangeAt(0).insertNode(document.createTextNode(t)),e.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){e.textEditDivClicked(e.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},t.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var e=this.getTextScale(),t=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),n=this.textElement.getBBox(),r={x:n.width*e,y:n.height*e};t.x-=r.x/2,t.y-=r.y/2,this.textEditor.style.top=t.y+"px",this.textEditor.style.left=t.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-t.x+"px",this.textEditor.style.fontSize=Math.max(16*e,12)+"px",this.textElement.style.display="none"}},t.prototype.textEditDivClicked=function(e){this.text=e.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},t.prototype.select=function(){e.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},t.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),e.prototype.deselect.call(this)},t.prototype.dblClick=function(t,n){e.prototype.dblClick.call(this,t,n),this.showTextEditor()},t.prototype.setColor=function(e){this.textElement&&V.setAttributes(this.textElement,[["fill",e]]),this.color=e,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(e)},t.prototype.setFont=function(e){this.textElement&&V.setAttributes(this.textElement,[["font-family",e]]),this.fontFamily=e,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},t.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},t.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.color=n.color,this.fontFamily=n.fontFamily,this.padding=n.padding,this.text=n.text,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize(),this.sizeText(),this.positionTextEditor()},t.typeName="TextMarker",t.title="Text marker",t.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>',t}(oe),me=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.lineWidth=3,i.drawing=!1,i.pixelRatio=1,i.color=r.defaultColor,i.lineWidth=r.defaultStrokeWidth,i.pixelRatio=r.freehandPixelRatio,i.setColor=i.setColor.bind(i),i.addCanvas=i.addCanvas.bind(i),i.finishCreation=i.finishCreation.bind(i),i.setLineWidth=i.setLineWidth.bind(i),i.colorPanel=new ee("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.lineWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.lineWidthPanel.onWidthChanged=i.setLineWidth,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.drawingImage)},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.drawingImage=V.createImage(),this.visual.appendChild(this.drawingImage);var e=V.createTransform();this.visual.transform.baseVal.appendItem(e),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(t.x,t.y),this.drawing=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.manipulate=function(t){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(t.x,t.y),this.canvasContext.stroke()):e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):e.prototype.pointerUp.call(this,t)},t.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)},t.prototype.select=function(){"creating"===this.state&&this.finishCreation(),e.prototype.select.call(this)},t.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),e.prototype.deselect.call(this)},t.prototype.finishCreation=function(){for(var e=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),t=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],n=t[0],r=t[1],i=t[2],o=t[3],a=!1,s=0;s<this.canvasElement.height;s++)for(var l=0;l<this.canvasElement.width;l++)e.data[s*this.canvasElement.width*4+4*l+3]>0&&(a=!0,s<r&&(r=s),l<n&&(n=l),s>o&&(o=s),l>i&&(i=l));if(a){this.left=n/this.pixelRatio,this.top=r/this.pixelRatio,this.width=(i-n)/this.pixelRatio,this.height=(o-r)/this.pixelRatio;var c=document.createElement("canvas");c.width=i-n,c.height=o-r,c.getContext("2d").putImageData(this.canvasContext.getImageData(n,r,i-n,o-r),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},t.prototype.setDrawingImage=function(){V.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},t.prototype.setColor=function(e){this.color=e,this.colorChanged(e)},t.prototype.setLineWidth=function(e){this.lineWidth=e},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({drawingImgUrl:this.drawingImgUrl},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){this.createVisual(),e.prototype.restoreState.call(this,t),this.drawingImgUrl=t.drawingImgUrl,this.setDrawingImage()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setDrawingImage()},t.typeName="FreehandMarker",t.title="Freehand marker",t.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>',t}(oe),ge=function(e){function t(t,n,r){var i=e.call(this,t,r||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return i.typeBoxes=[],i.currentType=n,i.setCurrentType=i.setCurrentType.bind(i),i}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2";for(var n=function(n){var i="both";switch(n){case 0:i="both";break;case 1:i="start";break;case 2:i="end";break;case 3:i="none"}var o=document.createElement("div");if(o.style.display="flex",o.style.flexGrow="2",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.borderColor=i===r.currentType?r.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){e.setCurrentType(i,o)})),t.appendChild(o),"both"===i||"start"===i){var a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.minHeight="20px",a.innerHTML='<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">\n <polygon points="0,5 10,0 10,10" fill="'+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee")+'" />\n </svg>',a.style.marginLeft="5px",o.appendChild(a)}var s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.minHeight="20px",s.style.flexGrow="2";var l=document.createElement("hr");if(l.style.minWidth="20px",l.style.border="0px",l.style.borderTop="3px solid "+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee"),l.style.flexGrow="2",s.appendChild(l),o.appendChild(s),"both"===i||"end"===i){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.minHeight="20px",c.innerHTML='<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">\n <polygon points="0,0 10,5 0,10" fill="'+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee")+'" />\n </svg>',c.style.marginRight="5px",o.appendChild(c)}r.typeBoxes.push(o)},r=this,i=0;i<4;i++)n(i);return t},t.prototype.setCurrentType=function(e,t){var n=this;this.currentType=e,this.typeBoxes.forEach((function(e){e.style.borderColor=e===t?void 0!==n.uiStyleSettings?n.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},t}(Q),ve=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.arrowType="end",i.arrowBaseHeight=10,i.arrowBaseWidth=10,i.getArrowPoints=i.getArrowPoints.bind(i),i.setArrowType=i.setArrowType.bind(i),i.arrowTypePanel=new ge("Arrow type","end"),i.arrowTypePanel.onArrowTypeChanged=i.setArrowType,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.arrow1&&t!==this.arrow2)},t.prototype.getArrowPoints=function(e,t){var n=this.arrowBaseWidth+2*this.strokeWidth,r=this.arrowBaseHeight+2*this.strokeWidth;return e-n/2+","+(t+r/2)+" "+e+","+(t-r/2)+" "+(e+n/2)+","+(t+r/2)},t.prototype.createTips=function(){this.arrow1=V.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=V.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.arrow2)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"creating"===this.state&&this.createTips()},t.prototype.adjustVisual=function(){if(e.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",V.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),V.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.arrow1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(n,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},t.prototype.setArrowType=function(e){this.arrowType=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({arrowType:this.arrowType},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.arrowType=n.arrowType,this.createTips(),this.adjustVisual()},t.typeName="ArrowMarker",t.title="Arrow marker",t.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',t}(de),ye=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor=r.defaultFillColor,i.strokeWidth=0,i.fillPanel=new ee("Color",r.defaultColorSet,r.defaultFillColor),i.fillPanel.onColorChanged=i.setFillColor,i}return U(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="CoverMarker",t.title="Cover marker",t.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',t}(ae),be=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'<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 o.opacities=[],o.opacityBoxes=[],o.opacities=n,o.currentOpacity=r,o.setCurrentOpacity=o.setCurrentOpacity.bind(o),o}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",t.style.justifyContent="space-between",this.opacities.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=n===e.currentOpacity?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentOpacity(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=100*n+"%",r.appendChild(i),e.opacityBoxes.push(r)})),t},t.prototype.setCurrentOpacity=function(e,t){var n=this;this.currentOpacity=e,this.opacityBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},t}(Q),xe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.setOpacity=i.setOpacity.bind(i),i.fillColor=r.defaultHighlightColor,i.strokeWidth=0,i.opacity=r.defaultHighlightOpacity,i.fillPanel=new ee("Color",r.defaultColorSet,i.fillColor),i.fillPanel.onColorChanged=i.setFillColor,i.opacityPanel=new be("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return U(t,e),t.prototype.setOpacity=function(e){this.opacity=e,this.visual&&V.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="HighlightMarker",t.title="Highlight marker",t.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>',t}(ye),we='<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>',Ee=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.bgColor="transparent",i.tipPosition={x:0,y:0},i.tipBase1Position={x:0,y:0},i.tipBase2Position={x:0,y:0},i.tipMoving=!1,i.color=r.defaultStrokeColor,i.bgColor=r.defaultFillColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setBgColor=i.setBgColor.bind(i),i.getTipPoints=i.getTipPoints.bind(i),i.positionTip=i.positionTip.bind(i),i.setTipPoints=i.setTipPoints.bind(i),i.colorPanel=new ee("Text color",r.defaultColorSet,i.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>'),i.colorPanel.onColorChanged=i.setColor,i.bgColorPanel=new ee("Fill color",r.defaultColorSet,i.bgColor,we),i.bgColorPanel.onColorChanged=i.setBgColor,i.fontFamilyPanel=new fe("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.tipGrip=new re,i.tipGrip.visual.transform.baseVal.appendItem(V.createTransform()),i.controlBox.appendChild(i.tipGrip.visual),i}return U(t,e),t.prototype.ownsTarget=function(t){return e.prototype.ownsTarget.call(this,t)||this.tipGrip.ownsTarget(t)||this.tip===t},t.prototype.createTip=function(){V.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=V.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},t.prototype.pointerDown=function(t,n){"new"===this.state&&e.prototype.pointerDown.call(this,t,n),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(n)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.pointerUp=function(t){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,e.prototype.pointerUp.call(this,t);else{var n="creating"===this.state;e.prototype.pointerUp.call(this,t),this.setTipPoints(n),this.positionTip()}},t.prototype.manipulate=function(t){if(this.tipMoving){var n=this.unrotatePoint(t);this.tipPosition={x:n.x-this.manipulationStartLeft,y:n.y-this.manipulationStartTop},this.positionTip()}else e.prototype.manipulate.call(this,t)},t.prototype.setBgColor=function(e){this.bgRectangle&&this.tip&&(V.setAttributes(this.bgRectangle,[["fill",e]]),V.setAttributes(this.tip,[["fill",e]])),this.bgColor=e,this.fillColorChanged(e)},t.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},t.prototype.setTipPoints=function(e){void 0===e&&(e=!1);var t=Math.min(this.height/2,15),n=this.height/5;e&&(this.tipPosition={x:t+n/2,y:this.height+20});var r=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?r<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:t,y:0},this.tipBase2Position={x:t+n,y:0}):(this.tipBase1Position={x:0,y:t},this.tipBase2Position={x:0,y:t+n}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?r<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-t-n,y:0},this.tipBase2Position={x:this.width-t,y:0}):(this.tipBase1Position={x:this.width,y:t},this.tipBase2Position={x:this.width,y:t+n}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?r<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-t-n,y:this.height},this.tipBase2Position={x:this.width-t,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-t-n},this.tipBase2Position={x:this.width,y:this.height-t}):r<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:t,y:this.height},this.tipBase2Position={x:t+n,y:this.height}):(this.tipBase1Position={x:0,y:this.height-t},this.tipBase2Position={x:0,y:this.height-t-n})},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.positionTip()},t.prototype.positionTip=function(){V.setAttributes(this.tip,[["points",this.getTipPoints()]]);var e=this.tipGrip.visual.transform.baseVal.getItem(0);e.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(e,0)},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),t.prototype.select=function(){this.positionTip(),e.prototype.select.call(this)},t.prototype.getState=function(){var n=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.bgColor=n.bgColor,this.tipPosition=n.tipPosition,e.prototype.restoreState.call(this,t),this.createTip(),this.setTipPoints()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.tipPosition={x:this.tipPosition.x*t,y:this.tipPosition.y*n},this.positionTip()},t.typeName="CalloutMarker",t.title="Callout marker",t.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>',t}(pe),Se=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.fillColor=r.defaultFillColor,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.setOpacity=i.setOpacity.bind(i),i.createVisual=i.createVisual.bind(i),i.strokePanel=new ee("Line color",G(r.defaultColorSet,["transparent"]),r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.fillPanel=new ee("Fill color",G(r.defaultColorSet,["transparent"]),i.fillColor,we),i.fillPanel.onColorChanged=i.setFillColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i.opacityPanel=new be("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual)},t.prototype.createVisual=function(){this.visual=V.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.setSize=function(){e.prototype.setSize.call(this),V.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.visual&&V.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.visual&&V.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(e),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.visual&&V.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.visual&&V.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},t.prototype.setOpacity=function(e){this.opacity=e,this.visual&&V.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.typeName="EllipseMarker",t.title="Ellipse marker",t.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>',t}(oe),Ce=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return U(t,e),Object.defineProperty(t.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.tip1&&t!==this.tip2)},t.prototype.createTips=function(){this.tip1=V.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(V.createTransform()),this.visual.appendChild(this.tip1),this.tip2=V.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(V.createTransform()),this.visual.appendChild(this.tip2)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"creating"===this.state&&this.createTips()},t.prototype.adjustVisual=function(){if(e.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(V.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()]]),V.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 t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.tip1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(n,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t),this.createTips(),this.adjustVisual()},t.typeName="MeasurementMarker",t.title="Measurement marker",t.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>',t}(de),ke=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokePanel.colors=r.defaultColorSet,i.fillColor="transparent",i}return U(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="EllipseFrameMarker",t.title="Ellipse frame marker",t.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>',t}(Se),_e=function(){function e(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),e.prototype.addUndoStep=function(e){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(e)||(this.undoStack.push(e),JSON.stringify(this.lastRedoStep)!==JSON.stringify(e)&&this.redoStack.splice(0,this.redoStack.length))},e.prototype.replaceLastUndoStep=function(e){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=e)},e.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},e.prototype.undo=function(){if(this.undoStack.length>1){var e=this.undoStack.pop();return void 0!==e&&this.redoStack.push(e),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},e.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},e}(),Te=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.curveX=0,i.curveY=0,i.manipulationStartCurveX=0,i.manipulationStartCurveY=0,i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.positionGrips=i.positionGrips.bind(i),i.addControlGrips=i.addControlGrips.bind(i),i.adjustVisual=i.adjustVisual.bind(i),i.setupControlBox=i.setupControlBox.bind(i),i.resize=i.resize.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorCurve&&t!==this.visibleCurve&&!this.curveGrip.ownsTarget(t))},t.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.selectorCurve=V.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=V.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=t.x,this.curveY=t.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(n)&&(this.activeGrip=this.curveGrip,this._state="resize")},t.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),V.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),V.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),V.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},t.prototype.setupControlBox=function(){e.prototype.setupControlBox.call(this),this.curveControlLine1=V.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=V.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)},t.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,e.prototype.addControlGrips.call(this)},t.prototype.positionGrips=function(){e.prototype.positionGrips.call(this);var t=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-t/2,this.curveY-t/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()))},t.prototype.manipulate=function(t){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+t.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+t.y-this.manipulationStartY),e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){this.activeGrip===this.curveGrip&&(this.curveX=t.x,this.curveY=t.y),e.prototype.resize.call(this,t),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual()},t.prototype.scale=function(t,n){this.curveX=this.curveX*t,this.curveY=this.curveY*n,e.prototype.scale.call(this,t,n)},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.curveX=n.curveX,this.curveY=n.curveY,this.createVisual(),this.adjustVisual()},t.typeName="CurveMarker",t.title="Curve marker",t.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>',t}(he),Oe=function(){function e(e,t){void 0===t&&(t=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=e,this.cancelable=t}return Object.defineProperty(e.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){this._defaultPrevented=!0},e}(),Ae=function(e){function t(t,n,r){var i=e.call(this,t,!1)||this;return i.dataUrl=n,i.state=r,i}return U(t,e),t}(Oe),Le=function(e){function t(t,n,r){void 0===r&&(r=!1);var i=e.call(this,t,r)||this;return i.marker=n,i}return U(t,e),t}(Oe),De=function(){function e(){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 e.prototype.addEventListener=function(e,t){this[e].push(t)},e.prototype.removeEventListener=function(e,t){var n=this[e].indexOf(t);n>-1&&this[e].splice(n,1)},e}(),Ie=function(){function e(t){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ue,this._isOpen=!1,this.undoRedoManager=new _e,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 De,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=e.instanceCounter++,this.styles=new X(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=t,this.targetRoot=document.body,this.width=t.clientWidth,this.height=t.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(e.prototype,"ALL_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,ke,Se,xe,Ee,Ce,ye,de,Te]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,Se,xe,Ee]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,xe]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(e){var t=this;this._availableMarkerTypes.splice(0),e.forEach((function(e){if("string"==typeof e){var n=t.ALL_MARKER_TYPES.find((function(t){return t.typeName===e}));void 0!==n&&t._availableMarkerTypes.push(n)}else t._availableMarkerTypes.push(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(e){this._zoomLevel=e,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(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),e.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),W.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},e.prototype.show=function(){var e=this;void 0===this.styles.styleSheetRoot&&void 0!==q.styleSheetRoot&&(this.styles.styleSheetRoot=q.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(t){return t(new Oe(e))}))},e.prototype.render=function(){return H(this,void 0,void 0,(function(){var e;return z(this,(function(t){switch(t.label){case 0:return this.setCurrentMarker(),(e=new K).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.markersOnly=this.renderMarkersOnly,e.width=this.renderWidth,e.height=this.renderHeight,[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return t.sent(),[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,t.sent()]}}))}))},e.prototype.close=function(e){var t=this;if(void 0===e&&(e=!1),this.isOpen){var n=!1;e||this.eventListeners.beforeclose.forEach((function(e){var r=new Oe(t,!0);e(r),r.defaultPrevented&&(n=!0)})),n||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(e){return e(new Oe(t))})),this.detachEvents(),this._isOpen=!1)}},e.prototype.addMarkersToToolbar=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];(e=this._availableMarkerTypes).push.apply(e,t)},e.prototype.addRenderEventListener=function(e){this.addEventListener("render",(function(t){e(t.dataUrl,t.state)}))},e.prototype.removeRenderEventListener=function(e){},e.prototype.addCloseEventListener=function(e){this.addEventListener("close",(function(){e()}))},e.prototype.removeCloseEventListener=function(e){},e.prototype.setupResizeObserver=function(){var e=this;"inline"===this.settings.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){e.resize(e.target.clientWidth,e.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.settings.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){return e.onPopupTargetResize()})),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},e.prototype.onPopupTargetResize=function(){var e=1*this.target.clientWidth/this.target.clientHeight,t=this.editorCanvas.clientWidth/e>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*e:this.editorCanvas.clientWidth,n=t<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/e;this.resize(t,n)},e.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},e.prototype.resize=function(e,t){this._isResizing=!0;var n=e/this.imageWidth,r=t/this.imageHeight;this.imageWidth=Math.round(e),this.imageHeight=Math.round(t),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","popup"!==this.settings.displayMode?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),void 0!==this.toolbar&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(n,r),this._isResizing=!1},e.prototype.scaleMarkers=function(e,t){var n,r=this;this._currentMarker&&this._currentMarker instanceof pe?this._currentMarker.scale(e,t):(n=this._currentMarker,this.setCurrentMarker()),this.markers.forEach((function(n){n!==r._currentMarker&&n.scale(e,t)})),void 0!==n&&this.setCurrentMarker(n)},e.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"},e.prototype.setTopLeft=function(){var e=this.editingTarget.getBoundingClientRect(),t=this.editorCanvas.getBoundingClientRect();this.left=e.left-t.left,this.top=e.top-t.top},e.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)},e.prototype.addDefs=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.defs=V.createDefs(),this.addDefsToImage(),(e=this.defs).append.apply(e,t)},e.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},e.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)},e.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},e.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},e.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)},e.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},e.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)},e.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 e=document.createElement("a");e.href="https://markerjs.com/",e.target="_blank",e.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>',e.title="Powered by marker.js",e.style.display="grid",e.style.alignItems="center",e.style.justifyItems="center",e.style.padding="3px",e.style.width="20px",e.style.height="20px",this.logoUI.appendChild(e),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},e.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?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")},e.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"},e.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},e.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&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 e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?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=void 0!==this.uiStyleSettings.zIndex?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="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new J(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","popup"===this.settings.displayMode&&(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","popup"===this.settings.displayMode&&(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 Z(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},e.prototype.closeUI=function(){"popup"===this.settings.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},e.prototype.removeMarker=function(e){this.markerImage.removeChild(e.container),this.markers.indexOf(e)>-1&&this.markers.splice(this.markers.indexOf(e),1),e.dispose()},e.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},e.prototype.toolbarButtonClicked=function(e,t){if("marker"===e&&void 0!==t)this.createNewMarker(t);else if("action"===e)switch(t){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":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},e.prototype.deleteSelectedMarker=function(){var e=this;if(void 0!==this._currentMarker){var t=!1;if(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Le(e,e._currentMarker,!0);n(r),r.defaultPrevented&&(t=!0)})),!t){var n=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(t){return t(new Le(e,n))}))}}},e.prototype.clear=function(){var e=this,t=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Le(e,void 0,!0);n(r),r.defaultPrevented&&(t=!0)})),!t)){this.setCurrentMarker();for(var n=function(t){var n=r.markers[t];r.setCurrentMarker(r.markers[t]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(t){return t(new Le(e,n))}))},r=this,i=this.markers.length-1;i>=0;i--)n(i);this.addUndoStep()}},Object.defineProperty(e.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),e.prototype.showNotesEditor=function(){var e;void 0!==this._currentMarker&&(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=null!==(e=this._currentMarker.notes)&&void 0!==e?e:"",this.overlayContainer.appendChild(this.notesArea))},e.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},e.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},e.prototype.addUndoStep=function(){var e=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var t=this.getState(),n=this.undoRedoManager.getLastUndoStep();if(!n||n.width===t.width&&n.height===t.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(t),r<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach((function(t){return t(new Oe(e))}))}else this.undoRedoManager.replaceLastUndoStep(t),this.eventListeners.statechange.forEach((function(t){return t(new Oe(e))}))}},e.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},e.prototype.undoStep=function(){var e=this,t=this.undoRedoManager.undo();void 0!==t&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(t){return t(new Oe(e))})))},e.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},e.prototype.redoStep=function(){var e=this,t=this.undoRedoManager.redo();void 0!==t&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(t){return t(new Oe(e))})))},e.prototype.stepZoom=function(){var e=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=e<this.zoomSteps.length-1?this.zoomSteps[e+1]:this.zoomSteps[0]},e.prototype.panTo=function(e){this.contentDiv.scrollBy({left:this.prevPanPoint.x-e.x,top:this.prevPanPoint.y-e.y}),this.prevPanPoint=e},e.prototype.startRenderAndClose=function(){return H(this,void 0,void 0,(function(){var e,t,n=this;return z(this,(function(r){switch(r.label){case 0:return[4,this.render()];case 1:return e=r.sent(),t=this.getState(),this.eventListeners.render.forEach((function(r){return r(new Ae(n,e,t))})),this.close(!0),[2]}}))}))},e.prototype.getState=function(e){!0===e&&this.setCurrentMarker();var t={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach((function(e){return t.markers.push(e.getState())})),t},e.prototype.restoreState=function(e){var t=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);e.markers.forEach((function(e){var n=t._availableMarkerTypes.find((function(t){return t.typeName===e.typeName}));if(void 0!==n){var r=t.addNewMarker(n);r.restoreState(e),t.markers.push(r)}})),e.width&&e.height&&(e.width!==this.imageWidth||e.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/e.width,this.imageHeight/e.height),this.eventListeners.restorestate.forEach((function(e){return e(new Oe(t))}))},e.prototype.addNewMarker=function(e){var t=V.createGroup();return this.markerImage.appendChild(t),new e(t,this.overlayContainer,this.settings)},e.prototype.createNewMarker=function(e){var t,n=this;(t="string"==typeof e?this._availableMarkerTypes.find((function(t){return t.typeName===e})):e)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(t),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(t.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach((function(e){return e(new Le(n,n._currentMarker))})))},e.prototype.markerCreated=function(e){var t=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(e),this.setCurrentMarker(e),e instanceof me&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(me):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach((function(e){return e(new Le(t,t._currentMarker))}))},e.prototype.colorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=e,this.settings.defaultStrokeColor=e)},e.prototype.fillColorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=e)},e.prototype.markerStateChanged=function(e){var t=this;this.eventListeners.markerchange.forEach((function(n){return n(new Le(t,e))}))},e.prototype.setCurrentMarker=function(e){var t=this;this._currentMarker!==e&&void 0!==this._currentMarker&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach((function(e){return e(new Le(t,t._currentMarker))}))),this._currentMarker=e,void 0===this._currentMarker||this._currentMarker.isSelected||("new"!==this._currentMarker.state&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach((function(e){return e(new Le(t,t._currentMarker))})))},e.prototype.onPointerDown=function(e){if(this._isFocused||this.focus(),this.touchPoints++,1===this.touchPoints||"touch"!==e.pointerType)if(void 0===this._currentMarker||"new"!==this._currentMarker.state&&"creating"!==this._currentMarker.state){if("select"===this.mode){var t=this.markers.find((function(t){return t.ownsTarget(e.target)}));void 0!==t?(this.setCurrentMarker(t),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:e.clientX,y:e.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY))},e.prototype.onDblClick=function(e){if(this._isFocused||this.focus(),"select"===this.mode){var t=this.markers.find((function(t){return t.ownsTarget(e.target)}));void 0!==t&&t!==this._currentMarker&&this.setCurrentMarker(t),void 0!==this._currentMarker?this._currentMarker.dblClick(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target):this.setCurrentMarker()}},e.prototype.onPointerMove=function(e){1!==this.touchPoints&&"touch"===e.pointerType||(void 0!==this._currentMarker||this.isDragging)&&(void 0!==this._currentMarker&&"edit"===this._currentMarker.state||e.preventDefault(),void 0!==this._currentMarker?this._currentMarker.manipulate(this.clientToLocalCoordinates(e.clientX,e.clientY)):this.zoomLevel>1&&this.panTo({x:e.clientX,y:e.clientY}))},e.prototype.onPointerUp=function(e){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(e.clientX,e.clientY)),this.isDragging=!1,this.addUndoStep()},e.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},e.prototype.onKeyUp=function(e){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==e.key&&"Backspace"!==e.key||this.deleteSelectedMarker()},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.markerImage.getBoundingClientRect();return{x:(e-n.left)/this.zoomLevel,y:(t-n.top)/this.zoomLevel}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"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()},e.prototype.addLicenseKey=function(e){W.addKey(e)},e.prototype.addEventListener=function(e,t){this.eventListeners.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventListeners.removeEventListener(e,t)},e.prototype.renderState=function(e){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(e),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(e.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),e.prototype.focus=function(){var e=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(t){return t(new Oe(e))})))},e.prototype.blur=function(){var e=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(t){return t(new Oe(e))})))},e.instanceCounter=0,e}(),Re=function(e,t){return(Re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};
/* **********************************
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.
***************************************************************************** */function Me(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Re(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Ne(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function je(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var Pe=function(){function e(){}return e.addKey=function(t){e.key=t},Object.defineProperty(e,"isLicensed",{get:function(){return!!e.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(e.key)},enumerable:!1,configurable:!0}),e}(),Be=function(){function e(){}return e.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},e.setAttributes=function(e,t){for(var n=0,r=t;n<r.length;n++){var i=r[n],o=i[0],a=i[1];e.setAttribute(o,a)}},e.createRect=function(t,n,r){var i=document.createElementNS("http://www.w3.org/2000/svg","rect");return i.setAttribute("width",t.toString()),i.setAttribute("height",n.toString()),r&&e.setAttributes(i,r),i},e.createLine=function(t,n,r,i,o){var a=document.createElementNS("http://www.w3.org/2000/svg","line");return a.setAttribute("x1",t.toString()),a.setAttribute("y1",n.toString()),a.setAttribute("x2",r.toString()),a.setAttribute("y2",i.toString()),o&&e.setAttributes(a,o),a},e.createPolygon=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","polygon");return r.setAttribute("points",t),n&&e.setAttributes(r,n),r},e.createCircle=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","circle");return r.setAttribute("cx",(t/2).toString()),r.setAttribute("cy",(t/2).toString()),r.setAttribute("r",t.toString()),n&&e.setAttributes(r,n),r},e.createEllipse=function(t,n,r){var i=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return i.setAttribute("cx",(t/2).toString()),i.setAttribute("cy",(n/2).toString()),i.setAttribute("rx",(t/2).toString()),i.setAttribute("ry",(n/2).toString()),r&&e.setAttributes(i,r),i},e.createGroup=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","g");return t&&e.setAttributes(n,t),n},e.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},e.createMarker=function(t,n,r,i,o,a,s){var l=document.createElementNS("http://www.w3.org/2000/svg","marker");return e.setAttributes(l,[["id",t],["orient",n],["markerWidth",r.toString()],["markerHeight",i.toString()],["refX",o.toString()],["refY",a.toString()]]),l.appendChild(s),l},e.createText=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","text");return n.setAttribute("x","0"),n.setAttribute("y","0"),t&&e.setAttributes(n,t),n},e.createTSpan=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","tspan");return r.textContent=t,n&&e.setAttributes(r,n),r},e.createImage=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","image");return t&&e.setAttributes(n,t),n},e.createPoint=function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return n.x=e,n.y=t,n},e.createPath=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d",t),n&&e.setAttributes(r,n),r},e.createElement=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg",t);return n&&e.setAttributes(r,n),r},e.getHollowRectanglePath=function(e,t,n,r,i,o,a,s){return"M"+e+","+t+"V"+(t+r)+"H"+(e+n)+"V"+t+"H"+i+"V"+o+"H"+(i+a)+"V"+(o+s)+"H"+i+"V"+t+"Z"},e}(),Fe=function(){function e(e){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+e+"_"}return Object.defineProperty(e.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(e.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(e.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),e.prototype.addClass=function(e){return void 0===this.styleSheet&&this.addStyleSheet(),e.name=""+this.classNamePrefix+e.localName,this.classes.push(e),this.styleSheet.sheet.insertRule("."+e.name+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length),e},e.prototype.addRule=function(e){void 0===this.styleSheet&&this.addStyleSheet(),this.rules.push(e),this.styleSheet.sheet.insertRule(e.selector+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length)},e.prototype.addStyleSheet=function(){var e;this.styleSheet=document.createElement("style"),(null!==(e=this.styleSheetRoot)&&void 0!==e?e:document.head).appendChild(this.styleSheet),this.addRule(new Ue("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ue("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames","\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n ")),this.addRule(new Ue("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames","\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n ")),this.addClass(new He("_fade_in","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_in_animation_frames;\n ")),this.addClass(new He("_fade_out","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_out_animation_frames;\n "))},e.prototype.removeStyleSheet=function(){var e;this.styleSheet&&((null!==(e=this.styleSheetRoot)&&void 0!==e?e:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},e}(),Ue=function(e,t){this.selector=e,this.style=t},He=function(e,t){this.localName=e,this.style=t},ze=function(){function e(){this.blocks=[],this.display=""}return e.prototype.addButtonBlock=function(e){e.className=this.blockClassName,e.buttonClassName=this.buttonClassName,e.buttonColorsClassName=this.buttonColorsClassName,e.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(e)},e.prototype.addElementBlock=function(e){void 0===e.className&&(e.className=this.blockClassName),this.blocks.push(e)},e.prototype.getUI=function(){var e=document.createElement("div");return e.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,e.style.display=this.display,this.blocks.forEach((function(t){return e.appendChild(t.getUI())})),e},e}(),Ge=function(){function e(){}return e.prototype.getUI=function(){var e=document.createElement("div");if(e.className=this.className,void 0!==this.minWidth&&(e.style.minWidth=this.minWidth),void 0!==this.contentAlign)switch(this.contentAlign){case"start":e.style.justifyContent="flex-start";break;case"center":e.style.justifyContent="center";break;case"end":e.style.justifyContent="flex-end"}return e.style.whiteSpace="nowrap",e},e}(),Ve=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buttons=[],t}return Me(t,e),t.prototype.addButton=function(e){e.className=this.buttonClassName,e.colorsClassName=this.buttonColorsClassName,e.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(e)},t.prototype.getUI=function(){var t=e.prototype.getUI.call(this);return this.buttons.forEach((function(e){return t.appendChild(e.getUI())})),t},t}(Ge),We=function(){function e(e,t){this._isActive=!1,this._isHidden=!1,this._icon=e,this.title=t,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(e.prototype,"icon",{get:function(){return this._icon},set:function(e){this._icon=e,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isActive",{get:function(){return this._isActive},set:function(e){this._isActive=e,this.adjustClassName()},enumerable:!1,configurable:!0}),e.prototype.getUI=function(){var e=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 e.onClick()})),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},e.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,"")))},e.prototype.hide=function(){this._isHidden=!0},e}(),Ke=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elements=[],t}return Me(t,e),t.prototype.addElement=function(e){this.elements.push(e)},t.prototype.getUI=function(){var t=e.prototype.getUI.call(this);return this.elements.forEach((function(e){return t.appendChild(e)})),t},t}(Ge),qe=function(){function e(e,t){this.horizontal=e,this.vertical=t}return Object.defineProperty(e.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),e.prototype.getVerticalLength=function(e){return e/this.ratio},e.prototype.getHorizontalLength=function(e){return e*this.ratio},e}(),Xe=function(){function e(){}return e.getIcon=function(e,t){if(e>0&&t>0){var n=new qe(e,t),r=n.ratio>=1?20:n.getHorizontalLength(20),i=n.ratio<1?20:n.getVerticalLength(20),o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(o);var a=Be.createDefs();o.appendChild(a);var s=Be.createElement("clipPath",[["id","text-bg-clip"]]);a.appendChild(s);var l=Be.createPath(Be.getHollowRectanglePath((24-r)/2,(24-i)/2,r,i,(24-r)/2+2,(24-i)/2+2,r-4,i-4));o.appendChild(l);var c=Be.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(Be.createTSpan(e+":"+t)),o.appendChild(c);var u=c.getBBox();Be.setAttributes(c,[["x",((24-u.width)/2).toString()],["y",((24-u.height)/2-u.y).toString()]]);var h=Be.createPath(Be.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(u.width))/2,(24-Math.ceil(u.height))/2,Math.ceil(u.width),Math.ceil(u.height)));return s.appendChild(h),Be.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(o),o.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>'},e}(),Ye=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.isDropdownOpen=!1,i.onClick=i.dropdownButtonClicked,i.dropdownButtons=r,i}return Me(t,e),t.prototype.setupDropdown=function(){var e=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach((function(t){t.className=e.className,t.colorsClassName=e.colorsClassName,e.dropdownBlock.appendChild(t.getUI())})),this.uiContainer.appendChild(this.dropdownBlock)},t.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},t.prototype.dropdownButtonClicked=function(){void 0===this.dropdownBlock&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},t.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},t.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},t.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},t}(We),$e=function(){function e(e,t){this.GRIP_SIZE=10,this.color=e,this.fillColor=t,this.visual=Be.createGroup(),this.visual.appendChild(Be.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Be.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e.prototype.setCenter=function(e,t){this.visual.childNodes.forEach((function(n){return Be.setAttributes(n,[["cx",e.toString()],["cy",t.toString()]])}))},e}(),Je=function(){function e(e,t,n,r){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=e,this.canvasHeight=t,this.margin=n,this.container=r,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(e.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(e){this._aspectRatio=e,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(e){this._isGridVisible=e,this.gridContainer&&Be.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(e){this._zoomFactor=e,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),e.prototype.open=function(){var e=this;this.cropShadeElement=Be.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Be.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var t=0;t<this.numberOfGridLines;t++)this.horizontalGridLines.push(Be.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Be.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach((function(t){return e.gridContainer.appendChild(t)})),this.verticalGridLines.forEach((function(t){return e.gridContainer.appendChild(t)})),this.cropRectElement=Be.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new $e(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new $e(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new $e(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new $e(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},e.prototype.setCropRectangle=function(e){this.cropRect=e;var t=Object.assign({},this.cropRect);1!==this.zoomFactor&&(t.width=this.cropRect.width*this.zoomFactor,t.height=this.cropRect.height*this.zoomFactor,t.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-t.width/2,t.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-t.height/2),Be.setAttributes(this.cropRectElement,[["x",t.x.toString()],["y",t.y.toString()],["width",t.width.toString()],["height",t.height.toString()]]);var n=t.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach((function(e,r){var i=t.y+n*(r+1);Be.setAttributes(e,[["x1",""+t.x],["y1",""+i],["x2",""+(t.x+t.width)],["y2",""+i]])}));var r=t.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach((function(e,n){var i=t.x+r*(n+1);Be.setAttributes(e,[["x1",""+i],["y1",""+t.y],["x2",""+i],["y2",""+(t.y+t.height)]])})),Be.setAttributes(this.cropShadeElement,[["d",Be.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,t.x,t.y,t.width,t.height)]]),this.topLeftGrip.setCenter(t.x,t.y),this.topRightGrip.setCenter(t.x+t.width,t.y),this.bottomLeftGrip.setCenter(t.x,t.y+t.height),this.bottomRightGrip.setCenter(t.x+t.width,t.y+t.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},e.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)},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.container.getBoundingClientRect();return{x:e-n.left+this.margin,y:t-n.top+this.margin}},e.prototype.onPointerDown=function(e){this.container.setPointerCapture(e.pointerId),this.previousPoint=this.clientToLocalCoordinates(e.clientX,e.clientY),this.cropRectElement===e.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(e.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(e.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(e.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(e.target)&&(this.activeGrip=this.bottomRightGrip)},e.prototype.onPointerMove=function(e){if(this.isMoving)this.move(this.clientToLocalCoordinates(e.clientX,e.clientY));else if(this.activeGrip){var t=this.clientToLocalCoordinates(e.clientX,e.clientY);this.resize(t)}e.preventDefault()},e.prototype.onPointerUp=function(e){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(e.pointerId)},e.prototype.move=function(e){var t=e.x-this.previousPoint.x,n=e.y-this.previousPoint.y;1!==this.zoomFactor&&(t=-t/this.zoomFactor,n=-n/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+t),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+n),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=e},e.prototype.resize=function(e){var t=Object.assign({},this.cropRect),n=e.x-this.previousPoint.x,r=e.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:t.x+n<this.margin&&(n=this.margin-t.x),t.x+=n,t.width=this.cropRect.x+this.cropRect.width-t.x;break;case this.bottomRightGrip:case this.topRightGrip:t.width+n>this.canvasWidth*this.zoomFactor&&(n=this.canvasWidth*this.zoomFactor-t.width),t.width+=n}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(t.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(n),t.height=this.aspectRatio.getVerticalLength(t.width)):(t.y+=r,t.height=this.cropRect.y+this.cropRect.height-t.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?t.height=this.aspectRatio.getVerticalLength(t.width):t.height+=r}t.width<10&&(t.x=this.cropRect.x,t.width=10),t.height<10&&(t.y=this.cropRect.y,t.height=10),this.previousPoint=e,t.x>=this.margin&&t.y>=this.margin&&t.x-this.margin+t.width<=this.canvasWidth&&t.y-this.margin+t.height<=this.canvasHeight&&(this.cropRect=t,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},e.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var e=this.cropRect.x+this.cropRect.width/2,t=this.cropRect.y+this.cropRect.height/2,n=this.aspectRatio.getHorizontalLength(this.cropRect.height),r=this.aspectRatio.getVerticalLength(this.cropRect.width);n/this.canvasWidth<r/this.canvasHeight?this.cropRect.width=n:this.cropRect.height=r,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=e-this.cropRect.width/2,this.cropRect.y=t-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)}},e.prototype.getRescaledRect=function(e,t,n,r,i,o){var a=n/e,s=r/t;return{x:(i.x-o)*a+o,y:(i.y-o)*s+o,width:i.width*a,height:i.height*s}},e.prototype.scaleCanvas=function(e,t){var n=this.getRescaledRect(this.canvasWidth,this.canvasHeight,e,t,this.cropRect,this.margin);this.canvasWidth=e,this.canvasHeight=t,this.onCropChange&&this.onCropChange(n),this.setCropRectangle(n)},e}(),Ze=function(){function e(e){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=e,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(e.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),e.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},e.prototype.onPointerDown=function(e){this.controlContainer.setPointerCapture(e.pointerId),this.isDragging=!0,this.previousPoint={x:e.clientX,y:e.clientY}},e.prototype.onPointerMove=function(e){this.isDragging&&(this.onAngleChange&&this.onAngleChange((e.clientX-this.previousPoint.x)/5),this.previousPoint.x=e.clientX)},e.prototype.onPointerUp=function(e){this.isDragging&&this.onAngleChange&&this.onAngleChange((e.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(e.pointerId)},e.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var e=this.angleLabelText.getBBox();Be.setAttributes(this.angleLabelElement,[["x",((this.width-e.width)/2).toString()],["y",(this.height/2).toString()]])}},e.prototype.positionScaleShape=function(){if(this.scaleShape){var e=this.scaleShape.transform.baseVal.getItem(0);e.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(e,0)}},e.prototype.getVisual=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("width",this.width+"px"),e.setAttribute("height",this.height+"px"),e.setAttribute("viewBox","0 0 "+this.width+" "+this.height),e.style.flexShrink="0",document.body.appendChild(e);for(var t="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,n=1;n<=this.width/5+10;n++){var r=n%5==0?this.height/3:this.height/6;t+="h4v"+-r+"h1v"+r}t+="v1H0Z",this.scaleShape=Be.createPath(t);var i=Be.createTransform();this.scaleShape.transform.baseVal.appendItem(i),e.appendChild(this.scaleShape),this.angleLabelElement=Be.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Be.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var o=Be.createTSpan("");return o.innerHTML="&deg;",this.angleLabelElement.appendChild(o),e.appendChild(this.angleLabelElement),document.body.removeChild(e),e},e}(),Qe=function(){function e(){this.naturalSize=!1,this.imageType="image/png"}return e.prototype.rasterize=function(e,t,n,r,i,o,a){var s=this;return new Promise((function(l){var c=document.createElement("canvas");c.width=e.width.baseVal.value-2*r,c.height=e.height.baseVal.value-2*r;var u=1,h=1;!0===s.naturalSize?(u=t.naturalWidth/(e.width.baseVal.value-2*r)/o,h=t.naturalHeight/(e.height.baseVal.value-2*r)/a,c.width=t.naturalWidth/o,c.height=t.naturalHeight/a):void 0!==s.width&&void 0!==s.height&&(u=s.width/n.width,h=s.height/n.height,c.width*=u,c.height*=h);var d=c.getContext("2d");d.translate(c.width/2,c.height/2),d.rotate(i*Math.PI/180),d.scale(o,a),d.translate(-c.width/2,-c.height/2),d.drawImage(t,0,0,c.width,c.height);var f=document.createElement("canvas");f.width=n.width*u,f.height=n.height*h,f.getContext("2d").putImageData(d.getImageData((n.x-r)*u,(n.y-r)*h,n.width*u,n.height*h),0,0),l(f.toDataURL(s.imageType,s.imageQuality))}))},e}(),et=function(){function e(t){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=e.instanceCounter++,this.styles=new Fe(this.instanceNo),this.target=t,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(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(e){this._zoomToCropEnabled=e,e?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(e){this._isGridVisible=e,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gridLines",{get:function(){return this._gridLines},set:function(e){this._gridLines=e,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(e){this._rotationAngle=e,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"aspectRatio",{get:function(){var e;return null!==(e=this._aspectRatio)&&void 0!==e?e:this.aspectRatios[0]},set:function(e){this._aspectRatio=e},enumerable:!1,configurable:!0}),e.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(),"popup"===this.displayMode&&this.onPopupResize(),this._isOpen=!0},e.prototype.show=function(){this.showUI(),this.open()},e.prototype.close=function(e){void 0===e&&(e=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.displayMode&&window.removeEventListener("resize",this.setWindowHeight),e||this.closeEventListeners.forEach((function(e){return e()})),this._isOpen=!1)},e.prototype.addRenderEventListener=function(e){this.renderEventListeners.push(e)},e.prototype.removeRenderEventListener=function(e){this.renderEventListeners.indexOf(e)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(e),1)},e.prototype.addCloseEventListener=function(e){this.closeEventListeners.push(e)},e.prototype.removeCloseEventListener=function(e){this.closeEventListeners.indexOf(e)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(e),1)},e.prototype.setupResizeObserver=function(){var e=this;"inline"===this.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){e.resize(e.target.clientWidth,e.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},e.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var e=1*this.target.clientWidth/this.target.clientHeight,t=this.contentDiv.clientWidth/e>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*e:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,n=t+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/e;this.resize(t,n)}},e.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},e.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",Be.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},e.prototype.resize=function(e,t){this.imageWidth=Math.round(e),this.imageHeight=Math.round(t),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","popup"!==this.displayMode?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},e.prototype.setEditingTarget=function(){var e=document.createElement("canvas");e.width=this.target.naturalWidth,e.height=this.target.naturalHeight,e.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var t=e.toDataURL();Be.setAttributes(this.editingTarget,[["href",t]]),this.setEditingTargetSize()},e.prototype.setTopLeft=function(){var e=this.target.getBoundingClientRect(),t=this.editorCanvas.getBoundingClientRect();this.left=e.left-t.left-this.CANVAS_MARGIN,this.top=e.top-t.top-this.CANVAS_MARGIN},e.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=Be.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Be.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Be.createGroup(),this.editingTargetRotationScaleContainer=Be.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var e=Be.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(e);var t=Be.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(t),this.editingTargetContainer=Be.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)},e.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},e.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=Be.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Je(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()},e.prototype.zoomToCrop=function(){if(this.cropRect){var e=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,t=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=e+"px "+t+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-e+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-t+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},e.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)},e.prototype.cropRectChanged=function(e){this.cropRect=e,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},e.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},e.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"},e.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},e.prototype.showUI=function(){switch(this.addStyles(),"popup"===this.displayMode&&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 e=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,t=this.target.offsetTop>e+this.CANVAS_MARGIN?this.target.offsetTop-(e+this.CANVAS_MARGIN):0;this.coverDiv.style.top=t+"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=void 0!==this.styles.settings.zIndex?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=void 0!==this.styles.settings.zIndex?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="popup"===this.displayMode?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,"popup"===this.displayMode&&(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","popup"===this.displayMode&&(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},e.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},e.prototype.addTopToolbar=function(){var e=this;this.topToolbar=new ze,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 t=new Ve;t.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(t);var n=[];this.aspectRatios.forEach((function(t){var r=new We(Xe.getIcon(t.horizontal,t.vertical),0===t.horizontal&&0===t.vertical?"FREE":t.horizontal+":"+t.vertical);r.onClick=function(){return e.ratioButtonClicked(t)},n.push(r)})),this.aspectRatioButton=new Ye(Xe.getIcon(0,0),"Aspect ratio",n),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,t.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var r=new We('<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");r.isActive=this.isGridVisible,r.onClick=function(){e.isGridVisible=!e.isGridVisible,r.isActive=e.isGridVisible},t.addButton(r);var i=new We('<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(i.isActive=this.zoomToCropEnabled,i.onClick=function(){e.zoomToCropEnabled=!e.zoomToCropEnabled,i.isActive=e.zoomToCropEnabled},t.addButton(i),!Pe.isLicensed){var o=new Ke;this.topToolbar.addElementBlock(o);var a=document.createElement("div");a.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var s=document.createElement("a");s.style.color="currentColor",s.href="https://markerjs.com/products/cropro",s.target="_blank",s.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>',a.appendChild(s),o.addElement(a)}var l=new Ve;l.minWidth=3*this.toolbarHeight+"px",l.contentAlign="end",this.topToolbar.addButtonBlock(l);var c=new We('<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");c.onClick=this.startRenderAndClose,l.addButton(c),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(c.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var u=new We('<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");u.onClick=this.close,l.addButton(u),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(u.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},e.prototype.addBottomToolbar=function(){var e=this;this.bottomToolbar=new ze,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 t=new Ve;t.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(t);var n=new We('<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");n.onClick=this.rotateLeftButtonClicked,t.addButton(n);var r=new We('<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");r.onClick=this.rotateRightButtonClicked,t.addButton(r);var i=new Ke;i.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(i),this.straightener=new Ze("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(t){e.rotateBy(t),e.straightener.angle=e.rotationAngle},i.addElement(this.straightener.getUI());var o=new Ve;o.minWidth=2*this.toolbarHeight+"px",o.contentAlign="end",this.bottomToolbar.addButtonBlock(o);var a=new We('<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");a.onClick=this.flipHorizontallyButtonClicked,o.addButton(a);var s=new We('<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");s.onClick=this.flipVerticallyButtonClicked,o.addButton(s)},e.prototype.ratioButtonClicked=function(e){this.aspectRatio=e,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},e.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Xe.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},e.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&0!==this.aspectRatio.horizontal&&0!==this.aspectRatio.vertical?this.cropLayer.aspectRatio=new qe(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},e.prototype.closeUI=function(){"popup"===this.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},e.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},e.prototype.restoreState=function(e){if(e){var t=this.cropLayer.getRescaledRect(e.width,e.height,this.imageWidth,this.imageHeight,e.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(t),this.cropRectChanged(t),this.flippedHorizontally=e.flippedHorizontally,this.flippedVertically=e.flippedVertically,this.applyFlip(),this.rotationAngle=e.rotationAngle,this.applyRotation()}},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.cropImage.getBoundingClientRect();return{x:e-n.left,y:t-n.top}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var e=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=e+"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()},e.prototype.rotateLeftButtonClicked=function(){var e=this.rotationAngle-90;this.rotationAngle%90!=0&&(e+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(e)},e.prototype.rotateRightButtonClicked=function(){var e=this.rotationAngle+90;this.rotationAngle%90!=0&&(e-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(e)},e.prototype.rotateTo=function(e){e=(e=e>180?e-360:e)<=-180?e+360:e,this.rotationAngle=e,this.applyRotation()},e.prototype.rotateBy=function(e){this.rotateTo((this.rotationAngle+e)%360)},e.prototype.applyRotation=function(){var e=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var t=this.editingTargetRotationContainer.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(t,0);var n=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/n.width,this.imageHeight/n.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=e},e.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},e.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},e.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},e.prototype.startRenderAndClose=function(){return Ne(this,void 0,void 0,(function(){var e,t;return je(this,(function(n){switch(n.label){case 0:return[4,this.render()];case 1:return e=n.sent(),t=this.getState(),this.renderEventListeners.forEach((function(n){return n(e,t)})),this.close(!0),[2]}}))}))},e.prototype.render=function(){return Ne(this,void 0,void 0,(function(){var e;return je(this,(function(t){switch(t.label){case 0:return(e=new Qe).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.width=this.renderWidth,e.height=this.renderHeight,this.unzoomFromCrop(),Be.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,e.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 t.sent(),[4,e.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,t.sent()]}}))}))},e.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new He("toolbar","\n width: "+("inline"===this.displayMode?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+";\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.toolbarHeight+"px;\n box-sizing: content-box;\n overflow: hidden;\n line-height: 0px;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new He("toolbar_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new He("toolbar-block","\n display: flex;\n align-items: center;\n box-sizing: content-box;\n "));var e=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new He("toolbar_button","\n display: inline-block;\n width: "+(this.toolbarHeight-2*e)+"px;\n height: "+(this.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new He("toolbar_button_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new He("toolbar_active_button","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n background-color: "+this.styles.settings.toolbarBackgroundActiveColor+"\n ")),this.styles.addRule(new Ue("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.toolbarHeight/2+"px;\n ")),this.styles.addRule(new Ue("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.styles.settings.toolbarBackgroundHoverColor+"\n ")),this.toolbarDropdownStyleClass=this.styles.addClass(new He("toolbar_dropdown","\n position: absolute;\n max-width: "+4*this.toolbarHeight+"px;\n z-index: 20;\n white-space: normal;\n box-sizing: content-box;\n box-shadow: 3px 3px rgba(33, 33, 33, 0.1);\n margin: "+("inline"===this.displayMode?"0":this.popupMargin)+"px;\n line-height: 0px;\n ")),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new He("toolbar_dropdown_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new He("toolbar_straightener_block","\n display: flex;\n overflow: hidden;\n justify-content: center;\n -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%);\n ")),this.toolbarStraightenerStyleClass=this.styles.addClass(new He("toolbar_straightener","\n display: flex;\n overflow: hidden;\n justify-content: center;\n height: "+(this.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new He("toolbar_straightener_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n "))},e.instanceCounter=0,e}(),tt=n("8hTe"),nt=n.n(tt),rt=/<pre[^>]*>/g;t.a=function(e){var t=e.value,n=void 0===t?"":t,l=e.edit,d=void 0!==l&&l,f=e.className,p=e.showTextOnly,m=e.showLines,g=e.replaces,v=e.zoomImg,y=e.hasMask,E=e.style,S=void 0===E?{}:E,C=e.stylesPrev,k=void 0===C?{}:C,O=String(n),A=Object(u.useRef)(),L=Object(u.useRef)(),D=Object(u.useState)(""),R=Object(s.a)(D,2),F=R[0],U=R[1],H=Object(u.useState)("office"),z=Object(s.a)(H,2),G=z[0],V=z[1],W=Object(u.useMemo)((function(){try{O=(O=O.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+N.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+N.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+N.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,"\n")).replace(new RegExp("(?<!\\n)\\n(?!\\n)","g")," \n")}catch(e){}var e=I(O),t=_;if(O.match(/\[TOC\]/)&&(e=e.replace("<p>[TOC]</p>",w()),b()),e=(e=e.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var r=t[n],i=r.type,o=r.expression;return Object(j.renderToString)(function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}(o)||"",{displayMode:"block"===i,throwOnError:!1,output:"html"})}))).replace(/▁/g,"▁▁▁"),T(),p){var n=document.createElement("div");return n.innerHTML=e,n.innerText}return setTimeout((function(){return X()}),500),e}),[O]),K=Object(u.useRef)();function q(e){var t=e.target;if("IMG"===t.tagName.toUpperCase()){if(v){var n=t.getAttribute("src");U(n),V("image")}}else if("A"===t.tagName.toUpperCase()){var r=t.getAttribute("href");if(r.indexOf("office")>-1)e.preventDefault(),U(r),V("office");else if(r.indexOf("application/pdf")>-1)e.preventDefault(),U(r),V("pdf");else if(r.indexOf("type=text")>-1)e.preventDefault(),U(r),V("html");else if(r.startsWith("#")){e.preventDefault();var i=document.getElementById(r.replace("#",""));i&&i.scrollIntoView(!0)}}}x.WebkitLineClamp=m,m&&(S=Object(o.a)(Object(o.a)({},S),x));var X=function(){var e,t=null===(e=K.current)||void 0===e?void 0:e.querySelectorAll("video");null==t||t.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(M.a.isSupported()){var t=new M.a;t.loadSource(e.src),t.attachMedia(e)}}))};Object(u.useEffect)((function(){if(K.current&&W&&W.match(rt)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",q),function(){K.current.removeEventListener("click",q),T(),b()}}),[W,K.current,q]);return h.a.createElement("div",{style:{position:"relative"}},h.a.createElement("div",{ref:K,style:Object(o.a)({},S),className:"".concat(f||""," markdown-body ").concat(nt.a.mdBody),onMouseOver:function(e){d&&("IMG"===e.target.nodeName?(A.current.style.display="flex",A.current.style.width=e.target.clientWidth+"px",A.current.style.height=e.target.clientHeight+"px",A.current.style.top=e.target.offsetTop+"px",A.current.style.left=e.target.offsetLeft+"px",L.current.src=e.target.getAttribute("src")):A.current.style.display="none")},dangerouslySetInnerHTML:{__html:W}}),h.a.createElement("div",{ref:A,className:nt.a.button},h.a.createElement(r.a,null,h.a.createElement(i.a,{onClick:function(){return(e=new et(L.current)).displayMode="popup",e.addRenderEventListener(function(){var e=Object(a.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A.current.style.display="none",e.next=3,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:t}});case 3:null!=(n=e.sent)&&n.id&&g(L.current.getAttribute("src").replace(N.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),void e.show();var e}},"裁剪"),h.a.createElement(i.a,{onClick:function(){return(e=new Ie(L.current)).settings.displayMode="popup",e.addEventListener("render",function(){var e=Object(a.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A.current.style.display="none",!L.current){e.next=6;break}return e.next=4,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:t.dataUrl}});case 4:null!=(n=e.sent)&&n.id&&g(L.current.getAttribute("src").replace(N.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.show(),void(window.markerArea=e);var e}},"编辑"))),h.a.createElement("img",{ref:L,src:"https://ali-cdn.educoder.net/images/avatars/PortalImage/170?t=1659681136",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),h.a.createElement(P.a,{close:!0,data:F,hasMask:y,type:null!=F&&F.length?G:"",style:Object(o.a)({},k),onClose:function(){return U("")}}))}},"9OqN":
/*!********************************************!*\
!*** ./node_modules/crypto-js/mode-ctr.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o;e.exports=(o=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),o.mode.CTR=(r=o.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._counter;i&&(o=this._counter=i.slice(0),this._iv=void 0);var a=o.slice(0);n.encryptBlock(a,0),o[r-1]=o[r-1]+1|0;for(var s=0;s<r;s++)e[t+s]^=a[s]}}),r.Decryptor=i,r),o.mode.CTR)},"9VGf":
/*!****************************************!*\
!*** ./src/components/useInterval.tsx ***!
\****************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! react */"q1tI");function i(e,t){var n=Object(r.useRef)();Object(r.useEffect)((function(){n.current=e})),Object(r.useEffect)((function(){if(null!==t){var e=setInterval((function(){n.current()}),t);return function(){return clearInterval(e)}}}),[t])}},ALsQ:
/*!********************************************!*\
!*** ./node_modules/crypto-js/mode-cfb.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),r.mode.CFB=function(){var e=r.lib.BlockCipherMode.extend();function t(e,t,n,r){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var a=0;a<n;a++)e[t+a]^=i[a]}return e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize;t.call(this,e,n,i,r),this._prevBlock=e.slice(n,n+i)}}),e.Decryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,o=e.slice(n,n+i);t.call(this,e,n,i,r),this._prevBlock=o}}),e}(),r.mode.CFB)},BJfS:
/*!*****************************************************!*\
!*** ./node_modules/string-convert/camel2hyphen.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e){return e.replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()})).toLowerCase()}},BU3w:
/*!***************************************************!*\
!*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***!
\***************************************************/
/*! exports provided: injectCSS, updateCSS */
/*! exports used: updateCSS */function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(/*! ./canUseDom */"MNnm");function i(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function o(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(r.a)())return null;var o,a=document.createElement("style");(null===(t=n.csp)||void 0===t?void 0:t.nonce)&&(a.nonce=null===(o=n.csp)||void 0===o?void 0:o.nonce);a.innerHTML=e;var s=i(n),l=s.firstChild;return n.prepend&&s.prepend?s.prepend(a):n.prepend&&l?s.insertBefore(a,l):s.appendChild(a),a}var a=new Map;function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i(n);if(!a.has(r)){var s=o("",n),l=s.parentNode;a.set(r,l),l.removeChild(s)}var c=Array.from(a.get(r).children).find((function(e){return"STYLE"===e.tagName&&e["rc-util-key"]===t}));if(c){var u,h,d;if((null===(u=n.csp)||void 0===u?void 0:u.nonce)&&c.nonce!==(null===(h=n.csp)||void 0===h?void 0:h.nonce))c.nonce=null===(d=n.csp)||void 0===d?void 0:d.nonce;return c.innerHTML!==e&&(c.innerHTML=e),c}var f=o(e,n);return f["rc-util-key"]=t,f}},Bd2K:
/*!********************************************************!*\
!*** ./node_modules/codemirror/addon/edit/closetag.js ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){e.defineOption("autoCloseTags",!1,(function(a,s,l){if(l!=e.Init&&l&&a.removeKeyMap("autoCloseTags"),s){var c={name:"autoCloseTags"};"object"==typeof s&&!1===s.whenClosing||(c["'/'"]=function(t){return function(t){return t.getOption("disableInput")?e.Pass:r(t,!0)}(t)}),"object"==typeof s&&!1===s.whenOpening||(c["'>'"]=function(r){return function(r){if(r.getOption("disableInput"))return e.Pass;for(var a=r.listSelections(),s=[],l=r.getOption("autoCloseTags"),c=0;c<a.length;c++){if(!a[c].empty())return e.Pass;var u=a[c].head,h=r.getTokenAt(u),d=e.innerMode(r.getMode(),h.state),f=d.state,p=d.mode.xmlCurrentTag&&d.mode.xmlCurrentTag(f),m=p&&p.name;if(!m)return e.Pass;var g="html"==d.mode.configuration,v="object"==typeof l&&l.dontCloseTags||g&&t,y="object"==typeof l&&l.indentTags||g&&n;h.end>u.ch&&(m=m.slice(0,m.length-h.end+u.ch));var b=m.toLowerCase();if(!m||"string"==h.type&&(h.end!=u.ch||!/[\"\']/.test(h.string.charAt(h.string.length-1))||1==h.string.length)||"tag"==h.type&&p.close||h.string.indexOf("/")==u.ch-h.start-1||v&&i(v,b)>-1||o(r,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(f)||[],m,u,!0))return e.Pass;var x="object"==typeof l&&l.emptyTags;if(x&&i(x,m)>-1)s[c]={text:"/>",newPos:e.Pos(u.line,u.ch+2)};else{var w=y&&i(y,b)>-1;s[c]={indent:w,text:">"+(w?"\n\n":"")+"</"+m+">",newPos:w?e.Pos(u.line+1,0):e.Pos(u.line,u.ch+1)}}}var E="object"==typeof l&&l.dontIndentOnAutoClose;for(c=a.length-1;c>=0;c--){var S=s[c];r.replaceRange(S.text,a[c].head,a[c].anchor,"+insert");var C=r.listSelections().slice(0);C[c]={head:S.newPos,anchor:S.newPos},r.setSelections(C),!E&&S.indent&&(r.indentLine(S.newPos.line,null,!0),r.indentLine(S.newPos.line+1,null,!0))}}(r)}),a.addKeyMap(c)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function r(t,n){for(var r=t.listSelections(),i=[],a=n?"/":"</",s=t.getOption("autoCloseTags"),l="object"==typeof s&&s.dontIndentOnSlash,c=0;c<r.length;c++){if(!r[c].empty())return e.Pass;var u=r[c].head,h=t.getTokenAt(u),d=e.innerMode(t.getMode(),h.state),f=d.state;if(n&&("string"==h.type||"<"!=h.string.charAt(0)||h.start!=u.ch-1))return e.Pass;var p,m="xml"!=d.mode.name&&"htmlmixed"==t.getMode().name;if(m&&"javascript"==d.mode.name)p=a+"script";else if(m&&"css"==d.mode.name)p=a+"style";else{var g=d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(f);if(!g||g.length&&o(t,g,g[g.length-1],u))return e.Pass;p=a+g[g.length-1]}">"!=t.getLine(u.line).charAt(h.end)&&(p+=">"),i[c]=p}if(t.replaceSelections(i),r=t.listSelections(),!l)for(c=0;c<r.length;c++)(c==r.length-1||r[c].head.line<r[c+1].head.line)&&t.indentLine(r[c].head.line)}function i(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;++n)if(e[n]==t)return n;return-1}function o(t,n,r,i,o){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,i.line+500),s=e.scanForClosingTag(t,i,null,a);if(!s||s.tag!=r)return!1;for(var l=o?1:0,c=n.length-1;c>=0&&n[c]==r;c--)++l;for(i=s.to,c=1;c<l;c++){var u=e.scanForClosingTag(t,i,null,a);if(!u||u.tag!=r)return!1;i=u.to}return!0}e.commands.closeTag=function(e){return r(e)}}(n(/*! ../../lib/codemirror */"VrN/"),n(/*! ../fold/xml-fold */"osHv"))},BjJ7:
/*!*********************************!*\
!*** ./src/pages/tasks/util.js ***!
\*********************************/
/*! exports provided: isCompileOk, getTreeData, processTreeData, debounce, isProd, apiPref */
/*! exports used: apiPref, debounce, getTreeData, isCompileOk, processTreeData */function(e,t,n){"use strict";function r(e){var t=!0;if(e.length>0){for(var n=0;n<e.length;n++)if(0==e[n].compile_success||!e[n].compile_success){t=!1;break}}else t=!1;return t}function i(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[],r=0;r<e.length;r++){var i=e[r],o=t?"".concat(t,"/").concat(i.name):"".concat(i.name);n.push({title:i.name,isLeaf:"tree"!==i.type,key:o})}return n}function o(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if(i.key===t){i.children=n;break}i.children&&o(i.children,t,n)}return e}function a(e,t,n){var r;return function(){var i=this,o=arguments,a=function(){r=null,n||e.apply(i,o)},s=n&&!r;clearTimeout(r),r=setTimeout(a,t),s&&e.apply(i,o)}}n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var s=n(/*! @/utils/env */"m3rI").a.API_SERVER},"C+DQ":
/*!*********************************************************!*\
!*** ./src/components/markdown-editor/css/iconfont.css ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},D1Df:
/*!************************************************!*\
!*** ./node_modules/qrcode.react/lib/index.js ***!
\************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(n,!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function h(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?f(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=n(/*! react */"q1tI"),y=(n(/*! prop-types */"17x9"),n(/*! qr.js/lib/QRCode */"H38U")),b=n(/*! qr.js/lib/ErrorCorrectLevel */"aRTE");function x(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r<2048?(t+=String.fromCharCode(192|r>>6),t+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(t+=String.fromCharCode(224|r>>12),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t+=String.fromCharCode(240|r>>18),t+=String.fromCharCode(128|r>>12&63),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r))}return t}var w={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1};function E(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return e.forEach((function(e,r){var i=null;e.forEach((function(o,a){if(!o&&null!==i)return n.push("M".concat(i+t," ").concat(r+t,"h").concat(a-i,"v1H").concat(i+t,"z")),void(i=null);if(a!==e.length-1)o&&null===i&&(i=a);else{if(!o)return;null===i?n.push("M".concat(a+t,",").concat(r+t," h1v1H").concat(a+t,"z")):n.push("M".concat(i+t,",").concat(r+t," h").concat(a+1-i,"v1H").concat(i+t,"z"))}}))})),n.join("")}function S(e,t){return e.slice().map((function(e,n){return n<t.y||n>=t.y+t.h?e:e.map((function(e,n){return(n<t.x||n>=t.x+t.w)&&e}))}))}function C(e,t){var n=e.imageSettings,r=e.size,i=e.includeMargin;if(null==n)return null;var o=i?4:0,a=t.length+2*o,s=Math.floor(.1*r),l=a/r,c=(n.width||s)*l,u=(n.height||s)*l,h=null==n.x?t.length/2-c/2:n.x*l,d=null==n.y?t.length/2-u/2:n.y*l,f=null;if(n.excavate){var p=Math.floor(h),m=Math.floor(d);f={x:p,y:m,w:Math.ceil(c+h-p),h:Math.ceil(u+d-m)}}return{x:h,y:d,h:u,w:c,excavation:f}}var k=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),_=function(e){function t(){var e,n;l(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return g(f(n=h(this,(e=d(t)).call.apply(e,[this].concat(i)))),"_canvas",void 0),g(f(n),"_image",void 0),g(f(n),"state",{imgLoaded:!1}),g(f(n),"handleImageLoad",(function(){n.setState({imgLoaded:!0})})),n}return p(t,e),u(t,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,i=e.bgColor,o=e.fgColor,a=e.includeMargin,s=e.imageSettings,l=new y(-1,b[r]);if(l.addData(x(t)),l.make(),null!=this._canvas){var c=this._canvas,u=c.getContext("2d");if(!u)return;var h=l.modules;if(null===h)return;var d=a?4:0,f=h.length+2*d,p=C(this.props,h);null!=s&&null!=p&&null!=p.excavation&&(h=S(h,p.excavation));var m=window.devicePixelRatio||1;c.height=c.width=n*m;var g=n/f*m;u.scale(g,g),u.fillStyle=i,u.fillRect(0,0,f,f),u.fillStyle=o,k?u.fill(new Path2D(E(h,d))):h.forEach((function(e,t){e.forEach((function(e,n){e&&u.fillRect(n+d,t+d,1,1)}))})),this.state.imgLoaded&&this._image&&null!=p&&u.drawImage(this._image,p.x+d,p.y+d,p.w,p.h)}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.value,t.size),r=(t.level,t.bgColor,t.fgColor,t.style),o=(t.includeMargin,t.imageSettings),l=s(t,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),c=a({height:n,width:n},r),u=null,h=o&&o.src;return null!=o&&null!=h&&(u=v.createElement("img",{src:h,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(t){return e._image=t}})),v.createElement(v.Fragment,null,v.createElement("canvas",i({style:c,height:n,width:n,ref:function(t){return e._canvas=t}},l)),u)}}]),t}(v.PureComponent);g(_,"defaultProps",w);var T=function(e){function t(){return l(this,t),h(this,d(t).apply(this,arguments))}return p(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,o=e.bgColor,a=e.fgColor,l=e.includeMargin,c=e.imageSettings,u=s(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),h=new y(-1,b[r]);h.addData(x(t)),h.make();var d=h.modules;if(null===d)return null;var f=l?4:0,p=d.length+2*f,m=C(this.props,d),g=null;null!=c&&null!=m&&(null!=m.excavation&&(d=S(d,m.excavation)),g=v.createElement("image",{xlinkHref:c.src,height:m.h,width:m.w,x:m.x+f,y:m.y+f,preserveAspectRatio:"none"}));var w=E(d,f);return v.createElement("svg",i({shapeRendering:"crispEdges",height:n,width:n,viewBox:"0 0 ".concat(p," ").concat(p)},u),v.createElement("path",{fill:o,d:"M0,0 h".concat(p,"v").concat(p,"H0z")}),v.createElement("path",{fill:a,d:w}),g)}}]),t}(v.PureComponent);g(T,"defaultProps",w);var O=function(e){var t=e.renderAs,n=s(e,["renderAs"]),r="svg"===t?T:_;return v.createElement(r,n)};O.defaultProps=a({renderAs:"canvas"},w),e.exports=O},Dgm7:
/*!********************************************!*\
!*** ./src/assets/images/account/auth.png ***!
\********************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/auth.ea067b42.png"},DlQD:
/*!*******************************************!*\
!*** ./node_modules/marked/lib/marked.js ***!
\*******************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=function(){"use strict";function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}var r=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){function t(){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}}e.exports={defaults:{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},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),i=(r.defaults,r.getDefaults,r.changeDefaults,/[&<>"']/),o=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},c=function(e){return l[e]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var d=/(^|[^\[])\^/g,f=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,m={},g=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(e,t){m[" "+e]||(g.test(e)?m[" "+e]=e+"/":m[" "+e]=x(e,"/",!0));var n=-1===(e=m[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(v,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(y,"$1")+t:e+t}function x(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i<r;){var o=e.charAt(r-i-1);if(o!==t||n){if(o===t||!n)break;i++}else i++}return e.substr(0,r-i)}var w=function(e,t){if(t){if(i.test(e))return e.replace(o,c)}else if(a.test(e))return e.replace(s,c);return e},E=h,S=function(e,t){e=e.source||e,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(d,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n},C=function(e,t,n){if(e){var r;try{r=decodeURIComponent(h(n)).replace(f,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!p.test(n)&&(n=b(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},k={exec:function(){}},_=function(e){for(var t,n,r=1;r<arguments.length;r++)for(n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},T=function(e,t){var n=e.replace(/\|/g,(function(e,t,n){for(var r=!1,i=t;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},O=x,A=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&--r<0)return i;return-1},L=function(e){e&&e.sanitize&&!e.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")},D=r.defaults,I=O,R=T,M=w,N=A;function j(e,t,n){var r=t.href,i=t.title?M(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:o}:{type:"image",raw:n,href:r,title:i,text:M(o)}}var P=function(){function e(e){this.options=e||D}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var r=t[t.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:I(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r<i;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(i=n.cells.length,r=0;r<i;r++)n.cells[r]=R(n.cells[r],n.header.length);return n}}},t.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},t.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var n,r,i,o,a,s,l,c=t[0],u=t[2],h=u.length>1,d=")"===u[u.length-1],f={type:"list",raw:c,ordered:h,start:h?+u.slice(0,-1):"",loose:!1,items:[]},p=t[0].match(this.rules.block.item),m=!1,g=p.length,v=0;v<g;v++)c=n=p[v],r=n.length,~(n=n.replace(/^ *([*+-]|\d+[.)]) */,"")).indexOf("\n ")&&(r-=n.length,n=this.options.pedantic?n.replace(/^ {1,4}/gm,""):n.replace(new RegExp("^ {1,"+r+"}","gm"),"")),v!==g-1&&(i=this.rules.block.bullet.exec(p[v+1])[0],(h?1===i.length||!d&&")"===i[i.length-1]:i.length>1||this.options.smartLists&&i!==u)&&(o=p.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-o.length),v=g-1)),a=m||/\n\n(?!\s*$)/.test(n),v!==g-1&&(m="\n"===n.charAt(n.length-1),a||(a=m)),a&&(f.loose=!0),l=void 0,(s=/^\[[ xX]\] /.test(n))&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:s,checked:l,loose:a,text:n});return f}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):M(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i=n.align.length;for(r=0;r<i;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(i=n.cells.length,r=0;r<i;r++)n.cells[r]=R(n.cells[r].replace(/^ *\| *| *\| *$/g,""),n.header.length);return n}}},t.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1]}},t.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t)return{type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1]}},t.text=function(e,t){var n=this.rules.block.text.exec(e);if(n){var r=t[t.length-1];return r&&"text"===r.type?{raw:n[0],text:n[0]}:{type:"text",raw:n[0],text:n[0]}}},t.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:M(t[1])}},t.tag=function(e,t,n){var r=this.rules.inline.tag.exec(e);if(r)return!t&&/^<a /i.test(r[0])?t=!0:t&&/^<\/a>/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):M(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=N(t[2],"()");if(n>-1){var r=(0===t[0].indexOf("!")?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,r).trim(),t[3]=""}var i=t[2],o="";if(this.options.pedantic){var a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a?(i=a[1],o=a[3]):o=""}else o=t[3]?t[3].slice(1,-1):"";return j(t,{href:(i=i.trim().replace(/^<([\s\S]*)>$/,"$1"))?i.replace(this.rules.inline._escapes,"$1"):i,title:o?o.replace(this.rules.inline._escapes,"$1"):o},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return j(n,r,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=M(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}},t.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=M(this.options.mangle?t(i[1]):i[1])):n=M(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=M(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=M(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r,i=this.rules.inline.text.exec(e);if(i)return r=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):M(i[0]):i[0]:M(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},e}(),B=k,F=S,U=_,H={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:B,table:B,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=F(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,H.item=F(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=F(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._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",H._comment=/<!--(?!-?>)[\s\S]*?-->/,H.html=F(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=F(H._paragraph).replace("hr",H.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",H._tag).getRegex(),H.blockquote=F(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=U({},H),H.gfm=U({},H.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*|$)"}),H.gfm.nptable=F(H.gfm.nptable).replace("hr",H.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",H._tag).getRegex(),H.gfm.table=F(H.gfm.table).replace("hr",H.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",H._tag).getRegex(),H.pedantic=U({},H.normal,{html:F("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._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:B,paragraph:F(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var z={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:B,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:B,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};z.punctuation=F(z.punctuation).replace(/punctuation/g,z._punctuation).getRegex(),z._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",z._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",z.em.start=F(z.em.start).replace(/punctuation/g,z._punctuation).getRegex(),z.em.middle=F(z.em.middle).replace(/punctuation/g,z._punctuation).replace(/overlapSkip/g,z._overlapSkip).getRegex(),z.em.endAst=F(z.em.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.em.endUnd=F(z.em.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.start=F(z.strong.start).replace(/punctuation/g,z._punctuation).getRegex(),z.strong.middle=F(z.strong.middle).replace(/punctuation/g,z._punctuation).replace(/blockSkip/g,z._blockSkip).getRegex(),z.strong.endAst=F(z.strong.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.endUnd=F(z.strong.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.blockSkip=F(z._blockSkip,"g").getRegex(),z.overlapSkip=F(z._overlapSkip,"g").getRegex(),z._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,z._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,z._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])?)+(?![-_])/,z.autolink=F(z.autolink).replace("scheme",z._scheme).replace("email",z._email).getRegex(),z._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,z.tag=F(z.tag).replace("comment",H._comment).replace("attribute",z._attribute).getRegex(),z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,z._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,z.link=F(z.link).replace("label",z._label).replace("href",z._href).replace("title",z._title).getRegex(),z.reflink=F(z.reflink).replace("label",z._label).getRegex(),z.reflinkSearch=F(z.reflinkSearch,"g").replace("reflink",z.reflink).replace("nolink",z.nolink).getRegex(),z.normal=U({},z),z.pedantic=U({},z.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:F(/^!?\[(label)\]\((.*?)\)/).replace("label",z._label).getRegex(),reflink:F(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z._label).getRegex()}),z.gfm=U({},z.normal,{escape:F(z.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),z.gfm.url=F(z.gfm.url,"i").replace("email",z.gfm._extended_email).getRegex(),z.breaks=U({},z.gfm,{br:F(z.br).replace("{2,}","*").getRegex(),text:F(z.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var G={block:H,inline:z},V=r.defaults,W=G.block,K=G.inline;function q(e){return e.replace(/---/g,"—").replace(/--/g,"").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1").replace(/'/g,"").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function X(e){var t,n,r="",i=e.length;for(t=0;t<i;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var Y=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||V,this.options.tokenizer=this.options.tokenizer||new P,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:W.normal,inline:K.normal};this.options.pedantic?(t.block=W.pedantic,t.inline=K.pedantic):this.options.gfm&&(t.block=W.gfm,this.options.breaks?t.inline=K.breaks:t.inline=K.gfm),this.tokenizer.rules=t}t.lex=function(e,n){return new t(n).lex(e)};var n,r,i,o=t.prototype;return o.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},o.blockTokens=function(e,t,n){var r,i,o,a;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((a=t[t.length-1]).raw+="\n"+r.raw,a.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),o=r.items.length,i=0;i<o;i++)r.items[i].tokens=this.blockTokens(r.items[i].text,[],!1);t.push(r)}else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.def(e)))e=e.substring(r.raw.length),this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.paragraph(e)))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.text(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((a=t[t.length-1]).raw+="\n"+r.raw,a.text+="\n"+r.text);else if(e){var s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}throw new Error(s)}return t},o.inline=function(e){var t,n,r,i,o,a,s=e.length;for(t=0;t<s;t++)switch((a=e[t]).type){case"paragraph":case"text":case"heading":a.tokens=[],this.inlineTokens(a.text,a.tokens);break;case"table":for(a.tokens={header:[],cells:[]},i=a.header.length,n=0;n<i;n++)a.tokens.header[n]=[],this.inlineTokens(a.header[n],a.tokens.header[n]);for(i=a.cells.length,n=0;n<i;n++)for(o=a.cells[n],a.tokens.cells[n]=[],r=0;r<o.length;r++)a.tokens.cells[n][r]=[],this.inlineTokens(o[r],a.tokens.cells[n][r]);break;case"blockquote":this.inline(a.tokens);break;case"list":for(i=a.items.length,n=0;n<i;n++)this.inline(a.items[n].tokens)}return e},o.inlineTokens=function(e,t,n,r,i){var o;void 0===t&&(t=[]),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===i&&(i="");var a,s=e;if(this.tokens.links){var l=Object.keys(this.tokens.links);if(l.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(s));)l.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(o=this.tokenizer.escape(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.tag(e,n,r))e=e.substring(o.raw.length),n=o.inLink,r=o.inRawBlock,t.push(o);else if(o=this.tokenizer.link(e))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,r)),t.push(o);else if(o=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,r)),t.push(o);else if(o=this.tokenizer.strong(e,s,i))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.em(e,s,i))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.codespan(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.br(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.del(e))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.autolink(e,X))e=e.substring(o.raw.length),t.push(o);else if(n||!(o=this.tokenizer.url(e,X))){if(o=this.tokenizer.inlineText(e,r,q))e=e.substring(o.raw.length),i=o.raw.slice(-1),t.push(o);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(o.raw.length),t.push(o);return t},n=t,i=[{key:"rules",get:function(){return{block:W,inline:K}}}],(r=null)&&e(n.prototype,r),i&&e(n,i),t}(),$=r.defaults,J=C,Z=w,Q=function(){function e(e){this.options=e||$}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?'<pre><code class="'+this.options.langPrefix+Z(r,!0)+'">'+(n?e:Z(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:Z(e,!0))+"</code></pre>\n"},t.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},t.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},t.listitem=function(e){return"<li>"+e+"</li>\n"},t.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},t.paragraph=function(e){return"<p>"+e+"</p>\n"},t.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},t.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},t.strong=function(e){return"<strong>"+e+"</strong>"},t.em=function(e){return"<em>"+e+"</em>"},t.codespan=function(e){return"<code>"+e+"</code>"},t.br=function(){return this.options.xhtml?"<br/>":"<br>"},t.del=function(e){return"<del>"+e+"</del>"},t.link=function(e,t,n){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<a href="'+Z(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"},t.image=function(e,t,n){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},t.text=function(e){return e},e}(),ee=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),te=function(){function e(){this.seen={}}return e.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},e}(),ne=r.defaults,re=E,ie=function(){function e(e){this.options=e||ne,this.options.renderer=this.options.renderer||new Q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ee,this.slugger=new te}e.parse=function(t,n){return new e(n).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,o,a,s,l,c,u,h,d,f,p,m,g,v,y,b,x="",w=e.length;for(n=0;n<w;n++)switch((h=e[n]).type){case"space":continue;case"hr":x+=this.renderer.hr();continue;case"heading":x+=this.renderer.heading(this.parseInline(h.tokens),h.depth,re(this.parseInline(h.tokens,this.textRenderer)),this.slugger);continue;case"code":x+=this.renderer.code(h.text,h.lang,h.escaped);continue;case"table":for(c="",l="",o=h.header.length,r=0;r<o;r++)l+=this.renderer.tablecell(this.parseInline(h.tokens.header[r]),{header:!0,align:h.align[r]});for(c+=this.renderer.tablerow(l),u="",o=h.cells.length,r=0;r<o;r++){for(l="",a=(s=h.tokens.cells[r]).length,i=0;i<a;i++)l+=this.renderer.tablecell(this.parseInline(s[i]),{header:!1,align:h.align[i]});u+=this.renderer.tablerow(l)}x+=this.renderer.table(c,u);continue;case"blockquote":u=this.parse(h.tokens),x+=this.renderer.blockquote(u);continue;case"list":for(d=h.ordered,f=h.start,p=h.loose,o=h.items.length,u="",r=0;r<o;r++)v=(g=h.items[r]).checked,y=g.task,m="",g.task&&(b=this.renderer.checkbox(v),p?g.tokens.length>0&&"text"===g.tokens[0].type?(g.tokens[0].text=b+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=b+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:b}):m+=b),m+=this.parse(g.tokens,p),u+=this.renderer.listitem(m,y,v);x+=this.renderer.list(u,d,f);continue;case"html":x+=this.renderer.html(h.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;n+1<w&&"text"===e[n+1].type;)u+="\n"+((h=e[++n]).tokens?this.parseInline(h.tokens):h.text);x+=t?this.renderer.paragraph(u):u;continue;default:var E='Token with "'+h.type+'" type was not found.';if(this.options.silent)return void console.error(E);throw new Error(E)}return x},t.parseInline=function(e,t){t=t||this.renderer;var n,r,i="",o=e.length;for(n=0;n<o;n++)switch((r=e[n]).type){case"escape":i+=t.text(r.text);break;case"html":i+=t.html(r.text);break;case"link":i+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break;case"image":i+=t.image(r.href,r.title,r.text);break;case"strong":i+=t.strong(this.parseInline(r.tokens,t));break;case"em":i+=t.em(this.parseInline(r.tokens,t));break;case"codespan":i+=t.codespan(r.text);break;case"br":i+=t.br();break;case"del":i+=t.del(this.parseInline(r.tokens,t));break;case"text":i+=t.text(r.text);break;default:var a='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(a);throw new Error(a)}return i},e}(),oe=_,ae=L,se=w,le=r.getDefaults,ce=r.changeDefaults,ue=r.defaults;function he(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(n=t,t=null),t=oe({},he.defaults,t||{}),ae(t),n){var r,i=t.highlight;try{r=Y.lex(e,t)}catch(e){return n(e)}var o=function(e){var o;if(!e)try{o=ie.parse(r,t)}catch(t){e=t}return t.highlight=i,e?n(e):n(null,o)};if(!i||i.length<3)return o();if(delete t.highlight,!r.length)return o();var a=0;return he.walkTokens(r,(function(e){"code"===e.type&&(a++,setTimeout((function(){i(e.text,e.lang,(function(t,n){if(t)return o(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),0==--a&&o()}))}),0))})),void(0===a&&o())}try{var s=Y.lex(e,t);return t.walkTokens&&he.walkTokens(s,t.walkTokens),ie.parse(s,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+se(e.message+"",!0)+"</pre>";throw e}}return he.options=he.setOptions=function(e){return oe(he.defaults,e),ce(he.defaults),he},he.getDefaults=le,he.defaults=ue,he.use=function(e){var t=oe({},e);if(e.renderer&&function(){var n=he.defaults.renderer||new Q,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=e.renderer[t].apply(n,o);return!1===s&&(s=r.apply(n,o)),s}};for(var i in e.renderer)r(i);t.renderer=n}(),e.tokenizer&&function(){var n=he.defaults.tokenizer||new P,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=e.tokenizer[t].apply(n,o);return!1===s&&(s=r.apply(n,o)),s}};for(var i in e.tokenizer)r(i);t.tokenizer=n}(),e.walkTokens){var n=he.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens(t),n&&n(t)}}he.setOptions(t)},he.walkTokens=function(e,t){for(var r,i=n(e);!(r=i()).done;){var o=r.value;switch(t(o),o.type){case"table":for(var a,s=n(o.tokens.header);!(a=s()).done;){var l=a.value;he.walkTokens(l,t)}for(var c,u=n(o.tokens.cells);!(c=u()).done;)for(var h,d=n(c.value);!(h=d()).done;){var f=h.value;he.walkTokens(f,t)}break;case"list":he.walkTokens(o.items,t);break;default:o.tokens&&he.walkTokens(o.tokens,t)}}},he.Parser=ie,he.parser=ie.parse,he.Renderer=Q,he.TextRenderer=ee,he.Lexer=Y,he.lexer=Y.lex,he.Tokenizer=P,he.Slugger=te,he.parse=he,he}()},E4JC:
/*!******************************************!*\
!*** ./node_modules/crypto-js/rabbit.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./enc-base64 */"ETIr"),n(/*! ./md5 */"cv67"),n(/*! ./evpkdf */"K3mO"),n(/*! ./cipher-core */"OLod"),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=c>>>16|4294901760&u,d=u<<16|65535&c;for(i[0]^=c,i[1]^=h,i[2]^=u,i[3]^=d,i[4]^=c,i[5]^=h,i[6]^=u,i[7]^=d,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),r.Rabbit)},ELLl:
/*!*************************************************************!*\
!*** ./node_modules/codemirror/addon/edit/closebrackets.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,a){a&&a!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:function(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=r(i,"pairs"),a=t.listSelections(),c=0;c<a.length;c++){if(!a[c].empty())return e.Pass;var u=l(t,a[c].head);if(!u||o.indexOf(u)%2!=0)return e.Pass}for(c=a.length-1;c>=0;c--){var h=a[c].head;t.replaceRange("",n(h.line,h.ch-1),n(h.line,h.ch+1),"+delete")}},Enter:function(t){var n=s(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),a=0;a<o.length;a++){if(!o[a].empty())return e.Pass;var c=l(t,o[a].head);if(!c||i.indexOf(c)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),t.execCommand("goCharLeft"),o=t.listSelections();for(var n=0;n<o.length;n++){var r=o[n].head.line;t.indentLine(r,null,!0),t.indentLine(r+1,null,!0)}}))}};function o(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r="'"+n+"'";i[r]||(i[r]=a(n))}}function a(t){return function(i){return function(t,i){var o=s(t);if(!o||t.getOption("disableInput"))return e.Pass;var a=r(o,"pairs"),l=a.indexOf(i);if(-1==l)return e.Pass;for(var u,h=r(o,"closeBefore"),d=r(o,"triples"),f=a.charAt(l+1)==i,p=t.listSelections(),m=l%2==0,g=0;g<p.length;g++){var v,y=p[g],b=y.head,x=t.getRange(b,n(b.line,b.ch+1));if(m&&!y.empty())v="surround";else if(!f&&m||x!=i)if(f&&b.ch>1&&d.indexOf(i)>=0&&t.getRange(n(b.line,b.ch-2),b)==i+i){if(b.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(b.line,b.ch-2))))return e.Pass;v="addFour"}else if(f){var w=0==b.ch?" ":t.getRange(n(b.line,b.ch-1),b);if(e.isWordChar(x)||w==i||e.isWordChar(w))return e.Pass;v="both"}else{if(!m||!(0===x.length||/\s/.test(x)||h.indexOf(x)>-1))return e.Pass;v="both"}else v=f&&c(t,b)?"both":d.indexOf(i)>=0&&t.getRange(b,n(b.line,b.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=v)return e.Pass}else u=v}var E=l%2?a.charAt(l-1):i,S=l%2?i:a.charAt(l+1);t.operation((function(){if("skip"==u)t.execCommand("goCharRight");else if("skipThree"==u)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==u){var i=t.getSelections();for(r=0;r<i.length;r++)i[r]=E+i[r]+S;for(t.replaceSelections(i,"around"),i=t.listSelections().slice(),r=0;r<i.length;r++)i[r]=(o=i[r],a=void 0,a=e.cmpPos(o.anchor,o.head)>0,{anchor:new n(o.anchor.line,o.anchor.ch+(a?-1:1)),head:new n(o.head.line,o.head.ch+(a?1:-1))});t.setSelections(i)}else"both"==u?(t.replaceSelection(E+S,null),t.triggerElectric(E+S),t.execCommand("goCharLeft")):"addFour"==u&&(t.replaceSelection(E+E+E+E,"before"),t.execCommand("goCharRight"));var o,a}))}(i,t)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function c(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}o(t.pairs+"`")}(n(/*! ../../lib/codemirror */"VrN/"))},ELcG:
/*!*********************************************!*\
!*** ./node_modules/crypto-js/ripemd160.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),
/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=i.create([0,1518500249,1859775393,2400959708,2840853838]),d=i.create([1352829926,1548603684,1836072691,2053994217,0]),f=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,a,f,x,w,E,S,C,k,_,T,O=this._hash.words,A=h.words,L=d.words,D=s.words,I=l.words,R=c.words,M=u.words;for(E=o=O[0],S=a=O[1],C=f=O[2],k=x=O[3],_=w=O[4],n=0;n<80;n+=1)T=o+e[t+D[n]]|0,T+=n<16?p(a,f,x)+A[0]:n<32?m(a,f,x)+A[1]:n<48?g(a,f,x)+A[2]:n<64?v(a,f,x)+A[3]:y(a,f,x)+A[4],T=(T=b(T|=0,R[n]))+w|0,o=w,w=x,x=b(f,10),f=a,a=T,T=E+e[t+I[n]]|0,T+=n<16?y(S,C,k)+L[0]:n<32?v(S,C,k)+L[1]:n<48?g(S,C,k)+L[2]:n<64?m(S,C,k)+L[3]:p(S,C,k)+L[4],T=(T=b(T|=0,M[n]))+_|0,E=_,_=k,k=b(C,10),C=S,S=T;T=O[1]+f+k|0,O[1]=O[2]+x+_|0,O[2]=O[3]+w+E|0,O[3]=O[4]+o+S|0,O[4]=O[0]+a+C|0,O[0]=T},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,n){return e^t^n}function m(e,t,n){return e&t|~e&n}function g(e,t,n){return(e|~t)^n}function v(e,t,n){return e&n|t&~n}function y(e,t,n){return e^(t|~n)}function b(e,t){return e<<t|e>>>32-t}t.RIPEMD160=o._createHelper(f),t.HmacRIPEMD160=o._createHmacHelper(f)}(Math),r.RIPEMD160)},ETIr:
/*!**********************************************!*\
!*** ./node_modules/crypto-js/enc-base64.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o;e.exports=(o=n(/*! ./core */"Ib8C"),i=(r=o).lib.WordArray,r.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var a=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<n;s++)i.push(r.charAt(a>>>6*(3-s)&63));var l=r.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o<n.length;o++)r[n.charCodeAt(o)]=o}var a=n.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return function(e,t,n){for(var r=[],o=0,a=0;a<t;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2,l=n[e.charCodeAt(a)]>>>6-a%4*2,c=s|l;r[o>>>2]|=c<<24-o%4*8,o++}return i.create(r,o)}(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},o.enc.Base64)},"F+F2":
/*!***************************************************!*\
!*** ./node_modules/crypto-js/lib-typedarrays.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),function(){if("function"==typeof ArrayBuffer){var e=r.lib.WordArray,t=e.init;(e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var n=e.byteLength,r=[],i=0;i<n;i++)r[i>>>2]|=e[i]<<24-i%4*8;t.call(this,r,n)}else t.apply(this,arguments)}).prototype=e}}(),r.lib.WordArray)},GRO8:
/*!**************************************************************!*\
!*** ./src/pages/Competitions/Detail/index.tsx + 21 modules ***!
\**************************************************************/
/*! exports provided: default */
/*! all exports used */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CheckCircleFilled.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/LeftOutlined.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/RightOutlined.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Detail/component/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Detail/components/AppplyDepartmentModal/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Detail/components/AppplySchoolModal/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Detail/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/AuthenticationModel/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/UploadFile/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Entered/Enteredmodel/Addteams.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Entered/Enteredmodel/JoinModel.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/service/competitions.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/authority.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/cityData.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/verifyLogin.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/account/auth.png (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/account/job.png (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/auto-complete/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/auto-complete/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/card/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/card/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/carousel/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/carousel/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/cascader/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/cascader/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/md5/md5.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/moment/moment.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router-dom/esm/react-router-dom.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.r(t);var r=n("k1fw"),i=(n("2qtc"),n("kLXV")),o=(n("lUTK"),n("BvKs")),a=(n("+L6B"),n("2/Rp")),s=(n("T2oS"),n("W9HT")),l=(n("sPJy"),n("bE4q")),c=(n("miYZ"),n("tsqr")),u=n("9og8"),h=n("tJVT"),d=n("PpiC"),f=n("WmNS"),p=n.n(f),m=n("q1tI"),g=n.n(m),v=n("Ty5D"),y=n("55Ip"),b=n("9kvl"),x=n("KeDT"),w=n.n(x),E=n("zrhs"),S=(n("DZo9"),n("8z0m")),C=n("LtfV"),k=n("KhGG"),_=S.a.Dragger,T=Object(b.a)((function(e){return{user:e.user,classroomList:e.classroomList,shixunsDetail:e.shixunsDetail}}))((function(e){var t=e.user,n=e.dispatch,r=(e.classroomList,e.shixunsDetail),o=e.getResults,a=(Object(v.i)(),Object(m.useState)()),s=Object(h.a)(a,2),l=(s[0],s[1],Object(m.useState)([])),d=Object(h.a)(l,2),f=d[0],y=d[1],b=Object(m.useState)(!1),x=Object(h.a)(b,2),w=x[0],E=x[1],S={onRemove:function(){y([])},beforeUpload:function(e){if(console.log(e),(null==e?void 0:e.size)>524288e3)return c.b.info("文件超过500M不符合上传要求"),!1;var t=[];return t.push(e),y([].concat(t)),!1},fileList:f};return g.a.createElement(i.a,{title:"提交文件",visible:"md-tab"===r.actionTabs.key,confirmLoading:w,onOk:Object(u.a)(p.a.mark((function e(){var i,a,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==f?void 0:f.length)<=0)){e.next=3;break}return c.b.info("请先选择文件"),e.abrupt("return");case 3:return E(!0),e.next=6,Object(k.c)(f[0],{login:null===(i=t.userInfo)||void 0===i?void 0:i.login,container_type:"Competition",container_id:r.actionTabs.params.id,stage_type:r.actionTabs.params.value,file_name:null===(a=f[0])||void 0===a?void 0:a.name});case 6:0===(null==(s=e.sent)?void 0:s.status)?(c.b.info("提交成功"),n({type:"shixunsDetail/setActionTabs",payload:{key:""}}),E(!1),y([]),o(r.actionTabs.params.value)):(E(!1),c.b.info("提交失败"));case 8:case"end":return e.stop()}}),e)}))),onCancel:function(){y([]),n({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},g.a.createElement(_,S,g.a.createElement("p",{className:"ant-upload-drag-icon"},g.a.createElement(C.a,null)),g.a.createElement("p",{className:"ant-upload-hint"},"拖拽文件或者点击上传")))})),O=(n("14J3"),n("BMrR")),A=(n("5NDa"),n("5rEg")),L=n("9Bee"),D=n("m3rI"),I=n("ErOA"),R=n("NLgs"),M=(n("fV52"),n("3I+P")),N=(n("OaEy"),n("2fM7")),j=n("5bA4"),P=n("UESt"),B=N.a.Option;var F=function(e){var t=e.rewarddata,n=e.getlistdatas,r=e.is_signed,o=e.dispatch,a=e.userlist,s=Object(m.useRef)(null),l=Object(m.useState)(!1),d=Object(h.a)(l,2),f=d[0],v=d[1],y=Object(m.useState)(void 0),b=Object(h.a)(y,2),x=b[0],E=b[1],S=Object(m.useState)(""),C=Object(h.a)(S,2),k=C[0],_=C[1],T=Object(m.useState)(void 0),O=Object(h.a)(T,2),L=O[0],I=O[1],F=Object(m.useState)(void 0),U=Object(h.a)(F,2),H=U[0],z=U[1],G=Object(m.useState)(void 0),V=Object(h.a)(G,2),W=V[0],K=V[1];function q(e){return X.apply(this,arguments)}function X(){return(X=Object(u.a)(p.a.mark((function e(t){var i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.user_received){e.next=3;break}return window.open(t.click_info),e.abrupt("return");case 3:if(Object(R.f)(o)){e.next=5;break}return e.abrupt("return");case 5:if(!1!==r){e.next=8;break}return c.b.info("您尚未报名参赛,请报名参赛后领取"),e.abrupt("return");case 8:if("Pop"!==t.click_event){e.next=14;break}return _(t.id),v(!0),e.abrupt("return");case 14:E(void 0);case 15:return e.next=17,o({type:"competitions/Reward",payload:{competition_module_setting_id:t.id}});case 17:(i=e.sent)&&0===i.status&&(n(),"Link"===t.click_event?(c.b.info("领取成功"),window.open(t.click_info)):c.b.info(t.click_info));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(){return(Y=Object(u.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a||a.real_name){e.next=4;break}if(L){e.next=4;break}return c.b.info("姓名不能为空"),e.abrupt("return");case 4:if(!a||a.email){e.next=8;break}if(H){e.next=8;break}return c.b.info("邮箱不能为空"),e.abrupt("return");case 8:if(!a||a.phone){e.next=12;break}if(W){e.next=12;break}return c.b.info("手机号码不能为空"),e.abrupt("return");case 12:if(x){e.next=15;break}return c.b.info("请选择你的年级"),e.abrupt("return");case 15:return e.next=17,o({type:"competitions/Reward",payload:{competition_module_setting_id:k,className:x,name:L,mail:H,phone:W}});case 17:(t=e.sent)&&0===t.status&&(v(!1),n(),c.b.info("HCIA认证考试代金劵将由Educoder平台统一发放请及时关注邮箱或站内短信查收"));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return g.a.createElement("div",null,g.a.createElement(i.a,{visible:f,title:"完善信息",onCancel:function(){return v(!1)},onOk:function(){!function(){Y.apply(this,arguments)}()}},g.a.createElement("p",null,"您的姓名:",g.a.createElement(A.a,{className:a&&a.real_name?"":w.a.bkfff,style:{width:"300px",marginLeft:"14px",background:a&&a.phone?"":"#ffffff!important"},value:a&&a.real_name||L,disabled:a&&a.real_name||!1,onChange:function(e){return I(e.target.value)}})),g.a.createElement("p",{style:{marginTop:"1em"}},"您的邮箱:",g.a.createElement(A.a,{className:a&&a.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:a&&a.phone?"":"#ffffff!important"},value:a&&a.email||H,disabled:a&&a.email||!1,onChange:function(e){return z(e.target.value)}})),g.a.createElement("p",{style:{marginTop:"1em"}},"您的手机号:",g.a.createElement(A.a,{style:{width:"300px"},className:a&&a.phone?"":"bkfff",value:a&&a.phone||W,disabled:a&&a.phone||!1,onChange:function(e){return K(e.target.value)}})),"您的年级:",g.a.createElement(N.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(e){E(e)}},g.a.createElement(B,{value:"大一"},"大一"),g.a.createElement(B,{value:"大二"},"大二"),g.a.createElement(B,{value:"大三"},"大三"),g.a.createElement(B,{value:"大四"},"大四"),g.a.createElement(B,{value:"大五"},"大五"),g.a.createElement(B,{value:"硕一"},"硕一"),g.a.createElement(B,{value:"硕二"},"硕二"),g.a.createElement(B,{value:"硕三"},"硕三"),g.a.createElement(B,{value:"博一"},"博一"),g.a.createElement(B,{value:"博二"},"博二"),g.a.createElement(B,{value:"博三"},"博三"),g.a.createElement(B,{value:"博四"},"博四"),g.a.createElement(B,{value:"博五"},"博五")),g.a.createElement("p",{style:{marginTop:"1em"}},"提醒:如无华为云账号,请尽快注册华为云!")),t&&t.length>3?g.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},g.a.createElement("span",{className:w.a.spanprev,onClick:function(){s.current.prev()}},g.a.createElement(j.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),g.a.createElement(M.a,{ref:s,className:w.a.divwidth,slidesToShow:3,slidesToScroll:1},t&&t.map((function(e,t){return g.a.createElement("div",{style:{textAlign:"center",position:"relative"}},g.a.createElement("img",{src:D.a.IMG_SERVER+"/".concat(e.image_url)}),!1===e.user_received||"Link"===e.click_event?g.a.createElement("p",{className:w.a.receiveclick,onClick:function(){return q(e)}},"点击领取"):g.a.createElement("p",{className:w.a.receivealready},"已经领取"))}))),g.a.createElement("span",{className:w.a.spannext,onClick:function(){s.current.next()}},g.a.createElement(P.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):g.a.createElement("div",{className:w.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},t&&t.map((function(e,t){return g.a.createElement("div",{style:{textAlign:"center",position:"relative"}},g.a.createElement("img",{src:D.a.IMG_SERVER+"/".concat(e.image_url)}),!1===e.user_received||"Link"===e.click_event?g.a.createElement("p",{className:w.a.receiveclick,onClick:function(){return q(e)}},"点击领取"):g.a.createElement("p",{className:w.a.receivealready},"已经领取"))}))))},U=function(e,t){var n=e.StaffDetail,o=e.HeaderDetail,s=e.ItemData,l=e.setIssee,d=e.ModelType,f=e.dispatch,y=e.userinfo,b=e.Editable,x=Object(m.useState)(!1),w=Object(h.a)(x,2),E=w[0],C=w[1],k=Object(m.useState)([]),_=Object(h.a)(k,2),T=_[0],M=_[1],N=Object(m.useState)(""),j=Object(h.a)(N,2),P=j[0],B=j[1],U=Object(m.useState)(""),H=Object(h.a)(U,2),z=H[0],G=H[1],V=Object(m.useState)(!1),W=Object(h.a)(V,2),K=W[0],q=W[1],X=Object(v.i)().identifier,Y=Object(m.useRef)(null),$=Object(m.useRef)(null);Y.current=null==n?void 0:n.enrolled,Object(m.useEffect)((function(){var e;return null===(e=$.current)||void 0===e||e.addEventListener("click",J),function(){var e;null===(e=$.current)||void 0===e||e.removeEventListener("click",J)}}),[]);var J=function(e){var t;if("modal-upload"===(null==e||null===(t=e.target)||void 0===t?void 0:t.id)){if(!Object(R.e)(f))return;if(!Y.current)return void i.a.info({title:"提示",centered:!0,okText:"我知道了",content:"请先报名,再提交作品"});C(!0)}};Object(m.useEffect)((function(){var e,t,n;null!=o&&o.upload_file&&(M([{name:null==o||null===(e=o.upload_file)||void 0===e?void 0:e.title,status:"done",uid:"123456789"}]),G(null==o?void 0:o.upload_file_url),B(null==o||null===(t=o.upload_file)||void 0===t||null===(n=t.url)||void 0===n?void 0:n.split("/")[3]))}),[null==o?void 0:o.upload_file]);var Z={name:"file",multiple:!1,withCredentials:!0,action:D.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:T,onChange:function(e){var t,n,i=e.file.status,o=[Object(r.a)({},e.file)];(M(o),"uploading"===e.file.status&&q(!0),"done"===i)&&(B(null===(t=o[0])||void 0===t||null===(n=t.response)||void 0===n?void 0:n.id),q(!1));"error"===i&&(M([]),q(!1))},beforeUpload:function(e){return e.size/1024/1024<1e3?Promise.resolve():(c.b.info("文件大小必须小于1000MB"),Promise.reject())}},Q=function(){C(!0)};return Object(m.useImperativeHandle)(t,(function(){return{handleVisible:Q}})),g.a.createElement("div",{ref:$},"reward"===d?g.a.createElement(F,{userlist:y,dispatch:f,rewarddata:s.reward_setting,is_signed:s.is_signed}):null,g.a.createElement("div",{style:{textAlign:"right"}},((null==y?void 0:y.admin)||(null==y?void 0:y.business)||b)&&g.a.createElement(a.a,{onClick:function(){return l(!1)}},"编辑")),g.a.createElement(L.a,{value:s.md_content}),s&&s.attachments&&s.attachments.map((function(e,t){return g.a.createElement("div",null,g.a.createElement("a",{href:(null===D.a||void 0===D.a?void 0:D.a.API_SERVER)+e.url,target:"_self",download:e.title},g.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),g.a.createElement("span",{style:{color:"#000000"}},e.title),g.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},e.filesize)))})),g.a.createElement(i.a,{centered:!0,title:"上传作品",visible:E,okText:"提交作品",cancelText:"取消",confirmLoading:K,onCancel:function(){return C(!1)},onOk:Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(P||z){e.next=3;break}return C(!1),e.abrupt("return");case 3:return q(!0),e.next=6,Object(I.a)("/api/competitions/".concat(X,"/upload_file.json"),{method:"post",body:{attachment_id:P,upload_file_url:z}});case 6:0===e.sent.status&&(C(!1),q(!1));case 8:case"end":return e.stop()}}),e)})))},g.a.createElement("div",null,g.a.createElement(O.a,{align:"middle",className:"mb20"},g.a.createElement("span",null,"作品链接:"),g.a.createElement(A.a,{style:{width:416},value:z,onChange:function(e){var t;return G(null===(t=e.target)||void 0===t?void 0:t.value)}})),g.a.createElement(O.a,{align:"top"},g.a.createElement("span",{style:{lineHeight:"28px"}},"作品文件:"),g.a.createElement(S.a,Z,g.a.createElement(a.a,{type:"primary",className:"mb10"},"上传作品"))))))},H=Object(m.forwardRef)(U),z=n("Ot1p"),G=n("hJwl");var V=function(e){var t=e.ItemData,n=e.setIssee,r=e.MenuItem,i=e.dispatch,o=e.identifier,s=e.ModelType,l=e.userinfo,d=e.getrightdatas,f=Object(m.useState)([]),v=Object(h.a)(f,2),y=v[0],b=v[1],x=Object(m.useState)(t.md_content),w=Object(h.a)(x,2),E=w[0],C=w[1];Object(m.useEffect)((function(){var e,n=[];null==t||null===(e=t.attachments)||void 0===e||e.map((function(e){var t={uid:e.id,name:e.title,response:{id:e.id}};n.push(t)})),b(n)}),[null==t?void 0:t.attachments]);var k={name:"file",multiple:!0,withCredentials:!0,action:D.a.API_SERVER+"/api/attachments.json",defaultFileList:function(){var e,n=[];return null==t||null===(e=t.attachments)||void 0===e||e.map((function(e){var t={uid:null==e?void 0:e.id,name:e.title,response:{id:e.id}};n.push(t)})),n}(),onRemove:function(e){Object(G.t)({id:e.uid})},onChange:function(e){var t=e.file.status;"removed"===t&&b(e.fileList),"done"===t?(b(e.fileList),c.b.success("".concat(e.file.name," 文件上传成功"))):"error"===t&&c.b.error("".concat(e.file.name," 文件上传失败"))},beforeUpload:function(e){var t=e.size/1024/1024<150;return t||c.b.info("文件大小必须小于150MB"),t}};function _(){return(_=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"competitions/updateMdContent",payload:{attachment_ids:T(y),competition_module_id:t.id,md_content_id:t.md_id,content:E,identifier:o}});case 2:e.sent&&(c.b.info("提交成功"),n(!0),d(r));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){var t=[];return e&&e.map((function(e){t.push(e.response.id)})),t}return console.log(k),g.a.createElement("div",null,"reward"===s?g.a.createElement(F,{userlist:l,dispatch:i,rewarddata:t.reward_setting,is_signed:t.is_signed}):null,g.a.createElement(z.a,{defaultValue:E,onChange:function(e){return C(e)}}),g.a.createElement(S.a,k,g.a.createElement(a.a,{className:"uploadBtn"},"上传附件"),"(单个文件150M以内)"),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(a.a,{style:{width:"90px"},type:"primary",onClick:function(){return function(){return _.apply(this,arguments)}()}},"提交"),g.a.createElement(a.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return n(!0)}},"取消")))},W=(n("g9YV"),n("wCAj")),K=(n("Znn+"),n("ZTPi"));var q=function(){return g.a.createElement("div",null,g.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"总排行"),g.a.createElement("div",{style:{textAlign:"center"}},g.a.createElement("img",{src:D.a.IMG_SERVER+"/images/educoder/competitions/trophy.png"}),g.a.createElement("p",null,"要抓住一切机会,向所有人证明自己,证明你能够迎接荣耀")))},X=(n("5Dmo"),n("3S7+")),Y=(n("jCWc"),n("kPKH")),$=(n("IzEo"),n("bx4M"));var J=function(e){var t=e.oneItem,n=e.towItem,r=e.threeItem;return g.a.createElement("div",{style:{textAlign:"center"}},g.a.createElement(O.a,{gutter:16,style:{justifyContent:"center"}},g.a.createElement(Y.a,{span:6,style:{marginTop:"30px",marginRight:"20px"}},g.a.createElement($.a,{title:g.a.createElement("div",{className:w.a.towtop},g.a.createElement("img",{style:{marginTop:"20px"},src:D.a.IMG_SERVER+"/images/educoder/huangguan-two.png"}),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(y.a,{to:"/users/".concat(null==n?void 0:n.user_login,"/classrooms")},g.a.createElement("img",{className:w.a.imgradius,src:D.a.IMG_SERVER+"/images/".concat(null==n?void 0:n.user_image)}),(null==n?void 0:n.competition_prize)&&g.a.createElement("p",{className:w.a.prize},null==n?void 0:n.competition_prize),g.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},null==n?void 0:n.record_user_name)))),className:w.a.towdiv,bordered:!1},g.a.createElement("p",{style:{fontSize:"14px"}},null==n?void 0:n.school_name),g.a.createElement("p",{style:{fontSize:"18px"}},null==n?void 0:n.spend_time),g.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(null==n?void 0:n.extra_score)+parseFloat(null==n?void 0:n.score),"分"))),g.a.createElement(Y.a,{span:6},g.a.createElement($.a,{title:g.a.createElement("div",{className:w.a.onetop},g.a.createElement("img",{style:{marginTop:"20px"},src:D.a.IMG_SERVER+"/images/educoder/huangguan.png"}),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(y.a,{to:"/users/".concat(null==t?void 0:t.user_login,"/classrooms")},g.a.createElement("img",{className:w.a.imgradius,src:D.a.IMG_SERVER+"/images/".concat(null==t?void 0:t.user_image)}),(null==t?void 0:t.competition_prize)&&g.a.createElement("p",{className:w.a.prize},null==t?void 0:t.competition_prize),g.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},null==t?void 0:t.record_user_name)))),className:w.a.onediv,bordered:!1},g.a.createElement("p",{style:{fontSize:"14px"}},null==t?void 0:t.school_name),g.a.createElement("p",{style:{fontSize:"18px"}},null==t?void 0:t.spend_time),g.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(null==t?void 0:t.extra_score)+parseFloat(null==t?void 0:t.score),"分"))),g.a.createElement(Y.a,{span:6,style:{marginTop:"40px",marginLeft:"20px"}},g.a.createElement($.a,{title:g.a.createElement("div",{className:w.a.threetop},g.a.createElement("img",{style:{marginTop:"20px"},src:D.a.IMG_SERVER+"/images/educoder/huangguan-three.png"}),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(y.a,{to:"/users/".concat(null==r?void 0:r.user_login,"/classrooms")},g.a.createElement("img",{className:w.a.imgradius,src:D.a.IMG_SERVER+"/images/".concat(null==r?void 0:r.user_image)}),(null==r?void 0:r.competition_prize)&&g.a.createElement("p",{className:w.a.prize},null==r?void 0:r.competition_prize),g.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},null==r?void 0:r.record_user_name)))),className:w.a.threediv,bordered:!1},g.a.createElement("p",{style:{fontSize:"14px"}},null==r?void 0:r.school_name),g.a.createElement("p",{style:{fontSize:"18px"}},null==r?void 0:r.spend_time),g.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(null==r?void 0:r.extra_score)+parseFloat(null==r?void 0:r.score),"分")))))};var Z=function(e){var t,n,r,i,o,a,s,l,c,u,h,d,f,p,m,v,b,x,E,S,C,k,_,T,O,A,L,I,R,M,N=e.ItemData;return g.a.createElement("div",null,g.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"总排行"),g.a.createElement(J,{oneItem:null==N?void 0:N.teams[0],towItem:null==N?void 0:N.teams[1],threeItem:null==N?void 0:N.teams[2]}),(null==N||null===(t=N.user_ranks)||void 0===t?void 0:t.length)>0&&g.a.createElement("div",{className:w.a.myTeam},!1===(null==N||null===(n=N.user_ranks)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.success)?g.a.createElement("span",{style:{marginRight:"70px",padding:"10px"}},g.a.createElement("p",{style:{marginBottom:"0px"}}," 是否晋级:",g.a.createElement("span",{style:{color:!1===(null==N||null===(i=N.user_ranks)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.success)?"red":"green"}},!1===(null==N||null===(a=N.user_ranks)||void 0===a||null===(s=a[0])||void 0===s?void 0:s.success)?"否":null!=N&&null!==(l=N.user_ranks)&&void 0!==l&&null!==(c=l[0])&&void 0!==c&&c.success?"是":"")),(null==N||null===(u=N.user_ranks)||void 0===u||null===(h=u[0])||void 0===h?void 0:h.awards)&&g.a.createElement("p",{style:{marginBottom:"0px"}}," 是否获奖:",g.a.createElement("span",null,"percent_20"===(null==N||null===(d=N.user_ranks)||void 0===d||null===(f=d[0])||void 0===f?void 0:f.awards)?"二等奖":"percent_30"===(null==N||null===(p=N.user_ranks)||void 0===p||null===(m=p[0])||void 0===m?void 0:m.awards)?"三等奖":"没有获得奖项"))):g.a.createElement("span",{style:{marginRight:"70px"}},"我的排名:",null==N||null===(v=N.user_ranks)||void 0===v||null===(b=v[0])||void 0===b?void 0:b.rank),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"战队名"},null==N||null===(x=N.user_ranks)||void 0===x||null===(E=x[0])||void 0===E?void 0:E.team_name)),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"时间"},null==N||null===(S=N.user_ranks)||void 0===S||null===(C=S[0])||void 0===C?void 0:C.cost_time)),g.a.createElement("span",{style:{flex:1,textAlign:"center"}},g.a.createElement(X.a,{title:"赋能赛加分"},null==N||null===(k=N.user_ranks)||void 0===k||null===(_=k[0])||void 0===_?void 0:_.extra_score)),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"比赛成绩"},null==N||null===(T=N.user_ranks)||void 0===T||null===(O=T[0])||void 0===O?void 0:O.score)),g.a.createElement("span",null,g.a.createElement(X.a,{title:"总分"},parseFloat(null==N||null===(A=N.user_ranks)||void 0===A||null===(L=A[0])||void 0===L?void 0:L.extra_score)+parseFloat(null==N||null===(I=N.user_ranks)||void 0===I||null===(R=I[0])||void 0===R?void 0:R.score)||0))),null==N||null===(M=N.teams)||void 0===M?void 0:M.map((function(e,t){return g.a.createElement("div",{className:w.a.bottomItem},g.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},t+1),g.a.createElement(y.a,{to:"/users/".concat(null==e?void 0:e.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},g.a.createElement("img",{className:w.a.imgradius,src:D.a.IMG_SERVER+"/images/".concat(null==e?void 0:e.user_image)}),(null==e?void 0:e.competition_prize)&&g.a.createElement("span",{className:w.a.spanrightradius},null==e?void 0:e.competition_prize)),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"战队名"},null==e?void 0:e.team_name)),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"单位/学校名"},e.school_name)),g.a.createElement("span",{style:{flex:1,textAlign:"center"}},g.a.createElement(X.a,{title:"赋能赛加分"},e.extra_score)),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"比赛成绩"},e.score)),g.a.createElement("span",{style:{color:"#0152d9"}},g.a.createElement(X.a,{title:"总分"},parseFloat(e.extra_score)+parseFloat(e.score))))})))},Q=K.a.TabPane;var ee=function(e){var t,n,r,i,o,s,l=e.ChartRules,d=e.ItemData,f=e.getCharts,y=e.Selectkey,b=e.getChartRules,x=e.userinfo,E=e.Editable,S=e.HeaderDetail,C=Object(m.useState)(!1),k=Object(h.a)(C,2),_=k[0],T=k[1],O=Object(m.useState)(""),A=Object(h.a)(O,2),R=A[0],M=A[1],N=Object(m.useState)(!0),j=Object(h.a)(N,2),P=j[0],B=j[1],F=Object(m.useState)(),U=Object(h.a)(F,2),H=U[0],G=U[1],V=Object(m.useState)(),X=Object(h.a)(V,2),Y=X[0],$=X[1],J=Object(v.i)().identifier;function ee(){return(ee=Object(u.a)(p.a.mark((function e(){var t,n,r,i,o,a,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R){e.next=3;break}return c.b.info("内容不能为空"),e.abrupt("return");case 3:if(B(!1),!(t=null==H?void 0:H.id)){e.next=12;break}return e.next=8,Object(I.a)("/api/competitions/".concat(J,"/update_md_content.json"),{method:"post",body:{competition_module_id:y,content:R,md_content_id:null===(n=l.rule_contents)||void 0===n||null===(r=n.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(t)})))||void 0===r||null===(i=r[0])||void 0===i?void 0:i.id,stage_id:null==H?void 0:H.id}});case 8:0===e.sent.status&&(c.b.info("更新成功"),T(!1),b()),e.next=16;break;case 12:return e.next=14,Object(I.a)("/api/competitions/".concat(J,"/update_md_content.json"),{method:"post",body:{competition_module_id:y,content:R,md_content_id:null===(o=l.rule_contents)||void 0===o||null===(a=o.filter((function(e){return 0===parseInt(e.competition_stage_id)})))||void 0===a||null===(s=a[0])||void 0===s?void 0:s.id,stage_id:null==H?void 0:H.id}});case 14:0===e.sent.status&&(c.b.info("更新成功"),T(!1),b());case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Object(m.useEffect)((function(){if(P){var e,t,n,r,i,o,a,s=null==l||null===(e=l.stages)||void 0===e?void 0:e[0];if(G(s),null!=s&&s.id)"mAP"!==(null==S?void 0:S.task)&&"dog"!==(null==S?void 0:S.task)||f(null==s?void 0:s.id),M((null===(t=l.rule_contents)||void 0===t||null===(n=t.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==s?void 0:s.id)})))||void 0===n||null===(r=n[0])||void 0===r?void 0:r.content)||"");else"mAP"===(null==S?void 0:S.task)||null==S||S.task,M((null===(i=l.rule_contents)||void 0===i||null===(o=i.filter((function(e){return 0===parseInt(e.competition_stage_id)})))||void 0===o||null===(a=o[0])||void 0===a?void 0:a.content)||"")}}),[l]);var te=[{title:"排名",dataIndex:"name",align:"center",key:"name",render:function(e,t,n){return g.a.createElement("span",null,n+1)}},{title:"头像",dataIndex:"user_image",align:"center",key:"user_image",render:function(e){return g.a.createElement("img",{className:w.a.imgradius,src:D.a.IMG_SERVER+"/images/".concat(e)})}},{title:"战队名称",dataIndex:"team_name",key:"team_name",render:function(e){return g.a.createElement("span",{title:e},e&&(null==e?void 0:e.length)>=15?(null==e?void 0:e.substr(0,15))+"...":e||"--")}},{title:"单位",dataIndex:"school_name",key:"school_name",align:"center",render:function(e){return g.a.createElement("span",null,e||"--")}},{title:"mAP"===(null==S?void 0:S.task)?"mAP指标":"Jittor-3"===(null==S?void 0:S.task)?"总分":"top1指标",dataIndex:"score",key:"score",render:function(e){return g.a.createElement("span",null,e||"--")}}];return g.a.createElement("div",null,(null==l||null===(t=l.stages)||void 0===t?void 0:t.length)>0?null:g.a.createElement(q,null),(null==l||null===(n=l.stages)||void 0===n?void 0:n.length)>0&&g.a.createElement(K.a,{animated:!0,tabBarExtraContent:((null==x?void 0:x.admin)||(null==x?void 0:x.business)||E)&&g.a.createElement(a.a,{onClick:function(){T(!0)}},"编辑"),onChange:function(e){var t,n,r,i,o;T(!1);var a=null==l||null===(t=l.stages)||void 0===t?void 0:t.filter((function(t){return parseInt(e)===parseInt(null==t?void 0:t.id)}))[0];G(a);var s=null==a||null===(n=a.children)||void 0===n?void 0:n[0];$(s),M((null===(r=l.rule_contents)||void 0===r||null===(i=r.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==a?void 0:a.id)})))||void 0===i||null===(o=i[0])||void 0===o?void 0:o.content)||""),f((null==s?void 0:s.id)||e)}},l&&l.stages.map((function(e,t){return g.a.createElement(Q,{tab:e.name,key:null===e.id?0:e.id},!1===_&&l&&l.rule_contents.map((function(t,n){return e.id===t.competition_stage_id||null===e.id&&0===t.competition_stage_id?g.a.createElement(L.a,{key:n,value:void 0===t.content||null===t.content?"":t.content}):void 0})))}))),(null==H||null===(r=H.children)||void 0===r?void 0:r.length)>0&&g.a.createElement(K.a,{activeKey:(null==Y?void 0:Y.id)+"",onChange:function(e){var t,n=null==H||null===(t=H.children)||void 0===t?void 0:t.filter((function(t){return parseInt(e)===parseInt(null==t?void 0:t.id)}))[0];$(n),f(e)}},null==H||null===(i=H.children)||void 0===i?void 0:i.map((function(e,t){return g.a.createElement(Q,{tab:e.name,key:null===e.id?0:e.id})}))),_&&g.a.createElement("div",null,g.a.createElement(z.a,{defaultValue:R,onChange:function(e){M(e)}}),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(a.a,{style:{width:"90px"},type:"primary",onClick:function(){return function(){return ee.apply(this,arguments)}()}},"提交"),g.a.createElement(a.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return T(!1)}},"取消"))),(null==d||null===(o=d.teams)||void 0===o?void 0:o.length)>0&&("mAP"===(null==S?void 0:S.task)||"dog"===(null==S?void 0:S.task)||"Jittor-3"===(null==S?void 0:S.task))?g.a.createElement(W.a,{dataSource:null==d?void 0:d.teams,columns:te,pagination:!1}):(null==d||null===(s=d.teams)||void 0===s?void 0:s.length)>0&&g.a.createElement(Z,{ItemData:d}))},te=(n("/zsF"),n("PArb"));var ne=function(e){var t,n,r,i,o,s,l,c=e.Prize,d=Object(v.i)(),f=Object(m.useState)([{type:1,name:"团体奖证书"},{type:2,name:"个人奖证书"},{type:3,name:"优秀指导教师证书"}]),y=Object(h.a)(f,2),b=y[0],x=(y[1],function(){var e=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(G.u)({type:t.type,id:d.identifier});case 2:0===(null==(n=e.sent)?void 0:n.status)&&(location.href="/competitions/exports?id=".concat(d.identifier,"&type=").concat(t.type));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());return g.a.createElement("div",null,g.a.createElement("p",{className:w.a.downloadpdf},"温馨提示:填写的个人信息经审批后,将提供个人获奖证书下载;团队队员信息全部审批后,将提供团队获奖证书下载。"),g.a.createElement("p",{style:{marginTop:"30px",fontSize:"16px",color:"#000"}},"证书情况"),(null==c||null===(t=c.personal_certifications)||void 0===t?void 0:t.length)>0?g.a.createElement("p",null,g.a.createElement("span",null,"个人证书:"),g.a.createElement("img",{src:D.a.IMG_SERVER+"/images/educoder/pdfs.png"}),g.a.createElement("a",{style:{marginLeft:"5px"},href:D.a.API_SERVER+"".concat(null==c||null===(n=c.personal_certifications[0])||void 0===n?void 0:n.url)},"立即下载")):g.a.createElement("p",null,g.a.createElement("span",null,"个人证书:")," ",g.a.createElement("span",{style:{color:"#000"}},"暂未生成"),g.a.createElement("span",{style:{marginLeft:"20px"}},"原因:")," ",g.a.createElement("span",{style:{color:"#000"}},"组委会未完成证书审批,请稍后")),(null==c||null===(r=c.team_certifications)||void 0===r?void 0:r.length)>0?g.a.createElement("p",null,g.a.createElement("span",null,"团队证书:"),g.a.createElement("img",{src:D.a.IMG_SERVER+"/images/educoder/pdfs.png"}),g.a.createElement("a",{style:{marginLeft:"5px"},href:D.a.API_SERVER+"".concat(null==c||null===(i=c.team_certifications[0])||void 0===i?void 0:i.url)},"立即下载")):g.a.createElement("p",null,g.a.createElement("span",null,"团队证书:")," ",g.a.createElement("span",{style:{color:"#000"}},"暂未生成")),g.a.createElement(te.a,null),(null==c||null===(o=c.teams)||void 0===o?void 0:o.length)>0?g.a.createElement("div",null,g.a.createElement("p",null,(null==c?void 0:c.teams)&&(null==c||null===(s=c.teams[0])||void 0===s?void 0:s.name),"战队信息填报概况"),g.a.createElement("p",{style:{display:"flex",height:"50px",background:"#f5f5f5",alignItems:"center",justifyContent:"space-around"}},g.a.createElement("span",{style:{width:"5%"}},"角色"),g.a.createElement("span",{style:{width:"5%"}},"姓名"),g.a.createElement("span",{style:{width:"10%"}},"实名认证"),g.a.createElement("span",{style:{width:"10%"}},"职业认证"),g.a.createElement("span",{style:{width:"10%"}},"手机绑定"),g.a.createElement("span",{style:{width:"10%"}},"邮箱绑定"),g.a.createElement("span",{style:{width:"50%",textAlign:"center"}},"开户行及银行卡号信息(队长填写)")),(null==c?void 0:c.teams)&&(null==c||null===(l=c.teams[0])||void 0===l?void 0:l.team_members.map((function(e,t){var n,r,i,o,a,s;return g.a.createElement("p",{className:w.a.teamItem},g.a.createElement("span",{style:{width:"5%"}},null==e?void 0:e.role),g.a.createElement("span",{style:{width:"5%"}},null==e?void 0:e.name),g.a.createElement("span",{style:{width:"10%"}},"authed"===(null==e?void 0:e.real_name_auth)?"已认证":"authing"===(null==e?void 0:e.real_name_auth)?"待审核":"未认证"),g.a.createElement("span",{style:{width:"10%"}},"authed"===(null==e?void 0:e.professional_auth)?"已认证":"authing"===(null==e?void 0:e.professional_auth)?"待审核":"未认证"),g.a.createElement("span",{style:{width:"10%"}},null!=e&&e.phone_binded?"已绑定":"未绑定"),g.a.createElement("span",{style:{width:"10%"}},null!=e&&e.email_binded?"已绑定":"未绑定"),"队长"===(null==e?void 0:e.role)?g.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(null==c?void 0:c.teams)&&(null==c||null===(n=c.teams[0])||void 0===n||null===(r=n.bank_account)||void 0===r?void 0:r.bank),(null==c?void 0:c.teams)&&(null==c||null===(i=c.teams[0])||void 0===i||null===(o=i.bank_account)||void 0===o?void 0:o.second_bank),(null==c?void 0:c.teams)&&(null==c||null===(a=c.teams[0])||void 0===a||null===(s=a.bank_account)||void 0===s?void 0:s.card_no)):g.a.createElement("span",{style:{width:"50%"}}))})))):null,g.a.createElement(O.a,{gutter:[20,20]},b.map((function(e,t){return g.a.createElement(Y.a,{key:t},g.a.createElement(a.a,{type:"primary",onClick:function(){return x(e)}},e.name))}))))},re=n("0Owb"),ie=(n("7Kak"),n("9yH6")),oe=(n("y8nQ"),n("Vl3Y")),ae=n("1vsH"),se=n("Dgm7"),le=n.n(se),ce=n("NnUe"),ue=n.n(ce),he=S.a.Dragger,de=Object(b.a)((function(e){var t=e.user,n=e.account,r=e.loading;return{user:t,account:n,globalSetting:e.globalSetting,loading:r.effects}}))((function(e){var t=e.user,n=e.account,o=(e.globalSetting,e.loading),l=e.dispatch,f=(Object(d.a)(e,["user","account","globalSetting","loading","dispatch"]),oe.a.useForm()),v=Object(h.a)(f,1)[0],y=Object(m.useState)({}),b=Object(h.a)(y,2),x=(b[0],b[1]),w=Object(m.useState)(!0),E=Object(h.a)(w,2),S=E[0],C=E[1],k=Object(m.useState)(),_=Object(h.a)(k,2),T=_[0],O=_[1],L=Object(m.useState)(),I=Object(h.a)(L,2),R=I[0],M=I[1],N=Object(m.useState)(),j=Object(h.a)(N,2),P=j[0],B=j[1],F=Object(m.useState)(),U=Object(h.a)(F,2),H=U[0],z=U[1];Object(m.useEffect)((function(){if(n.basicInfo){var e=n.basicInfo,t={name:e.show_realname?e.name:Object(ae.F)(e.name),gender:e.gender};O(e.name),C(e.show_realname),v.setFieldsValue(t),x(t)}}),[n.basicInfo]);var G=function(){var e=Object(u.a)(p.a.mark((function e(r){var i,o,a,s,u,h,d,f;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=(a=r||{}).name,u=a.gender,h=a.idNumber,R){e.next=4;break}return c.b.info("请先上传照片!"),e.abrupt("return");case 4:return e.next=6,l({type:"account/applyRealNameAuth",payload:{id:(null===(i=n.basicInfo)||void 0===i?void 0:i.id)||(null===(o=t.userInfo)||void 0===o?void 0:o.login),name:s,gender:u,id_number:h,show_realname:S,attachment_ids:[P]}});case 6:d=e.sent,V(),d&&(c.b.info("申请已提交,请等待审核!"),l({type:"account/getBasicInfo",payload:{login:null===(f=t.userInfo)||void 0===f?void 0:f.login}}));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),V=function(){l({type:"account/setActionTabs",payload:{}})},W={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(D.a.API_SERVER,"/api/attachments.json"),className:ue.a.uploader,onChange:function(e){var t;"uploading"!==e.file.status?"done"===e.file.status&&(console.log(e.file,e.file.response),B(null===(t=e.file.response)||void 0===t?void 0:t.id),Object(ae.C)(e.file.originFileObj,(function(e){M(e),z(!1)}))):z(!0)},beforeUpload:function(e){var t="image/jpeg"===e.type||"image/png"===e.type||"image/jpg"===e.type||"image/bmp"===e.type;return t||c.b.info("请上传正确文件格式"),t}};return g.a.createElement(i.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:"Account-RealNameAuth"===n.actionTabs.key,title:"修改实名信息",width:"600px",footer:null},g.a.createElement(s.a,{spinning:!!H},g.a.createElement(oe.a,{className:ue.a.formWrap,form:v,layout:"horizontal",onValuesChange:function(e){x(Object(r.a)({},v.getFieldsValue())),"name"in e&&O(e.name)},onFinish:G},g.a.createElement(oe.a.Item,{label:"姓名",name:"name",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"请输入真实姓名,最大限制".concat(10,"个字符")},{validator:ae.I}],extra:g.a.createElement("span",null,S?"(显示:平台将显示您的真实姓名)":"(隐藏:平台将显示你的昵称)")},g.a.createElement(A.a,{disabled:!S,placeholder:"请输入真实姓名,最大限制".concat(10,"个字符"),maxLength:10,addonAfter:g.a.createElement("i",{className:"iconfont ".concat(S?"icon-xianshi":"icon-yincang"," font18 ").concat(ue.a.color0152d9),onClick:function(){var e=!S;C(e);var t=e?T:Object(ae.F)(T);v.setFieldsValue({name:t})}})})),g.a.createElement(oe.a.Item,{label:"性别:",name:"gender",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"请选择性别"}]},g.a.createElement(ie.a.Group,null,g.a.createElement(ie.a,{value:0},"男"),g.a.createElement(ie.a,{value:1},"女"))),g.a.createElement(oe.a.Item,{label:"证件号:",labelCol:{span:3},name:"idNumber",rules:[{required:!0,message:"请输入证件号"}]},g.a.createElement(A.a,{placeholder:"请输入证件号"})),g.a.createElement(oe.a.Item,{label:"身份证上传",labelCol:{span:3}},g.a.createElement("div",{className:ue.a.flexRow},g.a.createElement("div",{className:"".concat(ue.a.flexColumn," ").concat(ue.a.example)},g.a.createElement("span",{className:ue.a.exampleImg},g.a.createElement("img",{src:le.a})),g.a.createElement("span",{className:"tc"},g.a.createElement("p",null,"示例图片"),g.a.createElement("p",{className:"".concat(ue.a.colorOrange," font12")},"png/jpg/bmp格式不超过2MB"))),g.a.createElement("div",{className:ue.a.flexColumn},g.a.createElement(he,Object(re.a)({},W,{accept:".png,.jpg,.bmp,.jpeg"}),R?g.a.createElement("img",{src:R,className:ue.a.uploadImg}):g.a.createElement("div",{className:ue.a.imageTip},g.a.createElement("p",null,g.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(ue.a.uploadTipIcon)})),g.a.createElement("p",{className:ue.a.uploadTip},g.a.createElement("a",{className:ue.a.color05101a},"点击或拖拽上传图片")))),g.a.createElement("span",{className:"tc"},g.a.createElement("p",{className:ue.a.viewLargerImg},"查看大图"))))),g.a.createElement("div",{className:ue.a.footerWrap},g.a.createElement(oe.a.Item,null,g.a.createElement(a.a,{className:"mr5",size:"large",onClick:V},"取消"),g.a.createElement(a.a,{size:"large",type:"primary",htmlType:"submit",loading:o["account/applyRealNameAuth"]},"保存"))),g.a.createElement("div",{className:ue.a.note},g.a.createElement("p",null,"认证须知:"),g.a.createElement("p",null,"1.你需要准备有效的身份证正面人像面的证件照照片请确保证件照片清晰可见严禁PS"),g.a.createElement("p",null,"2.我们将在你提交认证信息后的24小时不包含节假日内完成审核审核结果将会以系统消息的形式发送给你"),g.a.createElement("p",null,"3.实名认证审核完成后,无法删除,请谨慎填写;"),g.a.createElement("p",null,"4.实名认证审核完成后系统将自动发放500个金币作为奖励"),g.a.createElement("p",null,"5.我们会确保你所提供的信息均处于严格的保密状态,不会泄露;"),g.a.createElement("p",null,"6.如存在恶意乱填写姓名证件号及上传与实名认证证件无关图片者一经发现将冻结EduCoder账号。"),g.a.createElement("p",null,"7.提交实名认证后系统会自动将状态改为已认证,你将可以体验平台需要实名认证的功能;如果在认证后的使用过程中未通过审核,你将不能继续体验需要认证的功能。")))))})),fe=(n("O3gP"),n("lrIw")),pe=n("KXlV"),me=n.n(pe),ge=n("Sjjz"),ve=n.n(ge),ye=A.a.TextArea,be=Object(b.a)((function(e){var t=e.account,n=e.loading;return{account:t,globalSetting:e.globalSetting,loading:n.effects}}))((function(e){e.account,e.globalSetting;var t=e.loading,n=e.dispatch,r=e.schoolName,o=e.departmentName,s=e.visible,l=e.onClose,f=void 0===l?function(){}:l,v=e.onSuccess,y=void 0===v?function(){}:v,b=Object(d.a)(e,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),x=oe.a.useForm(),w=Object(h.a)(x,1)[0],E=Object(m.useRef)();Object(m.useEffect)((function(){E.current=b.schoolId}),[b.schoolId]),Object(m.useEffect)((function(){w.setFieldsValue({department:o})}),[o]);var S=function(){var e=Object(u.a)(p.a.mark((function e(t){var r,i,o,a;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(r=t||{}).department,o=r.remarks,e.next=3,n({type:"account/appplyDepartment",payload:{school_id:E.current,name:i,remarks:o}});case 3:a=e.sent,f(),a&&(c.b.success("新增院系/部门成功!"),y(i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return g.a.createElement(i.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:s,title:"申请添加子单位名称",width:"600px",footer:null},g.a.createElement(oe.a,{className:ve.a.formWrap,form:w,labelCol:{span:4},wrapperCol:{span:20},onFinish:S},g.a.createElement(oe.a.Item,{label:"单位名称:"},r),g.a.createElement(oe.a.Item,{label:"部门名称:",name:"department",rules:[{required:!0,message:"请输入部门或者学院名称"}]},g.a.createElement(A.a,{placeholder:"请输入部门或者学院名称"})),g.a.createElement(oe.a.Item,{label:"说明:",name:"remarks"},g.a.createElement(ye,{placeholder:"再次说明特别情况(选填)"})),g.a.createElement("div",{className:ve.a.footerWrap},g.a.createElement(oe.a.Item,null,g.a.createElement(a.a,{className:"mr5",size:"large",onClick:function(){f()}},"取消"),g.a.createElement(a.a,{size:"large",type:"primary",htmlType:"submit",loading:t["account/appplyDepartment"]},"保存")))))})),xe=(n("6UJt"),n("DFOY")),we=n("jO45"),Ee=n("jN4g"),Se=n("gJ3r"),Ce=n("jwmR"),ke=n.n(Ce),_e=function(e,t){return t.some((function(t){return t.label.toLowerCase().indexOf(e.toLowerCase())>-1}))},Te=A.a.TextArea,Oe=Object(b.a)((function(e){var t=e.account,n=e.loading;return{account:t,globalSetting:e.globalSetting,loading:n.effects}}))((function(e){e.account,e.globalSetting;var t=e.loading,n=e.dispatch,r=e.schoolName,o=e.visible,s=e.onClose,l=void 0===s?function(){}:s,f=e.onSuccess,v=void 0===f?function(){}:f,y=(Object(d.a)(e,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),oe.a.useForm()),b=Object(h.a)(y,1)[0];Object(m.useEffect)((function(){b.setFieldsValue({name:r})}),[r]);var x=function(){var e=Object(u.a)(p.a.mark((function e(t){var r,i,o,a,s,u,h;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(r=t||{}).name,o=r.city,a=void 0===o?[]:o,s=r.address,u=r.remarks,e.next=3,n({type:"account/appplySchool",payload:{name:i,province:a[0],city:a[1],address:s,remarks:u}});case 3:h=e.sent,l(),h&&(c.b.success("新增学校/单位成功!"),v(i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return g.a.createElement(i.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:o,title:"申请添加单位名称",width:"600px",footer:null},g.a.createElement(oe.a,{className:ke.a.formWrap,form:b,labelCol:{span:4},wrapperCol:{span:20},onFinish:x},g.a.createElement(oe.a.Item,{label:"单位全称:",name:"name",rules:[{required:!0,message:"请输入学校或工作单位"}]},g.a.createElement(A.a,{placeholder:"学校或工作单位"})),g.a.createElement("div",{className:"".concat(ke.a.flexRow," ").concat(ke.a.example)},g.a.createElement("div",null,"示例:"),g.a.createElement("div",{className:ke.a.flexColumn},g.a.createElement("div",null,g.a.createElement(we.a,{style:{color:"rgb(82, 196, 26)"}}),g.a.createElement("span",{className:"font14 ml5"},"正确示例:数据结构")),g.a.createElement("div",null,g.a.createElement(Ee.a,{style:{color:"red"}}),g.a.createElement("span",{className:"font14 ml5"},"错误示例数据结构2019春")))),g.a.createElement(oe.a.Item,{label:"地区:",name:"city"},g.a.createElement(xe.a,{allowClear:!0,size:"large",options:Se.a,placeholder:"请选择所在地",showSearch:{matchInputWidth:!0,filter:_e}})),g.a.createElement(oe.a.Item,{label:"详细地址:",name:"address"},g.a.createElement(A.a,{placeholder:"请填写完整的地址信息"})),g.a.createElement(oe.a.Item,{label:"说明:",name:"remarks"},g.a.createElement(Te,{placeholder:"再次说明特别情况(选填)"})),g.a.createElement("div",{className:ke.a.footerWrap},g.a.createElement(oe.a.Item,null,g.a.createElement(a.a,{className:"mr5",size:"large",onClick:function(){l()}},"取消"),g.a.createElement(a.a,{size:"large",type:"primary",htmlType:"submit",loading:t["account/appplySchool"]},"保存")))))})),Ae=N.a.Option,Le=S.a.Dragger,De=Object(b.a)((function(e){var t=e.user,n=e.account,r=e.loading;return{user:t,account:n,globalSetting:e.globalSetting,loading:r.effects}}))((function(e){var t,n,o=e.user,l=e.account,f=e.globalSetting,v=e.loading,y=e.dispatch,b=e.Scoid,x=(Object(d.a)(e,["user","account","globalSetting","loading","dispatch","Scoid"]),oe.a.useForm()),w=Object(h.a)(x,1)[0],E=Object(m.useState)({}),S=Object(h.a)(E,2),C=S[0],k=S[1],_=Object(m.useState)([]),T=Object(h.a)(_,2),L=T[0],I=T[1],R=Object(m.useState)([]),M=Object(h.a)(R,2),j=M[0],P=M[1],B=Object(m.useState)([]),F=Object(h.a)(B,2),U=F[0],H=F[1],z=Object(m.useState)([]),G=Object(h.a)(z,2),V=G[0],W=G[1],K=Object(m.useState)(),q=Object(h.a)(K,2),X=q[0],$=q[1],J=Object(m.useState)(),Z=Object(h.a)(J,2),Q=Z[0],ee=Z[1],te=Object(m.useState)(),ne=Object(h.a)(te,2),ie=ne[0],se=ne[1],le=Object(m.useState)(),ce=Object(h.a)(le,2),he=ce[0],de=ce[1],pe=Object(m.useState)(),ge=Object(h.a)(pe,2),ve=ge[0],ye=ge[1];Object(m.useEffect)((function(){xe()}),[]),Object(m.useEffect)((function(){Object(u.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(b){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,we(b);case 4:t=e.sent,H(null==t?void 0:t.departments);case 6:case"end":return e.stop()}}),e)})))()}),[b]);var xe=function(){var e=Object(u.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y({type:"account/getSchoolOption"});case 2:t=e.sent,I(null==t?void 0:t.schools);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),we=function(e){return y({type:"account/getDepartmentOption",payload:{id:e}})};Object(m.useEffect)((function(){if(l.basicInfo){var e=l.basicInfo,t={identity:e.identity,school:e.school_name,department:e.department_name,studentNo:e.student_id,jobTitle:"teacher"==e.identity?e.technical_title:"教授",manager:"professional"==e.identity?e.technical_title:"企业管理者"};w.setFieldsValue(t),k(t)}}),[l.basicInfo]);var Ee=function(){var e=Object(u.a)(p.a.mark((function e(t,n){var i,o,a,s,l,c;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=null===(i=L.find((function(e){return e.name===t})))||void 0===i?void 0:i.id,e.next=3,we(s);case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:l=e.t0,H(null==l?void 0:l.departments),c=n||(null==l||null===(o=l.departments)||void 0===o||null===(a=o[0])||void 0===a?void 0:a.name),w.setFieldsValue({department:c}),k(Object(r.a)(Object(r.a)({},C),{school:t,department:c}));case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Se=function(){var e=Object(u.a)(p.a.mark((function e(t){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,xe();case 2:w.setFieldsValue({school:t,department:""}),k(Object(r.a)(Object(r.a)({},C),{school:t,department:""}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ce=function(){var e=Object(u.a)(p.a.mark((function e(t){var n,r,i,a,s,u,h,d,f,m,g,v,b,x,w,E;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=(s=t||{}).school,h=s.department,d=s.identity,f=s.studentNo,m=s.jobTitle,g=s.manager,X){e.next=4;break}return c.b.info("请先上传照片!"),e.abrupt("return");case 4:return v=null===(n=L.find((function(e){return e.name===u})))||void 0===n?void 0:n.id,b=null===(r=U.find((function(e){return e.name===h})))||void 0===r?void 0:r.id,x="student"===d?f:"teacher"===d?m:g,e.next=9,y({type:"account/applyProfessionalAuth",payload:{id:(null===(i=l.basicInfo)||void 0===i?void 0:i.id)||(null===(a=o.userInfo)||void 0===a?void 0:a.login),school_id:v,department_id:b,identity:d,extra:x,attachment_ids:[Q]}});case 9:w=e.sent,ke(),w&&(c.b.info("申请已提交,请等待审核!"),y({type:"account/getBasicInfo",payload:{login:null===(E=o.userInfo)||void 0===E?void 0:E.login}}));case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ke=function(){y({type:"account/setActionTabs",payload:{}})},_e={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(D.a.API_SERVER,"/api/attachments.json"),className:ue.a.uploader,onChange:function(e){var t;"uploading"!==e.file.status?"done"===e.file.status&&(console.log(e.file,e.file.response),ee(null===(t=e.file.response)||void 0===t?void 0:t.id),Object(ae.C)(e.file.originFileObj,(function(e){$(e),se(!1)}))):se(!0)},beforeUpload:function(e){var t="image/jpeg"===e.type||"image/png"===e.type||"image/jpg"===e.type||"image/bmp"===e.type;return t||c.b.info("请上传正确文件格式"),t}};return g.a.createElement(i.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:ue.a.modal,visible:"Account-ProfessionalAuth"===l.actionTabs.key,title:g.a.createElement("div",null,g.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(ue.a.colorBlue)}),"职业认证"),width:"660px",footer:null},g.a.createElement(s.a,{spinning:!!ie},g.a.createElement(oe.a,{className:ue.a.formWrap,form:w,layout:"horizontal",onValuesChange:function(e){(k(Object(r.a)({},w.getFieldsValue())),"school"in e)&&(P(L.filter((function(t){return t.name.includes(e.school)}))),(L.find((function(t){return t.name===e.school}))||{}).id?Ee(e.school):(w.setFieldsValue({department:""}),k(Object(r.a)(Object(r.a)({},C),{school:e.school,department:""}))))},onFinish:Ce},g.a.createElement(O.a,{gutter:[10,0]},g.a.createElement(Y.a,{flex:"300px"},g.a.createElement(oe.a.Item,{label:"职业",name:"identity",rules:[{required:!0,message:"请先选择职业"}]},g.a.createElement(N.a,null,g.a.createElement(Ae,{value:"teacher"},"教师"),g.a.createElement(Ae,{value:"student"},"学生"),g.a.createElement(Ae,{value:"professional"},"专业人士")))),"student"===C.identity&&g.a.createElement(Y.a,{flex:"200px"},g.a.createElement(oe.a.Item,{initialValue:C.studentNo,name:"studentNo",rules:[{required:!0,message:"请先输入学号"}]},g.a.createElement(A.a,{type:"text",placeholder:"请输入学号"}))),"teacher"===C.identity&&g.a.createElement(Y.a,{flex:"200px"},g.a.createElement(oe.a.Item,{initialValue:C.jobTitle,name:"jobTitle",rules:[{required:!0,message:"请先选择职称"}]},g.a.createElement(N.a,null,g.a.createElement(Ae,{value:"教授"},"教授"),g.a.createElement(Ae,{value:"副教授"},"副教授"),g.a.createElement(Ae,{value:"讲师"},"讲师"),g.a.createElement(Ae,{value:"助教"},"助教")))),"professional"===C.identity&&g.a.createElement(Y.a,{flex:"200px"},g.a.createElement(oe.a.Item,{initialValue:C.manager,name:"manager",rules:[{required:!0,message:"请先选择职称"}]},g.a.createElement(N.a,null,g.a.createElement(Ae,{value:"企业管理者"},"企业管理者"),g.a.createElement(Ae,{value:"部门管理者"},"部门管理者"),g.a.createElement(Ae,{value:"高级工程师"},"高级工程师"),g.a.createElement(Ae,{value:"工程师"},"工程师"),g.a.createElement(Ae,{value:"助理工程师"},"助理工程师"))))),g.a.createElement(oe.a.Item,{label:"学校/单位",name:"school",extra:C.school&&!(null!=L&&L.find((function(e){return e.name===C.school})))&&g.a.createElement("div",{className:ue.a.schoolHintWrap},g.a.createElement("span",{className:ue.a.colorCDCDCD},"未找到包含“",C.school,"”的高校,"),g.a.createElement("span",{className:"".concat(ue.a.color0152d9," current"),onClick:function(){de(!0)}},"申请新增")),rules:[{required:!0,message:"请先选择学校/单位"}]},g.a.createElement(fe.a,{showSearch:!0,options:null==j?void 0:j.map((function(e){return{value:e.name}}))})),g.a.createElement(oe.a.Item,{label:"院系/部门",name:"department",extra:C.department&&!(null!=U&&U.find((function(e){return e.name===C.department})))&&g.a.createElement("div",{className:ue.a.schoolHintWrap},g.a.createElement("span",{className:ue.a.colorCDCDCD},C.department?"未找到包含“".concat(C.department,"”的高校,"):"未找到院系,"),g.a.createElement("span",{className:"".concat(ue.a.color0152d9," current"),onClick:function(){L.find((function(e){return e.name===C.school}))?ye(!0):c.b.info("请先选择正确的单位或者学校!")}},"申请新增")),rules:[{required:!0,message:"请先选择院系/部门"}]},g.a.createElement(fe.a,{showSearch:!0,onChange:function(e){return W(U.filter((function(t){return t.name.includes(e)})))},options:null==V?void 0:V.map((function(e){return{value:e.name}}))})),g.a.createElement(oe.a.Item,{label:"职业证上传"},g.a.createElement("div",{className:ue.a.flexRow},g.a.createElement("div",{className:"".concat(ue.a.flexColumn," ").concat(ue.a.example)},g.a.createElement("span",{className:ue.a.exampleImg},g.a.createElement("img",{src:me.a})),g.a.createElement("span",{className:"tc"},g.a.createElement("p",null,"示例图片"),g.a.createElement("p",{className:"".concat(ue.a.colorOrange," font12")},"png/jpg/bmp格式不超过2MB"))),g.a.createElement("div",{className:ue.a.flexColumn},g.a.createElement(Le,Object(re.a)({},_e,{accept:".png,.jpg,.bmp,.jpeg"}),X?g.a.createElement("img",{src:X,className:ue.a.uploadImg}):g.a.createElement("div",{className:ue.a.imageTip},g.a.createElement("p",null,g.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(ue.a.uploadTipIcon)})),g.a.createElement("p",{className:ue.a.uploadTip},g.a.createElement("a",{className:ue.a.color05101a},"点击或拖拽上传图片")))),g.a.createElement("span",{className:"tc"},g.a.createElement("p",{className:ue.a.viewLargerImg},"查看大图"))))),g.a.createElement("div",{className:ue.a.footerWrap},g.a.createElement(oe.a.Item,null,g.a.createElement(a.a,{className:"mr5",size:"large",onClick:ke},"取消"),g.a.createElement(a.a,{size:"large",type:"primary",htmlType:"submit",loading:v["account/applyProfessionalAuth"]},"保存"))),g.a.createElement("div",{className:ue.a.note},g.a.createElement("p",null,"认证须知:"),g.a.createElement("p",null,"1.根据职业上传相应的证件照教师教师证专业人士员工证、学生学生证请确保证件照内容完整并且清晰可见严禁PS"),g.a.createElement("p",null,"2.我们将在你提交职业证信息后的24小时不包含节假日内完成审核审核结果将会以系统消息的形式发送给你"),g.a.createElement("p",null,"3.职业认证审核完成后,无法删除,请谨慎填写;职业变更请选择重新认证;"),g.a.createElement("p",null,"4.职业认证审核完成后系统将自动发放500个金币作为奖励"),g.a.createElement("p",null,"5.我们会确保你所提供的信息均处于严格的保密状态,不会泄露;"),g.a.createElement("p",null,"6.如存在恶意乱填写姓名,学号,及上传与职业证件无关图片者,一经发现将冻结",!(null!=f&&null!==(t=f.setting)&&void 0!==t&&t.is_local)&&"EduCoder","账号。"),g.a.createElement("p",null,"7.非老师身份提交职业认证后系统会自动将状态改为已认证,你将可以体验平台需要职业认证的功能;如果在认证后的使用过程中未通过审核,你将不能继续体验需要认证的功能。")))),g.a.createElement(Oe,{visible:he,onClose:function(){return de(!1)},schoolName:C.school,onSuccess:Se}),g.a.createElement(be,{visible:ve,onClose:function(){return ye(!1)},schoolId:null===(n=L.find((function(e){return e.name===C.school})))||void 0===n?void 0:n.id,schoolName:C.school,departmentName:C.department,onSuccess:function(e){return Ee(C.school,e)}}))})),Ie=n("aCH8"),Re=n.n(Ie);var Me=function(e){var t=e.type,n=e.dispatch,r=e.userid,i=e.isshow,o=e.setPhoneshow,s=e.setEmailshow,l="79e33abd4b6588941ab7622aed1e67e8",d=Object(m.useState)(""),f=Object(h.a)(d,2),v=f[0],y=f[1],b=Object(m.useState)("获取验证码"),x=Object(h.a)(b,2),w=x[0],E=(x[1],Object(m.useState)(60)),S=Object(h.a)(E,2),C=S[0],k=S[1],_=Object(m.useState)(!1),T=Object(h.a)(_,2),O=T[0],L=T[1],D=Object(m.useState)(""),I=Object(h.a)(D,2),R=I[0],M=I[1];function N(){return(N=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(v){e.next=3;break}return 3===t?c.b.info("手机号不能为空"):c.b.info("邮箱地址不能为空"),e.abrupt("return");case 3:return e.next=5,n({type:"competitions/getVerification",payload:{type:t,login:v,smscode:Re()(l+v)}});case 5:1===e.sent.status&&(c.b.info("获取验证码成功"),j(),L(!0));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(){k(60);var e=setInterval((function(){--C>-1?k(C):(clearInterval(e),L(!1))}),1e3)}function P(){return(P=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n({type:"competitions/PhoneBind",payload:{userid:r,code:R,phone:v}});case 2:0===e.sent.status&&(c.b.info("绑定成功"),o("none"));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(){return(B=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n({type:"competitions/EmailBind",payload:{userid:r,code:R,email:v}});case 2:0===e.sent.status&&(c.b.info("绑定成功"),s("none"));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return g.a.createElement("div",{style:{display:i}},g.a.createElement("p",null,g.a.createElement(A.a,{value:v,onChange:function(e){return y(e.target.value)},placeholder:3===t?"请输入手机号":"请输入邮箱地址",style:{width:"370px"}})),g.a.createElement("span",null,g.a.createElement(A.a,{value:R,onChange:function(e){return M(e.target.value)},placeholder:3===t?"请输入手机获取的验证码":"请输入邮箱获取的验证码",style:{width:"250px"}}))," ",g.a.createElement(a.a,{disabled:O,onClick:function(){return function(){return N.apply(this,arguments)}()},type:"primary",style:{marginLeft:"20px",width:"100px"}},O?"重新发送".concat(C,"s"):w),g.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},g.a.createElement(a.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){R?3===t?function(){P.apply(this,arguments)}():function(){B.apply(this,arguments)}():c.b.info("验证码不能为空")}},"确认"),g.a.createElement(a.a,{style:{marginLeft:"20px"},onClick:function(){3===t?o("none"):s("none")}},"取消")))};var Ne=function(e){var t=e.dispatch,n=e.userid,i={wrapperCol:{offset:3,span:21}},o=oe.a.useForm(),s=Object(h.a)(o,1)[0],l=Object(v.i)().identifier;return g.a.createElement("div",{style:{width:"500px"}},g.a.createElement(oe.a,{form:s,name:"basic"},g.a.createElement(oe.a.Item,Object(re.a)({},i,{label:g.a.createElement("div",{style:{width:"30px"}},"开户行"),name:"bank",rules:[{required:!0,message:"请输入开户行"}]}),g.a.createElement(A.a,null)),g.a.createElement(oe.a.Item,Object(re.a)({},i,{label:g.a.createElement("div",{style:{width:"30px"}},"支行"),name:"second_bank",rules:[{required:!0,message:"请输入支行"}]}),g.a.createElement(A.a,null)),g.a.createElement(oe.a.Item,Object(re.a)({},i,{label:g.a.createElement("div",{style:{width:"30px"}},"账号"),name:"card_no",rules:[{required:!0,message:"请输入账号"}]}),g.a.createElement(A.a,null)),g.a.createElement(oe.a.Item,null,g.a.createElement(a.a,{type:"primary",htmlType:"submit",onClick:Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s.validateFields().then(function(){var e=Object(u.a)(p.a.mark((function e(i){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({type:"competitions/setleader",payload:Object(r.a)({identifier:l,user_id:n},i)});case 2:0===e.sent.status&&c.b.info("提交成功");case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e)})))},"提交"))))},je={teacher:"教师",student:"学生",professional:"专业人士"};var Pe=function(e){var t,n,r,i,o,s,l,d,f=e.Prize,v=e.Accounts,y=e.dispatch,b=e.userid,x=Object(m.useState)("none"),w=Object(h.a)(x,2),E=w[0],S=w[1],C=Object(m.useState)("none"),k=Object(h.a)(C,2),_=k[0],T=k[1];function O(e){return A.apply(this,arguments)}function A(){return(A=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("1"!==t){e.next=6;break}return e.next=3,y({type:"competitions/Authentication"});case 3:n=e.sent,e.next=9;break;case 6:return e.next=8,y({type:"competitions/Professional"});case 8:n=e.sent;case 9:0===n.status&&c.b.info("撤销成功");case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return g.a.createElement("div",null,g.a.createElement("p",null,g.a.createElement("span",{style:{color:"red"}},"*"),g.a.createElement("span",{style:{fontSize:"16px"}},"实名信息"),"uncertified"===(null==v?void 0:v.authentication)?g.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"通过实名认证后才能获得证书"):null,"uncertified"===(null==v?void 0:v.authentication)?g.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){y({type:"account/setActionTabs",payload:{key:"Account-RealNameAuth"}})}},"立即认证"):null),g.a.createElement("div",{style:{padding:"20px"}},g.a.createElement("p",null,"姓名:",g.a.createElement("span",null,null==v?void 0:v.name),"uncertified"===(null==v?void 0:v.authentication)?null:"applying"===(null==v?void 0:v.authentication)?g.a.createElement("span",null,g.a.createElement("span",null,"待审核"),g.a.createElement(a.a,{type:"primary",onClick:function(){return O("1")},ghost:!0,style:{marginLeft:"20px"}},"撤销认证")):g.a.createElement("span",{style:{color:"#6ec76e"}},g.a.createElement("span",{className:"iconfont icon-wancheng font-14 ml20"})," 已认证")),g.a.createElement("p",null,"性别:",g.a.createElement("span",null,0===(null==v?void 0:v.gender)?"男":"女"))),g.a.createElement("p",null,g.a.createElement("span",{style:{color:"red"}},"*"),g.a.createElement("span",{style:{fontSize:"16px"}},"职业信息"),"uncertified"===(null==v?void 0:v.authentication)?g.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"通过实名认证后才能获得证书"):null,"uncertified"===(null==v?void 0:v.authentication)?g.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){y({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})}},"立即认证"):null),g.a.createElement("div",{style:{padding:"20px"}},g.a.createElement("p",null,"职业:",g.a.createElement("span",null,v&&v.identity&&je[v.identity]),"uncertified"===(null==v?void 0:v.authentication)?null:"applying"===(null==v?void 0:v.authentication)?g.a.createElement("span",null,g.a.createElement("span",null,"待审核"),g.a.createElement(a.a,{type:"primary",onClick:function(){return O("2")},ghost:!0,style:{marginLeft:"20px"}},"撤销认证")):g.a.createElement("span",{style:{color:"#6ec76e"}},g.a.createElement("span",{className:"iconfont icon-wancheng font-12 ml20"}),g.a.createElement("span",null,"已认证"),g.a.createElement(a.a,{type:"primary",onClick:function(){y({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})},ghost:!0,style:{marginLeft:"20px"}},"重新认证"))),g.a.createElement("p",null,"学号:",g.a.createElement("span",null,(null==v?void 0:v.student_id)||"--")),g.a.createElement("p",null,"学校:",g.a.createElement("span",null,(null==v?void 0:v.school_name)||"--")),g.a.createElement("p",null,"院系:",g.a.createElement("span",null,(null==v?void 0:v.department_name)||"--"))),g.a.createElement("p",null,g.a.createElement("span",{style:{color:"red"}},"*"),g.a.createElement("span",{style:{fontSize:"16px"}},"联系方式")),g.a.createElement("div",{style:{padding:"20px"}},g.a.createElement("p",{style:{display:"flex"}},g.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"手机号:"),g.a.createElement("span",{style:{width:"150px"}},(null==v?void 0:v.phone)||"--"),"none"===E?g.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){S("block")}},"更换"):null),g.a.createElement(Me,{type:3,dispatch:y,userid:null==v?void 0:v.id,isshow:E,setPhoneshow:S,setEmailshow:T}),g.a.createElement("p",{style:{display:"flex"}},g.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"Email"),g.a.createElement("span",{style:{width:"150px"}},(null==v?void 0:v.mail)||"--"),"none"===_?g.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){T("block")}},"更换"):null),g.a.createElement(Me,{type:4,dispatch:y,userid:null==v?void 0:v.id,isshow:_,setEmailshow:T,setPhoneshow:S})),null!=f&&f.leader&&null!=f&&f.teams&&null!=f&&null!==(t=f.teams[0])&&void 0!==t&&null!==(n=t.bank_account)&&void 0!==n&&n.bank?g.a.createElement("p",null,g.a.createElement("span",{style:{fontSize:"16px"}},"签/领/开户行及银行卡号"),g.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"为保障奖金的及时发放,请队长如实填写你名下的银行卡信息")):g.a.createElement("div",null,g.a.createElement("p",null,g.a.createElement("span",{style:{fontSize:"16px"}},"签/领/开户行及银行卡号"),g.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"为保障奖金的及时发放,请队长如实填写你名下的银行卡信息")),g.a.createElement(Ne,{dispatch:y,userid:b})),null!=f&&f.leader?g.a.createElement("div",{style:{padding:"20px"}},g.a.createElement("p",{style:{display:"flex"}},g.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"开户行:"),g.a.createElement("span",null,(null==f?void 0:f.teams)&&(null==f||null===(r=f.teams[0])||void 0===r||null===(i=r.bank_account)||void 0===i?void 0:i.bank)||"--")),g.a.createElement("p",{style:{display:"flex"}},g.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"支行:"),g.a.createElement("span",null,(null==f?void 0:f.teams)&&(null==f||null===(o=f.teams[0])||void 0===o||null===(s=o.bank_account)||void 0===s?void 0:s.second_bank)||"--")),g.a.createElement("p",{style:{display:"flex"}},g.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"账号:"),g.a.createElement("span",null,(null==f?void 0:f.teams)&&(null==f||null===(l=f.teams[0])||void 0===l||null===(d=l.bank_account)||void 0===d?void 0:d.card_no)||"--"))):null,g.a.createElement(De,{Scoid:null==v?void 0:v.school_id}),g.a.createElement(de,null))},Be=K.a.TabPane;var Fe=function(e){var t=e.Prize,n=e.Accounts,r=e.getAccounts,i=e.dispatch,o=e.userid;return g.a.createElement("div",{className:"fr"},g.a.createElement("div",{className:"mb100 "},g.a.createElement(K.a,{defaultActiveKey:"1",onChange:function(e){"2"===e&&r()}},g.a.createElement(Be,{tab:"获奖证书下载",key:"1"},g.a.createElement(ne,{Prize:t})),g.a.createElement(Be,{tab:"完善个人信息",key:"2"},g.a.createElement(Pe,{userid:o,dispatch:i,Prize:t,Accounts:n})))))},Ue=n("xKgJ"),He=n("wd/R"),ze=n.n(He),Ge=K.a.TabPane;var Ve=function(e){var t,n,r,i,o,s,l=e.ChartRules,d=e.ItemData,f=e.getCharts,y=e.Selectkey,b=e.HeaderDetail,x=e.getChartRules,w=e.userinfo,E=e.Editable,S=e.dispatch,C=e.StaffDetail,k=Object(m.useState)(!1),_=Object(h.a)(k,2),T=_[0],O=_[1],A=Object(m.useState)(""),D=Object(h.a)(A,2),R=D[0],M=D[1],N=Object(m.useState)(!0),j=Object(h.a)(N,2),P=j[0],B=j[1],F=Object(m.useState)(),U=Object(h.a)(F,2),H=U[0],G=U[1],V=Object(m.useState)(),Y=Object(h.a)(V,2),$=Y[0],J=Y[1],Z=Object(v.i)().identifier;function Q(){return(Q=Object(u.a)(p.a.mark((function e(){var t,n,r,i,o,a,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R){e.next=3;break}return c.b.info("内容不能为空"),e.abrupt("return");case 3:if(B(!1),!(t=null==H?void 0:H.id)){e.next=12;break}return e.next=8,Object(I.a)("/api/competitions/".concat(Z,"/update_md_content.json"),{method:"post",body:{competition_module_id:y,content:R,md_content_id:null===(n=l.rule_contents)||void 0===n||null===(r=n.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(t)})))||void 0===r||null===(i=r[0])||void 0===i?void 0:i.id,stage_id:null==H?void 0:H.id}});case 8:0===e.sent.status&&(c.b.info("更新成功"),O(!1),x()),e.next=16;break;case 12:return e.next=14,Object(I.a)("/api/competitions/".concat(Z,"/update_md_content.json"),{method:"post",body:{competition_module_id:y,content:R,md_content_id:null===(o=l.rule_contents)||void 0===o||null===(a=o.filter((function(e){return 0===parseInt(e.competition_stage_id)})))||void 0===a||null===(s=a[0])||void 0===s?void 0:s.id,stage_id:null==H?void 0:H.id}});case 14:0===e.sent.status&&(c.b.info("更新成功"),O(!1),x());case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Object(m.useEffect)((function(){if(P){var e,t,n,r,i=null==l||null===(e=l.stages)||void 0===e?void 0:e[0];G(i);var o,a,s,c,u,h,d=null==l||null===(t=l.stages)||void 0===t||null===(n=t[0])||void 0===n||null===(r=n.children)||void 0===r?void 0:r[0];if(J(d),null!=i&&i.id)f(null==i?void 0:i.id),M((null===(o=l.rule_contents)||void 0===o||null===(a=o.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==i?void 0:i.id)})))||void 0===a||null===(s=a[0])||void 0===s?void 0:s.content)||"");else f(0),M((null===(c=l.rule_contents)||void 0===c||null===(u=c.filter((function(e){return 0===parseInt(e.competition_stage_id)})))||void 0===u||null===(h=u[0])||void 0===h?void 0:h.content)||"")}}),[l]);var ee=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(e,t,n){return g.a.createElement("span",null,e)}},{title:"附件",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(e){return g.a.createElement(X.a,{title:e},g.a.createElement("span",{title:e},e&&(null==e?void 0:e.length)>=10?(null==e?void 0:e.substr(0,10))+"...":e||"--"))}},{title:"提交人",dataIndex:"user_name",key:"user_name",width:100,render:function(e){return g.a.createElement("span",{title:e},e&&(null==e?void 0:e.length)>=6?(null==e?void 0:e.substr(0,6))+"...":e||"--")}},{title:"提交时间",dataIndex:"created_at",key:"created_at",align:"center"},{title:"状态",dataIndex:"status",key:"status",width:50,render:function(e){return g.a.createElement("span",null,1===e?"计算中":2===e?"完成":0===e?"待计算":3===e&&"错误")}},!(null!=H&&H.display_four_indicators)&&"计图挑战热身赛"===(null==H?void 0:H.name)&&{title:"数据指标1",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(e){return g.a.createElement("span",null,e||"--")}},!(null!=H&&H.display_four_indicators)&&"计图挑战热身赛"===(null==H?void 0:H.name)&&{title:"数据指标2",dataIndex:"data_other",key:"data_other",align:"left",render:function(e){return(null==e?void 0:e.length)>0?null==e?void 0:e.map((function(e,t){return g.a.createElement("span",null,null==e?void 0:e.name,"",null==e?void 0:e.value," ",g.a.createElement("br",null))})):g.a.createElement("span",null,"--")}},(null==H?void 0:H.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(e){return g.a.createElement("span",null,e||"--")}},(null==H?void 0:H.display_four_indicators)&&{title:"美学评分",dataIndex:"data_other",key:"data_other",align:"left",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"score"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},(null==H?void 0:H.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"fid"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},(null==H?void 0:H.display_four_indicators)&&{title:"总分",dataIndex:"data_other",key:"data_other",align:"left",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"total_score"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"Car",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(e){return g.a.createElement("span",null,e||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"Coffee",dataIndex:"data_other",key:"data_other",align:"center",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"Coffee"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"Easyship",dataIndex:"data_other",key:"data_other",align:"center",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"Easyship"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"Scar",dataIndex:"data_other",key:"data_other",align:"center",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"Scar"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"Scarf",dataIndex:"data_other",key:"data_other",align:"center",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"Scarf"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"总分",dataIndex:"data_other",key:"data_other",align:"center",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"Total"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},{title:"操作",dataIndex:"result_url",width:50,key:"result_url",render:function(e){return g.a.createElement("a",{href:e,target:"_blank",download:"附件"},"下载")}}].filter((function(e){return!!e}));return g.a.createElement("div",null,(null==l||null===(t=l.stages)||void 0===t?void 0:t.length)>0?null:g.a.createElement(q,null),(null==l||null===(n=l.stages)||void 0===n?void 0:n.length)>0&&g.a.createElement(K.a,{animated:!0,tabBarExtraContent:null!=w&&w.admin||null!=w&&w.business||E?g.a.createElement(a.a,{onClick:function(){O(!0)}},"编辑"):C.enrolled&&(null==H?void 0:H.start_time)&&(null==H?void 0:H.end_time)&&g.a.createElement("span",null,"提交时间:",ze()(null==H?void 0:H.start_time).format("YYYY-MM-DD HH:mm:ss"),"至",ze()(null==H?void 0:H.end_time).format("YYYY-MM-DD HH:mm:ss"),g.a.createElement(a.a,{style:{marginLeft:"20px"},disabled:ze()(null==H?void 0:H.start_time).unix()>ze()(ze()().format("YYYY-MM-DD HH:mm:s")).unix()||ze()(ze()().format("YYYY-MM-DD HH:mm:s")).unix()>ze()(null==H?void 0:H.end_time).unix(),onClick:function(){S({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(null==$?void 0:$.id)||(null==H?void 0:H.id),id:null==b?void 0:b.id}}})}},"提交结果")),onChange:function(e){var t,n,r,i,o;O(!1);var a=null==l||null===(t=l.stages)||void 0===t?void 0:t.filter((function(t){return parseInt(e)===parseInt(null==t?void 0:t.id)}))[0],s=null==a||null===(n=a.children)||void 0===n?void 0:n[0];J(s),G(a),M((null===(r=l.rule_contents)||void 0===r||null===(i=r.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==a?void 0:a.id)})))||void 0===i||null===(o=i[0])||void 0===o?void 0:o.content)||""),f((null==s?void 0:s.id)||e)}},l&&l.stages.map((function(e,t){return g.a.createElement(Ge,{tab:e.name,key:null===e.id?0:e.id},!1===T&&l&&l.rule_contents.map((function(t,n){return e.id===t.competition_stage_id||null===e.id&&0===t.competition_stage_id?g.a.createElement(L.a,{key:n,value:void 0===t.content||null===t.content?"":t.content}):void 0})))}))),(null==H||null===(r=H.children)||void 0===r?void 0:r.length)>0&&g.a.createElement(K.a,{activeKey:(null==$?void 0:$.id)+"",onChange:function(e){var t,n=null==H||null===(t=H.children)||void 0===t?void 0:t.filter((function(t){return parseInt(e)===parseInt(null==t?void 0:t.id)}))[0];J(n),f(e)}},null==H||null===(i=H.children)||void 0===i?void 0:i.map((function(e,t){return g.a.createElement(Ge,{tab:e.name,key:null===e.id?0:e.id})}))),T&&g.a.createElement("div",null,g.a.createElement(z.a,{defaultValue:R,onChange:function(e){M(e)}}),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(a.a,{style:{width:"90px"},type:"primary",onClick:function(){return function(){return Q.apply(this,arguments)}()}},"提交"),g.a.createElement(a.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return O(!1)}},"取消"))),(null===(o=b.competition_modules.filter((function(e){return e.id===y})))||void 0===o||null===(s=o[0])||void 0===s?void 0:s.show_leaderboard)&&g.a.createElement(W.a,{dataSource:null==d?void 0:d.results,columns:ee}))},We=(n("DjyN"),n("NUBc")),Ke=K.a.TabPane;var qe=function(e){var t,n,i,o,a,l,c=e.loading,d=e.ChartRules,f=e.ItemData,y=e.getCharts,b=(e.Selectkey,e.HeaderDetail,e.getChartRules,e.userinfo,e.Editable,e.dispatch,e.StaffDetail,Object(m.useState)(!1)),x=Object(h.a)(b,2),w=(x[0],x[1]),E=Object(m.useState)(""),S=Object(h.a)(E,2),C=(S[0],S[1]),k=Object(m.useState)(!0),_=Object(h.a)(k,2),T=_[0],O=(_[1],Object(m.useState)()),L=Object(h.a)(O,2),I=L[0],R=L[1],M=Object(m.useState)(),N=Object(h.a)(M,2),j=N[0],P=N[1],B=(Object(v.i)().identifier,Object(m.useState)({page:1,limit:10,sort:"desc"})),F=Object(h.a)(B,2),U=F[0],H=F[1];Object(m.useEffect)((function(){var e;T&&null!=d&&null!==(e=d.stages)&&void 0!==e&&e[0]&&z()}),[null==d||null===(t=d.stages)||void 0===t?void 0:t[0]]);var z=function(){var e=Object(u.a)(p.a.mark((function e(){var t,n,i,o,a,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=null==d||null===(t=d.stages)||void 0===t?void 0:t[0],R(a),s=null==d||null===(n=d.stages)||void 0===n||null===(i=n[0])||void 0===i||null===(o=i.children)||void 0===o?void 0:o[0],P(s),U.id=(null==s?void 0:s.id)||(null==a?void 0:a.id),H(Object(r.a)({},U)),e.next=7,y(Object(r.a)(Object(r.a)({},U),{},{stage_id:U.id}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return g.a.createElement("div",null,(null==d||null===(n=d.stages)||void 0===n?void 0:n.length)>0?null:g.a.createElement(q,null),(null==d||null===(i=d.stages)||void 0===i?void 0:i.length)>0&&g.a.createElement(K.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var e=Object(u.a)(p.a.mark((function e(t){var n,i,o,a,s,l,c;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!1),l=null==d||null===(n=d.stages)||void 0===n?void 0:n.filter((function(e){return parseInt(t)===parseInt(null==e?void 0:e.id)}))[0],c=null==l||null===(i=l.children)||void 0===i?void 0:i[0],P(c),R(l),C((null===(o=d.rule_contents)||void 0===o||null===(a=o.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==l?void 0:l.id)})))||void 0===a||null===(s=a[0])||void 0===s?void 0:s.content)||""),U.page=1,U.limit=10,U.id=(null==c?void 0:c.id)||t,H(Object(r.a)({},U)),e.next=9,y(Object(r.a)({},U));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},d&&d.stages.map((function(e,t){return g.a.createElement(Ke,{tab:e.name,key:null===e.id?0:e.id})}))),(null==I||null===(o=I.children)||void 0===o?void 0:o.length)>0&&g.a.createElement(K.a,{activeKey:(null==j?void 0:j.id)+"",onChange:function(){var e=Object(u.a)(p.a.mark((function e(t){var n,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null==I||null===(n=I.children)||void 0===n?void 0:n.filter((function(e){return parseInt(t)===parseInt(null==e?void 0:e.id)}))[0],P(i),U.page=1,U.limit=10,U.id=t,H(Object(r.a)({},U)),e.next=5,y(Object(r.a)({},U));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},null==I||null===(a=I.children)||void 0===a?void 0:a.map((function(e,t){return g.a.createElement(Ke,{tab:e.name,key:null===e.id?0:e.id})}))),g.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),g.a.createElement("div",{style:{padding:"20px 30px"}},g.a.createElement("span",{style:{cursor:"pointer",marginRight:20},onClick:function(){U.page=1,U.sort="desc"===U.sort?"asc":"desc",H(Object(r.a)({},U)),y(Object(r.a)({},U))}},"按提交时间","asc"===U.sort?"正":"倒","序排序 ",g.a.createElement("i",{className:"iconfont font14 ".concat("asc"===U.sort?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",g.a.createElement(A.a.Search,{onSearch:function(e){U.page=1,U.search=e,H(Object(r.a)({},U)),y(Object(r.a)({},U))},style:{width:"82%"},placeholder:"输入人员/战队名称进行搜索"}),g.a.createElement(s.a,{spinning:c},null==f||null===(l=f.results)||void 0===l?void 0:l.map((function(e,t){return g.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:0===t?14:30}},g.a.createElement("div",{style:{height:60,padding:10,display:"flex",alignItems:"center"}},g.a.createElement("img",{src:D.a.IMG_SERVER+"/images/"+(null==e?void 0:e.image_url),style:{width:40,height:40,borderRadius:"50%"}}),g.a.createElement("div",{style:{marginLeft:10}},g.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},null==e?void 0:e.user_name),g.a.createElement("span",{style:{color:"#999999",fontWeight:400,fontSize:"14px",marginLeft:60}},"所属战队",g.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(null==e?void 0:e.team_name)||"- -")),g.a.createElement("span",{style:{color:"#333333",fontWeight:400,fontSize:"14px",marginLeft:40}},"学校 ",g.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(null==e?void 0:e.school_name)||"- -")))),g.a.createElement("div",{style:{background:"#EEF2F8",height:40,borderRadius:"0px 0px 2px 2px",paddingLeft:60,paddingRight:40,display:"flex",alignItems:"center",justifyContent:"space-between"}},g.a.createElement("div",null,g.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"提交时间:",null==e?void 0:e.created_at),g.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"消耗内存:",(null==e?void 0:e.ts_mem)||"- -","MB"),g.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"代码执行时间:",(null==e?void 0:e.ts_time)||"- -","秒")),g.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(null==e?void 0:e.game_identifier),target:"_blank"},g.a.createElement("i",{className:"iconfont icon-chakandaima",style:{marginRight:4}}),g.a.createElement("span",{style:{lineHeight:"14px"}},"查看代码"))))}))),g.a.createElement(We.a,{total:null==f?void 0:f.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:U.page,onChange:function(e,t){U.page=e,H(Object(r.a)({},U)),y(Object(r.a)({},U))}})))};var Xe=function(e){var t,n=e.item,r=e.index,i=e.StaffDetail,o=Object(m.useState)(!0),s=Object(h.a)(o,2),l=s[0],c=s[1],u=Object(m.useState)(!0),d=Object(h.a)(u,2),f=d[0],p=d[1],v=Object(m.useRef)();return g.a.createElement("div",{style:{border:"1px solid #E3EFFC",borderRadius:"2px",marginTop:20}},g.a.createElement("div",{style:{padding:10,display:"flex",position:"relative"}},g.a.createElement("img",{src:D.a.IMG_SERVER+"/"+(null==n?void 0:n.pic),style:{width:220,height:130,borderRadius:"4px"}}),g.a.createElement("div",{style:{marginLeft:20,width:"75%"}},g.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},g.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},"任务",function(e){var t=["零","一","二","三","四","五","六","七","八","九"],n=["","十","百","千","万"];e=parseInt(e);var r=function(e){for(var r=e.toString().split("").reverse(),i="",o=0;o<r.length;o++)i=(0==o&&0==r[o]||o>0&&0==r[o]&&0==r[o-1]?"":t[r[o]]+(0==r[o]?n[0]:n[o]))+i;return i},i=Math.floor(e/1e4),o=e%1e4;return o.toString().length<4&&(o="0"+o),i?r(i)+"万"+r(o):r(e)}(r+1),"",g.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},null==n?void 0:n.name)),g.a.createElement("span",{style:{color:"#9096A3"}},"关卡",g.a.createElement("span",{style:{color:"#333333",marginLeft:5}},null==n?void 0:n.challenges_count)," ")),g.a.createElement("div",{ref:v},g.a.createElement(L.a,{style:{maxHeight:l&&100},value:null==n?void 0:n.description})),g.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){c(!l)}},l?"阅读全文 ":"收起全文 ",g.a.createElement("i",{className:"iconfont font14 ".concat(l?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),g.a.createElement("div",{style:{marginTop:14,maxHeight:f&&58,overflow:"hidden"}},null==n||null===(t=n.challenges)||void 0===t?void 0:t.map((function(e,t){return g.a.createElement("div",{style:{marginTop:0===t?0:12}},g.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),g.a.createElement("span",{style:{marginLeft:10}},"第",t+1,"关",null==e?void 0:e.name))}))),g.a.createElement("div",{style:{position:"absolute",bottom:14,right:10,color:"#145DFF",cursor:"pointer"}},g.a.createElement("span",{onClick:function(){p(!f)}},f?"展开":"收起"," ",g.a.createElement("i",{className:"iconfont font14 ".concat(f?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(null==i?void 0:i.enrolled)&&g.a.createElement(a.a,{onClick:function(){window.open("/shixuns/".concat(null==n?void 0:n.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"开启挑战")))))},Ye=K.a.TabPane;var $e=function(e){var t,n,i,o,a,l,c=e.loading,d=e.ChartRules,f=e.ItemData,y=e.getCharts,b=(e.Selectkey,e.HeaderDetail,e.getChartRules,e.userinfo,e.Editable,e.dispatch,e.StaffDetail),x=Object(m.useState)(!1),w=Object(h.a)(x,2),E=(w[0],w[1]),S=Object(m.useState)(""),C=Object(h.a)(S,2),k=(C[0],C[1]),_=Object(m.useState)(!0),T=Object(h.a)(_,2),O=T[0],A=(T[1],Object(m.useState)()),L=Object(h.a)(A,2),D=L[0],I=L[1],R=Object(m.useState)(),M=Object(h.a)(R,2),N=M[0],j=M[1],P=(Object(v.i)().identifier,Object(m.useState)({page:1,limit:10})),B=Object(h.a)(P,2),F=B[0],U=B[1],H=Object(m.useState)(),z=Object(h.a)(H,2);z[0],z[1],Object(m.useEffect)((function(){var e;O&&null!=d&&null!==(e=d.stages)&&void 0!==e&&e[0]&&G()}),[null==d||null===(t=d.stages)||void 0===t?void 0:t[0]]);var G=function(){var e=Object(u.a)(p.a.mark((function e(){var t,n,i,o,a,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=null==d||null===(t=d.stages)||void 0===t?void 0:t[0],I(a),s=null==d||null===(n=d.stages)||void 0===n||null===(i=n[0])||void 0===i||null===(o=i.children)||void 0===o?void 0:o[0],j(s),F.id=(null==s?void 0:s.id)||(null==a?void 0:a.id),U(Object(r.a)({},F)),e.next=7,y(Object(r.a)(Object(r.a)({},F),{},{stage_id:F.id}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return g.a.createElement("div",null,(null==d||null===(n=d.stages)||void 0===n?void 0:n.length)>0?null:g.a.createElement(q,null),(null==d||null===(i=d.stages)||void 0===i?void 0:i.length)>0&&g.a.createElement(K.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var e=Object(u.a)(p.a.mark((function e(t){var n,i,o,a,s,l,c;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return E(!1),l=null==d||null===(n=d.stages)||void 0===n?void 0:n.filter((function(e){return parseInt(t)===parseInt(null==e?void 0:e.id)}))[0],c=null==l||null===(i=l.children)||void 0===i?void 0:i[0],j(c),I(l),k((null===(o=d.rule_contents)||void 0===o||null===(a=o.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==l?void 0:l.id)})))||void 0===a||null===(s=a[0])||void 0===s?void 0:s.content)||""),F.page=1,F.limit=10,F.id=(null==c?void 0:c.id)||t,U(Object(r.a)({},F)),e.next=9,y(Object(r.a)({},F));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},d&&d.stages.map((function(e,t){return g.a.createElement(Ye,{tab:e.name,key:null===e.id?0:e.id})}))),(null==D||null===(o=D.children)||void 0===o?void 0:o.length)>0&&g.a.createElement(K.a,{activeKey:(null==N?void 0:N.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var e=Object(u.a)(p.a.mark((function e(t){var n,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null==D||null===(n=D.children)||void 0===n?void 0:n.filter((function(e){return parseInt(t)===parseInt(null==e?void 0:e.id)}))[0],j(i),F.page=1,F.limit=10,F.id=t,U(Object(r.a)({},F)),e.next=5,y(Object(r.a)({},F));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},null==D||null===(a=D.children)||void 0===a?void 0:a.map((function(e,t){return g.a.createElement(Ye,{tab:e.name,key:null===e.id?0:e.id})}))),g.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),g.a.createElement("div",{style:{padding:"20px 30px"}},g.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},g.a.createElement("span",{style:{color:"#9096A3"}},"作品提交时间",g.a.createElement("span",{style:{color:"#333333",marginLeft:5}},null==f?void 0:f.start_time,"~",null==f?void 0:f.end_time)),g.a.createElement("span",{style:{color:"#9096A3"}},"成绩来源",g.a.createElement("span",{style:{color:"#333333",marginLeft:5}},0===(null==f?void 0:f.score_source)?"经验值":"预测准确率")," ")),g.a.createElement(s.a,{spinning:c},null==f||null===(l=f.results)||void 0===l?void 0:l.map((function(e,t){return g.a.createElement(Xe,{StaffDetail:b,item:e,index:t})}))),g.a.createElement(We.a,{total:null==f?void 0:f.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:F.page,onChange:function(e,t){F.page=e,U(Object(r.a)({},F)),y(Object(r.a)({},F))}})))},Je=n("UfjD"),Ze=n("qHvr");t.default=Object(b.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t,user:e.user}}))((function(e){e.globalSetting;var t,n,f,b,x,S,C,k,_=e.loading,O=e.dispatch,A=e.user,L=(Object(d.a)(e,["globalSetting","loading","dispatch","user"]),Object(m.useState)({avatar_url:""})),I=Object(h.a)(L,2),M=I[0],N=I[1],j=Object(m.useState)([]),P=Object(h.a)(j,2),B=P[0],F=P[1],U=Object(v.i)().identifier,z=Object(m.useState)([]),G=Object(h.a)(z,2),W=G[0],K=G[1],q=Object(m.useState)(!0),X=Object(h.a)(q,2),Y=X[0],$=X[1],J=Object(m.useState)([]),Z=Object(h.a)(J,2),Q=Z[0],te=Z[1],ne=Object(m.useState)([]),re=Object(h.a)(ne,2),ie=re[0],oe=re[1],se=Object(m.useState)(!1),le=Object(h.a)(se,2),ce=le[0],ue=le[1],he=Object(m.useState)(!1),de=Object(h.a)(he,2),fe=de[0],pe=de[1],me=Object(m.useState)(!1),ge=Object(h.a)(me,2),ve=ge[0],ye=ge[1],be=Object(m.useState)([]),xe=Object(h.a)(be,2),we=xe[0],Ee=xe[1],Se=Object(m.useState)([]),Ce=Object(h.a)(Se,2),ke=Ce[0],_e=Ce[1],Te=Object(m.useState)([]),Oe=Object(h.a)(Te,2),Ae=Oe[0],Le=Oe[1],De=Object(m.useState)(!1),Ie=Object(h.a)(De,2),Re=Ie[0],Me=Ie[1],Ne=Object(m.useState)([]),je=Object(h.a)(Ne,2),Pe=je[0],Be=je[1],He=Object(m.useState)(),ze=Object(h.a)(He,2),Ge=ze[0],We=ze[1],Ke=Object(m.useState)(!0),Xe=Object(h.a)(Ke,2),Ye=Xe[0],Qe=Xe[1],et=Object(m.useState)(!1),tt=Object(h.a)(et,2),nt=tt[0],rt=tt[1],it=Object(m.useState)(!1),ot=Object(h.a)(it,2),at=ot[0],st=ot[1],lt=Object(m.useState)(!1),ct=Object(h.a)(lt,2),ut=ct[0],ht=ct[1],dt=Object(m.useState)(!1),ft=Object(h.a)(dt,2),pt=ft[0],mt=ft[1],gt=Object(m.useState)(!1),vt=Object(h.a)(gt,2),yt=vt[0],bt=vt[1],xt=Object(m.useState)(!0),wt=Object(h.a)(xt,2),Et=wt[0],St=wt[1],Ct=Object(v.h)(),kt=Object(m.useRef)(null);function _t(){return Tt.apply(this,arguments)}function Tt(){return(Tt=Object(u.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=F,e.next=3,O({type:"competitions/getStaff",payload:{identifier:U}});case 3:return e.t1=e.sent,(0,e.t0)(e.t1),e.next=7,O({type:"competitions/getHeader",payload:{identifier:U}});case 7:t=e.sent,N(t),Object(ae.V)((null==t?void 0:t.name)||"竞赛");case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ot(e){return At.apply(this,arguments)}function At(){return(At=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Le(t.id),Ae=t.id,te(t),"entrance"!==t.module_type){e.next=9;break}return e.next=6,O({type:"competitions/getItem",payload:{url:t.module_url,module_type:"entrance"}});case 6:n=e.sent,e.next=12;break;case 9:return e.next=11,O({type:"competitions/getItem",payload:{url:t.module_url}});case 11:n=e.sent;case 12:ue(!1),ye(!1),Me(!1),K(n),rt(!1),st(!1),oe(t.module_type),"chart"===t.module_type?(ue(!0),$(!1),It()):"certificate"===t.module_type?(ye(!0),ue(!1),$(!1),Ht()):"md_tab"===t.module_type?(Me(!0),$(!1),localStorage.setItem("issee","2"),ue(!1),ye(!1),Ft()):"md_shixun"===t.module_type?(rt(!0),$(!1),Ft()):"entrance"===t.module_type?(st(!0),$(!1),Ft()):($(!0),localStorage.setItem("issee","1"));case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Lt(e,t,n){return Dt.apply(this,arguments)}function Dt(){return(Dt=Object(u.a)(p.a.mark((function e(t,n,r){var i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.stopPropagation(),Object(R.e)(O)){e.next=3;break}return e.abrupt("return");case 3:if(null==M||!M.is_authentication||null!=A&&null!==(i=A.userInfo)&&void 0!==i&&i.authentication){e.next=6;break}return O({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),e.abrupt("return");case 6:if(null==M||!M.enroll_url){e.next=9;break}return Object(ae.Q)(null==M?void 0:M.enroll_url),e.abrupt("return");case 9:if("ismodel"!==r){e.next=23;break}if(!0!==n.member_of_course){e.next=14;break}Object(ae.Q)("/classrooms/".concat(n.course_id)),e.next=21;break;case 14:if(n.invite_code){e.next=17;break}return c.b.info("本竞赛只面向部分学校/单位开放,你暂时没有参赛资格"),e.abrupt("return");case 17:return e.next=19,O({type:"competitions/addApplytojoincourse",payload:{invite_code:n.invite_code,student:1}});case 19:0===e.sent.status&&Object(ae.Q)("/classrooms/".concat(n.course_id));case 21:e.next=27;break;case 23:if(!0!==B.enrolled){e.next=26;break}return Object(ae.Q)(r),e.abrupt("return");case 26:ht(!0);case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function It(){return Rt.apply(this,arguments)}function Rt(){return(Rt=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=pe,e.next=3,O({type:"competitions/ChartRules",payload:{identifier:U}});case 3:return e.t1=e.sent,e.next=6,(0,e.t0)(e.t1);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mt(){return(Mt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O({type:"competitions/Charts",payload:{identifier:U,stage_id:t}});case 2:n=e.sent,K(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nt(){return(Nt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Qe(!0),e.next=3,O({type:"competitions/Results",payload:Object(r.a)({identifier:U,stage_id:null==t?void 0:t.id},t)});case 3:n=e.sent,K(n),Qe(!1);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function jt(){return(jt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Qe(!0),e.next=3,O({type:"competitions/Results",payload:Object(r.a)({identifier:U,stage_id:null==t?void 0:t.id,module_type:"entrance"},t)});case 3:n=e.sent,K(n),Qe(!1);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Pt(e){return Bt.apply(this,arguments)}function Bt(){return(Bt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O({type:"competitions/Results",payload:{identifier:U,stage_id:t}});case 2:if(n=e.sent,"1"!==localStorage.getItem("issee")){e.next=5;break}return e.abrupt("return");case 5:K(n);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ft(){return Ut.apply(this,arguments)}function Ut(){return(Ut=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=Be,e.next=3,O({type:"competitions/TabResults",payload:{identifier:U,competition_module_id:Ae}});case 3:e.t1=e.sent,(0,e.t0)(e.t1);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ht(){return zt.apply(this,arguments)}function zt(){return(zt=Object(u.a)(p.a.mark((function e(){var t,n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O({type:"competitions/Prize",payload:{identifier:U,user_id:null==A||null===(t=A.userInfo)||void 0===t?void 0:t.user_id}});case 2:n=e.sent,Ee(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gt(){return(Gt=Object(u.a)(p.a.mark((function e(){var t,n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O({type:"competitions/Accounts",payload:{id:null==A||null===(t=A.userInfo)||void 0===t?void 0:t.user_id}});case 2:n=e.sent,_e(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vt(){return(Vt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Et){e.next=2;break}return e.abrupt("return");case 2:if(St(!1),!Wt()){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,O({type:"competitions/AddTeam",payload:{identifier:U,name:t}});case 7:(n=e.sent)&&0===n.status?(c.b.info("创建战队成功"),_t(),mt(!1)):St(!0);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wt(){var e,t,n,r;if(null!=A&&null!==(e=A.userInfo)&&void 0!==e&&e.is_teacher){if(null!=B&&null!==(n=B.teacher_staff)&&void 0!==n&&n.mutiple_limited&&null!=B&&B.enrolled)return c.b.info("你已经报名,不能重复报名"),St(!0),!0}else if(null!=B&&null!==(r=B.member_staff)&&void 0!==r&&r.mutiple_limited&&null!=B&&B.enrolled)return c.b.info("你已经报名,不能重复报名"),St(!0),!0;if(null!=B&&B.enroll_ended)return c.b.info("报名已截止,无需报名"),St(!0),!0;if(null!=A&&null!==(t=A.userInfo)&&void 0!==t&&t.is_teacher){if(!B.teacher_staff)return c.b.info("已禁止老师报名"),St(!0),!0}else if(null==B||!B.member_staff)return c.b.info("已禁止学生报名"),St(!0),!0}function Kt(){return(Kt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Et){e.next=2;break}return e.abrupt("return");case 2:if(!Wt()){e.next=4;break}return e.abrupt("return");case 4:return St(!1),e.next=7,O({type:"competitions/JoinTeam",payload:{identifier:U,invite_code:t}});case 7:(n=e.sent)&&0===n.status?(c.b.info("加入战队成功"),bt(!1),St(!0),_t()):St(!0);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return Object(m.useEffect)((function(){U&&_t(),Object(ae.V)("竞赛")}),[U]),Object(m.useEffect)((function(){var e;We(1===parseInt(null==Ct||null===(e=Ct.query)||void 0===e?void 0:e.type))}),[Ct]),Object(m.useEffect)((function(){var e;if((null==M||null===(e=M.competition_modules)||void 0===e?void 0:e.length)>0){var t,n;if("赛题发布"===(null==Ct||null===(t=Ct.query)||void 0===t?void 0:t.active)){var r,i=null==M||null===(r=M.competition_modules)||void 0===r?void 0:r.find((function(e){return"赛题发布"===e.name}));if(i)return void Ot(i)}Ot(null==M||null===(n=M.competition_modules)||void 0===n?void 0:n[0])}}),[M]),g.a.createElement("div",{className:"edu-container minH500"},g.a.createElement(l.a,{className:"mt10",separator:">"},g.a.createElement(l.a.Item,null,g.a.createElement(y.a,{to:"/competitions/index"},"在线竞赛")),g.a.createElement(l.a.Item,null,M.name,M.sub_title?"-"+M.sub_title:null)),g.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},g.a.createElement(s.a,{spinning:_.effects["competitions/getHeader"]},g.a.createElement("div",{style:{height:"355px",width:"800px"}},(null==M?void 0:M.avatar_url)&&null!==(null==M?void 0:M.avatar_url)&&g.a.createElement("img",{style:{height:"355px",width:"800px"},src:D.a.IMG_SERVER+"/"+(null==M?void 0:M.avatar_url)}),!(null!=M&&M.avatar_url)&&null==(null==M?void 0:M.avatar_url)&&g.a.createElement("img",{style:{height:"355px",width:"800px"},src:D.a.IMG_SERVER+"/images/educoder/competitions/mainbanner.jpg"}))),g.a.createElement("div",{style:{marginLeft:"20px",width:"400px"}},g.a.createElement("p",{className:"".concat(w.a.titlesize)},M.name,M.sub_title?"-"+M.sub_title:null),g.a.createElement("p",{style:{display:"flex",justifyContent:"space-between",marginRight:18}},g.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},g.a.createElement("span",null,"奖金"),null!=M&&M.bonus?g.a.createElement("span",{style:{fontSize:"24px"}},"¥",parseInt(M&&M.bonus).toLocaleString()):g.a.createElement("span",{style:{fontSize:"24px"}},"暂无")),g.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},g.a.createElement("span",null,"浏览"),g.a.createElement("span",{style:{fontSize:"24px"}},parseInt(M&&M.visits_count).toLocaleString())),g.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},g.a.createElement("span",null,"报名"),g.a.createElement("span",{style:{fontSize:"24px"}},parseInt(M&&M.member_count).toLocaleString()))),g.a.createElement("p",{className:w.a.timesize,style:{marginTop:30}},g.a.createElement("span",{style:{color:"#9b9b9b",marginTop:"30px"}},"竞赛时间:"),M.start_time,"~",M.end_time),g.a.createElement("p",{className:w.a.timesize},g.a.createElement("span",{style:{color:"#9b9b9b"}},"报名截止:"),M.enroll_end_time),"ended"===M.competition_status?g.a.createElement("p",{className:w.a.timesize},g.a.createElement("span",{style:{color:"#9b9b9b"}},"竞赛状态:"),"已结束"):null,"nearly_published"===M.competition_status?g.a.createElement("p",{className:w.a.timesize},g.a.createElement("span",{style:{color:"#9b9b9b"}},"竞赛状态:"),"未发布"):null,"progressing"===M.competition_status?g.a.createElement("p",{className:w.a.timesize},g.a.createElement("span",{style:{color:"#9b9b9b"}},"竞赛状态:"),"进行中"):null,g.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},(null==M?void 0:M.mode)<=2&&B.enrolled&&g.a.createElement(a.a,{onClick:function(e){var t;1===(null==M?void 0:M.mode)?Ot(null===(t=M.competition_modules)||void 0===t?void 0:t.find((function(e){return"entrance"===e.module_type}))):Lt(e,M,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:2===(null==M?void 0:M.mode)||1===(null==M?void 0:M.mode)&&(null===(t=M.competition_modules)||void 0===t||null===(n=t.filter((function(e){return"entrance"===e.module_type})))||void 0===n?void 0:n.length)>0?"":"none"},className:w.a.buttonsize},1===(null==M?void 0:M.mode)&&"赛题入口",2===(null==M?void 0:M.mode)&&"进入课堂"),"ended"===M.competition_status?g.a.createElement(a.a,{type:"primary",className:w.a.buttonsize,disabled:!0},"已结束"):null,"nearly_published"===M.competition_status?g.a.createElement(a.a,{type:"primary",className:w.a.buttonsize,disabled:!0},"未发布"):null,"nearly_published"!==M.competition_status&&M.enroll_end&&"ended"!==M.competition_status?g.a.createElement(a.a,{type:"primary",className:w.a.buttonsize,disabled:!0},"报名截止"):null,"progressing"===M.competition_status&&1!=M.enroll_end?g.a.createElement(a.a,{type:"primary",disabled:B.enrolled&&!M.need_attachment,className:w.a.buttonsize,onClick:function(e){var t;B.enrolled&&M.need_attachment?null===(t=kt.current)||void 0===t||t.handleVisible():Lt(e,M,2===M.mode?"ismodel":M.personal?"personal":"/competitions/index/".concat(M.identifier,"/enroll"))}},B.enrolled?M.need_attachment?"上传作品":"已报名":null!=M&&M.enroll_url?"前往大赛官网报名":"立即报名"):null),"游客"!=A.userInfo.real_name&&!(null!=M&&M.enroll_url)&&g.a.createElement("span",{onClick:function(e){return Lt(e,M,2===M.mode?"ismodel":M.personal?"personal":"/competitions/index/".concat(M.identifier,"/enroll"))},className:w.a.myteam},Object(Ue.u)()?"参赛战队>>":"我的战队>>"))),g.a.createElement("div",{className:w.a.bootmdetail},g.a.createElement("div",{className:w.a.flex1},g.a.createElement(o.a,{selectedKeys:["".concat(Ae)]},M&&M.competition_modules&&M.competition_modules.map((function(e,t){if("enroll"!=e.module_type)return g.a.createElement(o.a.Item,{className:w.a.menuItem,onClick:function(){if(null!=e&&e.is_authentication){if(!Object(R.e)(O))return;c.b.info("加入战队才能查看")}else Ot(e)},key:e.id},e.name)})))),g.a.createElement("div",{className:w.a.flex6,style:{padding:(nt||at)&&0}},ve?g.a.createElement(Fe,{dispatch:O,userid:null==A||null===(f=A.userInfo)||void 0===f?void 0:f.user_id,Prize:we,Accounts:ke,getAccounts:function(){return Gt.apply(this,arguments)}}):null,ce?g.a.createElement(ee,{HeaderDetail:M,userinfo:A.userInfo,Editable:null==M||null===(b=M.permission)||void 0===b?void 0:b.editable,getCharts:function(e){return Mt.apply(this,arguments)},getChartRules:It,Selectkey:Ae,ChartRules:fe,ItemData:W}):null,Y?g.a.createElement(H,{ref:kt,StaffDetail:B,HeaderDetail:M,userinfo:A.userInfo,Editable:null==M||null===(x=M.permission)||void 0===x?void 0:x.editable,ItemData:W,setIssee:$,ModelType:ie,dispatch:O}):null,Y||nt||at||ce||ve||Re?null:g.a.createElement(V,{userinfo:A.userInfo,ModelType:ie,getrightdatas:Ot,dispatch:O,MenuItem:Q,setIssee:$,identifier:U,ItemData:W}),Re&&g.a.createElement(Ve,{dispatch:O,StaffDetail:B,userinfo:A.userInfo,HeaderDetail:M,Editable:null==M||null===(S=M.permission)||void 0===S?void 0:S.editable,getCharts:Pt,getChartRules:Ft,Selectkey:Ae,ChartRules:Pe,ItemData:W}),nt&&g.a.createElement(qe,{loading:Ye,dispatch:O,StaffDetail:B,userinfo:A.userInfo,HeaderDetail:M,Editable:null==M||null===(C=M.permission)||void 0===C?void 0:C.editable,getCharts:function(e){return Nt.apply(this,arguments)},getChartRules:Ft,Selectkey:Ae,ChartRules:Pe,ItemData:W}),at&&g.a.createElement($e,{loading:Ye,dispatch:O,StaffDetail:B,userinfo:A.userInfo,HeaderDetail:M,Editable:null==M||null===(k=M.permission)||void 0===k?void 0:k.editable,getCharts:function(e){return jt.apply(this,arguments)},getChartRules:Ft,Selectkey:Ae,ChartRules:Pe,ItemData:W}))),g.a.createElement(E.a,null),g.a.createElement(T,{getResults:Pt}),g.a.createElement(i.a,{visible:Ge,footer:null,width:720,title:"提示",centered:!0,onCancel:function(){return We(!1)}},g.a.createElement("div",{className:w.a.modal},g.a.createElement("div",null,"华为模型王者挑战赛黄金赛正式开启啦"),g.a.createElement("div",null,"本赛段总奖金高达",g.a.createElement("span",{style:{color:"#FF8C29"}},"300,000"),"元"),g.a.createElement("div",null,"1、符合赛题要求的队伍共25支可获得奖金12000RMB/队 "),g.a.createElement("div",null,"2、参与获得“荣耀殿堂”榜主的队伍可获得由中国软件开源创新大赛组委会颁发的黄金宝箱"),g.a.createElement("div",null,"3、各赛题精度最高的队伍可获得由中国软件开源创新大赛组委会颁发的黄金宝箱+荣誉证书;"),g.a.createElement("div",null,"心动吧,那就快点击下方按钮报名参赛"),g.a.createElement(a.a,{type:"primary",onClick:function(){return Object(ae.Q)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"前往报名参赛"))),g.a.createElement(i.a,{title:"选择参赛方式",visible:ut,onCancel:function(){ht(!1)},footer:!1},g.a.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},g.a.createElement(a.a,{type:"primary",style:{height:40},onClick:function(){bt(!0),ht(!1)}},"加入战队参赛"),g.a.createElement(a.a,{style:{height:40},onClick:function(){mt(!0),ht(!1)}},"去创建战队参赛"))),yt?g.a.createElement(Je.a,{isjoin:yt,setJoin:bt,JoinTeams:function(e){return Kt.apply(this,arguments)}}):null,pt?g.a.createElement(Ze.a,{isAddmodle:pt,setIsAdd:mt,createTeam:function(e){return Vt.apply(this,arguments)}}):null)}))},GRuw:
/*!******************************************!*\
!*** ./node_modules/crypto-js/sha224.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o,a,s,l;e.exports=(l=n(/*! ./core */"Ib8C"),n(/*! ./sha256 */"lPiR"),i=(r=l).lib.WordArray,o=r.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=4,e}}),r.SHA224=a._createHelper(s),r.HmacSHA224=a._createHmacHelper(s),l.SHA224)},GfqC:
/*!********************************************************!*\
!*** ./node_modules/rc-upload/es/index.js + 6 modules ***!
\********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("q1tI"),i=n.n(r),o=n("TSYQ"),a=n.n(o);function s(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}function l(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var n=new FormData;e.data&&Object.keys(e.data).forEach((function(t){var r=e.data[t];Array.isArray(r)?r.forEach((function(e){n.append(t+"[]",e)})):n.append(t,e.data[t])})),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(function(e,t){var n="cannot "+e.method+" "+e.action+" "+t.status+"'",r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}(e,t),s(t)):e.onSuccess(s(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return null!==r["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(e){null!==r[e]&&t.setRequestHeader(e,r[e])})),t.send(n),{abort:function(){t.abort()}}}var c=+new Date,u=0;function h(){return"rc-upload-"+c+"-"+ ++u}var d=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=e.type||"",o=i.replace(/\/.*$/,"");return n.some((function(e){var t,n,a=e.trim();return"."===a.charAt(0)?(t=r.toLowerCase(),n=a.toLowerCase(),-1!==t.indexOf(n,t.length-n.length)):/\/\*$/.test(a)?o===a.replace(/\/.*$/,""):i===a}))}return!0};var f=function(e,t,n){var r=function e(r,i){i=i||"",r.isFile?r.file((function(e){n(e)&&(r.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))})):r.isDirectory&&function(e,t){var n=e.createReader(),r=[];!function e(){n.readEntries((function(n){var i=Array.prototype.slice.apply(n);r=r.concat(i),!i.length?t(r):e()}))}()}(r,(function(t){t.forEach((function(t){e(t,""+i+r.name+"/")}))}))};e.forEach((function(e){r(e.webkitGetAsEntry())}))},p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},g=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var x=function(e){function t(){var e,n,r;y(this,t);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=b(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.state={uid:h()},r.reqs={},r.onChange=function(e){var t=e.target.files;r.uploadFiles(t),r.reset()},r.onClick=function(e){var t=r.fileInput;if(t){var n=r.props,i=n.children,o=n.onClick;i&&"button"===i.type&&(t.parentNode.focus(),t.parentNode.querySelector("button").blur()),t.click(),o&&o(e)}},r.onKeyDown=function(e){"Enter"===e.key&&r.onClick()},r.onFileDrop=function(e){var t=r.props.multiple;if(e.preventDefault(),"dragover"!==e.type)if(r.props.directory)f(Array.prototype.slice.call(e.dataTransfer.items),r.uploadFiles,(function(e){return d(e,r.props.accept)}));else{var n=Array.prototype.slice.call(e.dataTransfer.files).filter((function(e){return d(e,r.props.accept)}));!1===t&&(n=n.slice(0,1)),r.uploadFiles(n)}},r.uploadFiles=function(e){var t=Array.prototype.slice.call(e);t.map((function(e){return e.uid=h(),e})).forEach((function(e){r.upload(e,t)}))},r.saveFileInput=function(e){r.fileInput=e},b(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),g(t,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(e,t){var n=this,r=this.props;if(!r.beforeUpload)return setTimeout((function(){return n.post(e)}),0);var i=r.beforeUpload(e,t);i&&i.then?i.then((function(t){var r=Object.prototype.toString.call(t);return"[object File]"===r||"[object Blob]"===r?n.post(t):n.post(e)})).catch((function(e){console.log(e)})):!1!==i&&setTimeout((function(){return n.post(e)}),0)}},{key:"post",value:function(e){var t=this;if(this._isMounted){var n=this.props,r=n.onStart,i=n.onProgress,o=n.transformFile,a=void 0===o?function(e){return e}:o;new Promise((function(t){var r=n.action;return"function"==typeof r&&(r=r(e)),t(r)})).then((function(o){var s=e.uid,c=n.customRequest||l;Promise.resolve(a(e)).then((function(e){var t=n.data;return"function"==typeof t&&(t=t(e)),Promise.all([e,t])})).catch((function(e){console.error(e)})).then((function(a){var l=m(a,2),u=l[0],h=l[1],d={action:o,filename:n.name,data:h,file:u,headers:n.headers,withCredentials:n.withCredentials,method:n.method||"post",onProgress:i?function(t){i(t,e)}:null,onSuccess:function(r,i){delete t.reqs[s],n.onSuccess(r,e,i)},onError:function(r,i){delete t.reqs[s],n.onError(r,i,e)}};r(e),t.reqs[s]=c(d)}))}))}}},{key:"reset",value:function(){this.setState({uid:h()})}},{key:"abort",value:function(e){var t=this.reqs;if(e){var n=e;e&&e.uid&&(n=e.uid),t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach((function(e){t[e]&&t[e].abort&&t[e].abort(),delete t[e]}))}},{key:"render",value:function(){var e,t,n=this.props,r=n.component,o=n.prefixCls,s=n.className,l=n.disabled,c=n.id,u=n.style,h=n.multiple,d=n.accept,f=n.children,m=n.directory,g=n.openFileDialogOnClick,y=n.onMouseEnter,b=n.onMouseLeave,x=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(n,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),w=a()((v(e={},o,!0),v(e,o+"-disabled",l),v(e,s,s),e)),E=l?{}:{onClick:g?this.onClick:function(){},onKeyDown:g?this.onKeyDown:function(){},onMouseEnter:y,onMouseLeave:b,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return i.a.createElement(r,p({},E,{className:w,role:"button",style:u}),i.a.createElement("input",p({},(t=x,Object.keys(t).reduce((function(e,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(e[n]=t[n]),e}),{})),{id:c,type:"file",ref:this.saveFileInput,onClick:function(e){return e.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:d,directory:m?"directory":null,webkitdirectory:m?"webkitdirectory":null,multiple:h,onChange:this.onChange})),f)}}]),t}(r.Component),w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function k(){}var _=function(e){function t(){var e,n,r;S(this,t);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=C(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.saveUploader=function(e){r.uploader=e},C(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),E(t,[{key:"abort",value:function(e){this.uploader.abort(e)}},{key:"render",value:function(){return i.a.createElement(x,w({},this.props,{ref:this.saveUploader}))}}]),t}(r.Component);_.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:k,onError:k,onSuccess:k,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var T=_;t.a=T},H38U:
/*!******************************************!*\
!*** ./node_modules/qr.js/lib/QRCode.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./8BitByte */"f4xo"),i=n(/*! ./RSBlock */"rcnY"),o=n(/*! ./BitBuffer */"wU8J"),a=n(/*! ./util */"Iq15"),s=n(/*! ./Polynomial */"dWSS");function l(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=l.prototype;c.addData=function(e){var t=new r(e);this.dataList.push(t),this.dataCache=null},c.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},c.getModuleCount=function(){return this.moduleCount},c.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=i.getRSBlocks(e,this.errorCorrectLevel),n=new o,r=0,s=0;s<t.length;s++)r+=t[s].dataCount;for(s=0;s<this.dataList.length;s++){var l=this.dataList[s];n.put(l.mode,4),n.put(l.getLength(),a.getLengthInBits(l.mode,e)),l.write(n)}if(n.getLengthInBits()<=8*r)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},c.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},c.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=a.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},c.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var i=0;i<this.modules.length;i++)for(var o=1*i,a=0;a<this.modules[i].length;a++){var s=1*a;this.modules[i][a]&&(r.beginFill(0,100),r.moveTo(s,o),r.lineTo(s+1,o),r.lineTo(s+1,o+1),r.lineTo(s,o+1),r.endFill())}return r},c.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},c.setupPositionAdjustPattern=function(){for(var e=a.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var r=e[t],i=e[n];if(null==this.modules[r][i])for(var o=-2;o<=2;o++)for(var s=-2;s<=2;s++)this.modules[r+o][i+s]=-2==o||2==o||-2==s||2==s||0==o&&0==s}},c.setupTypeNumber=function(e){for(var t=a.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},c.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=a.getBCHTypeInfo(n),i=0;i<15;i++){var o=!e&&1==(r>>i&1);i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(i=0;i<15;i++){o=!e&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!e},c.mapData=function(e,t){for(var n=-1,r=this.moduleCount-1,i=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var l=0;l<2;l++)if(null==this.modules[r][s-l]){var c=!1;o<e.length&&(c=1==(e[o]>>>i&1)),a.getMask(t,r,s-l)&&(c=!c),this.modules[r][s-l]=c,-1==--i&&(o++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(e,t,n){for(var r=i.getRSBlocks(e,t),s=new o,c=0;c<n.length;c++){var u=n[c];s.put(u.mode,4),s.put(u.getLength(),a.getLengthInBits(u.mode,e)),u.write(s)}var h=0;for(c=0;c<r.length;c++)h+=r[c].dataCount;if(s.getLengthInBits()>8*h)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*h+")");for(s.getLengthInBits()+4<=8*h&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*h||(s.put(l.PAD0,8),s.getLengthInBits()>=8*h));)s.put(l.PAD1,8);return l.createBytes(s,r)},l.createBytes=function(e,t){for(var n=0,r=0,i=0,o=new Array(t.length),l=new Array(t.length),c=0;c<t.length;c++){var u=t[c].dataCount,h=t[c].totalCount-u;r=Math.max(r,u),i=Math.max(i,h),o[c]=new Array(u);for(var d=0;d<o[c].length;d++)o[c][d]=255&e.buffer[d+n];n+=u;var f=a.getErrorCorrectPolynomial(h),p=new s(o[c],f.getLength()-1).mod(f);l[c]=new Array(f.getLength()-1);for(d=0;d<l[c].length;d++){var m=d+p.getLength()-l[c].length;l[c][d]=m>=0?p.get(m):0}}var g=0;for(d=0;d<t.length;d++)g+=t[d].totalCount;var v=new Array(g),y=0;for(d=0;d<r;d++)for(c=0;c<t.length;c++)d<o[c].length&&(v[y++]=o[c][d]);for(d=0;d<i;d++)for(c=0;c<t.length;c++)d<l[c].length&&(v[y++]=l[c][d]);return v},e.exports=l},HmJG:
/*!****************************************************************!*\
!*** ./src/components/markdown-editor/upload-image/index.less ***!
\****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},IBYe:
/*!**************************************************!*\
!*** ./node_modules/rc-table/es/sugar/Column.js ***!
\**************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";t.a=function(e){return null}},Ib8C:
/*!****************************************!*\
!*** ./node_modules/crypto-js/core.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){(function(t){var r;e.exports=(r=r||function(e,r){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==t&&t.crypto&&(i=t.crypto),!i)try{i=n(/*! crypto */4)}catch(e){}var o=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),s={},l=s.lib={},c=l.Base={extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=l.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var a=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(o());return new u.init(t,e)}}),h=s.enc={},d=h.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u.init(n,t/2)}},f=h.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new u.init(n,t)}},p=h.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},m=l.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),l=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,c=e.min(4*l,o);if(l){for(var h=0;h<l;h+=a)this._doProcessBlock(i,h);n=i.splice(0,l),r.sigBytes-=c}return new u.init(n,c)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),g=(l.Hasher=m.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new g.HMAC.init(e,n).finalize(t)}}}),s.algo={});return s}(Math),r)}).call(this,n(/*! ./../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},Iq15:
/*!****************************************!*\
!*** ./node_modules/qr.js/lib/util.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./mode */"nVVt"),i=n(/*! ./Polynomial */"dWSS"),o=n(/*! ./math */"dQei"),a=0,s=1,l=2,c=3,u=4,h=5,d=6,f=7,p={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;p.getBCHDigit(t)-p.getBCHDigit(p.G15)>=0;)t^=p.G15<<p.getBCHDigit(t)-p.getBCHDigit(p.G15);return(e<<10|t)^p.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;p.getBCHDigit(t)-p.getBCHDigit(p.G18)>=0;)t^=p.G18<<p.getBCHDigit(t)-p.getBCHDigit(p.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return p.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case a:return(t+n)%2==0;case s:return t%2==0;case l:return n%3==0;case c:return(t+n)%3==0;case u:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case h:return t*n%2+t*n%3==0;case d:return(t*n%2+t*n%3)%2==0;case f:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new i([1],0),n=0;n<e;n++)t=t.multiply(new i([1,o.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:case r.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r++)for(var i=0;i<t;i++){for(var o=0,a=e.isDark(r,i),s=-1;s<=1;s++)if(!(r+s<0||t<=r+s))for(var l=-1;l<=1;l++)i+l<0||t<=i+l||0==s&&0==l||a==e.isDark(r+s,i+l)&&o++;o>5&&(n+=3+o-5)}for(r=0;r<t-1;r++)for(i=0;i<t-1;i++){var c=0;e.isDark(r,i)&&c++,e.isDark(r+1,i)&&c++,e.isDark(r,i+1)&&c++,e.isDark(r+1,i+1)&&c++,0!=c&&4!=c||(n+=3)}for(r=0;r<t;r++)for(i=0;i<t-6;i++)e.isDark(r,i)&&!e.isDark(r,i+1)&&e.isDark(r,i+2)&&e.isDark(r,i+3)&&e.isDark(r,i+4)&&!e.isDark(r,i+5)&&e.isDark(r,i+6)&&(n+=40);for(i=0;i<t;i++)for(r=0;r<t-6;r++)e.isDark(r,i)&&!e.isDark(r+1,i)&&e.isDark(r+2,i)&&e.isDark(r+3,i)&&e.isDark(r+4,i)&&!e.isDark(r+5,i)&&e.isDark(r+6,i)&&(n+=40);var u=0;for(i=0;i<t;i++)for(r=0;r<t;r++)e.isDark(r,i)&&u++;return n+=10*(Math.abs(100*u/t/t-50)/5)}};e.exports=p},K3mO:
/*!******************************************!*\
!*** ./node_modules/crypto-js/evpkdf.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o,a,s,l,c,u;e.exports=(u=n(/*! ./core */"Ib8C"),n(/*! ./sha1 */"3y9D"),n(/*! ./hmac */"WYAk"),i=(r=u).lib,o=i.Base,a=i.WordArray,s=r.algo,l=s.MD5,c=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:l,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,i=r.hasher.create(),o=a.create(),s=o.words,l=r.keySize,c=r.iterations;s.length<l;){n&&i.update(n),n=i.update(e).finalize(t),i.reset();for(var u=1;u<c;u++)n=i.finalize(n),i.reset();o.concat(n)}return o.sigBytes=4*l,o}}),r.EvpKDF=function(e,t,n){return c.create(n).compute(e,t)},u.EvpKDF)},KXlV:
/*!*******************************************!*\
!*** ./src/assets/images/account/job.png ***!
\*******************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/job.65c6034f.png"},KeDT:
/*!**********************************************************!*\
!*** ./src/pages/Competitions/Detail/index.less?modules ***!
\**********************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___3otMp",flex_space_between:"flex_space_between___2nig-",flex_box_vertical_center:"flex_box_vertical_center___3opWF",flex_box_center_end:"flex_box_center_end___1u2JP",flex_box_column:"flex_box_column___1RMsI",wrp:"wrp___-Shy4",bg:"bg___3aDMI",commonimg:"commonimg___15xnD",titlesize:"titlesize___2x92E",timesize:"timesize___3GFem",flex1:"flex1___1D3Li",buttonsize:"buttonsize___3oghG",myteam:"myteam___v6SIK",bootmdetail:"bootmdetail___3hk9v",flex6:"flex6___2iMiQ",menuItem:"menuItem___20c2q",spanprev:"spanprev___1dQoJ",spannext:"spannext___3fFnS",divwidth:"divwidth___1Dk29",receiveclick:"receiveclick___3mYYR",receivealready:"receivealready___20cCL",bkfff:"bkfff___WkCDR","ant-input":"ant-input___Zl9Xd",onediv:"onediv___2hHLH",onetop:"onetop___73xTC",towdiv:"towdiv___nqi1b",towtop:"towtop___pPhtO",threediv:"threediv___2G0u0",threetop:"threetop___2DsrB",imgradius:"imgradius___2WlXC",prize:"prize___1al1u",spanrightradius:"spanrightradius___3VHYc",bottomItem:"bottomItem___1NfPd",myTeam:"myTeam___2A-RJ",downloadpdf:"downloadpdf___1BQ_n",teamItem:"teamItem___220Fc",dash:"dash___3pxuh",modal:"modal___27esx"}},KhGG:
/*!*********************************************!*\
!*** ./src/components/UploadFile/index.tsx ***!
\*********************************************/
/*! exports provided: decrypt, uploadFile, UploadFile, default */
/*! exports used: decrypt, default, uploadFile */function(e,t,n){"use strict";n.d(t,"a",(function(){return S})),n.d(t,"c",(function(){return C}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),i=(n(/*! antd/es/message/style */"miYZ"),n(/*! antd/es/message */"tsqr")),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties */"PpiC"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),c=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),u=(n(/*! antd/es/upload/style */"DZo9"),n(/*! antd/es/upload */"8z0m")),h=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),d=n.n(h),f=n(/*! react */"q1tI"),p=n.n(f),m=n(/*! @/utils/fetch */"ErOA"),g=n(/*! crypto-js */"NFKh"),v=n.n(g),y=n(/*! uuid */"7Cbv"),b=n(/*! umi */"9kvl"),x=n(/*! ali-oss */"mxV5"),w=n.n(x),E=u.a.Dragger,S=function(e){var t=v.a.enc.Utf8.parse("bf3c199c2470cb477d907b1e0917c17b"),n=v.a.enc.Utf8.parse("5183666c72eec9e4"),r=v.a.AES.decrypt(e,t,{iv:n,mode:v.a.mode.CBC});return r.toString(v.a.enc.Utf8)},C=function(){var e=Object(c.a)(d.a.mark((function e(t,n,r){var i,o,a,s,c,u,h,f,p;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.file_name=t.name,e.next=3,Object(m.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return h=e.sent,console.log("decrypt(res.data):",S(h.data)),h.data=JSON.parse(S(h.data)),f=Object(y.a)(),p=new w.a({endpoint:null==h||null===(i=h.data)||void 0===i?void 0:i.end_point,region:null==h||null===(o=h.data)||void 0===o?void 0:o.region,accessKeyId:null==h||null===(a=h.data)||void 0===a?void 0:a.access_key_id,accessKeySecret:null==h||null===(s=h.data)||void 0===s?void 0:s.access_key_secret,bucket:null==h||null===(c=h.data)||void 0===c?void 0:c.bucket,stsToken:null==h||null===(u=h.data)||void 0===u?void 0:u.security_token}),e.abrupt("return",new Promise((function(e,i){var o;p.multipartUpload("".concat(f),new Blob([t],{type:t.type}),Object(l.a)(Object(l.a)({timeout:2e5,partSize:102400},r),{},{callback:{url:null==h||null===(o=h.data)||void 0===o?void 0:o.callback_url,host:null==h?void 0:h.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(m.e)(n)}})).then((function(n){var r;t.response=null===(r=n.data)||void 0===r?void 0:r.data,e(null==n?void 0:n.data)})).catch((function(e){i(e),console.log("err:",e)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();t.b=Object(b.a)((function(e){var t=e.loading,n=e.globalSetting,r=e.user;return{globalSetting:n,loading:t.models.competitions,user:r}}))((function(e){var t,n=e.user,l=e.cancelUpload,u=Object(s.a)(e,["user","cancelUpload"]),h=Object(f.useState)([]),g=Object(a.a)(h,2),v=g[0],b=g[1],x=Object(f.useState)(),C=Object(a.a)(x,2),k=C[0],_=C[1],T={onRemove:function(e){b(Object(o.a)(v.filter((function(t){return t.name!==e.name})))),u.onChange(v.filter((function(t){return t.name!==e.name})))},disabled:u.disabled,multiple:!0,fileList:null==v?void 0:v.map((function(e){return e.file})),customRequest:function(){},beforeUpload:(t=Object(c.a)(d.a.mark((function e(t){var n;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=u.maxSize||1073741824,!v.filter((function(e){return e.name===t.name})).length){e.next=4;break}return i.b.info("".concat(t.name,"已存在,请重新选择")),e.abrupt("return");case 4:if(!((null==t?void 0:t.size)>n)){e.next=7;break}return i.b.info("文件超过".concat(n/1024/1024/1024,"GB不符合上传要求")),e.abrupt("return",!1);case 7:return v.push({name:t.name,file:t}),b(Object(o.a)(v)),u.onChange(v),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},O=function(){var e=Object(c.a)(d.a.mark((function e(t,n){var r,a,s,l,c,h,f,p,g;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.file_name=t.name,f=t.name,e.next=4,Object(m.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if((p=e.sent).data=JSON.parse(S(p.data)),0===(null==p?void 0:p.status)){e.next=12;break}return v[v.findIndex((function(e){return e.name===f}))].status="error",v[v.findIndex((function(e){return e.name===f}))].file.status="error",u.onChange(v),i.b.warn("上传失败,请重新尝试"),e.abrupt("return");case 12:return k=new w.a({endpoint:null==p||null===(r=p.data)||void 0===r?void 0:r.end_point,region:null==p||null===(a=p.data)||void 0===a?void 0:a.region,accessKeyId:null==p||null===(s=p.data)||void 0===s?void 0:s.access_key_id,accessKeySecret:null==p||null===(l=p.data)||void 0===l?void 0:l.access_key_secret,bucket:null==p||null===(c=p.data)||void 0===c?void 0:c.bucket,stsToken:null==p||null===(h=p.data)||void 0===h?void 0:h.security_token}),console.log(t,"file"),_(k),g=Object(y.a)(),e.abrupt("return",new Promise((function(e,r){try{var a;k.multipartUpload("".concat(u.identifier,"/").concat(g).concat(f.indexOf(".")>-1?"."+f.split(".").pop():""),new Blob([t.file],{type:t.file.type}),{timeout:36e5,partSize:1002400,progress:function(e,t,n){try{console.log("进度",e,t,n);var r=v.findIndex((function(e){return e.name===f}));v[r].file.percent=100*e,v[r].tempCheckpoint=t,b(Object(o.a)(v))}catch(e){}},checkpoint:v[v.findIndex((function(e){return e.name===f}))].tempCheckpoint,callback:{customValue:{id:f+""},url:null==p||null===(a=p.data)||void 0===a?void 0:a.callback_url,host:null==p?void 0:p.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(m.e)(n)}}).then((function(n){var r,o=v.findIndex((function(e){return e.name===f})),a="done";if(0===(null===(r=n.data)||void 0===r?void 0:r.status)){var s;t.response=null===(s=n.data)||void 0===s?void 0:s.data;var l=v.findIndex((function(e){return e.name===f}));v[l].status="done",v[l].file.status="done"}else{var c;i.b.warn(null===(c=n.data)||void 0===c?void 0:c.message),a="error"}v[o].status=a,v[o].file.status=a,u.onChange(v),e(null==n?void 0:n.data)})).catch((function(e){v[v.findIndex((function(e){return e.name===f}))].status="error",v[v.findIndex((function(e){return e.name===f}))].file.status="error",i.b.warn("上传失败,请重新尝试"),b(Object(o.a)(v)),u.onChange(v),r(e),console.log("err:",e)}))}catch(e){}})));case 17:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return Object(f.useEffect)((function(){v.every((function(e){return"done"===e||"error"===e}))&&u.onComplete(v)}),[v]),Object(f.useEffect)((function(){var e;l&&(null===(e=k)||void 0===e||e.cancel())}),[l]),Object(f.useEffect)((function(){u.uploading&&v.map(function(){var e=Object(c.a)(d.a.mark((function e(t){var r;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.status&&"error"!==t.status||l){e.next=6;break}return t.status="uploading",t.file.status="uploading",e.next=5,O(t,{login:null==n||null===(r=n.userInfo)||void 0===r?void 0:r.login,container_type:u.container_type,container_id:u.container_id,description:u.description});case 5:e.sent;case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}),[u.uploading]),p.a.createElement(E,Object(r.a)({},T,{height:u.height,className:u.className}),p.a.createElement("p",{className:"ant-upload-hint"},u.text||"拖拽文件或者点击上传"))}))},KmYQ:
/*!***************************************************!*\
!*** ./node_modules/crypto-js/pad-zeropadding.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),r.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},r.pad.ZeroPadding)},LdHM:
/*!********************************************************!*\
!*** ./node_modules/rc-select/es/index.js + 6 modules ***!
\********************************************************/
/*! exports provided: Option, OptGroup, default */
/*! exports used: OptGroup, Option, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/TransBtn.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/generate.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/commonUtil.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/valueUtil.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMemo.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/pickAttrs.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-virtual-list/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return S}));var r=n("1OyB"),i=n("vuIU"),o=n("Ji7U"),a=n("LK+K"),s=n("q1tI"),l=n("rePB"),c=n("Ff2n"),u=n("ODXe"),h=n("4IlW"),d=n("bX4T"),f=n("YrtM"),p=n("TSYQ"),m=n.n(p),g=n("+nKL"),v=n("8OUc"),y=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.id,i=e.flattenOptions,o=e.childrenAsData,a=e.values,p=e.searchValue,y=e.multiple,b=e.defaultActiveFirstOption,x=e.height,w=e.itemHeight,E=e.notFoundContent,S=e.open,C=e.menuItemSelectedIcon,k=e.virtual,_=e.onSelect,T=e.onToggleOpen,O=e.onActiveValue,A=e.onScroll,L=e.onMouseEnter,D="".concat(n,"-item"),I=Object(f.a)((function(){return i}),[S,i],(function(e,t){return t[0]&&e[1]!==t[1]})),R=s.useRef(null),M=function(e){e.preventDefault()},N=function(e){R.current&&R.current.scrollTo({index:e})},j=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=I.length,r=0;r<n;r+=1){var i=(e+r*t+n)%n,o=I[i],a=o.group,s=o.data;if(!a&&!s.disabled)return i}return-1},P=s.useState((function(){return j(0)})),B=Object(u.a)(P,2),F=B[0],U=B[1],H=function(e){U(e);var t=I[e];t?O(t.data.value,e):O(null,-1)};s.useEffect((function(){H(!1!==b?j(0):-1)}),[I.length,p]),s.useEffect((function(){var e=setTimeout((function(){if(!y&&S&&1===a.size){var e=Array.from(a)[0],t=I.findIndex((function(t){return t.data.value===e}));H(t),N(t)}}));return function(){return clearTimeout(e)}}),[S]);var z=function(e){void 0!==e&&_(e,{selected:!a.has(e)}),y||T(!1)};if(s.useImperativeHandle(t,(function(){return{onKeyDown:function(e){var t=e.which;switch(t){case h.a.UP:case h.a.DOWN:var n=0;if(t===h.a.UP?n=-1:t===h.a.DOWN&&(n=1),0!==n){var r=j(F+n,n);N(r),H(r)}break;case h.a.ENTER:var i=I[F];i&&!i.data.disabled?z(i.data.value):z(void 0),S&&e.preventDefault();break;case h.a.ESC:T(!1)}},onKeyUp:function(){},scrollTo:function(e){N(e)}}})),0===I.length)return s.createElement("div",{role:"listbox",id:"".concat(r,"_list"),className:"".concat(D,"-empty"),onMouseDown:M},E);function G(e){var t=I[e];if(!t)return null;var n=t.data||{},i=n.value,l=n.label,c=n.children,u=Object(d.a)(n,!0),h=o?c:l;return t?s.createElement("div",Object.assign({"aria-label":"string"==typeof h?h:null},u,{key:e,role:"option",id:"".concat(r,"_list_").concat(e),"aria-selected":a.has(i)}),i):null}return s.createElement(s.Fragment,null,s.createElement("div",{role:"listbox",id:"".concat(r,"_list"),style:{height:0,width:0,overflow:"hidden"}},G(F-1),G(F),G(F+1)),s.createElement(g.a,{itemKey:"key",ref:R,data:I,height:x,itemHeight:w,fullHeight:!1,onMouseDown:M,onScroll:A,virtual:k,onMouseEnter:L},(function(e,t){var n,r=e.group,i=e.groupOption,u=e.data,h=u.label,d=u.key;if(r)return s.createElement("div",{className:m()(D,"".concat(D,"-group"))},void 0!==h?h:d);var f=u.disabled,p=u.value,g=u.title,y=u.children,b=u.style,x=u.className,w=Object(c.a)(u,["disabled","value","title","children","style","className"]),E=a.has(p),S="".concat(D,"-option"),k=m()(D,S,x,(n={},Object(l.a)(n,"".concat(S,"-grouped"),i),Object(l.a)(n,"".concat(S,"-active"),F===t&&!f),Object(l.a)(n,"".concat(S,"-disabled"),f),Object(l.a)(n,"".concat(S,"-selected"),E),n)),_=o?y:h,T=!C||"function"==typeof C||E;return s.createElement("div",Object.assign({},w,{"aria-selected":E,className:k,title:g,onMouseMove:function(){F===t||f||H(t)},onClick:function(){f||z(p)},style:b}),s.createElement("div",{className:"".concat(S,"-content")},_||p),s.isValidElement(C)||E,T&&s.createElement(v.a,{className:"".concat(D,"-option-state"),customizeIcon:C,customizeIconProps:{isSelected:E}},E?"✓":null))})))}));y.displayName="OptionList";var b=y,x=function(){return null};x.isSelectOption=!0;var w=x,E=function(){return null};E.isSelectOptGroup=!0;var S=E,C=n("VTBJ"),k=n("Zm9Q");function _(e){var t=e.key,n=e.props,r=n.children,i=n.value,o=Object(c.a)(n,["children","value"]);return Object(C.a)({key:t,value:void 0!==i?i:t,children:r},o)}function T(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(k.a)(e).map((function(e,n){if(!s.isValidElement(e)||!e.type)return null;var r=e.type.isSelectOptGroup,i=e.key,o=e.props,a=o.children,l=Object(c.a)(o,["children"]);return t||!r?_(e):Object(C.a)(Object(C.a)({key:"__RC_SELECT_GRP__".concat(null===i?n:i,"__"),label:i},l),{},{options:T(a)})})).filter((function(e){return e}))}var O=n("2Qr1"),A=n("qNPg"),L=n("U8pU"),D=n("Kwbf"),I=n("WKfj");var R=function(e){var t=e.mode,n=e.options,r=e.children,i=e.backfill,o=e.allowClear,a=e.placeholder,l=e.getInputElement,c=e.showSearch,u=e.onSearch,h=e.defaultOpen,d=e.autoFocus,f=e.labelInValue,p=e.value,m=e.inputValue,g=e.optionLabelProp,v="multiple"===t||"tags"===t,y=void 0!==c?c:v||"combobox"===t,b=n||T(r);if(Object(D.a)("tags"!==t||b.every((function(e){return!e.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===t||"combobox"===t){var x=b.some((function(e){return e.options?e.options.some((function(e){return"number"==typeof("value"in e?e.value:e.key)})):"number"==typeof("value"in e?e.value:e.key)}));Object(D.a)(!x,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(D.a)("combobox"!==t||!g,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(D.a)("combobox"===t||!i,"`backfill` only works with `combobox` mode."),Object(D.a)("combobox"===t||!l,"`getInputElement` only work with `combobox` mode."),Object(D.b)("combobox"!==t||!l||!o||!a,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!y&&"combobox"!==t&&"tags"!==t&&Object(D.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(D.b)(!h||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),null!=p){var w=Object(I.d)(p);Object(D.a)(!f||w.every((function(e){return"object"===Object(L.a)(e)&&("key"in e||"value"in e)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(D.a)(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var E=null;Object(k.a)(r).some((function(e){if(!s.isValidElement(e)||!e.type)return!1;var t=e.type;return!t.isSelectOption&&(t.isSelectOptGroup?!Object(k.a)(e.props.children).every((function(t){return!(s.isValidElement(t)&&e.type&&!t.type.isSelectOption)||(E=t.type,!1)})):(E=t,!0))})),E&&Object(D.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(E.displayName||E.name||E,"`.")),Object(D.a)(void 0===m,"`inputValue` is deprecated, please use `searchValue` instead.")}},M=Object(A.a)({prefixCls:"rc-select",components:{optionList:b},convertChildrenToData:T,flattenOptions:O.d,getLabeledValue:O.e,filterOptions:O.b,isValueDisabled:O.g,findValueOption:O.c,warningProps:R,fillOptionsWithMissingValue:O.a}),N=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).selectRef=s.createRef(),e.focus=function(){e.selectRef.current.focus()},e.blur=function(){e.selectRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return s.createElement(M,Object.assign({ref:this.selectRef},this.props))}}]),n}(s.Component);N.Option=w,N.OptGroup=S;var j=N;t.c=j},M8RZ:
/*!**********************************!*\
!*** ./src/components/modal.tsx ***!
\**********************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! react-dom */"i8i4"),u=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e){var i;Object(r.a)(this,n),i=t.call(this,e);var o=window.document;return i.node=o.createElement("div"),o.body.appendChild(i.node),i}return Object(i.a)(n,[{key:"render",value:function(){var e=this.props.children;return Object(c.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(l.a.Component)},MlIO:
/*!********************************************!*\
!*** ./node_modules/crypto-js/x64-core.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o,a,s,l;e.exports=(l=n(/*! ./core */"Ib8C"),i=(r=l).lib,o=i.Base,a=i.WordArray,(s=r.x64={}).Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),s.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var i=e[r];n.push(i.high),n.push(i.low)}return a.create(n,this.sigBytes)},clone:function(){for(var e=o.clone.call(this),t=e.words=this.words.slice(0),n=t.length,r=0;r<n;r++)t[r]=t[r].clone();return e}}),l)},NFKh:
/*!*****************************************!*\
!*** ./node_modules/crypto-js/index.js ***!
\*****************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./x64-core */"MlIO"),n(/*! ./lib-typedarrays */"F+F2"),n(/*! ./enc-utf16 */"qM6L"),n(/*! ./enc-base64 */"ETIr"),n(/*! ./enc-base64url */"wbyO"),n(/*! ./md5 */"cv67"),n(/*! ./sha1 */"3y9D"),n(/*! ./sha256 */"lPiR"),n(/*! ./sha224 */"GRuw"),n(/*! ./sha512 */"1uat"),n(/*! ./sha384 */"uGsb"),n(/*! ./sha3 */"5hvy"),n(/*! ./ripemd160 */"ELcG"),n(/*! ./hmac */"WYAk"),n(/*! ./pbkdf2 */"e7zE"),n(/*! ./evpkdf */"K3mO"),n(/*! ./cipher-core */"OLod"),n(/*! ./mode-cfb */"ALsQ"),n(/*! ./mode-ctr */"9OqN"),n(/*! ./mode-ctr-gladman */"qu8F"),n(/*! ./mode-ofb */"S6kV"),n(/*! ./mode-ecb */"gb/T"),n(/*! ./pad-ansix923 */"qBft"),n(/*! ./pad-iso10126 */"oRuE"),n(/*! ./pad-iso97971 */"jO9C"),n(/*! ./pad-zeropadding */"KmYQ"),n(/*! ./pad-nopadding */"uGxW"),n(/*! ./format-hex */"bQjk"),n(/*! ./aes */"wZgz"),n(/*! ./tripledes */"pA7S"),n(/*! ./rc4 */"w7YG"),n(/*! ./rabbit */"E4JC"),n(/*! ./rabbit-legacy */"PVpz"),r)},NLgs:
/*!***********************************!*\
!*** ./src/utils/verifyLogin.tsx ***!
\***********************************/
/*! exports provided: handleVerify, handleVerifyLogin, handleProfleCompletedModal, handleProfessionalCertificationModal, handleCanShixunAddModal, AuthorizeModel, ShixunStatusModel */
/*! exports used: AuthorizeModel, ShixunStatusModel, handleCanShixunAddModal, handleProfessionalCertificationModal, handleVerify, handleVerifyLogin */function(e,t,n){"use strict";n.d(t,"e",(function(){return w})),n.d(t,"f",(function(){return E})),n.d(t,"d",(function(){return C})),n.d(t,"c",(function(){return k})),n.d(t,"a",(function(){return _})),n.d(t,"b",(function(){return T}));n(/*! antd/es/message/style */"miYZ");var r=n(/*! antd/es/message */"tsqr"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),o=(n(/*! antd/es/modal/style */"2qtc"),n(/*! antd/es/modal */"kLXV")),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),s=n.n(a),l=n(/*! react */"q1tI"),c=n.n(l),u=n(/*! umi */"9kvl"),h=n(/*! ./authority */"xKgJ"),d=n(/*! ./util */"1vsH"),f=n(/*! @ant-design/icons */"RCxd"),p=n(/*! @/assets/images/403Qrcode.png */"mOS8"),m=n.n(p),g=n(/*! @/assets/images/Authorize.png */"1ZF9"),v=n.n(g),y=n(/*! @/assets/images/studnetqun.png */"WdTA"),b=n.n(y),x=n(/*! ./env */"m3rI"),w=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(!E(e)||!S(t))},E=function(e){return!!Object(h.p)()||(e({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},S=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=Object(u.c)()._store.getState(),r=n.user;return!(null===(e=r.userInfo)||void 0===e||!e.profile_completed)||(o.a.confirm({title:"提示",width:530,centered:!0,content:t?"按照有关政策规定,特殊实验需要先绑定手机号才能使用,请先绑定手机号码":"您需要去完善您的个人资料,才能使用此功能",okText:"立即完善",cancelText:"稍后完善",onOk:function(){u.d.push("/account/profile/edit")}}),!1)},C=function(){var e;return!(null===(e=Object(u.c)()._store.getState().user.userInfo)||void 0===e||!e.professional_certification)||(o.a.confirm({title:"提示",centered:!0,content:c.a.createElement("div",{className:"tc"},"您需要去完成您的职业认证,才能使用此功能"),okText:"立即完善",cancelText:"稍后完善",onOk:function(){Object(d.Q)("/account/certification")}}),!1)},k=function(){return!!Object(h.a)()||(o.a.warning({centered:!0,width:530,title:"提示",content:c.a.createElement("div",{className:"tc",style:{marginLeft:-38}},c.a.createElement("p",null,"您可以扫码加群@群管理员,申请操作权限哦!"),c.a.createElement("img",{src:Object(h.t)()?b.a:"".concat(x.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200})),okText:"我知道了",maskClosable:!0}),!1)},_=function(e,t){return!!e||(o.a.confirm({centered:!0,zIndex:1e4,width:530,title:"提示",content:c.a.createElement("div",null,c.a.createElement("p",null,t||"该实践资源需授权后才可使用。 您可以在QQ服务群向管理员申请获得继续操作的权限。"),c.a.createElement("div",{style:{marginLeft:"110px"}},c.a.createElement("img",{src:v.a,width:200}),c.a.createElement("div",{style:{marginLeft:"35px"}},"群号:","714336072"))),okText:"立即联系",cancelText:"取消",onOk:function(){Object(d.Q)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},T=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(u.c)()._store.getState(),a=n.shixunsDetail.detail;return 2===(null==a?void 0:a.public)||1===(null==a?void 0:a.public)||3===(null==a?void 0:a.shixun_status)?(o.a.info({centered:!0,icon:c.a.createElement(f.a,{style:{color:"#faad14"}}),width:460,title:"提示",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,"该实践项目的状态为",2===(null==a?void 0:a.public)?"已公开":1===(null==a?void 0:a.public)?"待审核":"已关闭","",t,"。"),c.a.createElement("p",null,"如有需要,请联系平台管理员进行技术支持。")),c.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:m.a,alt:"二维码",width:160})),okText:"我知道了"}),!0):2===(null==a?void 0:a.shixun_status)&&(o.a.confirm({centered:!0,icon:c.a.createElement(f.a,null),title:"提示",content:c.a.createElement("div",null,c.a.createElement("span",null,"该实践项目已发布,",t,"。"),c.a.createElement("br",null),c.a.createElement("span",null,"如有需要,您可以撤销发布后,再进行操作。")),okText:"撤销发布",cancelText:"取消",onOk:function(){var t;o.a.confirm({width:440,centered:!0,icon:c.a.createElement(f.a,{style:{color:"#faad14"}}),title:"提示",content:"撤销发布后,学员将无法进行练习。是否确认撤销发布?",okText:"确定撤销发布",cancelText:"取消",onOk:(t=Object(i.a)(s.a.mark((function t(){return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e({type:"shixunsDetail/cancelRelease",payload:{id:null==a?void 0:a.identifier}});case 2:401!==t.sent.status&&(r.b.success("撤销发布成功。实训回到未发布的状态。"),e({type:"shixunsDetail/getShixunsDetail",payload:{id:null==a?void 0:a.identifier}}),e({type:"practiceSetting/getCommonData",payload:{id:null==a?void 0:a.identifier}}));case 4:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})}}),!0)}},NnUe:
/*!********************************************************************!*\
!*** ./src/pages/Competitions/Detail/component/index.less?modules ***!
\********************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={modal:"modal___sZeHv",colorBlue:"colorBlue___3FmfG",formWrap:"formWrap___3YEqH",flexRow:"flexRow___37Sa0",flexColumn:"flexColumn___1ykGy",example:"example___7mYRk",exampleImg:"exampleImg___UGH9Y",colorOrange:"colorOrange___1IJLa",uploader:"uploader___3f2Sm",uploadImg:"uploadImg___3WCoA",imageTip:"imageTip___FhklW",uploadTipIcon:"uploadTipIcon___2YZJx",uploadTip:"uploadTip___1eikX",color05101a:"color05101a___1Nuwt",viewLargerImg:"viewLargerImg___Ek8jW",footerWrap:"footerWrap___F9F0q",note:"note___1U6xc",schoolHintWrap:"schoolHintWrap___31S22",colorCDCDCD:"colorCDCDCD___1KqvR",color0152d9:"color0152d9___1YXxu"}},NvD2:
/*!******************************************************!*\
!*** ./node_modules/rc-tree/es/utils/conductUtil.js ***!
\******************************************************/
/*! exports provided: isCheckDisabled, conductCheck */
/*! exports used: conductCheck */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(/*! rc-util/es/warning */"Kwbf");function i(e,t){var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n}function o(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,i=t.checkable;return!(!n&&!r)||!1===i}function a(e,t,n,a){var s,l=[];s=a||o;var c=new Set(e.filter((function(e){var t=!!n[e];return t||l.push(e),t}))),u=new Map,h=0;return Object.keys(n).forEach((function(e){var t=n[e],r=t.level,i=u.get(r);i||(i=new Set,u.set(r,i)),i.add(t),h=Math.max(h,r)})),Object(r.a)(!l.length,"Tree missing follow keys: ".concat(l.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),!0===t?function(e,t,n,r){for(var o=new Set(e),a=new Set,s=0;s<=n;s+=1){(t.get(s)||new Set).forEach((function(e){var t=e.key,n=e.node,i=e.children,a=void 0===i?[]:i;o.has(t)&&!r(n)&&a.filter((function(e){return!r(e.node)})).forEach((function(e){o.add(e.key)}))}))}for(var l=new Set,c=n;c>=0;c-=1){(t.get(c)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!r(n)&&e.parent&&!l.has(e.parent.key))if(r(e.parent.node))l.add(t.key);else{var i=!0,s=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=o.has(t);i&&!n&&(i=!1),s||!n&&!a.has(t)||(s=!0)})),i&&o.add(t.key),s&&a.add(t.key),l.add(t.key)}}))}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(i(a,o))}}(c,u,h,s):function(e,t,n,r,o){for(var a=new Set(e),s=new Set(t),l=0;l<=r;l+=1){(n.get(l)||new Set).forEach((function(e){var t=e.key,n=e.node,r=e.children,i=void 0===r?[]:r;a.has(t)||s.has(t)||o(n)||i.filter((function(e){return!o(e.node)})).forEach((function(e){a.delete(e.key)}))}))}s=new Set;for(var c=new Set,u=r;u>=0;u-=1){(n.get(u)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!o(n)&&e.parent&&!c.has(e.parent.key))if(o(e.parent.node))c.add(t.key);else{var r=!0,i=!1;(t.children||[]).filter((function(e){return!o(e.node)})).forEach((function(e){var t=e.key,n=a.has(t);r&&!n&&(r=!1),i||!n&&!s.has(t)||(i=!0)})),r||a.delete(t.key),i&&s.add(t.key),c.add(t.key)}}))}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(i(s,a))}}(c,t.halfCheckedKeys,u,h,s)}},OLod:
/*!***********************************************!*\
!*** ./node_modules/crypto-js/cipher-core.js ***!
\***********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./evpkdf */"K3mO"),void(r.lib.Cipher||function(e){var t=r,n=t.lib,i=n.Base,o=n.WordArray,a=n.BufferedBlockAlgorithm,s=t.enc,l=(s.Utf8,s.Base64),c=t.algo.EvpKDF,u=n.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?b:v}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()}),h=(n.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),t.mode={}),d=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),f=h.CBC=function(){var e=d.extend();function t(e,t,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var o=0;o<n;o++)e[t+o]^=r[o]}return e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize;t.call(this,e,n,i),r.encryptBlock(e,n),this._prevBlock=e.slice(n,n+i)}}),e.Decryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,o=e.slice(n,n+i);r.decryptBlock(e,n),t.call(this,e,n,i),this._prevBlock=o}}),e}(),p=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,i=r<<24|r<<16|r<<8|r,a=[],s=0;s<r;s+=4)a.push(i);var l=o.create(a,r);e.concat(l)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},m=(n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:f,padding:p}),reset:function(){var e;u.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?o.create([1398893684,1701076831]).concat(n).concat(t):t).toString(l)},parse:function(e){var t,n=l.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=o.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),m.create({ciphertext:n,salt:t})}},v=n.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),a=i.cfg;return m.create({ciphertext:o,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=o.random(8));var i=c.create({keySize:t+n}).compute(e,r),a=o.create(i.words.slice(t),4*n);return i.sigBytes=4*t,m.create({key:i,iv:a,salt:r})}},b=n.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:y}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize);r.iv=i.iv;var o=v.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);return r.iv=i.iv,v.decrypt.call(this,e,t,i.key,r)}})}()))},OZM5:
/*!*****************************************!*\
!*** ./node_modules/rc-tree/es/util.js ***!
\*****************************************/
/*! exports provided: arrDel, arrAdd, posToArr, getPosition, isTreeNode, getDragNodesKeys, calcDropPosition, calcSelectedKeys, convertDataToTree, parseCheckedKeys, conductExpandParent, getDataAndAria */
/*! exports used: arrAdd, arrDel, calcDropPosition, calcSelectedKeys, conductExpandParent, getDataAndAria, getDragNodesKeys, getPosition, isTreeNode, parseCheckedKeys, posToArr */function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"k",(function(){return l})),n.d(t,"h",(function(){return c})),n.d(t,"i",(function(){return u})),n.d(t,"g",(function(){return h})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return f})),n.d(t,"j",(function(){return p})),n.d(t,"e",(function(){return m})),n.d(t,"f",(function(){return g}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),o=(n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),n(/*! react */"q1tI"),n(/*! rc-util/es/warning */"Kwbf"));n(/*! ./TreeNode */"WaYH");function a(e,t){var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function s(e,t){var n=e.slice();return-1===n.indexOf(t)&&n.push(t),n}function l(e){return e.split("-")}function c(e,t){return"".concat(e,"-").concat(t)}function u(e){return e&&e.type&&e.type.isTreeNode}function h(e,t){var n=[e];return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.forEach((function(t){var r=t.key,i=t.children;n.push(r),e(i)}))}(t[e].children),n}function d(e,t){var n=e.clientY,r=t.selectHandle.getBoundingClientRect(),i=r.top,o=r.bottom,a=r.height,s=Math.max(.25*a,2);return n<=i+s?-1:n>=o-s?1:0}function f(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function p(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==Object(i.a)(e))return Object(o.a)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function m(e,t){var n=new Set;return(e||[]).forEach((function(e){!function e(r){if(!n.has(r)){var i=t[r];if(i){n.add(r);var o=i.parent;i.node.disabled||o&&e(o.key)}}}(e)})),Object(r.a)(n)}function g(e){var t={};return Object.keys(e).forEach((function(n){(n.startsWith("data-")||n.startsWith("aria-"))&&(t[n]=e[n])})),t}},Ot1p:
/*!**************************************************************!*\
!*** ./src/components/markdown-editor/index.tsx + 6 modules ***!
\**************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/code-block/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/useInterval.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/tasks/util.js because of ./src/pages/tasks/index.jsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/codemirror/lib/codemirror.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/qrcode.react/lib/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/uuid/dist/esm-browser/v4.js */function(e,t,n){"use strict";n("2qtc");var r=n("kLXV"),i=n("rAM+"),o=(n("miYZ"),n("tsqr")),a=n("9og8"),s=n("tJVT"),l=n("jrin"),c=n("WmNS"),u=n.n(c),h=n("q1tI"),d=n.n(h),f=n("VrN/"),p=n.n(f),m=n("bdgK"),g=(n("p77/"),n("Bd2K"),n("ELLl"),n("19Vz"),n("lZu9"),n("+NIl"),n("kSUc"),n("9Bee")),v=function(e){var t=e.value,n=void 0===t?"":t,r=(e.className,e.showTextOnly,e.showLines,e.style,Object(h.useMemo)((function(){return""}),[n]));return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))},y=(n("Q9mQ"),n("diRs")),b=n("0Owb"),x=(n("dejd"),n("C+DQ"),n("D1Df")),w=n.n(x),E=n("1vsH"),S=n("m3rI"),C=[{title:"粗体",icon:"icon-bold",actionName:"bold"},{title:"斜体",icon:"icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"icon-file-code",actionName:"code-block"},{title:"链接",icon:"icon-link",actionName:"link"},"|",{title:"行内公式",icon:"icon-sum",actionName:"inline-latex"},{title:"多行公式",icon:"icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"icon-picture",actionName:"upload-image"},{title:"表格",icon:"icon-table",actionName:"add-table"},"|",{title:"换行",icon:"icon-minus",actionName:"line-break"},{title:"清空",icon:"icon-eraser",actionName:"eraser"}];function k(e){var t=e.onActionCallback,n=e.title,r=e.icon,i=e.actionName,o=e.className,a=void 0===o?"":o,s=e.children;return d.a.createElement("a",{title:n,className:a,onClick:function(){t(i)}},d.a.createElement("i",{className:"md-iconfont ".concat(r)}),s)}var _=function(e){var t=e.watch,n=e.showNullButton,r=e.onActionCallback,i=e.fullScreen,o=e.insertTemp,a=e.hidetoolBar,s=e.uuid,l=e.setOpenPhones,c=Object(E.E)("_educoder_session_login"),u=Object(E.E)("_educoder_session"),h=[].concat(C,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return d.a.createElement("ul",{className:"markdown-toolbar-container"},!a&&h.map((function(e,t){return d.a.createElement("li",{key:t},e.actionName?d.a.createElement(k,Object(b.a)({},e,{onActionCallback:r})):d.a.createElement("span",{className:"v-line"}))})),n?d.a.createElement("li",null,d.a.createElement(k,{icon:"icon-edit",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"点击插入\b填空项"))):null,o&&d.a.createElement("li",null,d.a.createElement(k,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(o),onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"插入模板"))),d.a.createElement("li",null,d.a.createElement(y.a,{title:"打开手机扫一扫",content:d.a.createElement("div",null,d.a.createElement("span",{style:{display:"none"}},"test----",location.origin+"/upload.html?_educoder_session_login="+c+"&_educoder_session="+u+"&key="+s+"&api="+encodeURIComponent(S.a.API_SERVER)),d.a.createElement(w.a,{size:150,fgColor:"#000",value:location.origin+"/upload.html?_educoder_session_login="+c+"&_educoder_session="+u+"&key="+s+"&api="+encodeURIComponent(S.a.API_SERVER)}))},d.a.createElement("span",{className:"fill-tip",onMouseOver:function(){return l(!0)}},"手机上传文件"))),d.a.createElement("li",{className:"btn-full-screen"},d.a.createElement(k,{icon:"".concat(i?"icon-shrink":"icon-enlarge"),title:i?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})))},T=n("M8RZ"),O=(n("+L6B"),n("2/Rp")),A=(n("y8nQ"),n("Vl3Y")),L=(n("5NDa"),n("5rEg")),D={labelCol:{span:4},wrapperCol:{span:20}},I=function(e){var t=e.callback,n=e.onCancel;return d.a.createElement(A.a,Object(b.a)({},D,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)}}),d.a.createElement(A.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},d.a.createElement(L.a,null)),d.a.createElement(A.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},d.a.createElement(L.a,null)),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(O.a,{type:"ghost",onClick:n},"取消")))},R=n("7ahc"),M=n("k1fw"),N=(n("HmJG"),n("BjJ7")),j=A.a.useForm,P={width:280,marginRight:10},B={labelCol:{span:5},wrapperCol:{span:19}},F=function(e){var t=e.callback,n=e.onCancel,r=j(),i=Object(s.a)(r,1)[0],o=Object(h.useRef)();function a(e,t){i.setFieldsValue({src:"/api/attachments/".concat(e.id,"?type=").concat(e.content_type),type:t.type})}return d.a.createElement(A.a,Object(b.a)({form:i},B,{className:"upload-image-panel",onFinish:function(e){t(Object(M.a)(Object(M.a)({},e),{},{name:o.current}))}}),d.a.createElement(A.a.Item,{label:"文件地址",required:!0},d.a.createElement("div",{className:"flex-container"},d.a.createElement(A.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}]},d.a.createElement(L.a,{style:P})),d.a.createElement(U,{onFileChange:function(e){var t=e.target.files[0];o.current=t.name,H(t,a)}}))),d.a.createElement(A.a.Item,{label:"文件描述",name:"alt"},d.a.createElement(L.a,{style:{width:264}})),d.a.createElement(A.a.Item,{style:{textAlign:"right"}},d.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(O.a,{type:"ghost",onClick:n},"取消")))};function U(e){var t=e.onFileChange;return d.a.createElement("a",{className:"upload-button"},"本地上传",d.a.createElement("input",{type:"file",onChange:t}))}function H(e,t){if(!e)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",e),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var r=new window.XMLHttpRequest;r.withCredentials=!0,r.addEventListener("load",(function(n){t(JSON.parse(n.target.responseText),e)}),!1),r.addEventListener("error",(function(e){console.error(e)}),!1),r.open("POST","".concat(N.a,"/api/attachments.json")),r.send(n)}n("giR+");var z,G,V=n("fyUT"),W=(n("7Kak"),n("9yH6")),K=W.a.Group,q={margin:"0 8px"},X=function(e){var t=e.callback,n=e.onCancel;return d.a.createElement(A.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)}},d.a.createElement("div",{className:"flex-container"},d.a.createElement("span",{style:q},"单元格数:"),d.a.createElement("span",{style:q},"行数"),d.a.createElement(A.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},d.a.createElement(V.a,null)),d.a.createElement("span",{style:q},"列数"),d.a.createElement(A.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},d.a.createElement(V.a,null))),d.a.createElement("div",{className:"flex-container",style:{marginTop:12}},d.a.createElement("span",{style:q},"对齐方式:"),d.a.createElement(A.a.Item,{name:"align"},d.a.createElement(K,null,d.a.createElement(W.a,{value:"default"},d.a.createElement("i",{className:"fa fa-align-justify"})),d.a.createElement(W.a,{value:"left"},d.a.createElement("i",{className:"fa fa-align-left"})),d.a.createElement(W.a,{value:"center"},d.a.createElement("i",{className:"fa fa-align-center"})),d.a.createElement(W.a,{value:"right"},d.a.createElement("i",{className:"fa fa-align-right"}))))),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(O.a,{type:"ghost",onClick:n},"取消")))},Y=n("ErOA"),$=n("7Cbv"),J="------------",Z={default:J,left:":".concat(J),center:":".concat(J,":"),right:"".concat(J,":")},Q=n("9VGf");function ee(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var te=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ne=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],re=(z={},Object(l.a)(z,te+"-B","bold"),Object(l.a)(z,te+"-I","italic"),z),ie=(G={},Object(l.a)(G,"link","添加链接"),Object(l.a)(G,"code-block","添加代码块"),Object(l.a)(G,"upload-image","添加文件"),Object(l.a)(G,"add-table","添加表格"),G);t.a=function(e){var t=e.defaultValue,n=void 0===t?"":t,c=e.onChange,f=e.width,y=void 0===f?"100%":f,b=e.height,x=void 0===b?400:b,w=e.miniToolbar,E=void 0!==w&&w,C=e.isFocus,k=void 0!==C&&C,O=e.watch,A=e.insertTemp,L=e.mode,D=void 0===L?"markdown":L,M=e.id,N=void 0===M?"markdown-editor-id":M,j=e.showResizeBar,P=void 0!==j&&j,B=e.noStorage,U=void 0!==B&&B,z=e.showNullButton,G=void 0!==z&&z,V=e.hidetoolBar,W=void 0!==V&&V,K=e.fullScreen,q=void 0!==K&&K,J=e.onBlur,te=e.onCMBeforeChange,oe=e.onFullScreen,ae=e.className,se=void 0===ae?"":ae,le=e.disablePaste,ce=void 0!==le&&le,ue=e.placeholder,he=void 0===ue?"":ue,de=e.values,fe=void 0===de?"":de,pe=Object(h.useState)(null),me=Object(s.a)(pe,2),ge=me[0],ve=me[1],ye=Object(h.useState)(n),be=Object(s.a)(ye,2),xe=be[0],we=be[1],Ee=Object(h.useState)(O),Se=Object(s.a)(Ee,2),Ce=Se[0],ke=Se[1],_e=Object(h.useState)(q),Te=Object(s.a)(_e,2),Oe=Te[0],Ae=Te[1],Le=Object(h.useState)(""),De=Object(s.a)(Le,2),Ie=De[0],Re=De[1],Me=Object(h.useState)(0),Ne=Object(s.a)(Me,2),je=Ne[0],Pe=Ne[1],Be=Object(h.useState)(x),Fe=Object(s.a)(Be,2),Ue=Fe[0],He=Fe[1],ze=Object(h.useState)(!1),Ge=Object(s.a)(ze,2),Ve=(Ge[0],Ge[1]),We=Object(h.useRef)(Object($.a)()),Ke=Object(h.useRef)(!1),qe=Object(h.useRef)(),Xe=Object(h.useRef)(),Ye=Object(h.useRef)(),$e=Object(h.useRef)(),Je=Object(h.useRef)(),Ze=function(){var e=Object(a.a)(u.a.mark((function e(){var t,n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Y.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:We.current}});case 2:null!=(n=e.sent)&&null!==(t=n.attachments)&&void 0!==t&&t.length&&(console.log("cm:",ge,Xe),n.attachments.map((function(e){e.content_type.indexOf("image")>-1?ge.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):e.content_type.indexOf("video")>-1?ge.replaceSelection('<video width="100%" controls src="'.concat(S.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):e.content_type.indexOf("pdf")>-1?ge.replaceSelection('<a href="'.concat(S.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,'&disposition=inline" target="_blank">').concat(e.name,"</a>")):ge.replaceSelection("[".concat(e.name,"](").concat(S.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")"))})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(h.useEffect)((function(){we(fe),null==ge||ge.setValue(fe)}),[fe]),Object(h.useEffect)((function(){null==oe||oe(Oe)}),[Oe]),Object(h.useEffect)((function(){if(Xe.current){var e=p.a.fromTextArea(Xe.current,{mode:D,lineNumbers:!E,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});function t(t,n){if(!ce){var r=n.clipboardData;if(r){var i=r.types.toString(),a=r.items;if("Files"===i||r.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==D)return;try{var s,l=a[1];"file"===(null===(s=a[0])||void 0===s?void 0:s.kind)&&(l=a[0]);var c=l.getAsFile(),u=c.name.split(".").pop();H(c,(function(t){var n,r,i;t.id?(null==c||null===(n=c.type)||void 0===n?void 0:n.indexOf("image"))>-1?e.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("video"))>-1?e.replaceSelection('<video width="100%" controls src="'.concat(S.a.API_SERVER,"/api/attachments/").concat(t.id,'"></video>')):(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("pdf"))>-1?e.replaceSelection('<a href="'.concat(S.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(c.type,'&disposition=inline" target="_blank">').concat(c.name,"</a>")):ne.includes(u)?e.replaceSelection('<a href="'.concat(S.a.API_SERVER,"/api/attachments/").concat(t.id,'?type=office&disposition=inline" target="_blank">').concat(c.name,"</a>")):e.replaceSelection("[".concat(c.name,"](").concat(S.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))}catch(n){o.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()}return k&&e.focus(),e.on("paste",t),e.on("dragleave",(function(e,t){Ye.current.classList.remove("mouse-hover-md")})),e.on("dragover",(function(e,t){Ye.current.classList.add("mouse-hover-md")})),e.on("drop",(function(t,n){var r;if(Ye.current.classList.add("mouse-hover-md"),(r=n.dataTransfer.files).length>0){n.preventDefault(),n.stopPropagation();for(var i=function(t){var n=r[t],i=n.name.split(".").pop();H(n,(function(t){var r,o,a;t.id?(null==n||null===(r=n.type)||void 0===r?void 0:r.indexOf("image"))>-1?e.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):(null==n||null===(o=n.type)||void 0===o?void 0:o.indexOf("video"))>-1?e.replaceSelection('<video width="100%" controls src="'.concat(S.a.API_SERVER,"/api/attachments/").concat(t.id,'"></video>')):(null==n||null===(a=n.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?e.replaceSelection('<a href="'.concat(S.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(n.type,'&disposition=inline" target="_blank">').concat(n.name,"</a>")):ne.includes(i)?e.replaceSelection('<a href="'.concat(S.a.API_SERVER,"/api/attachments/").concat(t.id,'?type=office&disposition=inline" target="_blank">').concat(n.name,"</a>")):e.replaceSelection("[".concat(n.name,"](").concat(S.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))},o=0;o<r.length;o++)i(o)}})),ve(e),function(){e.off("paste",t)}}}),[]);var Qe=Object(h.useCallback)((function(){Ye.current}),[Ue,Ye,Oe]);Object(h.useEffect)((function(){if(ge){var e=function(){var e=new m.default((function(e){var t,n=Object(i.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&(Qe(),ge.setSize("100%","100%"),ge.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(Xe.current.parentElement),e}();return function(){e.unobserve(Xe.current.parentElement)}}}),[ge,Qe]),Object(h.useEffect)((function(){if(ge){for(var e=[],t=function(){var t=r[n],i=(o=Object(s.a)(t,2))[0],a=o[1],c=Object(l.a)({},i,(function(){et(a)}));e.push(c),ge.addKeyMap(c)},n=0,r=Object.entries(re);n<r.length;n++){var o;t()}return qe.current=setInterval((function(){Ke.current&&Ze()}),4e3),function(){clearInterval(qe.current);var t,n=Object(i.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;ge.removeKeyMap(r)}}catch(e){n.e(e)}finally{n.f()}}}}),[ge]),Object(h.useEffect)((function(){q!==Oe&&Ae(q)}),[q]),Object(Q.a)((function(){if(!U&&je>0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(N);e>=je+1e4&&(!t||t!==xe)&&(window.sessionStorage.setItem(N,xe),Ve(!0))}}),1e4),Object(h.useEffect)((function(){ke(O)}),[ge,O]),Object(h.useEffect)((function(){ge&&k&&ge.focus()}),[ge,k]),Object(h.useEffect)((function(){if(Ce&&ge){var e=ge.getScrollerElement();function t(e){var t=e.target;if(Je.current){var n=t.scrollTop/t.scrollHeight;Je.current.scrollTop=Je.current.scrollHeight*n}}return e.addEventListener("scroll",t),function(){e.removeEventListener("scroll",t)}}}),[ge,Ce]),Object(h.useEffect)((function(){if(ge&&te){function e(e,t){te(e,t)}return ge.on("beforeChange",e),function(){ge.off("beforeChange",e)}}}),[ge,te]),Object(h.useEffect)((function(){if(ge&&J){function e(){J(ge.getValue())}return ge.on("blur",e),function(){ge.off("blur",e)}}}),[ge,J]),Object(h.useEffect)((function(){if(ge){function e(e){var t=e.getValue();we(t),Pe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),c&&c(t)}return ge.on("change",e),function(){ge.off("change",e)}}}),[ge,c]),Object(h.useEffect)((function(){ge&&(null==n?(ge.setValue(""),we("")):n!==ge.getValue()&&(ge.setValue(n),we(n),ge.setCursor(ge.lineCount(),0)))}),[ge,n]);var et=Object(h.useCallback)((function(e){var t=ge.getCursor(),n=ge.getSelection(),r=n.split("\n");switch(e){case"bold":return ge.replaceSelection("**"+n+"**"),""===n&&ge.setCursor(t.line,t.ch+2),ge.focus();case"italic":return ge.replaceSelection("*"+n+"*"),""===n&&ge.setCursor(t.line,t.ch+1),ge.focus();case"code":return ge.replaceSelection("`"+n+"`"),""===n&&ge.setCursor(t.line,t.ch+1),ge.focus();case"inline-latex":return ge.replaceSelection("`$$"+n+"$$`"),""===n&&ge.setCursor(t.line,t.ch+3),ge.focus();case"latex":return ge.replaceSelection("```latex\n"+n+"\n```"),ge.setCursor(t.line+1,n.length+1),ge.focus();case"line-break":return ge.replaceSelection("<br/>\n"),ge.focus();case"list-ul":return""===n?ge.replaceSelection("- "+n):ge.replaceSelection(r.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),ge.focus();case"list-ol":return""===n?ge.replaceSelection("1. "+n):ge.replaceSelection(r.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),ge.focus();case"add-null-ch":return""===n&&ge.setCursor(t.line,t.ch+1),ge.replaceSelection("▁"),ge.focus();case"inster-template-1":return""===n&&ge.setCursor(t.line,t.ch),ge.replaceSelection("\n**模板标题**\n模板正文内容可输入文本内容和粘贴图片等操作"),ge.focus();case"eraser":return ge.setValue(""),ge.focus();case"trigger-watch":return ke(!Ce),ge.focus();case"trigger-full-screen":return Ae(!Oe),ge.focus();case"link":return void Re("link");case"code-block":return void Re("code-block");case"upload-image":return void Re("upload-image");case"add-table":return void Re("add-table");default:throw new Error}}),[ge,Ce,Oe]),tt=Object(h.useCallback)((function(e){switch(Re(""),Ie){case"link":var t=e.title,n=e.link;return ge.replaceSelection("[".concat(t,"](").concat(n,")")),ge.focus();case"code-block":var r=e.language,i=e.content;return ge.replaceSelection(["```"+r,i,"```"].join("\n")),ge.focus();case"upload-image":var o=e.src,a=e.alt,s=e.name;return o.indexOf("type=image")>-1?ge.replaceSelection("![ ".concat(a||""," ]( ").concat(o,' "').concat(a||"",'" )')):o.indexOf("type=application/pdf")>-1?ge.replaceSelection('<a href="'.concat(o,'&disposition=inline" target="_blank">').concat(s,"</a>")):ge.replaceSelection('<a href="'.concat(o,'" target="_blank">').concat(s,"</a>")),ge.focus();case"add-table":for(var l=e.row,c=e.col,u=e.align,h="\n",d=0;d<l;d++){for(var f=[],p=[],m=0;m<c;m++)1===d&&p.push(Z[u]),f.push(" ");1===d&&(h+="| ".concat(p.join(" | ")," |\n")),h+="| ".concat(f.join(1===c?"":" | ")," |\n")}return ge.replaceSelection(h+"\n"),ge.focus();default:throw new Error}}),[ge,Ie]),nt=Object(h.useMemo)((function(){switch(Ie){case"link":return d.a.createElement(I,{callback:tt,onCancel:rt});case"code-block":return d.a.createElement(R.b,{callback:tt,onCancel:rt});case"upload-image":return d.a.createElement(F,{callback:tt,onCancel:rt});case"add-table":return d.a.createElement(X,{callback:tt,onCancel:rt});default:return null}}),[Ie]);function rt(){Re("")}Object(h.useEffect)((function(){if($e.current){var e=$e.current,t=!1,n=0;function r(e){t=!0,n=e.pageY}function i(){t=!1}function o(e){if(t){var r=e.pageY-n;r<0&&(r=0),r>300&&(r=300),He(x+r+"px")}}return e.addEventListener("mousedown",r),document.addEventListener("mousemove",o),document.addEventListener("mouseup",i),function(){e.removeEventListener("mousedown",r),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",i)}}}),[ge,$e]),Object(h.useEffect)((function(){He(x)}),[x]);var it={width:ee(y),height:ee(Ue)};Object(h.useMemo)((function(){if(je){var e=new Date(je),t=e.getHours(),n=e.getMinutes(),r=e.getSeconds();return n=n<10?"0"+n:n,r=r<10?"0"+r:r,"".concat(t=t<10?"0"+t:t,":").concat(n,":").concat(r)}return 0}),[je]);return d.a.createElement(h.Fragment,null,d.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ye},d.a.createElement("div",{className:"markdown-editor-container ".concat(se," ").concat(Ce?"on-preview":""," ").concat(E?"mini":""," ").concat(Oe?"full-screen":""),style:it},d.a.createElement(_,{insertTemp:A,watch:Ce,fullScreen:Oe,showNullButton:G,onActionCallback:et,hidetoolBar:W,uuid:We.current,setOpenPhones:function(){Ke.current=!0}}),d.a.createElement("div",{className:"markdown-editor-body"},d.a.createElement("div",{className:"codemirror-container"},d.a.createElement("textarea",{ref:Xe,placeholder:he})),Ce?d.a.createElement("div",{ref:Je,className:"preview-container"},"stex"===D&&d.a.createElement(v,{value:xe}),"stex"!==D&&d.a.createElement(g.a,{edit:!0,value:xe,replaces:function(e,t){var n=ge.getValue();n=n.replace(e,t),we(n),null==ge||ge.setValue(n)}})):null))),P?d.a.createElement("a",{ref:$e,className:"editor-resize"}):null,d.a.createElement(T.a,null,ie[Ie]?d.a.createElement(r.a,{centered:!0,title:ie[Ie],visible:!0,onCancel:rt,footer:null},nt):null))}},PVpz:
/*!*************************************************!*\
!*** ./node_modules/crypto-js/rabbit-legacy.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./enc-base64 */"ETIr"),n(/*! ./md5 */"cv67"),n(/*! ./evpkdf */"K3mO"),n(/*! ./cipher-core */"OLod"),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=c>>>16|4294901760&u,d=u<<16|65535&c;for(r[0]^=c,r[1]^=h,r[2]^=u,r[3]^=d,r[4]^=c,r[5]^=h,r[6]^=u,r[7]^=d,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),r.RabbitLegacy)},RxwV:
/*!**********************************************************!*\
!*** ./node_modules/rc-cascader/es/index.js + 4 modules ***!
\**********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/array-tree-filter/lib/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/warning/warning.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("q1tI"),i=n("uciX"),o=n("2W6z"),a=n.n(o),s=n("4IlW"),l=n("uK0f"),c=n.n(l);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v,y=((v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(a,e);var t,n,i,o=p(a);function a(){var e;return h(this,a),(e=o.apply(this,arguments)).menuItems={},e.saveMenuItem=function(t){return function(n){e.menuItems[t]=n}},e}return t=a,(n=[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(e){!e.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(e){var t=this.props,n=t.fieldNames,r=t.defaultFieldNames;return n[e]||r[e]}},{key:"getOption",value:function(e,t){var n=this.props,i=n.prefixCls,o=n.expandTrigger,a=n.expandIcon,s=n.loadingIcon,l=this.props.onSelect.bind(this,e,t),c={onClick:l,onDoubleClick:this.props.onItemDoubleClick.bind(this,e,t)},u="".concat(i,"-menu-item"),h=null,d=e[this.getFieldName("children")]&&e[this.getFieldName("children")].length>0;(d||!1===e.isLeaf)&&(u+=" ".concat(i,"-menu-item-expand"),e.loading||(h=r.createElement("span",{className:"".concat(i,"-menu-item-expand-icon")},a))),"hover"!==o||!d&&!1!==e.isLeaf||(c={onMouseEnter:this.delayOnSelect.bind(this,l),onMouseLeave:this.delayOnSelect.bind(this),onClick:l}),this.isActiveOption(e,t)&&(u+=" ".concat(i,"-menu-item-active"),c.ref=this.saveMenuItem(t)),e.disabled&&(u+=" ".concat(i,"-menu-item-disabled"));var f=null;e.loading&&(u+=" ".concat(i,"-menu-item-loading"),f=s||null);var p="";return"title"in e?p=e.title:"string"==typeof e[this.getFieldName("label")]&&(p=e[this.getFieldName("label")]),r.createElement("li",Object.assign({key:e[this.getFieldName("value")],className:u,title:p},c,{role:"menuitem",onMouseDown:function(e){return e.preventDefault()}}),e[this.getFieldName("label")],h,f)}},{key:"getActiveOptions",value:function(e){var t=this,n=this.props.options,r=e||this.props.activeValue;return c()(n,(function(e,n){return e[t.getFieldName("value")]===r[n]}),{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var e=this,t=this.props.options,n=this.getActiveOptions().map((function(t){return t[e.getFieldName("children")]})).filter((function(e){return!!e}));return n.unshift(t),n}},{key:"delayOnSelect",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),"function"==typeof e&&(this.delayTimer=window.setTimeout((function(){e(r),t.delayTimer=null}),150))}},{key:"scrollActiveItemToView",value:function(){for(var e=this.getShowOptions().length,t=0;t<e;t++){var n=this.menuItems[t];n&&n.parentElement&&(n.parentElement.scrollTop=n.offsetTop)}}},{key:"isActiveOption",value:function(e,t){var n=this.props.activeValue;return(void 0===n?[]:n)[t]===e[this.getFieldName("value")]}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,i=t.dropdownMenuColumnStyle;return r.createElement("div",null,this.getShowOptions().map((function(t,o){return r.createElement("ul",{className:"".concat(n,"-menu"),key:o,style:i},t.map((function(t){return e.getOption(t,o)})))})))}}])&&d(t.prototype,n),i&&d(t,i),a}(r.Component)).defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},v),b={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}}};function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function E(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=O(e);if(t){var i=O(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return T(this,n)}}function T(e,t){return!t||"object"!==x(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var A,L=((A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(u,e);var t,n,o,l=_(u);function u(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=l.call(this,e)).setPopupVisible=function(e){var n=t.state.value;"popupVisible"in t.props||t.setState({popupVisible:e}),e&&!t.state.popupVisible&&t.setState({activeValue:n}),t.props.onPopupVisibleChange(e)},t.handleChange=function(e,n,r){var i=n.visible;"keydown"===r.type&&r.keyCode!==s.a.ENTER||(t.props.onChange(e.map((function(e){return e[t.getFieldName("value")]})),e),t.setPopupVisible(i))},t.handlePopupVisibleChange=function(e){t.setPopupVisible(e)},t.handleMenuSelect=function(e,n,r){var i=t.trigger.getRootDomNode();i&&i.focus&&i.focus();var o=t.props,a=o.changeOnSelect,l=o.loadData,c=o.expandTrigger;if(e&&!e.disabled){var u=t.state.activeValue;(u=u.slice(0,n+1))[n]=e[t.getFieldName("value")];var h=t.getActiveOptions(u);if(!1===e.isLeaf&&!e[t.getFieldName("children")]&&l)return a&&t.handleChange(h,{visible:!0},r),t.setState({activeValue:u}),void l(h);var d={};e[t.getFieldName("children")]&&e[t.getFieldName("children")].length?!a||"click"!==r.type&&"keydown"!==r.type||("hover"===c?t.handleChange(h,{visible:!1},r):t.handleChange(h,{visible:!0},r),d.value=u):(t.handleChange(h,{visible:!1},r),d.value=u),d.activeValue=u,("value"in t.props||"keydown"===r.type&&r.keyCode!==s.a.ENTER)&&delete d.value,t.setState(d)}},t.handleItemDoubleClick=function(){t.props.changeOnSelect&&t.setPopupVisible(!1)},t.handleKeyDown=function(e){var n=t.props.children;if(n&&n.props.onKeyDown)n.props.onKeyDown(e);else{var r=E(t.state.activeValue),i=r.length-1<0?0:r.length-1,o=t.getCurrentLevelOptions(),a=o.map((function(e){return e[t.getFieldName("value")]})).indexOf(r[i]);if(e.keyCode===s.a.DOWN||e.keyCode===s.a.UP||e.keyCode===s.a.LEFT||e.keyCode===s.a.RIGHT||e.keyCode===s.a.ENTER||e.keyCode===s.a.SPACE||e.keyCode===s.a.BACKSPACE||e.keyCode===s.a.ESC||e.keyCode===s.a.TAB)if(t.state.popupVisible||e.keyCode===s.a.BACKSPACE||e.keyCode===s.a.LEFT||e.keyCode===s.a.RIGHT||e.keyCode===s.a.ESC||e.keyCode===s.a.TAB){if(e.keyCode===s.a.DOWN||e.keyCode===s.a.UP){e.preventDefault();var l=a;l=-1!==l?e.keyCode===s.a.DOWN?(l+=1)>=o.length?0:l:(l-=1)<0?o.length-1:l:0,r[i]=o[l][t.getFieldName("value")]}else if(e.keyCode===s.a.LEFT||e.keyCode===s.a.BACKSPACE)e.preventDefault(),r.splice(r.length-1,1);else if(e.keyCode===s.a.RIGHT)e.preventDefault(),o[a]&&o[a][t.getFieldName("children")]&&r.push(o[a][t.getFieldName("children")][0][t.getFieldName("value")]);else if(e.keyCode===s.a.ESC||e.keyCode===s.a.TAB)return void t.setPopupVisible(!1);r&&0!==r.length||t.setPopupVisible(!1);var c=t.getActiveOptions(r),u=c[c.length-1];t.handleMenuSelect(u,c.length-1,e),t.props.onKeyDown&&t.props.onKeyDown(e)}else t.setPopupVisible(!0)}},t.saveTrigger=function(e){t.trigger=e};var n=[];return"value"in e?n=e.value||[]:"defaultValue"in e&&(n=e.defaultValue||[]),a()(!("filedNames"in e),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),t.state={popupVisible:e.popupVisible,activeValue:n,value:n,prevProps:e},t.defaultFieldNames={label:"label",value:"value",children:"children"},t}return t=u,o=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r={prevProps:e};return"value"in e&&!function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}((void 0===n?{}:n).value,e.value)&&(r.value=e.value||[],"loadData"in e||(r.activeValue=e.value||[])),"popupVisible"in e&&(r.popupVisible=e.popupVisible),r}}],(n=[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(e){var t=this.defaultFieldNames,n=this.props,r=n.fieldNames,i=n.filedNames;return"filedNames"in this.props?i[e]||t[e]:r[e]||t[e]}},{key:"getFieldNames",value:function(){var e=this.props,t=e.fieldNames,n=e.filedNames;return"filedNames"in this.props?n:t}},{key:"getCurrentLevelOptions",value:function(){var e=this,t=this.props.options,n=void 0===t?[]:t,r=this.state.activeValue,i=void 0===r?[]:r,o=c()(n,(function(t,n){return t[e.getFieldName("value")]===i[n]}),{childrenKeyName:this.getFieldName("children")});return o[o.length-2]?o[o.length-2][this.getFieldName("children")]:E(n).filter((function(e){return!e.disabled}))}},{key:"getActiveOptions",value:function(e){var t=this;return c()(this.props.options||[],(function(n,r){return n[t.getFieldName("value")]===e[r]}),{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var e=this.props,t=e.prefixCls,n=e.transitionName,o=e.popupClassName,a=e.options,s=void 0===a?[]:a,l=e.disabled,c=e.builtinPlacements,u=e.popupPlacement,h=e.children,d=e.dropdownRender,f=w(e,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),p=r.createElement("div",null),m="";s&&s.length>0?p=r.createElement(y,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):m=" ".concat(t,"-menus-empty");var g=p;return d&&(g=d(p)),r.createElement(i.a,Object.assign({ref:this.saveTrigger},f,{popupPlacement:u,builtinPlacements:c,popupTransitionName:n,action:l?[]:["click"],popupVisible:!l&&this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(t,"-menus"),popupClassName:o+m,popup:g}),r.cloneElement(h,{onKeyDown:this.handleKeyDown,tabIndex:l?void 0:0}))}}])&&C(t.prototype,n),o&&C(t,o),u}(r.Component)).defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:b,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},A);t.a=L},S6kV:
/*!********************************************!*\
!*** ./node_modules/crypto-js/mode-ofb.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o;e.exports=(o=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),o.mode.OFB=(r=o.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),n.encryptBlock(o,0);for(var a=0;a<r;a++)e[t+a]^=o[a]}}),r.Decryptor=i,r),o.mode.OFB)},"SA+Z":
/*!********************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/toArray.js ***!
\********************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./arrayWithHoles.js */"wTVA"),i=n(/*! ./iterableToArray.js */"EbDI"),o=n(/*! ./unsupportedIterableToArray.js */"ZhPi"),a=n(/*! ./nonIterableRest.js */"wkBT");e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},SJMd:
/*!****************************************************!*\
!*** ./node_modules/code-prettify/src/prettify.js ***!
\****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){window.PR_SHOULD_USE_CONTINUATION=!0,function(){var e=window,t=["break,continue,do,else,for,if,return,while"],n=[[t,"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"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],r=[n,"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"],i=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],o=[n,"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=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="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",l=[t,"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"],c=[t,"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"],u=[t,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],h=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;function d(e,t,n,r,i){if(n){var o={sourceNode:e,pre:1,langExtension:null,numberLines:null,sourceCode:n,spans:null,basePos:t,decorations:null};r(o),i.push.apply(i,o.decorations)}}var f=/\S/;function p(e){for(var t=void 0,n=e.firstChild;n;n=n.nextSibling){var r=n.nodeType;t=1===r?t?e:n:3===r&&f.test(n.nodeValue)?e:t}return t===e?void 0:t}function m(e,t){var n,r={};!function(){for(var i=e.concat(t),o=[],a={},s=0,l=i.length;s<l;++s){var c=i[s],u=c[3];if(u)for(var h=u.length;--h>=0;)r[u.charAt(h)]=c;var d=c[1],f=""+d;a.hasOwnProperty(f)||(o.push(d),a[f]=null)}o.push(/[\0-\uffff]/),n=function(e){for(var t=0,n=!1,r=!1,i=0,o=e.length;i<o;++i){if((d=e[i]).ignoreCase)r=!0;else if(/[a-z]/i.test(d.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){n=!0,r=!1;break}}var a={b:8,t:9,n:10,v:11,f:12,r:13};function s(e){var t=e.charCodeAt(0);if(92!==t)return t;var n=e.charAt(1);return(t=a[n])||("0"<=n&&n<="7"?parseInt(e.substring(1),8):"u"===n||"x"===n?parseInt(e.substring(2),16):e.charCodeAt(1))}function l(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);var t=String.fromCharCode(e);return"\\"===t||"-"===t||"]"===t||"^"===t?"\\"+t:t}function c(e){var t=e.substring(1,e.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")),n=[],r="^"===t[0],i=["["];r&&i.push("^");for(var o=r?1:0,a=t.length;o<a;++o){var c=t[o];if(/\\[bdsw]/i.test(c))i.push(c);else{var u,h=s(c);o+2<a&&"-"===t[o+1]?(u=s(t[o+2]),o+=2):u=h,n.push([h,u]),u<65||h>122||(u<65||h>90||n.push([32|Math.max(65,h),32|Math.min(u,90)]),u<97||h>122||n.push([-33&Math.max(97,h),-33&Math.min(u,122)]))}}n.sort((function(e,t){return e[0]-t[0]||t[1]-e[1]}));var d=[],f=[];for(o=0;o<n.length;++o){(p=n[o])[0]<=f[1]+1?f[1]=Math.max(f[1],p[1]):d.push(f=p)}for(o=0;o<d.length;++o){var p=d[o];i.push(l(p[0])),p[1]>p[0]&&(p[1]+1>p[0]&&i.push("-"),i.push(l(p[1])))}return i.push("]"),i.join("")}function u(e){for(var r=e.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")),i=r.length,o=[],a=0,s=0;a<i;++a){if("("===(h=r[a]))++s;else if("\\"===h.charAt(0)){(u=+h.substring(1))&&(u<=s?o[u]=-1:r[a]=l(u))}}for(a=1;a<o.length;++a)-1===o[a]&&(o[a]=++t);for(a=0,s=0;a<i;++a){if("("===(h=r[a]))o[++s]||(r[a]="(?:");else if("\\"===h.charAt(0)){var u;(u=+h.substring(1))&&u<=s&&(r[a]="\\"+o[u])}}for(a=0;a<i;++a)"^"===r[a]&&"^"!==r[a+1]&&(r[a]="");if(e.ignoreCase&&n)for(a=0;a<i;++a){var h,d=(h=r[a]).charAt(0);h.length>=2&&"["===d?r[a]=c(h):"\\"!==d&&(r[a]=h.replace(/[a-zA-Z]/g,(function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(-33&t,32|t)+"]"})))}return r.join("")}var h=[];for(i=0,o=e.length;i<o;++i){var d;if((d=e[i]).global||d.multiline)throw new Error(""+d);h.push("(?:"+u(d)+")")}return new RegExp(h.join("|"),r?"gi":"g")}(o)}();var i=t.length,o=function(e){for(var a=e.sourceCode,s=e.basePos,l=e.sourceNode,c=[s,"pln"],u=0,h=a.match(n)||[],f={},p=0,m=h.length;p<m;++p){var g,v=h[p],y=f[v],b=void 0;if("string"==typeof y)g=!1;else{var x=r[v.charAt(0)];if(x)b=v.match(x[1]),y=x[0];else{for(var E=0;E<i;++E)if(x=t[E],b=v.match(x[1])){y=x[0];break}b||(y="pln")}!(g=y.length>=5&&"lang-"===y.substring(0,5))||b&&"string"==typeof b[1]||(g=!1,y="src"),g||(f[v]=y)}var S=u;if(u+=v.length,g){var C=b[1],k=v.indexOf(C),_=k+C.length;b[2]&&(k=(_=v.length-b[2].length)-C.length);var T=y.substring(5);d(l,s+S,v.substring(0,k),o,c),d(l,s+S+k,C,w(T,C),c),d(l,s+S+_,v.substring(_),o,c)}else c.push(s+S,y)}e.decorations=c};return o}function g(e){var t=[],n=[];e.tripleQuotedStrings?t.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=e.hashComments;r&&(e.cStyleComments?(r>1?t.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):t.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):t.push(["com",/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push(["com",/^\/\/[^\r\n]*/,null]),n.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var i=e.regexLiterals;if(i){var o=i>1?"":"\n\r",a=o?".":"[\\S\\s]",s="/(?=[^/*"+o+"])(?:[^/\\x5B\\x5C"+o+"]|\\x5C"+a+"|\\x5B(?:[^\\x5C\\x5D"+o+"]|\\x5C"+a+")*(?:\\x5D|$))+/";n.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+s+")")])}var l=e.types;l&&n.push(["typ",l]);var c=(""+e.keywords).replace(/^ | $/g,"");c.length&&n.push(["kwd",new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push(["pln",/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return e.regexLiterals&&(u+="(?!s*/)"),n.push(["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],["pln",/^[a-z_$][a-z_$@0-9]*/i,null],["lit",new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],["pln",/^\\[\s\S]?/,null],["pun",new RegExp(u),null]),m(t,n)}var v=g({keywords:[r,o,i,a,s,l,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function y(e,t,n){for(var r=/(?:^|\s)nocode(?:\s|$)/,i=/\r\n?|\n/,o=e.ownerDocument,a=o.createElement("li");e.firstChild;)a.appendChild(e.firstChild);var s=[a];function l(e){var t=e.nodeType;if(1!=t||r.test(e.className)){if((3==t||4==t)&&n){var a=e.nodeValue,s=a.match(i);if(s){var u=a.substring(0,s.index);e.nodeValue=u;var h=a.substring(s.index+s[0].length);if(h)e.parentNode.insertBefore(o.createTextNode(h),e.nextSibling);c(e),u||e.parentNode.removeChild(e)}}}else if("br"===e.nodeName)c(e),e.parentNode&&e.parentNode.removeChild(e);else for(var d=e.firstChild;d;d=d.nextSibling)l(d)}function c(e){for(;!e.nextSibling;)if(!(e=e.parentNode))return;for(var t,n=function e(t,n){var r=n?t.cloneNode(!1):t,i=t.parentNode;if(i){var o=e(i,1),a=t.nextSibling;o.appendChild(r);for(var s=a;s;s=a)a=s.nextSibling,o.appendChild(s)}return r}(e.nextSibling,0);(t=n.parentNode)&&1===t.nodeType;)n=t;s.push(n)}for(var u=0;u<s.length;++u)l(s[u]);t===(0|t)&&s[0].setAttribute("value",t);var h=o.createElement("ol");h.className="linenums";for(var d=Math.max(0,t-1|0)||0,f=(u=0,s.length);u<f;++u)(a=s[u]).className="L"+(u+d)%10,a.firstChild||a.appendChild(o.createTextNode(" ")),h.appendChild(a);e.appendChild(h)}var b={};function x(t,n){for(var r=n.length;--r>=0;){var i=n[r];b.hasOwnProperty(i)?e.console&&console.warn("cannot override language handler %s",i):b[i]=t}}function w(e,t){return e&&b.hasOwnProperty(e)||(e=/^\s*</.test(t)?"default-markup":"default-code"),b[e]}function E(t){var n,r,i,o,a,s,l,c=t.langExtension;try{var u=(n=t.sourceNode,r=t.pre,i=/(?:^|\s)nocode(?:\s|$)/,o=[],a=0,s=[],l=0,function e(t){var n=t.nodeType;if(1==n){if(i.test(t.className))return;for(var c=t.firstChild;c;c=c.nextSibling)e(c);var u=t.nodeName.toLowerCase();"br"!==u&&"li"!==u||(o[l]="\n",s[l<<1]=a++,s[l++<<1|1]=t)}else if(3==n||4==n){var h=t.nodeValue;h.length&&(h=r?h.replace(/\r\n?/g,"\n"):h.replace(/[ \t\r\n]+/g," "),o[l]=h,s[l<<1]=a,a+=h.length,s[l++<<1|1]=t)}}(n),{sourceCode:o.join("").replace(/\n$/,""),spans:s}),h=u.sourceCode;t.sourceCode=h,t.spans=u.spans,t.basePos=0,w(c,h)(t),function(e){var t=/\bMSIE\s(\d+)/.exec(navigator.userAgent);t=t&&+t[1]<=8;var n,r,i=/\n/g,o=e.sourceCode,a=o.length,s=0,l=e.spans,c=l.length,u=0,h=e.decorations,d=h.length,f=0;for(h[d]=a,r=n=0;r<d;)h[r]!==h[r+2]?(h[n++]=h[r++],h[n++]=h[r++]):r+=2;for(d=n,r=n=0;r<d;){for(var p=h[r],m=h[r+1],g=r+2;g+2<=d&&h[g+1]===m;)g+=2;h[n++]=p,h[n++]=m,r=g}d=h.length=n;var v=e.sourceNode,y="";v&&(y=v.style.display,v.style.display="none");try{for(;u<c;){l[u];var b,x=l[u+2]||a,w=h[f+2]||a,E=(g=Math.min(x,w),l[u+1]);if(1!==E.nodeType&&(b=o.substring(s,g))){t&&(b=b.replace(i,"\r")),E.nodeValue=b;var S=E.ownerDocument,C=S.createElement("span");C.className=h[f+1];var k=E.parentNode;k.replaceChild(C,E),C.appendChild(E),s<x&&(l[u+1]=E=S.createTextNode(o.substring(g,x)),k.insertBefore(E,C.nextSibling))}(s=g)>=x&&(u+=2),s>=w&&(f+=2)}}finally{v&&(v.style.display=y)}}(t)}catch(t){e.console&&console.log(t&&t.stack||t)}}function S(e,t,n){var r=n||!1,i=t||null,o=document.createElement("div");return o.innerHTML="<pre>"+e+"</pre>",o=o.firstChild,r&&y(o,r,!0),E({langExtension:i,numberLines:r,sourceNode:o,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),o.innerHTML}function C(t,n){var r=n||document.body,i=r.ownerDocument||document;function o(e){return r.getElementsByTagName(e)}for(var a=[o("pre"),o("code"),o("xmp")],s=[],l=0;l<a.length;++l)for(var c=0,u=a[l].length;c<u;++c)s.push(a[l][c]);a=null;var h=Date;h.now||(h={now:function(){return+new Date}});var d=0,f=/\blang(?:uage)?-([\w.]+)(?!\S)/,m=/\bprettyprint\b/,g=/\bprettyprinted\b/,v=/pre|xmp/i,b=/^code$/i,x=/^(?:pre|code|xmp)$/i,w={};!function n(){for(var r=e.PR_SHOULD_USE_CONTINUATION?h.now()+250:1/0;d<s.length&&h.now()<r;d++){for(var o=s[d],a=w,l=o;l=l.previousSibling;){var c=l.nodeType,u=(7===c||8===c)&&l.nodeValue;if(u?!/^\??prettify\b/.test(u):3!==c||/\S/.test(l.nodeValue))break;if(u){a={},u.replace(/\b(\w+)=([\w:.%+-]+)/g,(function(e,t,n){a[t]=n}));break}}var S=o.className;if((a!==w||m.test(S))&&!g.test(S)){for(var C=!1,k=o.parentNode;k;k=k.parentNode){var _=k.tagName;if(x.test(_)&&k.className&&m.test(k.className)){C=!0;break}}if(!C){o.className+=" prettyprinted";var T,O,A=a.lang;if(!A)!(A=S.match(f))&&(T=p(o))&&b.test(T.tagName)&&(A=T.className.match(f)),A&&(A=A[1]);if(v.test(o.tagName))O=1;else{var L=o.currentStyle,D=i.defaultView,I=L?L.whiteSpace:D&&D.getComputedStyle?D.getComputedStyle(o,null).getPropertyValue("white-space"):0;O=I&&"pre"===I.substring(0,3)}var R=a.linenums;(R="true"===R||+R)||(R=!!(R=S.match(/\blinenums\b(?::(\d+))?/))&&(!R[1]||!R[1].length||+R[1])),R&&y(o,R,O),E({langExtension:A,sourceNode:o,numberLines:R,pre:O,sourceCode:null,basePos:null,spans:null,decorations:null})}}}d<s.length?e.setTimeout(n,250):"function"==typeof t&&t()}()}x(v,["default-code"]),x(m([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["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"]),x(m([["pln",/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],["pun",/^[=<>\/]+/],["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"]),x(m([],[["atv",/^[\s\S]+/]]),["uq.val"]),x(g({keywords:r,hashComments:!0,cStyleComments:!0,types:h}),["c","cc","cpp","cxx","cyc","m"]),x(g({keywords:"null,true,false"}),["json"]),x(g({keywords:o,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:h}),["cs"]),x(g({keywords:i,cStyleComments:!0}),["java"]),x(g({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),x(g({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),x(g({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),x(g({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),x(g({keywords:a,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),x(g({keywords:"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",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),x(m([],[["str",/^[\s\S]+/]]),["regex"]);var k=e.PR={createSimpleLexer:m,registerLangHandler:x,sourceDecorator:g,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:S,prettyPrint:C},_=e.define;"function"==typeof _&&_.amd&&_("google-code-prettify",[],(function(){return k}))}()},Sjjz:
/*!*******************************************************************************************!*\
!*** ./src/pages/Competitions/Detail/components/AppplyDepartmentModal/index.less?modules ***!
\*******************************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flexRow:"flexRow___1u_bL",flexColumn:"flexColumn___1kaUk",formWrap:"formWrap___31wys",example:"example___Cqoob",footerWrap:"footerWrap___2syNI"}},UfjD:
/*!*******************************************************************!*\
!*** ./src/pages/Competitions/Entered/Enteredmodel/JoinModel.tsx ***!
\*******************************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/modal/style */"2qtc");var r=n(/*! antd/es/modal */"kLXV"),i=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),o=(n(/*! antd/es/message/style */"miYZ"),n(/*! antd/es/message */"tsqr")),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! @ant-design/icons */"4i/N");t.a=function(e){var t=e.isjoin,n=e.setJoin,u=e.JoinTeams,h=Object(s.useState)(""),d=Object(a.a)(h,2),f=d[0],p=d[1];return l.a.createElement(r.a,{centered:!0,title:l.a.createElement("div",{style:{alignItems:"center",display:"flex"}},l.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"加入战队"),l.a.createElement(c.a,{onClick:function(){return n(!1)},style:{cursor:"porint"}})),visible:t,closable:!1,destroyOnClose:!0,onOk:function(){f?u(f):o.b.info("邀请码不能为空")},onCancel:function(){return n(!1)}},l.a.createElement("div",null,l.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px",display:"flex",alignItems:"center"}},l.a.createElement("span",{style:{flex:"none"}},"邀请码:")," ",l.a.createElement(i.a,{placeholder:"请输入邀请码",value:f,maxLength:60,addonAfter:String(f&&f.length||0)+"/60",onChange:function(e){return p(e.target.value)}}))))}},"VrN/":
/*!***************************************************!*\
!*** ./node_modules/codemirror/lib/codemirror.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),h=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),m=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),x=/win/i.test(t),w=h&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,l=!0);var E=y&&(c||h&&(null==w||w<12.11)),S=n||a&&s>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,_=function(e,t){var n=e.className,r=C(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return T(e).appendChild(t)}function A(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function L(e,t,n,r){var i=A(e,t,n,r);return i.setAttribute("role","presentation"),i}function D(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function I(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function R(e,t){var n=e.className;C(t).test(n)||(e.className+=(n?" ":"")+t)}function M(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!C(n[r]).test(t)&&(t+=" "+n[r]);return t}k=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var N=function(e){e.select()};function j(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function P(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function B(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}m?N=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(N=function(e){try{e.select()}catch(e){}});var F=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};function U(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}F.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},F.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var H={toString:function(){return"CodeMirror.Pass"}},z={scroll:!1},G={origin:"*mouse"},V={origin:"+move"};function W(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var K=[""];function q(e){for(;K.length<=e;)K.push(X(K)+" ");return K[e]}function X(e){return e[e.length-1]}function Y(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function $(){}function J(e,t){var n;return Object.create?n=Object.create(e):($.prototype=e,n=new $),t&&P(t,n),n}var Z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Q(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Z.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Q(e))||t.test(e):Q(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,n){for(;(n<0?t>0:t<e.length)&&re(e.charAt(t));)t+=n;return t}function oe(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var ae=null;function se(e,t,n){var r;ae=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ae=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ae=i)}return null!=r?r:ae}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,s){var l="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var c,u=a.length,h=[],d=0;d<u;++d)h.push((c=a.charCodeAt(d))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(c):1424<=c&&c<=1524?"R":1536<=c&&c<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(c-1536):1774<=c&&c<=2220?"r":8192<=c&&c<=8203?"w":8204==c?"b":"L");for(var f=0,p=l;f<u;++f){var m=h[f];"m"==m?h[f]=p:p=m}for(var g=0,v=l;g<u;++g){var y=h[g];"1"==y&&"r"==v?h[g]="n":n.test(y)&&(v=y,"r"==y&&(h[g]="R"))}for(var b=1,x=h[0];b<u-1;++b){var w=h[b];"+"==w&&"1"==x&&"1"==h[b+1]?h[b]="1":","!=w||x!=h[b+1]||"1"!=x&&"n"!=x||(h[b]=x),x=w}for(var E=0;E<u;++E){var S=h[E];if(","==S)h[E]="N";else if("%"==S){var C=void 0;for(C=E+1;C<u&&"%"==h[C];++C);for(var k=E&&"!"==h[E-1]||C<u&&"1"==h[C]?"1":"N",_=E;_<C;++_)h[_]=k;E=C-1}}for(var T=0,O=l;T<u;++T){var A=h[T];"L"==O&&"1"==A?h[T]="L":n.test(A)&&(O=A)}for(var L=0;L<u;++L)if(t.test(h[L])){var D=void 0;for(D=L+1;D<u&&t.test(h[D]);++D);for(var I="L"==(L?h[L-1]:l),R=I==("L"==(D<u?h[D]:l))?I?"L":"R":l,M=L;M<D;++M)h[M]=R;L=D-1}for(var N,j=[],P=0;P<u;)if(r.test(h[P])){var B=P;for(++P;P<u&&r.test(h[P]);++P);j.push(new o(0,B,P))}else{var F=P,U=j.length,H="rtl"==s?1:0;for(++P;P<u&&"L"!=h[P];++P);for(var z=F;z<P;)if(i.test(h[z])){F<z&&(j.splice(U,0,new o(1,F,z)),U+=H);var G=z;for(++z;z<P&&i.test(h[z]);++z);j.splice(U,0,new o(2,G,z)),U+=H,F=z}else++z;F<P&&j.splice(U,0,new o(1,F,P))}return"ltr"==s&&(1==j[0].level&&(N=a.match(/^\s+/))&&(j[0].from=N[0].length,j.unshift(new o(0,0,N[0].length))),1==X(j).level&&(N=a.match(/\s+$/))&&(X(j).to-=N[0].length,j.push(new o(0,u-N[0].length,u)))),"rtl"==s?j.reverse():j}}();function ce(e,t){var n=e.order;return null==n&&(n=e.order=le(e.text,t)),n}var ue=[],he=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||ue).concat(n)}};function de(e,t){return e._handlers&&e._handlers[t]||ue}function fe(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=U(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function pe(e,t){var n=de(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function me(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),pe(e,n||t.type,e,t),we(t)||t.codemirrorIgnore}function ge(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==U(n,t[r])&&n.push(t[r])}function ve(e,t){return de(e,t).length>0}function ye(e){e.prototype.on=function(e,t){he(this,e,t)},e.prototype.off=function(e,t){fe(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ee(e){be(e),xe(e)}function Se(e){return e.target||e.srcElement}function Ce(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var ke,_e,Te=function(){if(a&&s<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function Oe(e){if(null==ke){var t=A("span","");O(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(ke=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=ke?A("span",""):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ae(e){if(null!=_e)return _e;var t=O(e,document.createTextNode("AخA")),n=k(t,0,1).getBoundingClientRect(),r=k(t,1,2).getBoundingClientRect();return T(e),!(!n||n.left==n.right)&&(_e=r.right-n.right<3)}var Le,De=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ie=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Re="oncopy"in(Le=A("div"))||(Le.setAttribute("oncopy","return;"),"function"==typeof Le.oncopy),Me=null,Ne={},je={};function Pe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ne[e]=t}function Be(e){if("string"==typeof e&&je.hasOwnProperty(e))e=je[e];else if(e&&"string"==typeof e.name&&je.hasOwnProperty(e.name)){var t=je[e.name];"string"==typeof t&&(t={name:t}),(e=J(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Be("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Be("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Fe(e,t){t=Be(t);var n=Ne[t.name];if(!n)return Fe(e,"text/plain");var r=n(e,t);if(Ue.hasOwnProperty(t.name)){var i=Ue[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var Ue={};function He(e,t){P(t,Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={})}function ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ge(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ve(e,t,n){return!e.startState||e.startState(t,n)}var We=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ke(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function qe(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function Xe(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function Ye(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function $e(e){if(null==e.parent)return null;for(var t=e.parent,n=U(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function Je(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return n+a}function Ze(e,t){return t>=e.first&&t<e.first+e.size}function Qe(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function et(e,t,n){if(void 0===n&&(n=null),!(this instanceof et))return new et(e,t,n);this.line=e,this.ch=t,this.sticky=n}function tt(e,t){return e.line-t.line||e.ch-t.ch}function nt(e,t){return e.sticky==t.sticky&&0==tt(e,t)}function rt(e){return et(e.line,e.ch)}function it(e,t){return tt(e,t)<0?t:e}function ot(e,t){return tt(e,t)<0?e:t}function at(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function st(e,t){if(t.line<e.first)return et(e.first,0);var n=e.first+e.size-1;return t.line>n?et(n,Ke(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ke(e,t.line).text.length)}function lt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=st(e,t[r]);return n}We.prototype.eol=function(){return this.pos>=this.string.length},We.prototype.sol=function(){return this.pos==this.lineStart},We.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},We.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},We.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},We.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},We.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},We.prototype.skipToEnd=function(){this.pos=this.string.length},We.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},We.prototype.backUp=function(e){this.pos-=e},We.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=B(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},We.prototype.indentation=function(){return B(this.string,null,this.tabSize)-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},We.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},We.prototype.current=function(){return this.string.slice(this.start,this.pos)},We.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},We.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},We.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ut=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function ht(e,t,n,r){var i=[e.state.modeGen],o={};xt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,xt(e,t.text,s.mode,n,(function(e,t){for(var n=l;c<e;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function dt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=ft(e,$e(t)),i=t.text.length>e.options.maxHighlightLength&&ze(e.doc.mode,r.state),o=ht(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ft(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ut(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=Ke(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ct?c.lookAhead:0)<=o.modeFrontier))return s;var u=B(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(e,t,n),a=o>r.first&&Ke(r,o-1).stateAfter,s=a?ut.fromSaved(r,a,o):new ut(r,Ve(r.mode),o);return r.iter(o,t,(function(n){pt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()})),n&&(r.modeFrontier=s.line),s}function pt(e,t,n,r){var i=e.doc.mode,o=new We(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&mt(i,n.state);!o.eol();)gt(i,o,n.state),o.start=o.pos}function mt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ge(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function gt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Ge(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,n){return t instanceof ct?new ut(e,ze(e.mode,t.state),n,t.lookAhead):new ut(e,ze(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yt(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=Ke(a,(t=st(a,t)).line),c=ft(e,t.line,n),u=new We(l.text,e.options.tabSize,c);for(r&&(o=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=gt(s,u,c.state),r&&o.push(new vt(u,i,ze(a.mode,c.state)));return r?o:new vt(u,i,c.state)}function bt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function xt(e,t,n,r,i,o,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,h=new We(t,e.options.tabSize,r),d=e.options.addModeClass&&[null];for(""==t&&bt(mt(n,r.state),o);!h.eol();){if(h.pos>e.options.maxHighlightLength?(s=!1,a&&pt(e,t,r,h.pos),h.pos=t.length,l=null):l=bt(gt(n,h,r.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;c<h.start;)i(c=Math.min(h.start,c+5e3),u);u=l}h.start=h.pos}for(;c<h.pos;){var p=Math.min(h.pos,c+5e3);i(p,u),c=p}}var wt=!1,Et=!1;function St(e,t,n){this.marker=e,this.from=t,this.to=n}function Ct(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function kt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function _t(e,t){if(t.full)return null;var n=Ze(e,t.from.line)&&Ke(e,t.from.line).markedSpans,r=Ze(e,t.to.line)&&Ke(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==tt(t.from,t.to),s=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new St(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new St(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return r}(r,o,a),c=1==t.text.length,u=X(t.text).length+(c?i:0);if(s)for(var h=0;h<s.length;++h){var d=s[h];if(null==d.to){var f=Ct(l,d.marker);f?c&&(d.to=null==f.to?null:f.to+u):d.to=i}}if(l)for(var p=0;p<l.length;++p){var m=l[p];null!=m.to&&(m.to+=u),null==m.from?Ct(s,m.marker)||(m.from=u,c&&(s||(s=[])).push(m)):(m.from+=u,c&&(s||(s=[])).push(m))}s&&(s=Tt(s)),l&&l!=s&&(l=Tt(l));var g=[s];if(!c){var v,y=t.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(v||(v=[])).push(new St(s[b].marker,null,null));for(var x=0;x<y;++x)g.push(v);g.push(l)}return g}function Tt(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Ot(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function At(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Lt(e){return e.inclusiveLeft?-1:0}function Dt(e){return e.inclusiveRight?1:0}function It(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=tt(r.from,i.from)||Lt(e)-Lt(t);if(o)return-o;var a=tt(r.to,i.to)||Dt(e)-Dt(t);return a||t.id-e.id}function Rt(e,t){var n,r=Et&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||It(n,i.marker)<0)&&(n=i.marker);return n}function Mt(e){return Rt(e,!0)}function Nt(e){return Rt(e,!1)}function jt(e,t){var n,r=Et&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||It(n,o.marker)<0)&&(n=o.marker)}return n}function Pt(e,t,n,r,i){var o=Ke(e,t),a=Et&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=tt(c.from,n)||Lt(l.marker)-Lt(i),h=tt(c.to,r)||Dt(l.marker)-Dt(i);if(!(u>=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Bt(e){for(var t;t=Mt(e);)e=t.find(-1,!0).line;return e}function Ft(e,t){var n=Ke(e,t),r=Bt(n);return n==r?t:$e(r)}function Ut(e,t){if(t>e.lastLine())return t;var n,r=Ke(e,t);if(!Ht(e,r))return t;for(;n=Nt(r);)r=n.find(1,!0).line;return $e(r)+1}function Ht(e,t){var n=Et&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&zt(e,t,r))return!0}}function zt(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return zt(e,r.line,Ct(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&zt(e,t,i))return!0}function Gt(e){for(var t=0,n=(e=Bt(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==n)break;t+=s.height}return t}function Vt(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Mt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=Nt(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function Wt(e){var t=e.display,n=e.doc;t.maxLine=Ke(n,n.first),t.maxLineLength=Vt(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=Vt(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Kt=function(e,t,n){this.text=e,At(this,t),this.height=n?n(this):1};function qt(e){e.parent=null,Ot(e)}Kt.prototype.lineNo=function(){return $e(this)},ye(Kt);var Xt={},Yt={};function $t(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Yt:Xt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Jt(e,t){var n=L("span",null,null,l?"padding-right: .1px":null),r={pre:L("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=Qt,Ae(e.display.measure)&&(a=ce(o,e.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[],nn(o,r,dt(e,o,t!=e.display.externalMeasured&&$e(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=M(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=M(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Oe(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return pe(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=M(r.pre.className,r.textClass||"")),r}function Zt(e){var t=A("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Qt(e,t,n,r,i,o,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}(t,e.trailingSpace):t,h=e.cm.state.specialChars,d=!1;if(h.test(t)){c=document.createDocumentFragment();for(var f=0;;){h.lastIndex=f;var p=h.exec(t),m=p?p.index-f:t.length-f;if(m){var g=document.createTextNode(u.slice(f,f+m));a&&s<9?c.appendChild(A("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!p)break;f+=m+1;var v=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=c.appendChild(A("span",q(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?((v=c.appendChild(A("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),a&&s<9?c.appendChild(A("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&s<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||d||o||l){var x=n||"";r&&(x+=r),i&&(x+=i);var w=A("span",[c],x,o);if(l)for(var E in l)l.hasOwnProperty(E)&&"style"!=E&&"class"!=E&&w.setAttribute(E,l[E]);return e.content.appendChild(w)}e.content.appendChild(c)}}function en(e,t){return function(n,r,i,o,a,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var h=void 0,d=0;d<t.length&&!((h=t[d]).to>c&&h.from<=c);d++);if(h.to>=u)return e(n,r,i,o,a,s,l);e(n,r.slice(0,h.to-c),i,o,null,s,l),o=null,r=r.slice(h.to-c),c=h.to}}}function tn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,c,u,h,d,f=i.length,p=0,m=1,g="",v=0;;){if(v==p){l=c=u=s="",d=null,h=null,v=1/0;for(var y=[],b=void 0,x=0;x<r.length;++x){var w=r[x],E=w.marker;if("bookmark"==E.type&&w.from==p&&E.widgetNode)y.push(E);else if(w.from<=p&&(null==w.to||w.to>p||E.collapsed&&w.to==p&&w.from==p)){if(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,c=""),E.className&&(l+=" "+E.className),E.css&&(s=(s?s+";":"")+E.css),E.startStyle&&w.from==p&&(u+=" "+E.startStyle),E.endStyle&&w.to==v&&(b||(b=[])).push(E.endStyle,w.to),E.title&&((d||(d={})).title=E.title),E.attributes)for(var S in E.attributes)(d||(d={}))[S]=E.attributes[S];E.collapsed&&(!h||It(h.marker,E)<0)&&(h=w)}else w.from>p&&v>w.from&&(v=w.from)}if(b)for(var C=0;C<b.length;C+=2)b[C+1]==v&&(c+=" "+b[C]);if(!h||h.from==p)for(var k=0;k<y.length;++k)tn(t,0,y[k]);if(h&&(h.from||0)==p){if(tn(t,(null==h.to?f+1:h.to)-p,h.marker,null==h.from),null==h.to)return;h.to==p&&(h=!1)}}if(p>=f)break;for(var _=Math.min(f,v);;){if(g){var T=p+g.length;if(!h){var O=T>_?g.slice(0,_-p):g;t.addToken(t,O,a?a+l:l,u,p+O.length==v?c:"",s,d)}if(T>=_){g=g.slice(_-p),p=_;break}p=T,u=""}g=i.slice(o,o=n[m++]),a=$t(n[m++],t.cm.options)}}else for(var A=1;A<n.length;A+=2)t.addToken(t,i.slice(o,o=n[A]),$t(n[A+1],t.cm.options))}function rn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Nt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?$e(X(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Ht(e,t)}function on(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new rn(e.doc,Ke(e.doc,o),o);r=o+a.size,i.push(a)}return i}var an=null,sn=null;function ln(e,t){var n=de(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);an?r=an.delayedCallbacks:sn?r=sn:(r=sn=[],setTimeout(cn,0));for(var o=function(e){r.push((function(){return n[e].apply(null,i)}))},a=0;a<n.length;++a)o(a)}}function cn(){var e=sn;sn=null;for(var t=0;t<e.length;++t)e[t]()}function un(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?fn(e,t):"gutter"==o?mn(e,t,n,r):"class"==o?pn(e,t):"widget"==o&&gn(e,t,r)}t.changes=null}function hn(e){return e.node==e.text&&(e.node=A("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&s<8&&(e.node.style.zIndex=2)),e.node}function dn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Jt(e,t)}function fn(e,t){var n=t.text.className,r=dn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,pn(e,t)):n&&(t.text.className=n)}function pn(e,t){!function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=hn(t);t.background=r.insertBefore(A("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?hn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function mn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=hn(t);t.gutterBackground=A("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=hn(t),s=t.gutter=A("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(A("div",Qe(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,u=o.hasOwnProperty(c)&&o[c];u&&s.appendChild(A("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function gn(e,t,n){t.alignable&&(t.alignable=null);for(var r=C("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);yn(e,t,n)}function vn(e,t,n,r){var i=dn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),pn(e,t),mn(e,t,n,r),yn(e,t,r),t.node}function yn(e,t,n){if(bn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)bn(e,t.rest[r],t,n,!1)}function bn(e,t,n,r,i){if(t.widgets)for(var o=hn(n),a=0,s=t.widgets;a<s.length;++a){var l=s[a],c=A("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),xn(l,c,n,r),e.display.input.setUneditable(c),i&&l.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),ln(l,"redraw")}}function xn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function wn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!D(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),O(t.display.measure,A("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function En(e,t){for(var n=Se(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Sn(e){return e.lineSpace.offsetTop}function Cn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function kn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=O(e.measure,A("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function _n(e){return 50-e.display.nativeBarWidth}function Tn(e){return e.display.scroller.clientWidth-_n(e)-e.display.barWidth}function On(e){return e.display.scroller.clientHeight-_n(e)-e.display.barHeight}function An(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if($e(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Ln(e,t,n,r){return Rn(e,In(e,t),n,r)}function Dn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ur(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function In(e,t){var n=$e(t),r=Dn(e,n);r&&!r.text?r=null:r&&r.changes&&(un(e,r,n,or(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=$e(t=Bt(t)),r=e.display.externalMeasured=new rn(e.doc,t,n);r.lineN=n;var i=r.built=Jt(e,r);return r.text=i.pre,O(e.display.lineMeasure,i.pre),r}(e,t));var i=An(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Rn(e,t,n,r,i){t.before&&(n=-1);var o,l=n+(r||"");return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&Tn(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=jn(t.map,n,r),l=o.node,c=o.start,u=o.end,h=o.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&re(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&re(t.line.text.charAt(o.coverStart+u));)++u;if((i=a&&s<9&&0==c&&u==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():Pn(k(l,c,u).getClientRects(),r)).left||i.right||0==c)break;u=c,c-=1,h="right"}a&&s<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Me)return Me;var t=O(e,A("span","x")),n=t.getBoundingClientRect(),r=k(t,0,1).getBoundingClientRect();return Me=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var f;c>0&&(h=r="right"),i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+ir(e.display),top:p.top,bottom:p.bottom}:Nn}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var x=b?y[b-1]:0,w=y[b],E={left:("right"==h?i.right:i.left)-t.rect.left,right:("left"==h?i.left:i.right)-t.rect.left,top:x,bottom:w};return i.left||i.right||(E.bogus=!0),e.options.singleCursorHeightPerLine||(E.rtop=m,E.rbottom=g),E}(e,t,n,r)).bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Mn,Nn={left:0,right:0,top:0,bottom:0};function jn(e,t,n){for(var r,i,o,a,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(i=0,o=1,a="left"):t<l?o=1+(i=t-s):(c==e.length-3||t==l&&e[c+3]>t)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:s,coverEnd:l}}function Pn(e,t){var n=Nn;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function Bn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Fn(e){e.display.externalMeasure=null,T(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Bn(e.display.view[t])}function Un(e){Fn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Hn(){return u&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function zn(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Gn(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=wn(e.widgets[n]));return t}function Vn(e,t,n,r,i){if(!i){var o=Gn(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var a=Gt(t);if("local"==r?a+=Sn(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:zn());var l=s.left+("window"==r?0:Hn());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function Wn(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=Hn(),i-=zn();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function Kn(e,t,n,r,i){return r||(r=Ke(e.doc,t.line)),Vn(e,r,Ln(e,r,t.ch,i),n)}function qn(e,t,n,r,i,o){function a(t,a){var s=Rn(e,i,t,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,Vn(e,r,s,n)}r=r||Ke(e.doc,t.line),i||(i=In(e,r));var s=ce(r,e.doc.direction),l=t.ch,c=t.sticky;if(l>=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var h=se(s,l,c),d=ae,f=u(l,h,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function Xn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=Ke(e.doc,t.line),i=Gt(r)+Sn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Yn(e,t,n,r,i){var o=et(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function $n(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Yn(r.first,0,null,-1,-1);var i=Je(r,n),o=r.first+r.size-1;if(i>o)return Yn(r.first+r.size-1,Ke(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=Ke(r,i);;){var s=er(e,a,i,t,n),l=jt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=Ke(r,i=c.line)}}function Jn(e,t,n,r){r-=Gn(t);var i=t.text.length,o=oe((function(t){return Rn(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=oe((function(t){return Rn(e,n,t).top>r}),o,i)}}function Zn(e,t,n,r){return n||(n=In(e,t)),Jn(e,t,n,Vn(e,t,Rn(e,n,r),"line").top)}function Qn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=Gt(t);var o=In(e,t),a=Gn(t),s=0,l=t.text.length,c=!0,u=ce(t,e.doc.direction);if(u){var h=(e.options.lineWrapping?nr:tr)(e,t,n,o,u,r,i);s=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,m=null,g=oe((function(t){var n=Rn(e,o,t);return n.top+=a,n.bottom+=a,!!Qn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,m=n),!0)}),s,l),v=!1;if(m){var y=r-m.left<m.right-r,b=y==c;g=p+(b?0:1),f=b?"after":"before",d=y?m.left:m.right}else{c||g!=l&&g!=s||g++,f=0==g?"after":g==t.text.length?"before":Rn(e,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var x=qn(e,et(n,g,f),"line",t,o);d=x.left,v=i<x.top?-1:i>=x.bottom?1:0}return Yn(n,g=ie(t.text,g,1),f,v,r-d)}function tr(e,t,n,r,i,o,a){var s=oe((function(s){var l=i[s],c=1!=l.level;return Qn(qn(e,et(n,c?l.to:l.from,c?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=qn(e,et(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Qn(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function nr(e,t,n,r,i,o,a){var s=Jn(e,t,r,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d<i.length;d++){var f=i[d];if(!(f.from>=c||f.to<=l)){var p=Rn(e,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,m=p<o?o-p+1e9:p-o;(!u||h>m)&&(u=f,h=m)}}return u||(u=i[i.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Mn){Mn=A("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Mn.appendChild(document.createTextNode("x")),Mn.appendChild(A("br"));Mn.appendChild(document.createTextNode("x"))}O(e.measure,Mn);var n=Mn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),T(e.measure),n||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=A("span","xxxxxxxxxx"),n=A("pre",[t],"CodeMirror-line-like");O(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function or(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:ar(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ar(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(i){if(Ht(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function lr(e){var t=e.doc,n=sr(e);t.iter((function(e){var t=n(e);t!=e.height&&Ye(e,t)}))}function cr(e,t,n,r){var i=e.display;if(!n&&"true"==Se(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(e){return null}var l,c=$n(e,o,a);if(r&&c.xRel>0&&(l=Ke(e.doc,c.line).text).length==c.ch){var u=B(l,l.length,e.options.tabSize)-l.length;c=et(c.line,Math.max(0,Math.round((o-kn(e.display).left)/ir(e.display))-u))}return c}function ur(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function hr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Et&&Ft(e.doc,t)<i.viewTo&&fr(e);else if(n<=i.viewFrom)Et&&Ut(e.doc,n+r)>i.viewFrom?fr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)fr(e);else if(t<=i.viewFrom){var o=pr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):fr(e)}else if(n>=i.viewTo){var a=pr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):fr(e)}else{var s=pr(e,t,t,-1),l=pr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(on(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):fr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function dr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[ur(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==U(a,n)&&a.push(n)}}}function fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pr(e,t,n,r){var i,o=ur(e,t),a=e.display.view;if(!Et||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=t){if(r>0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;Ft(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function mr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function gr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function vr(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var s=n.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var l=s.empty();(l||e.options.showCursorWhenSelecting)&&yr(e,s.head,i),l||xr(e,s,o)}}return r}function yr(e,t,n){var r=qn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(A("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var o=n.appendChild(A("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function br(e,t){return e.top-t.top||e.left-t.left}function xr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=kn(e.display),s=a.left,l=Math.max(r.sizerWidth,Tn(e)-r.sizer.offsetLeft)-a.right,c="ltr"==i.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n height: "+(r-t)+"px"))}function h(t,n,r){var o,a,h=Ke(i,t),d=h.text.length;function f(n,r){return Kn(e,et(t,n),"div",h,r)}function p(t,n,r){var i=Zn(e,h,null,t),o="ltr"==n==("after"==r)?"left":"right";return f("after"==r?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1),o)[o]}var m=ce(h,i.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?d:r,(function(e,t,i,h){var g="ltr"==i,v=f(e,g?"left":"right"),y=f(t-1,g?"right":"left"),b=null==n&&0==e,x=null==r&&t==d,w=0==h,E=!m||h==m.length-1;if(y.top-v.top<=3){var S=(c?x:b)&&E,C=(c?b:x)&&w?s:(g?v:y).left,k=S?l:(g?y:v).right;u(C,v.top,k-C,v.bottom)}else{var _,T,O,A;g?(_=c&&b&&w?s:v.left,T=c?l:p(e,i,"before"),O=c?s:p(t,i,"after"),A=c&&x&&E?l:y.right):(_=c?p(e,i,"before"):s,T=!c&&b&&w?l:v.right,O=!c&&x&&E?s:y.left,A=c?p(t,i,"after"):l),u(_,v.top,T-_,v.bottom),v.bottom<y.top&&u(s,v.bottom,null,y.top),u(O,y.top,A-O,y.bottom)}(!o||br(v,o)<0)&&(o=v),br(y,o)<0&&(o=y),(!a||br(v,a)<0)&&(a=v),br(y,a)<0&&(a=y)})),{start:o,end:a}}var d=t.from(),f=t.to();if(d.line==f.line)h(d.line,d.ch,f.ch);else{var p=Ke(i,d.line),m=Ke(i,f.line),g=Bt(p)==Bt(m),v=h(d.line,d.ch,g?p.text.length+1:null).end,y=h(f.line,g?0:null,f.ch).start;g&&(v.top<y.top-2?(u(v.right,v.top,null,v.bottom),u(s,y.top,y.left,y.bottom)):u(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&u(s,v.bottom,null,y.top)}n.appendChild(o)}function wr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||kr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Er(e){e.state.focused||(e.display.input.focus(),Cr(e))}function Sr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,kr(e))}),100)}function Cr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(pe(e,"focus",e,t),e.state.focused=!0,R(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),wr(e))}function kr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(pe(e,"blur",e,t),e.state.focused=!1,_(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function _r(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],o=e.options.lineWrapping,l=void 0,c=0;if(!i.hidden){if(a&&s<8){var u=i.node.offsetTop+i.node.offsetHeight;l=u-n,n=u}else{var h=i.node.getBoundingClientRect();l=h.bottom-h.top,!o&&i.text.firstChild&&(c=i.text.firstChild.getBoundingClientRect().right-h.left-1)}var d=i.line.height-l;if((d>.005||d<-.005)&&(Ye(i.line,l),Tr(i.line),i.rest))for(var f=0;f<i.rest.length;f++)Tr(i.rest[f]);if(c>e.display.sizerWidth){var p=Math.ceil(c/ir(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Tr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Or(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Sn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=Je(t,r),a=Je(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<o?(o=s,a=Je(t,Gt(Ke(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=Je(t,Gt(Ke(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Ar(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=On(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Cn(n),l=t.top<r,c=t.bottom>s-r;if(t.top<i)a.scrollTop=l?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var h=e.options.fixedGutter?0:n.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-h,f=Tn(e)-n.gutters.offsetWidth,p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.left<d?a.scrollLeft=Math.max(0,t.left+h-(p?0:10)):t.right>f+d-3&&(a.scrollLeft=t.right+(p?0:10)-f),a}function Lr(e,t){null!=t&&(Rr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Dr(e){Rr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ir(e,t,n){null==t&&null==n||Rr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Rr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Mr(e,Xn(e,t.from),Xn(e,t.to),t.margin))}function Mr(e,t,n,r){var i=Ar(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Ir(e,i.scrollLeft,i.scrollTop)}function Nr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||li(e,{top:t}),jr(e,t,!0),n&&li(e),ri(e,100))}function jr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Pr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,hi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Br(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Cn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+_n(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Fr=function(e,t,n){this.cm=n;var r=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),he(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),he(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Fr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fr.prototype.zeroWidthHack=function(){var e=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new F,this.disableVert=new F},Fr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Fr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ur=function(){};function Hr(e,t){t||(t=Br(e));var n=e.display.barWidth,r=e.display.barHeight;zr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&_r(e),zr(e,Br(e)),n=e.display.barWidth,r=e.display.barHeight}function zr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Ur.prototype.update=function(){return{bottom:0,right:0}},Ur.prototype.setScrollLeft=function(){},Ur.prototype.setScrollTop=function(){},Ur.prototype.clear=function(){};var Gr={native:Fr,null:Ur};function Vr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&_(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Gr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),he(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Pr(e,t):Nr(e,t)}),e),e.display.scrollbars.addClass&&R(e.display.wrapper,e.display.scrollbars.addClass)}var Wr=0;function Kr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Wr},t=e.curOp,an?an.ops.push(t):t.ownsGroup=an={ops:[t],delayedCallbacks:[]}}function qr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}(n)}finally{an=null,t(n)}}(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Xr(t[n]);for(var r=0;r<t.length;r++)Yr(t[r]);for(var i=0;i<t.length;i++)$r(t[i]);for(var o=0;o<t.length;o++)Jr(t[o]);for(var a=0;a<t.length;a++)Zr(t[a])}(e)}))}function Xr(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=_n(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=_n(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&Wt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new oi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Yr(e){e.updatedDisplay=e.mustUpdate&&ai(e.cm,e.update)}function $r(e){var t=e.cm,n=t.display;e.updatedDisplay&&_r(t),e.barMeasure=Br(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ln(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+_n(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Tn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Jr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Pr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==I();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Hr(t,e.barMeasure),e.updatedDisplay&&ui(t,e.barMeasure),e.selectionChanged&&wr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Er(e.cm)}function Zr(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&si(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&jr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Pr(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!me(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=A("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Sn(e.display))+"px;\n height: "+(t.bottom-t.top+_n(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=qn(e,t),l=n&&n!=t?qn(e,n):s,c=Ar(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=c.scrollTop&&(Nr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Pr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(a=!0)),!a)break}return i}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||pe(i[a],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&pe(o[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&pe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Qr(e,t){if(e.curOp)return t();Kr(e);try{return t()}finally{qr(e)}}function ei(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Kr(e);try{return t.apply(e,arguments)}finally{qr(e)}}}function ti(e){return function(){if(this.curOp)return e.apply(this,arguments);Kr(this);try{return e.apply(this,arguments)}finally{qr(this)}}}function ni(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Kr(t);try{return e.apply(this,arguments)}finally{qr(t)}}}function ri(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,j(ii,e))}function ii(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ft(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?ze(t.mode,r.state):null,l=ht(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&d<a.length;++d)h=a[d]!=o.styles[d];h&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&pt(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Qr(e,(function(){for(var t=0;t<i.length;t++)dr(e,i[t],"text")}))}}var oi=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Or(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Tn(e),this.force=n,this.dims=or(e),this.events=[]};function ai(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return fr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(e))return!1;di(e)&&(fr(e),t.dims=or(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Et&&(o=Ft(e.doc,o),a=Ut(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(ur(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(on(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,ur(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=Gt(Ke(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=mr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=I();if(!t||!D(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,h=0;h<c.length;h++){var d=c[h];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;a!=d.node;)a=s(a);var f=i&&null!=t&&t<=u&&d.lineNumber;d.changes&&(U(d.changes,"gutter")>-1&&(f=!1),un(e,d,u,n)),f&&(T(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(Qe(e.options,u)))),a=d.node.nextSibling}else{var p=vn(e,d,u,n);o.insertBefore(p,a)}u+=d.size}for(;a;)a=s(a)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=I()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ri(e,400)),n.updateLineNumbers=null,!0}function si(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Tn(e))r&&(t.visible=Or(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Cn(e.display)-On(e),n.top)}),t.visible=Or(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ai(e,t))break;_r(e);var i=Br(e);gr(e),Hr(e,i),ui(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function li(e,t){var n=new oi(e,t);if(ai(e,n)){_r(e),si(e,n);var r=Br(e);gr(e),Hr(e,r),ui(e,r),n.finish()}}function ci(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ui(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+_n(e)+"px"}function hi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ar(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function di(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=Qe(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(A("div",[A("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",ci(e.display),!0}return!1}function fi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function pi(e){var t=e.gutters,n=e.gutterSpecs;T(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,a=i.style,s=t.appendChild(A("div",null,"CodeMirror-gutter "+o));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==o&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",ci(e)}function mi(e){pi(e.display),hr(e),hi(e)}function gi(e,t,r,i){var o=this;this.input=r,o.scrollbarFiller=A("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=A("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=L("div",null,"CodeMirror-code"),o.selectionDiv=A("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=A("div",null,"CodeMirror-cursors"),o.measure=A("div",null,"CodeMirror-measure"),o.lineMeasure=A("div",null,"CodeMirror-measure"),o.lineSpace=L("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=L("div",[o.lineSpace],"CodeMirror-lines");o.mover=A("div",[c],null,"position: relative"),o.sizer=A("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=A("div",null,null,"position: absolute; height: 50px; width: 1px;"),o.gutters=A("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=A("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=A("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),a&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||n&&v||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=fi(i.gutters,i.lineNumbers),pi(o),r.init(o)}oi.prototype.signal=function(e,t){ve(e,t)&&this.events.push(arguments)},oi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)pe.apply(null,this.events[e])};var vi=0,yi=null;function bi(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function xi(e){var t=bi(e);return t.x*=yi,t.y*=yi,t}function wi(e,t){var r=bi(t),i=r.x,o=r.y,a=e.display,s=a.scroller,c=s.scrollWidth>s.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&y&&l)e:for(var d=t.target,f=a.view;d!=s;d=d.parentNode)for(var p=0;p<f.length;p++)if(f[p].node==d){e.display.currentWheelTarget=d;break e}if(i&&!n&&!h&&null!=yi)return o&&u&&Nr(e,Math.max(0,s.scrollTop+o*yi)),Pr(e,Math.max(0,s.scrollLeft+i*yi)),(!o||o&&u)&&be(t),void(a.wheelStartX=null);if(o&&null!=yi){var m=o*yi,g=e.doc.scrollTop,v=g+a.wrapper.clientHeight;m<0?g=Math.max(0,g+m-50):v=Math.min(e.doc.height,v+m+50),li(e,{top:g,bottom:v})}vi<20&&(null==a.wheelStartX?(a.wheelStartX=s.scrollLeft,a.wheelStartY=s.scrollTop,a.wheelDX=i,a.wheelDY=o,setTimeout((function(){if(null!=a.wheelStartX){var e=s.scrollLeft-a.wheelStartX,t=s.scrollTop-a.wheelStartY,n=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,n&&(yi=(yi*vi+n)/(vi+1),++vi)}}),200)):(a.wheelDX+=i,a.wheelDY+=o))}}a?yi=-.53:n?yi=15:u?yi=-.7:d&&(yi=-1/3);var Ei=function(e,t){this.ranges=e,this.primIndex=t};Ei.prototype.primary=function(){return this.ranges[this.primIndex]},Ei.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!nt(n.anchor,r.anchor)||!nt(n.head,r.head))return!1}return!0},Ei.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Si(rt(this.ranges[t].anchor),rt(this.ranges[t].head));return new Ei(e,this.primIndex)},Ei.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Ei.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(tt(t,r.from())>=0&&tt(e,r.to())<=0)return n}return-1};var Si=function(e,t){this.anchor=e,this.head=t};function Ci(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=U(t,i);for(var o=1;o<t.length;o++){var a=t[o],s=t[o-1],l=tt(s.to(),a.from());if(r&&!a.empty()?l>0:l>=0){var c=ot(s.from(),a.from()),u=it(s.to(),a.to()),h=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new Si(h?u:c,h?c:u))}}return new Ei(t,n)}function ki(e,t){return new Ei([new Si(e,t||e)],0)}function _i(e){return e.text?et(e.from.line+e.text.length-1,X(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ti(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return _i(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=_i(t).ch-t.to.ch),et(n,r)}function Oi(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Si(Ti(i.anchor,t),Ti(i.head,t)))}return Ci(e.cm,n,e.sel.primIndex)}function Ai(e,t,n){return e.line==t.line?et(n.line,e.ch-t.ch+n.ch):et(n.line+(e.line-t.line),e.ch)}function Li(e){e.doc.mode=Fe(e.options,e.doc.modeOption),Di(e)}function Di(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ri(e,100),e.state.modeGen++,e.curOp&&hr(e)}function Ii(e,t){return 0==t.from.ch&&0==t.to.ch&&""==X(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ri(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Ot(e),At(e,n);var i=r?r(e):1;i!=e.height&&Ye(e,i)}(e,n,i,r),ln(e,"change",e,t)}function a(e,t){for(var n=[],o=e;o<t;++o)n.push(new Kt(c[o],i(o),r));return n}var s=t.from,l=t.to,c=t.text,u=Ke(e,s.line),h=Ke(e,l.line),d=X(c),f=i(c.length-1),p=l.line-s.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Ii(e,t)){var m=a(0,c.length-1);o(h,h.text,f),p&&e.remove(s.line,p),m.length&&e.insert(s.line,m)}else if(u==h)if(1==c.length)o(u,u.text.slice(0,s.ch)+d+u.text.slice(l.ch),f);else{var g=a(1,c.length-1);g.push(new Kt(d+u.text.slice(l.ch),f,r)),o(u,u.text.slice(0,s.ch)+c[0],i(0)),e.insert(s.line+1,g)}else if(1==c.length)o(u,u.text.slice(0,s.ch)+c[0]+h.text.slice(l.ch),i(0)),e.remove(s.line+1,p);else{o(u,u.text.slice(0,s.ch)+c[0],i(0)),o(h,d+h.text.slice(l.ch),f);var v=a(1,c.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}ln(e,"change",e,t)}function Mi(e,t,n){!function e(r,i,o){if(r.linked)for(var a=0;a<r.linked.length;++a){var s=r.linked[a];if(s.doc!=i){var l=o&&s.sharedHist;n&&!l||(t(s.doc,l),e(s.doc,r,l))}}}(e,null,!0)}function Ni(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,lr(e),Li(e),ji(e),e.options.lineWrapping||Wt(e),e.options.mode=t.modeOption,hr(e)}function ji(e){("rtl"==e.doc.direction?R:_)(e.display.lineDiv,"CodeMirror-rtl")}function Pi(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Bi(e,t){var n={from:rt(t.from),to:_i(t),text:qe(e,t.from,t.to)};return Gi(e,n,t.from.line,t.to.line+1),Mi(e,(function(e){return Gi(e,n,t.from.line,t.to.line+1)}),!0),n}function Fi(e){for(;e.length&&X(e).ranges;)e.pop()}function Ui(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Fi(e.done),X(e.done)):e.done.length&&!X(e.done).ranges?X(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),X(e.done)):void 0}(i,i.lastOp==r)))a=X(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=_i(t):o.changes.push(Bi(e,t));else{var l=X(i.done);for(l&&l.ranges||zi(e.sel,i.done),o={changes:[Bi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||pe(e,"historyAdded")}function Hi(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,X(i.done),t))?i.done[i.done.length-1]=t:zi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Fi(i.undone)}function zi(e,t){var n=X(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Gi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Vi(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Wi(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Vi(n[i]));return r}(e,t),r=_t(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue e;o.push(l)}else a&&(n[i]=a)}return n}function Ki(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?Ei.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];r.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var h in c)(u=h.match(/^spans_(\d+)$/))&&U(t,Number(u[1]))>-1&&(X(s)[h]=c[h],delete c[h])}}}return r}function qi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=tt(t,i)<0;o!=tt(n,i)<0?(i=t,t=n):o!=tt(t,n)<0&&(t=n)}return new Si(i,t)}return new Si(n||t,t)}function Xi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Qi(e,new Ei([qi(e.sel.primary(),t,n,i)],0),r)}function Yi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=qi(e.sel.ranges[o],t[o],null,i);Qi(e,Ci(e.cm,r,e.sel.primIndex),n)}function $i(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Qi(e,Ci(e.cm,i,e.sel.primIndex),r)}function Ji(e,t,n,r){Qi(e,ki(t,n),r)}function Zi(e,t,n){var r=e.history.done,i=X(r);i&&i.ranges?(r[r.length-1]=t,eo(e,t,n)):Qi(e,t,n)}function Qi(e,t,n){eo(e,t,n),Hi(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function eo(e,t,n){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Si(st(e,t[n].anchor),st(e,t[n].head))},origin:n&&n.origin};return pe(e,"beforeSelectionChange",e,r),e.cm&&pe(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Ci(e.cm,r.ranges,r.ranges.length-1):t}(e,t,n));var r=n&&n.bias||(tt(t.primary().head,e.sel.primary().head)<0?-1:1);to(e,ro(e,t,r,!0)),n&&!1===n.scroll||!e.cm||Dr(e.cm)}function to(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ge(e.cm)),ln(e,"cursorActivity",e))}function no(e){to(e,ro(e,e.sel,null,!1))}function ro(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=oo(e,a.anchor,s&&s.anchor,n,r),c=oo(e,a.head,s&&s.head,n,r);(i||l!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Si(l,c))}return i?Ci(e.cm,i,t.primIndex):t}function io(e,t,n,r,i){var o=Ke(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(i&&(pe(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var h=l.find(r<0?1:-1),d=void 0;if((r<0?u:c)&&(h=ao(e,h,-r,h&&h.line==t.line?o:null)),h&&h.line==t.line&&(d=tt(h,n))&&(r<0?d<0:d>0))return io(e,h,t,r,i)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=ao(e,f,r,f.line==t.line?o:null)),f?io(e,f,t,r,i):null}}return t}function oo(e,t,n,r,i){var o=r||1,a=io(e,t,n,o,i)||!i&&io(e,t,n,o,!0)||io(e,t,n,-o,i)||!i&&io(e,t,n,-o,!0);return a||(e.cantEdit=!0,et(e.first,0))}function ao(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||Ke(e,t.line)).text.length?t.line<e.first+e.size-1?et(t.line+1,0):null:new et(t.line,t.ch+n)}function so(e){e.setSelection(et(e.firstLine(),0),et(e.lastLine()),z)}function lo(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=st(e,t)),n&&(r.to=st(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),pe(e,"beforeChange",e,r),e.cm&&pe(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function co(e,t,n){if(e.cm){if(!e.cm.curOp)return ei(e.cm,co)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))||(t=lo(e,t,!0))){var r=wt&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=U(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],s=a.find(0),l=0;l<i.length;++l){var c=i[l];if(!(tt(c.to,s.from)<0||tt(c.from,s.to)>0)){var u=[l,1],h=tt(c.from,s.from),d=tt(c.to,s.to);(h<0||!a.inclusiveLeft&&!h)&&u.push({from:c.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)uo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else uo(e,t)}}function uo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Oi(e,t);Ui(e,t,n,e.cm?e.cm.curOp.id:NaN),po(e,t,n,_t(e,t));var r=[];Mi(e,(function(e,n){n||-1!=U(r,e.history)||(yo(e.history,t),r.push(e.history)),po(e,t,null,_t(e,t))}))}}function ho(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,c=0;c<s.length&&(i=s[c],n?!i.ranges||i.equals(e.sel):i.ranges);c++);if(c!=s.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=s.pop()).ranges){if(r)return void s.push(i);break}if(zi(i,l),n&&!i.equals(e.sel))return void Qi(e,i,{clearRedo:!1});a=i}var u=[];zi(a,l),l.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var h=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),d=function(n){var r=i.changes[n];if(r.origin=t,h&&!lo(e,r,!1))return s.length=0,{};u.push(Bi(e,r));var o=n?Oi(e,r):X(s);po(e,r,o,Wi(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:_i(r)});var a=[];Mi(e,(function(e,t){t||-1!=U(a,e.history)||(yo(e.history,r),a.push(e.history)),po(e,r,null,Wi(e,r))}))},f=i.changes.length-1;f>=0;--f){var p=d(f);if(p)return p.v}}}}function fo(e,t){if(0!=t&&(e.first+=t,e.sel=new Ei(Y(e.sel.ranges,(function(e){return new Si(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){hr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)dr(e.cm,r,"gutter")}}function po(e,t,n,r){if(e.cm&&!e.cm.curOp)return ei(e.cm,po)(e,t,n,r);if(t.to.line<e.first)fo(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);fo(e,i),t={from:et(e.first,0),to:et(t.to.line+i,t.to.ch),text:[X(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:et(o,Ke(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=qe(e,t.from,t.to),n||(n=Oi(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=$e(Bt(Ke(r,o.line))),r.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ge(e),Ri(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=Vt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=Ke(e,r).stateAfter;if(i&&(!(i instanceof ct)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,o.line),ri(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?hr(e):o.line!=a.line||1!=t.text.length||Ii(e.doc,t)?hr(e,o.line,a.line+1,c):dr(e,o.line,"text");var u=ve(e,"changes"),h=ve(e,"change");if(h||u){var d={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};h&&ln(e,"change",e,d),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}(e.cm,t,r):Ri(e,t,r),eo(e,n,z),e.cantEdit&&oo(e,et(e.firstLine(),0))&&(e.cantEdit=!1)}}function mo(e,t,n,r,i){var o;r||(r=n),tt(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),co(e,{from:n,to:r,text:t,origin:i})}function go(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function vo(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)go(o.ranges[s].anchor,t,n,r),go(o.ranges[s].head,t,n,r)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(n<c.from.line)c.from=et(c.from.line+r,c.from.ch),c.to=et(c.to.line+r,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function yo(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;vo(e.done,n,r,i),vo(e.undone,n,r,i)}function bo(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=Ke(e,at(e,t)):i=$e(t),null==i?null:(r(o,i)&&e.cm&&dr(e.cm,i,n),o)}function xo(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function wo(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}Si.prototype.from=function(){return ot(this.anchor,this.head)},Si.prototype.to=function(){return it(this.anchor,this.head)},Si.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},xo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,qt(i),ln(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},wo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof xo))){var s=[];this.collapse(s),this.children=[new xo(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,s=a;s<i.lines.length;){var l=new xo(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new wo(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=U(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new wo(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var Eo=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function So(e,t,n){Gt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Lr(e,n)}Eo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=$e(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=wn(this);Ye(n,Math.max(0,n.height-o)),e&&(Qr(e,(function(){So(e,n,-o),dr(e,r,"widget")})),ln(e,"lineWidgetCleared",e,this,r))}},Eo.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=wn(this)-t;i&&(Ht(this.doc,r)||Ye(r,r.height+i),n&&Qr(n,(function(){n.curOp.forceUpdate=!0,So(n,r,i),ln(n,"lineWidgetChanged",n,e,$e(r))})))},ye(Eo);var Co=0,ko=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Co};function _o(e,t,n,r,i){if(r&&r.shared)return function(e,t,n,r,i){(r=P(r)).shared=!1;var o=[_o(e,t,n,r,i)],a=o[0],s=r.widgetNode;return Mi(e,(function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(_o(e,st(e,t),st(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=X(o)})),new To(o,a)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return ei(e.cm,_o)(e,t,n,r,i);var o=new ko(e,i),a=tt(t,n);if(r&&P(r,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=L("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Pt(e,t.line,t,n,o)||t.line!=n.line&&Pt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Et=!0}o.addToHistory&&Ui(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(e){c&&o.collapsed&&!c.options.lineWrapping&&Bt(e)==c.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Ye(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new St(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){Ht(e,t)&&Ye(t,0)})),o.clearOnEnter&&he(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(wt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Co,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)hr(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=n.line;u++)dr(c,u,"text");o.atomic&&no(c.doc),ln(c,"markerAdded",c,o)}return o}ko.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Kr(e),ve(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=Ct(a.markedSpans,this);e&&!this.collapsed?dr(e,$e(a),"text"):e&&(null!=s.to&&(i=$e(a)),null!=s.from&&(r=$e(a))),a.markedSpans=kt(a.markedSpans,s),null==s.from&&this.collapsed&&!Ht(this.doc,a)&&e&&Ye(a,rr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Bt(this.lines[l]),u=Vt(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&hr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&no(e.doc)),e&&ln(e,"markerCleared",e,this,r,i),t&&qr(e),this.parent&&this.parent.clear()}},ko.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=Ct(o.markedSpans,this);if(null!=a.from&&(n=et(t?o:$e(o),a.from),-1==e))return n;if(null!=a.to&&(r=et(t?o:$e(o),a.to),1==e))return r}return n&&{from:n,to:r}},ko.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Qr(r,(function(){var i=t.line,o=$e(t.line),a=Dn(r,o);if(a&&(Bn(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Ht(n.doc,i)&&null!=n.height){var s=n.height;n.height=null;var l=wn(n)-s;l&&Ye(i,i.height+l)}ln(r,"markerChanged",r,e)}))},ko.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=U(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ko.prototype.detachLine=function(e){if(this.lines.splice(U(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ye(ko);var To=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Oo(e){return e.findMarks(et(e.first,0),e.clipPos(et(e.lastLine())),(function(e){return e.parent}))}function Ao(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];Mi(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==U(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}To.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ln(this,"clear")}},To.prototype.find=function(e,t){return this.primary.find(e,t)},ye(To);var Lo=0,Do=function(e,t,n,r,i){if(!(this instanceof Do))return new Do(e,t,n,r,i);null==n&&(n=0),wo.call(this,[new xo([new Kt("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=et(n,0);this.sel=ki(o),this.history=new Pi(null),this.id=++Lo,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Ri(this,{from:o,to:o,text:e}),Qi(this,ki(o),z)};Do.prototype=J(wo.prototype,{constructor:Do,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Xe(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:ni((function(e){var t=et(this.first,0),n=this.first+this.size-1;co(this,{from:t,to:et(n,Ke(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ir(this.cm,0,0),Qi(this,ki(t),z)})),replaceRange:function(e,t,n,r){mo(this,e,t=st(this,t),n=n?st(this,n):t,r)},getRange:function(e,t,n){var r=qe(this,st(this,e),st(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Ze(this,e))return Ke(this,e)},getLineNumber:function(e){return $e(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ke(this,e)),Bt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return st(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ni((function(e,t,n){Ji(this,st(this,"number"==typeof e?et(e,t||0):e),null,n)})),setSelection:ni((function(e,t,n){Ji(this,st(this,e),st(this,t||e),n)})),extendSelection:ni((function(e,t,n){Xi(this,st(this,e),t&&st(this,t),n)})),extendSelections:ni((function(e,t){Yi(this,lt(this,e),t)})),extendSelectionsBy:ni((function(e,t){Yi(this,lt(this,Y(this.sel.ranges,e)),t)})),setSelections:ni((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Si(st(this,e[i].anchor),st(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Qi(this,Ci(this.cm,r,t),n)}})),addSelection:ni((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Si(st(this,e),st(this,t||e))),Qi(this,Ci(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=qe(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=qe(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:ni((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var s=t&&"end"!=t&&function(e,t,n){for(var r=[],i=et(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],l=Ai(s.from,i,o),c=Ai(_i(s),i,o);if(i=s.to,o=c,"around"==n){var u=e.sel.ranges[a],h=tt(u.head,u.anchor)<0;r[a]=new Si(h?c:l,h?l:c)}else r[a]=new Si(l,l)}return new Ei(r,e.sel.primIndex)}(this,r,t),l=r.length-1;l>=0;l--)co(this,r[l]);s?Zi(this,s):this.cm&&Dr(this.cm)})),undo:ni((function(){ho(this,"undo")})),redo:ni((function(){ho(this,"redo")})),undoSelection:ni((function(){ho(this,"undo",!0)})),redoSelection:ni((function(){ho(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Pi(this.history.maxGeneration),Mi(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Ki(this.history.done),undone:Ki(this.history.undone)}},setHistory:function(e){var t=this.history=new Pi(this.history.maxGeneration);t.done=Ki(e.done.slice(0),null,!0),t.undone=Ki(e.undone.slice(0),null,!0)},setGutterMarker:ni((function(e,t,n){return bo(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&te(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:ni((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&bo(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,te(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!Ze(this,e))return null;if(t=e,!(e=Ke(this,e)))return null}else if(null==(t=$e(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:ni((function(e,t,n){return bo(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(C(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:ni((function(e,t,n){return bo(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(C(n));if(!o)return!1;var a=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),addLineWidget:ni((function(e,t,n){return function(e,t,n,r){var i=new Eo(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),bo(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!Ht(e,t)){var r=Gt(t)<e.scrollTop;Ye(t,t.height+wn(i)),r&&Lr(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&ln(o,"lineWidgetAdded",o,i,"number"==typeof t?t:$e(t)),i}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return _o(this,st(this,e),st(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return _o(this,e=st(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Ke(this,(e=st(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=st(this,e),t=st(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Do(Xe(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Do(Xe(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(tt(o,a)){var s=_o(e,o,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}(r,Oo(this)),r},unlinkDoc:function(e){if(e instanceof Ta&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Ao(Oo(this));break}if(e.history==this.history){var n=[e.id];Mi(e,(function(e){return n.push(e.id)}),!0),e.history=new Pi(null),e.history.done=Ki(this.history.done,n),e.history.undone=Ki(this.history.undone,n)}},iterLinkedDocs:function(e){Mi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):De(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:ni((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Qr(t=this.cm,(function(){ji(t),hr(t)})))}))}),Do.prototype.eachLine=Do.prototype.iter;var Io=0;function Ro(e){var t=this;if(Mo(t),!me(t,e)&&!En(t.display,e)){be(e),a&&(Io=+new Date);var n=cr(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),s=0,l=function(){++s==i&&ei(t,(function(){var e={from:n=st(t.doc,n),to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};co(t.doc,e),Zi(t.doc,ki(st(t.doc,n),st(t.doc,_i(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==U(t.options.allowDropFileTypes,e.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),l()},r.readAsText(e)}},u=0;u<r.length;u++)c(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var h=e.dataTransfer.getData("Text");if(h){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),eo(t.doc,ki(n,n)),d)for(var f=0;f<d.length;++f)mo(t.doc,"",d[f].anchor,d[f].head,"drag");t.replaceSelection(h,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Mo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function No(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var jo=!1;function Po(){var e;jo||(he(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,No(Bo)}),100))})),he(window,"blur",(function(){return No(kr)})),jo=!0)}function Bo(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Fo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Uo=0;Uo<10;Uo++)Fo[Uo+48]=Fo[Uo+96]=String(Uo);for(var Ho=65;Ho<=90;Ho++)Fo[Ho]=String.fromCharCode(Ho);for(var zo=1;zo<=12;zo++)Fo[zo+111]=Fo[zo+63235]="F"+zo;var Go={};function Vo(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Wo(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Y(n.split(" "),Vo),o=0;o<i.length;o++){var a=void 0,s=void 0;o==i.length-1?(s=i.join(" "),a=r):(s=i.slice(0,o+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function Ko(e,t,n,r){var i=(t=$o(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Ko(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=Ko(e,t.fallthrough[o],n,r);if(a)return a}}}function qo(e){var t="string"==typeof e?e:Fo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Xo(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(E?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(E?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Yo(e,t){if(h&&34==e.keyCode&&e.char)return!1;var n=Fo[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Xo(n,e,t))}function $o(e){return"string"==typeof e?Go[e]:e}function Jo(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&tt(o.from,X(r).to)<=0;){var a=r.pop();if(tt(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}Qr(e,(function(){for(var t=r.length-1;t>=0;t--)mo(e.doc,"",r[t].from,r[t].to,"+delete");Dr(e)}))}function Zo(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Qo(e,t,n){var r=Zo(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function ea(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ce(n,t.doc.direction);if(o){var a,s=i<0?X(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=In(t,n);a=i<0?n.text.length-1:0;var u=Rn(t,c,a).top;a=oe((function(e){return Rn(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Zo(n,a,1))}else a=i<0?s.to:s.from;return new et(r,a,l)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}Go.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Go.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Go.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Go.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Go.default=y?Go.macDefault:Go.pcDefault;var ta={selectAll:so,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),z)},killLine:function(e){return Jo(e,(function(t){if(t.empty()){var n=Ke(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:et(t.head.line+1,0)}:{from:t.head,to:et(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Jo(e,(function(t){return{from:et(t.from().line,0),to:st(e.doc,et(t.to().line+1,0))}}))},delLineLeft:function(e){return Jo(e,(function(e){return{from:et(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Jo(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Jo(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(et(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(et(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return na(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return ra(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=Ke(e.doc,t),r=function(e){for(var t;t=Nt(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=$e(r)),ea(!0,e,n,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),V)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),V)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?ra(e,t.head):r}),V)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=B(e.getLine(o.line),o.ch,r);t.push(q(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Qr(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=Ke(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new et(i.line,i.ch-1)),i.ch>0)i=new et(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Ke(e.doc,i.line-1).text;a&&(i=new et(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(i.line-1,a.length-1),i,"+transpose"))}n.push(new Si(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Qr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Dr(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function na(e,t){var n=Ke(e.doc,t),r=Bt(n);return r!=n&&(t=$e(r)),ea(!0,e,r,t,1)}function ra(e,t){var n=na(e,t.line),r=Ke(e.doc,n.line),i=ce(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return et(n.line,a?0:o,n.sticky)}return n}function ia(e,t,n){if("string"==typeof t&&!(t=ta[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=H}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}var oa=new F;function aa(e,t,n,r){var i=e.state.keySeq;if(i){if(qo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:oa.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),sa(e,i+" "+t,n,r))return!0}return sa(e,t,n,r)}function sa(e,t,n,r){var i=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Ko(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Ko(t,e.options.extraKeys,n,e)||Ko(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&ln(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(be(n),wr(e)),!!i}function la(e,t){var n=Yo(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?aa(e,"Shift-"+n,t,(function(t){return ia(e,t,!0)}))||aa(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ia(e,t)})):aa(e,n,t,(function(t){return ia(e,t)})))}var ca=null;function ua(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=I(),me(t,e)))){a&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=la(t,e);h&&(ca=i?r:null,i||88!=r||Re||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!y&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(_(t,"CodeMirror-crosshair"),fe(document,"keyup",n),fe(document,"mouseover",n))}R(t,"CodeMirror-crosshair"),he(document,"keyup",n),he(document,"mouseover",n)}(t)}}function ha(e){16==e.keyCode&&(this.doc.sel.shift=!1),me(this,e)}function da(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||En(t.display,e)||me(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(h&&n==ca)return ca=null,void be(e);if(!h||e.which&&!(e.which<10)||!la(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(function(e,t,n){return aa(e,"'"+n+"'",t,(function(t){return ia(e,t,!0)}))}(t,e,i)||t.display.input.onKeyPress(e))}}}var fa,pa,ma=function(e,t,n){this.time=e,this.pos=t,this.button=n};function ga(e){var t=this,n=t.display;if(!(me(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,En(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!ba(t,e)){var r=cr(t,e),i=Ce(e),o=r?function(e,t){var n=+new Date;return pa&&pa.compare(n,e,t)?(fa=pa=null,"triple"):fa&&fa.compare(n,e,t)?(pa=new ma(n,e,t),fa=null,"double"):(fa=new ma(n,e,t),pa=null,"single")}(r,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&function(e,t,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),aa(e,Xo(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=ta[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=H}finally{e.state.suppressEdits=!1}return r}))}(t,i,r,o,e)||(1==i?r?function(e,t,n,r){a?setTimeout(j(Er,e),0):e.curOp.focus=I();var i,o=function(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=b?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=y?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(y?n.altKey:n.ctrlKey)),i}(e,n,r),c=e.doc.sel;e.options.dragDrop&&Te&&!e.isReadOnly()&&"single"==n&&(i=c.contains(t))>-1&&(tt((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,c=ei(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,fe(i.wrapper.ownerDocument,"mouseup",c),fe(i.wrapper.ownerDocument,"mousemove",u),fe(i.scroller,"dragstart",h),fe(i.scroller,"drop",c),o||(be(t),r.addNew||Xi(e.doc,n,null,null,r.extend),l&&!d||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),he(i.wrapper.ownerDocument,"mouseup",c),he(i.wrapper.ownerDocument,"mousemove",u),he(i.scroller,"dragstart",h),he(i.scroller,"drop",c),Sr(e),setTimeout((function(){return i.input.focus()}),20)}(e,r,t,o):function(e,t,n,r){var i=e.display,o=e.doc;be(t);var a,s,l=o.sel,c=l.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new Si(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new Si(n,n)),n=cr(e,t,!0,!0),s=-1;else{var u=va(e,n,r.unit);a=r.extend?qi(a,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,Qi(o,Ci(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(Qi(o,Ci(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):$i(o,s,a,G):(s=0,Qi(o,new Ei([a],0),G),l=o.sel);var h=n;function d(t){if(0!=tt(h,t))if(h=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,u=B(Ke(o,n.line).text,n.ch,c),d=B(Ke(o,t.line).text,t.ch,c),f=Math.min(u,d),p=Math.max(u,d),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Ke(o,m).text,y=W(v,f,c);f==p?i.push(new Si(et(m,y),et(m,y))):v.length>y&&i.push(new Si(et(m,y),et(m,W(v,p,c))))}i.length||i.push(new Si(n,n)),Qi(o,Ci(e,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,x=a,w=va(e,t,r.unit),E=x.anchor;tt(w.anchor,E)>0?(b=w.head,E=ot(x.from(),w.anchor)):(b=w.anchor,E=it(x.to(),w.head));var S=l.ranges.slice(0);S[s]=function(e,t){var n=t.anchor,r=t.head,i=Ke(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var o=ce(i);if(!o)return t;var a=se(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=se(o,r.ch,r.sticky),h=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=o[c+(l?-1:0)],f=l==(1==d.level),p=f?d.from:d.to,m=f?"after":"before";return n.ch==p&&n.sticky==m?t:new Si(new et(n.line,p,m),r)}(e,new Si(st(o,E),b)),Qi(o,Ci(e,S,s),G)}}var f=i.wrapper.getBoundingClientRect(),p=0;function m(t){e.state.selectingText=!1,p=1/0,t&&(be(t),i.input.focus()),fe(i.wrapper.ownerDocument,"mousemove",g),fe(i.wrapper.ownerDocument,"mouseup",v),o.history.lastSelOrigin=null}var g=ei(e,(function(t){0!==t.buttons&&Ce(t)?function t(n){var a=++p,s=cr(e,n,!0,"rectangle"==r.unit);if(s)if(0!=tt(s,h)){e.curOp.focus=I(),d(s);var l=Or(i,o);(s.line>=l.to||s.line<l.from)&&setTimeout(ei(e,(function(){p==a&&t(n)})),150)}else{var c=n.clientY<f.top?-20:n.clientY>f.bottom?20:0;c&&setTimeout(ei(e,(function(){p==a&&(i.scroller.scrollTop+=c,t(n))})),50)}}(t):m(t)})),v=ei(e,m);e.state.selectingText=v,he(i.wrapper.ownerDocument,"mousemove",g),he(i.wrapper.ownerDocument,"mouseup",v)}(e,r,t,o)}(t,r,o,e):Se(e)==n.scroller&&be(e):2==i?(r&&Xi(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(S?t.display.input.onContextMenu(e):Sr(t)))}}function va(e,t,n){if("char"==n)return new Si(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Si(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new Si(r.from,r.to)}function ya(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ve(e,n))return we(t);o-=s.top-a.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i)return pe(e,n,e,Je(e.doc,o),e.display.gutterSpecs[l].className,t),we(t)}}function ba(e,t){return ya(e,t,"gutterClick",!0)}function xa(e,t){En(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&ya(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function wa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Un(e)}ma.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var Ea={toString:function(){return"CodeMirror.Init"}},Sa={},Ca={};function ka(e,t,n){if(!t!=!(n&&n!=Ea)){var r=e.display.dragFunctions,i=t?he:fe;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function _a(e){e.options.lineWrapping?(R(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(_(e.display.wrapper,"CodeMirror-wrap"),Wt(e)),lr(e),hr(e),Un(e),setTimeout((function(){return Hr(e)}),100)}function Ta(e,t){var n=this;if(!(this instanceof Ta))return new Ta(e,t);this.options=t=t?P(t):{},P(Sa,t,!1);var r=t.value;"string"==typeof r?r=new Do(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ta.inputStyles[t.inputStyle](this),o=this.display=new gi(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,wa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Vr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new F,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;he(t.scroller,"mousedown",ei(e,ga)),he(t.scroller,"dblclick",a&&s<11?ei(e,(function(t){if(!me(e,t)){var n=cr(e,t);if(n&&!ba(e,t)&&!En(e.display,t)){be(t);var r=e.findWordAt(n);Xi(e.doc,r.anchor,r.head)}}})):function(t){return me(e,t)||be(t)}),he(t.scroller,"contextmenu",(function(t){return xa(e,t)})),he(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||xa(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}he(t.scroller,"touchstart",(function(i){if(!me(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!ba(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),he(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),he(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!En(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=e.coordsChar(t.activeTouch,"page");a=!r.prev||o(r,r.prev)?new Si(s,s):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(s):new Si(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),be(n)}i()})),he(t.scroller,"touchcancel",i),he(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Nr(e,t.scroller.scrollTop),Pr(e,t.scroller.scrollLeft,!0),pe(e,"scroll",e))})),he(t.scroller,"mousewheel",(function(t){return wi(e,t)})),he(t.scroller,"DOMMouseScroll",(function(t){return wi(e,t)})),he(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||Ee(t)},over:function(t){me(e,t)||(function(e,t){var n=cr(e,t);if(n){var r=document.createDocumentFragment();yr(e,n,r),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),O(e.display.dragCursor,r)}}(e,t),Ee(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Io<100))Ee(t);else if(!me(e,t)&&!En(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var n=A("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(e,t)},drop:ei(e,Ro),leave:function(t){me(e,t)||Mo(e)}};var l=t.input.getField();he(l,"keyup",(function(t){return ha.call(e,t)})),he(l,"keydown",ei(e,ua)),he(l,"keypress",ei(e,da)),he(l,"focus",(function(t){return Cr(e,t)})),he(l,"blur",(function(t){return kr(e,t)}))}(this),Po(),Kr(this),this.curOp.forceUpdate=!0,Ni(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Cr(n)}),20):kr(this),Ca)Ca.hasOwnProperty(c)&&Ca[c](this,t[c],Ea);di(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Oa.length;++u)Oa[u](this);qr(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Ta.defaults=Sa,Ta.optionHandlers=Ca;var Oa=[];function Aa(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=ft(e,t).state:n="prev");var a=e.options.tabSize,s=Ke(o,t),l=B(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=o.mode.indent(i,s.text.slice(u.length),s.text))==H||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?B(Ke(o,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",d=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/a);f;--f)d+=a,h+="\t";if(d<c&&(h+=q(c-d)),h!=u)return mo(o,h,et(t,0),et(t,u.length),"+input"),s.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var m=o.sel.ranges[p];if(m.head.line==t&&m.head.ch<u.length){var g=et(t,u.length);$i(o,p,new Si(g,g));break}}}Ta.defineInitHook=function(e){return Oa.push(e)};var La=null;function Da(e){La=e}function Ia(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=+new Date-200,s="paste"==i||e.state.pasteIncoming>a,l=De(t),c=null;if(s&&r.ranges.length>1)if(La&&La.text.join("\n")==t){if(r.ranges.length%La.text.length==0){c=[];for(var u=0;u<La.text.length;u++)c.push(o.splitLines(La.text[u]))}}else l.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=Y(l,(function(e){return[e]})));for(var h=e.curOp.updateInput,d=r.ranges.length-1;d>=0;d--){var f=r.ranges[d],p=f.from(),m=f.to();f.empty()&&(n&&n>0?p=et(p.line,p.ch-n):e.state.overwrite&&!s?m=et(m.line,Math.min(Ke(o,m.line).text.length,m.ch+X(l).length)):s&&La&&La.lineWise&&La.text.join("\n")==l.join("\n")&&(p=m=et(p.line,0)));var g={from:p,to:m,text:c?c[d%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};co(e.doc,g),ln(e,"inputRead",e,g)}t&&!s&&Ma(e,t),Dr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ra(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Qr(t,(function(){return Ia(t,n,0,null,"paste")})),!0}function Ma(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){a=Aa(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ke(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Aa(e,i.head.line,"smart"));a&&ln(e,"electricInput",e,i.head.line)}}}function Na(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:et(i,0),head:et(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function ja(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Pa(){var e=A("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=A("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),ja(e),t}function Ba(e,t,n,r,i){var o=t,a=n,s=Ke(e,t.line),l=i&&"rtl"==e.direction?-n:n;function c(o){var a,c;if("codepoint"==r){var u=s.text.charCodeAt(t.ch+(r>0?0:-1));a=isNaN(u)?null:new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(u>=55296&&u<56320?2:1))),-n)}else a=i?function(e,t,n,r){var i=ce(t,e.doc.direction);if(!i)return Qo(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=se(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return Qo(t,n,r);var s,l=function(e,n){return Zo(t,e instanceof et?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(s=s||In(e,t),Zn(e,t,s,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var h=1==a.level==r<0,d=l(n,h?1:-1);if(null!=d&&(h?d<=a.to&&d<=u.end:d>=a.from&&d>=u.begin)){var f=h?"before":"after";return new et(n.line,d,f)}}var p=function(e,t,r){for(var o=function(e,t){return t?new et(n.line,l(e,1),"before"):new et(n.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],s=t>0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c<a.to)return o(c,s);if(c=s?a.from:l(a.to,-1),r.begin<=c&&c<r.end)return o(c,s)}},m=p(o+r,r,u);if(m)return m;var g=r>0?u.end:l(u.begin,-1);return null==g||r>0&&g==t.text.length||!(m=p(r>0?0:i.length-1,r,c(g)))?null:m}(e.cm,s,t,n):Qo(s,t,n);if(null==a){if(o||(c=t.line+l)<e.first||c>=e.first+e.size||(t=new et(c,t.ch,t.sticky),!(s=Ke(e,c))))return!1;t=ea(i,e.cm,s,t.line,l)}else t=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,h="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||c(!f);f=!1){var p=s.text.charAt(t.ch)||"\n",m=ee(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||m||(m="s"),u&&u!=m){n<0&&(n=1,c(),t.sticky="after");break}if(m&&(u=m),n>0&&!c(!f))break}var g=oo(e,t,o,a,!0);return nt(o,g)&&(g.hitSide=!0),g}function Fa(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=$n(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Ua=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new F,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ha(e,t){var n=Dn(e,t.line);if(!n||n.hidden)return null;var r=Ke(e.doc,t.line),i=An(n,r,t.line),o=ce(r,e.doc.direction),a="left";o&&(a=se(o,t.ch)%2?"right":"left");var s=jn(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function za(e,t){return t&&(e.bad=!0),e}function Ga(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return za(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return Va(o,t,n)}}function Va(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!D(r,t))return za(et($e(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?X(e.rest):e.line;return za(et($e(o),o.text.length),i)}var a=3==t.nodeType?t:null,s=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=r;)s=s.parentNode;var l=e.measure,c=l.maps;function u(t,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?l.map:c[i],a=0;a<o.length;a+=3){var s=o[a+2];if(s==t||s==n){var u=$e(i<0?e.line:e.rest[i]),h=o[a]+r;return(r<0||s!=t)&&(h=o[a+(r?1:0)]),et(u,h)}}}var h=u(a,s,n);if(h)return za(h,i);for(var d=s.nextSibling,f=a?a.nodeValue.length-n:0;d;d=d.nextSibling){if(h=u(d,d.firstChild,0))return za(et(h.line,h.ch-f),i);f+=d.textContent.length}for(var p=s.previousSibling,m=n;p;p=p.previousSibling){if(h=u(p,p.firstChild,-1))return za(et(h.line,h.ch+m),i);m+=p.textContent.length}}Ua.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(o(e)&&!me(r,e)){if(r.somethingSelected())Da({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Na(r);Da({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,z),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=La.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var s=Pa(),l=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),l.value=La.text.join("\n");var c=document.activeElement;N(l),setTimeout((function(){r.display.lineSpace.removeChild(s),c.focus(),c==i&&n.showPrimarySelection()}),50)}}ja(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),he(i,"paste",(function(e){!o(e)||me(r,e)||Ra(e,r)||s<=11&&setTimeout(ei(r,(function(){return t.updateFromDOM()})),20)})),he(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),he(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),he(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),he(i,"touchstart",(function(){return n.forceCompositionEnd()})),he(i,"input",(function(){t.composing||t.readFromDOMSoon()})),he(i,"copy",a),he(i,"cut",a)},Ua.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ua.prototype.prepareSelection=function(){var e=vr(this.cm,!1);return e.focus=document.activeElement==this.div,e},Ua.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ua.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ua.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var a=Ga(t,e.anchorNode,e.anchorOffset),s=Ga(t,e.focusNode,e.focusOffset);if(!a||a.bad||!s||s.bad||0!=tt(ot(a,s),i)||0!=tt(it(a,s),o)){var l=t.display.view,c=i.line>=t.display.viewFrom&&Ha(t,i)||{node:l[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&Ha(t,o);if(!u){var h=l[l.length-1].measure,d=h.maps?h.maps[h.maps.length-1]:h.map;u={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(c&&u){var f,p=e.rangeCount&&e.getRangeAt(0);try{f=k(c.node,c.offset,u.offset,u.node)}catch(e){}f&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),f.collapsed||(e.removeAllRanges(),e.addRange(f))):(e.removeAllRanges(),e.addRange(f)),p&&null==e.anchorNode?e.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Ua.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Ua.prototype.showMultipleSelections=function(e){O(this.cm.display.cursorDiv,e.cursors),O(this.cm.display.selectionDiv,e.selection)},Ua.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ua.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return D(this.div,t)},Ua.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ua.prototype.blur=function(){this.div.blur()},Ua.prototype.getField=function(){return this.div},Ua.prototype.supportsTouch=function(){return!0},Ua.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Qr(this.cm,(function(){return e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}))},Ua.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ua.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(g&&u&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=Ga(t,e.anchorNode,e.anchorOffset),r=Ga(t,e.focusNode,e.focusOffset);n&&r&&Qr(t,(function(){Qi(t.doc,ki(n,r),z),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},Ua.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>r.firstLine()&&(a=et(a.line-1,Ke(r.doc,a.line-1).length)),s.ch==Ke(r.doc,s.line).text.length&&s.line<r.lastLine()&&(s=et(s.line+1,0)),a.line<i.viewFrom||s.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(e=ur(r,a.line))?(t=$e(i.view[0].line),n=i.view[0].node):(t=$e(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=ur(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=$e(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var h=r.doc.splitLines(function(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(e){e&&(c(),o+=e)}function h(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var o,d=t.getAttribute("cm-marker");if(d){var f=e.findMarks(et(r,0),et(i+1,0),(g=+d,function(e){return e.id==g}));return void(f.length&&(o=f[0].find(0))&&u(qe(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&c();for(var m=0;m<t.childNodes.length;m++)h(t.childNodes[m]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),p&&(a=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var g}for(;h(t),t!=n;)t=t.nextSibling,l=!1;return o}(r,n,c,t,l)),d=qe(r.doc,et(t,0),et(l,Ke(r.doc,l).text.length));h.length>1&&d.length>1;)if(X(h)==X(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),t++}for(var f=0,p=0,m=h[0],g=d[0],v=Math.min(m.length,g.length);f<v&&m.charCodeAt(f)==g.charCodeAt(f);)++f;for(var y=X(h),b=X(d),x=Math.min(y.length-(1==h.length?f:0),b.length-(1==d.length?f:0));p<x&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==h.length&&1==d.length&&t==a.line)for(;f&&f>a.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var w=et(t,f),E=et(l,d.length?X(d).length-p:0);return h.length>1||h[0]||tt(w,E)?(mo(r.doc,h,w,E,"+input"),!0):void 0},Ua.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ua.prototype.reset=function(){this.forceCompositionEnd()},Ua.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ua.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ua.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Qr(this.cm,(function(){return hr(e.cm)}))},Ua.prototype.setUneditable=function(e){e.contentEditable="false"},Ua.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,Ia)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ua.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ua.prototype.onContextMenu=function(){},Ua.prototype.resetPosition=function(){},Ua.prototype.needsContentAttribute=!0;var Wa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new F,this.hasSelection=!1,this.composing=null};Wa.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!me(r,e)){if(r.somethingSelected())Da({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Na(r);Da({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,z):(n.prevInput="",i.value=t.text.join("\n"),N(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),he(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),he(i,"paste",(function(e){me(r,e)||Ra(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),he(i,"cut",o),he(i,"copy",o),he(e.scroller,"paste",(function(t){if(!En(e,t)&&!me(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),he(e.lineSpace,"selectstart",(function(t){En(e,t)||be(t)})),he(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),he(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Wa.prototype.createField=function(e){this.wrapper=Pa(),this.textarea=this.wrapper.firstChild},Wa.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Wa.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=vr(e);if(e.options.moveInputWithCursor){var i=qn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Wa.prototype.showSelection=function(e){var t=this.cm.display;O(t.cursorDiv,e.cursors),O(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Wa.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&N(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Wa.prototype.getField=function(){return this.textarea},Wa.prototype.supportsTouch=function(){return!1},Wa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||I()!=this.textarea))try{this.textarea.focus()}catch(e){}},Wa.prototype.blur=function(){this.textarea.blur()},Wa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Wa.prototype.receivedFocus=function(){this.slowPoll()},Wa.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Wa.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Wa.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ie(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l<c&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return Qr(t,(function(){Ia(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Wa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Wa.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Wa.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=cr(n,e),c=r.scroller.scrollTop;if(o&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ei(n,Qi)(n.doc,ki(o),z);var u,d=i.style.cssText,f=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),S){Ee(e);var m=function(){fe(window,"mouseup",m),setTimeout(v,20)};he(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),o=""+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=d,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&g();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?ei(n,so)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Wa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Wa.prototype.setUneditable=function(){},Wa.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ea&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ea,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Li(e)}),!0),n("indentUnit",2,Li,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Di(e),Un(e),hr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(et(r,o))}r++}));for(var i=n.length-1;i>=0;i--)mo(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ea&&e.refresh()})),n("specialCharPlaceholder",Zt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){wa(e),mi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=$o(t),i=n!=Ea&&$o(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,_a,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=fi(t,e.options.lineNumbers),mi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?ar(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Hr(e)}),!0),n("scrollbarStyle","native",(function(e){Vr(e),Hr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=fi(e.options.gutters,t),mi(e)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(e){return e}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(kr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,ka),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Di,!0),n("addModeClass",!1,Di,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Di,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Ta),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ei(this,t[e])(this,n,i),pe(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"]($o(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:ti((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");!function(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,hr(this)})),removeOverlay:ti((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void hr(this)}})),indentLine:ti((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),Ze(this.doc,e)&&Aa(this,e,t,n)})),indentSelection:ti((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Aa(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Dr(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Aa(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&$i(this.doc,r,new Si(o,c[r].to()),z)}}})),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=dt(this,Ke(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var s=i[o[t][a]];s&&r.push(s)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var l=0;l<i._global.length;l++){var c=i._global[l];c.pred(o,this)&&-1==U(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return ft(this,(e=at(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return qn(this,null==e?n.head:"object"==typeof e?st(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Kn(this,st(this.doc,e),t||"page")},coordsChar:function(e,t){return $n(this,(e=Wn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Wn(this,{top:e,left:0},t||"page").top,Je(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),r=Ke(this.doc,e)}else r=e;return Vn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Gt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,a,s,l=this.display,c=(e=qn(this,st(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)c=e.top;else if("above"==r||"near"==r){var h=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(c=e.bottom),u+t.offsetWidth>d&&(u=d-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(o=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Ar(o,a)).scrollTop&&Nr(o,s.scrollTop),null!=s.scrollLeft&&Pr(o,s.scrollLeft))},triggerOnKeyDown:ti(ua),triggerOnKeyPress:ti(da),triggerOnKeyUp:ha,triggerOnMouseDown:ti(ga),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:ti((function(e){Ma(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),a=0;a<t&&!(o=Ba(this.doc,o,i,n,r)).hitSide;++a);return o},moveH:ti((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Ba(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),V)})),deleteH:ti((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Jo(this,(function(n){var i=Ba(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var a=st(this.doc,e),s=0;s<t;++s){var l=qn(this,a,"div");if(null==o?o=l.left:l.left=o,(a=Fa(this,l,i,n)).hitSide)break}return a},moveV:ti((function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var s=qn(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=Fa(n,s,e,t);return"page"==t&&a==r.sel.primary()&&Lr(n,Kn(n,l,"div").top-s.top),l}),V),i.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(e){var t=Ke(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),a=ee(o,i)?function(e){return ee(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ee(e)};n>0&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new Si(et(e.line,n),et(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?R(this.display.cursorDiv,"CodeMirror-overwrite"):_(this.display.cursorDiv,"CodeMirror-overwrite"),pe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==I()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ti((function(e,t){Ir(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-_n(this)-this.display.barHeight,width:e.scrollWidth-_n(this)-this.display.barWidth,clientHeight:On(this),clientWidth:Tn(this)}},scrollIntoView:ti((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:et(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Rr(e),e.curOp.scrollToPos=t}(this,e):Mr(this,e.from,e.to,e.margin)})),setSize:ti((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&Fn(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){dr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,pe(this,"refresh",this)})),operation:function(e){return Qr(this,e)},startOperation:function(){return Kr(this)},endOperation:function(){return qr(this)},refresh:ti((function(){var e=this.display.cachedTextHeight;hr(this),this.curOp.forceUpdate=!0,Un(this),Ir(this,this.doc.scrollLeft,this.doc.scrollTop),ci(this.display),(null==e||Math.abs(e-rr(this.display))>.5||this.options.lineWrapping)&&lr(this),pe(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Ni(this,e),Un(this),this.display.input.reset(),Ir(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(Ta);var Ka="iter insert remove copy getEditor constructor".split(" ");for(var qa in Do.prototype)Do.prototype.hasOwnProperty(qa)&&U(Ka,qa)<0&&(Ta.prototype[qa]=function(e){return function(){return e.apply(this.doc,arguments)}}(Do.prototype[qa]));return ye(Do),Ta.inputStyles={textarea:Wa,contenteditable:Ua},Ta.defineMode=function(e){Ta.defaults.mode||"null"==e||(Ta.defaults.mode=e),Pe.apply(this,arguments)},Ta.defineMIME=function(e,t){je[e]=t},Ta.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ta.defineMIME("text/plain","null"),Ta.defineExtension=function(e,t){Ta.prototype[e]=t},Ta.defineDocExtension=function(e,t){Do.prototype[e]=t},Ta.fromTextArea=function(e,t){if((t=t?P(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=I();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(he(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(fe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Ta((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=fe,e.on=he,e.wheelEventPixels=xi,e.Doc=Do,e.splitLines=De,e.countColumn=B,e.findColumn=W,e.isWordChar=Q,e.Pass=H,e.signal=pe,e.Line=Kt,e.changeEnd=_i,e.scrollbarModel=Gr,e.Pos=et,e.cmpPos=tt,e.modes=Ne,e.mimeModes=je,e.resolveMode=Be,e.getMode=Fe,e.modeExtensions=Ue,e.extendMode=He,e.copyState=ze,e.startState=Ve,e.innerMode=Ge,e.commands=ta,e.keyMap=Go,e.keyName=Yo,e.isModifierKey=qo,e.lookupKey=Ko,e.normalizeKeyMap=Wo,e.StringStream=We,e.SharedTextMarker=To,e.TextMarker=ko,e.LineWidget=Eo,e.e_preventDefault=be,e.e_stopPropagation=xe,e.e_stop=Ee,e.addClass=R,e.contains=D,e.rmClass=_,e.keyNames=Fo}(Ta),Ta.version="5.58.2",Ta}()},WYAk:
/*!****************************************!*\
!*** ./node_modules/crypto-js/hmac.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o,a;e.exports=(r=n(/*! ./core */"Ib8C"),o=(i=r).lib.Base,a=i.enc.Utf8,void(i.algo.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=a.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),s=i.words,l=o.words,c=0;c<n;c++)s[c]^=1549556828,l[c]^=909522486;i.sigBytes=o.sigBytes=r,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 t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})))},WaYH:
/*!*********************************************************!*\
!*** ./node_modules/rc-tree/es/TreeNode.js + 1 modules ***!
\*********************************************************/
/*! exports provided: InternalTreeNode, default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/contextTypes.js because of ./node_modules/rc-tree/es/Tree.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/util.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/utils/treeUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("rePB"),i=n("Ff2n"),o=n("VTBJ"),a=n("1OyB"),s=n("vuIU"),l=n("JX7q"),c=n("Ji7U"),u=n("LK+K"),h=n("q1tI"),d=n("TSYQ"),f=n.n(d),p=n("sboe"),m=n("OZM5"),g=function(e){var t=e.prefixCls,n=e.level,i=e.isStart,o=e.isEnd;if(!n)return null;for(var a="".concat(t,"-indent-unit"),s=[],l=0;l<n;l+=1){var c;s.push(h.createElement("span",{key:l,className:f()(a,(c={},Object(r.a)(c,"".concat(a,"-start"),i[l+1]),Object(r.a)(c,"".concat(a,"-end"),o[l+1]),Object(r.a)(c,"".concat(a,"-end-first-level"),!l&&o[0]),c))}))}return h.createElement("span",{"aria-hidden":"true",className:"".concat(t,"-indent")},s)},v=n("815F"),y=function(e){Object(c.a)(n,e);var t=Object(u.a)(n);function n(){var e;return Object(a.a)(this,n),(e=t.apply(this,arguments)).state={dragNodeHighlight:!1},e.onSelectorClick=function(t){(0,e.props.context.onNodeClick)(t,Object(v.b)(e.props)),e.isSelectable()?e.onSelect(t):e.onCheck(t)},e.onSelectorDoubleClick=function(t){(0,e.props.context.onNodeDoubleClick)(t,Object(v.b)(e.props))},e.onSelect=function(t){if(!e.isDisabled()){var n=e.props.context.onNodeSelect;t.preventDefault(),n(t,Object(v.b)(e.props))}},e.onCheck=function(t){if(!e.isDisabled()){var n=e.props,r=n.disableCheckbox,i=n.checked,o=e.props.context.onNodeCheck;if(e.isCheckable()&&!r){t.preventDefault();var a=!i;o(t,Object(v.b)(e.props),a)}}},e.onMouseEnter=function(t){(0,e.props.context.onNodeMouseEnter)(t,Object(v.b)(e.props))},e.onMouseLeave=function(t){(0,e.props.context.onNodeMouseLeave)(t,Object(v.b)(e.props))},e.onContextMenu=function(t){(0,e.props.context.onNodeContextMenu)(t,Object(v.b)(e.props))},e.onDragStart=function(t){var n=e.props.context.onNodeDragStart;t.stopPropagation(),e.setState({dragNodeHighlight:!0}),n(t,Object(l.a)(e));try{t.dataTransfer.setData("text/plain","")}catch(e){}},e.onDragEnter=function(t){var n=e.props.context.onNodeDragEnter;t.preventDefault(),t.stopPropagation(),n(t,Object(l.a)(e))},e.onDragOver=function(t){var n=e.props.context.onNodeDragOver;t.preventDefault(),t.stopPropagation(),n(t,Object(l.a)(e))},e.onDragLeave=function(t){var n=e.props.context.onNodeDragLeave;t.stopPropagation(),n(t,Object(l.a)(e))},e.onDragEnd=function(t){var n=e.props.context.onNodeDragEnd;t.stopPropagation(),e.setState({dragNodeHighlight:!1}),n(t,Object(l.a)(e))},e.onDrop=function(t){var n=e.props.context.onNodeDrop;t.preventDefault(),t.stopPropagation(),e.setState({dragNodeHighlight:!1}),n(t,Object(l.a)(e))},e.onExpand=function(t){(0,e.props.context.onNodeExpand)(t,Object(v.b)(e.props))},e.setSelectHandle=function(t){e.selectHandle=t},e.getNodeState=function(){var t=e.props.expanded;return e.isLeaf()?null:t?"open":"close"},e.hasChildren=function(){var t=e.props.eventKey;return!!((e.props.context.keyEntities[t]||{}).children||[]).length},e.isLeaf=function(){var t=e.props,n=t.isLeaf,r=t.loaded,i=e.props.context.loadData,o=e.hasChildren();return!1!==n&&(n||!i&&!o||i&&r&&!o)},e.isDisabled=function(){var t=e.props.disabled;return!(!e.props.context.disabled&&!t)},e.isCheckable=function(){var t=e.props.checkable,n=e.props.context.checkable;return!(!n||!1===t)&&n},e.syncLoadData=function(t){var n=t.expanded,r=t.loading,i=t.loaded,o=e.props.context,a=o.loadData,s=o.onNodeLoad;r||a&&n&&!e.isLeaf()&&(e.hasChildren()||i||s(Object(v.b)(e.props)))},e.renderSwitcher=function(){var t=e.props,n=t.expanded,r=t.switcherIcon,i=e.props.context,a=i.prefixCls,s=i.switcherIcon,l=r||s;if(e.isLeaf())return h.createElement("span",{className:f()("".concat(a,"-switcher"),"".concat(a,"-switcher-noop"))},"function"==typeof l?l(Object(o.a)(Object(o.a)({},e.props),{},{isLeaf:!0})):l);var c=f()("".concat(a,"-switcher"),"".concat(a,"-switcher_").concat(n?"open":"close"));return h.createElement("span",{onClick:e.onExpand,className:c},"function"==typeof l?l(Object(o.a)(Object(o.a)({},e.props),{},{isLeaf:!1})):l)},e.renderCheckbox=function(){var t=e.props,n=t.checked,r=t.halfChecked,i=t.disableCheckbox,o=e.props.context.prefixCls,a=e.isDisabled(),s=e.isCheckable();if(!s)return null;var l="boolean"!=typeof s?s:null;return h.createElement("span",{className:f()("".concat(o,"-checkbox"),n&&"".concat(o,"-checkbox-checked"),!n&&r&&"".concat(o,"-checkbox-indeterminate"),(a||i)&&"".concat(o,"-checkbox-disabled")),onClick:e.onCheck},l)},e.renderIcon=function(){var t=e.props.loading,n=e.props.context.prefixCls;return h.createElement("span",{className:f()("".concat(n,"-iconEle"),"".concat(n,"-icon__").concat(e.getNodeState()||"docu"),t&&"".concat(n,"-icon_loading"))})},e.renderSelector=function(){var t,n,r=e.state.dragNodeHighlight,i=e.props,o=i.title,a=i.selected,s=i.icon,l=i.loading,c=i.data,u=e.props.context,d=u.prefixCls,p=u.showIcon,m=u.icon,g=u.draggable,v=u.loadData,y=u.titleRender,b=e.isDisabled(),x="".concat(d,"-node-content-wrapper");if(p){var w=s||m;t=w?h.createElement("span",{className:f()("".concat(d,"-iconEle"),"".concat(d,"-icon__customize"))},"function"==typeof w?w(e.props):w):e.renderIcon()}else v&&l&&(t=e.renderIcon());n="function"==typeof o?o(c):y?y(c):o;var E=h.createElement("span",{className:"".concat(d,"-title")},n);return h.createElement("span",{ref:e.setSelectHandle,title:"string"==typeof o?o:"",className:f()("".concat(x),"".concat(x,"-").concat(e.getNodeState()||"normal"),!b&&(a||r)&&"".concat(d,"-node-selected"),!b&&g&&"draggable"),draggable:!b&&g||void 0,"aria-grabbed":!b&&g||void 0,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onContextMenu:e.onContextMenu,onClick:e.onSelectorClick,onDoubleClick:e.onSelectorDoubleClick,onDragStart:g?e.onDragStart:void 0},t,E)},e}return Object(s.a)(n,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var e=this.props.selectable,t=this.props.context.selectable;return"boolean"==typeof e?e:t}},{key:"render",value:function(){var e,t=this.props,n=t.eventKey,o=t.className,a=t.style,s=t.dragOver,l=t.dragOverGapTop,c=t.dragOverGapBottom,u=t.isLeaf,d=t.isStart,p=t.isEnd,y=t.expanded,b=t.selected,x=t.checked,w=t.halfChecked,E=t.loading,S=t.domRef,C=t.active,k=t.onMouseMove,_=Object(i.a)(t,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),T=this.props.context,O=T.prefixCls,A=T.filterTreeNode,L=T.draggable,D=T.keyEntities,I=this.isDisabled(),R=Object(m.f)(_),M=(D[n]||{}).level,N=p[p.length-1];return h.createElement("div",Object.assign({ref:S,className:f()(o,"".concat(O,"-treenode"),(e={},Object(r.a)(e,"".concat(O,"-treenode-disabled"),I),Object(r.a)(e,"".concat(O,"-treenode-switcher-").concat(y?"open":"close"),!u),Object(r.a)(e,"".concat(O,"-treenode-checkbox-checked"),x),Object(r.a)(e,"".concat(O,"-treenode-checkbox-indeterminate"),w),Object(r.a)(e,"".concat(O,"-treenode-selected"),b),Object(r.a)(e,"".concat(O,"-treenode-loading"),E),Object(r.a)(e,"".concat(O,"-treenode-active"),C),Object(r.a)(e,"".concat(O,"-treenode-leaf-last"),N),Object(r.a)(e,"drag-over",!I&&s),Object(r.a)(e,"drag-over-gap-top",!I&&l),Object(r.a)(e,"drag-over-gap-bottom",!I&&c),Object(r.a)(e,"filter-node",A&&A(Object(v.b)(this.props))),e)),style:a,onDragEnter:L?this.onDragEnter:void 0,onDragOver:L?this.onDragOver:void 0,onDragLeave:L?this.onDragLeave:void 0,onDrop:L?this.onDrop:void 0,onDragEnd:L?this.onDragEnd:void 0,onMouseMove:k},R),h.createElement(g,{prefixCls:O,level:M,isStart:d,isEnd:p}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),n}(h.Component),b=function(e){return h.createElement(p.a.Consumer,null,(function(t){return h.createElement(y,Object.assign({},e,{context:t}))}))};b.displayName="TreeNode",b.defaultProps={title:"---"},b.isTreeNode=1;t.a=b},WdTA:
/*!******************************************!*\
!*** ./src/assets/images/studnetqun.png ***!
\******************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/studnetqun.598eeb43.png"},Y1PL:
/*!**********************************************************!*\
!*** ./node_modules/rc-textarea/es/index.js + 7 modules ***!
\**********************************************************/
/*! exports provided: ResizableTextArea, default */
/*! all exports used */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.r(t),n.d(t,"ResizableTextArea",(function(){return R}));var r=n("wx14"),i=n("1OyB"),o=n("vuIU"),a=n("Ji7U"),s=n("LK+K"),l=n("q1tI"),c=n("VTBJ"),u=n("rePB"),h=n("Zm9Q"),d=(n("Kwbf"),n("c+Xe")),f=n("m+aA"),p=n("bdgK"),m=new Map;var g=new p.default((function(e){e.forEach((function(e){var t,n=e.target;null===(t=m.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))}));var v=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(l.Component),y=l.createContext(null);function b(e){var t=e.children,n=e.disabled,r=l.useRef(null),i=l.useRef(null),o=l.useContext(y),a=l.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),s=l.isValidElement(t)&&Object(d.c)(t),u=s?t.ref:null,h=l.useMemo((function(){return Object(d.a)(u,r)}),[u,r]),p=l.useRef(e);p.current=e;var b=l.useCallback((function(e){var t=p.current,n=t.onResize,r=t.data,i=e.getBoundingClientRect(),s=i.width,l=i.height,u=e.offsetWidth,h=e.offsetHeight,d=Math.floor(s),f=Math.floor(l);if(a.current.width!==d||a.current.height!==f||a.current.offsetWidth!==u||a.current.offsetHeight!==h){var m={width:d,height:f,offsetWidth:u,offsetHeight:h};a.current=m;var g=u===Math.round(s)?s:u,v=h===Math.round(l)?l:h,y=Object(c.a)(Object(c.a)({},m),{},{offsetWidth:g,offsetHeight:v});null==o||o(y,e,r),n&&Promise.resolve().then((function(){n(y,e)}))}}),[]);return l.useEffect((function(){var e,t,o=Object(f.a)(r.current)||Object(f.a)(i.current);return o&&!n&&(e=o,t=b,m.has(e)||(m.set(e,new Set),g.observe(e)),m.get(e).add(t)),function(){return function(e,t){m.has(e)&&(m.get(e).delete(t),m.get(e).size||(g.unobserve(e),m.delete(e)))}(o,b)}}),[r.current,n]),l.createElement(v,{ref:i},s?l.cloneElement(t,{ref:h}):t)}function x(e){var t=e.children;return Object(h.a)(t).map((function(t,n){var i=(null==t?void 0:t.key)||"".concat("rc-observer-key","-").concat(n);return l.createElement(b,Object(r.a)({},e,{key:i}),t)}))}x.Collection=function(e){var t=e.children,n=e.onBatchResize,r=l.useRef(0),i=l.useRef([]),o=l.useContext(y),a=l.useCallback((function(e,t,a){r.current+=1;var s=r.current;i.current.push({size:e,element:t,data:a}),Promise.resolve().then((function(){s===r.current&&(null==n||n(i.current),i.current=[])})),null==o||o(e,t,a)}),[n,o]);return l.createElement(y.Provider,{value:a},t)};var w,E=x,S=n("bT9E"),C=n("TSYQ"),k=n.n(C),_="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n",T=["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"],O={};function A(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&O[n])return O[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=T.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),l={sizingStyle:s,paddingSize:o,borderSize:a,boxSizing:i};return t&&n&&(O[n]=l),l}var L,D=n("Gytx"),I=n.n(D);!function(e){e[e.NONE=0]="NONE",e[e.RESIZING=1]="RESIZING",e[e.RESIZED=2]="RESIZED"}(L||(L={}));var R=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(e){var o;return Object(i.a)(this,n),(o=t.call(this,e)).nextFrameActionId=void 0,o.resizeFrameId=void 0,o.textArea=void 0,o.saveTextArea=function(e){o.textArea=e},o.handleResize=function(e){var t=o.state.resizeStatus,n=o.props,r=n.autoSize,i=n.onResize;t===L.NONE&&("function"==typeof i&&i(e),r&&o.resizeOnNextFrame())},o.resizeOnNextFrame=function(){cancelAnimationFrame(o.nextFrameActionId),o.nextFrameActionId=requestAnimationFrame(o.resizeTextarea)},o.resizeTextarea=function(){var e=o.props.autoSize;if(e&&o.textArea){var t=e.minRows,n=e.maxRows,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;w||((w=document.createElement("textarea")).setAttribute("tab-index","-1"),w.setAttribute("aria-hidden","true"),document.body.appendChild(w)),e.getAttribute("wrap")?w.setAttribute("wrap",e.getAttribute("wrap")):w.removeAttribute("wrap");var i=A(e,t),o=i.paddingSize,a=i.borderSize,s=i.boxSizing,l=i.sizingStyle;w.setAttribute("style","".concat(l,";").concat(_)),w.value=e.value||e.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,d=w.scrollHeight;if("border-box"===s?d+=a:"content-box"===s&&(d-=o),null!==n||null!==r){w.value=" ";var f=w.scrollHeight-o;null!==n&&(u=f*n,"border-box"===s&&(u=u+o+a),d=Math.max(u,d)),null!==r&&(h=f*r,"border-box"===s&&(h=h+o+a),c=d>h?"":"hidden",d=Math.min(h,d))}return{height:d,minHeight:u,maxHeight:h,overflowY:c,resize:"none"}}(o.textArea,!1,t,n);o.setState({textareaStyles:r,resizeStatus:L.RESIZING},(function(){cancelAnimationFrame(o.resizeFrameId),o.resizeFrameId=requestAnimationFrame((function(){o.setState({resizeStatus:L.RESIZED},(function(){o.resizeFrameId=requestAnimationFrame((function(){o.setState({resizeStatus:L.NONE}),o.fixFirefoxAutoScroll()}))}))}))}))}},o.renderTextArea=function(){var e=o.props,t=e.prefixCls,n=void 0===t?"rc-textarea":t,i=e.autoSize,a=e.onResize,s=e.className,h=e.disabled,d=o.state,f=d.textareaStyles,p=d.resizeStatus,m=Object(S.a)(o.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),g=k()(n,s,Object(u.a)({},"".concat(n,"-disabled"),h));"value"in m&&(m.value=m.value||"");var v=Object(c.a)(Object(c.a)(Object(c.a)({},o.props.style),f),p===L.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(E,{onResize:o.handleResize,disabled:!(i||a)},l.createElement("textarea",Object(r.a)({},m,{className:g,style:v,ref:o.saveTextArea})))},o.state={textareaStyles:{},resizeStatus:L.NONE},o}return Object(o.a)(n,[{key:"componentDidUpdate",value:function(e){e.value===this.props.value&&I()(e.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 e=this.textArea.selectionStart,t=this.textArea.selectionEnd;this.textArea.setSelectionRange(e,t)}}catch(e){}}},{key:"render",value:function(){return this.renderTextArea()}}]),n}(l.Component),M=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(e){var r;Object(i.a)(this,n),(r=t.call(this,e)).resizableTextArea=void 0,r.focus=function(){r.resizableTextArea.textArea.focus()},r.saveTextArea=function(e){r.resizableTextArea=e},r.handleChange=function(e){var t=r.props.onChange;r.setValue(e.target.value,(function(){r.resizableTextArea.resizeTextarea()})),t&&t(e)},r.handleKeyDown=function(e){var t=r.props,n=t.onPressEnter,i=t.onKeyDown;13===e.keyCode&&n&&n(e),i&&i(e)};var o=void 0===e.value||null===e.value?e.defaultValue:e.value;return r.state={value:o},r}return Object(o.a)(n,[{key:"setValue",value:function(e,t){"value"in this.props||this.setState({value:e},t)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return l.createElement(R,Object(r.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value}:null}}]),n}(l.Component);t.default=M},ZW9T:
/*!************************************************************!*\
!*** ./src/components/monaco-editor/index.jsx + 1 modules ***!
\************************************************************/
/*! exports provided: getLanguageByMirrorName, default, DiffEditor */
/*! exports used: DiffEditor, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n("k1fw"),i=(n("miYZ"),n("tsqr")),o=n("rAM+"),a=n("tJVT"),s=n("PpiC"),l=n("q1tI"),c=n.n(l),u=n("bdgK");function h(e,t,n,i,o){var a=t.getWordUntilPosition(n),s={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:a.startColumn,endColumn:a.endColumn},l=i.map((function(t){return{label:t,kind:e.languages.CompletionItemKind.Keyword,insertText:t,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:s}}));return o.map((function(e){l.push(Object(r.a)(Object(r.a)({},e),{},{range:s}))})),l}n("LvDl");function d(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}function f(){}var p={"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"};function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e;if(Array.isArray(e)){for(var n=0;n<e.length;n++){var r=p[e[n]];if(r)return r}return t[0]}return p[t]||t}var g=null;t.b=function(e){var t=e.width,p=void 0===t?"100%":t,v=e.height,y=void 0===v?"100%":v,b=e.value,x=e.language,w=void 0===x?"javascript":x,E=e.style,S=void 0===E?{}:E,C=e.options,k=void 0===C?{}:C,_=e.overrideServices,T=void 0===_?{}:_,O=e.theme,A=void 0===O?"vs-dark":O,L=e.onEditBlur,D=e.onSave,I=e.autoHeight,R=void 0!==I&&I,M=e.forbidCopy,N=void 0!==M&&M,j=e.onChange,P=void 0===j?f:j,B=e.editorDidMount,F=void 0===B?f:B,U=e.onFocus,H=void 0===U?f:U,z=e.filename,G=void 0===z?"educoder.txt":z,V=(Object(s.a)(e,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),Object(l.useRef)()),W=Object(l.useRef)({}),K=Object(l.useRef)(),q=Object(l.useRef)(!1),X=Object(l.useRef)(),Y=Object(l.useState)(!1),$=Object(a.a)(Y,2),J=$[0],Z=$[1];function Q(){i.b.warn(decodeURIComponent("该任务关卡设置了禁止复制粘贴,请手动输入代码。"))}function ee(){var e=W.current.instance;if(e){var t=e.getSelection(),n=W.current.pastePos||{},r=new g.Range(n.startLineNumber||t.endLineNumber,n.startColumn||t.endColumn,n.endLineNumber||t.endLineNumber,n.endColumn||t.endColumn);setTimeout((function(){e.executeEdits("",[{range:r,text:""}])}),300)}}function te(e){(window.navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&83==e.keyCode&&(e.preventDefault(),D())}Object(l.useEffect)((function(){K.current&&clearTimeout(K.current),K.current=setTimeout((function(){!function(){var e=W.current.instance;if(null!=b&&e&&J){var t=e.getModel();t&&b!==t.getValue()&&(!0,t.setValue(b),e.layout(),!1)}}()}),500)}),[b,J,W.current]);var ne=function(){if(R&&W.current.instance){var e=W.current.instance.getContentHeight();ue(e<y?y:e)}else ue(y)};function re(e,t){var n,r,i=window.URL||window.webkitURL||window,o=new Blob([t]),a=document.createElementNS("http://www.w3.org/1999/xhtml","a");a.href=i.createObjectURL(o),a.download=e,n=a,(r=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(r)}Object(l.useEffect)((function(){ne()}),[ne]),Object(l.useEffect)((function(){V.current&&!J&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(e){try{g=e,W.current.instance=g.editor.create(V.current,{value:b,language:m(w),theme:A,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},T);var t=W.current.instance;if(F(t,g),setTimeout((function(){ne(),W.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){re(G||"educoder.txt",t.getValue())}})}),500),W.current.subscription=t.onDidChangeModelContent((function(e){q.current?clearTimeout(X.current):(ne(),P(t.getValue(),e)),X.current=setTimeout((function(){q.current=!1}),500)})),window.Monaco||function(e){var t={label:"ifelse",kind:e.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {","\t$0","} else {","\t","}"].join("\n"),insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet},n=["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(r,i){return{suggestions:h(e,r,i,n,[t])}}});var r=["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(t,n){var i=[{label:"print",kind:e.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join("\n"),insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet}];return{suggestions:h(e,t,n,r,i)}}});var i=["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(n,r){var o=[t,{label:"main",kind:e.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {","\t$0","}"].join("\n"),insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:e.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join("\n"),insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet}];return{suggestions:h(e,n,r,i,o)}}})}(g),N&&(t.addCommand(g.KeyMod.CtrlCmd|g.KeyMod.Shift|g.KeyCode.KEY_V,(function(){return Q(),null})),t.addCommand(g.KeyMod.CtrlCmd|g.KeyCode.KEY_C,(function(){return Q(),null}))),window.Monaco=g,L&&t.onDidBlurEditorWidget((function(){L(t.getValue())})),H&&t.onDidFocusEditorText((function(){H(t.getValue())})),N){t.addCommand(g.KeyMod.CtrlCmd|g.KeyCode.KEY_V,(function(){return Q(),null})),t.onDidPaste((function(e){W.current.pastePos=e}));try{window.addEventListener("paste",ee)}catch(e){}}var n=function(){var e;return V.current&&(e=new u.default((function(e){var t,n=Object(o.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&W.current.instance.layout()}}catch(e){n.e(e)}finally{n.f()}}))).observe(V.current),e}();return Z(!0),function(){var e=W.current.instance;e.dispose();var t=e.getModel();t&&t.dispose(),W.current.subscription&&W.current.subscription.dispose(),N&&window.removeEventListener("paste",ee),n.unobserve(V.current)}}catch(e){}}))}),[]),Object(l.useEffect)((function(){if(W.current.instance&&J)return document.addEventListener("keydown",te,!1),function(){document.removeEventListener("keydown",te)}}),[D,J]),Object(l.useEffect)((function(){var e=W.current.instance;if(e&&J){var t=m(w);g.editor.setModelLanguage(e.getModel(),t),console.log("language:",w,e.getModel(),t)}}),[w,J]),Object(l.useEffect)((function(){W.current.instance&&J&&g.editor.setTheme(A)}),[A,J]),Object(l.useEffect)((function(){var e=W.current.instance;e&&J&&(e.updateOptions(Object(r.a)({},k)),setTimeout((function(){e.getModel().updateOptions(Object(r.a)({},k))}),200))}),[JSON.stringify(k),J]),Object(l.useEffect)((function(){var e=W.current.instance;e&&J&&e.layout()}),[p,y,J]);var ie=Object(l.useState)(d(p)),oe=Object(a.a)(ie,2),ae=oe[0],se=(oe[1],Object(l.useState)(d(y))),le=Object(a.a)(se,2),ce=le[0],ue=le[1],he=Object(r.a)(Object(r.a)({},S),{},{width:ae,height:ce});return c.a.createElement("div",{className:"my-monaco-editor",ref:V,style:he})};function v(e){var t=e.width,i=void 0===t?"100%":t,s=e.height,h=void 0===s?"100%":s,f=e.original,p=e.modified,m=e.language,v=e.options,y=void 0===v?{}:v,b=Object(l.useRef)(),x=Object(l.useState)(null),w=Object(a.a)(x,2),E=w[0],S=w[1];Object(l.useEffect)((function(){b.current&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(e){var t=(g=e).editor.createDiffEditor(b.current,Object(r.a)(Object(r.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},y),{},{wordWrap:!0}));S(t);var n=function(e){var t;return b.current&&(t=new u.default((function(t){var n,r=Object(o.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&e.layout()}}catch(e){r.e(e)}finally{r.f()}}))).observe(b.current),t}(t);return function(){t.dispose();var e=t.getModel();e&&e.dispose(),n.unobserve(b.current)}}))}),[]),Object(l.useEffect)((function(){E&&E.setModel({original:g.editor.createModel(f,m),modified:g.editor.createModel(p,m)})}),[f,p,m,E]);var C={width:d(i),height:d(h)};return c.a.createElement("div",{className:"my-diff-editor",ref:b,style:C})}},ZpRC:
/*!*************************************************************************!*\
!*** ./node_modules/scroll-into-view-if-needed/es/index.js + 1 modules ***!
\*************************************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function i(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function o(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return i(n.overflowY,t)||i(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function a(e,t,n,r,i,o,a,s){return o<e&&a>t||o>e&&a<t?0:o<=e&&s<=n||a>=t&&s>=n?o-e-r:a>t&&s<n||o<e&&s>n?a-t+i:0}var s=function(e,t){var n=window,i=t.scrollMode,s=t.block,l=t.inline,c=t.boundary,u=t.skipOverflowHiddenElements,h="function"==typeof c?c:function(e){return e!==c};if(!r(e))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,f=[],p=e;r(p)&&h(p);){if((p=p.parentElement)===d){f.push(p);break}null!=p&&p===document.body&&o(p)&&!o(document.documentElement)||null!=p&&o(p,u)&&f.push(p)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),x=b.height,w=b.width,E=b.top,S=b.right,C=b.bottom,k=b.left,_="start"===s||"nearest"===s?E:"end"===s?C:E+x/2,T="center"===l?k+w/2:"end"===l?S:k,O=[],A=0;A<f.length;A++){var L=f[A],D=L.getBoundingClientRect(),I=D.height,R=D.width,M=D.top,N=D.right,j=D.bottom,P=D.left;if("if-needed"===i&&E>=0&&k>=0&&C<=g&&S<=m&&E>=M&&C<=j&&k>=P&&S<=N)return O;var B=getComputedStyle(L),F=parseInt(B.borderLeftWidth,10),U=parseInt(B.borderTopWidth,10),H=parseInt(B.borderRightWidth,10),z=parseInt(B.borderBottomWidth,10),G=0,V=0,W="offsetWidth"in L?L.offsetWidth-L.clientWidth-F-H:0,K="offsetHeight"in L?L.offsetHeight-L.clientHeight-U-z:0;if(d===L)G="start"===s?_:"end"===s?_-g:"nearest"===s?a(y,y+g,g,U,z,y+_,y+_+x,x):_-g/2,V="start"===l?T:"center"===l?T-m/2:"end"===l?T-m:a(v,v+m,m,F,H,v+T,v+T+w,w),G=Math.max(0,G+y),V=Math.max(0,V+v);else{G="start"===s?_-M-U:"end"===s?_-j+z+K:"nearest"===s?a(M,j,I,U,z+K,_,_+x,x):_-(M+I/2)+K/2,V="start"===l?T-P-F:"center"===l?T-(P+R/2)+W/2:"end"===l?T-N+H+W:a(P,N,R,F,H+W,T,T+w,w);var q=L.scrollLeft,X=L.scrollTop;_+=X-(G=Math.max(0,Math.min(X+G,L.scrollHeight-I+K))),T+=q-(V=Math.max(0,Math.min(q+V,L.scrollWidth-R+W)))}O.push({el:L,top:G,left:V})}return O};function l(e){return e===Object(e)&&0!==Object.keys(e).length}t.a=function(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(l(t)&&"function"==typeof t.behavior)return t.behavior(n?[]:s(e,t));if(!n){var r=function(e){return!1===e?{block:"end",inline:"nearest"}:l(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var r=e.el,i=e.top,o=e.left;r.scroll&&n?r.scroll({top:i,left:o,behavior:t}):(r.scrollTop=i,r.scrollLeft=o)}))}(s(e,r),r.behavior)}}},Zss7:
/*!**********************************************!*\
!*** ./node_modules/tinycolor2/tinycolor.js ***!
\**********************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;!function(i){var o=/^\s+/,a=/\s+$/,s=0,l=i.round,c=i.min,u=i.max,h=i.random;function d(e,t){if(t=t||{},(e=e||"")instanceof d)return e;if(!(this instanceof d))return new d(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,l=null,h=!1,d=!1;"string"==typeof e&&(e=function(e){e=e.replace(o,"").replace(a,"").toLowerCase();var t,n=!1;if(L[e])e=L[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=G.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=G.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=G.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=G.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=G.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=G.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=G.hex8.exec(e))return{r:N(t[1]),g:N(t[2]),b:N(t[3]),a:F(t[4]),format:n?"name":"hex8"};if(t=G.hex6.exec(e))return{r:N(t[1]),g:N(t[2]),b:N(t[3]),format:n?"name":"hex"};if(t=G.hex4.exec(e))return{r:N(t[1]+""+t[1]),g:N(t[2]+""+t[2]),b:N(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=G.hex3.exec(e))return{r:N(t[1]+""+t[1]),g:N(t[2]+""+t[2]),b:N(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(V(e.r)&&V(e.g)&&V(e.b)?(f=e.r,p=e.g,m=e.b,t={r:255*R(f,255),g:255*R(p,255),b:255*R(m,255)},h=!0,d="%"===String(e.r).substr(-1)?"prgb":"rgb"):V(e.h)&&V(e.s)&&V(e.v)?(r=P(e.s),s=P(e.v),t=function(e,t,n){e=6*R(e,360),t=R(t,100),n=R(n,100);var r=i.floor(e),o=e-r,a=n*(1-t),s=n*(1-o*t),l=n*(1-(1-o)*t),c=r%6;return{r:255*[n,s,a,a,l,n][c],g:255*[l,n,n,s,a,a][c],b:255*[a,a,l,n,n,s][c]}}(e.h,r,s),h=!0,d="hsv"):V(e.h)&&V(e.s)&&V(e.l)&&(r=P(e.s),l=P(e.l),t=function(e,t,n){var r,i,o;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=R(e,360),t=R(t,100),n=R(n,100),0===t)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=a(l,s,e+1/3),i=a(l,s,e),o=a(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,r,l),h=!0,d="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,m;return n=I(n),{ok:h,format:e.format||d,r:c(255,u(t.r,0)),g:c(255,u(t.g,0)),b:c(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=s++}function f(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var r,i,o=u(e,t,n),a=c(e,t,n),s=(o+a)/2;if(o==a)r=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,l:s}}function p(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var r,i,o=u(e,t,n),a=c(e,t,n),s=o,l=o-a;if(i=0===o?0:l/o,o==a)r=0;else{switch(o){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,v:s}}function m(e,t,n,r){var i=[j(l(e).toString(16)),j(l(t).toString(16)),j(l(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function g(e,t,n,r){return[j(B(r)),j(l(e).toString(16)),j(l(t).toString(16)),j(l(n).toString(16))].join("")}function v(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.s-=t/100,n.s=M(n.s),d(n)}function y(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.s+=t/100,n.s=M(n.s),d(n)}function b(e){return d(e).desaturate(100)}function x(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.l+=t/100,n.l=M(n.l),d(n)}function w(e,t){t=0===t?0:t||10;var n=d(e).toRgb();return n.r=u(0,c(255,n.r-l(-t/100*255))),n.g=u(0,c(255,n.g-l(-t/100*255))),n.b=u(0,c(255,n.b-l(-t/100*255))),d(n)}function E(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.l-=t/100,n.l=M(n.l),d(n)}function S(e,t){var n=d(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,d(n)}function C(e){var t=d(e).toHsl();return t.h=(t.h+180)%360,d(t)}function k(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+120)%360,s:t.s,l:t.l}),d({h:(n+240)%360,s:t.s,l:t.l})]}function _(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+90)%360,s:t.s,l:t.l}),d({h:(n+180)%360,s:t.s,l:t.l}),d({h:(n+270)%360,s:t.s,l:t.l})]}function T(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+72)%360,s:t.s,l:t.l}),d({h:(n+216)%360,s:t.s,l:t.l})]}function O(e,t,n){t=t||6,n=n||30;var r=d(e).toHsl(),i=360/n,o=[d(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(d(r));return o}function A(e,t){t=t||6;for(var n=d(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(d({h:r,s:i,v:o})),o=(o+s)%1;return a}d.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 e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:i.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=I(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var o=[j(l(e).toString(16)),j(l(t).toString(16)),j(l(n).toString(16)),j(B(r))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*R(this._r,255))+"%",g:l(100*R(this._g,255))+"%",b:l(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*R(this._r,255))+"%, "+l(100*R(this._g,255))+"%, "+l(100*R(this._b,255))+"%)":"rgba("+l(100*R(this._r,255))+"%, "+l(100*R(this._g,255))+"%, "+l(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(D[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=d(e);n="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(S,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(C,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(_,arguments)}},d.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:P(e[r]));e=n}return d(e,t)},d.equals=function(e,t){return!(!e||!t)&&d(e).toRgbString()==d(t).toRgbString()},d.random=function(){return d.fromRatio({r:h(),g:h(),b:h()})},d.mix=function(e,t,n){n=0===n?0:n||50;var r=d(e).toRgb(),i=d(t).toRgb(),o=n/100;return d({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},d.readability=function(e,t){var n=d(e),r=d(t);return(i.max(n.getLuminance(),r.getLuminance())+.05)/(i.min(n.getLuminance(),r.getLuminance())+.05)},d.isReadable=function(e,t,n){var r,i,o=d.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},d.mostReadable=function(e,t,n){var r,i,o,a,s=null,l=0;i=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;for(var c=0;c<t.length;c++)(r=d.readability(e,t[c]))>l&&(l=r,s=d(t[c]));return d.isReadable(e,s,{level:o,size:a})||!i?s:(n.includeFallbackColors=!1,d.mostReadable(e,["#fff","#000"],n))};var L=d.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"},D=d.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(L);function I(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function R(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function M(e){return c(1,u(0,e))}function N(e){return parseInt(e,16)}function j(e){return 1==e.length?"0"+e:""+e}function P(e){return e<=1&&(e=100*e+"%"),e}function B(e){return i.round(255*parseFloat(e)).toString(16)}function F(e){return N(e)/255}var U,H,z,G=(H="[\\s|\\(]+("+(U="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",z="[\\s|\\(]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",{CSS_UNIT:new RegExp(U),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+z),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 V(e){return!!G.CSS_UNIT.exec(e)}e.exports?e.exports=d:void 0===(r=function(){return d}.call(t,n,t,e))||(e.exports=r)}(Math)},aRTE:
/*!*****************************************************!*\
!*** ./node_modules/qr.js/lib/ErrorCorrectLevel.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports={L:1,M:0,Q:3,H:2}},bQjk:
/*!**********************************************!*\
!*** ./node_modules/crypto-js/format-hex.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o,a;e.exports=(a=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),i=(r=a).lib.CipherParams,o=r.enc.Hex,r.format.Hex={stringify:function(e){return e.ciphertext.toString(o)},parse:function(e){var t=o.parse(e);return i.create({ciphertext:t})}},a.format.Hex)},bT9E:
/*!*****************************************!*\
!*** ./node_modules/rc-util/es/omit.js ***!
\*****************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ");function i(e,t){var n=Object(r.a)({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}},biw7:
/*!**********************************************************!*\
!*** ./node_modules/rc-table/es/context/TableContext.js ***!
\**********************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! react */"q1tI"),i=r.createContext(null);t.a=i},c5Ni:
/*!******************************************************!*\
!*** ./node_modules/codemirror/theme/blackboard.css ***!
\******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},cv67:
/*!***************************************!*\
!*** ./node_modules/crypto-js/md5.js ***!
\***************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],l=e[t+1],f=e[t+2],p=e[t+3],m=e[t+4],g=e[t+5],v=e[t+6],y=e[t+7],b=e[t+8],x=e[t+9],w=e[t+10],E=e[t+11],S=e[t+12],C=e[t+13],k=e[t+14],_=e[t+15],T=o[0],O=o[1],A=o[2],L=o[3];T=c(T,O,A,L,a,7,s[0]),L=c(L,T,O,A,l,12,s[1]),A=c(A,L,T,O,f,17,s[2]),O=c(O,A,L,T,p,22,s[3]),T=c(T,O,A,L,m,7,s[4]),L=c(L,T,O,A,g,12,s[5]),A=c(A,L,T,O,v,17,s[6]),O=c(O,A,L,T,y,22,s[7]),T=c(T,O,A,L,b,7,s[8]),L=c(L,T,O,A,x,12,s[9]),A=c(A,L,T,O,w,17,s[10]),O=c(O,A,L,T,E,22,s[11]),T=c(T,O,A,L,S,7,s[12]),L=c(L,T,O,A,C,12,s[13]),A=c(A,L,T,O,k,17,s[14]),T=u(T,O=c(O,A,L,T,_,22,s[15]),A,L,l,5,s[16]),L=u(L,T,O,A,v,9,s[17]),A=u(A,L,T,O,E,14,s[18]),O=u(O,A,L,T,a,20,s[19]),T=u(T,O,A,L,g,5,s[20]),L=u(L,T,O,A,w,9,s[21]),A=u(A,L,T,O,_,14,s[22]),O=u(O,A,L,T,m,20,s[23]),T=u(T,O,A,L,x,5,s[24]),L=u(L,T,O,A,k,9,s[25]),A=u(A,L,T,O,p,14,s[26]),O=u(O,A,L,T,b,20,s[27]),T=u(T,O,A,L,C,5,s[28]),L=u(L,T,O,A,f,9,s[29]),A=u(A,L,T,O,y,14,s[30]),T=h(T,O=u(O,A,L,T,S,20,s[31]),A,L,g,4,s[32]),L=h(L,T,O,A,b,11,s[33]),A=h(A,L,T,O,E,16,s[34]),O=h(O,A,L,T,k,23,s[35]),T=h(T,O,A,L,l,4,s[36]),L=h(L,T,O,A,m,11,s[37]),A=h(A,L,T,O,y,16,s[38]),O=h(O,A,L,T,w,23,s[39]),T=h(T,O,A,L,C,4,s[40]),L=h(L,T,O,A,a,11,s[41]),A=h(A,L,T,O,p,16,s[42]),O=h(O,A,L,T,v,23,s[43]),T=h(T,O,A,L,x,4,s[44]),L=h(L,T,O,A,S,11,s[45]),A=h(A,L,T,O,_,16,s[46]),T=d(T,O=h(O,A,L,T,f,23,s[47]),A,L,a,6,s[48]),L=d(L,T,O,A,y,10,s[49]),A=d(A,L,T,O,k,15,s[50]),O=d(O,A,L,T,g,21,s[51]),T=d(T,O,A,L,S,6,s[52]),L=d(L,T,O,A,p,10,s[53]),A=d(A,L,T,O,w,15,s[54]),O=d(O,A,L,T,l,21,s[55]),T=d(T,O,A,L,b,6,s[56]),L=d(L,T,O,A,_,10,s[57]),A=d(A,L,T,O,v,15,s[58]),O=d(O,A,L,T,C,21,s[59]),T=d(T,O,A,L,m,6,s[60]),L=d(L,T,O,A,E,10,s[61]),A=d(A,L,T,O,f,15,s[62]),O=d(O,A,L,T,x,21,s[63]),o[0]=o[0]+T|0,o[1]=o[1]+O|0,o[2]=o[2]+A|0,o[3]=o[3]+L|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,a){var s=e+(t&n|~t&r)+i+a;return(s<<o|s>>>32-o)+t}function u(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+i+a;return(s<<o|s>>>32-o)+t}function h(e,t,n,r,i,o,a){var s=e+(t^n^r)+i+a;return(s<<o|s>>>32-o)+t}function d(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+i+a;return(s<<o|s>>>32-o)+t}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),r.MD5)},dQei:
/*!****************************************!*\
!*** ./node_modules/qr.js/lib/math.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){for(var n={glog:function(e){if(e<1)throw new Error("glog("+e+")");return n.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return n.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},r=0;r<8;r++)n.EXP_TABLE[r]=1<<r;for(r=8;r<256;r++)n.EXP_TABLE[r]=n.EXP_TABLE[r-4]^n.EXP_TABLE[r-5]^n.EXP_TABLE[r-6]^n.EXP_TABLE[r-8];for(r=0;r<255;r++)n.LOG_TABLE[n.EXP_TABLE[r]]=r;e.exports=n},dWSS:
/*!**********************************************!*\
!*** ./node_modules/qr.js/lib/Polynomial.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./math */"dQei");function i(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var r=0;r<e.length-n;r++)this.num[r]=e[r+n]}i.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var o=0;o<e.getLength();o++)t[n+o]^=r.gexp(r.glog(this.get(n))+r.glog(e.get(o)));return new i(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=r.glog(this.get(0))-r.glog(e.get(0)),n=new Array(this.getLength()),o=0;o<this.getLength();o++)n[o]=this.get(o);for(o=0;o<e.getLength();o++)n[o]^=r.gexp(r.glog(e.get(o))+t);return new i(n,0).mod(e)}},e.exports=i},dejd:
/*!***********************************************************!*\
!*** ./src/components/markdown-editor/toolbar/index.less ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},dmUQ:
/*!**************************************************************!*\
!*** ./node_modules/rc-input-number/es/index.js + 1 modules ***!
\**************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("Ff2n"),i=n("rePB"),o=n("1OyB"),a=n("vuIU"),s=n("Ji7U"),l=n("md7G"),c=n("foSv"),u=n("q1tI"),h=n.n(u),d=n("TSYQ"),f=n.n(d),p=n("4IlW");function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}function y(){}function b(e){e.preventDefault()}var x=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,w=function(e){return null!=e},E=function(e,t){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)},S=function(e){Object(s.a)(n,e);var t=v(n);function n(e){var r;Object(o.a)(this,n),(r=t.call(this,e)).onKeyDown=function(e){var t=r.props,n=t.onKeyDown,i=t.onPressEnter;if(e.keyCode===p.a.UP){var o=r.getRatio(e);r.up(e,o,null),r.stop()}else if(e.keyCode===p.a.DOWN){var a=r.getRatio(e);r.down(e,a,null),r.stop()}else e.keyCode===p.a.ENTER&&i&&i(e);if(r.recordCursorPosition(),r.lastKeyCode=e.keyCode,n){for(var s=arguments.length,l=new Array(s>1?s-1:0),c=1;c<s;c++)l[c-1]=arguments[c];n.apply(void 0,[e].concat(l))}},r.onKeyUp=function(e){var t=r.props.onKeyUp;if(r.stop(),r.recordCursorPosition(),t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];t.apply(void 0,[e].concat(i))}},r.onChange=function(e){var t=r.props.onChange;r.state.focused&&(r.inputting=!0),r.rawInput=r.props.parser(r.getValueFromEvent(e)),r.setState({inputValue:r.rawInput}),t(r.toNumber(r.rawInput))},r.onMouseUp=function(){var e=r.props.onMouseUp;r.recordCursorPosition(),e&&e.apply(void 0,arguments)},r.onFocus=function(){var e;r.setState({focused:!0}),(e=r.props).onFocus.apply(e,arguments)},r.onBlur=function(){var e=r.props.onBlur;r.inputting=!1,r.setState({focused:!1});var t=r.getCurrentValidValue(r.state.inputValue),n=r.setValue(t,y);if(e){var i=r.input.value,o=r.getInputDisplayValue({focus:!1,value:n});r.input.value=o?Number(o):o,e.apply(void 0,arguments),r.input.value=i}},r.getRatio=function(e){var t=1;return e.metaKey||e.ctrlKey?t=.1:e.shiftKey&&(t=10),t},r.getFullNum=function(e){return isNaN(e)?e:/e/i.test(String(e))?Number(e).toFixed(18).replace(/\.?0+$/,""):e},r.getPrecision=function(e){if(w(r.props.precision))return r.props.precision;var t=String(e);if(t.indexOf("e-")>=0)return parseInt(t.slice(t.indexOf("e-")+2),10);var n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n},r.getInputDisplayValue=function(e){var t,n=e||r.state,i=n.focused,o=n.inputValue,a=n.value;null==(t=i?o:r.toPrecisionAsStep(a))&&(t="");var s=r.formatWrapper(t);return w(r.props.decimalSeparator)&&(s=s.toString().replace(".",r.props.decimalSeparator)),s},r.recordCursorPosition=function(){try{r.cursorStart=r.input.selectionStart,r.cursorEnd=r.input.selectionEnd,r.currentValue=r.input.value,r.cursorBefore=r.input.value.substring(0,r.cursorStart),r.cursorAfter=r.input.value.substring(r.cursorEnd)}catch(e){}},r.restoreByAfter=function(e){if(void 0===e)return!1;var t=r.input.value,n=t.lastIndexOf(e);if(-1===n)return!1;var i=r.cursorBefore.length;return r.lastKeyCode===p.a.DELETE&&r.cursorBefore.charAt(i-1)===e[0]?(r.fixCaret(i,i),!0):n+e.length===t.length&&(r.fixCaret(n,n),!0)},r.partRestoreByAfter=function(e){return void 0!==e&&Array.prototype.some.call(e,(function(t,n){var i=e.substring(n);return r.restoreByAfter(i)}))},r.isNotCompleteNumber=function(e){return isNaN(e)||""===e||null===e||e&&e.toString().indexOf(".")===e.toString().length-1},r.stop=function(){r.autoStepTimer&&clearTimeout(r.autoStepTimer)},r.down=function(e,t,n){r.pressingUpOrDown=!0,r.step("down",e,t,n)},r.up=function(e,t,n){r.pressingUpOrDown=!0,r.step("up",e,t,n)},r.saveInput=function(e){r.input=e};var i=e.value;void 0===i&&(i=e.defaultValue),r.state={focused:e.autoFocus};var a=r.getValidValue(r.toNumber(i));return r.state=g(g({},r.state),{},{inputValue:r.toPrecisionAsStep(a),value:a}),r}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.value,r=t.onChange,i=t.max,o=t.min,a=this.state.focused;if(e){if(!E(e.value,n)||!E(e.max,i)||!E(e.min,o)){var s,l=a?n:this.getValidValue(n);s=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:s})}var c="value"in this.props?n:this.state.value;"max"in this.props&&e.max!==i&&"number"==typeof c&&c>i&&r&&r(i),"min"in this.props&&e.min!==o&&"number"==typeof c&&c<o&&r&&r(o)}try{if(void 0!==this.cursorStart&&this.state.focused)if(this.partRestoreByAfter(this.cursorAfter)||this.state.value===this.props.value){if(this.currentValue===this.input.value)switch(this.lastKeyCode){case p.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case p.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1)}}else{var u=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===p.a.BACKSPACE?u=this.cursorStart-1:this.lastKeyCode===p.a.DELETE&&(u=this.cursorStart):u=this.input.value.length,this.fixCaret(u,u)}}catch(e){}this.lastKeyCode=null,this.pressingUpOrDown&&this.props.focusOnUpDown&&this.state.focused&&document.activeElement!==this.input&&this.focus()}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(e){var t=e;return t=""===t?"":this.isNotCompleteNumber(parseFloat(t))?this.state.value:this.getValidValue(t),this.toNumber(t)}},{key:"getValueFromEvent",value:function(e){var t=e.target.value.trim().replace(/。/g,".");return w(this.props.decimalSeparator)&&(t=t.replace(this.props.decimalSeparator,".")),t}},{key:"getValidValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props.min,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.max,r=parseFloat(e);return isNaN(r)?e:(r<t&&(r=t),r>n&&(r=n),r)}},{key:"setValue",value:function(e,t){var n=this.props.precision,r=this.isNotCompleteNumber(parseFloat(e))?null:parseFloat(e),i=this.state.value,o=void 0===i?null:i,a=this.state.inputValue,s=void 0===a?null:a,l="number"==typeof r?r.toFixed(n):"".concat(r),c=r!==o||l!=="".concat(s);return"value"in this.props?(s=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:s},t)):this.setState({value:r,inputValue:this.toPrecisionAsStep(e)},t),c&&this.props.onChange(r),r}},{key:"getMaxPrecision",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.props,r=n.precision,i=n.step;if(w(r))return r;var o=this.getPrecision(t),a=this.getPrecision(i),s=this.getPrecision(e);return e?Math.max(s,o+a):o+a}},{key:"getPrecisionFactor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getMaxPrecision(e,t);return Math.pow(10,n)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(e){return this.props.formatter?this.props.formatter(e):e}},{key:"toPrecisionAsStep",value:function(e){if(this.isNotCompleteNumber(e)||""===e)return e;var t=Math.abs(this.getMaxPrecision(e));return isNaN(t)?e.toString():Number(e).toFixed(t)}},{key:"toNumber",value:function(e){var t=this.props.precision,n=this.state.focused,r=e&&e.length>16&&n;return this.isNotCompleteNumber(e)||r?e:w(t)?Math.round(e*Math.pow(10,t))/Math.pow(10,t):Number(e)}},{key:"upStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),o=((r*e+r*n*t)/r).toFixed(i);return this.toNumber(o)}},{key:"downStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),o=((r*e-r*n*t)/r).toFixed(i);return this.toNumber(o)}},{key:"step",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0;this.stop(),t&&(t.persist(),t.preventDefault());var o=this.props;if(!o.disabled){var a=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(a)){var s=this["".concat(e,"Step")](a,r),l=s>o.max||s<o.min;s>o.max?s=o.max:s<o.min&&(s=o.min),this.setValue(s,null),this.setState({focused:!0},(function(){n.pressingUpOrDown=!1})),l||(this.autoStepTimer=setTimeout((function(){n[e](t,r,!0)}),i?200:600))}}}},{key:"fixCaret",value:function(e,t){if(void 0!==e&&void 0!==t&&this.input&&this.input.value)try{var n=this.input.selectionStart,r=this.input.selectionEnd;e===n&&t===r||this.input.setSelectionRange(e,t)}catch(e){}}},{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,o=t.disabled,a=t.readOnly,s=t.useTouch,l=t.autoComplete,c=t.upHandler,u=t.downHandler,d=t.className,p=t.max,m=t.min,g=t.style,v=t.title,x=t.onMouseEnter,w=t.onMouseLeave,E=t.onMouseOver,S=t.onMouseOut,C=t.required,k=t.onClick,_=t.tabIndex,T=t.type,O=t.placeholder,A=t.id,L=t.inputMode,D=t.pattern,I=t.step,R=t.maxLength,M=t.autoFocus,N=t.name,j=t.onPaste,P=t.onInput,B=Object(r.a)(t,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),F=this.state,U=F.value,H=F.focused,z=f()(n,(e={},Object(i.a)(e,d,!!d),Object(i.a)(e,"".concat(n,"-disabled"),o),Object(i.a)(e,"".concat(n,"-focused"),H),e)),G={};Object.keys(B).forEach((function(e){"data-"!==e.substr(0,5)&&"aria-"!==e.substr(0,5)&&"role"!==e||(G[e]=B[e])}));var V=!a&&!o,W=this.getInputDisplayValue(null),K=(U||0===U)&&(isNaN(U)||Number(U)>=p)||o||a,q=(U||0===U)&&(isNaN(U)||Number(U)<=m)||o||a,X=f()("".concat(n,"-handler"),"".concat(n,"-handler-up"),Object(i.a)({},"".concat(n,"-handler-up-disabled"),K)),Y=f()("".concat(n,"-handler"),"".concat(n,"-handler-down"),Object(i.a)({},"".concat(n,"-handler-down-disabled"),q)),$=s?{onTouchStart:K?y:this.up,onTouchEnd:this.stop}:{onMouseDown:K?y:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},J=s?{onTouchStart:q?y:this.down,onTouchEnd:this.stop}:{onMouseDown:q?y:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return h.a.createElement("div",{className:z,style:g,title:v,onMouseEnter:x,onMouseLeave:w,onMouseOver:E,onMouseOut:S,onFocus:function(){return null},onBlur:function(){return null}},h.a.createElement("div",{className:"".concat(n,"-handler-wrap")},h.a.createElement("span",Object.assign({unselectable:"on"},$,{role:"button","aria-label":"Increase Value","aria-disabled":K,className:X}),c||h.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-up-inner"),onClick:b})),h.a.createElement("span",Object.assign({unselectable:"on"},J,{role:"button","aria-label":"Decrease Value","aria-disabled":q,className:Y}),u||h.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-down-inner"),onClick:b}))),h.a.createElement("div",{className:"".concat(n,"-input-wrap")},h.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":m,"aria-valuemax":p,"aria-valuenow":U,required:C,type:T,placeholder:O,onPaste:j,onClick:k,onMouseUp:this.onMouseUp,className:"".concat(n,"-input"),tabIndex:_,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:V?this.onKeyDown:y,onKeyUp:V?this.onKeyUp:y,autoFocus:M,maxLength:R,readOnly:a,disabled:o,max:p,min:m,step:I,name:N,title:v,id:A,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(W),pattern:D,inputMode:L,onInput:P},G))))}}]),n}(h.a.Component);S.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:x,min:-x,step:1,style:{},onChange:y,onKeyDown:y,onPressEnter:y,onFocus:y,onBlur:y,parser:function(e){return e.replace(/[^\w.-]+/g,"")},required:!1,autoComplete:"off"};var C=S;t.a=C},e7zE:
/*!******************************************!*\
!*** ./node_modules/crypto-js/pbkdf2.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o,a,s,l,c,u,h;e.exports=(h=n(/*! ./core */"Ib8C"),n(/*! ./sha1 */"3y9D"),n(/*! ./hmac */"WYAk"),i=(r=h).lib,o=i.Base,a=i.WordArray,s=r.algo,l=s.SHA1,c=s.HMAC,u=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:l,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=c.create(n.hasher,e),i=a.create(),o=a.create([1]),s=i.words,l=o.words,u=n.keySize,h=n.iterations;s.length<u;){var d=r.update(t).finalize(o);r.reset();for(var f=d.words,p=f.length,m=d,g=1;g<h;g++){m=r.finalize(m),r.reset();for(var v=m.words,y=0;y<p;y++)f[y]^=v[y]}i.concat(d),l[0]++}return i.sigBytes=4*u,i}}),r.PBKDF2=function(e,t,n){return u.create(n).compute(e,t)},h.PBKDF2)},f4xo:
/*!********************************************!*\
!*** ./node_modules/qr.js/lib/8BitByte.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./mode */"nVVt");function i(e){this.mode=r.MODE_8BIT_BYTE,this.data=e}i.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},e.exports=i},fyJ8:
/*!************************************************!*\
!*** ./node_modules/rc-table/es/Cell/index.js ***!
\************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),o=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),a=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),s=n(/*! react */"q1tI"),l=n(/*! classnames */"TSYQ"),c=n.n(l),u=n(/*! rc-util/es/ref */"c+Xe"),h=n(/*! ../utils/valueUtil */"sR1s");var d=s.forwardRef((function(e,t){var n,l,d,f=e.prefixCls,p=e.className,m=e.record,g=e.index,v=e.dataIndex,y=e.render,b=e.children,x=e.component,w=void 0===x?"td":x,E=e.colSpan,S=e.rowSpan,C=e.fixLeft,k=e.fixRight,_=e.firstFixLeft,T=e.lastFixLeft,O=e.firstFixRight,A=e.lastFixRight,L=e.appendNode,D=e.additionalProps,I=void 0===D?{}:D,R=e.ellipsis,M=e.align,N=e.rowType,j=e.isSticky,P="".concat(f,"-cell");if(b)d=b;else{var B=Object(h.b)(m,v);if(d=B,y){var F=y(B,m,g);!function(e){return e&&"object"===Object(a.a)(e)&&!Array.isArray(e)&&!s.isValidElement(e)}(F)?d=F:(d=F.children,l=F.props)}}"object"!==Object(a.a)(d)||Array.isArray(d)||s.isValidElement(d)||(d=null),R&&(T||O)&&(d=s.createElement("span",{className:"".concat(P,"-content")},d));var U=l||{},H=U.colSpan,z=U.rowSpan,G=U.style,V=U.className,W=Object(o.a)(U,["colSpan","rowSpan","style","className"]),K=void 0!==H?H:E,q=void 0!==z?z:S;if(0===K||0===q)return null;var X={},Y="number"==typeof C,$="number"==typeof k;Y&&(X.position="sticky",X.left=C),$&&(X.position="sticky",X.right=k);var J,Z={};M&&(Z.textAlign=M);var Q=!0===R?{showTitle:!0}:R;Q&&(Q.showTitle||"header"===N)&&("string"==typeof d||"number"==typeof d?J=d.toString():s.isValidElement(d)&&"string"==typeof d.props.children&&(J=d.props.children));var ee,te=Object(i.a)(Object(i.a)(Object(i.a)({title:J},W),I),{},{colSpan:K&&1!==K?K:null,rowSpan:q&&1!==q?q:null,className:c()(P,p,(n={},Object(r.a)(n,"".concat(P,"-fix-left"),Y),Object(r.a)(n,"".concat(P,"-fix-left-first"),_),Object(r.a)(n,"".concat(P,"-fix-left-last"),T),Object(r.a)(n,"".concat(P,"-fix-right"),$),Object(r.a)(n,"".concat(P,"-fix-right-first"),O),Object(r.a)(n,"".concat(P,"-fix-right-last"),A),Object(r.a)(n,"".concat(P,"-ellipsis"),R),Object(r.a)(n,"".concat(P,"-with-append"),L),Object(r.a)(n,"".concat(P,"-fix-sticky"),(Y||$)&&j),n),I.className,V),style:Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({},I.style),Z),X),G),ref:(ee=w,"string"==typeof ee||Object(u.c)(ee)?t:null)});return s.createElement(w,Object.assign({},te),L,d)}));d.displayName="Cell";var f=s.memo(d,(function(e,t){return!!t.shouldCellUpdate&&!t.shouldCellUpdate(t.record,e.record)}));t.a=f},gJ3r:
/*!*******************************!*\
!*** ./src/utils/cityData.ts ***!
\*******************************/
/*! exports provided: CityData */
/*! exports used: CityData */function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=[{value:"北京",label:"北京",children:[{value:"东城",label:"东城"},{value:"西城",label:"西城"},{value:"朝阳",label:"朝阳"},{value:"丰台",label:"丰台"},{value:"石景山",label:"石景山"},{value:"海淀",label:"海淀"},{value:"门头沟",label:"门头沟"},{value:"房山",label:"房山"},{value:"通州",label:"通州"},{value:"顺义",label:"顺义"},{value:"昌平",label:"昌平"},{value:"大兴",label:"大兴"},{value:"平谷",label:"平谷"},{value:"怀柔",label:"怀柔"},{value:"密云",label:"密云"},{value:"延庆",label:"延庆"}]},{value:"上海",label:"上海",children:[{value:"崇明",label:"崇明"},{value:"黄浦",label:"黄浦"},{value:"卢湾",label:"卢湾"},{value:"徐汇",label:"徐汇"},{value:"长宁",label:"长宁"},{value:"静安",label:"静安"},{value:"普陀",label:"普陀"},{value:"闸北",label:"闸北"},{value:"虹口",label:"虹口"},{value:"杨浦",label:"杨浦"},{value:"闵行",label:"闵行"},{value:"宝山",label:"宝山"},{value:"嘉定",label:"嘉定"},{value:"浦东",label:"浦东"},{value:"金山",label:"金山"},{value:"松江",label:"松江"},{value:"青浦",label:"青浦"},{value:"南汇",label:"南汇"},{value:"奉贤",label:"奉贤"}]},{value:"广东",label:"广东",children:[{value:"广州",label:"广州"},{value:"深圳",label:"深圳"},{value:"珠海",label:"珠海"},{value:"东莞",label:"东莞"},{value:"中山",label:"中山"},{value:"佛山",label:"佛山"},{value:"惠州",label:"惠州"},{value:"河源",label:"河源"},{value:"潮州",label:"潮州"},{value:"江门",label:"江门"},{value:"揭阳",label:"揭阳"},{value:"茂名",label:"茂名"},{value:"梅州",label:"梅州"},{value:"清远",label:"清远"},{value:"汕头",label:"汕头"},{value:"汕尾",label:"汕尾"},{value:"韶关",label:"韶关"},{value:"顺德",label:"顺德"},{value:"阳江",label:"阳江"},{value:"云浮",label:"云浮"},{value:"湛江",label:"湛江"},{value:"肇庆",label:"肇庆"}]},{value:"江苏",label:"江苏",children:[{value:"南京",label:"南京"},{value:"常熟",label:"常熟"},{value:"常州",label:"常州"},{value:"海门",label:"海门"},{value:"淮安",label:"淮安"},{value:"江都",label:"江都"},{value:"江阴",label:"江阴"},{value:"昆山",label:"昆山"},{value:"连云港",label:"连云港"},{value:"南通",label:"南通"},{value:"启东",label:"启东"},{value:"沭阳",label:"沭阳"},{value:"宿迁",label:"宿迁"},{value:"苏州",label:"苏州"},{value:"太仓",label:"太仓"},{value:"泰州",label:"泰州"},{value:"同里",label:"同里"},{value:"无锡",label:"无锡"},{value:"徐州",label:"徐州"},{value:"盐城",label:"盐城"},{value:"扬州",label:"扬州"},{value:"宜兴",label:"宜兴"},{value:"仪征",label:"仪征"},{value:"张家港",label:"张家港"},{value:"镇江",label:"镇江"}]},{value:"重庆",label:"重庆",children:[{value:"万州",label:"万州"},{value:"涪陵",label:"涪陵"},{value:"渝中",label:"渝中"},{value:"大渡口",label:"大渡口"},{value:"江北",label:"江北"},{value:"沙坪坝",label:"沙坪坝"},{value:"九龙坡",label:"九龙坡"},{value:"南岸",label:"南岸"},{value:"北碚",label:"北碚"},{value:"万盛",label:"万盛"},{value:"双挢",label:"双挢"},{value:"渝北",label:"渝北"},{value:"巴南",label:"巴南"},{value:"黔江",label:"黔江"},{value:"长寿",label:"长寿"},{value:"綦江",label:"綦江"},{value:"潼南",label:"潼南"},{value:"铜梁",label:"铜梁"},{value:"大足",label:"大足"},{value:"荣昌",label:"荣昌"},{value:"壁山",label:"壁山"},{value:"梁平",label:"梁平"},{value:"城口",label:"城口"},{value:"丰都",label:"丰都"},{value:"垫江",label:"垫江"},{value:"武隆",label:"武隆"},{value:"忠县",label:"忠县"},{value:"开县",label:"开县"},{value:"云阳",label:"云阳"},{value:"奉节",label:"奉节"},{value:"巫山",label:"巫山"},{value:"巫溪",label:"巫溪"},{value:"石柱",label:"石柱"},{value:"秀山",label:"秀山"},{value:"酉阳",label:"酉阳"},{value:"彭水",label:"彭水"},{value:"江津",label:"江津"},{value:"合川",label:"合川"},{value:"永川",label:"永川"},{value:"南川",label:"南川"}]},{value:"安徽",label:"安徽",children:[{value:"合肥",label:"合肥"},{value:"安庆",label:"安庆"},{value:"蚌埠",label:"蚌埠"},{value:"亳州",label:"亳州"},{value:"巢湖",label:"巢湖"},{value:"滁州",label:"滁州"},{value:"阜阳",label:"阜阳"},{value:"贵池",label:"贵池"},{value:"淮北",label:"淮北"},{value:"淮化",label:"淮化"},{value:"淮南",label:"淮南"},{value:"黄山",label:"黄山"},{value:"九华山",label:"九华山"},{value:"六安",label:"六安"},{value:"马鞍山",label:"马鞍山"},{value:"宿州",label:"宿州"},{value:"铜陵",label:"铜陵"},{value:"屯溪",label:"屯溪"},{value:"芜湖",label:"芜湖"},{value:"宣城",label:"宣城"}]},{value:"福建",label:"福建",children:[{value:"福州",label:"福州"},{value:"厦门",label:"厦门"},{value:"泉州",label:"泉州"},{value:"漳州",label:"漳州"},{value:"龙岩",label:"龙岩"},{value:"南平",label:"南平"},{value:"宁德",label:"宁德"},{value:"莆田",label:"莆田"},{value:"三明",label:"三明"}]},{value:"甘肃",label:"甘肃",children:[{value:"兰州",label:"兰州"},{value:"嘉峪关",label:"嘉峪关"},{value:"白银",label:"白银"},{value:"定西",label:"定西"},{value:"敦煌",label:"敦煌"},{value:"甘南",label:"甘南"},{value:"金昌",label:"金昌"},{value:"酒泉",label:"酒泉"},{value:"临夏",label:"临夏"},{value:"平凉",label:"平凉"},{value:"天水",label:"天水"},{value:"陇南",label:"陇南"},{value:"武威",label:"武威"},{value:"西峰",label:"西峰"},{value:"张掖",label:"张掖"}]},{value:"广西",label:"广西",children:[{value:"南宁",label:"南宁"},{value:"来宾",label:"来宾"},{value:"百色",label:"百色"},{value:"北海",label:"北海"},{value:"桂林",label:"桂林"},{value:"防城港",label:"防城港"},{value:"贵港",label:"贵港"},{value:"河池",label:"河池"},{value:"贺州",label:"贺州"},{value:"柳州",label:"柳州"},{value:"钦州",label:"钦州"},{value:"梧州",label:"梧州"},{value:"玉林",label:"玉林"}]},{value:"贵州",label:"贵州",children:[{value:"贵阳",label:"贵阳"},{value:"安顺",label:"安顺"},{value:"毕节",label:"毕节"},{value:"都匀",label:"都匀"},{value:"凯里",label:"凯里"},{value:"六盘水",label:"六盘水"},{value:"铜仁",label:"铜仁"},{value:"兴义",label:"兴义"},{value:"玉屏",label:"玉屏"},{value:"遵义",label:"遵义"}]},{value:"海南",label:"海南",children:[{value:"海口",label:"海口"},{value:"儋县",label:"儋县"},{value:"陵水",label:"陵水"},{value:"琼海",label:"琼海"},{value:"三亚",label:"三亚"},{value:"通什",label:"通什"},{value:"万宁",label:"万宁"}]},{value:"河北",label:"河北",children:[{value:"石家庄",label:"石家庄"},{value:"保定",label:"保定"},{value:"北戴河",label:"北戴河"},{value:"沧州",label:"沧州"},{value:"承德",label:"承德"},{value:"丰润",label:"丰润"},{value:"邯郸",label:"邯郸"},{value:"衡水",label:"衡水"},{value:"廊坊",label:"廊坊"},{value:"南戴河",label:"南戴河"},{value:"秦皇岛",label:"秦皇岛"},{value:"唐山",label:"唐山"},{value:"新城",label:"新城"},{value:"邢台",label:"邢台"},{value:"张家口",label:"张家口"}]},{value:"黑龙江",label:"黑龙江",children:[{value:"哈尔滨",label:"哈尔滨"},{value:"北安",label:"北安"},{value:"大庆",label:"大庆"},{value:"大兴安岭",label:"大兴安岭"},{value:"鹤岗",label:"鹤岗"},{value:"黑河",label:"黑河"},{value:"佳木斯",label:"佳木斯"},{value:"鸡西",label:"鸡西"},{value:"牡丹江",label:"牡丹江"},{value:"齐齐哈尔",label:"齐齐哈尔"},{value:"七台河",label:"七台河"},{value:"双鸭山",label:"双鸭山"},{value:"绥化",label:"绥化"},{value:"伊春",label:"伊春"}]},{value:"河南",label:"河南",children:[{value:"郑州",label:"郑州"},{value:"安阳",label:"安阳"},{value:"鹤壁",label:"鹤壁"},{value:"潢川",label:"潢川"},{value:"焦作",label:"焦作"},{value:"济源",label:"济源"},{value:"开封",label:"开封"},{value:"漯河",label:"漯河"},{value:"洛阳",label:"洛阳"},{value:"南阳",label:"南阳"},{value:"平顶山",label:"平顶山"},{value:"濮阳",label:"濮阳"},{value:"三门峡",label:"三门峡"},{value:"商丘",label:"商丘"},{value:"新乡",label:"新乡"},{value:"信阳",label:"信阳"},{value:"许昌",label:"许昌"},{value:"周口",label:"周口"},{value:"驻马店",label:"驻马店"}]},{value:"香港",label:"香港",children:[{value:"香港",label:"香港"},{value:"九龙",label:"九龙"},{value:"新界",label:"新界"}]},{value:"湖北",label:"湖北",children:[{value:"武汉",label:"武汉"},{value:"天门",label:"天门"},{value:"恩施",label:"恩施"},{value:"鄂州",label:"鄂州"},{value:"黄冈",label:"黄冈"},{value:"黄石",label:"黄石"},{value:"荆门",label:"荆门"},{value:"荆州",label:"荆州"},{value:"潜江",label:"潜江"},{value:"十堰",label:"十堰"},{value:"随州",label:"随州"},{value:"武穴",label:"武穴"},{value:"仙桃",label:"仙桃"},{value:"咸宁",label:"咸宁"},{value:"襄阳",label:"襄阳"},{value:"襄樊",label:"襄樊"},{value:"孝感",label:"孝感"},{value:"宜昌",label:"宜昌"}]},{value:"湖南",label:"湖南",children:[{value:"长沙",label:"长沙"},{value:"常德",label:"常德"},{value:"郴州",label:"郴州"},{value:"衡阳",label:"衡阳"},{value:"怀化",label:"怀化"},{value:"吉首",label:"吉首"},{value:"娄底",label:"娄底"},{value:"邵阳",label:"邵阳"},{value:"湘潭",label:"湘潭"},{value:"益阳",label:"益阳"},{value:"岳阳",label:"岳阳"},{value:"永州",label:"永州"},{value:"张家界",label:"张家界"},{value:"株洲",label:"株洲"}]},{value:"江西",label:"江西",children:[{value:"南昌",label:"南昌"},{value:"抚州",label:"抚州"},{value:"赣州",label:"赣州"},{value:"吉安",label:"吉安"},{value:"景德镇",label:"景德镇"},{value:"井冈山",label:"井冈山"},{value:"九江",label:"九江"},{value:"庐山",label:"庐山"},{value:"萍乡",label:"萍乡"},{value:"上饶",label:"上饶"},{value:"新余",label:"新余"},{value:"宜春",label:"宜春"},{value:"鹰潭",label:"鹰潭"}]},{value:"吉林",label:"吉林",children:[{value:"长春",label:"长春"},{value:"吉林",label:"吉林"},{value:"白城",label:"白城"},{value:"白山",label:"白山"},{value:"珲春",label:"珲春"},{value:"辽源",label:"辽源"},{value:"梅河",label:"梅河"},{value:"四平",label:"四平"},{value:"松原",label:"松原"},{value:"通化",label:"通化"},{value:"延吉",label:"延吉"}]},{value:"辽宁",label:"辽宁",children:[{value:"沈阳",label:"沈阳"},{value:"鞍山",label:"鞍山"},{value:"本溪",label:"本溪"},{value:"朝阳",label:"朝阳"},{value:"大连",label:"大连"},{value:"丹东",label:"丹东"},{value:"抚顺",label:"抚顺"},{value:"阜新",label:"阜新"},{value:"葫芦岛",label:"葫芦岛"},{value:"锦州",label:"锦州"},{value:"辽阳",label:"辽阳"},{value:"盘锦",label:"盘锦"},{value:"铁岭",label:"铁岭"},{value:"营口",label:"营口"}]},{value:"澳门",label:"澳门",children:[{value:"澳门",label:"澳门"}]},{value:"内蒙古",label:"内蒙古",children:[{value:"呼和浩特",label:"呼和浩特"},{value:"阿拉善盟",label:"阿拉善盟"},{value:"包头",label:"包头"},{value:"赤峰",label:"赤峰"},{value:"东胜",label:"东胜"},{value:"海拉尔",label:"海拉尔"},{value:"集宁",label:"集宁"},{value:"临河",label:"临河"},{value:"通辽",label:"通辽"},{value:"乌海",label:"乌海"},{value:"乌兰浩特",label:"乌兰浩特"},{value:"锡林浩特",label:"锡林浩特"}]},{value:"宁夏",label:"宁夏",children:[{value:"银川",label:"银川"},{value:"固源",label:"固源"},{value:"石嘴山",label:"石嘴山"},{value:"吴忠",label:"吴忠"}]},{value:"青海",label:"青海",children:[{value:"西宁",label:"西宁"},{value:"德令哈",label:"德令哈"},{value:"格尔木",label:"格尔木"},{value:"共和",label:"共和"},{value:"海东",label:"海东"},{value:"海晏",label:"海晏"},{value:"玛沁",label:"玛沁"},{value:"同仁",label:"同仁"},{value:"玉树",label:"玉树"}]},{value:"山东",label:"山东",children:[{value:"济南",label:"济南"},{value:"滨州",label:"滨州"},{value:"兖州",label:"兖州"},{value:"德州",label:"德州"},{value:"东营",label:"东营"},{value:"菏泽",label:"菏泽"},{value:"济宁",label:"济宁"},{value:"莱芜",label:"莱芜"},{value:"聊城",label:"聊城"},{value:"临沂",label:"临沂"},{value:"蓬莱",label:"蓬莱"},{value:"青岛",label:"青岛"},{value:"曲阜",label:"曲阜"},{value:"日照",label:"日照"},{value:"泰安",label:"泰安"},{value:"潍坊",label:"潍坊"},{value:"威海",label:"威海"},{value:"烟台",label:"烟台"},{value:"枣庄",label:"枣庄"},{value:"淄博",label:"淄博"}]},{value:"山西",label:"山西",children:[{value:"太原",label:"太原"},{value:"吕梁",label:"吕梁"},{value:"长治",label:"长治"},{value:"大同",label:"大同"},{value:"候马",label:"候马"},{value:"晋城",label:"晋城"},{value:"离石",label:"离石"},{value:"临汾",label:"临汾"},{value:"宁武",label:"宁武"},{value:"朔州",label:"朔州"},{value:"忻州",label:"忻州"},{value:"阳泉",label:"阳泉"},{value:"榆次",label:"榆次"},{value:"晋中",label:"晋中"},{value:"运城",label:"运城"}]},{value:"陕西",label:"陕西",children:[{value:"西安",label:"西安"},{value:"安康",label:"安康"},{value:"宝鸡",label:"宝鸡"},{value:"汉中",label:"汉中"},{value:"渭南",label:"渭南"},{value:"商州",label:"商州"},{value:"绥德",label:"绥德"},{value:"铜川",label:"铜川"},{value:"咸阳",label:"咸阳"},{value:"延安",label:"延安"},{value:"榆林",label:"榆林"}]},{value:"四川",label:"四川",children:[{value:"成都",label:"成都"},{value:"巴中",label:"巴中"},{value:"达川",label:"达川"},{value:"德阳",label:"德阳"},{value:"都江堰",label:"都江堰"},{value:"峨眉山",label:"峨眉山"},{value:"涪陵",label:"涪陵"},{value:"广安",label:"广安"},{value:"广元",label:"广元"},{value:"九寨沟",label:"九寨沟"},{value:"康定",label:"康定"},{value:"乐山",label:"乐山"},{value:"泸州",label:"泸州"},{value:"马尔康",label:"马尔康"},{value:"绵阳",label:"绵阳"},{value:"眉山",label:"眉山"},{value:"南充",label:"南充"},{value:"内江",label:"内江"},{value:"攀枝花",label:"攀枝花"},{value:"遂宁",label:"遂宁"},{value:"汶川",label:"汶川"},{value:"西昌",label:"西昌"},{value:"雅安",label:"雅安"},{value:"宜宾",label:"宜宾"},{value:"自贡",label:"自贡"},{value:"资阳",label:"资阳"}]},{value:"台湾",label:"台湾",children:[{value:"台北",label:"台北"},{value:"基隆",label:"基隆"},{value:"台南",label:"台南"},{value:"台中",label:"台中"},{value:"高雄",label:"高雄"},{value:"屏东",label:"屏东"},{value:"南投",label:"南投"},{value:"云林",label:"云林"},{value:"新竹",label:"新竹"},{value:"彰化",label:"彰化"},{value:"苗栗",label:"苗栗"},{value:"嘉义",label:"嘉义"},{value:"桃园",label:"桃园"},{value:"宜兰",label:"宜兰"},{value:"台东",label:"台东"},{value:"金门",label:"金门"},{value:"马祖",label:"马祖"},{value:"澎湖",label:"澎湖"}]},{value:"天津",label:"天津",children:[{value:"天津",label:"天津"},{value:"和平",label:"和平"},{value:"东丽",label:"东丽"},{value:"河东",label:"河东"},{value:"西青",label:"西青"},{value:"河西",label:"河西"},{value:"津南",label:"津南"},{value:"南开",label:"南开"},{value:"北辰",label:"北辰"},{value:"河北",label:"河北"},{value:"武清",label:"武清"},{value:"红挢",label:"红挢"},{value:"塘沽",label:"塘沽"},{value:"汉沽",label:"汉沽"},{value:"大港",label:"大港"},{value:"宁河",label:"宁河"},{value:"静海",label:"静海"},{value:"宝坻",label:"宝坻"},{value:"蓟县",label:"蓟县"}]},{value:"新疆",label:"新疆",children:[{value:"乌鲁木齐",label:"乌鲁木齐"},{value:"阿克苏",label:"阿克苏"},{value:"阿勒泰",label:"阿勒泰"},{value:"阿图什",label:"阿图什"},{value:"博乐",label:"博乐"},{value:"昌吉",label:"昌吉"},{value:"东山",label:"东山"},{value:"哈密",label:"哈密"},{value:"和田",label:"和田"},{value:"喀什",label:"喀什"},{value:"克拉玛依",label:"克拉玛依"},{value:"库车",label:"库车"},{value:"库尔勒",label:"库尔勒"},{value:"奎屯",label:"奎屯"},{value:"石河子",label:"石河子"},{value:"塔城",label:"塔城"},{value:"吐鲁番",label:"吐鲁番"},{value:"伊宁",label:"伊宁"}]},{value:"西藏",label:"西藏",children:[{value:"拉萨",label:"拉萨"},{value:"阿里",label:"阿里"},{value:"昌都",label:"昌都"},{value:"林芝",label:"林芝"},{value:"那曲",label:"那曲"},{value:"日喀则",label:"日喀则"},{value:"山南",label:"山南"}]},{value:"云南",label:"云南",children:[{value:"昆明",label:"昆明"},{value:"大理",label:"大理"},{value:"保山",label:"保山"},{value:"楚雄",label:"楚雄"},{value:"大理",label:"大理"},{value:"东川",label:"东川"},{value:"个旧",label:"个旧"},{value:"景洪",label:"景洪"},{value:"开远",label:"开远"},{value:"临沧",label:"临沧"},{value:"丽江",label:"丽江"},{value:"六库",label:"六库"},{value:"潞西",label:"潞西"},{value:"曲靖",label:"曲靖"},{value:"思茅",label:"思茅"},{value:"文山",label:"文山"},{value:"西双版纳",label:"西双版纳"},{value:"玉溪",label:"玉溪"},{value:"中甸",label:"中甸"},{value:"昭通",label:"昭通"}]},{value:"浙江",label:"浙江",children:[{value:"杭州",label:"杭州"},{value:"温州",label:"温州"},{value:"安吉",label:"安吉"},{value:"慈溪",label:"慈溪"},{value:"定海",label:"定海"},{value:"奉化",label:"奉化"},{value:"海盐",label:"海盐"},{value:"黄岩",label:"黄岩"},{value:"湖州",label:"湖州"},{value:"嘉兴",label:"嘉兴"},{value:"金华",label:"金华"},{value:"临安",label:"临安"},{value:"临海",label:"临海"},{value:"丽水",label:"丽水"},{value:"宁波",label:"宁波"},{value:"瓯海",label:"瓯海"},{value:"平湖",label:"平湖"},{value:"千岛湖",label:"千岛湖"},{value:"衢州",label:"衢州"},{value:"江山",label:"江山"},{value:"瑞安",label:"瑞安"},{value:"绍兴",label:"绍兴"},{value:"嵊州",label:"嵊州"},{value:"台州",label:"台州"},{value:"温岭",label:"温岭"},{value:"余姚",label:"余姚"},{value:"舟山",label:"舟山"}]},{value:"海外",label:"海外",children:[{value:"美国",label:"美国"},{value:"日本",label:"日本"},{value:"英国",label:"英国"},{value:"法国",label:"法国"},{value:"德国",label:"德国"},{value:"其他",label:"其他"}]}]},"gb/T":
/*!********************************************!*\
!*** ./node_modules/crypto-js/mode-ecb.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i;e.exports=(i=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),i.mode.ECB=((r=i.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),r.Decryptor=r.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),r),i.mode.ECB)},h78n:
/*!**********************************************************!*\
!*** ./node_modules/rc-progress/es/index.js + 3 modules ***!
\**********************************************************/
/*! exports provided: Line, Circle, default */
/*! exports used: Circle */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n("q1tI"),i=n.n(r),o=n("TSYQ"),a=n.n(o),s={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},l=function(e){var t=e.map((function(){return Object(r.useRef)()})),n=Object(r.useRef)();return Object(r.useEffect)((function(){var e=Date.now(),r=!1;Object.keys(t).forEach((function(i){var o=t[i].current;if(o){r=!0;var a=o.style;a.transitionDuration=".3s, .3s, .3s, .06s",n.current&&e-n.current<100&&(a.transitionDuration="0s, 0s")}})),r&&(n.current=Date.now())})),[t]};function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var f=function(e){var t=e.className,n=e.percent,r=e.prefixCls,o=e.strokeColor,s=e.strokeLinecap,h=e.strokeWidth,f=e.style,p=e.trailColor,m=e.trailWidth,g=e.transition,v=d(e,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete v.gapPosition;var y=Array.isArray(n)?n:[n],b=Array.isArray(o)?o:[o],x=u(l(y),1)[0],w=h/2,E=100-h/2,S="M ".concat("round"===s?w:0,",").concat(w,"\n L ").concat("round"===s?E:100,",").concat(w),C="0 0 100 ".concat(h),k=0;return i.a.createElement("svg",c({className:a()("".concat(r,"-line"),t),viewBox:C,preserveAspectRatio:"none",style:f},v),i.a.createElement("path",{className:"".concat(r,"-line-trail"),d:S,strokeLinecap:s,stroke:p,strokeWidth:m||h,fillOpacity:"0"}),y.map((function(e,t){var n={strokeDasharray:"".concat(e,"px, 100px"),strokeDashoffset:"-".concat(k,"px"),transition:g||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},o=b[t]||b[b.length-1];return k+=e,i.a.createElement("path",{key:t,className:"".concat(r,"-line-path"),d:S,strokeLinecap:s,stroke:o,strokeWidth:h,fillOpacity:"0",ref:x[t],style:n})})))};f.defaultProps=s;function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var y=0;function b(e){return+e.replace("%","")}function x(e){return Array.isArray(e)?e:[e]}function w(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5?arguments[5]:void 0,a=50-r/2,s=0,l=-a,c=0,u=-2*a;switch(o){case"left":s=-a,l=0,c=2*a,u=0;break;case"right":s=a,l=0,c=-2*a,u=0;break;case"bottom":l=a,u=2*a}var h="M 50,50 m ".concat(s,",").concat(l,"\n a ").concat(a,",").concat(a," 0 1 1 ").concat(c,",").concat(-u,"\n a ").concat(a,",").concat(a," 0 1 1 ").concat(-c,",").concat(u),d=2*Math.PI*a,f={stroke:n,strokeDasharray:"".concat(t/100*(d-i),"px ").concat(d,"px"),strokeDashoffset:"-".concat(i/2+e/100*(d-i),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:h,pathStyle:f}}var E=function(e){var t,n=e.prefixCls,o=e.strokeWidth,s=e.trailWidth,c=e.gapDegree,u=e.gapPosition,h=e.trailColor,d=e.strokeLinecap,f=e.style,g=e.className,E=e.strokeColor,S=e.percent,C=v(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),k=Object(r.useMemo)((function(){return y+=1}),[]),_=w(0,100,h,o,c,u),T=_.pathString,O=_.pathStyle,A=x(S),L=x(E),D=L.find((function(e){return"[object Object]"===Object.prototype.toString.call(e)})),I=m(l(A),1)[0];return i.a.createElement("svg",p({className:a()("".concat(n,"-circle"),g),viewBox:"0 0 100 100",style:f},C),D&&i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"".concat(n,"-gradient-").concat(k),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(D).sort((function(e,t){return b(e)-b(t)})).map((function(e,t){return i.a.createElement("stop",{key:t,offset:e,stopColor:D[e]})})))),i.a.createElement("path",{className:"".concat(n,"-circle-trail"),d:T,stroke:h,strokeLinecap:d,strokeWidth:s||o,fillOpacity:"0",style:O}),(t=0,A.map((function(e,r){var a=L[r]||L[L.length-1],s="[object Object]"===Object.prototype.toString.call(a)?"url(#".concat(n,"-gradient-").concat(k,")"):"",l=w(t,e,a,o,c,u);return t+=e,i.a.createElement("path",{key:r,className:"".concat(n,"-circle-path"),d:l.pathString,stroke:s,strokeLinecap:d,strokeWidth:o,opacity:0===e?0:1,fillOpacity:"0",style:l.pathStyle,ref:I[r]})}))).reverse())};E.defaultProps=s;var S=E},hW8S:
/*!******************************************************!*\
!*** ./node_modules/rc-table/es/utils/legacyUtil.js ***!
\******************************************************/
/*! exports provided: INTERNAL_COL_DEFINE, getExpandableProps, getDataAndAriaProps */
/*! exports used: INTERNAL_COL_DEFINE, getDataAndAriaProps, getExpandableProps */function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),i=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=(n(/*! rc-util/es/warning */"Kwbf"),"RC_TABLE_INTERNAL_COL_DEFINE");function a(e){var t=e.expandable,n=Object(i.a)(e,["expandable"]);return"expandable"in e?Object(r.a)(Object(r.a)({},n),t):n}function s(e){return Object.keys(e).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)||(t[n]=e[n]),t}),{})}},jO9C:
/*!************************************************!*\
!*** ./node_modules/crypto-js/pad-iso97971.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),r.pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)},jwmR:
/*!***************************************************************************************!*\
!*** ./src/pages/Competitions/Detail/components/AppplySchoolModal/index.less?modules ***!
\***************************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flexRow:"flexRow___3nMh-",flexColumn:"flexColumn___Xpn5L",formWrap:"formWrap___3t9mN",example:"example___5c8Eu",footerWrap:"footerWrap___20Wal"}},k3GJ:
/*!*******************************************************!*\
!*** ./node_modules/rc-tabs/es/index.js + 50 modules ***!
\*******************************************************/
/*! exports provided: TabPane, default */
/*! exports used: TabPane, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/mini-store/esm/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-align/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-dropdown/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/canUseDom.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/contains.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Portal.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMergedState.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/raf.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return Wt}));var r=n("rePB"),i=n("ODXe"),o=n("Ff2n"),a=n("VTBJ"),s=n("q1tI"),l=n("TSYQ"),c=n.n(l),u=n("Zm9Q"),h=n("6cGi"),d=n("KQm4"),f=n("xEkU"),p=n.n(f),m=n("t23M");function g(e){var t=Object(s.useRef)(),n=Object(s.useRef)(!1);return Object(s.useEffect)((function(){return function(){n.current=!0,p.a.cancel(t.current)}}),[]),function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n.current||(p.a.cancel(t.current),t.current=p()((function(){e.apply(void 0,i)})))}}var v=n("4IlW");var y=s.forwardRef((function(e,t){var n,i=e.prefixCls,o=e.id,a=e.active,l=e.rtl,u=e.tab,h=u.key,d=u.tab,f=u.disabled,p=u.closeIcon,m=e.tabBarGutter,g=e.tabPosition,y=e.closable,b=e.renderWrapper,x=e.removeAriaLabel,w=e.editable,E=e.onClick,S=e.onRemove,C=e.onFocus,k="".concat(i,"-tab");s.useEffect((function(){return S}),[]);var _={};"top"===g||"bottom"===g?_[l?"marginLeft":"marginRight"]=m:_.marginBottom=m;var T=w&&!1!==y&&!f;function O(e){f||E(e)}var A=s.createElement("div",{key:h,ref:t,className:c()(k,(n={},Object(r.a)(n,"".concat(k,"-with-remove"),T),Object(r.a)(n,"".concat(k,"-active"),a),Object(r.a)(n,"".concat(k,"-disabled"),f),n)),style:_,onClick:O},s.createElement("div",{role:"tab","aria-selected":a,id:o&&"".concat(o,"-tab-").concat(h),className:"".concat(k,"-btn"),"aria-controls":o&&"".concat(o,"-panel-").concat(h),"aria-disabled":f,tabIndex:f?null:0,onClick:function(e){e.stopPropagation(),O(e)},onKeyDown:function(e){[v.a.SPACE,v.a.ENTER].includes(e.which)&&(e.preventDefault(),O(e))},onFocus:C},d),T&&s.createElement("button",{type:"button","aria-label":x||"remove",tabIndex:0,className:"".concat(k,"-remove"),onClick:function(e){var t;e.stopPropagation(),(t=e).preventDefault(),t.stopPropagation(),w.onEdit("remove",{key:h,event:t})}},p||w.removeIcon||"×"));return b&&(A=b(A)),A})),b={width:0,height:0,left:0,top:0};var x={width:0,height:0,left:0,top:0,right:0};var w=n("wx14"),E=n("1OyB"),S=n("vuIU"),C=n("JX7q"),k=n("Ji7U"),_=n("LK+K"),T=n("I8Z2"),O=n("bT9E"),A=n("2GS6"),L=n("Gytx"),D=n.n(L),I=n("U8pU"),R=/iPhone/i,M=/iPod/i,N=/iPad/i,j=/\bAndroid(?:.+)Mobile\b/i,P=/Android/i,B=/\bAndroid(?:.+)SD4930UR\b/i,F=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,U=/Windows Phone/i,H=/\bWindows(?:.+)ARM\b/i,z=/BlackBerry/i,G=/BB10/i,V=/Opera Mini/i,W=/\b(CriOS|Chrome)(?:.+)Mobile/i,K=/Mobile(?:.+)Firefox\b/i;function q(e,t){return e.test(t)}function X(e){var t=e||("undefined"!=typeof navigator?navigator.userAgent:""),n=(t||"").split("[FBAN");if(void 0!==n[1]){var r=n;t=Object(i.a)(r,1)[0]}if(void 0!==(n=t.split("Twitter"))[1]){var o=n;t=Object(i.a)(o,1)[0]}var a={apple:{phone:q(R,t)&&!q(U,t),ipod:q(M,t),tablet:!q(R,t)&&q(N,t)&&!q(U,t),device:(q(R,t)||q(M,t)||q(N,t))&&!q(U,t)},amazon:{phone:q(B,t),tablet:!q(B,t)&&q(F,t),device:q(B,t)||q(F,t)},android:{phone:!q(U,t)&&q(B,t)||!q(U,t)&&q(j,t),tablet:!q(U,t)&&!q(B,t)&&!q(j,t)&&(q(F,t)||q(P,t)),device:!q(U,t)&&(q(B,t)||q(F,t)||q(j,t)||q(P,t))||q(/\bokhttp\b/i,t)},windows:{phone:q(U,t),tablet:q(H,t),device:q(U,t)||q(H,t)},other:{blackberry:q(z,t),blackberry10:q(G,t),opera:q(V,t),firefox:q(K,t),chrome:q(W,t),device:q(z,t)||q(G,t)||q(V,t)||q(K,t)||q(W,t)},any:null,phone:null,tablet:null};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var Y=Object(a.a)(Object(a.a)({},X()),{},{isMobile:X});function $(){}function J(e,t,n){var r=t||"";return e.key||"".concat(r,"item_").concat(n)}function Z(e){return"".concat(e,"-menu-")}function Q(e,t){var n=-1;s.Children.forEach(e,(function(e){n+=1,e&&e.type&&e.type.isMenuItemGroup?s.Children.forEach(e.props.children,(function(e){t(e,n+=1)})):t(e,n)}))}var ee=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],te=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e&&"function"==typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(n){if(t){var r=getComputedStyle(e),i=r.marginLeft,o=r.marginRight;n+=+i.replace("px","")+ +o.replace("px","")}n=+n.toFixed(6)}return n||0},ne=function(e,t,n){e&&"object"===Object(I.a)(e.style)&&(e.style[t]=n)},re=n("bdgK"),ie=n("i8i4"),oe=n.n(ie),ae=n("wgJM"),se=n("l4aY"),le=n("m+aA"),ce=n("c+Xe"),ue=n("zT1h"),he=n("QC+M");function de(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}var fe=n("MNnm");function pe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var me,ge,ve,ye=(me=Object(fe.a)(),ge="undefined"!=typeof window?window:{},ve={animationend:pe("Animation","AnimationEnd"),transitionend:pe("Transition","TransitionEnd")},me&&("AnimationEvent"in ge||delete ve.animationend.animation,"TransitionEvent"in ge||delete ve.transitionend.transition),ve),be={};if(Object(fe.a)()){var xe=document.createElement("div");be=xe.style}var we={};function Ee(e){if(we[e])return we[e];var t=ye[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i<r;i+=1){var o=n[i];if(Object.prototype.hasOwnProperty.call(t,o)&&o in be)return we[e]=t[o],we[e]}return""}var Se=Ee("animationend"),Ce=Ee("transitionend"),ke=!(!Se||!Ce),_e=Se||"animationend",Te=Ce||"transitionend";function Oe(e,t){return e?"object"===Object(I.a)(e)?e[t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}))]:"".concat(e,"-").concat(t):null}function Ae(e){var t=Object(s.useRef)(!1),n=Object(s.useState)(e),r=Object(i.a)(n,2),o=r[0],a=r[1];return Object(s.useEffect)((function(){return function(){t.current=!0}}),[]),[o,function(e){t.current||a(e)}]}var Le=Object(fe.a)()?s.useLayoutEffect:s.useEffect,De=["prepare","start","active","end"];function Ie(e){return"active"===e||"end"===e}var Re=function(e,t){var n=s.useState("none"),r=Object(i.a)(n,2),o=r[0],a=r[1],l=function(){var e=s.useRef(null);function t(){ae.a.cancel(e.current)}return s.useEffect((function(){return function(){t()}}),[]),[function n(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var o=Object(ae.a)((function(){i<=1?r({isCanceled:function(){return o!==e.current}}):n(r,i-1)}));e.current=o},t]}(),c=Object(i.a)(l,2),u=c[0],h=c[1];return Le((function(){if("none"!==o&&"end"!==o){var e=De.indexOf(o),n=De[e+1],r=t(o);!1===r?a(n):u((function(e){function t(){e.isCanceled()||a(n)}!0===r?t():Promise.resolve(r).then(t)}))}}),[e,o]),s.useEffect((function(){return function(){h()}}),[]),[function(){a("prepare")},o]};function Me(e,t,n,o){var l=o.motionEnter,c=void 0===l||l,u=o.motionAppear,h=void 0===u||u,d=o.motionLeave,f=void 0===d||d,p=o.motionDeadline,m=o.motionLeaveImmediately,g=o.onAppearPrepare,v=o.onEnterPrepare,y=o.onLeavePrepare,b=o.onAppearStart,x=o.onEnterStart,w=o.onLeaveStart,E=o.onAppearActive,S=o.onEnterActive,C=o.onLeaveActive,k=o.onAppearEnd,_=o.onEnterEnd,T=o.onLeaveEnd,O=o.onVisibleChanged,A=Ae(),L=Object(i.a)(A,2),D=L[0],I=L[1],R=Ae("none"),M=Object(i.a)(R,2),N=M[0],j=M[1],P=Ae(null),B=Object(i.a)(P,2),F=B[0],U=B[1],H=Object(s.useRef)(!1),z=Object(s.useRef)(null),G=Object(s.useRef)(!1),V=Object(s.useRef)(null);function W(){return n()||V.current}var K=Object(s.useRef)(!1);function q(e){var t,n=W();e&&!e.deadline&&e.target!==n||("appear"===N&&K.current?t=null==k?void 0:k(n,e):"enter"===N&&K.current?t=null==_?void 0:_(n,e):"leave"===N&&K.current&&(t=null==T?void 0:T(n,e)),!1===t||G.current||(j("none"),U(null)))}var X=function(e){var t=Object(s.useRef)(),n=Object(s.useRef)(e);n.current=e;var r=s.useCallback((function(e){n.current(e)}),[]);function i(e){e&&(e.removeEventListener(Te,r),e.removeEventListener(_e,r))}return s.useEffect((function(){return function(){i(t.current)}}),[]),[function(e){t.current&&t.current!==e&&i(t.current),e&&e!==t.current&&(e.addEventListener(Te,r),e.addEventListener(_e,r),t.current=e)},i]}(q),Y=Object(i.a)(X,1)[0],$=s.useMemo((function(){var e,t,n;switch(N){case"appear":return e={},Object(r.a)(e,"prepare",g),Object(r.a)(e,"start",b),Object(r.a)(e,"active",E),e;case"enter":return t={},Object(r.a)(t,"prepare",v),Object(r.a)(t,"start",x),Object(r.a)(t,"active",S),t;case"leave":return n={},Object(r.a)(n,"prepare",y),Object(r.a)(n,"start",w),Object(r.a)(n,"active",C),n;default:return{}}}),[N]),J=Re(N,(function(e){if("prepare"===e){var t=$.prepare;return!!t&&t(W())}var n;ee in $&&U((null===(n=$[ee])||void 0===n?void 0:n.call($,W(),null))||null);return"active"===ee&&(Y(W()),p>0&&(clearTimeout(z.current),z.current=setTimeout((function(){q({deadline:!0})}),p))),!0})),Z=Object(i.a)(J,2),Q=Z[0],ee=Z[1],te=Ie(ee);K.current=te,Le((function(){I(t);var n,r=H.current;(H.current=!0,e)&&(!r&&t&&h&&(n="appear"),r&&t&&c&&(n="enter"),(r&&!t&&f||!r&&m&&!t&&f)&&(n="leave"),n&&(j(n),Q()))}),[t]),Object(s.useEffect)((function(){("appear"===N&&!h||"enter"===N&&!c||"leave"===N&&!f)&&j("none")}),[h,c,f]),Object(s.useEffect)((function(){return function(){clearTimeout(z.current),G.current=!0}}),[]),Object(s.useEffect)((function(){void 0!==D&&"none"===N&&(null==O||O(D))}),[D,N]);var ne=F;return $.prepare&&"start"===ee&&(ne=Object(a.a)({transition:"none"},ne)),[N,ee,ne,null!=D?D:t]}var Ne=function(e){Object(k.a)(n,e);var t=Object(_.a)(n);function n(){return Object(E.a)(this,n),t.apply(this,arguments)}return Object(S.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(s.Component);var je=function(e){var t=e;function n(e){return!(!e.motionName||!t)}"object"===Object(I.a)(e)&&(t=e.transitionSupport);var o=s.forwardRef((function(e,t){var o=e.visible,l=void 0===o||o,u=e.removeOnLeave,h=void 0===u||u,d=e.forceRender,f=e.children,p=e.motionName,m=e.leavedClassName,g=e.eventProps,v=n(e),y=Object(s.useRef)(),b=Object(s.useRef)();var x=Me(v,l,(function(){try{return Object(le.a)(y.current||b.current)}catch(e){return null}}),e),w=Object(i.a)(x,4),E=w[0],S=w[1],C=w[2],k=w[3],_=s.useRef(k);k&&(_.current=!0);var T=Object(s.useRef)(t);T.current=t;var O,A=s.useCallback((function(e){y.current=e,Object(ce.b)(T.current,e)}),[]),L=Object(a.a)(Object(a.a)({},g),{},{visible:l});if(f)if("none"!==E&&n(e)){var D,I;"prepare"===S?I="prepare":Ie(S)?I="active":"start"===S&&(I="start"),O=f(Object(a.a)(Object(a.a)({},L),{},{className:c()(Oe(p,E),(D={},Object(r.a)(D,Oe(p,"".concat(E,"-").concat(I)),I),Object(r.a)(D,p,"string"==typeof p),D)),style:C}),A)}else O=k?f(Object(a.a)({},L),A):!h&&_.current?f(Object(a.a)(Object(a.a)({},L),{},{className:m}),A):d?f(Object(a.a)(Object(a.a)({},L),{},{style:{display:"none"}}),A):null;else O=null;return s.createElement(Ne,{ref:b},O)}));return o.displayName="CSSMotion",o}(ke);function Pe(e){var t;return t=e&&"object"===Object(I.a)(e)&&"key"in e?e:{key:e},Object(a.a)(Object(a.a)({},t),{},{key:String(t.key)})}function Be(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(Pe)}function Fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,i=t.length,o=Be(e),s=Be(t);o.forEach((function(e){for(var t=!1,o=r;o<i;o+=1){var l=s[o];if(l.key===e.key){r<o&&(n=n.concat(s.slice(r,o).map((function(e){return Object(a.a)(Object(a.a)({},e),{},{status:"add"})}))),r=o),n.push(Object(a.a)(Object(a.a)({},l),{},{status:"keep"})),r+=1,t=!0;break}}t||n.push(Object(a.a)(Object(a.a)({},e),{},{status:"remove"}))})),r<i&&(n=n.concat(s.slice(r).map((function(e){return Object(a.a)(Object(a.a)({},e),{},{status:"add"})}))));var l={};n.forEach((function(e){var t=e.key;l[t]=(l[t]||0)+1}));var c=Object.keys(l).filter((function(e){return l[e]>1}));return c.forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||"remove"!==r}))).forEach((function(t){t.key===e&&(t.status="keep")}))})),n}var Ue=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:je,n=function(e){Object(k.a)(r,e);var n=Object(_.a)(r);function r(){var e;return Object(E.a)(this,r),(e=n.apply(this,arguments)).state={keyEntities:[]},e.removeKey=function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:Object(a.a)(Object(a.a)({},e),{},{status:"removed"})}))}}))},e}return Object(S.a)(r,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,r=this.props,i=r.component,a=r.children,l=r.onVisibleChanged,c=Object(o.a)(r,["component","children","onVisibleChanged"]),u=i||s.Fragment,h={};return Ue.forEach((function(e){h[e]=c[e],delete c[e]})),delete c.keys,s.createElement(u,c,n.map((function(n){var r=n.status,i=Object(o.a)(n,["status"]),c="add"===r||"keep"===r;return s.createElement(t,Object(w.a)({},h,{key:i.key,visible:c,eventProps:i,onVisibleChanged:function(t){null==l||l(t,{key:i.key}),t||e.removeKey(i.key)}}),a)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,i=Be(n);return{keyEntities:Fe(r,i).filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||"removed"!==t.status||"remove"!==e.status}))}}}]),r}(s.Component);n.defaultProps={component:"div"}}(ke);var He=je;function ze(e){var t=e.prefixCls,n=e.motion,r=e.animation,i=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:i?{motionName:i}:null)}function Ge(e){var t=e.prefixCls,n=e.visible,r=e.zIndex,i=e.mask,o=e.maskMotion,l=e.maskAnimation,u=e.maskTransitionName;if(!i)return null;var h={};return(o||u||l)&&(h=Object(a.a)({motionAppear:!0},ze({motion:o,prefixCls:t,transitionName:u,animation:l}))),s.createElement(He,Object(w.a)({},h,{visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return s.createElement("div",{style:{zIndex:r},className:c()("".concat(t,"-mask"),n)})}))}var Ve=n("9mu1"),We=n("o0o1"),Ke=n.n(We),qe=n("HaE+"),Xe=["measure","align",null,"motion"],Ye=s.forwardRef((function(e,t){var n=e.visible,r=e.prefixCls,o=e.className,l=e.style,u=e.children,h=e.zIndex,d=e.stretch,f=e.destroyPopupOnHide,p=e.forceRender,m=e.align,g=e.point,v=e.getRootDomNode,y=e.getClassNameFromAlign,b=e.onAlign,x=e.onMouseEnter,E=e.onMouseLeave,S=e.onMouseDown,C=e.onTouchStart,k=Object(s.useRef)(),_=Object(s.useRef)(),T=Object(s.useState)(),O=Object(i.a)(T,2),A=O[0],L=O[1],D=function(e){var t=s.useState({width:0,height:0}),n=Object(i.a)(t,2),r=n[0],o=n[1];return[s.useMemo((function(){var t={};if(e){var n=r.width,i=r.height;-1!==e.indexOf("height")&&i?t.height=i:-1!==e.indexOf("minHeight")&&i&&(t.minHeight=i),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,r]),function(e){o({width:e.offsetWidth,height:e.offsetHeight})}]}(d),I=Object(i.a)(D,2),R=I[0],M=I[1];var N=function(e,t){var n=Object(s.useState)(null),r=Object(i.a)(n,2),o=r[0],a=r[1],l=Object(s.useRef)(),c=Object(s.useRef)(!1);function u(e){c.current||a(e)}function h(){ae.a.cancel(l.current)}return Object(s.useEffect)((function(){u("measure")}),[e]),Object(s.useEffect)((function(){switch(o){case"measure":t()}o&&(l.current=Object(ae.a)(Object(qe.a)(Ke.a.mark((function e(){var t,n;return Ke.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Xe.indexOf(o),(n=Xe[t+1])&&-1!==t&&u(n);case 3:case"end":return e.stop()}}),e)})))))}),[o]),Object(s.useEffect)((function(){return function(){c.current=!0,h()}}),[]),[o,function(e){h(),l.current=Object(ae.a)((function(){u((function(e){switch(o){case"align":return"motion";case"motion":return"stable"}return e})),null==e||e()}))}]}(n,(function(){d&&M(v())})),j=Object(i.a)(N,2),P=j[0],B=j[1],F=Object(s.useRef)();function U(){var e;null===(e=k.current)||void 0===e||e.forceAlign()}function H(e,t){var n=y(t);A!==n&&L(n),"align"===P&&(A!==n?Promise.resolve().then((function(){U()})):B((function(){var e;null===(e=F.current)||void 0===e||e.call(F)})),null==b||b(e,t))}var z=Object(a.a)({},ze(e));function G(){return new Promise((function(e){F.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=z[e];z[e]=function(e,n){return B(),null==t?void 0:t(e,n)}})),s.useEffect((function(){z.motionName||"motion"!==P||B()}),[z.motionName,P]),s.useImperativeHandle(t,(function(){return{forceAlign:U,getElement:function(){return _.current}}}));var V=Object(a.a)(Object(a.a)({},R),{},{zIndex:h,opacity:"motion"!==P&&"stable"!==P&&n?0:void 0,pointerEvents:"stable"===P?void 0:"none"},l),W=!0;!(null==m?void 0:m.points)||"align"!==P&&"stable"!==P||(W=!1);var K=u;return s.Children.count(u)>1&&(K=s.createElement("div",{className:"".concat(r,"-content")},u)),s.createElement(He,Object(w.a)({visible:n,ref:_,leavedClassName:"".concat(r,"-hidden")},z,{onAppearPrepare:G,onEnterPrepare:G,removeOnLeave:f,forceRender:p}),(function(e,t){var n=e.className,i=e.style,l=c()(r,o,A,n);return s.createElement(Ve.a,{target:g||v,key:"popup",ref:k,monitorWindowResize:!0,disabled:W,align:m,onAlign:H},s.createElement("div",{ref:t,className:l,onMouseEnter:x,onMouseLeave:E,onMouseDownCapture:S,onTouchStartCapture:C,style:Object(a.a)(Object(a.a)({},i),V)},K))}))}));Ye.displayName="PopupInner";var $e=Ye,Je=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.visible,i=e.zIndex,o=e.children,l=e.mobile,u=(l=void 0===l?{}:l).popupClassName,h=l.popupStyle,d=l.popupMotion,f=void 0===d?{}:d,p=l.popupRender,m=s.useRef();s.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return m.current}}}));var g=Object(a.a)({zIndex:i},h),v=o;return s.Children.count(o)>1&&(v=s.createElement("div",{className:"".concat(n,"-content")},o)),p&&(v=p(v)),s.createElement(He,Object(w.a)({visible:r,ref:m,removeOnLeave:!0},f),(function(e,t){var r=e.className,i=e.style,o=c()(n,u,r);return s.createElement("div",{ref:t,className:o,style:Object(a.a)(Object(a.a)({},i),g)},v)}))}));Je.displayName="MobilePopupInner";var Ze=Je,Qe=["visible","mobile"],et=s.forwardRef((function(e,t){var n=e.visible,r=e.mobile,l=Object(o.a)(e,Qe),c=Object(s.useState)(n),u=Object(i.a)(c,2),h=u[0],d=u[1],f=Object(s.useState)(!1),p=Object(i.a)(f,2),m=p[0],g=p[1],v=Object(a.a)(Object(a.a)({},l),{},{visible:h});Object(s.useEffect)((function(){d(n),n&&r&&g(function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4)))}())}),[n,r]);var y=m?s.createElement(Ze,Object(w.a)({},v,{mobile:r,ref:t})):s.createElement($e,Object(w.a)({},v,{ref:t}));return s.createElement("div",null,s.createElement(Ge,v),y)}));et.displayName="Popup";var tt=et,nt=s.createContext(null);function rt(){}function it(){return""}function ot(e){return e?e.ownerDocument:window.document}var at=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var st,lt,ct=(st=he.a,(lt=function(e){Object(k.a)(n,e);var t=Object(_.a)(n);function n(e){var r,i;return Object(E.a)(this,n),(r=t.call(this,e)).popupRef=s.createRef(),r.triggerRef=s.createRef(),r.attachId=void 0,r.clickOutsideHandler=void 0,r.touchOutsideHandler=void 0,r.contextMenuOutsideHandler1=void 0,r.contextMenuOutsideHandler2=void 0,r.mouseDownTimeout=void 0,r.focusTime=void 0,r.preClickTime=void 0,r.preTouchTime=void 0,r.delayTimer=void 0,r.hasPopupMouseDown=void 0,r.onMouseEnter=function(e){var t=r.props.mouseEnterDelay;r.fireEvents("onMouseEnter",e),r.delaySetPopupVisible(!0,t,t?null:e)},r.onMouseMove=function(e){r.fireEvents("onMouseMove",e),r.setPoint(e)},r.onMouseLeave=function(e){r.fireEvents("onMouseLeave",e),r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onPopupMouseEnter=function(){r.clearDelayTimer()},r.onPopupMouseLeave=function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&Object(se.a)(null===(t=r.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onFocus=function(e){r.fireEvents("onFocus",e),r.clearDelayTimer(),r.isFocusToShow()&&(r.focusTime=Date.now(),r.delaySetPopupVisible(!0,r.props.focusDelay))},r.onMouseDown=function(e){r.fireEvents("onMouseDown",e),r.preClickTime=Date.now()},r.onTouchStart=function(e){r.fireEvents("onTouchStart",e),r.preTouchTime=Date.now()},r.onBlur=function(e){r.fireEvents("onBlur",e),r.clearDelayTimer(),r.isBlurToHide()&&r.delaySetPopupVisible(!1,r.props.blurDelay)},r.onContextMenu=function(e){e.preventDefault(),r.fireEvents("onContextMenu",e),r.setPopupVisible(!0,e)},r.onContextMenuClose=function(){r.isContextMenuToShow()&&r.close()},r.onClick=function(e){if(r.fireEvents("onClick",e),r.focusTime){var t;if(r.preClickTime&&r.preTouchTime?t=Math.min(r.preClickTime,r.preTouchTime):r.preClickTime?t=r.preClickTime:r.preTouchTime&&(t=r.preTouchTime),Math.abs(t-r.focusTime)<20)return;r.focusTime=0}r.preClickTime=0,r.preTouchTime=0,r.isClickToShow()&&(r.isClickToHide()||r.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!r.state.popupVisible;(r.isClickToHide()&&!n||n&&r.isClickToShow())&&r.setPopupVisible(!r.state.popupVisible,e)},r.onPopupMouseDown=function(){var e;r.hasPopupMouseDown=!0,clearTimeout(r.mouseDownTimeout),r.mouseDownTimeout=window.setTimeout((function(){r.hasPopupMouseDown=!1}),0),r.context&&(e=r.context).onPopupMouseDown.apply(e,arguments)},r.onDocumentClick=function(e){if(!r.props.mask||r.props.maskClosable){var t=e.target,n=r.getRootDomNode(),i=r.getPopupDomNode();Object(se.a)(n,t)&&!r.isContextMenuOnly()||Object(se.a)(i,t)||r.hasPopupMouseDown||r.close()}},r.getRootDomNode=function(){var e=r.props.getTriggerDOMNode;if(e)return e(r.triggerRef.current);try{var t=Object(le.a)(r.triggerRef.current);if(t)return t}catch(e){}return oe.a.findDOMNode(Object(C.a)(r))},r.getPopupClassNameFromAlign=function(e){var t=[],n=r.props,i=n.popupPlacement,o=n.builtinPlacements,a=n.prefixCls,s=n.alignPoint,l=n.getPopupClassNameFromAlign;return i&&o&&t.push(function(e,t,n,r){for(var i=n.points,o=Object.keys(e),a=0;a<o.length;a+=1){var s=o[a];if(de(e[s].points,i,r))return"".concat(t,"-placement-").concat(s)}return""}(o,a,e,s)),l&&t.push(l(e)),t.join(" ")},r.getComponent=function(){var e=r.props,t=e.prefixCls,n=e.destroyPopupOnHide,i=e.popupClassName,o=e.onPopupAlign,a=e.popupMotion,l=e.popupAnimation,c=e.popupTransitionName,u=e.popupStyle,h=e.mask,d=e.maskAnimation,f=e.maskTransitionName,p=e.maskMotion,m=e.zIndex,g=e.popup,v=e.stretch,y=e.alignPoint,b=e.mobile,x=e.forceRender,E=r.state,S=E.popupVisible,C=E.point,k=r.getPopupAlign(),_={};return r.isMouseEnterToShow()&&(_.onMouseEnter=r.onPopupMouseEnter),r.isMouseLeaveToHide()&&(_.onMouseLeave=r.onPopupMouseLeave),_.onMouseDown=r.onPopupMouseDown,_.onTouchStart=r.onPopupMouseDown,s.createElement(tt,Object(w.a)({prefixCls:t,destroyPopupOnHide:n,visible:S,point:y&&C,className:i,align:k,onAlign:o,animation:l,getClassNameFromAlign:r.getPopupClassNameFromAlign},_,{stretch:v,getRootDomNode:r.getRootDomNode,style:u,mask:h,zIndex:m,transitionName:c,maskAnimation:d,maskTransitionName:f,maskMotion:p,ref:r.popupRef,motion:a,mobile:b,forceRender:x}),"function"==typeof g?g():g)},r.attachParent=function(e){ae.a.cancel(r.attachId);var t,n=r.props,i=n.getPopupContainer,o=n.getDocument,a=r.getRootDomNode();i?(a||0===i.length)&&(t=i(a)):t=o(r.getRootDomNode()).body,t?t.appendChild(e):r.attachId=Object(ae.a)((function(){r.attachParent(e)}))},r.getContainer=function(){var e=(0,r.props.getDocument)(r.getRootDomNode()).createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",r.attachParent(e),e},r.setPoint=function(e){r.props.alignPoint&&e&&r.setState({point:{pageX:e.pageX,pageY:e.pageY}})},r.handlePortalUpdate=function(){r.state.prevPopupVisible!==r.state.popupVisible&&r.props.afterPopupVisibleChange(r.state.popupVisible)},r.triggerContextValue={onPopupMouseDown:r.onPopupMouseDown},i="popupVisible"in e?!!e.popupVisible:!!e.defaultPopupVisible,r.state={prevPopupVisible:i,popupVisible:i},at.forEach((function(e){r["fire".concat(e)]=function(t){r.fireEvents(e,t)}})),r}return Object(S.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e,t=this.props;if(this.state.popupVisible)return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(e=t.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(ue.a)(e,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(e=e||t.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(ue.a)(e,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(e=e||t.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(ue.a)(e,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(ue.a)(window,"blur",this.onContextMenuClose)));this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),ae.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var e;return(null===(e=this.popupRef.current)||void 0===e?void 0:e.getElement())||null}},{key:"getPopupAlign",value:function(){var e=this.props,t=e.popupPlacement,n=e.popupAlign,r=e.builtinPlacements;return t&&r?function(e,t,n){var r=e[t]||{};return Object(a.a)(Object(a.a)({},r),n)}(r,t,n):n}},{key:"setPopupVisible",value:function(e,t){var n=this.props.alignPoint,r=this.state.popupVisible;this.clearDelayTimer(),r!==e&&("popupVisible"in this.props||this.setState({popupVisible:e,prevPopupVisible:r}),this.props.onPopupVisibleChange(e)),n&&t&&e&&this.setPoint(t)}},{key:"delaySetPopupVisible",value:function(e,t,n){var r=this,i=1e3*t;if(this.clearDelayTimer(),i){var o=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=window.setTimeout((function(){r.setPopupVisible(e,o),r.clearDelayTimer()}),i)}else this.setPopupVisible(e,n)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(e){var t=this.props.children.props,n=this.props;return t[e]&&n[e]?this["fire".concat(e)]:t[e]||n[e]}},{key:"isClickToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isContextMenuOnly",value:function(){var e=this.props.action;return"contextMenu"===e||1===e.length&&"contextMenu"===e[0]}},{key:"isContextMenuToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")}},{key:"isClickToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isMouseEnterToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseEnter")}},{key:"isMouseLeaveToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseLeave")}},{key:"isFocusToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("focus")}},{key:"isBlurToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("blur")}},{key:"forcePopupAlign",value:function(){var e;this.state.popupVisible&&(null===(e=this.popupRef.current)||void 0===e||e.forceAlign())}},{key:"fireEvents",value:function(e,t){var n=this.props.children.props[e];n&&n(t);var r=this.props[e];r&&r(t)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var e=this.state.popupVisible,t=this.props,n=t.children,r=t.forceRender,i=t.alignPoint,o=t.className,l=t.autoDestroy,u=s.Children.only(n),h={key:"trigger"};this.isContextMenuToShow()?h.onContextMenu=this.onContextMenu:h.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(h.onClick=this.onClick,h.onMouseDown=this.onMouseDown,h.onTouchStart=this.onTouchStart):(h.onClick=this.createTwoChains("onClick"),h.onMouseDown=this.createTwoChains("onMouseDown"),h.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(h.onMouseEnter=this.onMouseEnter,i&&(h.onMouseMove=this.onMouseMove)):h.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?h.onMouseLeave=this.onMouseLeave:h.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(h.onFocus=this.onFocus,h.onBlur=this.onBlur):(h.onFocus=this.createTwoChains("onFocus"),h.onBlur=this.createTwoChains("onBlur"));var d=c()(u&&u.props&&u.props.className,o);d&&(h.className=d);var f=Object(a.a)({},h);Object(ce.c)(u)&&(f.ref=Object(ce.a)(this.triggerRef,u.ref));var p,m=s.cloneElement(u,f);return(e||this.popupRef.current||r)&&(p=s.createElement(st,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!e&&l&&(p=null),s.createElement(nt.Provider,{value:this.triggerContextValue},m,p)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.popupVisible,r={};return void 0!==n&&t.popupVisible!==n&&(r.popupVisible=n,r.prevPopupVisible=t.popupVisible),r}}]),n}(s.Component)).contextType=nt,lt.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:it,getDocument:ot,onPopupVisibleChange:rt,afterPopupVisibleChange:rt,onPopupAlign:rt,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},lt),ut={adjustX:1,adjustY:1},ht={topLeft:{points:["bl","tl"],overflow:ut,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ut,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:ut,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:ut,offset:[4,0]}},dt={topLeft:{points:["bl","tl"],overflow:ut,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ut,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:ut,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:ut,offset:[4,0]}},ft=0,pt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},mt=function(e,t,n){var i=Z(t),o=e.getState();e.setState({defaultActiveFirst:Object(a.a)(Object(a.a)({},o.defaultActiveFirst),{},Object(r.a)({},i,n))})},gt=function(e){Object(k.a)(n,e);var t=Object(_.a)(n);function n(e){var r;Object(E.a)(this,n),(r=t.call(this,e)).onDestroy=function(e){r.props.onDestroy(e)},r.onKeyDown=function(e){var t=e.keyCode,n=r.menuInstance,i=r.props.store,o=r.getVisible();if(t===v.a.ENTER)return r.onTitleClick(e),mt(i,r.props.eventKey,!0),!0;if(t===v.a.RIGHT)return o?n.onKeyDown(e):(r.triggerOpenChange(!0),mt(i,r.props.eventKey,!0)),!0;if(t===v.a.LEFT){var a;if(!o)return;return(a=n.onKeyDown(e))||(r.triggerOpenChange(!1),a=!0),a}return!o||t!==v.a.UP&&t!==v.a.DOWN?void 0:n.onKeyDown(e)},r.onOpenChange=function(e){r.props.onOpenChange(e)},r.onPopupVisibleChange=function(e){r.triggerOpenChange(e,e?"mouseenter":"mouseleave")},r.onMouseEnter=function(e){var t=r.props,n=t.eventKey,i=t.onMouseEnter,o=t.store;mt(o,r.props.eventKey,!1),i({key:n,domEvent:e})},r.onMouseLeave=function(e){var t=r.props,n=t.parentMenu,i=t.eventKey,o=t.onMouseLeave;n.subMenuInstance=Object(C.a)(r),o({key:i,domEvent:e})},r.onTitleMouseEnter=function(e){var t=r.props,n=t.eventKey,i=t.onItemHover,o=t.onTitleMouseEnter;i({key:n,hover:!0}),o({key:n,domEvent:e})},r.onTitleMouseLeave=function(e){var t=r.props,n=t.parentMenu,i=t.eventKey,o=t.onItemHover,a=t.onTitleMouseLeave;n.subMenuInstance=Object(C.a)(r),o({key:i,hover:!1}),a({key:i,domEvent:e})},r.onTitleClick=function(e){var t=Object(C.a)(r).props;t.onTitleClick({key:t.eventKey,domEvent:e}),"hover"!==t.triggerSubMenuAction&&(r.triggerOpenChange(!r.getVisible(),"click"),mt(t.store,r.props.eventKey,!1))},r.onSubMenuClick=function(e){"function"==typeof r.props.onClick&&r.props.onClick(r.addKeyPath(e))},r.onSelect=function(e){r.props.onSelect(e)},r.onDeselect=function(e){r.props.onDeselect(e)},r.getPrefixCls=function(){return"".concat(r.props.rootPrefixCls,"-submenu")},r.getActiveClassName=function(){return"".concat(r.getPrefixCls(),"-active")},r.getDisabledClassName=function(){return"".concat(r.getPrefixCls(),"-disabled")},r.getSelectedClassName=function(){return"".concat(r.getPrefixCls(),"-selected")},r.getOpenClassName=function(){return"".concat(r.props.rootPrefixCls,"-submenu-open")},r.getVisible=function(){return r.state.isOpen},r.getMode=function(){return r.state.mode},r.saveMenuInstance=function(e){r.menuInstance=e},r.addKeyPath=function(e){return Object(a.a)(Object(a.a)({},e),{},{keyPath:(e.keyPath||[]).concat(r.props.eventKey)})},r.triggerOpenChange=function(e,t){var n=r.props.eventKey,i=function(){r.onOpenChange({key:n,item:Object(C.a)(r),trigger:t,open:e})};"mouseenter"===t?r.mouseenterTimeout=setTimeout((function(){i()}),0):i()},r.isChildrenSelected=function(){var e={find:!1};return function e(t,n,r){t&&!r.find&&s.Children.forEach(t,(function(t){if(t){var i=t.type;if(!i||!(i.isSubMenu||i.isMenuItem||i.isMenuItemGroup))return;-1!==n.indexOf(t.key)?r.find=!0:t.props.children&&e(t.props.children,n,r)}}))}(r.props.children,r.props.selectedKeys,e),e.find},r.isInlineMode=function(){return"inline"===r.getMode()},r.adjustWidth=function(){if(r.subMenuTitle&&r.menuInstance){var e=ie.findDOMNode(r.menuInstance);e.offsetWidth>=r.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(r.subMenuTitle.offsetWidth,"px"))}},r.saveSubMenuTitle=function(e){r.subMenuTitle=e},r.getBaseProps=function(){var e=Object(C.a)(r).props,t=r.getMode();return{mode:"horizontal"===t?"vertical":t,visible:r.getVisible(),level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:r.onSubMenuClick,onSelect:r.onSelect,onDeselect:r.onDeselect,onDestroy:r.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:r.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(C.a)(r),subMenuCloseDelay:e.subMenuCloseDelay,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,builtinPlacements:e.builtinPlacements,defaultActiveFirst:e.store.getState().defaultActiveFirst[Z(e.eventKey)],multiple:e.multiple,prefixCls:e.rootPrefixCls,id:r.internalMenuId,manualRef:r.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},r.getMotion=function(e,t){var n=Object(C.a)(r).haveRendered,i=r.props,o=i.motion,s=i.rootPrefixCls;return Object(a.a)(Object(a.a)({},o),{},{leavedClassName:"".concat(s,"-hidden"),removeOnLeave:!1,motionAppear:n||!t||"inline"!==e})};var i=e.store,o=e.eventKey,l=i.getState().defaultActiveFirst;r.isRootMenu=!1;var c=!1;return l&&(c=l[o]),mt(i,o,c),r.state={mode:e.mode,isOpen:e.isOpen},r}return Object(S.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,i=t.manualRef,o=t.isOpen,a=function(){e.setState({mode:n,isOpen:o})},s=o!==this.state.isOpen,l=n!==this.state.mode;(l||s)&&(ae.a.cancel(this.updateStateRaf),l?this.updateStateRaf=Object(ae.a)(a):a()),i&&i(this),"horizontal"===n&&(null==r?void 0:r.isRootMenu)&&o&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),ae.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(e,t){var n=this.getBaseProps();return s.createElement(_t,Object(w.a)({},n,{id:this.internalMenuId,className:e,style:t}),this.props.children)}},{key:"renderChildren",value:function(){var e=this,t=this.getBaseProps(),n=t.mode,i=t.visible,o=t.forceSubMenuRender,a=t.direction,l=this.getMotion(n,i);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||i||o,!this.haveOpened)return s.createElement("div",null);var u=c()("".concat(t.prefixCls,"-sub"),Object(r.a)({},"".concat(t.prefixCls,"-rtl"),"rtl"===a));return this.isInlineMode()?s.createElement(He,Object(w.a)({visible:t.visible,forceRender:o},l),(function(t){var n=t.className,r=t.style,i=c()(u,n);return e.renderPopupMenu(i,r)})):this.renderPopupMenu(u)}},{key:"render",value:function(){var e,t,n,i=Object(a.a)({},this.props),o=this.getVisible(),l=this.getPrefixCls(),u=this.isInlineMode(),h=this.getMode(),d=c()(l,"".concat(l,"-").concat(h),(e={},Object(r.a)(e,i.className,!!i.className),Object(r.a)(e,this.getOpenClassName(),o),Object(r.a)(e,this.getActiveClassName(),i.active||o&&!u),Object(r.a)(e,this.getDisabledClassName(),i.disabled),Object(r.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(i.eventKey?this.internalMenuId="".concat(i.eventKey,"$Menu"):(ft+=1,this.internalMenuId="$__$".concat(ft,"$Menu")));var f={},p={},m={};i.disabled||(f={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},p={onClick:this.onTitleClick},m={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var g={},v="rtl"===i.direction;u&&(v?g.paddingRight=i.inlineIndent*i.level:g.paddingLeft=i.inlineIndent*i.level);var y={};this.getVisible()&&(y={"aria-owns":this.internalMenuId});var b=null;"horizontal"!==h&&(b=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(b=s.createElement(this.props.expandIcon,Object(a.a)({},this.props))));var x=s.createElement("div",Object(w.a)({ref:this.saveSubMenuTitle,style:g,className:"".concat(l,"-title"),role:"button"},m,p,{"aria-expanded":o},y,{"aria-haspopup":"true",title:"string"==typeof i.title?i.title:void 0}),i.title,b||s.createElement("i",{className:"".concat(l,"-arrow")})),E=this.renderChildren(),S=(null===(t=i.parentMenu)||void 0===t?void 0:t.isRootMenu)?i.parentMenu.props.getPopupContainer:function(e){return e.parentNode},C=pt[h],k=i.popupOffset?{offset:i.popupOffset}:{},_=c()((n={},Object(r.a)(n,i.popupClassName,i.popupClassName&&!u),Object(r.a)(n,"".concat(l,"-rtl"),v),n)),T=i.disabled,O=i.triggerSubMenuAction,A=i.subMenuOpenDelay,L=i.forceSubMenuRender,D=i.subMenuCloseDelay,I=i.builtinPlacements;ee.forEach((function(e){return delete i[e]})),delete i.onClick;var R=v?Object(a.a)(Object(a.a)({},dt),I):Object(a.a)(Object(a.a)({},ht),I);delete i.direction;var M=this.getBaseProps(),N=u?null:this.getMotion(M.mode,M.visible);return s.createElement("li",Object(w.a)({},i,f,{className:d,role:"menuitem"}),s.createElement(ct,{prefixCls:l,popupClassName:c()("".concat(l,"-popup"),_),getPopupContainer:S,builtinPlacements:R,popupPlacement:C,popupVisible:!u&&o,popupAlign:k,popup:u?null:E,action:T||u?[]:[O],mouseEnterDelay:A,mouseLeaveDelay:D,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:L,popupMotion:N},x),u?E:null)}}]),n}(s.Component);gt.defaultProps={onMouseEnter:$,onMouseLeave:$,onTitleMouseEnter:$,onTitleMouseLeave:$,onTitleClick:$,manualRef:$,mode:"vertical",title:""};var vt=Object(T.b)((function(e,t){var n=e.openKeys,r=e.activeKey,i=e.selectedKeys,o=t.eventKey,a=t.subMenuKey;return{isOpen:n.indexOf(o)>-1,active:r[a]===o,selectedKeys:i}}))(gt);vt.isSubMenu=!0;var yt=vt,bt=function(e){Object(k.a)(n,e);var t=Object(_.a)(n);function n(){var e;return Object(E.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.mutationObserver=null,e.originalTotalWidth=0,e.overflowedItems=[],e.menuItemSizes=[],e.cancelFrameId=null,e.state={lastVisibleIndex:void 0},e.childRef=s.createRef(),e.getMenuItemNodes=function(){var t=e.props.prefixCls,n=e.childRef.current;return n?[].slice.call(n.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,n,r){var i=e.props,l=i.overflowedIndicator,c=i.level,u=i.mode,h=i.prefixCls,d=i.theme;if(1!==c||"horizontal"!==u)return null;var f=e.props.children[0].props,p=(f.children,f.title,f.style),m=Object(o.a)(f,["children","title","style"]),g=Object(a.a)({},p),v="".concat(t,"-overflowed-indicator"),y="".concat(t,"-overflowed-indicator");0===n.length&&!0!==r?g=Object(a.a)(Object(a.a)({},g),{},{display:"none"}):r&&(g=Object(a.a)(Object(a.a)({},g),{},{visibility:"hidden",position:"absolute"}),v="".concat(v,"-placeholder"),y="".concat(y,"-placeholder"));var b=d?"".concat(h,"-").concat(d):"",x={};return ee.forEach((function(e){void 0!==m[e]&&(x[e]=m[e])})),s.createElement(yt,Object(w.a)({title:l,className:"".concat(h,"-overflowed-submenu"),popupClassName:b},x,{key:v,eventKey:y,disabled:!1,style:g}),n)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=t.children;if(n&&0!==n.length){var r=t.children[n.length-1];ne(r,"display","inline-block");var i=e.getMenuItemNodes(),o=i.filter((function(e){return e.className.split(" ").indexOf("menuitem-overflowed")>=0}));o.forEach((function(e){ne(e,"display","inline-block")})),e.menuItemSizes=i.map((function(e){return te(e,!0)})),o.forEach((function(e){ne(e,"display","none")})),e.overflowedIndicatorWidth=te(t.children[t.children.length-1],!0),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),ne(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=te(t);e.overflowedItems=[];var r,i=0;e.originalTotalWidth>n+.5&&(r=-1,e.menuItemSizes.forEach((function(t){(i+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}return Object(S.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=this.childRef.current;if(!t)return;this.resizeObserver=new re.default((function(t){t.forEach((function(){var t=e.cancelFrameId;cancelAnimationFrame(t),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)}))})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(r,i,o){var a=i;if("horizontal"===t.props.mode){var l=t.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(o>n&&(a=s.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),o===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return s.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),l=t.getOverflowedSubMenuItem(i.props.eventKey,t.overflowedItems)));var c=[].concat(Object(d.a)(r),[l,a]);return o===e.length-1&&c.push(t.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),c}return[].concat(Object(d.a)(r),[a])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,r=(e.theme,Object(o.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),i=t;return s.createElement(i,Object(w.a)({ref:this.childRef},r),this.renderChildren(n))}}]),n}(s.Component);bt.defaultProps={tag:"div",className:""};var xt=bt;function wt(e,t,n){var i=e.getState();e.setState({activeKey:Object(a.a)(Object(a.a)({},i.activeKey),{},Object(r.a)({},t,n))})}function Et(e){return e.eventKey||"0-menu-"}function St(e,t){var n,r=t,i=e.children,o=e.eventKey;if(r&&(Q(i,(function(e,t){e&&e.props&&!e.props.disabled&&r===J(e,o,t)&&(n=!0)})),n))return r;return r=null,e.defaultActiveFirst?(Q(i,(function(e,t){r||!e||e.props.disabled||(r=J(e,o,t))})),r):r}function Ct(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var kt=function(e){Object(k.a)(n,e);var t=Object(_.a)(n);function n(e){var i;return Object(E.a)(this,n),(i=t.call(this,e)).onKeyDown=function(e,t){var n,r=e.keyCode;if(i.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(n=t.onKeyDown(e))})),n)return 1;var o=null;return r!==v.a.UP&&r!==v.a.DOWN||(o=i.step(r===v.a.UP?-1:1)),o?(e.preventDefault(),wt(i.props.store,Et(i.props),o.props.eventKey),"function"==typeof t&&t(o),1):void 0},i.onItemHover=function(e){var t=e.key,n=e.hover;wt(i.props.store,Et(i.props),n?t:null)},i.onDeselect=function(e){i.props.onDeselect(e)},i.onSelect=function(e){i.props.onSelect(e)},i.onClick=function(e){i.props.onClick(e)},i.onOpenChange=function(e){i.props.onOpenChange(e)},i.onDestroy=function(e){i.props.onDestroy(e)},i.getFlatInstanceArray=function(){return i.instanceArray},i.step=function(e){var t=i.getFlatInstanceArray(),n=i.props.store.getState().activeKey[Et(i.props)],r=t.length;if(!r)return null;e<0&&(t=t.concat().reverse());var o=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==n||(o=t,!1)})),i.props.defaultActiveFirst||-1===o||(a=t.slice(o,r-1)).length&&!a.every((function(e){return!!e.props.disabled}))){var a,s=(o+1)%r,l=s;do{var c=t[l];if(c&&!c.props.disabled)return c;l=(l+1)%r}while(l!==s);return null}},i.renderCommonMenuItem=function(e,t,n){var r=i.props.store.getState(),o=Object(C.a)(i).props,l=J(e,o.eventKey,t),c=e.props;if(!c||"string"==typeof e.type)return e;var u=l===r.activeKey,h=Object(a.a)(Object(a.a)({mode:c.mode||o.mode,level:o.level,inlineIndent:o.inlineIndent,renderMenuItem:i.renderMenuItem,rootPrefixCls:o.prefixCls,index:t,parentMenu:o.parentMenu,manualRef:c.disabled?void 0:Object(A.a)(e.ref,Ct.bind(Object(C.a)(i))),eventKey:l,active:!c.disabled&&u,multiple:o.multiple,onClick:function(e){(c.onClick||$)(e),i.onClick(e)},onItemHover:i.onItemHover,motion:o.motion,subMenuOpenDelay:o.subMenuOpenDelay,subMenuCloseDelay:o.subMenuCloseDelay,forceSubMenuRender:o.forceSubMenuRender,onOpenChange:i.onOpenChange,onDeselect:i.onDeselect,onSelect:i.onSelect,builtinPlacements:o.builtinPlacements,itemIcon:c.itemIcon||i.props.itemIcon,expandIcon:c.expandIcon||i.props.expandIcon},n),{},{direction:o.direction});return("inline"===o.mode||Y.any)&&(h.triggerSubMenuAction="click"),s.cloneElement(e,Object(a.a)(Object(a.a)({},h),{},{key:l||t}))},i.renderMenuItem=function(e,t,n){if(!e)return null;var r=i.props.store.getState(),o={openKeys:r.openKeys,selectedKeys:r.selectedKeys,triggerSubMenuAction:i.props.triggerSubMenuAction,subMenuKey:n};return i.renderCommonMenuItem(e,t,o)},e.store.setState({activeKey:Object(a.a)(Object(a.a)({},e.store.getState().activeKey),{},Object(r.a)({},e.eventKey,St(e,e.activeKey)))}),i.instanceArray=[],i}return Object(S.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!D()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[Et(t)],r=St(t,n);if(r!==n)wt(t.store,Et(t),r);else if("activeKey"in e){r!==St(e,e.activeKey)&&wt(t.store,Et(t),r)}}},{key:"render",value:function(){var e=this,t=Object(w.a)({},this.props);this.instanceArray=[];var n={className:c()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=t.prefixCls,i=t.eventKey,o=t.visible,a=t.level,l=t.mode,h=t.overflowedIndicator,d=t.theme;return ee.forEach((function(e){return delete t[e]})),delete t.onClick,s.createElement(xt,Object(w.a)({},t,{prefixCls:r,mode:l,tag:"ul",level:a,theme:d,visible:o,overflowedIndicator:h},n),Object(u.a)(t.children).map((function(t,n){return e.renderMenuItem(t,n,i||"0-menu-")})))}}]),n}(s.Component);kt.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:$};var _t=Object(T.b)()(kt),Tt=n("Kwbf");function Ot(e,t,n){var r=e.prefixCls,i=e.motion,o=e.defaultMotions,a=void 0===o?{}:o,s=e.openAnimation,l=e.openTransitionName,c=t.switchingModeFromInline;if(i)return i;if("object"===Object(I.a)(s)&&s)Object(Tt.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof s)return{motionName:"".concat(r,"-open-").concat(s)};if(l)return{motionName:l};var u=a[n];return u||(c?null:a.other)}var At=function(e){Object(k.a)(n,e);var t=Object(_.a)(n);function n(e){var r;Object(E.a)(this,n),(r=t.call(this,e)).onSelect=function(e){var t=Object(C.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys,i=e.key;n=t.multiple?n.concat([i]):[i],"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onSelect(Object(a.a)(Object(a.a)({},e),{},{selectedKeys:n}))}},r.onClick=function(e){var t=r.getRealMenuMode(),n=Object(C.a)(r),i=n.store,o=n.props.onOpenChange;"inline"===t||"openKeys"in r.props||(i.setState({openKeys:[]}),o([])),r.props.onClick(e)},r.onKeyDown=function(e,t){r.innerMenu.getWrappedInstance().onKeyDown(e,t)},r.onOpenChange=function(e){var t=Object(C.a)(r).props,n=r.store.getState().openKeys.concat(),i=!1,o=function(e){var t=!1;if(e.open)(t=-1===n.indexOf(e.key))&&n.push(e.key);else{var r=n.indexOf(e.key);(t=-1!==r)&&n.splice(r,1)}i=i||t};Array.isArray(e)?e.forEach(o):o(e),i&&("openKeys"in r.props||r.store.setState({openKeys:n}),t.onOpenChange(n))},r.onDeselect=function(e){var t=Object(C.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys.concat(),i=e.key,o=n.indexOf(i);-1!==o&&n.splice(o,1),"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onDeselect(Object(a.a)(Object(a.a)({},e),{},{selectedKeys:n}))}},r.onMouseEnter=function(e){r.restoreModeVerticalFromInline();var t=r.props.onMouseEnter;t&&t(e)},r.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,n=e.target.className,i="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,o="font-size"===e.propertyName&&i.indexOf("anticon")>=0;(t||o)&&r.restoreModeVerticalFromInline()},r.setInnerMenu=function(e){r.innerMenu=e},r.isRootMenu=!0;var i=e.defaultSelectedKeys,o=e.defaultOpenKeys;return"selectedKeys"in e&&(i=e.selectedKeys||[]),"openKeys"in e&&(o=e.openKeys||[]),r.store=Object(T.c)({selectedKeys:i,openKeys:o,activeKey:{"0-menu-":St(e,e.activeKey)}}),r.state={switchingModeFromInline:!1,prevProps:e,inlineOpenKeys:[],store:r.store},r}return Object(S.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.siderCollapsed,r=t.inlineCollapsed,i=t.onOpenChange;(!e.inlineCollapsed&&r||!e.siderCollapsed&&n)&&i([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return t&&n?"inline":n?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,n=e.siderCollapsed;return void 0!==n?n:t}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var e=Object(a.a)({},Object(O.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),t=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),"rtl"===e.direction&&(e.className+=" ".concat(e.prefixCls,"-rtl")),delete(e=Object(a.a)(Object(a.a)({},e),{},{mode:t,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ot(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,s.createElement(T.a,{store:this.store},s.createElement(_t,Object(w.a)({},e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.store,i=r.getState(),o={},a={prevProps:e};return"inline"===n.mode&&"inline"!==e.mode&&(a.switchingModeFromInline=!0),"openKeys"in e?o.openKeys=e.openKeys||[]:((e.inlineCollapsed&&!n.inlineCollapsed||e.siderCollapsed&&!n.siderCollapsed)&&(a.switchingModeFromInline=!0,a.inlineOpenKeys=i.openKeys,o.openKeys=[]),(!e.inlineCollapsed&&n.inlineCollapsed||!e.siderCollapsed&&n.siderCollapsed)&&(o.openKeys=t.inlineOpenKeys,a.inlineOpenKeys=[])),Object.keys(o).length&&r.setState(o),a}}]),n}(s.Component);At.defaultProps={selectable:!0,onClick:$,onSelect:$,onOpenChange:$,onDeselect:$,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:s.createElement("span",null,"···")};var Lt=At,Dt=function(e){Object(k.a)(n,e);var t=Object(_.a)(n);function n(){var e;return Object(E.a)(this,n),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===v.a.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,o=n.onMouseLeave;i({key:r,hover:!1}),o({key:r,domEvent:t})},e.onMouseEnter=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,o=n.onMouseEnter;i({key:r,hover:!0}),o({key:r,domEvent:t})},e.onClick=function(t){var n=e.props,r=n.eventKey,i=n.multiple,o=n.onClick,a=n.onSelect,s=n.onDeselect,l=n.isSelected,c={key:r,keyPath:[r],item:Object(C.a)(e),domEvent:t};o(c),i?l?s(c):a(c):l||a(c)},e.saveNode=function(t){e.node=t},e}return Object(S.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var e,t=Object(a.a)({},this.props),n=c()(this.getPrefixCls(),t.className,(e={},Object(r.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(r.a)(e,this.getSelectedClassName(),t.isSelected),Object(r.a)(e,this.getDisabledClassName(),t.disabled),e)),i=Object(a.a)(Object(a.a)({},t.attribute),{},{title:"string"==typeof t.title?t.title:void 0,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?i=Object(a.a)(Object(a.a)({},i),{},{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(i.role="none");var o={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},l=Object(a.a)({},t.style);"inline"===t.mode&&("rtl"===t.direction?l.paddingRight=t.inlineIndent*t.level:l.paddingLeft=t.inlineIndent*t.level),ee.forEach((function(e){return delete t[e]})),delete t.direction;var u=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(u=s.createElement(this.props.itemIcon,this.props)),s.createElement("li",Object(w.a)({},Object(O.a)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),i,o,{style:l,ref:this.saveNode}),t.children,u)}}]),n}(s.Component);Dt.isMenuItem=!0,Dt.defaultProps={onSelect:$,onMouseEnter:$,onMouseLeave:$,manualRef:$};var It=Object(T.b)((function(e,t){var n=e.activeKey,r=e.selectedKeys,i=t.eventKey;return{active:n[t.subMenuKey]===i,isSelected:Array.isArray(r)?-1!==r.indexOf(i):r===i}}))(Dt),Rt=function(e){Object(k.a)(n,e);var t=Object(_.a)(n);function n(){var e;return Object(E.a)(this,n),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var n=e.props;return(0,n.renderMenuItem)(t,n.index,e.props.subMenuKey)},e}return Object(S.a)(n,[{key:"render",value:function(){var e=Object(w.a)({},this.props),t=e.className,n=void 0===t?"":t,r=e.rootPrefixCls,i="".concat(r,"-item-group-title"),o="".concat(r,"-item-group-list"),a=e.title,l=e.children;return ee.forEach((function(t){return delete e[t]})),delete e.direction,s.createElement("li",Object(w.a)({},e,{onClick:function(e){return e.stopPropagation()},className:"".concat(n," ").concat(r,"-item-group")}),s.createElement("div",{className:i,title:"string"==typeof a?a:void 0},a),s.createElement("ul",{className:o},s.Children.map(l,this.renderInnerMenuItem)))}}]),n}(s.Component);Rt.isMenuItemGroup=!0,Rt.defaultProps={disabled:!0};var Mt=function(e){var t=e.className,n=e.rootPrefixCls,r=e.style;return s.createElement("li",{className:"".concat(t," ").concat(n,"-item-divider"),style:r})};Mt.defaultProps={disabled:!0,className:"",style:{}};var Nt=Lt,jt=n("eDIo");var Pt=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,o=e.style;return r&&!1!==r.showAdd?s.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(null==i?void 0:i.addAriaLabel)||"Add tab",onClick:function(e){r.onEdit("add",{event:e})}},r.addIcon||"+"):null}));var Bt=s.forwardRef((function(e,t){var n=e.prefixCls,o=e.id,a=e.tabs,l=e.locale,u=e.mobile,h=e.moreIcon,d=void 0===h?"More":h,f=e.moreTransitionName,p=e.style,m=e.className,g=e.editable,y=e.tabBarGutter,b=e.rtl,x=e.onTabClick,w=Object(s.useState)(!1),E=Object(i.a)(w,2),S=E[0],C=E[1],k=Object(s.useState)(null),_=Object(i.a)(k,2),T=_[0],O=_[1],A="".concat(o,"-more-popup"),L="".concat(n,"-dropdown"),D=null!==T?"".concat(A,"-").concat(T):null,I=null==l?void 0:l.dropdownAriaLabel,R=s.createElement(Nt,{onClick:function(e){var t=e.key,n=e.domEvent;x(t,n),C(!1)},id:A,tabIndex:-1,role:"listbox","aria-activedescendant":D,selectedKeys:[T],"aria-label":void 0!==I?I:"expanded dropdown"},a.map((function(e){return s.createElement(It,{key:e.key,id:"".concat(A,"-").concat(e.key),role:"option","aria-controls":o&&"".concat(o,"-panel-").concat(e.key),disabled:e.disabled},e.tab)})));function M(e){for(var t=a.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===T}))||0,r=t.length,i=0;i<r;i+=1){var o=t[n=(n+e+r)%r];if(!o.disabled)return void O(o.key)}}Object(s.useEffect)((function(){var e=document.getElementById(D);e&&e.scrollIntoView&&e.scrollIntoView(!1)}),[T]),Object(s.useEffect)((function(){S||O(null)}),[S]);var N=Object(r.a)({},b?"marginLeft":"marginRight",y);a.length||(N.visibility="hidden",N.order=1);var j=c()(Object(r.a)({},"".concat(L,"-rtl"),b)),P=u?null:s.createElement(jt.a,{prefixCls:L,overlay:R,trigger:["hover"],visible:S,transitionName:f,onVisibleChange:C,overlayClassName:j,mouseEnterDelay:.1,mouseLeaveDelay:.1},s.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:N,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":A,id:"".concat(o,"-more"),"aria-expanded":S,onKeyDown:function(e){var t=e.which;if(S)switch(t){case v.a.UP:M(-1),e.preventDefault();break;case v.a.DOWN:M(1),e.preventDefault();break;case v.a.ESC:C(!1);break;case v.a.SPACE:case v.a.ENTER:null!==T&&x(T,e)}else[v.a.DOWN,v.a.SPACE,v.a.ENTER].includes(t)&&(C(!0),e.preventDefault())}},d));return s.createElement("div",{className:c()("".concat(n,"-nav-operations"),m),style:p,ref:t},P,s.createElement(Pt,{prefixCls:n,locale:l,editable:g}))})),Ft=Object(s.createContext)(null),Ut=Math.pow(.995,20);function Ht(e,t){var n=s.useRef(e),r=s.useState({}),o=Object(i.a)(r,2)[1];return[n.current,function(e){var r="function"==typeof e?e(n.current):e;r!==n.current&&t(r,n.current),n.current=r,o({})}]}var zt=function(e){var t,n=e.position,r=e.prefixCls,i=e.extra;if(!i)return null;var o=i;return"right"===n&&(t=o.right||!o.left&&o||null),"left"===n&&(t=o.left||null),t?s.createElement("div",{className:"".concat(r,"-extra-content")},t):null};var Gt=s.forwardRef((function(e,t){var n,o,l=s.useContext(Ft),u=l.prefixCls,h=l.tabs,f=e.className,v=e.style,w=e.id,E=e.animated,S=e.activeKey,C=e.rtl,k=e.extra,_=e.editable,T=e.locale,O=e.tabPosition,A=e.tabBarGutter,L=e.children,D=e.onTabClick,I=e.onTabScroll,R=Object(s.useRef)(),M=Object(s.useRef)(),N=Object(s.useRef)(),j=Object(s.useRef)(),P=(o=Object(s.useRef)(new Map),[function(e){return o.current.has(e)||o.current.set(e,s.createRef()),o.current.get(e)},function(e){o.current.delete(e)}]),B=Object(i.a)(P,2),F=B[0],U=B[1],H="top"===O||"bottom"===O,z=Ht(0,(function(e,t){H&&I&&I({direction:e>t?"left":"right"})})),G=Object(i.a)(z,2),V=G[0],W=G[1],K=Ht(0,(function(e,t){!H&&I&&I({direction:e>t?"top":"bottom"})})),q=Object(i.a)(K,2),X=q[0],Y=q[1],$=Object(s.useState)(0),J=Object(i.a)($,2),Z=J[0],Q=J[1],ee=Object(s.useState)(0),te=Object(i.a)(ee,2),ne=te[0],re=te[1],ie=Object(s.useState)(0),oe=Object(i.a)(ie,2),ae=oe[0],se=oe[1],le=Object(s.useState)(0),ce=Object(i.a)(le,2),ue=ce[0],he=ce[1],de=Object(s.useState)(null),fe=Object(i.a)(de,2),pe=fe[0],me=fe[1],ge=Object(s.useState)(null),ve=Object(i.a)(ge,2),ye=ve[0],be=ve[1],xe=Object(s.useState)(0),we=Object(i.a)(xe,2),Ee=we[0],Se=we[1],Ce=Object(s.useState)(0),ke=Object(i.a)(Ce,2),_e=ke[0],Te=ke[1],Oe=function(e){var t=Object(s.useRef)([]),n=Object(s.useState)({}),r=Object(i.a)(n,2)[1],o=Object(s.useRef)("function"==typeof e?e():e),a=g((function(){var e=o.current;t.current.forEach((function(t){e=t(e)})),t.current=[],o.current=e,r({})}));return[o.current,function(e){t.current.push(e),a()}]}(new Map),Ae=Object(i.a)(Oe,2),Le=Ae[0],De=Ae[1],Ie=function(e,t,n){return Object(s.useMemo)((function(){for(var n,r=new Map,i=t.get(null===(n=e[0])||void 0===n?void 0:n.key)||b,o=i.left+i.width,s=0;s<e.length;s+=1){var l,c=e[s].key,u=t.get(c);if(!u)u=t.get(null===(l=e[s-1])||void 0===l?void 0:l.key)||b;var h=r.get(c)||Object(a.a)({},u);h.right=o-h.left-h.width,r.set(c,h)}return r}),[e.map((function(e){return e.key})).join("_"),t,n])}(h,Le,Z),Re="".concat(u,"-nav-operations-hidden"),Me=0,Ne=0;function je(e){return e<Me?[Me,!1]:e>Ne?[Ne,!1]:[e,!0]}H?C?(Me=0,Ne=Math.max(0,Z-pe)):(Me=Math.min(0,pe-Z),Ne=0):(Me=Math.min(0,ye-ne),Ne=0);var Pe=Object(s.useRef)(),Be=Object(s.useState)(),Fe=Object(i.a)(Be,2),Ue=Fe[0],He=Fe[1];function ze(){He(Date.now())}function Ge(){window.clearTimeout(Pe.current)}function Ve(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,t=Ie.get(e);if(t)if(H){var n=V;C?t.right<V?n=t.right:t.right+t.width>V+pe&&(n=t.right+t.width-pe):t.left<-V?n=-t.left:t.left+t.width>-V+pe&&(n=-(t.left+t.width-pe)),Y(0),W(je(n)[0])}else{var r=X;t.top<-X?r=-t.top:t.top+t.height>-X+ye&&(r=-(t.top+t.height-ye)),W(0),Y(je(r)[0])}}!function(e,t){var n=Object(s.useState)(),r=Object(i.a)(n,2),o=r[0],a=r[1],l=Object(s.useState)(0),c=Object(i.a)(l,2),u=c[0],h=c[1],d=Object(s.useState)(0),f=Object(i.a)(d,2),p=f[0],m=f[1],g=Object(s.useState)(),v=Object(i.a)(g,2),y=v[0],b=v[1],x=Object(s.useRef)(),w=Object(s.useRef)(0),E=Object(s.useRef)(!1),S=Object(s.useRef)(),C=Object(s.useRef)(null);C.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,r=t.screenY;a({x:n,y:r}),window.clearInterval(x.current)},onTouchMove:function(e){if(o){e.preventDefault();var n=e.touches[0],r=n.screenX,i=n.screenY;a({x:r,y:i});var s=r-o.x,l=i-o.y;t(s,l);var c=Date.now();h(c),m(c-u),b({x:s,y:l})}},onTouchEnd:function(){if(o&&(a(null),b(null),y)){var e=y.x/p,n=y.y/p,r=Math.abs(e),i=Math.abs(n);if(Math.max(r,i)<.1)return;var s=e,l=n;x.current=window.setInterval((function(){Math.abs(s)<.01&&Math.abs(l)<.01?window.clearInterval(x.current):t(20*(s*=Ut),20*(l*=Ut))}),20)}},onWheel:function(e){var n=e.deltaX,r=e.deltaY,i=0,o=Math.abs(n),a=Math.abs(r);o===a?i="x"===S.current?n:r:o>a?(i=n,S.current="x"):(i=r,S.current="y");var s=Date.now();s-w.current>100&&(E.current=!1),(t(-i,-i)||E.current)&&(e.preventDefault(),E.current=!0),w.current=s}},s.useEffect((function(){function t(e){C.current.onTouchMove(e)}function n(e){C.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),e.current.addEventListener("touchstart",(function(e){C.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){C.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(R,(function(e,t){var n=!1;function r(e,t){e((function(e){var r=je(e+t),o=Object(i.a)(r,2),a=o[0],s=o[1];return n=s,a}))}if(H){if(pe>=Z)return n;r(W,e)}else{if(ye>=ne)return n;r(Y,t)}return Ge(),ze(),n})),Object(s.useEffect)((function(){return Ge(),Ue&&(Pe.current=window.setTimeout((function(){He(0)}),100)),Ge}),[Ue]);var We=function(e,t,n,r,i){var o,a,l,c=i.tabs,u=i.tabPosition,h=i.rtl;["top","bottom"].includes(u)?(o="width",a=h?"right":"left",l=Math.abs(t.left)):(o="height",a="top",l=-t.top);var d=t[o],f=n[o],p=r[o],m=d;return f+p>d&&(m=d-p),Object(s.useMemo)((function(){if(!c.length)return[0,0];for(var t=c.length,n=t,r=0;r<t;r+=1){var i=e.get(c[r].key)||x;if(i[a]+i[o]>l+m){n=r-1;break}}for(var s=0,u=t-1;u>=0;u-=1){if((e.get(c[u].key)||x)[a]<l){s=u+1;break}}return[s,n]}),[e,l,m,u,c.map((function(e){return e.key})).join("_"),h])}(Ie,{width:pe,height:ye,left:V,top:X},{width:ae,height:ue},{width:Ee,height:_e},Object(a.a)(Object(a.a)({},e),{},{tabs:h})),Ke=Object(i.a)(We,2),qe=Ke[0],Xe=Ke[1],Ye=h.map((function(e){var t=e.key;return s.createElement(y,{id:w,prefixCls:u,key:t,rtl:C,tab:e,closable:e.closable,editable:_,active:t===S,tabPosition:O,tabBarGutter:A,renderWrapper:L,removeAriaLabel:null==T?void 0:T.removeAriaLabel,ref:F(t),onClick:function(e){D(t,e)},onRemove:function(){U(t)},onFocus:function(){Ve(t),ze(),C||(R.current.scrollLeft=0),R.current.scrollTop=0}})})),$e=g((function(){var e,t,n,r,i,o,a,s,l,c=(null===(e=R.current)||void 0===e?void 0:e.offsetWidth)||0,u=(null===(t=R.current)||void 0===t?void 0:t.offsetHeight)||0,d=(null===(n=j.current)||void 0===n?void 0:n.offsetWidth)||0,f=(null===(r=j.current)||void 0===r?void 0:r.offsetHeight)||0,p=(null===(i=N.current)||void 0===i?void 0:i.offsetWidth)||0,m=(null===(o=N.current)||void 0===o?void 0:o.offsetHeight)||0;me(c),be(u),Se(d),Te(f);var g=((null===(a=M.current)||void 0===a?void 0:a.offsetWidth)||0)-d,v=((null===(s=M.current)||void 0===s?void 0:s.offsetHeight)||0)-f;Q(g),re(v);var y=null===(l=N.current)||void 0===l?void 0:l.className.includes(Re);se(g-(y?0:p)),he(v-(y?0:m)),De((function(){var e=new Map;return h.forEach((function(t){var n=t.key,r=F(n).current;r&&e.set(n,{width:r.offsetWidth,height:r.offsetHeight,left:r.offsetLeft,top:r.offsetTop})})),e}))})),Je=h.slice(0,qe),Ze=h.slice(Xe+1),Qe=[].concat(Object(d.a)(Je),Object(d.a)(Ze)),et=Object(s.useState)(),tt=Object(i.a)(et,2),nt=tt[0],rt=tt[1],it=Ie.get(S),ot=Object(s.useRef)();function at(){p.a.cancel(ot.current)}Object(s.useEffect)((function(){var e={};return it&&(H?(C?e.right=it.right:e.left=it.left,e.width=it.width):(e.top=it.top,e.height=it.height)),at(),ot.current=p()((function(){rt(e)})),at}),[it,H,C]),Object(s.useEffect)((function(){Ve()}),[S,it,Ie,H]),Object(s.useEffect)((function(){$e()}),[C,A,S,h.map((function(e){return e.key})).join("_")]);var st,lt,ct,ut,ht=!!Qe.length,dt="".concat(u,"-nav-wrap");return H?C?(lt=V>0,st=V+pe<Z):(st=V<0,lt=-V+pe<Z):(ct=X<0,ut=-X+ye<ne),s.createElement("div",{ref:t,role:"tablist",className:c()("".concat(u,"-nav"),f),style:v,onKeyDown:function(){ze()}},s.createElement(zt,{position:"left",extra:k,prefixCls:u}),s.createElement(m.a,{onResize:$e},s.createElement("div",{className:c()(dt,(n={},Object(r.a)(n,"".concat(dt,"-ping-left"),st),Object(r.a)(n,"".concat(dt,"-ping-right"),lt),Object(r.a)(n,"".concat(dt,"-ping-top"),ct),Object(r.a)(n,"".concat(dt,"-ping-bottom"),ut),n)),ref:R},s.createElement(m.a,{onResize:$e},s.createElement("div",{ref:M,className:"".concat(u,"-nav-list"),style:{transform:"translate(".concat(V,"px, ").concat(X,"px)"),transition:Ue?"none":void 0}},Ye,s.createElement(Pt,{ref:j,prefixCls:u,locale:T,editable:_,style:{visibility:ht?"hidden":null}}),s.createElement("div",{className:c()("".concat(u,"-ink-bar"),Object(r.a)({},"".concat(u,"-ink-bar-animated"),E.inkBar)),style:nt}))))),s.createElement(Bt,Object.assign({},e,{ref:N,prefixCls:u,tabs:Qe,className:!ht&&Re})),s.createElement(zt,{position:"right",extra:k,prefixCls:u}))}));function Vt(e){var t=e.id,n=e.activeKey,i=e.animated,o=e.tabPosition,a=e.rtl,l=e.destroyInactiveTabPane,u=s.useContext(Ft),h=u.prefixCls,d=u.tabs,f=i.tabPane,p=d.findIndex((function(e){return e.key===n}));return s.createElement("div",{className:c()("".concat(h,"-content-holder"))},s.createElement("div",{className:c()("".concat(h,"-content"),"".concat(h,"-content-").concat(o),Object(r.a)({},"".concat(h,"-content-animated"),f)),style:p&&f?Object(r.a)({},a?"marginRight":"marginLeft","-".concat(p,"00%")):null},d.map((function(e){return s.cloneElement(e.node,{key:e.key,prefixCls:h,tabKey:e.key,id:t,animated:f,active:e.key===n,destroyInactiveTabPane:l})}))))}function Wt(e){var t=e.prefixCls,n=e.forceRender,r=e.className,o=e.style,l=e.id,u=e.active,h=e.animated,d=e.destroyInactiveTabPane,f=e.tabKey,p=e.children,m=s.useState(n),g=Object(i.a)(m,2),v=g[0],y=g[1];s.useEffect((function(){u?y(!0):d&&y(!1)}),[u,d]);var b={};return u||(h?(b.visibility="hidden",b.height=0,b.overflowY="hidden"):b.display="none"),s.createElement("div",{id:l&&"".concat(l,"-panel-").concat(f),role:"tabpanel",tabIndex:u?0:-1,"aria-labelledby":l&&"".concat(l,"-tab-").concat(f),"aria-hidden":!u,style:Object(a.a)(Object(a.a)({},b),o),className:c()("".concat(t,"-tabpane"),u&&"".concat(t,"-tabpane-active"),r)},(u||v||n)&&p)}var Kt=0;var qt=s.forwardRef((function(e,t){var n,l,d=e.id,f=e.prefixCls,p=void 0===f?"rc-tabs":f,m=e.className,g=e.children,v=e.direction,y=e.activeKey,b=e.defaultActiveKey,x=e.editable,w=e.animated,E=e.tabPosition,S=void 0===E?"top":E,C=e.tabBarGutter,k=e.tabBarStyle,_=e.tabBarExtraContent,T=e.locale,O=e.moreIcon,A=e.moreTransitionName,L=e.destroyInactiveTabPane,D=e.renderTabBar,I=e.onChange,R=e.onTabClick,M=e.onTabScroll,N=Object(o.a)(e,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),j=function(e){return Object(u.a)(e).map((function(e){if(s.isValidElement(e)){var t=void 0!==e.key?String(e.key):void 0;return Object(a.a)(Object(a.a)({key:t},e.props),{},{node:e})}return null})).filter((function(e){return e}))}(g),P="rtl"===v;l=!1===w?{inkBar:!1,tabPane:!1}:Object(a.a)({inkBar:!0,tabPane:!1},!0!==w?w:null);var B=Object(s.useState)(!1),F=Object(i.a)(B,2),U=F[0],H=F[1];Object(s.useEffect)((function(){var e;H((e=navigator.userAgent||navigator.vendor||window.opera,!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.substr(0,4)))))}),[]);var z=Object(h.a)((function(){var e;return null===(e=j[0])||void 0===e?void 0:e.key}),{value:y,defaultValue:b}),G=Object(i.a)(z,2),V=G[0],W=G[1],K=Object(s.useState)((function(){return j.findIndex((function(e){return e.key===V}))})),q=Object(i.a)(K,2),X=q[0],Y=q[1];Object(s.useEffect)((function(){var e,t=j.findIndex((function(e){return e.key===V}));-1===t&&(t=Math.max(0,Math.min(X,j.length-1)),W(null===(e=j[t])||void 0===e?void 0:e.key));Y(t)}),[j.map((function(e){return e.key})).join("_"),V,X]);var $=Object(h.a)(null,{value:d}),J=Object(i.a)($,2),Z=J[0],Q=J[1],ee=S;U&&!["left","right"].includes(S)&&(ee="top"),Object(s.useEffect)((function(){d||(Q("rc-tabs-".concat(Kt)),Kt+=1)}),[]);var te,ne={id:Z,activeKey:V,animated:l,tabPosition:ee,rtl:P,mobile:U},re=Object(a.a)(Object(a.a)({},ne),{},{editable:x,locale:T,moreIcon:O,moreTransitionName:A,tabBarGutter:C,onTabClick:function(e,t){null==R||R(e,t),W(e),null==I||I(e)},onTabScroll:M,extra:_,style:k,panes:g});return te=D?D(re,Gt):s.createElement(Gt,Object.assign({},re)),s.createElement(Ft.Provider,{value:{tabs:j,prefixCls:p}},s.createElement("div",Object.assign({ref:t,id:d,className:c()(p,"".concat(p,"-").concat(ee),(n={},Object(r.a)(n,"".concat(p,"-mobile"),U),Object(r.a)(n,"".concat(p,"-editable"),x),Object(r.a)(n,"".concat(p,"-rtl"),P),n),m)},N),te,s.createElement(Vt,Object.assign({destroyInactiveTabPane:L},ne,{animated:l}))))}));qt.TabPane=Wt;var Xt=qt;t.b=Xt},kSUc:
/*!***************************************************!*\
!*** ./src/components/markdown-editor/index.less ***!
\***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},lPiR:
/*!******************************************!*\
!*** ./node_modules/crypto-js/sha256.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[],l=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(s[i]=n(e.pow(r,.5))),l[i]=n(e.pow(r,1/3)),i++),r++}();var c=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],h=n[6],d=n[7],f=0;f<64;f++){if(f<16)c[f]=0|e[t+f];else{var p=c[f-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=c[f-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[f]=m+c[f-7]+v+c[f-16]}var y=r&i^r&o^i&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),x=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&h)+l[f]+c[f];d=h,h=u,u=s,s=a+x|0,a=o,o=i,i=r,r=x+(b+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+h|0,n[7]=n[7]+d|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(u),t.HmacSHA256=o._createHmacHelper(u)}(Math),r.SHA256)},lZu9:
/*!***********************************************************!*\
!*** ./node_modules/codemirror/mode/markdown/markdown.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.defineMode("markdown",(function(t,n){var r=e.getMode(t,"text/html"),i="null"==r.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var o={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var a in o)o.hasOwnProperty(a)&&n.tokenTypeOverrides[a]&&(o[a]=n.tokenTypeOverrides[a]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,u=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,d=/^[^#!\[\]*_\\<>` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function g(e,t,n){return t.f=t.inline=n,n(e,t)}function v(e,t,n){return t.f=t.block=n,n(e,t)}function y(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==x){var n=i;if(!n){var o=e.innerMode(r,t.htmlState);n="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}n&&(t.f=C,t.block=b,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function b(r,i){var a,d=r.column()===i.indentation,m=!(a=i.prevLine.stream)||!/\S/.test(a.string),v=i.indentedCode,y=i.prevLine.hr,b=!1!==i.list,x=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var S=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,b)){for(i.list=null;S<i.listStack[i.listStack.length-1];)i.listStack.pop(),i.listStack.length?i.indentation=i.listStack[i.listStack.length-1]:i.list=!1;!1!==i.list&&(i.indentationDiff=S-i.listStack[i.listStack.length-1])}var C=!(m||y||i.prevLine.header||b&&v||i.prevLine.fencedCodeEnd),k=(!1===i.list||y||m)&&i.indentation<=x&&r.match(s),_=null;if(i.indentationDiff>=4&&(v||i.prevLine.fencedCodeEnd||i.prevLine.header||m))return r.skipToEnd(),i.indentedCode=!0,o.code;if(r.eatSpace())return null;if(d&&i.indentation<=x&&(_=r.match(u))&&_[1].length<=6)return i.quote=0,i.header=_[1].length,i.thisLine.header=!0,n.highlightFormatting&&(i.formatting="header"),i.f=i.inline,E(i);if(i.indentation<=x&&r.eat(">"))return i.quote=d?1:i.quote+1,n.highlightFormatting&&(i.formatting="quote"),r.eatSpace(),E(i);if(!k&&!i.setext&&d&&i.indentation<=x&&(_=r.match(l))){var T=_[1]?"ol":"ul";return i.indentation=S+r.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,n.taskLists&&r.match(c,!1)&&(i.taskList=!0),i.f=i.inline,n.highlightFormatting&&(i.formatting=["list","list-"+T]),E(i)}return d&&i.indentation<=x&&(_=r.match(f,!0))?(i.quote=0,i.fencedEndRE=new RegExp(_[1]+"+ *$"),i.localMode=n.fencedCodeBlockHighlighting&&function(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}(_[2]||n.fencedCodeBlockDefaultMode),i.localMode&&(i.localState=e.startState(i.localMode)),i.f=i.block=w,n.highlightFormatting&&(i.formatting="code-block"),i.code=-1,E(i)):i.setext||!(C&&b||i.quote||!1!==i.list||i.code||k||p.test(r.string))&&(_=r.lookAhead(1))&&(_=_.match(h))?(i.setext?(i.header=i.setext,i.setext=0,r.skipToEnd(),n.highlightFormatting&&(i.formatting="header")):(i.header="="==_[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,E(i)):k?(r.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,o.hr):"["===r.peek()?g(r,i,O):g(r,i,i.inline)}function x(t,n){var o=r.token(t,n.htmlState);if(!i){var a=e.innerMode(r,n.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=C,n.block=b,n.htmlState=null)}return o}function w(e,t){var r,i=t.listStack[t.listStack.length-1]||0,a=t.indentation<i,s=i+3;return t.fencedEndRE&&t.indentation<=s&&(a||e.match(t.fencedEndRE))?(n.highlightFormatting&&(t.formatting="code-block"),a||(r=E(t)),t.localMode=t.localState=null,t.block=b,t.f=C,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,a?v(e,t,t.block):r):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),o.code)}function E(e){var t=[];if(e.formatting){t.push(o.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(o.formatting+"-"+e.formatting[r]),"header"===e.formatting[r]&&t.push(o.formatting+"-"+e.formatting[r]+"-"+e.header),"quote"===e.formatting[r]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(o.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(o.linkHref,"url"):(e.strong&&t.push(o.strong),e.em&&t.push(o.em),e.strikethrough&&t.push(o.strikethrough),e.emoji&&t.push(o.emoji),e.linkText&&t.push(o.linkText),e.code&&t.push(o.code),e.image&&t.push(o.image),e.imageAltText&&t.push(o.imageAltText,"link"),e.imageMarker&&t.push(o.imageMarker)),e.header&&t.push(o.header,o.header+"-"+e.header),e.quote&&(t.push(o.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(o.quote+"-"+e.quote):t.push(o.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(o.list2):t.push(o.list3):t.push(o.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function S(e,t){if(e.match(d,!0))return E(t)}function C(t,i){var a=i.text(t,i);if(void 0!==a)return a;if(i.list)return i.list=null,E(i);if(i.taskList)return" "===t.match(c,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,E(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),E(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var l=s;"("===s&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(u),!0))return o.linkHref}if("`"===s){var h=i.formatting;n.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var d=t.current().length;if(0!=i.code||i.quote&&1!=d){if(d==i.code){var f=E(i);return i.code=0,f}return i.formatting=h,E(i)}return i.code=d,E(i)}if(i.code)return E(i);if("\\"===s&&(t.next(),n.highlightFormatting)){var p=E(i),g=o.formatting+"-escape";return p?p+" "+g:g}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),E(i);if("["===s&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),E(i);if("]"===s&&i.imageAltText){n.highlightFormatting&&(i.formatting="image");var p=E(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=_,p}if("["===s&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),E(i);if("]"===s&&i.linkText){n.highlightFormatting&&(i.formatting="link");var p=E(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?_:C,p}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=k,n.highlightFormatting&&(i.formatting="link"),(p=E(i))?p+=" ":p="",p+o.linkInline;if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=k,n.highlightFormatting&&(i.formatting="link"),(p=E(i))?p+=" ":p="",p+o.linkEmail;if(n.xml&&"<"===s&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var y=t.string.indexOf(">",t.pos);if(-1!=y){var b=t.string.substring(t.start,y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),v(t,i,x)}if(n.xml&&"<"===s&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var w=1,S=1==t.pos?" ":t.string.charAt(t.pos-2);w<3&&t.eat(s);)w++;var T=t.peek()||" ",O=!/\s/.test(T)&&(!m.test(T)||/\s/.test(S)||m.test(S)),A=!/\s/.test(S)&&(!m.test(S)||/\s/.test(T)||m.test(T)),L=null,D=null;if(w%2&&(i.em||!O||"*"!==s&&A&&!m.test(S)?i.em!=s||!A||"*"!==s&&O&&!m.test(T)||(L=!1):L=!0),w>1&&(i.strong||!O||"*"!==s&&A&&!m.test(S)?i.strong!=s||!A||"*"!==s&&O&&!m.test(T)||(D=!1):D=!0),null!=D||null!=L)return n.highlightFormatting&&(i.formatting=null==L?"strong":null==D?"em":"strong em"),!0===L&&(i.em=s),!0===D&&(i.strong=s),f=E(i),!1===L&&(i.em=!1),!1===D&&(i.strong=!1),f}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return E(i);t.backUp(1)}if(n.strikethrough)if("~"===s&&t.eatWhile(s)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),f=E(i),i.strikethrough=!1,f;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),E(i)}else if(" "===s&&t.match(/^~~/,!0)){if(" "===t.peek())return E(i);t.backUp(2)}if(n.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var I=E(i);return i.emoji=!1,I}return" "===s&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),E(i)}function k(e,t){if(">"===e.next()){t.f=t.inline=C,n.highlightFormatting&&(t.formatting="link");var r=E(t);return r?r+=" ":r="",r+o.linkInline}return e.match(/^[^>]+/,!0),o.linkInline}function _(e,t){if(e.eatSpace())return null;var r,i=e.next();return"("===i||"["===i?(t.f=t.inline=(r="("===i?")":"]",function(e,t){if(e.next()===r){t.f=t.inline=C,n.highlightFormatting&&(t.formatting="link-string");var i=E(t);return t.linkHref=!1,i}return e.match(T[r]),t.linkHref=!0,E(t)}),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,E(t)):"error"}var T={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function O(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=A,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,E(t)):g(e,t,C)}function A(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=L,n.highlightFormatting&&(t.formatting="link");var r=E(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),o.linkText}function L(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=C,o.linkHref+" url")}var D={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:C,text:S,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return y(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=x)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==x?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:D}},indent:function(t,n,i){return t.block==x&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:y,getType:E,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return D}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(n(/*! ../../lib/codemirror */"VrN/"),n(/*! ../xml/xml */"1eCo"),n(/*! ../meta */"8EBN"))},mOS8:
/*!*****************************************!*\
!*** ./src/assets/images/403Qrcode.png ***!
\*****************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/403Qrcode.6c17b6f4.png"},mxV5:
/*!*****************************************************!*\
!*** ./node_modules/ali-oss/dist/aliyun-oss-sdk.js ***!
\*****************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(module,exports,__webpack_require__){(function(global){var require,require,f;f=function(){var define,module,exports;return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(!s&&"function"==typeof require&&require)return require(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){"use strict";var r=e("./browser/client");r.Buffer=e("buffer").Buffer,r.urllib=e("../shims/xhr"),r.version=e("./browser/version").version,t.exports=r},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(e,t,n){(function(n,r){"use strict";var i=s(e("babel-runtime/core-js/promise")),o=s(e("babel-runtime/regenerator")),a=s(e("babel-runtime/core-js/object/assign"));function s(e){return e&&e.__esModule?e:{default:e}}var l=e("debug")("ali-oss"),c=e("copy-to"),u=e("xml2js"),h=e("agentkeepalive"),d=e("merge-descriptors"),f=e("url"),p=e("is-type-of"),m=e("platform"),g=e("utility"),v=e("urllib"),y=e("./version"),b=e("bowser"),x=e("../common/signUtils"),w=e("../common/utils/isIP").isIP,E=e("../common/client/initOptions"),S=e("../common/utils/createRequest").createRequest,C=new h;function k(e,t){var n,r;if(n=m.name,r=m.version,n&&n.toLowerCase&&"ie"===n.toLowerCase()&&r.split(".")[0]<10&&console.warn("ali-oss does not support the current browser"),!(this instanceof k))return new k(e,t);e&&e.inited?this.options=e:this.options=k.initOptions(e),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=v,this.agent=this.options.agent||C),this.ctx=t,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}t.exports=k,k.initOptions=function(e){e.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var t=(0,a.default)({secure:location&&"https:"===location.protocol,useFetch:!1},e);return E(t)};var _=k.prototype;_.debug=l,d(_,e("./object")),d(_,e("../common/bucket/getBucketWebsite")),d(_,e("../common/bucket/putBucketWebsite")),d(_,e("../common/bucket/deleteBucketWebsite")),d(_,e("../common/bucket/getBucketLifecycle")),d(_,e("../common/bucket/putBucketLifecycle")),d(_,e("../common/bucket/deleteBucketLifecycle")),d(_,e("../common/bucket/putBucketVersioning")),d(_,e("../common/bucket/getBucketVersioning")),d(_,e("./managed-upload")),d(_,e("../common/multipart")),d(_,e("../common/parallel")),_.signature=function(e){return this.debug("authorization stringToSign: %s",e,"info"),x.computeSignature(this.options.accessKeySecret,e)},_.authorization=function(e,t,n,r){var i=x.buildCanonicalString(e.toUpperCase(),t,{headers:r,parameters:n});return x.authorization(this.options.accessKeyId,this.options.accessKeySecret,i)},_.request=function(e){var t,n,r,i,a,s;return o.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return t=S.call(this,e),this.options.useFetch||(t.params.mode="disable-fetch"),n=void 0,r=void 0,i=!!e.stream,l.prev=5,l.next=8,o.default.awrap(this.urllib.request(t.url,t.params));case 8:n=l.sent,this.debug("response %s %s, got %s, headers: %j",e.method,t.url,n.status,n.headers,"info"),l.next=15;break;case 12:l.prev=12,l.t0=l.catch(5),r=l.t0;case 15:if(a=void 0,!n||!e.successStatuses||-1!==e.successStatuses.indexOf(n.status)){l.next=28;break}return l.next=19,o.default.awrap(this.requestError(n));case 19:if("RequestTimeTooSkewed"!==(a=l.sent).code||i){l.next=25;break}return this.options.amendTimeSkewed=+new Date(a.serverTime)-new Date,l.next=24,o.default.awrap(this.request(e));case 24:return l.abrupt("return",l.sent);case 25:a.params=e,l.next=32;break;case 28:if(!r){l.next=32;break}return l.next=31,o.default.awrap(this.requestError(r));case 31:a=l.sent;case 32:if(!a){l.next=34;break}throw a;case 34:if(!e.xmlResponse){l.next=39;break}return l.next=37,o.default.awrap(this.parseXML(n.data));case 37:s=l.sent,n.data=s;case 39:return l.abrupt("return",n);case 40:case"end":return l.stop()}}),null,this,[[5,12]])},_._getResource=function(e){var t="/";return e.bucket&&(t+=e.bucket+"/"),e.object&&(t+=e.object),t},_._isIP=w,_._escape=function(e){return g.encodeURIComponent(e).replace(/%2F/g,"/")},_._getReqUrl=function(e){var t={};c(this.options.endpoint).to(t);var n=this._isIP(t.hostname),r=this.options.cname;!e.bucket||r||n||(t.host=e.bucket+"."+t.host);var i="/";e.bucket&&n&&(i+=e.bucket+"/"),e.object&&(i+=this._escape(e.object).replace(/\+/g,"%2B")),t.pathname=i;var o={};if(e.query&&d(o,e.query),e.subres){var a={};p.string(e.subres)?a[e.subres]="":p.array(e.subres)?e.subres.forEach((function(e){a[e]=""})):a=e.subres,d(o,a)}return t.query=o,f.format(t)},_._getUserAgent=function(){var e="aliyun-sdk-"+(r&&r.browser?"js":"nodejs")+"/"+y.version,t=m.description;return!t&&r&&(t="Node.js "+r.version.slice(1)+" on "+r.platform+" "+r.arch),this._checkUserAgent(e+" "+t)},_._checkUserAgent=function(e){return e.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},_.checkBrowserAndVersion=function(e,t){return b.name===e&&b.version.split(".")[0]===t},_.parseXML=function(e){return new i.default((function(t,r){n.isBuffer(e)&&(e=e.toString()),u.parseString(e,{explicitRoot:!1,explicitArray:!1},(function(e,n){e?r(e):t(n)}))}))},_.requestError=function(e){var t,n,r,i;return o.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:if(t=null,e.data&&e.data.length){a.next=5;break}-1===e.status||-2===e.status?((t=new Error(e.message)).name=e.name,t.status=e.status,t.code=e.name):(404===e.status?((t=new Error("Object not exists")).name="NoSuchKeyError",t.status=404,t.code="NoSuchKey"):412===e.status?((t=new Error("Pre condition failed")).name="PreconditionFailedError",t.status=412,t.code="PreconditionFailed"):((t=new Error("Unknow error, status: "+e.status)).name="UnknowError",t.status=e.status),t.requestId=e.headers["x-oss-request-id"],t.host=""),a.next=33;break;case 5:return n=String(e.data),this.debug("request response error data: %s",n,"error"),r=void 0,a.prev=8,a.next=11,o.default.awrap(this.parseXML(n));case 11:if(a.t0=a.sent,a.t0){a.next=14;break}a.t0={};case 14:r=a.t0,a.next=24;break;case 17:return a.prev=17,a.t1=a.catch(8),this.debug(n,"error"),a.t1.message+="\nraw xml: "+n,a.t1.status=e.status,a.t1.requestId=e.headers["x-oss-request-id"],a.abrupt("return",a.t1);case 24:i=r.Message||"unknow request error, status: "+e.status,r.Condition&&(i+=" (condition: "+r.Condition+")"),(t=new Error(i)).name=r.Code?r.Code+"Error":"UnknowError",t.status=e.status,t.code=r.Code,t.requestId=r.RequestId,t.hostId=r.HostId,t.serverTime=r.ServerTime;case 33:return this.debug("generate error %j",t,"error"),a.abrupt("return",t);case 35:case"end":return a.stop()}}),null,this,[[8,17]])}}).call(this,{isBuffer:e("../../node_modules/is-buffer/index.js")},e("_process"))},{"../../node_modules/is-buffer/index.js":197,"../common/bucket/deleteBucketLifecycle":6,"../common/bucket/deleteBucketWebsite":7,"../common/bucket/getBucketLifecycle":8,"../common/bucket/getBucketVersioning":9,"../common/bucket/getBucketWebsite":10,"../common/bucket/putBucketLifecycle":11,"../common/bucket/putBucketVersioning":12,"../common/bucket/putBucketWebsite":13,"../common/client/initOptions":15,"../common/multipart":18,"../common/parallel":33,"../common/signUtils":34,"../common/utils/createRequest":38,"../common/utils/isIP":45,"./managed-upload":3,"./object":4,"./version":5,_process:208,agentkeepalive:48,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,bowser:70,"copy-to":76,debug:288,"is-type-of":289,"merge-descriptors":200,platform:206,url:238,urllib:291,utility:290,xml2js:249}],3:[function(e,t,n){(function(t){"use strict";var r=a(e("babel-runtime/core-js/array/from")),i=a(e("babel-runtime/core-js/promise")),o=a(e("babel-runtime/regenerator"));function a(e){return e&&e.__esModule?e:{default:e}}var s=e("is-type-of"),l=e("util"),c=e("path"),u=e("mime"),h=e("copy-to"),d=e("../common/utils/isBlob").isBlob,f=e("../common/utils/isFile").isFile,p=n;p.multipartUpload=function(e,t,n){var r,i,a,s,l,h,p,m,g;return o.default.async((function(v){for(;;)switch(v.prev=v.next){case 0:if(this.resetCancelFlag(),!(n=n||{}).checkpoint||!n.checkpoint.uploadId){v.next=6;break}return v.next=5,o.default.awrap(this._resumeMultipart(n.checkpoint,n));case 5:return v.abrupt("return",v.sent);case 6:return r=102400,n.mime||(f(t)?n.mime=u.getType(c.extname(t.name)):d(t)?n.mime=t.type:n.mime=u.getType(c.extname(t))),n.headers=n.headers||{},this._convertMetaToHeaders(n.meta,n.headers),v.next=12,o.default.awrap(this._getFileSize(t));case 12:if(!((i=v.sent)<r)){v.next=25;break}return a=this._createStream(t,0,i),n.contentLength=i,v.next=18,o.default.awrap(this.putStream(e,a,n));case 18:if(s=v.sent,!n||!n.progress){v.next=22;break}return v.next=22,o.default.awrap(n.progress(1));case 22:return l={res:s.res,bucket:this.options.bucket,name:e,etag:s.res.headers.etag},(n.headers&&n.headers["x-oss-callback"]||n.callback)&&(l.data=s.data),v.abrupt("return",l);case 25:if(!n.partSize||parseInt(n.partSize,10)===n.partSize){v.next=27;break}throw new Error("partSize must be int number");case 27:if(!(n.partSize&&n.partSize<r)){v.next=29;break}throw new Error("partSize must not be smaller than "+r);case 29:return v.next=31,o.default.awrap(this.initMultipartUpload(e,n));case 31:if(h=v.sent,p=h.uploadId,m=this._getPartSize(i,n.partSize),g={file:t,name:e,fileSize:i,partSize:m,uploadId:p,doneParts:[]},!n||!n.progress){v.next=38;break}return v.next=38,o.default.awrap(n.progress(0,g,h.res));case 38:return v.next=40,o.default.awrap(this._resumeMultipart(g,n));case 40:return v.abrupt("return",v.sent);case 41:case"end":return v.stop()}}),null,this)},p._resumeMultipart=function(e,t){var n,a,s,l,c,u,d,f,p,m,g,v,y,b,x,w,E;return o.default.async((function(S){for(;;)switch(S.prev=S.next){case 0:if(n=this,!this.isCancel()){S.next=3;break}throw this._makeCancelEvent();case 3:return a=e.file,s=e.fileSize,l=e.partSize,c=e.uploadId,u=e.doneParts,d=e.name,f=[],u.length>0&&h(u).to(f),p=this._divideParts(s,l),m=p.length,g=!1,v=function(n,r){var s=this;return new i.default((function(i,l){var f,v,y,b;return o.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:if(s.prev=0,n.isCancel()){s.next=18;break}return f=p[r-1],v={stream:n._createStream(a,f.start,f.end),size:f.end-f.start},s.next=6,o.default.awrap(n._uploadPart(d,c,r,v));case 6:if(y=s.sent,n.isCancel()||g){s.next=15;break}if(e.doneParts.push({number:r,etag:y.res.headers.etag}),!t.progress){s.next=12;break}return s.next=12,o.default.awrap(t.progress(u.length/m,e,y.res));case 12:i({number:r,etag:y.res.headers.etag}),s.next=16;break;case 15:i();case 16:s.next=19;break;case 18:i();case 19:s.next=30;break;case 21:s.prev=21,s.t0=s.catch(0),(b=new Error).name=s.t0.name,b.message=s.t0.message,b.stack=s.t0.stack,b.partNum=r,h(s.t0).to(b),l(b);case 30:case"end":return s.stop()}}),null,s,[[0,21]])}))},y=(0,r.default)(new Array(m),(function(e,t){return t+1})),b=f.map((function(e){return e.number})),x=y.filter((function(e){return b.indexOf(e)<0})),w=t.parallel||5,S.next=17,o.default.awrap(this._parallel(x,w,(function(e){return new i.default((function(t,r){v(n,e).then((function(e){e&&f.push(e),t()})).catch((function(e){r(e)}))}))})));case 17:if(E=S.sent,g=!0,!this.isCancel()){S.next=22;break}throw v=null,this._makeCancelEvent();case 22:if(!(E&&E.length>0)){S.next=25;break}throw E[0].message="Failed to upload some parts with error: "+E[0].toString()+" part_num: "+E[0].partNum,E[0];case 25:return S.next=27,o.default.awrap(this.completeMultipartUpload(d,c,f,t));case 27:return S.abrupt("return",S.sent);case 28:case"end":return S.stop()}}),null,this)},p._getFileSize=function(e){return o.default.async((function(t){for(;;)switch(t.prev=t.next){case 0:if(!s.buffer(e)){t.next=4;break}return t.abrupt("return",e.length);case 4:if(!d(e)&&!f(e)){t.next=6;break}return t.abrupt("return",e.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return t.stop()}}),null,this)};var m=e("stream").Readable;function g(e,t){if(!(this instanceof g))return new g(e,t);m.call(this,t),this.file=e,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}l.inherits(g,m),g.prototype.readFileAndPush=function(e){if(this.fileBuffer)for(var t=!0;t&&this.fileBuffer&&this.start<this.fileBuffer.length;){var n=this.start,r=n+e;r=r>this.fileBuffer.length?this.fileBuffer.length:r,this.start=r,t=this.push(this.fileBuffer.slice(n,r))}},g.prototype._read=function(e){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||0===this.start&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);e=e||16384;var n=this;this.reader.onload=function(r){n.fileBuffer=t.from(new Uint8Array(r.target.result)),n.file=null,n.readFileAndPush(e)},0===this.start?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(e)},p._createStream=function(e,t,n){if(d(e)||f(e))return new g(e.slice(t,n));throw new Error("_createStream requires File/Blob.")},p._getPartSize=function(e,t){return t?Math.max(Math.ceil(e/1e4),t):1048576},p._divideParts=function(e,t){for(var n=Math.ceil(e/t),r=[],i=0;i<n;i++){var o=t*i,a=Math.min(o+t,e);r.push({start:o,end:a})}return r}}).call(this,e("buffer").Buffer)},{"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/array/from":52,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,buffer:73,"copy-to":76,"is-type-of":289,mime:202,path:205,stream:230,util:243}],4:[function(e,t,n){"use strict";var r=s(e("babel-runtime/core-js/promise")),i=s(e("babel-runtime/core-js/object/keys")),o=s(e("babel-runtime/core-js/object/assign")),a=s(e("babel-runtime/regenerator"));function s(e){return e&&e.__esModule?e:{default:e}}var l=e("utility"),c=e("fs"),u=e("is-type-of"),h=e("url"),d=e("copy-to"),f=e("path"),p=e("mime"),m=e("../common/callback"),g=e("../common/signUtils"),v=e("merge-descriptors"),y=e("../common/utils/isBlob").isBlob,b=e("../common/utils/isFile").isFile,x=n;x.append=function(e,t,n){var r;return a.default.async((function(i){for(;;)switch(i.prev=i.next){case 0:return void 0===(n=n||{}).position&&(n.position="0"),n.subres={append:"",position:n.position},n.method="POST",i.next=6,a.default.awrap(this.put(e,t,n));case 6:return(r=i.sent).nextAppendPosition=r.res.headers["x-oss-next-append-position"],i.abrupt("return",r);case 9:case"end":return i.stop()}}),null,this)},x.put=function(e,t,n){var r,i,o,s,l,c,h;return a.default.async((function(d){for(;;)switch(d.prev=d.next){case 0:if(r=void 0,n=n||{},e=this._objectName(e),!u.buffer(t)){d.next=7;break}r=t,d.next=33;break;case 7:if(!y(t)&&!b(t)){d.next=32;break}return n.mime||(b(t)?n.mime=p.getType(f.extname(t.name)):n.mime=t.type),i=this._createStream(t,0,t.size),d.next=12,a.default.awrap(this._getFileSize(t));case 12:return n.contentLength=d.sent,d.prev=13,d.next=16,a.default.awrap(this.putStream(e,i,n));case 16:return o=d.sent,d.abrupt("return",o);case 20:if(d.prev=20,d.t0=d.catch(13),"RequestTimeTooSkewed"!==d.t0.code){d.next=29;break}return this.options.amendTimeSkewed=+new Date(d.t0.serverTime)-new Date,d.next=26,a.default.awrap(this.put(e,t,n));case 26:return d.abrupt("return",d.sent);case 29:throw d.t0;case 30:d.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return n.headers=n.headers||{},this._convertMetaToHeaders(n.meta,n.headers),s=n.method||"PUT",l=this._objectRequestParams(s,e,n),m.encodeCallback(l,n),l.mime=n.mime,l.content=r,l.successStatuses=[200],d.next=43,a.default.awrap(this.request(l));case 43:return c=d.sent,h={name:e,url:this._objectUrl(e),res:c.res},l.headers&&l.headers["x-oss-callback"]&&(h.data=JSON.parse(c.data.toString())),d.abrupt("return",h);case 47:case"end":return d.stop()}}),null,this,[[13,20]])},x.putStream=function(e,t,n){var r,i,o,s;return a.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return(n=n||{}).headers=n.headers||{},e=this._objectName(e),n.contentLength?n.headers["Content-Length"]=n.contentLength:n.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(n.meta,n.headers),r=n.method||"PUT",i=this._objectRequestParams(r,e,n),m.encodeCallback(i,n),i.mime=n.mime,i.stream=t,i.successStatuses=[200],l.next=13,a.default.awrap(this.request(i));case 13:return o=l.sent,s={name:e,url:this._objectUrl(e),res:o.res},i.headers&&i.headers["x-oss-callback"]&&(s.data=JSON.parse(o.data.toString())),l.abrupt("return",s);case 17:case"end":return l.stop()}}),null,this)},v(x,e("../common/object/copyObject")),v(x,e("../common/object/getObjectTagging")),v(x,e("../common/object/putObjectTagging")),v(x,e("../common/object/deleteObjectTagging")),v(x,e("../common/image")),v(x,e("../common/object/getBucketVersions")),v(x,e("../common/object/getACL")),v(x,e("../common/object/putACL")),v(x,e("../common/object/head")),v(x,e("../common/object/delete")),v(x,e("../common/object/get")),v(x,e("../common/object/putSymlink")),v(x,e("../common/object/getSymlink")),v(x,e("../common/object/deleteMulti")),v(x,e("../common/object/getObjectMeta")),x.putMeta=function(e,t,n){var r;return a.default.async((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,a.default.awrap(this.copy(e,e,{meta:t||{},timeout:n&&n.timeout,ctx:n&&n.ctx}));case 2:return r=i.sent,i.abrupt("return",r);case 4:case"end":return i.stop()}}),null,this)},x.list=function(e,t){var n,r,i,o,s;return a.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return(n=this._objectRequestParams("GET","",t)).query=e,n.xmlResponse=!0,n.successStatuses=[200],l.next=6,a.default.awrap(this.request(n));case 6:return r=l.sent,i=r.data.Contents,o=this,i&&(Array.isArray(i)||(i=[i]),i=i.map((function(e){return{name:e.Key,url:o._objectUrl(e.Key),lastModified:e.LastModified,etag:e.ETag,type:e.Type,size:Number(e.Size),storageClass:e.StorageClass,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName}}}))),(s=r.data.CommonPrefixes||null)&&(Array.isArray(s)||(s=[s]),s=s.map((function(e){return e.Prefix}))),l.abrupt("return",{res:r.res,objects:i,prefixes:s,nextMarker:r.data.NextMarker||null,isTruncated:"true"===r.data.IsTruncated});case 13:case"end":return l.stop()}}),null,this)},x.restore=function(e,t){var n,r;return a.default.async((function(i){for(;;)switch(i.prev=i.next){case 0:return(t=t||{}).subres=(0,o.default)({restore:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),(n=this._objectRequestParams("POST",e,t)).successStatuses=[202],i.next=7,a.default.awrap(this.request(n));case 7:return r=i.sent,i.abrupt("return",{res:r.res});case 9:case"end":return i.stop()}}),null,this)},x.signatureUrl=function(e,t){t=t||{},e=this._objectName(e),t.method=t.method||"GET";var n=l.timestamp()+(t.expires||1800),r={bucket:this.options.bucket,object:e},i=this._getResource(r);this.options.stsToken&&(t["security-token"]=this.options.stsToken);var o=g._signatureForURL(this.options.accessKeySecret,t,i,n),a=h.parse(this._getReqUrl(r));return a.query={OSSAccessKeyId:this.options.accessKeyId,Expires:n,Signature:o.Signature},d(o.subResource).to(a.query),a.format()},x.getObjectUrl=function(e,t){return t?"/"!==t[t.length-1]&&(t+="/"):t=this.options.endpoint.format(),t+this._escape(this._objectName(e))},x._objectUrl=function(e){return this._getReqUrl({bucket:this.options.bucket,object:e})},x.generateObjectUrl=function(e,t){if(t)"/"!==t[t.length-1]&&(t+="/");else{t=this.options.endpoint.format();var n=h.parse(t),r=this.options.bucket;n.hostname=r+"."+n.hostname,n.host=r+"."+n.host,t=n.format()}return t+this._escape(this._objectName(e))},x._objectRequestParams=function(e,t,n){if(!this.options.bucket)throw new Error("Please create a bucket first");n=n||{};var r={object:t=this._objectName(t),bucket:this.options.bucket,method:e,subres:n&&n.subres,timeout:n&&n.timeout,ctx:n&&n.ctx};return n.headers&&(r.headers={},d(n.headers).to(r.headers)),r},x._objectName=function(e){return e.replace(/^\/+/,"")},x._convertMetaToHeaders=function(e,t){e&&(0,i.default)(e).forEach((function(n){t["x-oss-meta-"+n]=e[n]}))},x._deleteFileSafe=function(e){var t=this;return new r.default((function(n){c.exists(e,(function(r){r?c.unlink(e,(function(r){r&&t.debug("unlink %j error: %s",e,r,"error"),n()})):n()}))}))}},{"../common/callback":14,"../common/image":16,"../common/object/copyObject":19,"../common/object/delete":20,"../common/object/deleteMulti":21,"../common/object/deleteObjectTagging":22,"../common/object/get":23,"../common/object/getACL":24,"../common/object/getBucketVersions":25,"../common/object/getObjectMeta":26,"../common/object/getObjectTagging":27,"../common/object/getSymlink":28,"../common/object/head":29,"../common/object/putACL":30,"../common/object/putObjectTagging":31,"../common/object/putSymlink":32,"../common/signUtils":34,"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,"copy-to":76,fs:71,"is-type-of":289,"merge-descriptors":200,mime:202,path:205,url:238,utility:290}],5:[function(e,t,n){"use strict";n.version="6.10.0"},{}],6:[function(e,t,n){"use strict";var r,i=e("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=e("../utils/checkBucketName").checkBucketName;n.deleteBucketLifecycle=function(e,t){var n,r;return o.default.async((function(i){for(;;)switch(i.prev=i.next){case 0:return a(e),(n=this._bucketRequestParams("DELETE",e,"lifecycle",t)).successStatuses=[204],i.next=5,o.default.awrap(this.request(n));case 5:return r=i.sent,i.abrupt("return",{res:r.res});case 7:case"end":return i.stop()}}),null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(e,t,n){"use strict";var r,i=e("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=e("../utils/checkBucketName").checkBucketName;n.deleteBucketWebsite=function(e,t){var n,r;return o.default.async((function(i){for(;;)switch(i.prev=i.next){case 0:return a(e),(n=this._bucketRequestParams("DELETE",e,"website",t)).successStatuses=[204],i.next=5,o.default.awrap(this.request(n));case 5:return r=i.sent,i.abrupt("return",{res:r.res});case 7:case"end":return i.stop()}}),null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(e,t,n){"use strict";var r,i=e("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=e("../utils/checkBucketName").checkBucketName,s=e("../utils/isArray").isArray,l=e("../utils/formatObjKey").formatObjKey;n.getBucketLifecycle=function(e,t){var n,r,i;return o.default.async((function(c){for(;;)switch(c.prev=c.next){case 0:return a(e),(n=this._bucketRequestParams("GET",e,"lifecycle",t)).successStatuses=[200],n.xmlResponse=!0,c.next=6,o.default.awrap(this.request(n));case 6:return r=c.sent,(i=r.data.Rule||null)&&(s(i)||(i=[i]),i=i.map((function(e){return e.ID&&(e.id=e.ID,delete e.ID),e.Tag&&!s(e.Tag)&&(e.Tag=[e.Tag]),l(e,"firstLowerCase")}))),c.abrupt("return",{rules:i,res:r.res});case 10:case"end":return c.stop()}}),null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(e,t,n){"use strict";var r,i=e("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=e("../utils/checkBucketName").checkBucketName;n.getBucketVersioning=function(e,t){var n,r,i;return o.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return a(e),(n=this._bucketRequestParams("GET",e,"versioning",t)).xmlResponse=!0,n.successStatuses=[200],s.next=6,o.default.awrap(this.request(n));case 6:return r=s.sent,i=r.data.Status,s.abrupt("return",{status:r.status,versionStatus:i,res:r.res});case 9:case"end":return s.stop()}}),null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(e,t,n){"use strict";var r,i=e("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=e("../utils/checkBucketName").checkBucketName,s=e("../utils/isObject").isObject;n.getBucketWebsite=function(e,t){var n,r,i;return o.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return a(e),(n=this._bucketRequestParams("GET",e,"website",t)).successStatuses=[200],n.xmlResponse=!0,l.next=6,o.default.awrap(this.request(n));case 6:return r=l.sent,i=[],r.data.RoutingRules&&r.data.RoutingRules.RoutingRule&&(i=s(r.data.RoutingRules.RoutingRule)?[r.data.RoutingRules.RoutingRule]:r.data.RoutingRules.RoutingRule),l.abrupt("return",{index:r.data.IndexDocument&&r.data.IndexDocument.Suffix||"",supportSubDir:r.data.IndexDocument&&r.data.IndexDocument.SupportSubDir||"false",type:r.data.IndexDocument&&r.data.IndexDocument.Type,routingRules:i,error:r.data.ErrorDocument&&r.data.ErrorDocument.Key||null,res:r.res});case 10:case"end":return l.stop()}}),null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(e,t,n){"use strict";var r,i=e("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=e("../utils/checkBucketName").checkBucketName,s=e("../utils/isArray").isArray,l=e("../utils/deepCopy").deepCopy,c=e("../utils/isObject").isObject,u=e("../utils/obj2xml").obj2xml,h=e("../utils/checkObjectTag").checkObjectTag,d=e("../utils/getStrBytesCount").getStrBytesCount;function f(e){e.days&&(e.expiration={days:e.days}),e.date&&(e.expiration={createdBeforeDate:e.date})}function p(e,t){var n=e.days,r=e.createdBeforeDate;if(!n&&!r)throw new Error(t+" must includes days or createdBeforeDate");if(n&&!/^[1-9][0-9]*$/.test(n))throw new Error("days must be a positive integer");if(r&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(r))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function m(e){if(e.id&&d(e.id)>255)throw new Error("ID is composed of 255 bytes at most");if(""===e.prefix||void 0===e.prefix)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(e.status))throw new Error("Status must be Enabled or Disabled");if(e.transition){if(!["IA","Archive"].includes(e.transition.storageClass))throw new Error("StorageClass must be IA or Archive");p(e.transition,"Transition")}if(e.expiration)if(e.expiration.expiredObjectDeleteMarker){if(e.expiration.days||e.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}else p(e.expiration,"Expiration");if(e.abortMultipartUpload&&p(e.abortMultipartUpload,"AbortMultipartUpload"),!(e.expiration||e.abortMultipartUpload||e.transition||e.noncurrentVersionTransition))throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(e.tag){if(e.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");!function(e){if(!s(e)&&!c(e))throw new Error("tag must be Object or Array");e=c(e)?[e]:e;var t={};l(e).forEach((function(e){t[e.key]=e.value})),h(t)}(e.tag)}}n.putBucketLifecycle=function(e,t,n){var r,i,l,c,h;return o.default.async((function(d){for(;;)switch(d.prev=d.next){case 0:if(a(e),s(t)){d.next=3;break}throw new Error("rules must be Array");case 3:return r=this._bucketRequestParams("PUT",e,"lifecycle",n),l={LifecycleConfiguration:{Rule:i=[]}},t.forEach((function(e){f(e),m(e),e.id&&(e.ID=e.id,delete e.id),i.push(e)})),c=u(l,{headers:!0,firstUpperCase:!0}),r.content=c,r.mime="xml",r.successStatuses=[200],d.next=13,o.default.awrap(this.request(r));case 13:return h=d.sent,d.abrupt("return",{res:h.res});case 15:case"end":return d.stop()}}),null,this)}},{"../utils/checkBucketName":35,"../utils/checkObjectTag":36,"../utils/deepCopy":39,"../utils/getStrBytesCount":41,"../utils/isArray":42,"../utils/isObject":46,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],12:[function(e,t,n){"use strict";var r,i=e("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=e("../utils/checkBucketName").checkBucketName,s=e("../utils/obj2xml").obj2xml;n.putBucketVersioning=function(e,t){var n,r,i,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return o.default.async((function(c){for(;;)switch(c.prev=c.next){case 0:if(a(e),["Enabled","Suspended"].includes(t)){c.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return n=this._bucketRequestParams("PUT",e,"versioning",l),r={VersioningConfiguration:{Status:t}},n.mime="xml",n.content=s(r,{headers:!0}),c.next=9,o.default.awrap(this.request(n));case 9:return i=c.sent,c.abrupt("return",{res:i.res,status:i.status});case 11:case"end":return c.stop()}}),null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(e,t,n){"use strict";var r,i=e("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=e("../utils/checkBucketName").checkBucketName,s=e("../utils/obj2xml").obj2xml,l=e("../utils/isArray").isArray;n.putBucketWebsite=function(e){var t,n,r,i,c,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=arguments[2];return o.default.async((function(d){for(;;)switch(d.prev=d.next){case 0:if(a(e),t=this._bucketRequestParams("PUT",e,"website",h),n={Suffix:u.index||"index.html"},i={WebsiteConfiguration:r={IndexDocument:n}},u.supportSubDir&&(n.SupportSubDir=u.supportSubDir),u.type&&(n.Type=u.type),u.error&&(r.ErrorDocument={Key:u.error}),void 0===u.routingRules){d.next=12;break}if(l(u.routingRules)){d.next=11;break}throw new Error("RoutingRules must be Array");case 11:r.RoutingRules={RoutingRule:u.routingRules};case 12:return i=s(i),t.content=i,t.mime="xml",t.successStatuses=[200],d.next=18,o.default.awrap(this.request(t));case 18:return c=d.sent,d.abrupt("return",{res:c.res});case 20:case"end":return d.stop()}}),null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(e,t,n){(function(t){"use strict";var r=o(e("babel-runtime/core-js/object/keys")),i=o(e("babel-runtime/core-js/json/stringify"));function o(e){return e&&e.__esModule?e:{default:e}}n.encodeCallback=function(e,n){if(e.headers=e.headers||{},!Object.prototype.hasOwnProperty.call(e.headers,"x-oss-callback")&&n.callback){var o={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};n.callback.host&&(o.callbackHost=n.callback.host),n.callback.contentType&&(o.callbackBodyType=n.callback.contentType);var a=t.from((0,i.default)(o)).toString("base64");if(e.headers["x-oss-callback"]=a,n.callback.customValue){var s={};(0,r.default)(n.callback.customValue).forEach((function(e){s["x:"+e]=n.callback.customValue[e]})),e.headers["x-oss-callback-var"]=t.from((0,i.default)(s)).toString("base64")}}}}).call(this,e("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(e,t,n){"use strict";var r,i=e("babel-runtime/core-js/object/assign"),o=(r=i)&&r.__esModule?r:{default:r},a=e("humanize-ms"),s=e("url"),l=e("../utils/checkBucketName").checkBucketName;t.exports=function(e){if(!e||!e.accessKeyId||!e.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");e.bucket&&l(e.bucket);var t,n,r,i,c,u=(0,o.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},e);if(u.accessKeyId=u.accessKeyId.trim(),u.accessKeySecret=u.accessKeySecret.trim(),u.timeout&&(u.timeout=a(u.timeout)),u.endpoint)u.endpoint=function(e,t){var n=s.parse(e);if(n.protocol||(n=s.parse("http"+(t?"s":"")+"://"+e)),"http:"!==n.protocol&&"https:"!==n.protocol)throw new Error("Endpoint protocol must be http or https.");return n}(u.endpoint,u.secure);else{if(!u.region)throw new Error("require options.endpoint or options.region");u.endpoint=(t=u.region,n=u.internal,r=u.secure,i=r?"https://":"http://",c=n?"-internal.aliyuncs.com":".aliyuncs.com","vpc100-oss-cn-"===t.substr(0,"vpc100-oss-cn-".length)&&(c=".aliyuncs.com"),s.parse(i+t+c))}return u.inited=!0,u}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(e,t,n){"use strict";e("merge-descriptors")(n,e("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(e,t,n){"use strict";var r,i=e("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=e("../utils/checkBucketName").checkBucketName,s=e("querystring"),l=e("js-base64").Base64.encode;function c(e,t){if(!e)throw new Error(t+" is required");if("string"!=typeof e)throw new Error(t+" must be String")}n.processObjectSave=function(e,t,n,r){var i,u,h,d;return o.default.async((function(f){for(;;)switch(f.prev=f.next){case 0:return c(e,"sourceObject"),c(t,"targetObject"),c(n,"process"),t=this._objectName(t),r&&a(r),i=this._objectRequestParams("POST",e,{subres:"x-oss-process"}),u=r?",b_"+l(r):"",t=l(t),h={"x-oss-process":n+"|sys/saveas,o_"+t+u},i.content=s.stringify(h),f.next=12,o.default.awrap(this.request(i));case 12:return d=f.sent,f.abrupt("return",{res:d.res,status:d.res.status});case 14:case"end":return f.stop()}}),null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(e,t,n){"use strict";var r,i=e("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=e("copy-to"),s=e("./callback"),l=e("./utils/deepCopy").deepCopy,c=n;c.listUploads=function(e,t){var n,r,i,s;return o.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return n={},a(t=t||{}).to(n),n.subres="uploads",(r=this._objectRequestParams("GET","",n)).query=e,r.xmlResponse=!0,r.successStatuses=[200],l.next=10,o.default.awrap(this.request(r));case 10:return i=l.sent,s=i.data.Upload||[],Array.isArray(s)||(s=[s]),s=s.map((function(e){return{name:e.Key,uploadId:e.UploadId,initiated:e.Initiated}})),l.abrupt("return",{res:i.res,uploads:s,bucket:i.data.Bucket,nextKeyMarker:i.data.NextKeyMarker,nextUploadIdMarker:i.data.NextUploadIdMarker,isTruncated:"true"===i.data.IsTruncated});case 15:case"end":return l.stop()}}),null,this)},c.listParts=function(e,t,n,r){var i,s,l;return o.default.async((function(c){for(;;)switch(c.prev=c.next){case 0:return i={},a(r=r||{}).to(i),i.subres={uploadId:t},(s=this._objectRequestParams("GET",e,i)).query=n,s.xmlResponse=!0,s.successStatuses=[200],c.next=10,o.default.awrap(this.request(s));case 10:return l=c.sent,c.abrupt("return",{res:l.res,uploadId:l.data.UploadId,bucket:l.data.Bucket,name:l.data.Key,partNumberMarker:l.data.PartNumberMarker,nextPartNumberMarker:l.data.NextPartNumberMarker,maxParts:l.data.MaxParts,isTruncated:l.data.IsTruncated,parts:l.data.Part||[]});case 12:case"end":return c.stop()}}),null,this)},c.abortMultipartUpload=function(e,t,n){var r,i,s;return o.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return this._stop(),r={},a(n=n||{}).to(r),r.subres={uploadId:t},(i=this._objectRequestParams("DELETE",e,r)).successStatuses=[204],l.next=9,o.default.awrap(this.request(i));case 9:return s=l.sent,l.abrupt("return",{res:s.res});case 11:case"end":return l.stop()}}),null,this)},c.initMultipartUpload=function(e,t){var n,r,i;return o.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return n={},a(t=t||{}).to(n),n.headers=n.headers||{},this._convertMetaToHeaders(t.meta,n.headers),n.subres="uploads",(r=this._objectRequestParams("POST",e,n)).mime=t.mime,r.xmlResponse=!0,r.successStatuses=[200],s.next=12,o.default.awrap(this.request(r));case 12:return i=s.sent,s.abrupt("return",{res:i.res,bucket:i.data.Bucket,name:i.data.Key,uploadId:i.data.UploadId});case 14:case"end":return s.stop()}}),null,this)},c.uploadPart=function(e,t,n,r,i,a,s){var l;return o.default.async((function(c){for(;;)switch(c.prev=c.next){case 0:return l={stream:this._createStream(r,i,a),size:a-i},c.next=3,o.default.awrap(this._uploadPart(e,t,n,l,s));case 3:return c.abrupt("return",c.sent);case 4:case"end":return c.stop()}}),null,this)},c.completeMultipartUpload=function(e,t,n,r){var i,a,c,u,h,d,f,p;return o.default.async((function(m){for(;;)switch(m.prev=m.next){case 0:for(i=n.concat().sort((function(e,t){return e.number-t.number})).filter((function(e,t,n){return!t||e.number!==n[t-1].number})),a='<?xml version="1.0" encoding="UTF-8"?>\n<CompleteMultipartUpload>\n',c=0;c<i.length;c++)u=i[c],a+="<Part>\n",a+="<PartNumber>"+u.number+"</PartNumber>\n",a+="<ETag>"+u.etag+"</ETag>\n",a+="</Part>\n";return a+="</CompleteMultipartUpload>",h={},(h=l(r=r||{})).headers&&delete h.headers["x-oss-server-side-encryption"],h.subres={uploadId:t},d=this._objectRequestParams("POST",e,h),s.encodeCallback(d,h),d.mime="xml",d.content=a,d.headers&&d.headers["x-oss-callback"]||(d.xmlResponse=!0),d.successStatuses=[200],m.next=17,o.default.awrap(this.request(d));case 17:return f=m.sent,p={res:f.res,bucket:d.bucket,name:e,etag:f.res.headers.etag},d.headers&&d.headers["x-oss-callback"]&&(p.data=JSON.parse(f.data.toString())),m.abrupt("return",p);case 21:case"end":return m.stop()}}),null,this)},c._uploadPart=function(e,t,n,r,i){var s,l,c;return o.default.async((function(u){for(;;)switch(u.prev=u.next){case 0:return s={},a(i=i||{}).to(s),s.headers={"Content-Length":r.size},s.subres={partNumber:n,uploadId:t},(l=this._objectRequestParams("PUT",e,s)).mime=s.mime,l.stream=r.stream,l.successStatuses=[200],u.next=11,o.default.awrap(this.request(l));case 11:if((c=u.sent).res.headers.etag){u.next=14;break}throw new Error("Please set the etag of expose-headers in OSS \n https://help.aliyun.com/document_detail/32069.html");case 14:return r.stream=null,l.stream=null,u.abrupt("return",{name:e,etag:c.res.headers.etag,res:c.res});case 17:case"end":return u.stop()}}),null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(e,t,n){"use strict";var r=a(e("babel-runtime/regenerator")),i=a(e("babel-runtime/core-js/object/keys")),o=a(e("babel-runtime/helpers/typeof"));function a(e){return e&&e.__esModule?e:{default:e}}var s=e("../utils/checkBucketName").checkBucketName,l=n;l.copy=function(e,t,n,a){var s,l,c;return r.default.async((function(u){for(;;)switch(u.prev=u.next){case 0:return"object"===(void 0===n?"undefined":(0,o.default)(n))&&(a=n),(a=a||{}).headers=a.headers||{},(0,i.default)(a.headers).forEach((function(e){a.headers["x-oss-copy-source-"+e.toLowerCase()]=a.headers[e]})),a.meta&&(a.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(a.meta,a.headers),t=this._getSourceName(t,n),a.versionId&&(t=t+"?versionId="+a.versionId),a.headers["x-oss-copy-source"]=t,(s=this._objectRequestParams("PUT",e,a)).xmlResponse=!0,s.successStatuses=[200,304],u.next=14,r.default.awrap(this.request(s));case 14:return l=u.sent,(c=l.data)&&(c={etag:c.ETag,lastModified:c.LastModified}),u.abrupt("return",{data:c,res:l.res});case 18:case"end":return u.stop()}}),null,this)},l._getSourceName=function(e,t){return"string"==typeof t?e=this._objectName(e):"/"!==e[0]?t=this.options.bucket:(t=e.replace(/\/(.+?)(\/.*)/,"$1"),e=e.replace(/(\/.+?\/)(.*)/,"$2")),s(t),e="/"+t+"/"+(e=encodeURI(e))}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}n.delete=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return o.subres=(0,i.default)({},o.subres),o.versionId&&(o.subres.versionId=o.versionId),(t=this._objectRequestParams("DELETE",e,o)).successStatuses=[204],a.next=6,r.default.awrap(this.request(t));case 6:return n=a.sent,a.abrupt("return",{res:n.res});case 8:case"end":return a.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}var a=e("utility"),s=e("../utils/obj2xml").obj2xml;n.deleteMulti=function(e){var t,n,o,l,c,u,h,d,f,p,m,g,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(y){for(;;)switch(y.prev=y.next){case 0:if(t=[],e&&e.length){y.next=3;break}throw new Error("names is required");case 3:for(n=0;n<e.length;n++)o={},"string"==typeof e[n]?o.Key=a.escape(this._objectName(e[n])):(l=e[n],c=l.key,u=l.versionId,o.Key=a.escape(this._objectName(c)),o.VersionId=u),t.push(o);return h={Delete:{Quiet:!!v.quiet,Object:t}},d=s(h,{headers:!0}),v.subres=(0,i.default)({delete:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),(f=this._objectRequestParams("POST","",v)).mime="xml",f.content=d,f.xmlResponse=!0,f.successStatuses=[200],y.next=15,r.default.awrap(this.request(f));case 15:return p=y.sent,m=p.data,(g=m&&m.Deleted||null)&&(Array.isArray(g)||(g=[g])),y.abrupt("return",{res:p.res,deleted:g||[]});case 20:case"end":return y.stop()}}),null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}n.deleteObjectTagging=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return o.subres=(0,i.default)({tagging:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),e=this._objectName(e),(t=this._objectRequestParams("DELETE",e,o)).successStatuses=[204],a.next=7,r.default.awrap(this.request(t));case 7:return n=a.sent,a.abrupt("return",{status:n.status,res:n.res});case 9:case"end":return a.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}var a=e("fs"),s=e("is-type-of");n.get=function(e,t){var n,o,l,c,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.default.async((function(h){for(;;)switch(h.prev=h.next){case 0:return n=null,o=!1,s.writableStream(t)?n=t:s.string(t)?(n=a.createWriteStream(t),o=!0):u=t,(u=u||{}).subres=(0,i.default)({},u.subres),u.versionId&&(u.subres.versionId=u.versionId),u.process&&(u.subres["x-oss-process"]=u.process),l=void 0,h.prev=8,(c=this._objectRequestParams("GET",e,u)).writeStream=n,c.successStatuses=[200,206,304],h.next=14,r.default.awrap(this.request(c));case 14:l=h.sent,o&&n.destroy(),h.next=25;break;case 18:if(h.prev=18,h.t0=h.catch(8),!o){h.next=24;break}return n.destroy(),h.next=24,r.default.awrap(this._deleteFileSafe(t));case 24:throw h.t0;case 25:return h.abrupt("return",{res:l.res,content:l.data});case 26:case"end":return h.stop()}}),null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}n.getACL=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return o.subres=(0,i.default)({acl:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),e=this._objectName(e),(t=this._objectRequestParams("GET",e,o)).successStatuses=[200],t.xmlResponse=!0,a.next=8,r.default.awrap(this.request(t));case 8:return n=a.sent,a.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 a.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(e,t,n){"use strict";var r=a(e("babel-runtime/core-js/object/keys")),i=a(e("babel-runtime/regenerator")),o=a(e("babel-runtime/core-js/object/assign"));function a(e){return e&&e.__esModule?e:{default:e}}var s=n,l=e("../utils/isObject").isObject,c=e("../utils/isArray").isArray;function u(){var e,t,n,r,a,s,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i.default.async((function(h){for(;;)switch(h.prev=h.next){case 0:if(!l.versionIdMarker||void 0!==l.keyMarker){h.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return u.subres=(0,o.default)({versions:""},u.subres),u.versionId&&(u.subres.versionId=u.versionId),(e=this._objectRequestParams("GET","",u)).xmlResponse=!0,e.successStatuses=[200],e.query=d(l),h.next=10,i.default.awrap(this.request(e));case 10:return t=h.sent,n=t.data.Version||[],r=t.data.DeleteMarker||[],a=this,n&&(Array.isArray(n)||(n=[n]),n=n.map((function(e){return{name:e.Key,url:a._objectUrl(e.Key),lastModified:e.LastModified,isLatest:"true"===e.IsLatest,versionId:e.VersionId,etag:e.ETag,type:e.Type,size:Number(e.Size),storageClass:e.StorageClass,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName}}}))),r&&(c(r)||(r=[r]),r=r.map((function(e){return{name:e.Key,lastModified:e.LastModified,versionId:e.VersionId,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName}}}))),(s=t.data.CommonPrefixes||null)&&(c(s)||(s=[s]),s=s.map((function(e){return e.Prefix}))),h.abrupt("return",{res:t.res,objects:n,deleteMarker:r,prefixes:s,nextMarker:t.data.NextMarker||null,NextVersionIdMarker:t.data.NextVersionIdMarker||null,isTruncated:"true"===t.data.IsTruncated});case 19:case"end":return h.stop()}}),null,this)}function h(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return l(e)&&(0,r.default)(e).forEach((function(n){t[h(n)]=e[n]})),t}s.getBucketVersions=u,s.listObjectVersions=u},{"../utils/isArray":42,"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],26:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}n.getObjectMeta=function(e,t){var n,o;return r.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return t=t||{},e=this._objectName(e),t.subres=(0,i.default)({objectMeta:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),(n=this._objectRequestParams("HEAD",e,t)).successStatuses=[200],a.next=8,r.default.awrap(this.request(n));case 8:return o=a.sent,a.abrupt("return",{status:o.status,res:o.res});case 10:case"end":return a.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}var a=n,s=e("../utils/isObject").isObject;a.getObjectTagging=function(e){var t,n,o,a,l,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(u){for(;;)switch(u.prev=u.next){case 0:return c.subres=(0,i.default)({tagging:""},c.subres),c.versionId&&(c.subres.versionId=c.versionId),e=this._objectName(e),(t=this._objectRequestParams("GET",e,c)).successStatuses=[200],u.next=7,r.default.awrap(this.request(t));case 7:return n=u.sent,u.next=10,r.default.awrap(this.parseXML(n.data));case 10:return o=u.sent,a=(a=o.TagSet.Tag)&&s(a)?[a]:a||[],l={},a.forEach((function(e){l[e.Key]=e.Value})),u.abrupt("return",{status:n.status,res:n.res,tag:l});case 16:case"end":return u.stop()}}),null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}n.getSymlink=function(e){var t,n,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return a.subres=(0,i.default)({symlink:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),e=this._objectName(e),(t=this._objectRequestParams("GET",e,a)).successStatuses=[200],s.next=7,r.default.awrap(this.request(t));case 7:return n=s.sent,o=n.res.headers["x-oss-symlink-target"],s.abrupt("return",{targetName:decodeURIComponent(o),res:n.res});case 10:case"end":return s.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(e,t,n){"use strict";var r=a(e("babel-runtime/regenerator")),i=a(e("babel-runtime/core-js/object/keys")),o=a(e("babel-runtime/core-js/object/assign"));function a(e){return e&&e.__esModule?e:{default:e}}n.head=function(e){var t,n,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return s.subres=(0,o.default)({},s.subres),s.versionId&&(s.subres.versionId=s.versionId),(t=this._objectRequestParams("HEAD",e,s)).successStatuses=[200,304],l.next=6,r.default.awrap(this.request(t));case 6:return n=l.sent,a={meta:null,res:n.res,status:n.status},200===n.status&&(0,i.default)(n.headers).forEach((function(e){0===e.indexOf("x-oss-meta-")&&(a.meta||(a.meta={}),a.meta[e.substring(11)]=n.headers[e])})),l.abrupt("return",a);case 10:case"end":return l.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}n.putACL=function(e,t,n){var o,a;return r.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return(n=n||{}).subres=(0,i.default)({acl:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),n.headers=n.headers||{},n.headers["x-oss-object-acl"]=t,e=this._objectName(e),(o=this._objectRequestParams("PUT",e,n)).successStatuses=[200],s.next=10,r.default.awrap(this.request(o));case 10:return a=s.sent,s.abrupt("return",{res:a.res});case 12:case"end":return s.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(e,t,n){"use strict";var r=a(e("babel-runtime/regenerator")),i=a(e("babel-runtime/core-js/object/keys")),o=a(e("babel-runtime/core-js/object/assign"));function a(e){return e&&e.__esModule?e:{default:e}}var s=e("../utils/obj2xml").obj2xml,l=e("../utils/checkObjectTag").checkObjectTag;n.putObjectTagging=function(e,t){var n,a,c,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.default.async((function(h){for(;;)switch(h.prev=h.next){case 0:return l(t),u.subres=(0,o.default)({tagging:""},u.subres),u.versionId&&(u.subres.versionId=u.versionId),e=this._objectName(e),(n=this._objectRequestParams("PUT",e,u)).successStatuses=[200],t=(0,i.default)(t).map((function(e){return{Key:e,Value:t[e]}})),a={Tagging:{TagSet:{Tag:t}}},n.mime="xml",n.content=s(a),h.next=12,r.default.awrap(this.request(n));case 12:return c=h.sent,h.abrupt("return",{res:c.res,status:c.status});case 14:case"end":return h.stop()}}),null,this)}},{"../utils/checkObjectTag":36,"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],32:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}n.putSymlink=function(e,t,n){var o,a;return r.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return(n=n||{}).headers=n.headers||{},t=this._escape(this._objectName(t)),this._convertMetaToHeaders(n.meta,n.headers),n.headers["x-oss-symlink-target"]=t,n.subres=(0,i.default)({symlink:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),n.storageClass&&(n.headers["x-oss-storage-class"]=n.storageClass),e=this._objectName(e),(o=this._objectRequestParams("PUT",e,n)).successStatuses=[200],s.next=13,r.default.awrap(this.request(o));case 13:return a=s.sent,s.abrupt("return",{res:a.res});case 15:case"end":return s.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/promise"));function o(e){return e&&e.__esModule?e:{default:e}}var a=n;a._parallelNode=function(e,t,n,o){var a,s,l,c,u,h,d,f;return r.default.async((function(p){for(;;)switch(p.prev=p.next){case 0:a=this,s=[],l=[],c=e.length/t,u=e.length%t,h=0===u?c:(e.length-u)/t+1,d=1,f=0;case 8:if(!(f<e.length)){p.next=26;break}if(!a.isCancel()){p.next=11;break}return p.abrupt("break",26);case 11:if(o?l.push(n(a,e[f],o)):l.push(n(a,e[f])),l.length!==t&&(d!==h||f!==e.length-1)){p.next=23;break}return p.prev=13,d+=1,p.next=17,r.default.awrap(i.default.all(l));case 17:p.next=22;break;case 19:p.prev=19,p.t0=p.catch(13),s.push(p.t0);case 22:l=[];case 23:f++,p.next=8;break;case 26:return p.abrupt("return",s);case 27:case"end":return p.stop()}}),null,this,[[13,19]])},a._parallel=function(e,t,n){var r=this;return new i.default((function(i){var o=[];if(t<=0||!e)i(o);else{var a,s,l,c=(s=-1,l=(a=e).length,function(){return++s<l&&!r.isCancel()?{value:a[s],key:s}:null}),u=!1,h=0,d=!1;g()}function f(e){return function(){if(null===e)throw new Error("Callback was already called.");var t=e;e=null;for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];t.apply(this,r)}}function p(e,t){h-=1,e?(u=!0,o.push(e),i(o)):t==={}||u&&h<=0?(u=!0,i(o)):d||(r.isCancel()?i(o):g())}function m(e,t){n(e).then((function(e){t(null,e)})).catch((function(e){t(e)}))}function g(){for(d=!0;h<t&&!u&&!r.isCancel();){var e=c();if(null===e||o.length>0)return u=!0,void(h<=0&&i(o));h+=1,m(e.value,f(p))}d=!1}}))},a.cancel=function(e){this.options.cancelFlag=!0,e&&this.abortMultipartUpload(e.name,e.uploadId,e.options)},a.isCancel=function(){return this.options.cancelFlag},a.resetCancelFlag=function(){this.options.cancelFlag=!1},a._stop=function(){this.options.cancelFlag=!0},a._makeCancelEvent=function(){return{status:0,name:"cancel"}}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(e,t,n){(function(t){"use strict";var r=o(e("babel-runtime/core-js/json/stringify")),i=o(e("babel-runtime/core-js/object/keys"));function o(e){return e&&e.__esModule?e:{default:e}}var a=e("./../../shims/crypto/crypto.js"),s=e("is-type-of");n.buildCanonicalizedResource=function(e,t){var n=""+e,r="?";return s.string(t)&&""!==t.trim()?n+=r+t:s.array(t)?(t.sort(),n+=r+t.join("&")):t&&(0,i.default)(t).sort((function(e,t){return e[0]>t[0]?1:e[0]<t[0]?-1:0})).forEach((function(e){n+=r+e,t[e]&&(n+="="+t[e]),r="&"})),n},n.buildCanonicalString=function(e,t,n,r){var o=(n=n||{}).headers||{},a=[],s={},l=[e.toUpperCase(),o["Content-Md5"]||"",o["Content-Type"]||o["Content-Type".toLowerCase()],r||o["x-oss-date"]];return(0,i.default)(o).forEach((function(e){var t=e.toLowerCase();0===t.indexOf("x-oss-")&&(s[t]=String(o[e]).trim())})),(0,i.default)(s).sort().forEach((function(e){a.push(e+":"+s[e])})),(l=l.concat(a)).push(this.buildCanonicalizedResource(t,n.parameters)),l.join("\n")},n.computeSignature=function(e,n){return a.createHmac("sha1",e).update(t.from(n,"utf8")).digest("base64")},n.authorization=function(e,t,n){return"OSS "+e+":"+this.computeSignature(t,n)},n._signatureForURL=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments[2],a=arguments[3],s={},l=n.subResource,c=void 0===l?{}:l;if(n.process){var u="x-oss-process";c[u]=n.process}if(n.trafficLimit){var h="x-oss-traffic-limit";c[h]=n.trafficLimit}if(n.response&&(0,i.default)(n.response).forEach((function(e){var t="response-"+e.toLowerCase();c[t]=n.response[e]})),(0,i.default)(n).forEach((function(e){var t=e.toLowerCase(),r=n[e];0===t.indexOf("x-oss-")?s[t]=r:(0===t.indexOf("content-md5")||0===t.indexOf("content-type"))&&(s[e]=r)})),Object.prototype.hasOwnProperty.call(n,"security-token")&&(c["security-token"]=n["security-token"]),Object.prototype.hasOwnProperty.call(n,"callback")){var d={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};if(n.callback.host&&(d.callbackHost=n.callback.host),n.callback.contentType&&(d.callbackBodyType=n.callback.contentType),c.callback=t.from((0,r.default)(d)).toString("base64"),n.callback.customValue){var f={};(0,i.default)(n.callback.customValue).forEach((function(e){f["x:"+e]=n.callback.customValue[e]})),c["callback-var"]=t.from((0,r.default)(f)).toString("base64")}}var p=this.buildCanonicalString(n.method,o,{headers:s,parameters:c},a.toString());return{Signature:this.computeSignature(e,p),subResource:c}}}).call(this,e("buffer").Buffer)},{"./../../shims/crypto/crypto.js":284,"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73,"is-type-of":289}],35:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkBucketName=void 0,n.checkBucketName=function(e,t){if(!(t?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/).test(e))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(e,t,n){"use strict";var r,i=e("babel-runtime/core-js/object/entries"),o=(r=i)&&r.__esModule?r:{default:r};Object.defineProperty(n,"__esModule",{value:!0}),n.checkObjectTag=void 0;var a=e("./checkValid").checkValid,s=e("./isObject").isObject,l=[{validator:function(e){if("string"!=typeof e)throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],c={key:[].concat(l,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(l,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};n.checkObjectTag=function(e){if(!s(e))throw new Error("tag must be Object");var t=(0,o.default)(e);if(t.length>10)throw new Error("maximum of 10 tags for a object");var n=["key","value"];t.forEach((function(e){e.forEach((function(e,t){a(e,c[n[t]])}))}))}},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkValid=void 0,n.checkValid=function(e,t){t.forEach((function(t){if(t.validator)t.validator(e);else if(t.pattern&&!t.pattern.test(e))throw new Error(t.msg)}))}},{}],38:[function(e,t,n){(function(t){"use strict";var r,i=e("babel-runtime/core-js/object/assign"),o=(r=i)&&r.__esModule?r:{default:r};Object.defineProperty(n,"__esModule",{value:!0}),n.createRequest=void 0;var a=e("./../../../shims/crypto/crypto.js"),s=e("debug")("ali-oss"),l=e("mime"),c=e("dateformat"),u=e("copy-to"),h=e("path");function d(e,t){return e[t]||e[t.toLowerCase()]}n.createRequest=function(e){var n=new Date;this.options.amendTimeSkewed&&(n=+new Date+this.options.amendTimeSkewed);var r={"x-oss-date":c(n,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(r["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,o.default)(r,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(r["x-oss-security-token"]=this.options.stsToken),u(e.headers).to(r),d(r,"Content-Type")||(e.mime&&e.mime.indexOf("/")>0?r["Content-Type"]=e.mime:r["Content-Type"]=l.getType(e.mime||h.extname(e.object||""))),d(r,"Content-Type")||function(e,t){delete e[t],delete e[t.toLowerCase()]}(r,"Content-Type"),e.content&&(r["Content-Md5"]=a.createHash("md5").update(t.from(e.content,"utf8")).digest("base64"),r["Content-Length"]||(r["Content-Length"]=e.content.length));var i=this._getResource(e);r.authorization=this.authorization(e.method,i,e.subres,r);var f=this._getReqUrl(e);s("request %s %s, with headers %j, !!stream: %s",e.method,f,r,!!e.stream);var p=e.timeout||this.options.timeout,m={method:e.method,content:e.content,stream:e.stream,headers:r,timeout:p,writeStream:e.writeStream,customResponse:e.customResponse,ctx:e.ctx||this.ctx};return this.agent&&(m.agent=this.agent),this.httpsAgent&&(m.httpsAgent=this.httpsAgent),{url:f,params:m}}}).call(this,e("buffer").Buffer)},{"./../../../shims/crypto/crypto.js":284,"babel-runtime/core-js/object/assign":54,buffer:73,"copy-to":76,dateformat:190,debug:288,mime:202,path:205}],39:[function(e,t,n){"use strict";var r=o(e("babel-runtime/core-js/object/keys")),i=o(e("babel-runtime/helpers/typeof"));function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.deepCopy=void 0,n.deepCopy=function(e){if(null===e||"object"!==(void 0===e?"undefined":(0,i.default)(e)))return e;var t=Array.isArray(e)?[]:{};return(0,r.default)(e).forEach((function(r){t[r]=n.deepCopy(e[r])})),t}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(e,t,n){"use strict";var r=o(e("babel-runtime/core-js/object/keys")),i=o(e("babel-runtime/helpers/typeof"));function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.formatObjKey=void 0,n.formatObjKey=function e(t,n){if(null===t||"object"!==(void 0===t?"undefined":(0,i.default)(t)))return t;var o=void 0;if(Array.isArray(t)){o=[];for(var a=0;a<t.length;a++)o.push(e(t[a],n))}else o={},(0,r.default)(t).forEach((function(r){o[function(e,t){return"firstUpperCase"===t?e=e.replace(/^./,(function(e){return e.toUpperCase()})):"firstLowerCase"===t&&(e=e.replace(/^./,(function(e){return e.toLowerCase()}))),e}(r,n)]=e(t[r],n)}));return o}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getStrBytesCount=void 0,n.getStrBytesCount=function(e){for(var t=0,n=0;n<e.length;n++){var r=e.charAt(n);/^[\u00-\uff]$/.test(r)?t+=1:t+=2}return t}},{}],42:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isArray=void 0,n.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],43:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isBlob=void 0,n.isBlob=function(e){return"undefined"!=typeof Blob&&e instanceof Blob}},{}],44:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isFile=void 0,n.isFile=function(e){return"undefined"!=typeof File&&e instanceof File}},{}],45:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isIP=void 0,n.isIP=function(e){return/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/.test(e)||/^\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*$/.test(e)}},{}],46:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isObject=void 0,n.isObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)}},{}],47:[function(e,t,n){"use strict";var r,i=e("babel-runtime/core-js/object/keys"),o=(r=i)&&r.__esModule?r:{default:r};Object.defineProperty(n,"__esModule",{value:!0}),n.obj2xml=void 0;var a=e("./formatObjKey");function s(e){return Object.prototype.toString.call(e).replace(/(.*? |])/g,"").toLowerCase()}n.obj2xml=function e(t,n){var r="";return n&&n.headers&&(r='<?xml version="1.0" encoding="UTF-8"?>\n'),n&&n.firstUpperCase&&(t=a.formatObjKey(t,"firstUpperCase")),"object"===s(t)?(0,o.default)(t).forEach((function(n){"string"===s(t[n])||"number"===s(t[n])?r+="<"+n+">"+t[n]+"</"+n+">":"object"===s(t[n])?r+="<"+n+">"+e(t[n])+"</"+n+">":"array"===s(t[n])?r+=t[n].map((function(t){return"<"+n+">"+e(t)+"</"+n+">"})).join(""):r+="<"+n+">"+t[n].toString()+"</"+n+">"})):r+=t.toString(),r}},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(e,t,n){function r(){}t.exports=r,t.exports.HttpsAgent=r},{}],49:[function(e,t,n){t.exports=e("./register")().Promise},{"./register":51}],50:[function(e,t,n){"use strict";var r=null;t.exports=function(e,t){return function(n,i){n=n||null;var o=!1!==(i=i||{}).global;if(null===r&&o&&(r=e["@@any-promise/REGISTRATION"]||null),null!==r&&null!==n&&r.implementation!==n)throw new Error('any-promise already defined as "'+r.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return null===r&&(r=null!==n&&void 0!==i.Promise?{Promise:i.Promise,implementation:n}:t(n),o&&(e["@@any-promise/REGISTRATION"]=r)),r}}},{}],51:[function(e,t,n){"use strict";t.exports=e("./loader")(window,(function(){if(void 0===window.Promise)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"}}))},{"./loader":50}],52:[function(e,t,n){t.exports={default:e("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(e,t,n){t.exports={default:e("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(e,t,n){t.exports={default:e("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(e,t,n){t.exports={default:e("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(e,t,n){t.exports={default:e("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(e,t,n){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(e,t,n){t.exports={default:e("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(e,t,n){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(e,t,n){"use strict";n.__esModule=!0;var r=a(e("../core-js/symbol/iterator")),i=a(e("../core-js/symbol")),o="function"==typeof i.default&&"symbol"==typeof r.default?function(e){return typeof e}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":typeof e};function a(e){return e&&e.__esModule?e:{default:e}}n.default="function"==typeof i.default&&"symbol"===o(r.default)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":void 0===e?"undefined":o(e)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(e,t,n){t.exports=e("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(e,t,n){"use strict";n.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){var t,n,r=c(e),a=r[0],s=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),u=0,h=s>0?a-4:a;for(n=0;n<h;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[u++]=255&t),1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(u(e,a,a+16383>s?s:a+16383));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s<l;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],70:[function(e,t,n){var r,i;r=this,i=function(){var e=!0;function t(t){function n(e){var n=t.match(e);return n&&n.length>1&&n[1]||""}function r(e){var n=t.match(e);return n&&n.length>1&&n[2]||""}var i,a=n(/(ipod|iphone|ipad)/i).toLowerCase(),s=!/like android/i.test(t)&&/android/i.test(t),l=/nexus\s*[0-6]\s*/i.test(t),c=!l&&/nexus\s*[0-9]+/i.test(t),u=/CrOS/.test(t),h=/silk/i.test(t),d=/sailfish/i.test(t),f=/tizen/i.test(t),p=/(web|hpw)(o|0)s/i.test(t),m=/windows phone/i.test(t),g=(/SamsungBrowser/i.test(t),!m&&/windows/i.test(t)),v=!a&&!h&&/macintosh/i.test(t),y=!s&&!d&&!f&&!p&&/linux/i.test(t),b=r(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),x=n(/version\/(\d+(\.\d+)?)/i),w=/tablet/i.test(t)&&!/tablet pc/i.test(t),E=!w&&/[^-]mobi/i.test(t),S=/xbox/i.test(t);/opera/i.test(t)?i={name:"Opera",opera:e,version:x||n(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(t)?i={name:"Opera",opera:e,version:n(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||x}:/SamsungBrowser/i.test(t)?i={name:"Samsung Internet for Android",samsungBrowser:e,version:x||n(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(t)?i={name:"NAVER Whale browser",whale:e,version:n(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(t)?i={name:"MZ Browser",mzbrowser:e,version:n(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(t)?i={name:"Opera Coast",coast:e,version:x||n(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(t)?i={name:"Focus",focus:e,version:n(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(t)?i={name:"Yandex Browser",yandexbrowser:e,version:x||n(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(t)?i={name:"UC Browser",ucbrowser:e,version:n(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(t)?i={name:"Maxthon",maxthon:e,version:n(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(t)?i={name:"Epiphany",epiphany:e,version:n(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(t)?i={name:"Puffin",puffin:e,version:n(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(t)?i={name:"Sleipnir",sleipnir:e,version:n(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(t)?i={name:"K-Meleon",kMeleon:e,version:n(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:m?(i={name:"Windows Phone",osname:"Windows Phone",windowsphone:e},b?(i.msedge=e,i.version=b):(i.msie=e,i.version=n(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?i={name:"Internet Explorer",msie:e,version:n(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:u?i={name:"Chrome",osname:"Chrome OS",chromeos:e,chromeBook:e,chrome:e,version:n(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(t)?i={name:"Microsoft Edge",msedge:e,version:b}:/vivaldi/i.test(t)?i={name:"Vivaldi",vivaldi:e,version:n(/vivaldi\/(\d+(\.\d+)?)/i)||x}:d?i={name:"Sailfish",osname:"Sailfish OS",sailfish:e,version:n(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?i={name:"SeaMonkey",seamonkey:e,version:n(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(t)?(i={name:"Firefox",firefox:e,version:n(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(i.firefoxos=e,i.osname="Firefox OS")):h?i={name:"Amazon Silk",silk:e,version:n(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(t)?i={name:"PhantomJS",phantom:e,version:n(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(t)?i={name:"SlimerJS",slimer:e,version:n(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(t)||/rim\stablet/i.test(t)?i={name:"BlackBerry",osname:"BlackBerry OS",blackberry:e,version:x||n(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:p?(i={name:"WebOS",osname:"WebOS",webos:e,version:x||n(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(t)&&(i.touchpad=e)):/bada/i.test(t)?i={name:"Bada",osname:"Bada",bada:e,version:n(/dolfin\/(\d+(\.\d+)?)/i)}:f?i={name:"Tizen",osname:"Tizen",tizen:e,version:n(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||x}:/qupzilla/i.test(t)?i={name:"QupZilla",qupzilla:e,version:n(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||x}:/chromium/i.test(t)?i={name:"Chromium",chromium:e,version:n(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||x}:/chrome|crios|crmo/i.test(t)?i={name:"Chrome",chrome:e,version:n(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:s?i={name:"Android",version:x}:/safari|applewebkit/i.test(t)?(i={name:"Safari",safari:e},x&&(i.version=x)):a?(i={name:"iphone"==a?"iPhone":"ipad"==a?"iPad":"iPod"},x&&(i.version=x)):i=/googlebot/i.test(t)?{name:"Googlebot",googlebot:e,version:n(/googlebot\/(\d+(\.\d+))/i)||x}:{name:n(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!i.msedge&&/(apple)?webkit/i.test(t)?(/(apple)?webkit\/537\.36/i.test(t)?(i.name=i.name||"Blink",i.blink=e):(i.name=i.name||"Webkit",i.webkit=e),!i.version&&x&&(i.version=x)):!i.opera&&/gecko\//i.test(t)&&(i.name=i.name||"Gecko",i.gecko=e,i.version=i.version||n(/gecko\/(\d+(\.\d+)?)/i)),i.windowsphone||!s&&!i.silk?!i.windowsphone&&a?(i[a]=e,i.ios=e,i.osname="iOS"):v?(i.mac=e,i.osname="macOS"):S?(i.xbox=e,i.osname="Xbox"):g?(i.windows=e,i.osname="Windows"):y&&(i.linux=e,i.osname="Linux"):(i.android=e,i.osname="Android");var C="";i.windows?C=function(e){switch(e){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}}(n(/Windows ((NT|XP)( \d\d?.\d)?)/i)):i.windowsphone?C=n(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):i.mac?C=(C=n(/Mac OS X (\d+([_\.\s]\d+)*)/i)).replace(/[_\s]/g,"."):a?C=(C=n(/os (\d+([_\s]\d+)*) like mac os x/i)).replace(/[_\s]/g,"."):s?C=n(/android[ \/-](\d+(\.\d+)*)/i):i.webos?C=n(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):i.blackberry?C=n(/rim\stablet\sos\s(\d+(\.\d+)*)/i):i.bada?C=n(/bada\/(\d+(\.\d+)*)/i):i.tizen&&(C=n(/tizen[\/\s](\d+(\.\d+)*)/i)),C&&(i.osversion=C);var k=!i.windows&&C.split(".")[0];return w||c||"ipad"==a||s&&(3==k||k>=4&&!E)||i.silk?i.tablet=e:(E||"iphone"==a||"ipod"==a||s||l||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.whale&&1===o([i.version,"1.0"])||i.mzbrowser&&1===o([i.version,"6.0"])||i.focus&&1===o([i.version,"1.0"])||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}var n=t("undefined"!=typeof navigator&&navigator.userAgent||"");function r(e){return e.split(".").length}function i(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n++)r.push(t(e[n]));return r}function o(e){for(var t=Math.max(r(e[0]),r(e[1])),n=i(e,(function(e){var n=t-r(e);return i((e+=new Array(n+1).join(".0")).split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));--t>=0;){if(n[0][t]>n[1][t])return 1;if(n[0][t]!==n[1][t])return-1;if(0===t)return 0}}function a(e,r,i){var a=n;"string"==typeof r&&(i=r,r=void 0),void 0===r&&(r=!1),i&&(a=t(i));var s=""+a.version;for(var l in e)if(e.hasOwnProperty(l)&&a[l]){if("string"!=typeof e[l])throw new Error("Browser version in the minVersion map should be a string: "+l+": "+String(e));return o([s,e[l]])<0}return r}return n.test=function(e){for(var t=0;t<e.length;++t){var r=e[t];if("string"==typeof r&&r in n)return!0}return!1},n.isUnsupportedBrowser=a,n.compareVersions=o,n.check=function(e,t,n){return!a(e,t,n)},n._detect=t,n.detect=t,n},void 0!==t&&t.exports?t.exports=i():"function"==typeof define&&define.amd?define("bowser",i):r.bowser=i()},{}],71:[function(e,t,n){},{}],72:[function(e,t,n){var r=e("buffer").Buffer,i=r.isEncoding||function(e){switch(e&&e.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}},o=n.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!i(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=l;break;default:return void(this.write=a)}this.charBuffer=new r(6),this.charReceived=0,this.charLength=0};function a(e){return e.toString(this.encoding)}function s(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function l(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}o.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(e=e.slice(n,e.length),!((r=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r,i=e.length;if(this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),i=(t+=e.toString(this.encoding,0,i)).length-1,(r=t.charCodeAt(i))>=55296&&r<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},o.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},o.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}},{buffer:73}],73:[function(e,t,n){(function(t,r){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
"use strict";var i=e("base64-js"),o=e("ieee754"),a=e("isarray");function s(){return r.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return r.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=r.prototype:(null===e&&(e=new r(t)),e.length=t),e}function r(e,t,n){if(!(r.TYPED_ARRAY_SUPPORT||this instanceof r))return new r(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return h(this,e)}return c(this,e,t,n)}function c(e,t,n,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,i){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,n):new Uint8Array(t,n,i),r.TYPED_ARRAY_SUPPORT?(e=t).__proto__=r.prototype:e=d(e,t),e}(e,t,n,i):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!r.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|p(t,n),o=(e=l(e,i)).write(t,n);return o!==i&&(e=e.slice(0,o)),e}(e,t,n):function(e,t){if(r.isBuffer(t)){var n=0|f(t.length);return 0===(e=l(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(i=t.length)!=i?l(e,0):d(e,t);if("Buffer"===t.type&&a(t.data))return d(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function h(e,t){if(u(t),e=l(e,t<0?0:0|f(t)),!r.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|f(t.length);e=l(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function f(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(r.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(i)return F(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=r.from(t,i)),r.isBuffer(t))return 0===t.length?-1:y(e,t,n,i,o);if("number"==typeof t)return t&=255,r.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,i,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=n;o<s;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*a}else-1!==u&&(o-=o-u),u=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var h=!0,d=0;d<l;d++)if(c(e,o+d)!==c(t,d)){h=!1;break}if(h)return o}return-1}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function x(e,t,n,r){return H(F(t,e.length-n),e,n,r)}function w(e,t,n,r){return H(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return w(e,t,n,r)}function S(e,t,n,r){return H(U(t),e,n,r)}function C(e,t,n,r){return H(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function k(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function _(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,l,c=e[i],u=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function A(e,t,n){var r,i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var o="",a=t;a<n;++a)o+=(r=e[a])<16?"0"+r.toString(16):r.toString(16);return o}function L(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function D(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,i,o,a){if(!r.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<a)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function N(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(e,t,n,r,i){return i||N(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,i){return i||N(e,0,n,8),o.write(e,t,n,r,52,8),n+8}n.Buffer=r,n.SlowBuffer=function(e){return+e!=e&&(e=0),r.alloc(+e)},n.INSPECT_MAX_BYTES=50,r.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),n.kMaxLength=s(),r.poolSize=8192,r._augment=function(e){return e.__proto__=r.prototype,e},r.from=function(e,t,n){return c(null,e,t,n)},r.TYPED_ARRAY_SUPPORT&&(r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0})),r.alloc=function(e,t,n){return function(e,t,n,r){return u(t),t<=0?l(e,t):void 0!==n?"string"==typeof r?l(e,t).fill(n,r):l(e,t).fill(n):l(e,t)}(null,e,t,n)},r.allocUnsafe=function(e){return h(null,e)},r.allocUnsafeSlow=function(e){return h(null,e)},r.isBuffer=function(e){return!(null==e||!e._isBuffer)},r.compare=function(e,t){if(!r.isBuffer(e)||!r.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,o=0,a=Math.min(n,i);o<a;++o)if(e[o]!==t[o]){n=e[o],i=t[o];break}return n<i?-1:i<n?1:0},r.isEncoding=function(e){switch(String(e).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}},r.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return r.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=r.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!r.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i},r.byteLength=p,r.prototype._isBuffer=!0,r.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},r.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},r.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},r.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?_(this,0,e):m.apply(this,arguments)},r.prototype.equals=function(e){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===r.compare(this,e)},r.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},r.prototype.compare=function(e,t,n,i,o){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),t<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(i>>>=0),s=(n>>>=0)-(t>>>=0),l=Math.min(a,s),c=this.slice(i,o),u=e.slice(t,n),h=0;h<l;++h)if(c[h]!==u[h]){a=c[h],s=u[h];break}return a<s?-1:s<a?1:0},r.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},r.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},r.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},r.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},r.prototype.slice=function(e,t){var n,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),r.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=r.prototype;else{var o=t-e;n=new r(o,void 0);for(var a=0;a<o;++a)n[a]=this[a+e]}return n},r.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},r.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},r.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},r.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},r.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},r.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},r.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},r.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},r.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},r.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},r.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},r.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},r.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!0,23,4)},r.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!1,23,4)},r.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!0,52,8)},r.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!1,52,8)},r.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},r.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},r.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},r.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},r.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},r.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},r.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},r.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},r.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},r.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},r.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},r.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},r.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),r.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},r.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},r.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)},r.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)},r.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},r.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},r.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var o,a=i-n;if(this===e&&n<t&&t<i)for(o=a-1;o>=0;--o)e[o+t]=this[o+n];else if(a<1e3||!r.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},r.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!r.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var s=r.isBuffer(e)?e:F(new r(e,i).toString()),l=s.length;for(a=0;a<n-t;++a)this[a+t]=s[a%l]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function F(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function U(e){return i.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(e,t,n){t.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"}},{}],75:[function(e,t,n){t.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}},{}],76:[function(e,t,n){
/*!
* copy-to - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/
"use strict";var r=Array.prototype.slice;function i(e,t){if(!(this instanceof i))return new i(e,t);this.src=e,this._withAccess=t}function o(e,t){return void 0===e[t]&&void 0===e.__lookupGetter__(t)&&void 0===e.__lookupSetter__(t)}t.exports=i,i.prototype.withAccess=function(e){return this._withAccess=!1!==e,this},i.prototype.pick=function(e){return Array.isArray(e)||(e=r.call(arguments)),e.length&&(this.keys=e),this},i.prototype.to=function(e){if(e=e||{},!this.src)return e;var t=this.keys||Object.keys(this.src);if(!this._withAccess){for(var n=0;n<t.length;n++)void 0===e[r=t[n]]&&(e[r]=this.src[r]);return e}for(n=0;n<t.length;n++){var r=t[n];if(o(e,r)){var i=this.src.__lookupGetter__(r),a=this.src.__lookupSetter__(r);i&&e.__defineGetter__(r,i),a&&e.__defineSetter__(r,a),i||a||(e[r]=this.src[r])}}return e},i.prototype.toCover=function(e){for(var t=this.keys||Object.keys(this.src),n=0;n<t.length;n++){var r=t[n];delete e[r];var i=this.src.__lookupGetter__(r),o=this.src.__lookupSetter__(r);i&&e.__defineGetter__(r,i),o&&e.__defineSetter__(r,o),i||o||(e[r]=this.src[r])}},i.prototype.override=i.prototype.toCover,i.prototype.and=function(e){var t={};return this.to(t),this.src=e,this.to(t),this.src=t,this}},{}],77:[function(e,t,n){e("../../modules/es6.string.iterator"),e("../../modules/es6.array.from"),t.exports=e("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(e,t,n){var r=e("../../modules/_core"),i=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(e){return i.stringify.apply(i,arguments)}},{"../../modules/_core":99}],79:[function(e,t,n){e("../../modules/es6.object.assign"),t.exports=e("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(e,t,n){e("../../modules/es6.object.create");var r=e("../../modules/_core").Object;t.exports=function(e,t){return r.create(e,t)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(e,t,n){e("../../modules/es6.object.define-property");var r=e("../../modules/_core").Object;t.exports=function(e,t,n){return r.defineProperty(e,t,n)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(e,t,n){e("../../modules/es7.object.entries"),t.exports=e("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(e,t,n){e("../../modules/es6.object.get-own-property-names");var r=e("../../modules/_core").Object;t.exports=function(e){return r.getOwnPropertyNames(e)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(e,t,n){e("../../modules/es6.object.get-prototype-of"),t.exports=e("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(e,t,n){e("../../modules/es6.object.keys"),t.exports=e("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(e,t,n){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.promise"),e("../modules/es7.promise.finally"),e("../modules/es7.promise.try"),t.exports=e("../modules/_core").Promise},{"../modules/_core":99,"../modules/es6.object.to-string":177,"../modules/es6.promise":178,"../modules/es6.string.iterator":180,"../modules/es7.promise.finally":183,"../modules/es7.promise.try":184,"../modules/web.dom.iterable":187}],87:[function(e,t,n){e("../modules/web.immediate"),t.exports=e("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(e,t,n){e("../../modules/es6.string.from-code-point"),t.exports=e("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(e,t,n){e("../../modules/es6.function.has-instance"),t.exports=e("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(e,t,n){e("../../modules/es6.symbol"),e("../../modules/es6.object.to-string"),e("../../modules/es7.symbol.async-iterator"),e("../../modules/es7.symbol.observable"),t.exports=e("../../modules/_core").Symbol},{"../../modules/_core":99,"../../modules/es6.object.to-string":177,"../../modules/es6.symbol":181,"../../modules/es7.symbol.async-iterator":185,"../../modules/es7.symbol.observable":186}],91:[function(e,t,n){e("../../modules/es6.string.iterator"),e("../../modules/web.dom.iterable"),t.exports=e("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(e,t,n){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],93:[function(e,t,n){t.exports=function(){}},{}],94:[function(e,t,n){t.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},{}],95:[function(e,t,n){var r=e("./_is-object");t.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},{"./_is-object":119}],96:[function(e,t,n){var r=e("./_to-iobject"),i=e("./_to-length"),o=e("./_to-absolute-index");t.exports=function(e){return function(t,n,a){var s,l=r(t),c=i(l.length),u=o(a,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(e,t,n){var r=e("./_cof"),i=e("./_wks")("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},{"./_cof":98,"./_wks":166}],98:[function(e,t,n){var r={}.toString;t.exports=function(e){return r.call(e).slice(8,-1)}},{}],99:[function(e,t,n){var r=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=r)},{}],100:[function(e,t,n){"use strict";var r=e("./_object-dp"),i=e("./_property-desc");t.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},{"./_object-dp":132,"./_property-desc":146}],101:[function(e,t,n){var r=e("./_a-function");t.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":92}],102:[function(e,t,n){t.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},{}],103:[function(e,t,n){t.exports=!e("./_fails")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},{"./_fails":108}],104:[function(e,t,n){var r=e("./_is-object"),i=e("./_global").document,o=r(i)&&r(i.createElement);t.exports=function(e){return o?i.createElement(e):{}}},{"./_global":110,"./_is-object":119}],105:[function(e,t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(e,t,n){var r=e("./_object-keys"),i=e("./_object-gops"),o=e("./_object-pie");t.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,s=n(e),l=o.f,c=0;s.length>c;)l.call(e,a=s[c++])&&t.push(a);return t}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(e,t,n){var r=e("./_global"),i=e("./_core"),o=e("./_ctx"),a=e("./_hide"),s=e("./_has"),l=function(e,t,n){var c,u,h,d=e&l.F,f=e&l.G,p=e&l.S,m=e&l.P,g=e&l.B,v=e&l.W,y=f?i:i[t]||(i[t]={}),b=y.prototype,x=f?r:p?r[t]:(r[t]||{}).prototype;for(c in f&&(n=t),n)(u=!d&&x&&void 0!==x[c])&&s(y,c)||(h=u?x[c]:n[c],y[c]=f&&"function"!=typeof x[c]?n[c]:g&&u?o(h,r):v&&x[c]==h?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(h):m&&"function"==typeof h?o(Function.call,h):h,m&&((y.virtual||(y.virtual={}))[c]=h,e&l.R&&b&&!b[c]&&a(b,c,h)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(e,t,n){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],109:[function(e,t,n){var r=e("./_ctx"),i=e("./_iter-call"),o=e("./_is-array-iter"),a=e("./_an-object"),s=e("./_to-length"),l=e("./core.get-iterator-method"),c={},u={};(n=t.exports=function(e,t,n,h,d){var f,p,m,g,v=d?function(){return e}:l(e),y=r(n,h,t?2:1),b=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(o(v)){for(f=s(e.length);f>b;b++)if((g=t?y(a(p=e[b])[0],p[1]):y(e[b]))===c||g===u)return g}else for(m=v.call(e);!(p=m.next()).done;)if((g=i(m,y,p.value,t))===c||g===u)return g}).BREAK=c,n.RETURN=u},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(e,t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},{}],111:[function(e,t,n){var r={}.hasOwnProperty;t.exports=function(e,t){return r.call(e,t)}},{}],112:[function(e,t,n){var r=e("./_object-dp"),i=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(e,t,n){var r=e("./_global").document;t.exports=r&&r.documentElement},{"./_global":110}],114:[function(e,t,n){t.exports=!e("./_descriptors")&&!e("./_fails")((function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a}))},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(e,t,n){t.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},{}],116:[function(e,t,n){var r=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},{"./_cof":98}],117:[function(e,t,n){var r=e("./_iterators"),i=e("./_wks")("iterator"),o=Array.prototype;t.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},{"./_iterators":125,"./_wks":166}],118:[function(e,t,n){var r=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==r(e)}},{"./_cof":98}],119:[function(e,t,n){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],120:[function(e,t,n){var r=e("./_an-object");t.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},{"./_an-object":95}],121:[function(e,t,n){"use strict";var r=e("./_object-create"),i=e("./_property-desc"),o=e("./_set-to-string-tag"),a={};e("./_hide")(a,e("./_wks")("iterator"),(function(){return this})),t.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(e,t,n){"use strict";var r=e("./_library"),i=e("./_export"),o=e("./_redefine"),a=e("./_hide"),s=e("./_iterators"),l=e("./_iter-create"),c=e("./_set-to-string-tag"),u=e("./_object-gpo"),h=e("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),f=function(){return this};t.exports=function(e,t,n,p,m,g,v){l(n,t,p);var y,b,x,w=function(e){if(!d&&e in k)return k[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",S="values"==m,C=!1,k=e.prototype,_=k[h]||k["@@iterator"]||m&&k[m],T=_||w(m),O=m?S?w("entries"):T:void 0,A="Array"==t&&k.entries||_;if(A&&(x=u(A.call(new e)))!==Object.prototype&&x.next&&(c(x,E,!0),r||"function"==typeof x[h]||a(x,h,f)),S&&_&&"values"!==_.name&&(C=!0,T=function(){return _.call(this)}),r&&!v||!d&&!C&&k[h]||a(k,h,T),s[t]=T,s[E]=f,m)if(y={values:S?T:w("values"),keys:g?T:w("keys"),entries:O},v)for(b in y)b in k||o(k,b,y[b]);else i(i.P+i.F*(d||C),t,y);return y}},{"./_export":107,"./_hide":112,"./_iter-create":121,"./_iterators":125,"./_library":126,"./_object-gpo":138,"./_redefine":148,"./_set-to-string-tag":150,"./_wks":166}],123:[function(e,t,n){var r=e("./_wks")("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(e){}t.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},{"./_wks":166}],124:[function(e,t,n){t.exports=function(e,t){return{value:t,done:!!e}}},{}],125:[function(e,t,n){t.exports={}},{}],126:[function(e,t,n){t.exports=!0},{}],127:[function(e,t,n){var r=e("./_uid")("meta"),i=e("./_is-object"),o=e("./_has"),a=e("./_object-dp").f,s=0,l=Object.isExtensible||function(){return!0},c=!e("./_fails")((function(){return l(Object.preventExtensions({}))})),u=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},h=t.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!l(e))return"F";if(!t)return"E";u(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!l(e))return!0;if(!t)return!1;u(e)}return e[r].w},onFreeze:function(e){return c&&h.NEED&&l(e)&&!o(e,r)&&u(e),e}}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(e,t,n){var r=e("./_global"),i=e("./_task").set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,l="process"==e("./_cof")(a);t.exports=function(){var e,t,n,c=function(){var r,i;for(l&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(l)n=function(){a.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var u=s.resolve(void 0);n=function(){u.then(c)}}else n=function(){i.call(r,c)};else{var h=!0,d=document.createTextNode("");new o(c).observe(d,{characterData:!0}),n=function(){d.data=h=!h}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(e,t,n){"use strict";var r=e("./_a-function");function i(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}t.exports.f=function(e){return new i(e)}},{"./_a-function":92}],130:[function(e,t,n){"use strict";var r=e("./_descriptors"),i=e("./_object-keys"),o=e("./_object-gops"),a=e("./_object-pie"),s=e("./_to-object"),l=e("./_iobject"),c=Object.assign;t.exports=!c||e("./_fails")((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||Object.keys(c({},t)).join("")!=r}))?function(e,t){for(var n=s(e),c=arguments.length,u=1,h=o.f,d=a.f;c>u;)for(var f,p=l(arguments[u++]),m=h?i(p).concat(h(p)):i(p),g=m.length,v=0;g>v;)f=m[v++],r&&!d.call(p,f)||(n[f]=p[f]);return n}:c},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(e,t,n){var r=e("./_an-object"),i=e("./_object-dps"),o=e("./_enum-bug-keys"),a=e("./_shared-key")("IE_PROTO"),s=function(){},l=function(){var t,n=e("./_dom-create")("iframe"),r=o.length;for(n.style.display="none",e("./_html").appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),l=t.F;r--;)delete l.prototype[o[r]];return l()};t.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[a]=e):n=l(),void 0===t?n:i(n,t)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(e,t,n){var r=e("./_an-object"),i=e("./_ie8-dom-define"),o=e("./_to-primitive"),a=Object.defineProperty;n.f=e("./_descriptors")?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(e,t,n){var r=e("./_object-dp"),i=e("./_an-object"),o=e("./_object-keys");t.exports=e("./_descriptors")?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,l=0;s>l;)r.f(e,n=a[l++],t[n]);return e}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(e,t,n){var r=e("./_object-pie"),i=e("./_property-desc"),o=e("./_to-iobject"),a=e("./_to-primitive"),s=e("./_has"),l=e("./_ie8-dom-define"),c=Object.getOwnPropertyDescriptor;n.f=e("./_descriptors")?c:function(e,t){if(e=o(e),t=a(t,!0),l)try{return c(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(e,t,n){var r=e("./_to-iobject"),i=e("./_object-gopn").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(e,t,n){var r=e("./_object-keys-internal"),i=e("./_enum-bug-keys").concat("length","prototype");n.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(e,t,n){n.f=Object.getOwnPropertySymbols},{}],138:[function(e,t,n){var r=e("./_has"),i=e("./_to-object"),o=e("./_shared-key")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(e,t,n){var r=e("./_has"),i=e("./_to-iobject"),o=e("./_array-includes")(!1),a=e("./_shared-key")("IE_PROTO");t.exports=function(e,t){var n,s=i(e),l=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~o(c,n)||c.push(n));return c}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(e,t,n){var r=e("./_object-keys-internal"),i=e("./_enum-bug-keys");t.exports=Object.keys||function(e){return r(e,i)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(e,t,n){n.f={}.propertyIsEnumerable},{}],142:[function(e,t,n){var r=e("./_export"),i=e("./_core"),o=e("./_fails");t.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(e,t,n){var r=e("./_descriptors"),i=e("./_object-keys"),o=e("./_to-iobject"),a=e("./_object-pie").f;t.exports=function(e){return function(t){for(var n,s=o(t),l=i(s),c=l.length,u=0,h=[];c>u;)n=l[u++],r&&!a.call(s,n)||h.push(e?[n,s[n]]:s[n]);return h}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(e,t,n){t.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},{}],145:[function(e,t,n){var r=e("./_an-object"),i=e("./_is-object"),o=e("./_new-promise-capability");t.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(e,t,n){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],147:[function(e,t,n){var r=e("./_hide");t.exports=function(e,t,n){for(var i in t)n&&e[i]?e[i]=t[i]:r(e,i,t[i]);return e}},{"./_hide":112}],148:[function(e,t,n){t.exports=e("./_hide")},{"./_hide":112}],149:[function(e,t,n){"use strict";var r=e("./_global"),i=e("./_core"),o=e("./_object-dp"),a=e("./_descriptors"),s=e("./_wks")("species");t.exports=function(e){var t="function"==typeof i[e]?i[e]:r[e];a&&t&&!t[s]&&o.f(t,s,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(e,t,n){var r=e("./_object-dp").f,i=e("./_has"),o=e("./_wks")("toStringTag");t.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(e,t,n){var r=e("./_shared")("keys"),i=e("./_uid");t.exports=function(e){return r[e]||(r[e]=i(e))}},{"./_shared":152,"./_uid":162}],152:[function(e,t,n){var r=e("./_core"),i=e("./_global"),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:e("./_library")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(e,t,n){var r=e("./_an-object"),i=e("./_a-function"),o=e("./_wks")("species");t.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(e,t,n){var r=e("./_to-integer"),i=e("./_defined");t.exports=function(e){return function(t,n){var o,a,s=String(i(t)),l=r(n),c=s.length;return l<0||l>=c?e?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):o:e?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}}},{"./_defined":102,"./_to-integer":157}],155:[function(e,t,n){var r,i,o,a=e("./_ctx"),s=e("./_invoke"),l=e("./_html"),c=e("./_dom-create"),u=e("./_global"),h=u.process,d=u.setImmediate,f=u.clearImmediate,p=u.MessageChannel,m=u.Dispatch,g=0,v={},y=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},b=function(e){y.call(e.data)};d&&f||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++g]=function(){s("function"==typeof e?e:Function(e),t)},r(g),g},f=function(e){delete v[e]},"process"==e("./_cof")(h)?r=function(e){h.nextTick(a(y,e,1))}:m&&m.now?r=function(e){m.now(a(y,e,1))}:p?(o=(i=new p).port2,i.port1.onmessage=b,r=a(o.postMessage,o,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(r=function(e){u.postMessage(e+"","*")},u.addEventListener("message",b,!1)):r="onreadystatechange"in c("script")?function(e){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),y.call(e)}}:function(e){setTimeout(a(y,e,1),0)}),t.exports={set:d,clear:f}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(e,t,n){var r=e("./_to-integer"),i=Math.max,o=Math.min;t.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},{"./_to-integer":157}],157:[function(e,t,n){var r=Math.ceil,i=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?i:r)(e)}},{}],158:[function(e,t,n){var r=e("./_iobject"),i=e("./_defined");t.exports=function(e){return r(i(e))}},{"./_defined":102,"./_iobject":116}],159:[function(e,t,n){var r=e("./_to-integer"),i=Math.min;t.exports=function(e){return e>0?i(r(e),9007199254740991):0}},{"./_to-integer":157}],160:[function(e,t,n){var r=e("./_defined");t.exports=function(e){return Object(r(e))}},{"./_defined":102}],161:[function(e,t,n){var r=e("./_is-object");t.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(e,t,n){var r=0,i=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+i).toString(36))}},{}],163:[function(e,t,n){var r=e("./_global").navigator;t.exports=r&&r.userAgent||""},{"./_global":110}],164:[function(e,t,n){var r=e("./_global"),i=e("./_core"),o=e("./_library"),a=e("./_wks-ext"),s=e("./_object-dp").f;t.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(e,t,n){n.f=e("./_wks")},{"./_wks":166}],166:[function(e,t,n){var r=e("./_shared")("wks"),i=e("./_uid"),o=e("./_global").Symbol,a="function"==typeof o;(t.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(e,t,n){var r=e("./_classof"),i=e("./_wks")("iterator"),o=e("./_iterators");t.exports=e("./_core").getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(e,t,n){"use strict";var r=e("./_ctx"),i=e("./_export"),o=e("./_to-object"),a=e("./_iter-call"),s=e("./_is-array-iter"),l=e("./_to-length"),c=e("./_create-property"),u=e("./core.get-iterator-method");i(i.S+i.F*!e("./_iter-detect")((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,h,d=o(e),f="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m,v=0,y=u(d);if(g&&(m=r(m,p>2?arguments[2]:void 0,2)),null==y||f==Array&&s(y))for(n=new f(t=l(d.length));t>v;v++)c(n,v,g?m(d[v],v):d[v]);else for(h=y.call(d),n=new f;!(i=h.next()).done;v++)c(n,v,g?a(h,m,[i.value,v],!0):i.value);return n.length=v,n}})},{"./_create-property":100,"./_ctx":101,"./_export":107,"./_is-array-iter":117,"./_iter-call":120,"./_iter-detect":123,"./_to-length":159,"./_to-object":160,"./core.get-iterator-method":167}],169:[function(e,t,n){"use strict";var r=e("./_add-to-unscopables"),i=e("./_iter-step"),o=e("./_iterators"),a=e("./_to-iobject");t.exports=e("./_iter-define")(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(e,t,n){"use strict";var r=e("./_is-object"),i=e("./_object-gpo"),o=e("./_wks")("hasInstance"),a=Function.prototype;o in a||e("./_object-dp").f(a,o,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(e,t,n){var r=e("./_export");r(r.S+r.F,"Object",{assign:e("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(e,t,n){var r=e("./_export");r(r.S,"Object",{create:e("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(e,t,n){var r=e("./_export");r(r.S+r.F*!e("./_descriptors"),"Object",{defineProperty:e("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(e,t,n){e("./_object-sap")("getOwnPropertyNames",(function(){return e("./_object-gopn-ext").f}))},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(e,t,n){var r=e("./_to-object"),i=e("./_object-gpo");e("./_object-sap")("getPrototypeOf",(function(){return function(e){return i(r(e))}}))},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(e,t,n){var r=e("./_to-object"),i=e("./_object-keys");e("./_object-sap")("keys",(function(){return function(e){return i(r(e))}}))},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(e,t,n){arguments[4][71][0].apply(n,arguments)},{dup:71}],178:[function(e,t,n){"use strict";var r,i,o,a,s=e("./_library"),l=e("./_global"),c=e("./_ctx"),u=e("./_classof"),h=e("./_export"),d=e("./_is-object"),f=e("./_a-function"),p=e("./_an-instance"),m=e("./_for-of"),g=e("./_species-constructor"),v=e("./_task").set,y=e("./_microtask")(),b=e("./_new-promise-capability"),x=e("./_perform"),w=e("./_user-agent"),E=e("./_promise-resolve"),S=l.TypeError,C=l.process,k=C&&C.versions,_=k&&k.v8||"",T=l.Promise,O="process"==u(C),A=function(){},L=i=b.f,D=!!function(){try{var t=T.resolve(1),n=(t.constructor={})[e("./_wks")("species")]=function(e){e(A,A)};return(O||"function"==typeof PromiseRejectionEvent)&&t.then(A)instanceof n&&0!==_.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(e){}}(),I=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},R=function(e,t){if(!e._n){e._n=!0;var n=e._c;y((function(){for(var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a,s=i?t.ok:t.fail,l=t.resolve,c=t.reject,u=t.domain;try{s?(i||(2==e._h&&j(e),e._h=1),!0===s?n=r:(u&&u.enter(),n=s(r),u&&(u.exit(),a=!0)),n===t.promise?c(S("Promise-chain cycle")):(o=I(n))?o.call(n,l,c):l(n)):c(r)}catch(e){u&&!a&&u.exit(),c(e)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&M(e)}))}},M=function(e){v.call(l,(function(){var t,n,r,i=e._v,o=N(e);if(o&&(t=x((function(){O?C.emit("unhandledRejection",i,e):(n=l.onunhandledrejection)?n({promise:e,reason:i}):(r=l.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=O||N(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},N=function(e){return 1!==e._h&&0===(e._a||e._c).length},j=function(e){v.call(l,(function(){var t;O?C.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},P=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),R(t,!0))},B=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw S("Promise can't be resolved itself");(t=I(e))?y((function(){var r={_w:n,_d:!1};try{t.call(e,c(B,r,1),c(P,r,1))}catch(e){P.call(r,e)}})):(n._v=e,n._s=1,R(n,!1))}catch(e){P.call({_w:n,_d:!1},e)}}};D||(T=function(e){p(this,T,"Promise","_h"),f(e),r.call(this);try{e(c(B,this,1),c(P,this,1))}catch(e){P.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=e("./_redefine-all")(T.prototype,{then:function(e,t){var n=L(g(this,T));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=O?C.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=c(B,e,1),this.reject=c(P,e,1)},b.f=L=function(e){return e===T||e===a?new o(e):i(e)}),h(h.G+h.W+h.F*!D,{Promise:T}),e("./_set-to-string-tag")(T,"Promise"),e("./_set-species")("Promise"),a=e("./_core").Promise,h(h.S+h.F*!D,"Promise",{reject:function(e){var t=L(this);return(0,t.reject)(e),t.promise}}),h(h.S+h.F*(s||!D),"Promise",{resolve:function(e){return E(s&&this===a?T:this,e)}}),h(h.S+h.F*!(D&&e("./_iter-detect")((function(e){T.all(e).catch(A)}))),"Promise",{all:function(e){var t=this,n=L(t),r=n.resolve,i=n.reject,o=x((function(){var n=[],o=0,a=1;m(e,!1,(function(e){var s=o++,l=!1;n.push(void 0),a++,t.resolve(e).then((function(e){l||(l=!0,n[s]=e,--a||r(n))}),i)})),--a||r(n)}));return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=L(t),r=n.reject,i=x((function(){m(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},{"./_a-function":92,"./_an-instance":94,"./_classof":97,"./_core":99,"./_ctx":101,"./_export":107,"./_for-of":109,"./_global":110,"./_is-object":119,"./_iter-detect":123,"./_library":126,"./_microtask":128,"./_new-promise-capability":129,"./_perform":144,"./_promise-resolve":145,"./_redefine-all":147,"./_set-species":149,"./_set-to-string-tag":150,"./_species-constructor":153,"./_task":155,"./_user-agent":163,"./_wks":166}],179:[function(e,t,n){var r=e("./_export"),i=e("./_to-absolute-index"),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(e,t,n){"use strict";var r=e("./_string-at")(!0);e("./_iter-define")(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},{"./_iter-define":122,"./_string-at":154}],181:[function(e,t,n){"use strict";var r=e("./_global"),i=e("./_has"),o=e("./_descriptors"),a=e("./_export"),s=e("./_redefine"),l=e("./_meta").KEY,c=e("./_fails"),u=e("./_shared"),h=e("./_set-to-string-tag"),d=e("./_uid"),f=e("./_wks"),p=e("./_wks-ext"),m=e("./_wks-define"),g=e("./_enum-keys"),v=e("./_is-array"),y=e("./_an-object"),b=e("./_is-object"),x=e("./_to-object"),w=e("./_to-iobject"),E=e("./_to-primitive"),S=e("./_property-desc"),C=e("./_object-create"),k=e("./_object-gopn-ext"),_=e("./_object-gopd"),T=e("./_object-gops"),O=e("./_object-dp"),A=e("./_object-keys"),L=_.f,D=O.f,I=k.f,R=r.Symbol,M=r.JSON,N=M&&M.stringify,j=f("_hidden"),P=f("toPrimitive"),B={}.propertyIsEnumerable,F=u("symbol-registry"),U=u("symbols"),H=u("op-symbols"),z=Object.prototype,G="function"==typeof R&&!!T.f,V=r.QObject,W=!V||!V.prototype||!V.prototype.findChild,K=o&&c((function(){return 7!=C(D({},"a",{get:function(){return D(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=L(z,t);r&&delete z[t],D(e,t,n),r&&e!==z&&D(z,t,r)}:D,q=function(e){var t=U[e]=C(R.prototype);return t._k=e,t},X=G&&"symbol"==typeof R.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof R},Y=function(e,t,n){return e===z&&Y(H,t,n),y(e),t=E(t,!0),y(n),i(U,t)?(n.enumerable?(i(e,j)&&e[j][t]&&(e[j][t]=!1),n=C(n,{enumerable:S(0,!1)})):(i(e,j)||D(e,j,S(1,{})),e[j][t]=!0),K(e,t,n)):D(e,t,n)},$=function(e,t){y(e);for(var n,r=g(t=w(t)),i=0,o=r.length;o>i;)Y(e,n=r[i++],t[n]);return e},J=function(e){var t=B.call(this,e=E(e,!0));return!(this===z&&i(U,e)&&!i(H,e))&&(!(t||!i(this,e)||!i(U,e)||i(this,j)&&this[j][e])||t)},Z=function(e,t){if(e=w(e),t=E(t,!0),e!==z||!i(U,t)||i(H,t)){var n=L(e,t);return!n||!i(U,t)||i(e,j)&&e[j][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=I(w(e)),r=[],o=0;n.length>o;)i(U,t=n[o++])||t==j||t==l||r.push(t);return r},ee=function(e){for(var t,n=e===z,r=I(n?H:w(e)),o=[],a=0;r.length>a;)!i(U,t=r[a++])||n&&!i(z,t)||o.push(U[t]);return o};G||(s((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===z&&t.call(H,n),i(this,j)&&i(this[j],e)&&(this[j][e]=!1),K(this,e,S(1,n))};return o&&W&&K(z,e,{configurable:!0,set:t}),q(e)}).prototype,"toString",(function(){return this._k})),_.f=Z,O.f=Y,e("./_object-gopn").f=k.f=Q,e("./_object-pie").f=J,T.f=ee,o&&!e("./_library")&&s(z,"propertyIsEnumerable",J,!0),p.f=function(e){return q(f(e))}),a(a.G+a.W+a.F*!G,{Symbol:R});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)f(te[ne++]);for(var re=A(f.store),ie=0;re.length>ie;)m(re[ie++]);a(a.S+a.F*!G,"Symbol",{for:function(e){return i(F,e+="")?F[e]:F[e]=R(e)},keyFor:function(e){if(!X(e))throw TypeError(e+" is not a symbol!");for(var t in F)if(F[t]===e)return t},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!G,"Object",{create:function(e,t){return void 0===t?C(e):$(C(e),t)},defineProperty:Y,defineProperties:$,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:ee});var oe=c((function(){T.f(1)}));a(a.S+a.F*oe,"Object",{getOwnPropertySymbols:function(e){return T.f(x(e))}}),M&&a(a.S+a.F*(!G||c((function(){var e=R();return"[null]"!=N([e])||"{}"!=N({a:e})||"{}"!=N(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(b(t)||void 0!==e)&&!X(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!X(t))return t}),r[1]=t,N.apply(M,r)}}),R.prototype[P]||e("./_hide")(R.prototype,P,R.prototype.valueOf),h(R,"Symbol"),h(Math,"Math",!0),h(r.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(e,t,n){var r=e("./_export"),i=e("./_object-to-array")(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},{"./_export":107,"./_object-to-array":143}],183:[function(e,t,n){"use strict";var r=e("./_export"),i=e("./_core"),o=e("./_global"),a=e("./_species-constructor"),s=e("./_promise-resolve");r(r.P+r.R,"Promise",{finally:function(e){var t=a(this,i.Promise||o.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(e,t,n){"use strict";var r=e("./_export"),i=e("./_new-promise-capability"),o=e("./_perform");r(r.S,"Promise",{try:function(e){var t=i.f(this),n=o(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(e,t,n){e("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(e,t,n){e("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(e,t,n){e("./es6.array.iterator");for(var r=e("./_global"),i=e("./_hide"),o=e("./_iterators"),a=e("./_wks")("toStringTag"),s="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(","),l=0;l<s.length;l++){var c=s[l],u=r[c],h=u&&u.prototype;h&&!h[a]&&i(h,a,c),o[c]=o.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(e,t,n){var r=e("./_export"),i=e("./_task");r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},{"./_export":107,"./_task":155}],189:[function(e,t,n){(function(t){"use strict";var r,i=e("babel-runtime/helpers/typeof"),o=(r=i)&&r.__esModule?r:{default:r};function a(e){return Object.prototype.toString.call(e)}n.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===a(e)},n.isBoolean=function(e){return"boolean"==typeof e},n.isNull=function(e){return null===e},n.isNullOrUndefined=function(e){return null==e},n.isNumber=function(e){return"number"==typeof e},n.isString=function(e){return"string"==typeof e},n.isSymbol=function(e){return"symbol"===(void 0===e?"undefined":(0,o.default)(e))},n.isUndefined=function(e){return void 0===e},n.isRegExp=function(e){return"[object RegExp]"===a(e)},n.isObject=function(e){return"object"===(void 0===e?"undefined":(0,o.default)(e))&&null!==e},n.isDate=function(e){return"[object Date]"===a(e)},n.isError=function(e){return"[object Error]"===a(e)||e instanceof Error},n.isFunction=function(e){return"function"==typeof e},n.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(void 0===e?"undefined":(0,o.default)(e))||void 0===e},n.isBuffer=t.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(e,t,n){"use strict";var r,i=e("babel-runtime/helpers/typeof"),o=(r=i)&&r.__esModule?r:{default:r};!function(e){var r,i,a,s=(r=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,i=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,a=/[^-+\dA-Z]/g,function(e,t,n,o){if(1!==arguments.length||"string"!==h(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var d=(t=String(s.masks[t]||t||s.masks.default)).slice(0,4);"UTC:"!==d&&"GMT:"!==d||(t=t.slice(4),n=!0,"GMT:"===d&&(o=!0));var f=n?"getUTC":"get",p=e[f+"Date"](),m=e[f+"Day"](),g=e[f+"Month"](),v=e[f+"FullYear"](),y=e[f+"Hours"](),b=e[f+"Minutes"](),x=e[f+"Seconds"](),w=e[f+"Milliseconds"](),E=n?0:e.getTimezoneOffset(),S=c(e),C=u(e),k={d:p,dd:l(p),ddd:s.i18n.dayNames[m],dddd:s.i18n.dayNames[m+7],m:g+1,mm:l(g+1),mmm:s.i18n.monthNames[g],mmmm:s.i18n.monthNames[g+12],yy:String(v).slice(2),yyyy:v,h:y%12||12,hh:l(y%12||12),H:y,HH:l(y),M:b,MM:l(b),s:x,ss:l(x),l:l(w,3),L:l(Math.round(w/10)),t:y<12?"a":"p",tt:y<12?"am":"pm",T:y<12?"A":"P",TT:y<12?"AM":"PM",Z:o?"GMT":n?"UTC":(String(e).match(i)||[""]).pop().replace(a,""),o:(E>0?"-":"+")+l(100*Math.floor(Math.abs(E)/60)+Math.abs(E)%60,4),S:["th","st","nd","rd"][p%10>3?0:(p%100-p%10!=10)*p%10],W:S,N:C};return t.replace(r,(function(e){return e in k?k[e]:e.slice(1,e.length-1)}))});function l(e,t){for(e=String(e),t=t||2;e.length<t;)e="0"+e;return e}function c(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate());t.setDate(t.getDate()-(t.getDay()+6)%7+3);var n=new Date(t.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=t.getTimezoneOffset()-n.getTimezoneOffset();t.setHours(t.getHours()-r);var i=(t-n)/6048e5;return 1+Math.floor(i)}function u(e){var t=e.getDay();return 0===t&&(t=7),t}function h(e){return null===e?"null":void 0===e?"undefined":"object"!==(void 0===e?"undefined":(0,o.default)(e))?void 0===e?"undefined":(0,o.default)(e):Array.isArray(e)?"array":{}.toString.call(e).slice(8,-1).toLowerCase()}s.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"},s.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"]},"function"==typeof define&&define.amd?define((function(){return s})):"object"===(void 0===n?"undefined":(0,o.default)(n))?t.exports=s:e.dateFormat=s}(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(e,t,n){
/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/
"use strict";var r=/["'&<>]/;t.exports=function(e){var t,n=""+e,i=r.exec(n);if(!i)return n;var o="",a=0,s=0;for(a=i.index;a<n.length;a++){switch(n.charCodeAt(a)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#39;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}s!==a&&(o+=n.substring(s,a)),s=a+1,o+=t}return s!==a?o+n.substring(s,a):o}},{}],192:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,s,l,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}if(a(n=this._events[e]))return!1;if(i(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:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n))for(s=Array.prototype.slice.call(arguments,1),r=(c=n.slice()).length,l=0;l<r;l++)c[l].apply(this,s);return!0},r.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(n=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!i(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,a,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(n=this._events[e]).length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],193:[function(e,t,n){var r=e("http"),i=t.exports;for(var o in r)r.hasOwnProperty(o)&&(i[o]=r[o]);i.request=function(e,t){return e||(e={}),e.scheme="https",e.protocol="https:",r.request.call(this,e,t)}},{http:231}],194:[function(e,t,n){
/*!
* humanize-ms - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/
"use strict";var r=e("util"),i=e("ms");t.exports=function(e){if("number"==typeof e)return e;var t=i(e);if(void 0===t){var n=new Error(r.format("humanize-ms(%j) result undefined",e));console.warn(n.stack)}return t}},{ms:204,util:243}],195:[function(e,t,n){n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+e[t+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=c}return(f?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,h=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(t*l-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+f]=255&a,f+=p,a/=256,c-=8);e[n+f-p]|=128*m}},{}],196:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},{}],197:[function(e,t,n){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
t.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],198:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],199:[function(require,module,exports){(function(global){!function(e,t){"object"==typeof exports&&void 0!==module?module.exports=t(e):"function"==typeof define&&define.amd?define(t):t(e)}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==global?global:this,(function(global){"use strict";global=global||{};var _Base64=global.Base64,version="2.5.2",buffer;if(void 0!==module&&module.exports)try{buffer=eval("require('buffer').Buffer")}catch(e){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e.charAt(n)]=n;return t}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?fromCharCode(192|t>>>6)+fromCharCode(128|63&t):fromCharCode(224|t>>>12&15)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return fromCharCode(240|t>>>18&7)+fromCharCode(128|t>>>12&63)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t)},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(e){return e.replace(re_utob,cb_utob)},cb_encode=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[b64chars.charAt(n>>>18),b64chars.charAt(n>>>12&63),t>=2?"=":b64chars.charAt(n>>>6&63),t>=1?"=":b64chars.charAt(63&n)].join("")},btoa=global.btoa?function(e){return global.btoa(e)}:function(e){return e.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)?e.toString("base64"):btoa(utob(String(e)))},encode=function(e,t){return t?_encode(String(e)).replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,""):_encode(e)},encodeURI=function(e){return encode(e,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return fromCharCode(55296+(t>>>10))+fromCharCode(56320+(1023&t));case 3:return fromCharCode((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return fromCharCode((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},btou=function(e){return e.replace(re_btou,cb_btou)},cb_decode=function(e){var t=e.length,n=t%4,r=(t>0?b64tab[e.charAt(0)]<<18:0)|(t>1?b64tab[e.charAt(1)]<<12:0)|(t>2?b64tab[e.charAt(2)]<<6:0)|(t>3?b64tab[e.charAt(3)]:0),i=[fromCharCode(r>>>16),fromCharCode(r>>>8&255),fromCharCode(255&r)];return i.length-=[0,0,2,1][n],i.join("")},_atob=global.atob?function(e){return global.atob(e)}:function(e){return e.replace(/\S{1,4}/g,cb_decode)},atob=function(e){return _atob(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e,"base64")).toString()}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e,"base64")).toString()}:function(e){return btou(_atob(e))},decode=function(e){return _decode(String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var e=global.Base64;return global.Base64=_Base64,e};if(global.Base64={VERSION:version,atob:atob,btoa:btoa,fromBase64:decode,toBase64:encode,utob:utob,encode:encode,encodeURI:encodeURI,btou:btou,decode:decode,noConflict:noConflict,__buffer__:buffer},"function"==typeof Object.defineProperty){var noEnum=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum((function(){return decode(this)}))),Object.defineProperty(String.prototype,"toBase64",noEnum((function(e){return encode(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",noEnum((function(){return encode(this,!0)})))}}return global.Meteor&&(Base64=global.Base64),void 0!==module&&module.exports?module.exports.Base64=global.Base64:"function"==typeof define&&define.amd&&define([],(function(){return global.Base64})),{Base64:global.Base64}}))}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],200:[function(e,t,n){
/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
"use strict";t.exports=function(e,t,n){if(!e)throw new TypeError("argument dest is required");if(!t)throw new TypeError("argument src is required");return void 0===n&&(n=!0),Object.getOwnPropertyNames(t).forEach((function(i){if(n||!r.call(e,i)){var o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,o)}})),e};var r=Object.prototype.hasOwnProperty},{}],201:[function(e,t,n){"use strict";function r(){this._types=Object.create(null),this._extensions=Object.create(null);for(var e=0;e<arguments.length;e++)this.define(arguments[e]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}r.prototype.define=function(e,t){for(var n in e){var r=e[n].map((function(e){return e.toLowerCase()}));n=n.toLowerCase();for(var i=0;i<r.length;i++)if("*"!=(o=r[i])[0]){if(!t&&o in this._types)throw new Error('Attempt to change mapping for "'+o+'" extension from "'+this._types[o]+'" to "'+n+'". Pass `force=true` to allow this, otherwise remove "'+o+'" from the list of extensions for "'+n+'".');this._types[o]=n}if(t||!this._extensions[n]){var o=r[0];this._extensions[n]="*"!=o[0]?o:o.substr(1)}}},r.prototype.getType=function(e){var t=(e=String(e)).replace(/^.*[/\\]/,"").toLowerCase(),n=t.replace(/^.*\./,"").toLowerCase(),r=t.length<e.length;return(n.length<t.length-1||!r)&&this._types[n]||null},r.prototype.getExtension=function(e){return(e=/^\s*([^;\s]*)/.test(e)&&RegExp.$1)&&this._extensions[e.toLowerCase()]||null},t.exports=r},{}],202:[function(e,t,n){"use strict";var r=e("./Mime");t.exports=new r(e("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(e,t,n){t.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"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","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"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/lgr+xml":["lgr"],"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/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"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/p2p-overlay+xml":["relo"],"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/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"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/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"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/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"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/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/urc-ressheet+xml":["rsheet"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"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":["*3gpp"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*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":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"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":["*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"]}},{}],204:[function(e,t,n){var r=1e3,i=6e4,o=60*i,a=24*o;function s(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}t.exports=function(e,t){t=t||{};var n,l,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"weeks":case"week":case"w":return 6048e5*n;case"days":case"day":case"d":return n*a;case"hours":case"hour":case"hrs":case"hr":case"h":return n*o;case"minutes":case"minute":case"mins":case"min":case"m":return n*i;case"seconds":case"second":case"secs":case"sec":case"s":return n*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===c&&isFinite(e))return t.long?(n=e,(l=Math.abs(n))>=a?s(n,l,a,"day"):l>=o?s(n,l,o,"hour"):l>=i?s(n,l,i,"minute"):l>=r?s(n,l,r,"second"):n+" ms"):function(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+"d":t>=o?Math.round(e/o)+"h":t>=i?Math.round(e/i)+"m":t>=r?Math.round(e/r)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],205:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}n.resolve=function(){for(var n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a=o>=0?arguments[o]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,i="/"===a.charAt(0))}return(i?"/":"")+(n=t(r(n.split("/"),(function(e){return!!e})),!i).join("/"))||"."},n.normalize=function(e){var o=n.isAbsolute(e),a="/"===i(e,-1);return(e=t(r(e.split("/"),(function(e){return!!e})),!o).join("/"))||o||(e="."),e&&a&&(e+="/"),(o?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),o=r(t.split("/")),a=Math.min(i.length,o.length),s=a,l=0;l<a;l++)if(i[l]!==o[l]){s=l;break}var c=[];for(l=s;l<i.length;l++)c.push("..");return(c=c.concat(o.slice(s))).join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},n.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,o=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(i=!1,r=a+1),46===s?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=a+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,e("_process"))},{_process:208}],206:[function(e,t,n){(function(e){(function(){"use strict";var r={function:!0,object:!0},i=r[typeof window]&&window||this,o=r[typeof n]&&n,a=r[typeof t]&&t&&!t.nodeType&&t,s=o&&a&&"object"==typeof e&&e;!s||s.global!==s&&s.window!==s&&s.self!==s||(i=s);var l=Math.pow(2,53)-1,c=/\bOpera/,u=Object.prototype,h=u.hasOwnProperty,d=u.toString;function f(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function p(e){return e=b(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:f(e)}function m(e,t){for(var n in e)h.call(e,n)&&t(e[n],n,e)}function g(e){return null==e?f(e):d.call(e).slice(8,-1)}function v(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function y(e,t){var n=null;return function(e,t){var n=-1,r=e?e.length:0;if("number"==typeof r&&r>-1&&r<=l)for(;++n<r;)t(e[n],n,e);else m(e,t)}(e,(function(r,i){n=t(n,r,i,e)})),n}function b(e){return String(e).replace(/^ +| +$/g,"")}var x=function e(t){var n=i,r=t&&"object"==typeof t&&"String"!=g(t);r&&(n=t,t=null);var o=n.navigator||{},a=o.userAgent||"";t||(t=a);var s,l,u,h,f,x=r?!!o.likeChrome:/\bChrome\b/.test(t)&&!/internal|\n/i.test(d.toString()),w=r?"Object":"ScriptBridgingProxyObject",E=r?"Object":"Environment",S=r&&n.java?"JavaPackage":g(n.java),C=r?"Object":"RuntimeObject",k=/\bJava/.test(S)&&n.java,_=k&&g(n.environment)==E,T=k?"a":"α",O=k?"b":"β",A=n.document||{},L=n.operamini||n.opera,D=c.test(D=r&&L?L["[[Class]]"]:g(L))?D:L=null,I=t,R=[],M=null,N=t==a,j=N&&L&&"function"==typeof L.version&&L.version(),P=y([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],(function(e,n){return e||RegExp("\\b"+(n.pattern||v(n))+"\\b","i").exec(t)&&(n.label||n)})),B=function(e){return y(e,(function(e,n){return e||RegExp("\\b"+(n.pattern||v(n))+"\\b","i").exec(t)&&(n.label||n)}))}(["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"]),F=z([{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"]),U=function(e){return y(e,(function(e,n,r){return e||(n[F]||n[/^[a-z]+(?: +[a-z]+\b)*/i.exec(F)]||RegExp("\\b"+v(r)+"(?:\\b|\\w*\\d)","i").exec(t))&&r}))}({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}}),H=function(e){return y(e,(function(e,n){var r=n.pattern||v(n);return!e&&(e=RegExp("\\b"+r+"(?:/[\\d.]+|[ \\w.]*)","i").exec(t))&&(e=function(e,t,n){var r={"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 t&&n&&/^Win/i.test(e)&&!/^Windows Phone /i.test(e)&&(r=r[/[\d.]+$/.exec(e)])&&(e="Windows "+r),e=String(e),t&&n&&(e=e.replace(RegExp(t,"i"),n)),e=p(e.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])}(e,r,n.label||n)),e}))}(["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 "]);function z(e){return y(e,(function(e,n){var r=n.pattern||v(n);return!e&&(e=RegExp("\\b"+r+" *\\d+[.\\w_]*","i").exec(t)||RegExp("\\b"+r+" *\\w+-[\\w]*","i").exec(t)||RegExp("\\b"+r+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(t))&&((e=String(n.label&&!RegExp(r,"i").test(n.label)?n.label:e).split("/"))[1]&&!/[\d.]+/.test(e[0])&&(e[0]+=" "+e[1]),n=n.label||n,e=p(e[0].replace(RegExp(r,"i"),n).replace(RegExp("; *(?:"+n+"[_-])?","i")," ").replace(RegExp("("+n+")[-_.]?(\\w)","i"),"$1 $2"))),e}))}if(P&&(P=[P]),U&&!F&&(F=z([U])),(s=/\bGoogle TV\b/.exec(F))&&(F=s[0]),/\bSimulator\b/i.test(t)&&(F=(F?F+" ":"")+"Simulator"),"Opera Mini"==B&&/\bOPiOS\b/.test(t)&&R.push("running in Turbo/Uncompressed mode"),"IE"==B&&/\blike iPhone OS\b/.test(t)?(U=(s=e(t.replace(/like iPhone OS/,""))).manufacturer,F=s.product):/^iP/.test(F)?(B||(B="Safari"),H="iOS"+((s=/ OS ([\d_]+)/i.exec(t))?" "+s[1].replace(/_/g,"."):"")):"Konqueror"!=B||/buntu/i.test(H)?U&&"Google"!=U&&(/Chrome/.test(B)&&!/\bMobile Safari\b/i.test(t)||/\bVita\b/.test(F))||/\bAndroid\b/.test(H)&&/^Chrome/.test(B)&&/\bVersion\//i.test(t)?(B="Android Browser",H=/\bAndroid\b/.test(H)?H:"Android"):"Silk"==B?(/\bMobi/i.test(t)||(H="Android",R.unshift("desktop mode")),/Accelerated *= *true/i.test(t)&&R.unshift("accelerated")):"PaleMoon"==B&&(s=/\bFirefox\/([\d.]+)\b/.exec(t))?R.push("identifying as Firefox "+s[1]):"Firefox"==B&&(s=/\b(Mobile|Tablet|TV)\b/i.exec(t))?(H||(H="Firefox OS"),F||(F=s[1])):!B||(s=!/\bMinefield\b/i.test(t)&&/\b(?:Firefox|Safari)\b/.exec(B))?(B&&!F&&/[\/,]|^[^(]+?\)/.test(t.slice(t.indexOf(s+"/")+8))&&(B=null),(s=F||U||H)&&(F||U||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(H))&&(B=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(H)?H:s)+" Browser")):"Electron"==B&&(s=(/\bChrome\/([\d.]+)\b/.exec(t)||0)[1])&&R.push("Chromium "+s):H="Kubuntu",j||(j=y(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",v(B),"(?:Firefox|Minefield|NetFront)"],(function(e,n){return e||(RegExp(n+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(t)||0)[1]||null}))),(s=("iCab"==P&&parseFloat(j)>3?"WebKit":/\bOpera\b/.test(B)&&(/\bOPR\b/.test(t)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(t)&&!/^(?:Trident|EdgeHTML)$/.test(P)&&"WebKit"||!P&&/\bMSIE\b/i.test(t)&&("Mac OS"==H?"Tasman":"Trident")||"WebKit"==P&&/\bPlayStation\b(?! Vita\b)/i.test(B)&&"NetFront")&&(P=[s]),"IE"==B&&(s=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(t)||0)[1])?(B+=" Mobile",H="Windows Phone "+(/\+$/.test(s)?s:s+".x"),R.unshift("desktop mode")):/\bWPDesktop\b/i.test(t)?(B="IE Mobile",H="Windows Phone 8.x",R.unshift("desktop mode"),j||(j=(/\brv:([\d.]+)/.exec(t)||0)[1])):"IE"!=B&&"Trident"==P&&(s=/\brv:([\d.]+)/.exec(t))&&(B&&R.push("identifying as "+B+(j?" "+j:"")),B="IE",j=s[1]),N){if(h="global",f=null!=(u=n)?typeof u[h]:"number",/^(?:boolean|number|string|undefined)$/.test(f)||"object"==f&&!u[h])g(s=n.runtime)==w?(B="Adobe AIR",H=s.flash.system.Capabilities.os):g(s=n.phantom)==C?(B="PhantomJS",j=(s=s.version||null)&&s.major+"."+s.minor+"."+s.patch):"number"==typeof A.documentMode&&(s=/\bTrident\/(\d+)/i.exec(t))?(j=[j,A.documentMode],(s=+s[1]+4)!=j[1]&&(R.push("IE "+j[1]+" mode"),P&&(P[1]=""),j[1]=s),j="IE"==B?String(j[1].toFixed(1)):j[0]):"number"==typeof A.documentMode&&/^(?:Chrome|Firefox)\b/.test(B)&&(R.push("masking as "+B+" "+j),B="IE",j="11.0",P=["Trident"],H="Windows");else if(k&&(I=(s=k.lang.System).getProperty("os.arch"),H=H||s.getProperty("os.name")+" "+s.getProperty("os.version")),_){try{j=n.require("ringo/engine").version.join("."),B="RingoJS"}catch(e){(s=n.system)&&s.global.system==n.system&&(B="Narwhal",H||(H=s[0].os||null))}B||(B="Rhino")}else"object"==typeof n.process&&!n.process.browser&&(s=n.process)&&("object"==typeof s.versions&&("string"==typeof s.versions.electron?(R.push("Node "+s.versions.node),B="Electron",j=s.versions.electron):"string"==typeof s.versions.nw&&(R.push("Chromium "+j,"Node "+s.versions.node),B="NW.js",j=s.versions.nw)),B||(B="Node.js",I=s.arch,H=s.platform,j=(j=/[\d.]+/.exec(s.version))?j[0]:null));H=H&&p(H)}if(j&&(s=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(j)||/(?:alpha|beta)(?: ?\d)?/i.exec(t+";"+(N&&o.appMinorVersion))||/\bMinefield\b/i.test(t)&&"a")&&(M=/b/i.test(s)?"beta":"alpha",j=j.replace(RegExp(s+"\\+?$"),"")+("beta"==M?O:T)+(/\d+\+?/.exec(s)||"")),"Fennec"==B||"Firefox"==B&&/\b(?:Android|Firefox OS)\b/.test(H))B="Firefox Mobile";else if("Maxthon"==B&&j)j=j.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(F))"Xbox 360"==F&&(H=null),"Xbox 360"==F&&/\bIEMobile\b/.test(t)&&R.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(B)&&(!B||F||/Browser|Mobi/.test(B))||"Windows CE"!=H&&!/Mobi/i.test(t))if("IE"==B&&N)try{null===n.external&&R.unshift("platform preview")}catch(e){R.unshift("embedded")}else(/\bBlackBerry\b/.test(F)||/\bBB10\b/.test(t))&&(s=(RegExp(F.replace(/ +/g," *")+"/([.\\d]+)","i").exec(t)||0)[1]||j)?(H=((s=[s,/BB10/.test(t)])[1]?(F=null,U="BlackBerry"):"Device Software")+" "+s[0],j=null):this!=m&&"Wii"!=F&&(N&&L||/Opera/.test(B)&&/\b(?:MSIE|Firefox)\b/i.test(t)||"Firefox"==B&&/\bOS X (?:\d+\.){2,}/.test(H)||"IE"==B&&(H&&!/^Win/.test(H)&&j>5.5||/\bWindows XP\b/.test(H)&&j>8||8==j&&!/\bTrident\b/.test(t)))&&!c.test(s=e.call(m,t.replace(c,"")+";"))&&s.name&&(s="ing as "+s.name+((s=s.version)?" "+s:""),c.test(B)?(/\bIE\b/.test(s)&&"Mac OS"==H&&(H=null),s="identify"+s):(s="mask"+s,B=D?p(D.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(s)&&(H=null),N||(j=null)),P=["Presto"],R.push(s));else B+=" Mobile";(s=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(t)||0)[1])&&(s=[parseFloat(s.replace(/\.(\d)$/,".0$1")),s],"Safari"==B&&"+"==s[1].slice(-1)?(B="WebKit Nightly",M="alpha",j=s[1].slice(0,-1)):j!=s[1]&&j!=(s[2]=(/\bSafari\/([\d.]+\+?)/i.exec(t)||0)[1])||(j=null),s[1]=(/\bChrome\/([\d.]+)/i.exec(t)||0)[1],537.36==s[0]&&537.36==s[2]&&parseFloat(s[1])>=28&&"WebKit"==P&&(P=["Blink"]),N&&(x||s[1])?(P&&(P[1]="like Chrome"),s=s[1]||((s=s[0])<530?1:s<532?2:s<532.05?3:s<533?4:s<534.03?5:s<534.07?6:s<534.1?7:s<534.13?8:s<534.16?9:s<534.24?10:s<534.3?11:s<535.01?12:s<535.02?"13+":s<535.07?15:s<535.11?16:s<535.19?17:s<536.05?18:s<536.1?19:s<537.01?20:s<537.11?"21+":s<537.13?23:s<537.18?24:s<537.24?25:s<537.36?26:"Blink"!=P?"27":"28")):(P&&(P[1]="like Safari"),s=(s=s[0])<400?1:s<500?2:s<526?3:s<533?4:s<534?"4+":s<535?5:s<537?6:s<538?7:s<601?8:"8"),P&&(P[1]+=" "+(s+="number"==typeof s?".x":/[.+]/.test(s)?"":"+")),"Safari"==B&&(!j||parseInt(j)>45)&&(j=s)),"Opera"==B&&(s=/\bzbov|zvav$/.exec(H))?(B+=" ",R.unshift("desktop mode"),"zvav"==s?(B+="Mini",j=null):B+="Mobile",H=H.replace(RegExp(" *"+s+"$"),"")):"Safari"==B&&/\bChrome\b/.exec(P&&P[1])&&(R.unshift("desktop mode"),B="Chrome Mobile",j=null,/\bOS X\b/.test(H)?(U="Apple",H="iOS 4.3+"):H=null),j&&0==j.indexOf(s=/[\d.]+$/.exec(H))&&t.indexOf("/"+s+"-")>-1&&(H=b(H.replace(s,""))),P&&!/\b(?:Avant|Nook)\b/.test(B)&&(/Browser|Lunascape|Maxthon/.test(B)||"Safari"!=B&&/^iOS/.test(H)&&/\bSafari\b/.test(P[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(B)&&P[1])&&(s=P[P.length-1])&&R.push(s),R.length&&(R=["("+R.join("; ")+")"]),U&&F&&F.indexOf(U)<0&&R.push("on "+U),F&&R.push((/^on /.test(R[R.length-1])?"":"on ")+F),H&&(s=/ ([\d.+]+)$/.exec(H),l=s&&"/"==H.charAt(H.length-s[0].length-1),H={architecture:32,family:s&&!l?H.replace(s[0],""):H,version:s?s[1]:null,toString:function(){var e=this.version;return this.family+(e&&!l?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(s=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(I))&&!/\bi686\b/i.test(I)?(H&&(H.architecture=64,H.family=H.family.replace(RegExp(" *"+s),"")),B&&(/\bWOW64\b/i.test(t)||N&&/\w(?:86|32)$/.test(o.cpuClass||o.platform)&&!/\bWin64; x64\b/i.test(t))&&R.unshift("32-bit")):H&&/^OS X/.test(H.family)&&"Chrome"==B&&parseFloat(j)>=39&&(H.architecture=64),t||(t=null);var G={};return G.description=t,G.layout=P&&P[0],G.manufacturer=U,G.name=B,G.prerelease=M,G.product=F,G.ua=t,G.version=B&&j,G.os=H||{architecture:null,family:null,version:null,toString:function(){return"null"}},G.parse=e,G.toString=function(){return this.description||""},G.version&&R.unshift(j),G.name&&R.unshift(B),H&&B&&(H!=String(H).split(" ")[0]||H!=B.split(" ")[0]&&!F)&&R.push(F?"("+H+")":"on "+H),R.length&&(G.description=R.join(" ")),G}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(i.platform=x,define((function(){return x}))):o&&a?m(x,(function(e,t){o[t]=e})):i.platform=x}).call(this)}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],207:[function(e,t,n){(function(e){"use strict";void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,i)}));default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this,e("_process"))},{_process:208}],208:[function(e,t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,u=[],h=!1,d=-1;function f(){h&&c&&(h=!1,c.length?u=c.concat(u):d=-1,u.length&&p())}function p(){if(!h){var e=l(f);h=!0;for(var t=u.length;t;){for(c=u,u=[];++d<t;)c&&c[d].run();d=-1,t=u.length}c=null,h=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new m(e,t)),1!==u.length||h||l(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],209:[function(e,t,n){(function(e){!function(r){var i="object"==typeof n&&n&&!n.nodeType&&n,o="object"==typeof t&&t&&!t.nodeType&&t,a="object"==typeof e&&e;a.global!==a&&a.window!==a&&a.self!==a||(r=a);var s,l,c=2147483647,u=/^xn--/,h=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,m=String.fromCharCode;function g(e){throw new RangeError(f[e])}function v(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function y(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+v((e=e.replace(d,".")).split("."),t).join(".")}function b(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function x(e){return v(e,(function(e){var t="";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=m(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function E(e,t,n){var r=0;for(e=n?p(e/700):e>>1,e+=p(e/t);e>455;r+=36)e=p(e/35);return p(r+36*e/(e+38))}function S(e){var t,n,r,i,o,a,s,l,u,h,d,f=[],m=e.length,v=0,y=128,b=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&g("not-basic"),f.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<m;){for(o=v,a=1,s=36;i>=m&&g("invalid-input"),((l=(d=e.charCodeAt(i++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||l>p((c-v)/a))&&g("overflow"),v+=l*a,!(l<(u=s<=b?1:s>=b+26?26:s-b));s+=36)a>p(c/(h=36-u))&&g("overflow"),a*=h;b=E(v-o,t=f.length+1,0==o),p(v/t)>c-y&&g("overflow"),y+=p(v/t),v%=t,f.splice(v++,0,y)}return x(f)}function C(e){var t,n,r,i,o,a,s,l,u,h,d,f,v,y,x,S=[];for(f=(e=b(e)).length,t=128,n=0,o=72,a=0;a<f;++a)(d=e[a])<128&&S.push(m(d));for(r=i=S.length,i&&S.push("-");r<f;){for(s=c,a=0;a<f;++a)(d=e[a])>=t&&d<s&&(s=d);for(s-t>p((c-n)/(v=r+1))&&g("overflow"),n+=(s-t)*v,t=s,a=0;a<f;++a)if((d=e[a])<t&&++n>c&&g("overflow"),d==t){for(l=n,u=36;!(l<(h=u<=o?1:u>=o+26?26:u-o));u+=36)x=l-h,y=36-h,S.push(m(w(h+x%y,0))),l=p(x/y);S.push(m(w(l,0))),o=E(n,v,r==i),n=0,++r}++n,++t}return S.join("")}if(s={version:"1.4.1",ucs2:{decode:b,encode:x},decode:S,encode:C,toASCII:function(e){return y(e,(function(e){return h.test(e)?"xn--"+C(e):e}))},toUnicode:function(e){return y(e,(function(e){return u.test(e)?S(e.slice(4).toLowerCase()):e}))}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",(function(){return s}));else if(i&&o)if(t.exports==i)o.exports=s;else for(l in s)s.hasOwnProperty(l)&&(i[l]=s[l]);else r.punycode=s}(this)}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],210:[function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var u=0;u<c;++u){var h,d,f,p,m=e[u].replace(s,"%20"),g=m.indexOf(n);g>=0?(h=m.substr(0,g),d=m.substr(g+1)):(h=m,d=""),f=decodeURIComponent(h),p=decodeURIComponent(d),r(a,f)?i(a[f])?a[f].push(p):a[f]=[a[f],p]:a[f]=p}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],211:[function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?o(a(e),(function(a){var s=encodeURIComponent(r(a))+n;return i(e[a])?o(e[a],(function(e){return s+encodeURIComponent(r(e))})).join(t):s+encodeURIComponent(r(e[a]))})).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var a=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},{}],212:[function(e,t,n){"use strict";n.decode=n.parse=e("./decode"),n.encode=n.stringify=e("./encode")},{"./decode":210,"./encode":211}],213:[function(e,t,n){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(e,t,n){"use strict";var r=o(e("babel-runtime/core-js/object/create")),i=o(e("babel-runtime/core-js/object/keys"));function o(e){return e&&e.__esModule?e:{default:e}}var a=e("process-nextick-args"),s=i.default||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=p;var l=(0,r.default)(e("core-util-is"));l.inherits=e("inherits");var c=e("./_stream_readable"),u=e("./_stream_writable");l.inherits(p,c);for(var h=s(u.prototype),d=0;d<h.length;d++){var f=h[d];p.prototype[f]||(p.prototype[f]=u.prototype[f])}function p(e){if(!(this instanceof p))return new p(e);c.call(this,e),u.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",m)}function m(){this.allowHalfOpen||this._writableState.ended||a.nextTick(g,this)}function g(e){e.end()}Object.defineProperty(p.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(p.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),p.prototype._destroy=function(e,t){this.push(null),this.end(),a.nextTick(t,e)}},{"./_stream_readable":216,"./_stream_writable":218,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60,"core-util-is":189,inherits:196,"process-nextick-args":207}],215:[function(e,t,n){"use strict";var r,i=e("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};t.exports=l;var a=e("./_stream_transform"),s=(0,o.default)(e("core-util-is"));function l(e){if(!(this instanceof l))return new l(e);a.call(this,e)}s.inherits=e("inherits"),s.inherits(l,a),l.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(e,t,n){(function(n,r){"use strict";var i=a(e("babel-runtime/core-js/object/get-prototype-of")),o=a(e("babel-runtime/core-js/object/create"));function a(e){return e&&e.__esModule?e:{default:e}}var s=e("process-nextick-args");t.exports=E;var l,c=e("isarray");E.ReadableState=w,e("events").EventEmitter;var u=function(e,t){return e.listeners(t).length},h=e("./internal/streams/stream"),d=e("safe-buffer").Buffer,f=r.Uint8Array||function(){},p=(0,o.default)(e("core-util-is"));p.inherits=e("inherits");var m=e("util"),g=void 0;g=m&&m.debuglog?m.debuglog("stream"):function(){};var v,y=e("./internal/streams/BufferList"),b=e("./internal/streams/destroy");p.inherits(E,h);var x=["error","close","destroy","pause","resume"];function w(t,n){t=t||{};var r=n instanceof(l=l||e("./_stream_duplex"));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,o=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(v||(v=e("string_decoder/").StringDecoder),this.decoder=new v(t.encoding),this.encoding=t.encoding)}function E(t){if(l=l||e("./_stream_duplex"),!(this instanceof E))return new E(t);this._readableState=new w(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),h.call(this)}function S(e,t,n,r,o){var a,s=e._readableState;return null===t?(s.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,_(e)}}(e,s)):(o||(a=function(e,t){var n,r;return r=t,d.isBuffer(r)||r instanceof f||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}(s,t)),a?e.emit("error",a):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||(0,i.default)(t)===d.prototype||(t=function(e){return d.from(e)}(t)),r?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):C(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?C(e,s,t,!1):O(e,s)):C(e,s,t,!1))):r||(s.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(s)}function C(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&_(e)),O(e,t)}function k(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function _(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?s.nextTick(T,e):T(e))}function T(e){g("emit readable"),e.emit("readable"),I(e)}function O(e,t){t.readingMore||(t.readingMore=!0,s.nextTick(A,e,t))}function A(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function L(e){g("readable nexttick read 0"),e.read(0)}function D(e,t){t.reading||(g("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(g("flow",t.flowing);t.flowing&&null!==e.read(););}function R(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0==(e-=a)){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=d.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),0==(e-=a)){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}(e,t),r}(e,t.buffer,t.decoder),n);var n}function M(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,s.nextTick(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function j(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}Object.defineProperty(E.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=b.destroy,E.prototype._undestroy=b.undestroy,E.prototype._destroy=function(e,t){this.push(null),t(e)},E.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=d.from(e,t),t=""),n=!0),S(this,e,t,!1,n)},E.prototype.unshift=function(e){return S(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(t){return v||(v=e("string_decoder/").StringDecoder),this._readableState.decoder=new v(t),this._readableState.encoding=t,this},E.prototype.read=function(e){g("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?M(this):_(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&M(this),null;var r,i=t.needReadable;return g("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&g("length less than watermark",i=!0),t.ended||t.reading?g("reading or ended",i=!1):i&&(g("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=k(n,t))),null===(r=e>0?R(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&M(this)),null!==r&&this.emit("data",r),r},E.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},E.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,g("pipe count=%d opts=%j",i.pipesCount,t);var o=t&&!1===t.end||e===n.stdout||e===n.stderr?b:l;function a(t,n){g("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,g("cleanup"),e.removeListener("close",v),e.removeListener("finish",y),e.removeListener("drain",h),e.removeListener("error",m),e.removeListener("unpipe",a),r.removeListener("end",l),r.removeListener("end",b),r.removeListener("data",p),d=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function l(){g("onend"),e.end()}i.endEmitted?s.nextTick(o):r.once("end",o),e.on("unpipe",a);var h=function(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,I(e))}}(r);e.on("drain",h);var d=!1,f=!1;function p(t){g("ondata"),f=!1,!1!==e.write(t)||f||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==j(i.pipes,e))&&!d&&(g("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,f=!0),r.pause())}function m(t){g("onerror",t),b(),e.removeListener("error",m),0===u(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",y),b()}function y(){g("onfinish"),e.removeListener("close",v),b()}function b(){g("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?c(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",m),e.once("close",v),e.once("finish",y),e.emit("pipe",r),i.flowing||(g("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var a=j(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},E.prototype.on=function(e,t){var n=h.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&_(this):s.nextTick(L,this))}return n},E.prototype.addListener=E.prototype.on,E.prototype.resume=function(){var e=this._readableState;return e.flowing||(g("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,s.nextTick(D,e,t))}(this,e)),this},E.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this},E.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(g("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){g("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<x.length;o++)e.on(x[o],this.emit.bind(this,x[o]));return this._read=function(t){g("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),E._fromList=R}).call(this,e("_process"),void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":214,"./internal/streams/BufferList":219,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/get-prototype-of":59,"core-util-is":189,events:192,inherits:196,isarray:198,"process-nextick-args":207,"safe-buffer":228,"string_decoder/":235,util:71}],217:[function(e,t,n){"use strict";var r,i=e("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};t.exports=c;var a=e("./_stream_duplex"),s=(0,o.default)(e("core-util-is"));function l(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);a.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",u)}function u(){var e=this;"function"==typeof this._flush?this._flush((function(t,n){h(e,t,n)})):h(this,null,null)}function h(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),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)}s.inherits=e("inherits"),s.inherits(c,a),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,a.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},c.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},c.prototype._destroy=function(e,t){var n=this;a.prototype._destroy.call(this,e,(function(e){t(e),n.emit("close")}))}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(e,t,n){(function(n,r){"use strict";var i=c(e("babel-runtime/core-js/object/define-property")),o=c(e("babel-runtime/core-js/symbol/has-instance")),a=c(e("babel-runtime/core-js/symbol")),s=c(e("babel-runtime/core-js/object/create")),l=c(e("babel-runtime/core-js/set-immediate"));function c(e){return e&&e.__esModule?e:{default:e}}var u=e("process-nextick-args");function h(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}t.exports=S;var d,f=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?l.default:u.nextTick;S.WritableState=E;var p=(0,s.default)(e("core-util-is"));p.inherits=e("inherits");var m,g={deprecate:e("util-deprecate")},v=e("./internal/streams/stream"),y=e("safe-buffer").Buffer,b=r.Uint8Array||function(){},x=e("./internal/streams/destroy");function w(){}function E(t,n){d=d||e("./_stream_duplex"),t=t||{};var r=n instanceof d;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,o=t.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,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 s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(u.nextTick(i,r),u.nextTick(A,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),A(e,t))}(e,n,r,t,i);else{var o=T(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||_(e,n),r?f(k,e,n,o,i):k(e,n,o,i)}}(n,e)},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 h(this)}function S(t){if(d=d||e("./_stream_duplex"),!(m.call(S,this)||this instanceof d))return new S(t);this._writableState=new E(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),v.call(this)}function C(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function k(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),A(e,t)}function _(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,s=!0;n;)i[a]=n,n.isBuf||(s=!1),n=n.next,a+=1;i.allBuffers=s,C(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new h(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,u=n.callback;if(C(e,t,!1,t.objectMode?1:l.length,l,c,u),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function T(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),A(e,t)}))}function A(e,t){var n=T(t);return n&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,u.nextTick(O,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}p.inherits(S,v),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:g.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof a.default&&o.default&&"function"==typeof Function.prototype[o.default]?(m=Function.prototype[o.default],(0,i.default)(S,o.default,{value:function(e){return!!m.call(this,e)||this===S&&e&&e._writableState instanceof E}})):m=function(e){return e instanceof this},S.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},S.prototype.write=function(e,t,n){var r,i=this._writableState,o=!1,a=!i.objectMode&&(r=e,y.isBuffer(r)||r instanceof b);return a&&!y.isBuffer(e)&&(e=function(e){return y.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=w),i.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),u.nextTick(t,n)}(this,n):(a||function(e,t,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),u.nextTick(r,o),i=!1),i}(this,i,e,n))&&(i.pendingcb++,o=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=y.from(t,n)),t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else C(e,t,!1,s,r,i,o);return l}(this,i,a,e,t,n)),o},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||_(this,e))},S.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},S.prototype._writev=null,S.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,A(e,t),n&&(t.finished?u.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=x.destroy,S.prototype._undestroy=x.undestroy,S.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":214,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/set-immediate":62,"babel-runtime/core-js/symbol":64,"babel-runtime/core-js/symbol/has-instance":65,"core-util-is":189,inherits:196,"process-nextick-args":207,"safe-buffer":228,"util-deprecate":240}],219:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,i,o=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=o,i=s,t.copy(n,i),s+=a.data.length,a=a.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":228,util:71}],220:[function(e,t,n){"use strict";var r=e("process-nextick-args");function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var n=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(i,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){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)}}},{"process-nextick-args":207}],221:[function(e,t,n){"use strict";t.exports=e("events").EventEmitter},{events:192}],222:[function(e,t,n){t.exports=e("./readable").PassThrough},{"./readable":223}],223:[function(e,t,n){(n=t.exports=e("./lib/_stream_readable.js")).Stream=n,n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":214,"./lib/_stream_passthrough.js":215,"./lib/_stream_readable.js":216,"./lib/_stream_transform.js":217,"./lib/_stream_writable.js":218}],224:[function(e,t,n){t.exports=e("./readable").Transform},{"./readable":223}],225:[function(e,t,n){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(e,t,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=e("./runtime"),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(e,t,n){!function(e){"use strict";var n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag",l="object"==typeof t,c=e.regeneratorRuntime;if(c)l&&(t.exports=c);else{(c=e.regeneratorRuntime=l?t.exports:{}).wrap=m;var u={},h={};h[o]=function(){return this};var d=Object.getPrototypeOf,f=d&&d(d(_([])));f&&f!==n&&r.call(f,o)&&(h=f);var p=b.prototype=v.prototype=Object.create(h);y.prototype=p.constructor=b,b.constructor=y,b[s]=y.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(p),e},c.awrap=function(e){return{__await:e}},x(w.prototype),w.prototype[a]=function(){return this},c.AsyncIterator=w,c.async=function(e,t,n,r){var i=new w(m(e,t,n,r));return c.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(p),p[s]="Generator",p[o]=function(){return this},p.toString=function(){return"[object Generator]"},c.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},c.values=_,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:_(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}}}function m(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,o=Object.create(i.prototype),a=new k(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=g(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function g(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function v(){}function y(){}function b(){}function x(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function w(e){var t;this._invoke=function(n,i){function o(){return new Promise((function(t,o){!function t(n,i,o,a){var s=g(e[n],e,i);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"==typeof c&&r.call(c,"__await")?Promise.resolve(c.__await).then((function(e){t("next",e,o,a)}),(function(e){t("throw",e,o,a)})):Promise.resolve(c).then((function(e){l.value=e,o(l)}),a)}a(s.arg)}(n,i,t,o)}))}return t=t?t.then(o,o):o()}}function E(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=g(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function _(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}}(function(){return this}()||Function("return this")())},{}],228:[function(e,t,n){var r=e("buffer"),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,n),n.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:73}],229:[function(e,t,n){(function(t){"use strict";var r=c(e("babel-runtime/core-js/string/from-code-point")),i=c(e("babel-runtime/core-js/json/stringify")),o=c(e("babel-runtime/helpers/typeof")),a=c(e("babel-runtime/core-js/object/define-property")),s=c(e("babel-runtime/core-js/object/keys")),l=c(e("babel-runtime/core-js/object/create"));function c(e){return e&&e.__esModule?e:{default:e}}!function(n){n.parser=function(e,t){return new h(e,t)},n.SAXParser=h,n.SAXStream=f,n.createStream=function(e,t){return new f(e,t)},n.MAX_BUFFER_LENGTH=65536;var c,u=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function h(e,t){if(!(this instanceof h))return new h(e,t);!function(e){for(var t=0,n=u.length;t<n;t++)e[u[t]]=""}(this),this.q=this.c="",this.bufferCheckPosition=n.MAX_BUFFER_LENGTH,this.opt=t||{},this.opt.lowercase=this.opt.lowercase||this.opt.lowercasetags,this.looseCase=this.opt.lowercase?"toLowerCase":"toUpperCase",this.tags=[],this.closed=this.closedRoot=this.sawRoot=!1,this.tag=this.error=null,this.strict=!!e,this.noscript=!(!e&&!this.opt.noscript),this.state=O.BEGIN,this.strictEntities=this.opt.strictEntities,this.ENTITIES=this.strictEntities?(0,l.default)(n.XML_ENTITIES):(0,l.default)(n.ENTITIES),this.attribList=[],this.opt.xmlns&&(this.ns=(0,l.default)(m)),this.trackPosition=!1!==this.opt.position,this.trackPosition&&(this.position=this.line=this.column=0),L(this,"onready")}n.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],l.default||(Object.create=function(e){function t(){}return t.prototype=e,new t}),s.default||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),h.prototype={end:function(){N(this)},write:function(e){if(this.error)throw this.error;if(this.closed)return M(this,"Cannot write after close. Assign an onready handler.");if(null===e)return N(this);"object"===(void 0===e?"undefined":(0,o.default)(e))&&(e=e.toString());for(var t=0,r="";r=V(e,t++),this.c=r,r;)switch(this.trackPosition&&(this.position++,"\n"===r?(this.line++,this.column=0):this.column++),this.state){case O.BEGIN:if(this.state=O.BEGIN_WHITESPACE,"\ufeff"===r)continue;G(this,r);continue;case O.BEGIN_WHITESPACE:G(this,r);continue;case O.TEXT:if(this.sawRoot&&!this.closedRoot){for(var i=t-1;r&&"<"!==r&&"&"!==r;)(r=V(e,t++))&&this.trackPosition&&(this.position++,"\n"===r?(this.line++,this.column=0):this.column++);this.textNode+=e.substring(i,t-1)}"<"!==r||this.sawRoot&&this.closedRoot&&!this.strict?(x(r)||this.sawRoot&&!this.closedRoot||j(this,"Text data outside of root node."),"&"===r?this.state=O.TEXT_ENTITY:this.textNode+=r):(this.state=O.OPEN_WAKA,this.startTagPosition=this.position);continue;case O.SCRIPT:"<"===r?this.state=O.SCRIPT_ENDING:this.script+=r;continue;case O.SCRIPT_ENDING:"/"===r?this.state=O.CLOSE_TAG:(this.script+="<"+r,this.state=O.SCRIPT);continue;case O.OPEN_WAKA:if("!"===r)this.state=O.SGML_DECL,this.sgmlDecl="";else if(x(r));else if(S(g,r))this.state=O.OPEN_TAG,this.tagName=r;else if("/"===r)this.state=O.CLOSE_TAG,this.tagName="";else if("?"===r)this.state=O.PROC_INST,this.procInstName=this.procInstBody="";else{if(j(this,"Unencoded <"),this.startTagPosition+1<this.position){var a=this.position-this.startTagPosition;r=new Array(a).join(" ")+r}this.textNode+="<"+r,this.state=O.TEXT}continue;case O.SGML_DECL:"[CDATA["===(this.sgmlDecl+r).toUpperCase()?(D(this,"onopencdata"),this.state=O.CDATA,this.sgmlDecl="",this.cdata=""):this.sgmlDecl+r==="--"?(this.state=O.COMMENT,this.comment="",this.sgmlDecl=""):"DOCTYPE"===(this.sgmlDecl+r).toUpperCase()?(this.state=O.DOCTYPE,(this.doctype||this.sawRoot)&&j(this,"Inappropriately located doctype declaration"),this.doctype="",this.sgmlDecl=""):">"===r?(D(this,"onsgmldeclaration",this.sgmlDecl),this.sgmlDecl="",this.state=O.TEXT):w(r)?(this.state=O.SGML_DECL_QUOTED,this.sgmlDecl+=r):this.sgmlDecl+=r;continue;case O.SGML_DECL_QUOTED:r===this.q&&(this.state=O.SGML_DECL,this.q=""),this.sgmlDecl+=r;continue;case O.DOCTYPE:">"===r?(this.state=O.TEXT,D(this,"ondoctype",this.doctype),this.doctype=!0):(this.doctype+=r,"["===r?this.state=O.DOCTYPE_DTD:w(r)&&(this.state=O.DOCTYPE_QUOTED,this.q=r));continue;case O.DOCTYPE_QUOTED:this.doctype+=r,r===this.q&&(this.q="",this.state=O.DOCTYPE);continue;case O.DOCTYPE_DTD:this.doctype+=r,"]"===r?this.state=O.DOCTYPE:w(r)&&(this.state=O.DOCTYPE_DTD_QUOTED,this.q=r);continue;case O.DOCTYPE_DTD_QUOTED:this.doctype+=r,r===this.q&&(this.state=O.DOCTYPE_DTD,this.q="");continue;case O.COMMENT:"-"===r?this.state=O.COMMENT_ENDING:this.comment+=r;continue;case O.COMMENT_ENDING:"-"===r?(this.state=O.COMMENT_ENDED,this.comment=R(this.opt,this.comment),this.comment&&D(this,"oncomment",this.comment),this.comment=""):(this.comment+="-"+r,this.state=O.COMMENT);continue;case O.COMMENT_ENDED:">"!==r?(j(this,"Malformed comment"),this.comment+="--"+r,this.state=O.COMMENT):this.state=O.TEXT;continue;case O.CDATA:"]"===r?this.state=O.CDATA_ENDING:this.cdata+=r;continue;case O.CDATA_ENDING:"]"===r?this.state=O.CDATA_ENDING_2:(this.cdata+="]"+r,this.state=O.CDATA);continue;case O.CDATA_ENDING_2:">"===r?(this.cdata&&D(this,"oncdata",this.cdata),D(this,"onclosecdata"),this.cdata="",this.state=O.TEXT):"]"===r?this.cdata+="]":(this.cdata+="]]"+r,this.state=O.CDATA);continue;case O.PROC_INST:"?"===r?this.state=O.PROC_INST_ENDING:x(r)?this.state=O.PROC_INST_BODY:this.procInstName+=r;continue;case O.PROC_INST_BODY:if(!this.procInstBody&&x(r))continue;"?"===r?this.state=O.PROC_INST_ENDING:this.procInstBody+=r;continue;case O.PROC_INST_ENDING:">"===r?(D(this,"onprocessinginstruction",{name:this.procInstName,body:this.procInstBody}),this.procInstName=this.procInstBody="",this.state=O.TEXT):(this.procInstBody+="?"+r,this.state=O.PROC_INST_BODY);continue;case O.OPEN_TAG:S(v,r)?this.tagName+=r:(P(this),">"===r?U(this):"/"===r?this.state=O.OPEN_TAG_SLASH:(x(r)||j(this,"Invalid character in tag name"),this.state=O.ATTRIB));continue;case O.OPEN_TAG_SLASH:">"===r?(U(this,!0),H(this)):(j(this,"Forward-slash in opening tag not followed by >"),this.state=O.ATTRIB);continue;case O.ATTRIB:if(x(r))continue;">"===r?U(this):"/"===r?this.state=O.OPEN_TAG_SLASH:S(g,r)?(this.attribName=r,this.attribValue="",this.state=O.ATTRIB_NAME):j(this,"Invalid attribute name");continue;case O.ATTRIB_NAME:"="===r?this.state=O.ATTRIB_VALUE:">"===r?(j(this,"Attribute without value"),this.attribValue=this.attribName,F(this),U(this)):x(r)?this.state=O.ATTRIB_NAME_SAW_WHITE:S(v,r)?this.attribName+=r:j(this,"Invalid attribute name");continue;case O.ATTRIB_NAME_SAW_WHITE:if("="===r)this.state=O.ATTRIB_VALUE;else{if(x(r))continue;j(this,"Attribute without value"),this.tag.attributes[this.attribName]="",this.attribValue="",D(this,"onattribute",{name:this.attribName,value:""}),this.attribName="",">"===r?U(this):S(g,r)?(this.attribName=r,this.state=O.ATTRIB_NAME):(j(this,"Invalid attribute name"),this.state=O.ATTRIB)}continue;case O.ATTRIB_VALUE:if(x(r))continue;w(r)?(this.q=r,this.state=O.ATTRIB_VALUE_QUOTED):(j(this,"Unquoted attribute value"),this.state=O.ATTRIB_VALUE_UNQUOTED,this.attribValue=r);continue;case O.ATTRIB_VALUE_QUOTED:if(r!==this.q){"&"===r?this.state=O.ATTRIB_VALUE_ENTITY_Q:this.attribValue+=r;continue}F(this),this.q="",this.state=O.ATTRIB_VALUE_CLOSED;continue;case O.ATTRIB_VALUE_CLOSED:x(r)?this.state=O.ATTRIB:">"===r?U(this):"/"===r?this.state=O.OPEN_TAG_SLASH:S(g,r)?(j(this,"No whitespace between attributes"),this.attribName=r,this.attribValue="",this.state=O.ATTRIB_NAME):j(this,"Invalid attribute name");continue;case O.ATTRIB_VALUE_UNQUOTED:if(!E(r)){"&"===r?this.state=O.ATTRIB_VALUE_ENTITY_U:this.attribValue+=r;continue}F(this),">"===r?U(this):this.state=O.ATTRIB;continue;case O.CLOSE_TAG:if(this.tagName)">"===r?H(this):S(v,r)?this.tagName+=r:this.script?(this.script+="</"+this.tagName,this.tagName="",this.state=O.SCRIPT):(x(r)||j(this,"Invalid tagname in closing tag"),this.state=O.CLOSE_TAG_SAW_WHITE);else{if(x(r))continue;C(g,r)?this.script?(this.script+="</"+r,this.state=O.SCRIPT):j(this,"Invalid tagname in closing tag."):this.tagName=r}continue;case O.CLOSE_TAG_SAW_WHITE:if(x(r))continue;">"===r?H(this):j(this,"Invalid characters in closing tag");continue;case O.TEXT_ENTITY:case O.ATTRIB_VALUE_ENTITY_Q:case O.ATTRIB_VALUE_ENTITY_U:var s,l;switch(this.state){case O.TEXT_ENTITY:s=O.TEXT,l="textNode";break;case O.ATTRIB_VALUE_ENTITY_Q:s=O.ATTRIB_VALUE_QUOTED,l="attribValue";break;case O.ATTRIB_VALUE_ENTITY_U:s=O.ATTRIB_VALUE_UNQUOTED,l="attribValue"}";"===r?(this[l]+=z(this),this.entity="",this.state=s):S(this.entity.length?b:y,r)?this.entity+=r:(j(this,"Invalid character in entity name"),this[l]+="&"+this.entity+r,this.entity="",this.state=s);continue;default:throw new Error(this,"Unknown state: "+this.state)}return this.position>=this.bufferCheckPosition&&function(e){for(var t=Math.max(n.MAX_BUFFER_LENGTH,10),r=0,i=0,o=u.length;i<o;i++){var a=e[u[i]].length;if(a>t)switch(u[i]){case"textNode":I(e);break;case"cdata":D(e,"oncdata",e.cdata),e.cdata="";break;case"script":D(e,"onscript",e.script),e.script="";break;default:M(e,"Max buffer length exceeded: "+u[i])}r=Math.max(r,a)}var s=n.MAX_BUFFER_LENGTH-r;e.bufferCheckPosition=s+e.position}(this),this}
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;I(e=this),""!==e.cdata&&(D(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(D(e,"onscript",e.script),e.script="")}};try{c=e("stream").Stream}catch(e){c=function(){}}var d=n.EVENTS.filter((function(e){return"error"!==e&&"end"!==e}));function f(e,t){if(!(this instanceof f))return new f(e,t);c.apply(this),this._parser=new h(e,t),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(e){n.emit("error",e),n._parser.error=null},this._decoder=null,d.forEach((function(e){(0,a.default)(n,"on"+e,{get:function(){return n._parser["on"+e]},set:function(t){if(!t)return n.removeAllListeners(e),n._parser["on"+e]=t,t;n.on(e,t)},enumerable:!0,configurable:!1})}))}f.prototype=(0,l.default)(c.prototype,{constructor:{value:f}}),f.prototype.write=function(n){if("function"==typeof t&&"function"==typeof t.isBuffer&&t.isBuffer(n)){if(!this._decoder){var r=e("string_decoder").StringDecoder;this._decoder=new r("utf8")}n=this._decoder.write(n)}return this._parser.write(n.toString()),this.emit("data",n),!0},f.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},f.prototype.on=function(e,t){var n=this;return n._parser["on"+e]||-1===d.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),c.prototype.on.call(n,e,t)};var p="http://www.w3.org/XML/1998/namespace",m={xml:p,xmlns:"http://www.w3.org/2000/xmlns/"},g=/[:_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]/,v=/[:_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-]/,y=/[#:_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]/,b=/[#:_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-]/;function x(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function w(e){return'"'===e||"'"===e}function E(e){return">"===e||x(e)}function S(e,t){return e.test(t)}function C(e,t){return!S(e,t)}var k,_,T,O=0;for(var A in n.STATE={BEGIN:O++,BEGIN_WHITESPACE:O++,TEXT:O++,TEXT_ENTITY:O++,OPEN_WAKA:O++,SGML_DECL:O++,SGML_DECL_QUOTED:O++,DOCTYPE:O++,DOCTYPE_QUOTED:O++,DOCTYPE_DTD:O++,DOCTYPE_DTD_QUOTED:O++,COMMENT_STARTING:O++,COMMENT:O++,COMMENT_ENDING:O++,COMMENT_ENDED:O++,CDATA:O++,CDATA_ENDING:O++,CDATA_ENDING_2:O++,PROC_INST:O++,PROC_INST_BODY:O++,PROC_INST_ENDING:O++,OPEN_TAG:O++,OPEN_TAG_SLASH:O++,ATTRIB:O++,ATTRIB_NAME:O++,ATTRIB_NAME_SAW_WHITE:O++,ATTRIB_VALUE:O++,ATTRIB_VALUE_QUOTED:O++,ATTRIB_VALUE_CLOSED:O++,ATTRIB_VALUE_UNQUOTED:O++,ATTRIB_VALUE_ENTITY_Q:O++,ATTRIB_VALUE_ENTITY_U:O++,CLOSE_TAG:O++,CLOSE_TAG_SAW_WHITE:O++,SCRIPT:O++,SCRIPT_ENDING:O++},n.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},n.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,s.default)(n.ENTITIES).forEach((function(e){var t=n.ENTITIES[e],r="number"==typeof t?String.fromCharCode(t):t;n.ENTITIES[e]=r})),n.STATE)n.STATE[n.STATE[A]]=A;function L(e,t,n){e[t]&&e[t](n)}function D(e,t,n){e.textNode&&I(e),L(e,t,n)}function I(e){e.textNode=R(e.opt,e.textNode),e.textNode&&L(e,"ontext",e.textNode),e.textNode=""}function R(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function M(e,t){return I(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,L(e,"onerror",t),e}function N(e){return e.sawRoot&&!e.closedRoot&&j(e,"Unclosed root tag"),e.state!==O.BEGIN&&e.state!==O.BEGIN_WHITESPACE&&e.state!==O.TEXT&&M(e,"Unexpected end"),I(e),e.c="",e.closed=!0,L(e,"onend"),h.call(e,e.strict,e.opt),e}function j(e,t){if("object"!==(void 0===e?"undefined":(0,o.default)(e))||!(e instanceof h))throw new Error("bad call to strictFail");e.strict&&M(e,t)}function P(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0,D(e,"onopentagstart",n)}function B(e,t){var n=e.indexOf(":")<0?["",e]:e.split(":"),r=n[0],i=n[1];return t&&"xmlns"===e&&(r="xmlns",i=""),{prefix:r,local:i}}function F(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=B(e.attribName,!0),n=t.prefix,r=t.local;if("xmlns"===n)if("xml"===r&&e.attribValue!==p)j(e,"xml: prefix must be bound to "+p+"\nActual: "+e.attribValue);else if("xmlns"===r&&"http://www.w3.org/2000/xmlns/"!==e.attribValue)j(e,"xmlns: prefix must be bound to http://www.w3.org/2000/xmlns/\nActual: "+e.attribValue);else{var i=e.tag,o=e.tags[e.tags.length-1]||e;i.ns===o.ns&&(i.ns=(0,l.default)(o.ns)),i.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,D(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function U(e,t){if(e.opt.xmlns){var n=e.tag,r=B(e.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(j(e,"Unbound namespace prefix: "+(0,i.default)(e.tagName)),n.uri=r.prefix);var o=e.tags[e.tags.length-1]||e;n.ns&&o.ns!==n.ns&&(0,s.default)(n.ns).forEach((function(t){D(e,"onopennamespace",{prefix:t,uri:n.ns[t]})}));for(var a=0,l=e.attribList.length;a<l;a++){var c=e.attribList[a],u=c[0],h=c[1],d=B(u,!0),f=d.prefix,p=d.local,m=""===f?"":n.ns[f]||"",g={name:u,value:h,prefix:f,local:p,uri:m};f&&"xmlns"!==f&&!m&&(j(e,"Unbound namespace prefix: "+(0,i.default)(f)),g.uri=f),e.tag.attributes[u]=g,D(e,"onattribute",g)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),D(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=O.TEXT:e.state=O.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function H(e){if(!e.tagName)return j(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=O.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=O.SCRIPT);D(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());for(var r=n;t--&&e.tags[t].name!==r;)j(e,"Unexpected close tag");if(t<0)return j(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=O.TEXT);e.tagName=n;for(var i=e.tags.length;i-- >t;){var o=e.tag=e.tags.pop();e.tagName=e.tag.name,D(e,"onclosetag",e.tagName);var a={};for(var l in o.ns)a[l]=o.ns[l];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&o.ns!==c.ns&&(0,s.default)(o.ns).forEach((function(t){var n=o.ns[t];D(e,"onclosenamespace",{prefix:t,uri:n})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=O.TEXT}function z(e){var t,n=e.entity,i=n.toLowerCase(),o="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[i]?e.ENTITIES[i]:("#"===(n=i).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),o=(t=parseInt(n,16)).toString(16)):(n=n.slice(1),o=(t=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),isNaN(t)||o.toLowerCase()!==n?(j(e,"Invalid character entity"),"&"+e.entity+";"):(0,r.default)(t))}function G(e,t){"<"===t?(e.state=O.OPEN_WAKA,e.startTagPosition=e.position):x(t)||(j(e,"Non-whitespace before first tag."),e.textNode=t,e.state=O.TEXT)}function V(e,t){var n="";return t<e.length&&(n=e.charAt(t)),n}O=n.STATE,r.default||(k=String.fromCharCode,_=Math.floor,T=function(){var e,t,n=16384,r=[],i=-1,o=arguments.length;if(!o)return"";for(var a="";++i<o;){var s=Number(arguments[i]);if(!isFinite(s)||s<0||s>1114111||_(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?r.push(s):(e=55296+((s-=65536)>>10),t=s%1024+56320,r.push(e,t)),(i+1===o||r.length>n)&&(a+=k.apply(null,r),r.length=0)}return a},a.default?Object.defineProperty(String,"fromCodePoint",{value:T,configurable:!0,writable:!0}):String.fromCodePoint=T)}(void 0===n?(void 0).sax={}:n)}).call(this,e("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/string/from-code-point":63,"babel-runtime/helpers/typeof":67,buffer:73,stream:230,string_decoder:72}],230:[function(e,t,n){t.exports=i;var r=e("events").EventEmitter;function i(){r.call(this)}e("inherits")(i,r),i.Readable=e("readable-stream/readable.js"),i.Writable=e("readable-stream/writable.js"),i.Duplex=e("readable-stream/duplex.js"),i.Transform=e("readable-stream/transform.js"),i.PassThrough=e("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",l));var a=!1;function s(){a||(a=!0,e.end())}function l(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",l),n.removeListener("error",c),e.removeListener("error",c),n.removeListener("end",u),n.removeListener("close",u),e.removeListener("close",u)}return n.on("error",c),e.on("error",c),n.on("end",u),n.on("close",u),e.on("close",u),e.emit("pipe",n),e}},{events:192,inherits:196,"readable-stream/duplex.js":213,"readable-stream/passthrough.js":222,"readable-stream/readable.js":223,"readable-stream/transform.js":224,"readable-stream/writable.js":225}],231:[function(e,t,n){(function(t){var r=e("./lib/request"),i=e("./lib/response"),o=e("xtend"),a=e("builtin-status-codes"),s=e("url"),l=n;l.request=function(e,n){e="string"==typeof e?s.parse(e):o(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,l=e.hostname||e.host,c=e.port,u=e.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),e.url=(l?a+"//"+l:"")+(c?":"+c:"")+u,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var h=new r(e);return n&&h.on("response",n),h},l.get=function(e,t){var n=l.request(e,t);return n.end(),n},l.ClientRequest=r,l.IncomingMessage=i.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=a,l.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,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":233,"./lib/response":234,"builtin-status-codes":74,url:238,xtend:283}],232:[function(e,t,n){(function(e){"use strict";n.fetch=s(e.fetch)&&s(e.ReadableStream),n.writableStream=s(e.WritableStream),n.abortController=s(e.AbortController),n.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),n.blobConstructor=!0}catch(e){}var t;function r(){if(void 0!==t)return t;if(e.XMLHttpRequest){t=new e.XMLHttpRequest;try{t.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){t=null}}else t=null;return t}function i(e){var t=r();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var o=void 0!==e.ArrayBuffer,a=o&&s(e.ArrayBuffer.prototype.slice);function s(e){return"function"==typeof e}n.arraybuffer=n.fetch||o&&i("arraybuffer"),n.msstream=!n.fetch&&a&&i("ms-stream"),n.mozchunkedarraybuffer=!n.fetch&&o&&i("moz-chunked-arraybuffer"),n.overrideMimeType=n.fetch||!!r()&&s(r().overrideMimeType),n.vbArray=s(e.VBArray),t=null}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],233:[function(e,t,n){(function(n,r,i){"use strict";var o,a=e("babel-runtime/core-js/object/keys"),s=(o=a)&&o.__esModule?o:{default:o},l=e("./capability"),c=e("inherits"),u=e("./response"),h=e("readable-stream"),d=e("to-arraybuffer"),f=u.IncomingMessage,p=u.readyStates,m=t.exports=function(e){var t,n=this;h.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+new i(e.auth).toString("base64")),(0,s.default)(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var r=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!l.abortController)r=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!l.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}n._mode=function(e,t){return l.fetch&&t?"fetch":l.mozchunkedarraybuffer?"moz-chunked-arraybuffer":l.msstream?"ms-stream":l.arraybuffer&&e?"arraybuffer":l.vbArray&&e?"text:vbarray":"text"}(t,r),n._fetchTimer=null,n.on("finish",(function(){n._onFinish()}))};c(m,h.Writable),m.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===g.indexOf(n)&&(this._headers[n]={name:e,value:t})},m.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},m.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},m.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts,o=e._headers,a=null;"GET"!==t.method&&"HEAD"!==t.method&&(a=l.arraybuffer?d(i.concat(e._body)):l.blobConstructor?new r.Blob(e._body.map((function(e){return d(e)})),{type:(o["content-type"]||{}).value||""}):i.concat(e._body).toString());var c=[];if((0,s.default)(o).forEach((function(e){var t=o[e].name,n=o[e].value;Array.isArray(n)?n.forEach((function(e){c.push([t,e])})):c.push([t,n])})),"fetch"===e._mode){var u=null;if(l.abortController){var h=new AbortController;u=h.signal,e._fetchAbortController=h,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=r.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}r.fetch(e._opts.url,{method:e._opts.method,headers:c,body:a||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:u}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){r.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)}))}else{var f=e._xhr=new r.XMLHttpRequest;try{f.open(e._opts.method,e._opts.url,!0)}catch(t){return void n.nextTick((function(){e.emit("error",t)}))}"responseType"in f&&(f.responseType=e._mode.split(":")[0]),"withCredentials"in f&&(f.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in f&&f.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(f.timeout=t.requestTimeout,f.ontimeout=function(){e.emit("requestTimeout")}),c.forEach((function(e){f.setRequestHeader(e[0],e[1])})),e._response=null,f.onreadystatechange=function(){switch(f.readyState){case p.LOADING:case p.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(f.onprogress=function(){e._onXHRProgress()}),f.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{f.send(a)}catch(t){return void n.nextTick((function(){e.emit("error",t)}))}}}},m.prototype._onXHRProgress=function(){(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},m.prototype._connect=function(){var e=this;e._destroyed||(e._response=new f(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},m.prototype._write=function(e,t,n){this._body.push(e),n()},m.prototype.abort=m.prototype.destroy=function(){this._destroyed=!0,r.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},m.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),h.Writable.prototype.end.call(this,e,t,n)},m.prototype.flushHeaders=function(){},m.prototype.setTimeout=function(){},m.prototype.setNoDelay=function(){},m.prototype.setSocketKeepAlive=function(){};var g=["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,e("_process"),void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":232,"./response":234,_process:208,"babel-runtime/core-js/object/keys":60,buffer:73,inherits:196,"readable-stream":223,"to-arraybuffer":237}],234:[function(e,t,n){(function(t,r,i){"use strict";var o,a=e("babel-runtime/core-js/promise"),s=(o=a)&&o.__esModule?o:{default:o},l=e("./capability"),c=e("inherits"),u=e("readable-stream"),h=n.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},d=n.IncomingMessage=function(e,n,o,a){var c=this;if(u.Readable.call(c),c._mode=o,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){t.nextTick((function(){c.emit("close")}))})),"fetch"===o){if(c._fetchResponse=n,c.url=n.url,c.statusCode=n.status,c.statusMessage=n.statusText,n.headers.forEach((function(e,t){c.headers[t.toLowerCase()]=e,c.rawHeaders.push(t,e)})),l.writableStream){var h=new WritableStream({write:function(e){return new s.default((function(t,n){c._destroyed?n():c.push(new i(e))?t():c._resumeFetch=t}))},close:function(){r.clearTimeout(a),c._destroyed||c.push(null)},abort:function(e){c._destroyed||c.emit("error",e)}});try{return void n.body.pipeTo(h).catch((function(e){r.clearTimeout(a),c._destroyed||c.emit("error",e)}))}catch(e){}}var d=n.body.getReader();!function e(){d.read().then((function(t){if(!c._destroyed){if(t.done)return r.clearTimeout(a),void c.push(null);c.push(new i(t.value)),e()}})).catch((function(e){r.clearTimeout(a),c._destroyed||c.emit("error",e)}))}()}else if(c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===c.headers[n]&&(c.headers[n]=[]),c.headers[n].push(t[2])):void 0!==c.headers[n]?c.headers[n]+=", "+t[2]:c.headers[n]=t[2],c.rawHeaders.push(t[1],t[2])}})),c._charset="x-user-defined",!l.overrideMimeType){var f=c.rawHeaders["mime-type"];if(f){var p=f.match(/;\s*charset=([^;])(;|$)/);p&&(c._charset=p[1].toLowerCase())}c._charset||(c._charset="utf-8")}};c(d,u.Readable),d.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},d.prototype._onXHRProgress=function(){var e=this,t=e._xhr,n=null;switch(e._mode){case"text:vbarray":if(t.readyState!==h.DONE)break;try{n=new r.VBArray(t.responseBody).toArray()}catch(e){}if(null!==n){e.push(new i(n));break}case"text":try{n=t.responseText}catch(t){e._mode="text:vbarray";break}if(n.length>e._pos){var o=n.substr(e._pos);if("x-user-defined"===e._charset){for(var a=new i(o.length),s=0;s<o.length;s++)a[s]=255&o.charCodeAt(s);e.push(a)}else e.push(o,e._charset);e._pos=n.length}break;case"arraybuffer":if(t.readyState!==h.DONE||!t.response)break;n=t.response,e.push(new i(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=t.response,t.readyState!==h.LOADING||!n)break;e.push(new i(new Uint8Array(n)));break;case"ms-stream":if(n=t.response,t.readyState!==h.LOADING)break;var l=new r.MSStreamReader;l.onprogress=function(){l.result.byteLength>e._pos&&(e.push(new i(new Uint8Array(l.result.slice(e._pos)))),e._pos=l.result.byteLength)},l.onload=function(){e.push(null)},l.readAsArrayBuffer(n)}e._xhr.readyState===h.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,e("_process"),void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.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}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=h,t=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"<22>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function u(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}n.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>":t},o.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=a(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=a(t[r]))>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=a(t[r]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":228}],236:[function(e,t,n){(function(t,r){var i=e("process/browser.js").nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},l=0;function c(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new c(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new c(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=l++,r=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,i((function(){s[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete s[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(e,t,n){var r=e("buffer").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(r.isBuffer(e)){for(var t=new Uint8Array(e.length),n=e.length,i=0;i<n;i++)t[i]=e[i];return t.buffer}throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(e,t,n){"use strict";var r=e("punycode"),i=e("./util");function o(){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}n.parse=b,n.resolve=function(e,t){return b(e,!1,!0).resolve(t)},n.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},n.format=function(e){return i.isString(e)&&(e=b(e)),e instanceof o?e.format():o.prototype.format.call(e)},n.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(c),h=["%","/","?",";","#"].concat(u),d=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=e("querystring");function b(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o<e.indexOf("#")?"?":"#",c=e.split(s);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(s);if(b=b.trim(),!n&&1===e.split("#").length){var x=l.exec(b);if(x)return this.path=b,this.href=b,this.pathname=x[1],x[2]?(this.search=x[2],this.query=t?y.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=a.exec(b);if(w){var E=(w=w[0]).toLowerCase();this.protocol=E,b=b.substr(w.length)}if(n||w||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===b.substr(0,2);!S||w&&g[w]||(b=b.substr(2),this.slashes=!0)}if(!g[w]&&(S||w&&!v[w])){for(var C,k,_=-1,T=0;T<d.length;T++)-1!==(O=b.indexOf(d[T]))&&(-1===_||O<_)&&(_=O);for(-1!==(k=-1===_?b.lastIndexOf("@"):b.lastIndexOf("@",_))&&(C=b.slice(0,k),b=b.slice(k+1),this.auth=decodeURIComponent(C)),_=-1,T=0;T<h.length;T++){var O;-1!==(O=b.indexOf(h[T]))&&(-1===_||O<_)&&(_=O)}-1===_&&(_=b.length),this.host=b.slice(0,_),b=b.slice(_),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var L=this.hostname.split(/\./),D=(T=0,L.length);T<D;T++){var I=L[T];if(I&&!I.match(f)){for(var R="",M=0,N=I.length;M<N;M++)I.charCodeAt(M)>127?R+="x":R+=I[M];if(!R.match(f)){var j=L.slice(0,T),P=L.slice(T+1),B=I.match(p);B&&(j.push(B[1]),P.unshift(B[2])),P.length&&(b="/"+P.join(".")+b),this.hostname=j.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=r.toASCII(this.hostname));var F=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+F,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[E])for(T=0,D=u.length;T<D;T++){var H=u[T];if(-1!==b.indexOf(H)){var z=encodeURIComponent(H);z===H&&(z=escape(H)),b=b.split(H).join(z)}}var G=b.indexOf("#");-1!==G&&(this.hash=b.substr(G),b=b.slice(0,G));var V=b.indexOf("?");if(-1!==V?(this.search=b.substr(V),this.query=b.substr(V+1),t&&(this.query=y.parse(this.query)),b=b.slice(0,V)):t&&(this.search="",this.query={}),b&&(this.pathname=b),v[E]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var W=this.search||"";this.path=F+W}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,a="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(a=y.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||v[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+o+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},o.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var n=new o,r=Object.keys(this),a=0;a<r.length;a++){var s=r[a];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),c=0;c<l.length;c++){var u=l[c];"protocol"!==u&&(n[u]=e[u])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!v[e.protocol]){for(var h=Object.keys(e),d=0;d<h.length;d++){var f=h[d];n[f]=e[f]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||g[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",y=n.search||"";n.path=m+y}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var b=n.pathname&&"/"===n.pathname.charAt(0),x=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=x||b||n.host&&e.pathname,E=w,S=n.pathname&&n.pathname.split("/")||[],C=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!v[n.protocol]);if(C&&(n.hostname="",n.port=null,n.host&&(""===S[0]?S[0]=n.host:S.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),w=w&&(""===p[0]||""===S[0])),x)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,S=p;else if(p.length)S||(S=[]),S.pop(),S=S.concat(p),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search))return C&&(n.hostname=n.host=S.shift(),(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift())),n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!S.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var k=S.slice(-1)[0],_=(n.host||e.host||S.length>1)&&("."===k||".."===k)||""===k,T=0,O=S.length;O>=0;O--)"."===(k=S[O])?S.splice(O,1):".."===k?(S.splice(O,1),T++):T&&(S.splice(O,1),T--);if(!w&&!E)for(;T--;T)S.unshift("..");!w||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),_&&"/"!==S.join("/").substr(-1)&&S.push("");var A,L=""===S[0]||S[0]&&"/"===S[0].charAt(0);return C&&(n.hostname=n.host=L?"":S.length?S.shift():"",(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift())),(w=w||n.host&&S.length)&&!L&&S.unshift(""),S.length?n.pathname=S.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":239,punycode:209,querystring:212}],239:[function(e,t,n){"use strict";t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],240:[function(e,t,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],241:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],242:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],243:[function(e,t,n){(function(t,r){var i=/%[sdj%]/g;n.format=function(e){if(!v(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(s(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),l=r[n];n<o;l=r[++n])m(l)||!x(l)?a+=" "+l:a+=" "+s(l);return a},n.deprecate=function(e,i){if(y(r.process))return function(){return n.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var o=!1;return function(){if(!o){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),o=!0}return e.apply(this,arguments)}};var o,a={};function s(e,t){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(t)?r.showHidden=t:t&&n._extend(r,t),y(r.showHidden)&&(r.showHidden=!1),y(r.depth)&&(r.depth=2),y(r.colors)&&(r.colors=!1),y(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),u(r,e,r.depth)}function l(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function c(e,t){return e}function u(e,t,r){if(e.customInspect&&t&&S(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return v(i)||(i=u(e,i,r)),i}var o=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):p(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,t);if(o)return o;var a=Object.keys(t),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),E(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(t);if(0===a.length){if(S(t)){var l=t.name?": "+t.name:"";return e.stylize("[Function"+l+"]","special")}if(b(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(w(t))return e.stylize(Date.prototype.toString.call(t),"date");if(E(t))return h(t)}var c,x="",C=!1,k=["{","}"];return f(t)&&(C=!0,k=["[","]"]),S(t)&&(x=" [Function"+(t.name?": "+t.name:"")+"]"),b(t)&&(x=" "+RegExp.prototype.toString.call(t)),w(t)&&(x=" "+Date.prototype.toUTCString.call(t)),E(t)&&(x=" "+h(t)),0!==a.length||C&&0!=t.length?r<0?b(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=C?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)O(t,String(a))?o.push(d(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(d(e,t,n,r,i,!0))})),o}(e,t,r,s,a):a.map((function(n){return d(e,t,r,s,n,C)})),e.seen.pop(),function(e,t,n){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,x,k)):k[0]+x+k[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,i,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),O(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=m(n)?u(e,l.value,null):u(e,l.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),y(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function f(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function y(e){return void 0===e}function b(e){return x(e)&&"[object RegExp]"===C(e)}function x(e){return"object"==typeof e&&null!==e}function w(e){return x(e)&&"[object Date]"===C(e)}function E(e){return x(e)&&("[object Error]"===C(e)||e instanceof Error)}function S(e){return"function"==typeof e}function C(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}n.debuglog=function(e){if(y(o)&&(o=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var r=t.pid;a[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else a[e]=function(){};return a[e]},n.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=f,n.isBoolean=p,n.isNull=m,n.isNullOrUndefined=function(e){return null==e},n.isNumber=g,n.isString=v,n.isSymbol=function(e){return"symbol"==typeof e},n.isUndefined=y,n.isRegExp=b,n.isObject=x,n.isDate=w,n.isError=E,n.isFunction=S,n.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},n.isBuffer=e("./support/isBuffer");var _=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(){var e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":");return[e.getDate(),_[e.getMonth()],t].join(" ")}function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.log=function(){console.log("%s - %s",T(),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!x(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("_process"),void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(e,t,n){"use strict";(function(){n.stripBOM=function(e){return"\ufeff"===e[0]?e.substring(1):e}}).call(void 0)},{}],245:[function(e,t,n){"use strict";var r=o(e("babel-runtime/helpers/typeof")),i=o(e("babel-runtime/core-js/object/keys"));function o(e){return e&&e.__esModule?e:{default:e}}(function(){var t,o,a,s,l,c={}.hasOwnProperty;t=e("xmlbuilder"),o=e("./defaults").defaults,s=function(e){return"string"==typeof e&&(e.indexOf("&")>=0||e.indexOf(">")>=0||e.indexOf("<")>=0)},l=function(e){return"<![CDATA["+a(e)+"]]>"},a=function(e){return e.replace("]]>","]]]]><![CDATA[>")},n.Builder=function(){function e(e){var t,n,r;for(t in this.options={},n=o[.2])c.call(n,t)&&(r=n[t],this.options[t]=r);for(t in e)c.call(e,t)&&(r=e[t],this.options[t]=r)}return e.prototype.buildObject=function(e){var n,a,u,h,d,f;return n=this.options.attrkey,a=this.options.charkey,1===(0,i.default)(e).length&&this.options.rootName===o[.2].rootName?e=e[d=(0,i.default)(e)[0]]:d=this.options.rootName,f=this,u=function(e,t){var i,o,h,d,p,m;if("object"!==(void 0===t?"undefined":(0,r.default)(t)))f.options.cdata&&s(t)?e.raw(l(t)):e.txt(t);else if(Array.isArray(t)){for(d in t)if(c.call(t,d))for(p in o=t[d])h=o[p],e=u(e.ele(p),h).up()}else for(p in t)if(c.call(t,p))if(o=t[p],p===n){if("object"===(void 0===o?"undefined":(0,r.default)(o)))for(i in o)m=o[i],e=e.att(i,m)}else if(p===a)e=f.options.cdata&&s(o)?e.raw(l(o)):e.txt(o);else if(Array.isArray(o))for(d in o)c.call(o,d)&&(e="string"==typeof(h=o[d])?f.options.cdata&&s(h)?e.ele(p).raw(l(h)).up():e.ele(p,h).up():u(e.ele(p),h).up());else"object"===(void 0===o?"undefined":(0,r.default)(o))?e=u(e.ele(p),o).up():"string"==typeof o&&f.options.cdata&&s(o)?e=e.ele(p).raw(l(o)).up():(null==o&&(o=""),e=e.ele(p,o.toString()).up());return e},h=t.create(d,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),u(h,e).end(this.options.renderOpts)},e}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(e,t,n){"use strict";(function(){n.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:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],247:[function(e,t,n){"use strict";var r=s(e("babel-runtime/core-js/promise")),i=s(e("babel-runtime/core-js/object/get-own-property-names")),o=s(e("babel-runtime/core-js/object/keys")),a=s(e("babel-runtime/helpers/typeof"));function s(e){return e&&e.__esModule?e:{default:e}}(function(){var t,s,l,c,u,h,d,f,p=function(e,t){return function(){return e.apply(t,arguments)}},m={}.hasOwnProperty;d=e("sax"),l=e("events"),t=e("./bom"),h=e("./processors"),f=e("timers").setImmediate,s=e("./defaults").defaults,c=function(e){return"object"===(void 0===e?"undefined":(0,a.default)(e))&&null!=e&&0===(0,o.default)(e).length},u=function(e,t,n){var r,i;for(r=0,i=e.length;r<i;r++)t=(0,e[r])(t,n);return t},n.Parser=function(e){function l(e){var t,r,i;if(this.parseStringPromise=p(this.parseStringPromise,this),this.parseString=p(this.parseString,this),this.reset=p(this.reset,this),this.assignOrPush=p(this.assignOrPush,this),this.processAsync=p(this.processAsync,this),!(this instanceof n.Parser))return new n.Parser(e);for(t in this.options={},r=s[.2])m.call(r,t)&&(i=r[t],this.options[t]=i);for(t in e)m.call(e,t)&&(i=e[t],this.options[t]=i);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(h.normalize)),this.reset()}return function(e,t){for(var n in t)m.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(l,e),l.prototype.processAsync=function(){var e,t;try{return this.remaining.length<=this.options.chunkSize?(e=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(e),this.saxParser.close()):(e=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(e),f(this.processAsync))}catch(e){if(t=e,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(t)}},l.prototype.assignOrPush=function(e,t,n){return t in e?(e[t]instanceof Array||(e[t]=[e[t]]),e[t].push(n)):this.options.explicitArray?e[t]=[n]:e[t]=n},l.prototype.reset=function(){var e,t,n,r,s;return this.removeAllListeners(),this.saxParser=d.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(s=this,function(e){if(s.saxParser.resume(),!s.saxParser.errThrown)return s.saxParser.errThrown=!0,s.emit("error",e)}),this.saxParser.onend=function(e){return function(){if(!e.saxParser.ended)return e.saxParser.ended=!0,e.emit("end",e.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,r=[],e=this.options.attrkey,t=this.options.charkey,this.saxParser.onopentag=function(n){return function(i){var o,a,s,l,c;if((s={})[t]="",!n.options.ignoreAttrs)for(o in c=i.attributes)m.call(c,o)&&(e in s||n.options.mergeAttrs||(s[e]={}),a=n.options.attrValueProcessors?u(n.options.attrValueProcessors,i.attributes[o],o):i.attributes[o],l=n.options.attrNameProcessors?u(n.options.attrNameProcessors,o):o,n.options.mergeAttrs?n.assignOrPush(s,l,a):s[e][l]=a);return s["#name"]=n.options.tagNameProcessors?u(n.options.tagNameProcessors,i.name):i.name,n.options.xmlns&&(s[n.options.xmlnskey]={uri:i.uri,local:i.local}),r.push(s)}}(this),this.saxParser.onclosetag=function(e){return function(){var n,s,l,h,d,f,p,g,v,y;if(f=r.pop(),d=f["#name"],e.options.explicitChildren&&e.options.preserveChildrenOrder||delete f["#name"],!0===f.cdata&&(n=f.cdata,delete f.cdata),v=r[r.length-1],f[t].match(/^\s*$/)&&!n?(s=f[t],delete f[t]):(e.options.trim&&(f[t]=f[t].trim()),e.options.normalize&&(f[t]=f[t].replace(/\s{2,}/g," ").trim()),f[t]=e.options.valueProcessors?u(e.options.valueProcessors,f[t],d):f[t],1===(0,o.default)(f).length&&t in f&&!e.EXPLICIT_CHARKEY&&(f=f[t])),c(f)&&(f=""!==e.options.emptyTag?e.options.emptyTag:s),null!=e.options.validator&&(y="/"+function(){var e,t,n;for(n=[],e=0,t=r.length;e<t;e++)h=r[e],n.push(h["#name"]);return n}().concat(d).join("/"),function(){var t;try{f=e.options.validator(y,v&&v[d],f)}catch(n){return t=n,e.emit("error",t)}}()),e.options.explicitChildren&&!e.options.mergeAttrs&&"object"===(void 0===f?"undefined":(0,a.default)(f)))if(e.options.preserveChildrenOrder){if(v){for(l in v[e.options.childkey]=v[e.options.childkey]||[],p={},f)m.call(f,l)&&(p[l]=f[l]);v[e.options.childkey].push(p),delete f["#name"],1===(0,o.default)(f).length&&t in f&&!e.EXPLICIT_CHARKEY&&(f=f[t])}}else h={},e.options.attrkey in f&&(h[e.options.attrkey]=f[e.options.attrkey],delete f[e.options.attrkey]),!e.options.charsAsChildren&&e.options.charkey in f&&(h[e.options.charkey]=f[e.options.charkey],delete f[e.options.charkey]),(0,i.default)(f).length>0&&(h[e.options.childkey]=f),f=h;return r.length>0?e.assignOrPush(v,d,f):(e.options.explicitRoot&&(g=f,(f={})[d]=g),e.resultObject=f,e.saxParser.ended=!0,e.emit("end",e.resultObject))}}(this),n=function(e){return function(n){var i,o;if(o=r[r.length-1])return o[t]+=n,e.options.explicitChildren&&e.options.preserveChildrenOrder&&e.options.charsAsChildren&&(e.options.includeWhiteChars||""!==n.replace(/\\n/g,"").trim())&&(o[e.options.childkey]=o[e.options.childkey]||[],(i={"#name":"__text__"})[t]=n,e.options.normalize&&(i[t]=i[t].replace(/\s{2,}/g," ").trim()),o[e.options.childkey].push(i)),o}}(this),this.saxParser.ontext=n,this.saxParser.oncdata=function(e){var t;if(t=n(e))return t.cdata=!0}},l.prototype.parseString=function(e,n){var r;null!=n&&"function"==typeof n&&(this.on("end",(function(e){return this.reset(),n(null,e)})),this.on("error",(function(e){return this.reset(),n(e)})));try{return""===(e=e.toString()).trim()?(this.emit("end",null),!0):(e=t.stripBOM(e),this.options.async?(this.remaining=e,f(this.processAsync),this.saxParser):this.saxParser.write(e).close())}catch(e){if(r=e,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",r),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw r}},l.prototype.parseStringPromise=function(e){return new r.default((t=this,function(n,r){return t.parseString(e,(function(e,t){return e?r(e):n(t)}))}));var t},l}(l),n.parseString=function(e,t,r){var i,o;return null!=r?("function"==typeof r&&(i=r),"object"===(void 0===t?"undefined":(0,a.default)(t))&&(o=t)):("function"==typeof t&&(i=t),o={}),new n.Parser(o).parseString(e,i)},n.parseStringPromise=function(e,t){var r;return"object"===(void 0===t?"undefined":(0,a.default)(t))&&(r=t),new n.Parser(r).parseStringPromise(e)}}).call(void 0)},{"./bom":244,"./defaults":246,"./processors":248,"babel-runtime/core-js/object/get-own-property-names":58,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/helpers/typeof":67,events:192,sax:229,timers:236}],248:[function(e,t,n){"use strict";(function(){var e;e=new RegExp(/(?!xmlns)^.*:/),n.normalize=function(e){return e.toLowerCase()},n.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},n.stripPrefix=function(t){return t.replace(e,"")},n.parseNumbers=function(e){return isNaN(e)||(e=e%1==0?parseInt(e,10):parseFloat(e)),e},n.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e="true"===e.toLowerCase()),e}}).call(void 0)},{}],249:[function(e,t,n){"use strict";(function(){var t,r,i,o,a={}.hasOwnProperty;r=e("./defaults"),t=e("./builder"),i=e("./parser"),o=e("./processors"),n.defaults=r.defaults,n.processors=o,n.ValidationError=function(e){function t(e){this.message=e}return function(e,t){for(var n in t)a.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,Error),t}(),n.Builder=t.Builder,n.Parser=i.Parser,n.parseString=i.parseString,n.parseStringPromise=i.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(e,t,n){"use strict";(function(){t.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(e,t,n){"use strict";(function(){t.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(void 0)},{}],252:[function(e,t,n){"use strict";var r=a(e("babel-runtime/core-js/object/get-prototype-of")),i=a(e("babel-runtime/helpers/typeof")),o=a(e("babel-runtime/core-js/object/assign"));function a(e){return e&&e.__esModule?e:{default:e}}(function(){var e,n,a,s,l,c,u,h=[].slice,d={}.hasOwnProperty;e=function(){var e,t,n,r,i,a;if(a=arguments[0],i=2<=arguments.length?h.call(arguments,1):[],l(o.default))o.default.apply(null,arguments);else for(e=0,n=i.length;e<n;e++)if(null!=(r=i[e]))for(t in r)d.call(r,t)&&(a[t]=r[t]);return a},l=function(e){return!!e&&"[object Function]"===Object.prototype.toString.call(e)},c=function(e){var t;return!!e&&("function"===(t=void 0===e?"undefined":(0,i.default)(e))||"object"===t)},a=function(e){return l(Array.isArray)?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},s=function(e){var t;if(a(e))return!e.length;for(t in e)if(d.call(e,t))return!1;return!0},u=function(e){var t,n;return c(e)&&(n=(0,r.default)(e))&&(t=n.constructor)&&"function"==typeof t&&t instanceof t&&Function.prototype.toString.call(t)===Function.prototype.toString.call(Object)},n=function(e){return l(e.valueOf)?e.valueOf():e},t.exports.assign=e,t.exports.isFunction=l,t.exports.isObject=c,t.exports.isArray=a,t.exports.isEmpty=s,t.exports.isPlainObject=u,t.exports.getValue=n}).call(void 0)},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/get-prototype-of":59,"babel-runtime/helpers/typeof":67}],253:[function(e,t,n){"use strict";(function(){t.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(e,t,n){"use strict";var r,i=e("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n;n=e("./NodeType"),e("./XMLNode"),t.exports=function(){function e(e,t,r){if(this.parent=e,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),null==t)throw new Error("Missing attribute name. "+this.debugInfo(t));this.name=this.stringify.name(t),this.value=this.stringify.attValue(r),this.type=n.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(e.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(e.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}}),Object.defineProperty(e.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(e.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(e.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(e.prototype,"specified",{get:function(){return!0}}),e.prototype.clone=function(){return(0,o.default)(this)},e.prototype.toString=function(e){return this.options.writer.attribute(this,this.options.writer.filterOptions(e))},e.prototype.debugInfo=function(e){return null==(e=e||this.name)?"parent: <"+this.parent.name+">":"attribute: {"+e+"}, parent: <"+this.parent.name+">"},e.prototype.isEqualNode=function(e){return e.namespaceURI===this.namespaceURI&&e.prefix===this.prefix&&e.localName===this.localName&&e.value===this.value},e}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(e,t,n){"use strict";var r,i=e("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n,r,i={}.hasOwnProperty;n=e("./NodeType"),r=e("./XMLCharacterData"),t.exports=function(e){function t(e,r){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=n.CData,this.value=this.stringify.cdata(r)}return function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){return(0,o.default)(this)},t.prototype.toString=function(e){return this.options.writer.cdata(this,this.options.writer.filterOptions(e))},t}(r)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(e,t,n){"use strict";var r,i=e("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n,r={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e){t.__super__.constructor.call(this,e),this.value=""}return function(e,t){for(var n in t)r.call(t,n)&&(e[n]=t[n]);function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype}(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.value},set:function(e){return this.value=e||""}}),Object.defineProperty(t.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}}),t.prototype.clone=function(){return(0,o.default)(this)},t.prototype.substringData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.appendData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.insertData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.deleteData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.replaceData=function(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isEqualNode=function(e){return!!t.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)&&e.data===this.data},t}(n)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(e,t,n){"use strict";var r,i=e("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n,r,i={}.hasOwnProperty;n=e("./NodeType"),r=e("./XMLCharacterData"),t.exports=function(e){function t(e,r){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=n.Comment,this.value=this.stringify.comment(r)}return function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){return(0,o.default)(this)},t.prototype.toString=function(e){return this.options.writer.comment(this,this.options.writer.filterOptions(e))},t}(r)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(e,t,n){"use strict";var r=o(e("babel-runtime/core-js/object/keys")),i=o(e("babel-runtime/core-js/object/create"));function o(e){return e&&e.__esModule?e:{default:e}}(function(){var n,o;n=e("./XMLDOMErrorHandler"),o=e("./XMLDOMStringList"),t.exports=function(){function e(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new n,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=(0,i.default)(this.defaultParams)}return Object.defineProperty(e.prototype,"parameterNames",{get:function(){return new o((0,r.default)(this.defaultParams))}}),e.prototype.getParameter=function(e){return this.params.hasOwnProperty(e)?this.params[e]:null},e.prototype.canSetParameter=function(e,t){return!0},e.prototype.setParameter=function(e,t){return null!=t?this.params[e]=t:delete this.params[e]},e}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(e,t,n){"use strict";(function(){t.exports=function(){function e(){}return e.prototype.handleError=function(e){throw new Error(e)},e}()}).call(void 0)},{}],260:[function(e,t,n){"use strict";(function(){t.exports=function(){function e(){}return e.prototype.hasFeature=function(e,t){return!0},e.prototype.createDocumentType=function(e,t,n){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(e,t,n){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(e){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(e,t){throw new Error("This DOM method is not implemented.")},e}()}).call(void 0)},{}],261:[function(e,t,n){"use strict";(function(){t.exports=function(){function e(e){this.arr=e||[]}return Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(e){return this.arr[e]||null},e.prototype.contains=function(e){return-1!==this.arr.indexOf(e)},e}()}).call(void 0)},{}],262:[function(e,t,n){"use strict";(function(){var n,r,i={}.hasOwnProperty;r=e("./XMLNode"),n=e("./NodeType"),t.exports=function(e){function t(e,r,i,o,a,s){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing DTD element name. "+this.debugInfo());if(null==i)throw new Error("Missing DTD attribute name. "+this.debugInfo(r));if(!o)throw new Error("Missing DTD attribute type. "+this.debugInfo(r));if(!a)throw new Error("Missing DTD attribute default. "+this.debugInfo(r));if(0!==a.indexOf("#")&&(a="#"+a),!a.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(r));if(s&&!a.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(r));this.elementName=this.stringify.name(r),this.type=n.AttributeDeclaration,this.attributeName=this.stringify.name(i),this.attributeType=this.stringify.dtdAttType(o),s&&(this.defaultValue=this.stringify.dtdAttDefault(s)),this.defaultValueType=a}return function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),t.prototype.toString=function(e){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(e))},t}(r)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(e,t,n){"use strict";(function(){var n,r,i={}.hasOwnProperty;r=e("./XMLNode"),n=e("./NodeType"),t.exports=function(e){function t(e,r,i){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing DTD element name. "+this.debugInfo());i||(i="(#PCDATA)"),Array.isArray(i)&&(i="("+i.join(",")+")"),this.name=this.stringify.name(r),this.type=n.ElementDeclaration,this.value=this.stringify.dtdElementValue(i)}return function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),t.prototype.toString=function(e){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(e))},t}(r)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(e,t,n){"use strict";(function(){var n,r,i,o={}.hasOwnProperty;i=e("./Utility").isObject,r=e("./XMLNode"),n=e("./NodeType"),t.exports=function(e){function t(e,r,o,a){if(t.__super__.constructor.call(this,e),null==o)throw new Error("Missing DTD entity name. "+this.debugInfo(o));if(null==a)throw new Error("Missing DTD entity value. "+this.debugInfo(o));if(this.pe=!!r,this.name=this.stringify.name(o),this.type=n.EntityDeclaration,i(a)){if(!a.pubID&&!a.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(o));if(a.pubID&&!a.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(o));if(this.internal=!1,null!=a.pubID&&(this.pubID=this.stringify.dtdPubID(a.pubID)),null!=a.sysID&&(this.sysID=this.stringify.dtdSysID(a.sysID)),null!=a.nData&&(this.nData=this.stringify.dtdNData(a.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(o))}else this.value=this.stringify.dtdEntityValue(a),this.internal=!0}return function(e,t){for(var n in t)o.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),Object.defineProperty(t.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(t.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(t.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(t.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(t.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(t.prototype,"xmlVersion",{get:function(){return null}}),t.prototype.toString=function(e){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(e))},t}(r)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(e,t,n){"use strict";(function(){var n,r,i={}.hasOwnProperty;r=e("./XMLNode"),n=e("./NodeType"),t.exports=function(e){function t(e,r,i){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing DTD notation name. "+this.debugInfo(r));if(!i.pubID&&!i.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(r));this.name=this.stringify.name(r),this.type=n.NotationDeclaration,null!=i.pubID&&(this.pubID=this.stringify.dtdPubID(i.pubID)),null!=i.sysID&&(this.sysID=this.stringify.dtdSysID(i.sysID))}return function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),Object.defineProperty(t.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(t.prototype,"systemId",{get:function(){return this.sysID}}),t.prototype.toString=function(e){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(e))},t}(r)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(e,t,n){"use strict";(function(){var n,r,i,o={}.hasOwnProperty;i=e("./Utility").isObject,r=e("./XMLNode"),n=e("./NodeType"),t.exports=function(e){function t(e,r,o,a){var s;t.__super__.constructor.call(this,e),i(r)&&(r=(s=r).version,o=s.encoding,a=s.standalone),r||(r="1.0"),this.type=n.Declaration,this.version=this.stringify.xmlVersion(r),null!=o&&(this.encoding=this.stringify.xmlEncoding(o)),null!=a&&(this.standalone=this.stringify.xmlStandalone(a))}return function(e,t){for(var n in t)o.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),t.prototype.toString=function(e){return this.options.writer.declaration(this,this.options.writer.filterOptions(e))},t}(r)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(e,t,n){"use strict";(function(){var n,r,i,o,a,s,l,c,u={}.hasOwnProperty;c=e("./Utility").isObject,l=e("./XMLNode"),n=e("./NodeType"),r=e("./XMLDTDAttList"),o=e("./XMLDTDEntity"),i=e("./XMLDTDElement"),a=e("./XMLDTDNotation"),s=e("./XMLNamedNodeMap"),t.exports=function(e){function t(e,r,i){var o,a,s,l,u,h;if(t.__super__.constructor.call(this,e),this.type=n.DocType,e.children)for(a=0,s=(l=e.children).length;a<s;a++)if((o=l[a]).type===n.Element){this.name=o.name;break}this.documentObject=e,c(r)&&(r=(u=r).pubID,i=u.sysID),null==i&&(i=(h=[r,i])[0],r=h[1]),null!=r&&(this.pubID=this.stringify.dtdPubID(r)),null!=i&&(this.sysID=this.stringify.dtdSysID(i))}return function(e,t){for(var n in t)u.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),Object.defineProperty(t.prototype,"entities",{get:function(){var e,t,r,i,o;for(i={},t=0,r=(o=this.children).length;t<r;t++)(e=o[t]).type!==n.EntityDeclaration||e.pe||(i[e.name]=e);return new s(i)}}),Object.defineProperty(t.prototype,"notations",{get:function(){var e,t,r,i,o;for(i={},t=0,r=(o=this.children).length;t<r;t++)(e=o[t]).type===n.NotationDeclaration&&(i[e.name]=e);return new s(i)}}),Object.defineProperty(t.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(t.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(t.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),t.prototype.element=function(e,t){var n;return n=new i(this,e,t),this.children.push(n),this},t.prototype.attList=function(e,t,n,i,o){var a;return a=new r(this,e,t,n,i,o),this.children.push(a),this},t.prototype.entity=function(e,t){var n;return n=new o(this,!1,e,t),this.children.push(n),this},t.prototype.pEntity=function(e,t){var n;return n=new o(this,!0,e,t),this.children.push(n),this},t.prototype.notation=function(e,t){var n;return n=new a(this,e,t),this.children.push(n),this},t.prototype.toString=function(e){return this.options.writer.docType(this,this.options.writer.filterOptions(e))},t.prototype.ele=function(e,t){return this.element(e,t)},t.prototype.att=function(e,t,n,r,i){return this.attList(e,t,n,r,i)},t.prototype.ent=function(e,t){return this.entity(e,t)},t.prototype.pent=function(e,t){return this.pEntity(e,t)},t.prototype.not=function(e,t){return this.notation(e,t)},t.prototype.up=function(){return this.root()||this.documentObject},t.prototype.isEqualNode=function(e){return!!t.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)&&e.name===this.name&&e.publicId===this.publicId&&e.systemId===this.systemId},t}(l)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(e,t,n){"use strict";(function(){var n,r,i,o,a,s,l,c={}.hasOwnProperty;l=e("./Utility").isPlainObject,i=e("./XMLDOMImplementation"),r=e("./XMLDOMConfiguration"),o=e("./XMLNode"),n=e("./NodeType"),s=e("./XMLStringifier"),a=e("./XMLStringWriter"),t.exports=function(e){function t(e){t.__super__.constructor.call(this,null),this.name="#document",this.type=n.Document,this.documentURI=null,this.domConfig=new r,e||(e={}),e.writer||(e.writer=new a),this.options=e,this.stringify=new s(e)}return function(e,t){for(var n in t)c.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),Object.defineProperty(t.prototype,"implementation",{value:new i}),Object.defineProperty(t.prototype,"doctype",{get:function(){var e,t,r,i;for(t=0,r=(i=this.children).length;t<r;t++)if((e=i[t]).type===n.DocType)return e;return null}}),Object.defineProperty(t.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(t.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(t.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(t.prototype,"xmlEncoding",{get:function(){return 0!==this.children.length&&this.children[0].type===n.Declaration?this.children[0].encoding:null}}),Object.defineProperty(t.prototype,"xmlStandalone",{get:function(){return 0!==this.children.length&&this.children[0].type===n.Declaration&&"yes"===this.children[0].standalone}}),Object.defineProperty(t.prototype,"xmlVersion",{get:function(){return 0!==this.children.length&&this.children[0].type===n.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(t.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(t.prototype,"origin",{get:function(){return null}}),Object.defineProperty(t.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(t.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(t.prototype,"contentType",{get:function(){return null}}),t.prototype.end=function(e){var t;return t={},e?l(e)&&(t=e,e=this.options.writer):e=this.options.writer,e.document(this,e.filterOptions(t))},t.prototype.toString=function(e){return this.options.writer.document(this,this.options.writer.filterOptions(e))},t.prototype.createElement=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createTextNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createComment=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createCDATASection=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createProcessingInstruction=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createAttribute=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createEntityReference=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.importNode=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createElementNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementById=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.adoptNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.renameNode=function(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementsByClassName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createEvent=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createNodeIterator=function(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createTreeWalker=function(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t}(o)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(e,t,n){"use strict";(function(){var n,r,i,o,a,s,l,c,u,h,d,f,p,m,g,v,y,b,x,w,E,S,C,k={}.hasOwnProperty;C=e("./Utility"),E=C.isObject,w=C.isFunction,S=C.isPlainObject,x=C.getValue,n=e("./NodeType"),f=e("./XMLDocument"),p=e("./XMLElement"),o=e("./XMLCData"),a=e("./XMLComment"),g=e("./XMLRaw"),b=e("./XMLText"),m=e("./XMLProcessingInstruction"),h=e("./XMLDeclaration"),d=e("./XMLDocType"),s=e("./XMLDTDAttList"),c=e("./XMLDTDEntity"),l=e("./XMLDTDElement"),u=e("./XMLDTDNotation"),i=e("./XMLAttribute"),y=e("./XMLStringifier"),v=e("./XMLStringWriter"),r=e("./WriterState"),t.exports=function(){function e(e,t,r){var i;this.name="?xml",this.type=n.Document,e||(e={}),i={},e.writer?S(e.writer)&&(i=e.writer,e.writer=new v):e.writer=new v,this.options=e,this.writer=e.writer,this.writerOptions=this.writer.filterOptions(i),this.stringify=new y(e),this.onDataCallback=t||function(){},this.onEndCallback=r||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return e.prototype.createChildNode=function(e){var t,r,i,o,a,s,l,c;switch(e.type){case n.CData:this.cdata(e.value);break;case n.Comment:this.comment(e.value);break;case n.Element:for(r in i={},l=e.attribs)k.call(l,r)&&(t=l[r],i[r]=t.value);this.node(e.name,i);break;case n.Dummy:this.dummy();break;case n.Raw:this.raw(e.value);break;case n.Text:this.text(e.value);break;case n.ProcessingInstruction:this.instruction(e.target,e.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+e.constructor.name)}for(a=0,s=(c=e.children).length;a<s;a++)o=c[a],this.createChildNode(o),o.type===n.Element&&this.up();return this},e.prototype.dummy=function(){return this},e.prototype.node=function(e,t,n){var r;if(null==e)throw new Error("Missing node name.");if(this.root&&-1===this.currentLevel)throw new Error("Document can only have one root node. "+this.debugInfo(e));return this.openCurrent(),e=x(e),null==t&&(t={}),t=x(t),E(t)||(n=(r=[t,n])[0],t=r[1]),this.currentNode=new p(this,e,t),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,null!=n&&this.text(n),this},e.prototype.element=function(e,t,r){var i,o,a,s,l,c;if(this.currentNode&&this.currentNode.type===n.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(e)||E(e)||w(e))for(s=this.options.noValidation,this.options.noValidation=!0,(c=new f(this.options).element("TEMP_ROOT")).element(e),this.options.noValidation=s,o=0,a=(l=c.children).length;o<a;o++)i=l[o],this.createChildNode(i),i.type===n.Element&&this.up();else this.node(e,t,r);return this},e.prototype.attribute=function(e,t){var n,r;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(e));if(null!=e&&(e=x(e)),E(e))for(n in e)k.call(e,n)&&(r=e[n],this.attribute(n,r));else w(t)&&(t=t.apply()),this.options.keepNullAttributes&&null==t?this.currentNode.attribs[e]=new i(this,e,""):null!=t&&(this.currentNode.attribs[e]=new i(this,e,t));return this},e.prototype.text=function(e){var t;return this.openCurrent(),t=new b(this,e),this.onData(this.writer.text(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.cdata=function(e){var t;return this.openCurrent(),t=new o(this,e),this.onData(this.writer.cdata(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.comment=function(e){var t;return this.openCurrent(),t=new a(this,e),this.onData(this.writer.comment(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.raw=function(e){var t;return this.openCurrent(),t=new g(this,e),this.onData(this.writer.raw(t,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.instruction=function(e,t){var n,r,i,o,a;if(this.openCurrent(),null!=e&&(e=x(e)),null!=t&&(t=x(t)),Array.isArray(e))for(n=0,o=e.length;n<o;n++)r=e[n],this.instruction(r);else if(E(e))for(r in e)k.call(e,r)&&(i=e[r],this.instruction(r,i));else w(t)&&(t=t.apply()),a=new m(this,e,t),this.onData(this.writer.processingInstruction(a,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},e.prototype.declaration=function(e,t,n){var r;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return r=new h(this,e,t,n),this.onData(this.writer.declaration(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.doctype=function(e,t,n){if(this.openCurrent(),null==e)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new d(this,t,n),this.currentNode.rootNodeName=e,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},e.prototype.dtdElement=function(e,t){var n;return this.openCurrent(),n=new l(this,e,t),this.onData(this.writer.dtdElement(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.attList=function(e,t,n,r,i){var o;return this.openCurrent(),o=new s(this,e,t,n,r,i),this.onData(this.writer.dtdAttList(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.entity=function(e,t){var n;return this.openCurrent(),n=new c(this,!1,e,t),this.onData(this.writer.dtdEntity(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.pEntity=function(e,t){var n;return this.openCurrent(),n=new c(this,!0,e,t),this.onData(this.writer.dtdEntity(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.notation=function(e,t){var n;return this.openCurrent(),n=new u(this,e,t),this.onData(this.writer.dtdNotation(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.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},e.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},e.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},e.prototype.openNode=function(e){var t,i,o,a;if(!e.isOpen){if(this.root||0!==this.currentLevel||e.type!==n.Element||(this.root=e),i="",e.type===n.Element){for(o in this.writerOptions.state=r.OpenTag,i=this.writer.indent(e,this.writerOptions,this.currentLevel)+"<"+e.name,a=e.attribs)k.call(a,o)&&(t=a[o],i+=this.writer.attribute(t,this.writerOptions,this.currentLevel));i+=(e.children?">":"/>")+this.writer.endline(e,this.writerOptions,this.currentLevel),this.writerOptions.state=r.InsideTag}else this.writerOptions.state=r.OpenTag,i=this.writer.indent(e,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+e.rootNodeName,e.pubID&&e.sysID?i+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(i+=' SYSTEM "'+e.sysID+'"'),e.children?(i+=" [",this.writerOptions.state=r.InsideTag):(this.writerOptions.state=r.CloseTag,i+=">"),i+=this.writer.endline(e,this.writerOptions,this.currentLevel);return this.onData(i,this.currentLevel),e.isOpen=!0}},e.prototype.closeNode=function(e){var t;if(!e.isClosed)return t="",this.writerOptions.state=r.CloseTag,t=e.type===n.Element?this.writer.indent(e,this.writerOptions,this.currentLevel)+"</"+e.name+">"+this.writer.endline(e,this.writerOptions,this.currentLevel):this.writer.indent(e,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(e,this.writerOptions,this.currentLevel),this.writerOptions.state=r.None,this.onData(t,this.currentLevel),e.isClosed=!0},e.prototype.onData=function(e,t){return this.documentStarted=!0,this.onDataCallback(e,t+1)},e.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},e.prototype.debugInfo=function(e){return null==e?"":"node: <"+e+">"},e.prototype.ele=function(){return this.element.apply(this,arguments)},e.prototype.nod=function(e,t,n){return this.node(e,t,n)},e.prototype.txt=function(e){return this.text(e)},e.prototype.dat=function(e){return this.cdata(e)},e.prototype.com=function(e){return this.comment(e)},e.prototype.ins=function(e,t){return this.instruction(e,t)},e.prototype.dec=function(e,t,n){return this.declaration(e,t,n)},e.prototype.dtd=function(e,t,n){return this.doctype(e,t,n)},e.prototype.e=function(e,t,n){return this.element(e,t,n)},e.prototype.n=function(e,t,n){return this.node(e,t,n)},e.prototype.t=function(e){return this.text(e)},e.prototype.d=function(e){return this.cdata(e)},e.prototype.c=function(e){return this.comment(e)},e.prototype.r=function(e){return this.raw(e)},e.prototype.i=function(e,t){return this.instruction(e,t)},e.prototype.att=function(){return this.currentNode&&this.currentNode.type===n.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.a=function(){return this.currentNode&&this.currentNode.type===n.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.ent=function(e,t){return this.entity(e,t)},e.prototype.pent=function(e,t){return this.pEntity(e,t)},e.prototype.not=function(e,t){return this.notation(e,t)},e}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(e,t,n){"use strict";var r,i=e("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n,r,i={}.hasOwnProperty;r=e("./XMLNode"),n=e("./NodeType"),t.exports=function(e){function t(e){t.__super__.constructor.call(this,e),this.type=n.Dummy}return function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){return(0,o.default)(this)},t.prototype.toString=function(e){return""},t}(r)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(e,t,n){"use strict";var r,i=e("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n,r,i,a,s,l,c,u,h={}.hasOwnProperty;u=e("./Utility"),c=u.isObject,l=u.isFunction,s=u.getValue,a=e("./XMLNode"),n=e("./NodeType"),r=e("./XMLAttribute"),i=e("./XMLNamedNodeMap"),t.exports=function(e){function t(e,r,i){var o,a,s,l;if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(r),this.type=n.Element,this.attribs={},this.schemaTypeInfo=null,null!=i&&this.attribute(i),e.type===n.Document&&(this.isRoot=!0,this.documentObject=e,e.rootObject=this,e.children))for(a=0,s=(l=e.children).length;a<s;a++)if((o=l[a]).type===n.DocType){o.name=this.name;break}}return function(e,t){for(var n in t)h.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(t.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(t.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(t.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(t.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(t.prototype,"attributes",{get:function(){return this.attributeMap&&this.attributeMap.nodes||(this.attributeMap=new i(this.attribs)),this.attributeMap}}),t.prototype.clone=function(){var e,t,n,r;for(t in(n=(0,o.default)(this)).isRoot&&(n.documentObject=null),n.attribs={},r=this.attribs)h.call(r,t)&&(e=r[t],n.attribs[t]=e.clone());return n.children=[],this.children.forEach((function(e){var t;return(t=e.clone()).parent=n,n.children.push(t)})),n},t.prototype.attribute=function(e,t){var n,i;if(null!=e&&(e=s(e)),c(e))for(n in e)h.call(e,n)&&(i=e[n],this.attribute(n,i));else l(t)&&(t=t.apply()),this.options.keepNullAttributes&&null==t?this.attribs[e]=new r(this,e,""):null!=t&&(this.attribs[e]=new r(this,e,t));return this},t.prototype.removeAttribute=function(e){var t,n,r;if(null==e)throw new Error("Missing attribute name. "+this.debugInfo());if(e=s(e),Array.isArray(e))for(n=0,r=e.length;n<r;n++)t=e[n],delete this.attribs[t];else delete this.attribs[e];return this},t.prototype.toString=function(e){return this.options.writer.element(this,this.options.writer.filterOptions(e))},t.prototype.att=function(e,t){return this.attribute(e,t)},t.prototype.a=function(e,t){return this.attribute(e,t)},t.prototype.getAttribute=function(e){return this.attribs.hasOwnProperty(e)?this.attribs[e].value:null},t.prototype.setAttribute=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getAttributeNode=function(e){return this.attribs.hasOwnProperty(e)?this.attribs[e]:null},t.prototype.setAttributeNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.removeAttributeNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.setAttributeNS=function(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.removeAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getAttributeNodeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.setAttributeNodeNS=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.hasAttribute=function(e){return this.attribs.hasOwnProperty(e)},t.prototype.hasAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.setIdAttribute=function(e,t){return this.attribs.hasOwnProperty(e)?this.attribs[e].isId:t},t.prototype.setIdAttributeNS=function(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.setIdAttributeNode=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getElementsByClassName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isEqualNode=function(e){var n,r,i;if(!t.__super__.isEqualNode.apply(this,arguments).isEqualNode(e))return!1;if(e.namespaceURI!==this.namespaceURI)return!1;if(e.prefix!==this.prefix)return!1;if(e.localName!==this.localName)return!1;if(e.attribs.length!==this.attribs.length)return!1;for(n=r=0,i=this.attribs.length-1;0<=i?r<=i:r>=i;n=0<=i?++r:--r)if(!this.attribs[n].isEqualNode(e.attribs[n]))return!1;return!0},t}(a)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(e,t,n){"use strict";var r,i=e("babel-runtime/core-js/object/keys"),o=(r=i)&&r.__esModule?r:{default:r};(function(){t.exports=function(){function e(e){this.nodes=e}return Object.defineProperty(e.prototype,"length",{get:function(){return(0,o.default)(this.nodes).length||0}}),e.prototype.clone=function(){return this.nodes=null},e.prototype.getNamedItem=function(e){return this.nodes[e]},e.prototype.setNamedItem=function(e){var t;return t=this.nodes[e.nodeName],this.nodes[e.nodeName]=e,t||null},e.prototype.removeNamedItem=function(e){var t;return t=this.nodes[e],delete this.nodes[e],t||null},e.prototype.item=function(e){return this.nodes[(0,o.default)(this.nodes)[e]]||null},e.prototype.getNamedItemNS=function(e,t){throw new Error("This DOM method is not implemented.")},e.prototype.setNamedItemNS=function(e){throw new Error("This DOM method is not implemented.")},e.prototype.removeNamedItemNS=function(e,t){throw new Error("This DOM method is not implemented.")},e}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(e,t,n){"use strict";(function(){var n,r,i,o,a,s,l,c,u,h,d,f,p,m,g,v,y,b={}.hasOwnProperty;y=e("./Utility"),v=y.isObject,g=y.isFunction,m=y.isEmpty,p=y.getValue,c=null,i=null,o=null,a=null,s=null,d=null,f=null,h=null,l=null,r=null,u=null,n=null,t.exports=function(){function t(t){this.parent=t,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,c||(c=e("./XMLElement"),i=e("./XMLCData"),o=e("./XMLComment"),a=e("./XMLDeclaration"),s=e("./XMLDocType"),d=e("./XMLRaw"),f=e("./XMLText"),h=e("./XMLProcessingInstruction"),l=e("./XMLDummy"),r=e("./NodeType"),u=e("./XMLNodeList"),e("./XMLNamedNodeMap"),n=e("./DocumentPosition"))}return Object.defineProperty(t.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.childNodeList&&this.childNodeList.nodes||(this.childNodeList=new u(this.children)),this.childNodeList}}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){var e;return e=this.parent.children.indexOf(this),this.parent.children[e-1]||null}}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){var e;return e=this.parent.children.indexOf(this),this.parent.children[e+1]||null}}),Object.defineProperty(t.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(t.prototype,"textContent",{get:function(){var e,t,n,i,o;if(this.nodeType===r.Element||this.nodeType===r.DocumentFragment){for(o="",t=0,n=(i=this.children).length;t<n;t++)(e=i[t]).textContent&&(o+=e.textContent);return o}return null},set:function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),t.prototype.setParent=function(e){var t,n,r,i,o;for(this.parent=e,e&&(this.options=e.options,this.stringify=e.stringify),o=[],n=0,r=(i=this.children).length;n<r;n++)t=i[n],o.push(t.setParent(this));return o},t.prototype.element=function(e,t,n){var r,i,o,a,s,l,c,u,h,d,f;if(l=null,null===t&&null==n&&(t=(h=[{},null])[0],n=h[1]),null==t&&(t={}),t=p(t),v(t)||(n=(d=[t,n])[0],t=d[1]),null!=e&&(e=p(e)),Array.isArray(e))for(o=0,c=e.length;o<c;o++)i=e[o],l=this.element(i);else if(g(e))l=this.element(e.apply());else if(v(e)){for(s in e)if(b.call(e,s))if(f=e[s],g(f)&&(f=f.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===s.indexOf(this.stringify.convertAttKey))l=this.attribute(s.substr(this.stringify.convertAttKey.length),f);else if(!this.options.separateArrayItems&&Array.isArray(f)&&m(f))l=this.dummy();else if(v(f)&&m(f))l=this.element(s);else if(this.options.keepNullNodes||null!=f)if(!this.options.separateArrayItems&&Array.isArray(f))for(a=0,u=f.length;a<u;a++)i=f[a],(r={})[s]=i,l=this.element(r);else v(f)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===s.indexOf(this.stringify.convertTextKey)?l=this.element(f):(l=this.element(s)).element(f):l=this.element(s,f);else l=this.dummy()}else l=this.options.keepNullNodes||null!==n?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===e.indexOf(this.stringify.convertTextKey)?this.text(n):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===e.indexOf(this.stringify.convertCDataKey)?this.cdata(n):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===e.indexOf(this.stringify.convertCommentKey)?this.comment(n):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===e.indexOf(this.stringify.convertRawKey)?this.raw(n):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===e.indexOf(this.stringify.convertPIKey)?this.instruction(e.substr(this.stringify.convertPIKey.length),n):this.node(e,t,n):this.dummy();if(null==l)throw new Error("Could not create any elements with: "+e+". "+this.debugInfo());return l},t.prototype.insertBefore=function(e,t,n){var r,i,o,a,s;if(null!=e?e.type:void 0)return a=t,(o=e).setParent(this),a?(i=children.indexOf(a),s=children.splice(i),children.push(o),Array.prototype.push.apply(children,s)):children.push(o),o;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(e));return i=this.parent.children.indexOf(this),s=this.parent.children.splice(i),r=this.parent.element(e,t,n),Array.prototype.push.apply(this.parent.children,s),r},t.prototype.insertAfter=function(e,t,n){var r,i,o;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(e));return i=this.parent.children.indexOf(this),o=this.parent.children.splice(i+1),r=this.parent.element(e,t,n),Array.prototype.push.apply(this.parent.children,o),r},t.prototype.remove=function(){var e;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return e=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[e,e-e+1].concat([])),this.parent},t.prototype.node=function(e,t,n){var r,i;return null!=e&&(e=p(e)),t||(t={}),t=p(t),v(t)||(n=(i=[t,n])[0],t=i[1]),r=new c(this,e,t),null!=n&&r.text(n),this.children.push(r),r},t.prototype.text=function(e){var t;return v(e)&&this.element(e),t=new f(this,e),this.children.push(t),this},t.prototype.cdata=function(e){var t;return t=new i(this,e),this.children.push(t),this},t.prototype.comment=function(e){var t;return t=new o(this,e),this.children.push(t),this},t.prototype.commentBefore=function(e){var t,n;return t=this.parent.children.indexOf(this),n=this.parent.children.splice(t),this.parent.comment(e),Array.prototype.push.apply(this.parent.children,n),this},t.prototype.commentAfter=function(e){var t,n;return t=this.parent.children.indexOf(this),n=this.parent.children.splice(t+1),this.parent.comment(e),Array.prototype.push.apply(this.parent.children,n),this},t.prototype.raw=function(e){var t;return t=new d(this,e),this.children.push(t),this},t.prototype.dummy=function(){return new l(this)},t.prototype.instruction=function(e,t){var n,r,i,o,a;if(null!=e&&(e=p(e)),null!=t&&(t=p(t)),Array.isArray(e))for(o=0,a=e.length;o<a;o++)n=e[o],this.instruction(n);else if(v(e))for(n in e)b.call(e,n)&&(r=e[n],this.instruction(n,r));else g(t)&&(t=t.apply()),i=new h(this,e,t),this.children.push(i);return this},t.prototype.instructionBefore=function(e,t){var n,r;return n=this.parent.children.indexOf(this),r=this.parent.children.splice(n),this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,r),this},t.prototype.instructionAfter=function(e,t){var n,r;return n=this.parent.children.indexOf(this),r=this.parent.children.splice(n+1),this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,r),this},t.prototype.declaration=function(e,t,n){var i,o;return i=this.document(),o=new a(i,e,t,n),0===i.children.length?i.children.unshift(o):i.children[0].type===r.Declaration?i.children[0]=o:i.children.unshift(o),i.root()||i},t.prototype.dtd=function(e,t){var n,i,o,a,l,c,u,h,d;for(n=this.document(),i=new s(n,e,t),o=a=0,c=(h=n.children).length;a<c;o=++a)if(h[o].type===r.DocType)return n.children[o]=i,i;for(o=l=0,u=(d=n.children).length;l<u;o=++l)if(d[o].isRoot)return n.children.splice(o,0,i),i;return n.children.push(i),i},t.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},t.prototype.root=function(){var e;for(e=this;e;){if(e.type===r.Document)return e.rootObject;if(e.isRoot)return e;e=e.parent}},t.prototype.document=function(){var e;for(e=this;e;){if(e.type===r.Document)return e;e=e.parent}},t.prototype.end=function(e){return this.document().end(e)},t.prototype.prev=function(){var e;if((e=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[e-1]},t.prototype.next=function(){var e;if(-1===(e=this.parent.children.indexOf(this))||e===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[e+1]},t.prototype.importDocument=function(e){var t;return(t=e.root().clone()).parent=this,t.isRoot=!1,this.children.push(t),this},t.prototype.debugInfo=function(e){var t,n;return null!=(e=e||this.name)||(null!=(t=this.parent)?t.name:void 0)?null==e?"parent: <"+this.parent.name+">":(null!=(n=this.parent)?n.name:void 0)?"node: <"+e+">, parent: <"+this.parent.name+">":"node: <"+e+">":""},t.prototype.ele=function(e,t,n){return this.element(e,t,n)},t.prototype.nod=function(e,t,n){return this.node(e,t,n)},t.prototype.txt=function(e){return this.text(e)},t.prototype.dat=function(e){return this.cdata(e)},t.prototype.com=function(e){return this.comment(e)},t.prototype.ins=function(e,t){return this.instruction(e,t)},t.prototype.doc=function(){return this.document()},t.prototype.dec=function(e,t,n){return this.declaration(e,t,n)},t.prototype.e=function(e,t,n){return this.element(e,t,n)},t.prototype.n=function(e,t,n){return this.node(e,t,n)},t.prototype.t=function(e){return this.text(e)},t.prototype.d=function(e){return this.cdata(e)},t.prototype.c=function(e){return this.comment(e)},t.prototype.r=function(e){return this.raw(e)},t.prototype.i=function(e,t){return this.instruction(e,t)},t.prototype.u=function(){return this.up()},t.prototype.importXMLBuilder=function(e){return this.importDocument(e)},t.prototype.replaceChild=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.removeChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.appendChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.hasChildNodes=function(){return 0!==this.children.length},t.prototype.cloneNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isSupported=function(e,t){return!0},t.prototype.hasAttributes=function(){return 0!==this.attribs.length},t.prototype.compareDocumentPosition=function(e){var t;return this===e?0:this.document()!==e.document()?(t=n.Disconnected|n.ImplementationSpecific,Math.random()<.5?t|=n.Preceding:t|=n.Following,t):this.isAncestor(e)?n.Contains|n.Preceding:this.isDescendant(e)?n.Contains|n.Following:this.isPreceding(e)?n.Preceding:n.Following},t.prototype.isSameNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.lookupPrefix=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isDefaultNamespace=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.lookupNamespaceURI=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isEqualNode=function(e){var t,n,r;if(e.nodeType!==this.nodeType)return!1;if(e.children.length!==this.children.length)return!1;for(t=n=0,r=this.children.length-1;0<=r?n<=r:n>=r;t=0<=r?++n:--n)if(!this.children[t].isEqualNode(e.children[t]))return!1;return!0},t.prototype.getFeature=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.setUserData=function(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getUserData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.contains=function(e){return!!e&&(e===this||this.isDescendant(e))},t.prototype.isDescendant=function(e){var t,n,r,i;for(n=0,r=(i=this.children).length;n<r;n++){if(e===(t=i[n]))return!0;if(t.isDescendant(e))return!0}return!1},t.prototype.isAncestor=function(e){return e.isDescendant(this)},t.prototype.isPreceding=function(e){var t,n;return t=this.treePosition(e),n=this.treePosition(this),-1!==t&&-1!==n&&t<n},t.prototype.isFollowing=function(e){var t,n;return t=this.treePosition(e),n=this.treePosition(this),-1!==t&&-1!==n&&t>n},t.prototype.treePosition=function(e){var t,n;return n=0,t=!1,this.foreachTreeNode(this.document(),(function(r){if(n++,!t&&r===e)return t=!0})),t?n:-1},t.prototype.foreachTreeNode=function(e,t){var n,r,i,o,a;for(e||(e=this.document()),r=0,i=(o=e.children).length;r<i;r++){if(a=t(n=o[r]))return a;if(a=this.foreachTreeNode(n,t))return a}},t}()}).call(void 0)},{"./DocumentPosition":250,"./NodeType":251,"./Utility":252,"./XMLCData":255,"./XMLComment":257,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLNamedNodeMap":272,"./XMLNodeList":274,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],274:[function(e,t,n){"use strict";(function(){t.exports=function(){function e(e){this.nodes=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this.nodes.length||0}}),e.prototype.clone=function(){return this.nodes=null},e.prototype.item=function(e){return this.nodes[e]||null},e}()}).call(void 0)},{}],275:[function(e,t,n){"use strict";var r,i=e("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n,r,i={}.hasOwnProperty;n=e("./NodeType"),r=e("./XMLCharacterData"),t.exports=function(e){function t(e,r,i){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing instruction target. "+this.debugInfo());this.type=n.ProcessingInstruction,this.target=this.stringify.insTarget(r),this.name=this.target,i&&(this.value=this.stringify.insValue(i))}return function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){return(0,o.default)(this)},t.prototype.toString=function(e){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(e))},t.prototype.isEqualNode=function(e){return!!t.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)&&e.target===this.target},t}(r)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(e,t,n){"use strict";var r,i=e("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n,r,i={}.hasOwnProperty;n=e("./NodeType"),r=e("./XMLNode"),t.exports=function(e){function t(e,r){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing raw text. "+this.debugInfo());this.type=n.Raw,this.value=this.stringify.raw(r)}return function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){return(0,o.default)(this)},t.prototype.toString=function(e){return this.options.writer.raw(this,this.options.writer.filterOptions(e))},t}(r)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(e,t,n){"use strict";(function(){var n,r,i,o={}.hasOwnProperty;n=e("./NodeType"),i=e("./XMLWriterBase"),r=e("./WriterState"),t.exports=function(e){function t(e,n){this.stream=e,t.__super__.constructor.call(this,n)}return function(e,t){for(var n in t)o.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),t.prototype.endline=function(e,n,i){return e.isLastRootNode&&n.state===r.CloseTag?"":t.__super__.endline.call(this,e,n,i)},t.prototype.document=function(e,t){var n,r,i,o,a,s,l,c,u;for(r=i=0,a=(l=e.children).length;i<a;r=++i)(n=l[r]).isLastRootNode=r===e.children.length-1;for(t=this.filterOptions(t),u=[],o=0,s=(c=e.children).length;o<s;o++)n=c[o],u.push(this.writeChildNode(n,t,0));return u},t.prototype.attribute=function(e,n,r){return this.stream.write(t.__super__.attribute.call(this,e,n,r))},t.prototype.cdata=function(e,n,r){return this.stream.write(t.__super__.cdata.call(this,e,n,r))},t.prototype.comment=function(e,n,r){return this.stream.write(t.__super__.comment.call(this,e,n,r))},t.prototype.declaration=function(e,n,r){return this.stream.write(t.__super__.declaration.call(this,e,n,r))},t.prototype.docType=function(e,t,n){var i,o,a,s;if(n||(n=0),this.openNode(e,t,n),t.state=r.OpenTag,this.stream.write(this.indent(e,t,n)),this.stream.write("<!DOCTYPE "+e.root().name),e.pubID&&e.sysID?this.stream.write(' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'):e.sysID&&this.stream.write(' SYSTEM "'+e.sysID+'"'),e.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(e,t,n)),t.state=r.InsideTag,o=0,a=(s=e.children).length;o<a;o++)i=s[o],this.writeChildNode(i,t,n+1);t.state=r.CloseTag,this.stream.write("]")}return t.state=r.CloseTag,this.stream.write(t.spaceBeforeSlash+">"),this.stream.write(this.endline(e,t,n)),t.state=r.None,this.closeNode(e,t,n)},t.prototype.element=function(e,t,i){var a,s,l,c,u,h,d,f,p;for(d in i||(i=0),this.openNode(e,t,i),t.state=r.OpenTag,this.stream.write(this.indent(e,t,i)+"<"+e.name),f=e.attribs)o.call(f,d)&&(a=f[d],this.attribute(a,t,i));if(c=0===(l=e.children.length)?null:e.children[0],0===l||e.children.every((function(e){return(e.type===n.Text||e.type===n.Raw)&&""===e.value})))t.allowEmpty?(this.stream.write(">"),t.state=r.CloseTag,this.stream.write("</"+e.name+">")):(t.state=r.CloseTag,this.stream.write(t.spaceBeforeSlash+"/>"));else if(!t.pretty||1!==l||c.type!==n.Text&&c.type!==n.Raw||null==c.value){for(this.stream.write(">"+this.endline(e,t,i)),t.state=r.InsideTag,u=0,h=(p=e.children).length;u<h;u++)s=p[u],this.writeChildNode(s,t,i+1);t.state=r.CloseTag,this.stream.write(this.indent(e,t,i)+"</"+e.name+">")}else this.stream.write(">"),t.state=r.InsideTag,t.suppressPrettyCount++,this.writeChildNode(c,t,i+1),t.suppressPrettyCount--,t.state=r.CloseTag,this.stream.write("</"+e.name+">");return this.stream.write(this.endline(e,t,i)),t.state=r.None,this.closeNode(e,t,i)},t.prototype.processingInstruction=function(e,n,r){return this.stream.write(t.__super__.processingInstruction.call(this,e,n,r))},t.prototype.raw=function(e,n,r){return this.stream.write(t.__super__.raw.call(this,e,n,r))},t.prototype.text=function(e,n,r){return this.stream.write(t.__super__.text.call(this,e,n,r))},t.prototype.dtdAttList=function(e,n,r){return this.stream.write(t.__super__.dtdAttList.call(this,e,n,r))},t.prototype.dtdElement=function(e,n,r){return this.stream.write(t.__super__.dtdElement.call(this,e,n,r))},t.prototype.dtdEntity=function(e,n,r){return this.stream.write(t.__super__.dtdEntity.call(this,e,n,r))},t.prototype.dtdNotation=function(e,n,r){return this.stream.write(t.__super__.dtdNotation.call(this,e,n,r))},t}(i)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(e,t,n){"use strict";(function(){var n,r={}.hasOwnProperty;n=e("./XMLWriterBase"),t.exports=function(e){function t(e){t.__super__.constructor.call(this,e)}return function(e,t){for(var n in t)r.call(t,n)&&(e[n]=t[n]);function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype}(t,e),t.prototype.document=function(e,t){var n,r,i,o,a;for(t=this.filterOptions(t),o="",r=0,i=(a=e.children).length;r<i;r++)n=a[r],o+=this.writeChildNode(n,t,0);return t.pretty&&o.slice(-t.newline.length)===t.newline&&(o=o.slice(0,-t.newline.length)),o},t}(n)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(e,t,n){"use strict";(function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},n={}.hasOwnProperty;t.exports=function(){function t(t){var r,i,o;for(r in this.assertLegalName=e(this.assertLegalName,this),this.assertLegalChar=e(this.assertLegalChar,this),t||(t={}),this.options=t,this.options.version||(this.options.version="1.0"),i=t.stringify||{})n.call(i,r)&&(o=i[r],this[r]=o)}return t.prototype.name=function(e){return this.options.noValidation?e:this.assertLegalName(""+e||"")},t.prototype.text=function(e){return this.options.noValidation?e:this.assertLegalChar(this.textEscape(""+e||""))},t.prototype.cdata=function(e){return this.options.noValidation?e:(e=(e=""+e||"").replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(e))},t.prototype.comment=function(e){if(this.options.noValidation)return e;if((e=""+e||"").match(/--/))throw new Error("Comment text cannot contain double-hypen: "+e);return this.assertLegalChar(e)},t.prototype.raw=function(e){return this.options.noValidation?e:""+e||""},t.prototype.attValue=function(e){return this.options.noValidation?e:this.assertLegalChar(this.attEscape(e=""+e||""))},t.prototype.insTarget=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},t.prototype.insValue=function(e){if(this.options.noValidation)return e;if((e=""+e||"").match(/\?>/))throw new Error("Invalid processing instruction value: "+e);return this.assertLegalChar(e)},t.prototype.xmlVersion=function(e){if(this.options.noValidation)return e;if(!(e=""+e||"").match(/1\.[0-9]+/))throw new Error("Invalid version number: "+e);return e},t.prototype.xmlEncoding=function(e){if(this.options.noValidation)return e;if(!(e=""+e||"").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+e);return this.assertLegalChar(e)},t.prototype.xmlStandalone=function(e){return this.options.noValidation?e:e?"yes":"no"},t.prototype.dtdPubID=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},t.prototype.dtdSysID=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},t.prototype.dtdElementValue=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},t.prototype.dtdAttType=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},t.prototype.dtdAttDefault=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},t.prototype.dtdEntityValue=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},t.prototype.dtdNData=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},t.prototype.convertAttKey="@",t.prototype.convertPIKey="?",t.prototype.convertTextKey="#text",t.prototype.convertCDataKey="#cdata",t.prototype.convertCommentKey="#comment",t.prototype.convertRawKey="#raw",t.prototype.assertLegalChar=function(e){var t,n;if(this.options.noValidation)return e;if(t="","1.0"===this.options.version){if(t=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,n=e.match(t))throw new Error("Invalid character in string: "+e+" at index "+n.index)}else if("1.1"===this.options.version&&(t=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,n=e.match(t)))throw new Error("Invalid character in string: "+e+" at index "+n.index);return e},t.prototype.assertLegalName=function(e){var t;if(this.options.noValidation)return e;if(this.assertLegalChar(e),t=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!e.match(t))throw new Error("Invalid character in name");return e},t.prototype.textEscape=function(e){var t;return this.options.noValidation?e:(t=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},t.prototype.attEscape=function(e){var t;return this.options.noValidation?e:(t=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},t}()}).call(void 0)},{}],280:[function(e,t,n){"use strict";var r,i=e("babel-runtime/core-js/object/create"),o=(r=i)&&r.__esModule?r:{default:r};(function(){var n,r,i={}.hasOwnProperty;n=e("./NodeType"),r=e("./XMLCharacterData"),t.exports=function(e){function t(e,r){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=n.Text,this.value=this.stringify.text(r)}return function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(t,e),Object.defineProperty(t.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(t.prototype,"wholeText",{get:function(){var e,t,n;for(n="",t=this.previousSibling;t;)n=t.data+n,t=t.previousSibling;for(n+=this.data,e=this.nextSibling;e;)n+=e.data,e=e.nextSibling;return n}}),t.prototype.clone=function(){return(0,o.default)(this)},t.prototype.toString=function(e){return this.options.writer.text(this,this.options.writer.filterOptions(e))},t.prototype.splitText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.replaceWholeText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t}(r)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(e,t,n){"use strict";(function(){var n,r,i,o={}.hasOwnProperty;i=e("./Utility").assign,n=e("./NodeType"),e("./XMLDeclaration"),e("./XMLDocType"),e("./XMLCData"),e("./XMLComment"),e("./XMLElement"),e("./XMLRaw"),e("./XMLText"),e("./XMLProcessingInstruction"),e("./XMLDummy"),e("./XMLDTDAttList"),e("./XMLDTDElement"),e("./XMLDTDEntity"),e("./XMLDTDNotation"),r=e("./WriterState"),t.exports=function(){function e(e){var t,n,r;for(t in e||(e={}),this.options=e,n=e.writer||{})o.call(n,t)&&(r=n[t],this["_"+t]=this[t],this[t]=r)}return e.prototype.filterOptions=function(e){var t,n,o,a,s,l,c,u;return e||(e={}),e=i({},this.options,e),(t={writer:this}).pretty=e.pretty||!1,t.allowEmpty=e.allowEmpty||!1,t.indent=null!=(n=e.indent)?n:" ",t.newline=null!=(o=e.newline)?o:"\n",t.offset=null!=(a=e.offset)?a:0,t.dontPrettyTextNodes=null!=(s=null!=(l=e.dontPrettyTextNodes)?l:e.dontprettytextnodes)?s:0,t.spaceBeforeSlash=null!=(c=null!=(u=e.spaceBeforeSlash)?u:e.spacebeforeslash)?c:"",!0===t.spaceBeforeSlash&&(t.spaceBeforeSlash=" "),t.suppressPrettyCount=0,t.user={},t.state=r.None,t},e.prototype.indent=function(e,t,n){var r;return!t.pretty||t.suppressPrettyCount?"":t.pretty&&(r=(n||0)+t.offset+1)>0?new Array(r).join(t.indent):""},e.prototype.endline=function(e,t,n){return!t.pretty||t.suppressPrettyCount?"":t.newline},e.prototype.attribute=function(e,t,n){var r;return this.openAttribute(e,t,n),r=" "+e.name+'="'+e.value+'"',this.closeAttribute(e,t,n),r},e.prototype.cdata=function(e,t,n){var i;return this.openNode(e,t,n),t.state=r.OpenTag,i=this.indent(e,t,n)+"<![CDATA[",t.state=r.InsideTag,i+=e.value,t.state=r.CloseTag,i+="]]>"+this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),i},e.prototype.comment=function(e,t,n){var i;return this.openNode(e,t,n),t.state=r.OpenTag,i=this.indent(e,t,n)+"\x3c!-- ",t.state=r.InsideTag,i+=e.value,t.state=r.CloseTag,i+=" --\x3e"+this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),i},e.prototype.declaration=function(e,t,n){var i;return this.openNode(e,t,n),t.state=r.OpenTag,i=this.indent(e,t,n)+"<?xml",t.state=r.InsideTag,i+=' version="'+e.version+'"',null!=e.encoding&&(i+=' encoding="'+e.encoding+'"'),null!=e.standalone&&(i+=' standalone="'+e.standalone+'"'),t.state=r.CloseTag,i+=t.spaceBeforeSlash+"?>",i+=this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),i},e.prototype.docType=function(e,t,n){var i,o,a,s,l;if(n||(n=0),this.openNode(e,t,n),t.state=r.OpenTag,s=this.indent(e,t,n),s+="<!DOCTYPE "+e.root().name,e.pubID&&e.sysID?s+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(s+=' SYSTEM "'+e.sysID+'"'),e.children.length>0){for(s+=" [",s+=this.endline(e,t,n),t.state=r.InsideTag,o=0,a=(l=e.children).length;o<a;o++)i=l[o],s+=this.writeChildNode(i,t,n+1);t.state=r.CloseTag,s+="]"}return t.state=r.CloseTag,s+=t.spaceBeforeSlash+">",s+=this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),s},e.prototype.element=function(e,t,i){var a,s,l,c,u,h,d,f,p,m,g,v,y,b;for(p in i||(i=0),m=!1,g="",this.openNode(e,t,i),t.state=r.OpenTag,g+=this.indent(e,t,i)+"<"+e.name,v=e.attribs)o.call(v,p)&&(a=v[p],g+=this.attribute(a,t,i));if(c=0===(l=e.children.length)?null:e.children[0],0===l||e.children.every((function(e){return(e.type===n.Text||e.type===n.Raw)&&""===e.value})))t.allowEmpty?(g+=">",t.state=r.CloseTag,g+="</"+e.name+">"+this.endline(e,t,i)):(t.state=r.CloseTag,g+=t.spaceBeforeSlash+"/>"+this.endline(e,t,i));else if(!t.pretty||1!==l||c.type!==n.Text&&c.type!==n.Raw||null==c.value){if(t.dontPrettyTextNodes)for(u=0,d=(y=e.children).length;u<d;u++)if(((s=y[u]).type===n.Text||s.type===n.Raw)&&null!=s.value){t.suppressPrettyCount++,m=!0;break}for(g+=">"+this.endline(e,t,i),t.state=r.InsideTag,h=0,f=(b=e.children).length;h<f;h++)s=b[h],g+=this.writeChildNode(s,t,i+1);t.state=r.CloseTag,g+=this.indent(e,t,i)+"</"+e.name+">",m&&t.suppressPrettyCount--,g+=this.endline(e,t,i),t.state=r.None}else g+=">",t.state=r.InsideTag,t.suppressPrettyCount++,m=!0,g+=this.writeChildNode(c,t,i+1),t.suppressPrettyCount--,m=!1,t.state=r.CloseTag,g+="</"+e.name+">"+this.endline(e,t,i);return this.closeNode(e,t,i),g},e.prototype.writeChildNode=function(e,t,r){switch(e.type){case n.CData:return this.cdata(e,t,r);case n.Comment:return this.comment(e,t,r);case n.Element:return this.element(e,t,r);case n.Raw:return this.raw(e,t,r);case n.Text:return this.text(e,t,r);case n.ProcessingInstruction:return this.processingInstruction(e,t,r);case n.Dummy:return"";case n.Declaration:return this.declaration(e,t,r);case n.DocType:return this.docType(e,t,r);case n.AttributeDeclaration:return this.dtdAttList(e,t,r);case n.ElementDeclaration:return this.dtdElement(e,t,r);case n.EntityDeclaration:return this.dtdEntity(e,t,r);case n.NotationDeclaration:return this.dtdNotation(e,t,r);default:throw new Error("Unknown XML node type: "+e.constructor.name)}},e.prototype.processingInstruction=function(e,t,n){var i;return this.openNode(e,t,n),t.state=r.OpenTag,i=this.indent(e,t,n)+"<?",t.state=r.InsideTag,i+=e.target,e.value&&(i+=" "+e.value),t.state=r.CloseTag,i+=t.spaceBeforeSlash+"?>",i+=this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),i},e.prototype.raw=function(e,t,n){var i;return this.openNode(e,t,n),t.state=r.OpenTag,i=this.indent(e,t,n),t.state=r.InsideTag,i+=e.value,t.state=r.CloseTag,i+=this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),i},e.prototype.text=function(e,t,n){var i;return this.openNode(e,t,n),t.state=r.OpenTag,i=this.indent(e,t,n),t.state=r.InsideTag,i+=e.value,t.state=r.CloseTag,i+=this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),i},e.prototype.dtdAttList=function(e,t,n){var i;return this.openNode(e,t,n),t.state=r.OpenTag,i=this.indent(e,t,n)+"<!ATTLIST",t.state=r.InsideTag,i+=" "+e.elementName+" "+e.attributeName+" "+e.attributeType,"#DEFAULT"!==e.defaultValueType&&(i+=" "+e.defaultValueType),e.defaultValue&&(i+=' "'+e.defaultValue+'"'),t.state=r.CloseTag,i+=t.spaceBeforeSlash+">"+this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),i},e.prototype.dtdElement=function(e,t,n){var i;return this.openNode(e,t,n),t.state=r.OpenTag,i=this.indent(e,t,n)+"<!ELEMENT",t.state=r.InsideTag,i+=" "+e.name+" "+e.value,t.state=r.CloseTag,i+=t.spaceBeforeSlash+">"+this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),i},e.prototype.dtdEntity=function(e,t,n){var i;return this.openNode(e,t,n),t.state=r.OpenTag,i=this.indent(e,t,n)+"<!ENTITY",t.state=r.InsideTag,e.pe&&(i+=" %"),i+=" "+e.name,e.value?i+=' "'+e.value+'"':(e.pubID&&e.sysID?i+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(i+=' SYSTEM "'+e.sysID+'"'),e.nData&&(i+=" NDATA "+e.nData)),t.state=r.CloseTag,i+=t.spaceBeforeSlash+">"+this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),i},e.prototype.dtdNotation=function(e,t,n){var i;return this.openNode(e,t,n),t.state=r.OpenTag,i=this.indent(e,t,n)+"<!NOTATION",t.state=r.InsideTag,i+=" "+e.name,e.pubID&&e.sysID?i+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.pubID?i+=' PUBLIC "'+e.pubID+'"':e.sysID&&(i+=' SYSTEM "'+e.sysID+'"'),t.state=r.CloseTag,i+=t.spaceBeforeSlash+">"+this.endline(e,t,n),t.state=r.None,this.closeNode(e,t,n),i},e.prototype.openNode=function(e,t,n){},e.prototype.closeNode=function(e,t,n){},e.prototype.openAttribute=function(e,t,n){},e.prototype.closeAttribute=function(e,t,n){},e}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],282:[function(e,t,n){"use strict";(function(){var n,r,i,o,a,s,l,c,u,h;h=e("./Utility"),c=h.assign,u=h.isFunction,i=e("./XMLDOMImplementation"),o=e("./XMLDocument"),a=e("./XMLDocumentCB"),l=e("./XMLStringWriter"),s=e("./XMLStreamWriter"),n=e("./NodeType"),r=e("./WriterState"),t.exports.create=function(e,t,n,r){var i,a;if(null==e)throw new Error("Root element needs a name.");return r=c({},t,n,r),a=(i=new o(r)).element(e),r.headless||(i.declaration(r),null==r.pubID&&null==r.sysID||i.dtd(r)),a},t.exports.begin=function(e,t,n){var r;return u(e)&&(t=(r=[e,t])[0],n=r[1],e={}),t?new a(e,t,n):new o(e)},t.exports.stringWriter=function(e){return new l(e)},t.exports.streamWriter=function(e,t){return new s(e,t)},t.exports.implementation=new i,t.exports.nodeType=n,t.exports.writerState=r}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(e,t,n){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var i in n)r.call(n,i)&&(e[i]=n[i])}return e};var r=Object.prototype.hasOwnProperty},{}],284:[function(e,t,n){"use strict";var r=e("buffer").Buffer,i={sha1:e("./sha"),md5:e("./md5")},o=r.alloc(64);function a(e,t){var n=i[e=e||"sha1"],a=[];return n||s("algorithm:",e,"is not yet supported"),{update:function(e){return r.isBuffer(e)||(e=r.from(e)),a.push(e),e.length,this},digest:function(e){var i=r.concat(a),s=t?function(e,t,n){r.isBuffer(t)||(t=r.from(t)),r.isBuffer(n)||(n=r.from(n)),t.length>64?t=e(t):t.length<64&&(t=r.concat([t,o],64));for(var i=r.alloc(64),a=r.alloc(64),s=0;s<64;s++)i[s]=54^t[s],a[s]=92^t[s];var l=e(r.concat([i,n]));return e(r.concat([a,l]))}(n,t,i):n(i);return a=null,e?s.toString(e):s}}}function s(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}o.fill(0),n.createHash=function(e){return a(e)},n.createHmac=function(e,t){return a(e,t)},n.createCredentials=function(){s("sorry,createCredentials is not implemented yet")},n.createCipher=function(){s("sorry,createCipher is not implemented yet")},n.createCipheriv=function(){s("sorry,createCipheriv is not implemented yet")},n.createDecipher=function(){s("sorry,createDecipher is not implemented yet")},n.createDecipheriv=function(){s("sorry,createDecipheriv is not implemented yet")},n.createSign=function(){s("sorry,createSign is not implemented yet")},n.createVerify=function(){s("sorry,createVerify is not implemented yet")},n.createDiffieHellman=function(){s("sorry,createDiffieHellman is not implemented yet")},n.pbkdf2=function(){s("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(e,t,n){"use strict";var r=e("buffer").Buffer,i=r.alloc(4);i.fill(0),t.exports={hash:function(e,t,n,o){return r.isBuffer(e)||(e=r.from(e)),function(e,t,n){for(var i=r.alloc(t),o=n?i.writeInt32BE:i.writeInt32LE,a=0;a<e.length;a++)o.call(i,e[a],4*a,!0);return i}(t(function(e,t){if(e.length%4!=0){var n=e.length+(4-e.length%4);e=r.concat([e,i],n)}for(var o=[],a=t?e.readInt32BE:e.readInt32LE,s=0;s<e.length;s+=4)o.push(a.call(e,s));return o}(e,o),8*e.length),n,o)}}},{buffer:73}],286:[function(e,t,n){"use strict";var r=e("./helpers");function i(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,h=0;h<e.length;h+=16){var d=n,f=r,p=i,m=o;n=a(n,r,i,o,e[h+0],7,-680876936),o=a(o,n,r,i,e[h+1],12,-389564586),i=a(i,o,n,r,e[h+2],17,606105819),r=a(r,i,o,n,e[h+3],22,-1044525330),n=a(n,r,i,o,e[h+4],7,-176418897),o=a(o,n,r,i,e[h+5],12,1200080426),i=a(i,o,n,r,e[h+6],17,-1473231341),r=a(r,i,o,n,e[h+7],22,-45705983),n=a(n,r,i,o,e[h+8],7,1770035416),o=a(o,n,r,i,e[h+9],12,-1958414417),i=a(i,o,n,r,e[h+10],17,-42063),r=a(r,i,o,n,e[h+11],22,-1990404162),n=a(n,r,i,o,e[h+12],7,1804603682),o=a(o,n,r,i,e[h+13],12,-40341101),i=a(i,o,n,r,e[h+14],17,-1502002290),n=s(n,r=a(r,i,o,n,e[h+15],22,1236535329),i,o,e[h+1],5,-165796510),o=s(o,n,r,i,e[h+6],9,-1069501632),i=s(i,o,n,r,e[h+11],14,643717713),r=s(r,i,o,n,e[h+0],20,-373897302),n=s(n,r,i,o,e[h+5],5,-701558691),o=s(o,n,r,i,e[h+10],9,38016083),i=s(i,o,n,r,e[h+15],14,-660478335),r=s(r,i,o,n,e[h+4],20,-405537848),n=s(n,r,i,o,e[h+9],5,568446438),o=s(o,n,r,i,e[h+14],9,-1019803690),i=s(i,o,n,r,e[h+3],14,-187363961),r=s(r,i,o,n,e[h+8],20,1163531501),n=s(n,r,i,o,e[h+13],5,-1444681467),o=s(o,n,r,i,e[h+2],9,-51403784),i=s(i,o,n,r,e[h+7],14,1735328473),n=l(n,r=s(r,i,o,n,e[h+12],20,-1926607734),i,o,e[h+5],4,-378558),o=l(o,n,r,i,e[h+8],11,-2022574463),i=l(i,o,n,r,e[h+11],16,1839030562),r=l(r,i,o,n,e[h+14],23,-35309556),n=l(n,r,i,o,e[h+1],4,-1530992060),o=l(o,n,r,i,e[h+4],11,1272893353),i=l(i,o,n,r,e[h+7],16,-155497632),r=l(r,i,o,n,e[h+10],23,-1094730640),n=l(n,r,i,o,e[h+13],4,681279174),o=l(o,n,r,i,e[h+0],11,-358537222),i=l(i,o,n,r,e[h+3],16,-722521979),r=l(r,i,o,n,e[h+6],23,76029189),n=l(n,r,i,o,e[h+9],4,-640364487),o=l(o,n,r,i,e[h+12],11,-421815835),i=l(i,o,n,r,e[h+15],16,530742520),n=c(n,r=l(r,i,o,n,e[h+2],23,-995338651),i,o,e[h+0],6,-198630844),o=c(o,n,r,i,e[h+7],10,1126891415),i=c(i,o,n,r,e[h+14],15,-1416354905),r=c(r,i,o,n,e[h+5],21,-57434055),n=c(n,r,i,o,e[h+12],6,1700485571),o=c(o,n,r,i,e[h+3],10,-1894986606),i=c(i,o,n,r,e[h+10],15,-1051523),r=c(r,i,o,n,e[h+1],21,-2054922799),n=c(n,r,i,o,e[h+8],6,1873313359),o=c(o,n,r,i,e[h+15],10,-30611744),i=c(i,o,n,r,e[h+6],15,-1560198380),r=c(r,i,o,n,e[h+13],21,1309151649),n=c(n,r,i,o,e[h+4],6,-145523070),o=c(o,n,r,i,e[h+11],10,-1120210379),i=c(i,o,n,r,e[h+2],15,718787259),r=c(r,i,o,n,e[h+9],21,-343485551),n=u(n,d),r=u(r,f),i=u(i,p),o=u(o,m)}return Array(n,r,i,o)}function o(e,t,n,r,i,o){return u((a=u(u(t,e),u(r,o)))<<(s=i)|a>>>32-s,n);var a,s}function a(e,t,n,r,i,a,s){return o(t&n|~t&r,e,t,i,a,s)}function s(e,t,n,r,i,a,s){return o(t&r|n&~r,e,t,i,a,s)}function l(e,t,n,r,i,a,s){return o(t^n^r,e,t,i,a,s)}function c(e,t,n,r,i,a,s){return o(n^(t|~r),e,t,i,a,s)}function u(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}t.exports=function(e){return r.hash(e,i,16)}},{"./helpers":285}],287:[function(e,t,n){"use strict";var r=e("./helpers");function i(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var n=Array(80),r=1732584193,i=-271733879,c=-1732584194,u=271733878,h=-1009589776,d=0;d<e.length;d+=16){for(var f=r,p=i,m=c,g=u,v=h,y=0;y<80;y++){n[y]=y<16?e[d+y]:l(n[y-3]^n[y-8]^n[y-14]^n[y-16],1);var b=s(s(l(r,5),o(y,i,c,u)),s(s(h,n[y]),a(y)));h=u,u=c,c=l(i,30),i=r,r=b}r=s(r,f),i=s(i,p),c=s(c,m),u=s(u,g),h=s(h,v)}return Array(r,i,c,u,h)}function o(e,t,n,r){return e<20?t&n|~t&r:e<40?t^n^r:e<60?t&n|t&r|n&r:t^n^r}function a(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function s(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function l(e,t){return e<<t|e>>>32-t}t.exports=function(e){return r.hash(e,i,20,!0)}},{"./helpers":285}],288:[function(e,t,n){"use strict";t.exports=function(){return function(){}}},{}],289:[function(e,t,n){(function(n){"use strict";var r,i=e("babel-runtime/helpers/typeof"),o=(r=i)&&r.__esModule?r:{default:r},a=e("stream").Stream,s=e("../lib/common/utils/isArray").isArray;t.exports.string=function(e){return"string"==typeof e},t.exports.array=s,t.exports.buffer=n.isBuffer,t.exports.writableStream=function(e){return function(e){return e instanceof a}(e)&&"function"==typeof e._write&&"object"===(0,o.default)(e._writableState)}}).call(this,{isBuffer:e("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":42,"../node_modules/is-buffer/index.js":197,"babel-runtime/helpers/typeof":67,stream:230}],290:[function(e,t,n){"use strict";n.encodeURIComponent=function(e){try{return encodeURIComponent(e)}catch(t){return e}},n.escape=e("escape-html"),n.timestamp=function(e){if(e){var t=e;return"string"==typeof t&&(t=Number(t)),10===String(e).length&&(t*=1e3),new Date(t)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(e,t,n){(function(t,r){"use strict";var i=a(e("babel-runtime/core-js/json/stringify")),o=a(e("babel-runtime/helpers/typeof"));function a(e){return e&&e.__esModule?e:{default:e}}var s,l=e("util"),c=e("url"),u=e("http"),h=e("https"),d=e("debug")("urllib"),f=e("humanize-ms"),p=0,m=Math.pow(2,31)-10,g=/^https?:\/\//i;function v(e,t){return void 0===e?t:e}function y(e,t){return function(n,r,i){if(n)return t(n);e({data:r,status:i.statusCode,headers:i.headers,res:i})}}n.TIMEOUTS=[f("300s"),f("300s")];var b=["json","text"];n.request=function(t,r,i){return 2===arguments.length&&"function"==typeof r&&(i=r,r=null),"function"==typeof i?n.requestWithCallback(t,r,i):(s||(s=e("any-promise")),new s((function(e,i){n.requestWithCallback(t,r,y(e,i))})))},n.requestWithCallback=function(a,s,y){if(!a||"string"!=typeof a&&"object"!==(void 0===a?"undefined":(0,o.default)(a))){var x=l.format("expect request url to be a string or a http request options, but got %j",a);throw new Error(x)}2===arguments.length&&"function"==typeof s&&(y=s,s=null),p>=m&&(p=0);var w=++p;(s=s||{}).requestUrls=s.requestUrls||[];var E={requestId:w,url:a,args:s,ctx:s.ctx};s.emitter&&s.emitter.emit("request",E),s.timeout=s.timeout||n.TIMEOUTS,s.maxRedirects=s.maxRedirects||10,s.streaming=s.streaming||s.customResponse;var S,C=Date.now();"string"==typeof a?(g.test(a)||(a="http://"+a),S=c.parse(a)):S=a;var k=(s.type||s.method||S.method||"GET").toUpperCase(),_=S.port||80,T=u,O=v(s.agent,n.agent),A=s.fixJSONCtlChars;"https:"===S.protocol&&(T=h,O=v(s.httpsAgent,n.httpsAgent),S.port||(_=443));var L={host:S.hostname||S.host||"localhost",path:S.path||"/",method:k,port:_,agent:O,headers:s.headers||{},lookup:s.lookup};Array.isArray(s.timeout)?L.requestTimeout=s.timeout[s.timeout.length-1]:void 0!==s.timeout&&(L.requestTimeout=s.timeout);for(var D=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],I=0;I<D.length;I++){var R=D[I];s.hasOwnProperty(R)&&(L[R]=s[R])}!1!==L.rejectUnauthorized||L.hasOwnProperty("secureOptions")||(L.secureOptions=e("constants").SSL_OP_NO_TLSv1_2);var M=s.auth||S.auth;M&&(L.auth=M);var N=s.content||s.data,j="GET"===k||"HEAD"===k||s.dataAsQueryString;if(!s.content&&N&&"string"!=typeof N&&!r.isBuffer(N))if(j)N=s.nestedQuerystring?qs.stringify(N):querystring.stringify(N);else{var P=L.headers["Content-Type"]||L.headers["content-type"];P||(P="json"===s.contentType?"application/json":"application/x-www-form-urlencoded",L.headers["Content-Type"]=P),N="application/json"===parseContentType(P).type?(0,i.default)(N):s.nestedQuerystring?qs.stringify(N):querystring.stringify(N)}j&&N&&(L.path+=(S.query?"&":"?")+N,N=null);var B=0;if(N){var F=N.length;r.isBuffer(N)||(F=r.byteLength(N)),B=L.headers["Content-Length"]=F}"json"===s.dataType&&(L.headers.Accept="application/json"),"function"==typeof s.beforeRequest&&s.beforeRequest(L);var U=null,H=null,z=null,G=!1,V=!1,W=0,K=-1,q=!1,X="",Y="",$=null;function J(){U&&(clearTimeout(U),U=null)}function Z(){H&&(clearTimeout(H),H=null)}function Q(e,r,o){if(Z(),!y)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),w,t.pid,L.method,a),void(e&&console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s: %s\nstack: %s",Date(),w,t.pid,e.name,e.message,e.stack));var l=y;y=null;var c={};if(o&&(K=o.statusCode,c=o.headers),401===K&&c["www-authenticate"]&&(!s.headers||!s.headers.Authorization)&&s.digestAuth){var u=c["www-authenticate"];if(u.indexOf("Digest ")>=0)return d("Request#%d %s: got digest auth header WWW-Authenticate: %s",w,a,u),s.headers=s.headers||{},s.headers.Authorization=digestAuthHeader(L.method,L.path,u,s.digestAuth),d("Request#%d %s: auth with digest header: %s",w,a,s.headers.Authorization),o.headers["set-cookie"]&&(s.headers.Cookie=o.headers["set-cookie"].join(";")),n.requestWithCallback(a,s,l)}var h=Date.now()-C;$&&($.contentDownload=h),d("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",h,W,K,L.method,L.host,L.path,V,$);var f={status:K,statusCode:K,headers:c,size:W,aborted:q,rt:h,keepAliveSocket:V,data:r,requestUrls:s.requestUrls,timing:$,remoteAddress:X,remotePort:Y};if(e){var p="";O&&"function"==typeof O.getCurrentStatus&&(p=", agent status: "+(0,i.default)(O.getCurrentStatus())),e.message+=", "+L.method+" "+a+" "+K+" (connected: "+G+", keepalive socket: "+V+p+")\nheaders: "+(0,i.default)(c),e.data=r,e.path=L.path,e.status=K,e.headers=c,e.res=f}l(e,r,s.streaming?o:f),s.emitter&&(E.url=a,E.socket=ie&&ie.connection,E.options=L,E.size=B,s.emitter.emit("response",{requestId:w,error:e,ctx:s.ctx,req:E,res:f}))}function ee(e){var t=null;if(s.followRedirect&&statuses.redirect[e.statusCode]){s._followRedirectCount=(s._followRedirectCount||0)+1;var r=e.headers.location;if(r){if(!(s._followRedirectCount>s.maxRedirects)){var i=s.formatRedirectUrl?s.formatRedirectUrl(a,r):c.resolve(a,r);d("Request#%d %s: `redirected` from %s to %s",w,L.path,a,i),Z(),s.headers&&s.headers.Host&&g.test(r)&&(s.headers.Host=null);var o=y;return y=null,n.requestWithCallback(i,s,o),{redirect:!0,error:null}}(t=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+a)).name="MaxRedirectError"}else(t=new Error("Got statusCode "+e.statusCode+" but cannot resolve next location from headers")).name="FollowRedirectError"}return{redirect:!1,error:t}}function te(e,t,n){return n(null,t,e.headers["content-encoding"])}s.timing&&($={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),L.headers["User-Agent"]||L.headers["user-agent"]||(L.headers["User-Agent"]=navigator.userAgent),s.gzip&&(L.headers["Accept-Encoding"]||L.headers["accept-encoding"]||(L.headers["Accept-Encoding"]="gzip"));var ne,re,ie,oe=s.writeStream;function ae(e){var t;if($&&($.waiting=Date.now()-C),d("Request#%d %s `req response` event emit: status %d, headers: %j",w,a,e.statusCode,e.headers),s.streaming)return(t=ee(e)).redirect?void e.resume():t.error?(e.resume(),Q(t.error,null,e)):Q(null,null,e);if(e.on("close",(function(){d("Request#%d %s: `res close` event emit, total size %d",w,a,W)})),e.on("error",(function(){d("Request#%d %s: `res error` event emit, total size %d",w,a,W)})),e.on("aborted",(function(){q=!0,d("Request#%d %s: `res aborted` event emit, total size %d",w,a,W)})),oe)return(t=ee(e)).redirect?void e.resume():t.error?(e.resume(),oe.end(),Q(t.error,null,e)):(!1===s.consumeWriteStream?e.on("end",Q.bind(null,null,null,e)):isNode010||isNode012?first([[oe,"close"],[e,"aborted"]],(function(t,n,r){d("Request#%d %s: writeStream or res %s event emitted",w,a,r),Q(z||null,null,e)})):oe.on("close",(function(){d("Request#%d %s: writeStream close event emitted",w,a),Q(z||null,null,e)})),e.pipe(oe));var n=[];e.on("data",(function(e){d("Request#%d %s: `res data` event emit, size %d",w,a,e.length),W+=e.length,n.push(e)})),e.on("end",(function(){var t=r.concat(n,W);if(d("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",w,a,W,e._dumped),z)return Q(z,t,e);var i=ee(e);if(i.error)return Q(i.error,t,e);i.redirect||te(e,t,(function(n,r,i){if(n)return Q(n,t,e);if(!i&&b.indexOf(s.dataType)>=0){try{r=decodeBodyByCharset(r,e)}catch(t){return d("decodeBodyByCharset error: %s",t),Q(null,r,e)}if("json"===s.dataType)if(0===W)r=null;else{var o=parseJSON(r,A);o.error?n=o.error:r=o.data}}q&&d("Request#%d %s: Remote socket was terminated before `response.end()` was called",w,a),Q(n,r,e)}))}))}function se(){d("Connect timer ticking, timeout: %d",ne),U=setTimeout((function(){U=null,-1===K&&(K=-2);var e="Connect timeout for "+ne+"ms",t="ConnectionTimeoutError";ie.socket||(t="SocketAssignTimeoutError",e+=", working sockets is full"),(z=new Error(e)).name=t,z.requestId=w,d("ConnectTimeout: Request#%d %s %s: %s, connected: %s",w,a,z.name,e,G),ce()}),ne)}function le(){d("Response timer ticking, timeout: %d",re),H=setTimeout((function(){H=null;var e="Response timeout for "+re+"ms";(z=new Error(e)).name="ResponseTimeoutError",z.requestId=w,d("ResponseTimeout: Request#%d %s %s: %s, connected: %s",w,a,z.name,e,G),ce()}),re)}d("Request#%d %s %s with headers %j, options.path: %s",w,k,a,L.headers,L.path),s.requestUrls.push(a),Array.isArray(s.timeout)?(ne=f(s.timeout[0]),re=f(s.timeout[1])):ne=re=f(s.timeout),d("ConnectTimeout: %d, ResponseTimeout: %d",ne,re),L.mode=s.mode?s.mode:"";try{ie=T.request(L,ae)}catch(e){return Q(e)}function ce(){d("Request#%d %s abort, connected: %s",w,a,G),ie.socket||(z.noSocket=!0,Q(z)),ie.abort()}return"undefined"==typeof window?se():ie.on("requestTimeout",(function(){-1===K&&(K=-2),(z=new Error("Connect timeout for "+ne+"ms")).name="ConnectionTimeoutError",z.requestId=w,ce()})),$&&ie.on("finish",(function(){$.requestSent=Date.now()-C})),ie.once("socket",(function(e){$&&($.queuing=Date.now()-C),isNode010&&e.socket&&(e=e.socket);var t=e.readyState;if("opening"===t)return e.once("lookup",(function(e,t,n){d("Request#%d %s lookup: %s, %s, %s",w,a,e,t,n),$&&($.dnslookup=Date.now()-C),t&&(X=t)})),void e.once("connect",(function(){$&&($.connected=Date.now()-C),J(),le(),d("Request#%d %s new socket connected",w,a),G=!0,X||(X=e.remoteAddress),Y=e.remotePort}));d("Request#%d %s reuse socket connected, readyState: %s",w,a,t),G=!0,V=!0,X||(X=e.remoteAddress),Y=e.remotePort,J(),le()})),ie.on("error",(function(e){"Error"!==e.name&&"TypeError"!==e.name||(e.name=G?"ResponseError":"RequestError"),e.message+=' (req "error")',d("Request#%d %s `req error` event emit, %s: %s",w,a,e.name,e.message),Q(z||e)})),oe&&oe.once("error",(function(e){e.message+=' (writeStream "error")',z=e,d("Request#%d %s `writeStream error` event emit, %s: %s",w,a,e.name,e.message),ce()})),s.stream?(s.stream.pipe(ie),s.stream.once("error",(function(e){e.message+=' (stream "error")',z=e,d("Request#%d %s `readStream error` event emit, %s: %s",w,a,e.name,e.message),ce()}))):ie.end(N),ie.requestId=w,ie}}).call(this,e("_process"),e("buffer").Buffer)},{_process:208,"any-promise":49,"babel-runtime/core-js/json/stringify":53,"babel-runtime/helpers/typeof":67,buffer:73,constants:75,debug:288,http:231,https:193,"humanize-ms":194,url:238,util:243}]},{},[1])(1)},module.exports=f()}).call(this,__webpack_require__(/*! ./../../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},n6Qo:
/*!**************************************************************!*\
!*** ./node_modules/rc-table/es/Footer/index.js + 2 modules ***!
\**************************************************************/
/*! exports provided: default, FooterComponents */
/*! exports used: FooterComponents, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("q1tI"),i=n("biw7"),o=n("fyJ8");t.b=function(e){var t=e.children,n=r.useContext(i.a).prefixCls;return r.createElement("tfoot",{className:"".concat(n,"-summary")},t)};var a={Cell:function(e){var t=e.className,n=e.index,a=e.children,s=e.colSpan,l=e.rowSpan,c=r.useContext(i.a),u=c.prefixCls,h=c.fixedInfoList[n];return r.createElement(o.a,Object.assign({className:t,index:n,component:"td",prefixCls:u,record:null,dataIndex:null,render:function(){return{children:a,props:{colSpan:s,rowSpan:l}}}},h))},Row:function(e){return r.createElement("tr",Object.assign({},e))}}},nVVt:
/*!****************************************!*\
!*** ./node_modules/qr.js/lib/mode.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},oRuE:
/*!************************************************!*\
!*** ./node_modules/crypto-js/pad-iso10126.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),r.pad.Iso10126={pad:function(e,t){var n=4*t,i=n-e.sigBytes%n;e.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)},osHv:
/*!********************************************************!*\
!*** ./node_modules/codemirror/addon/fold/xml-fold.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t){return e.line-t.line||e.ch-t.ch}var r="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function o(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function a(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function s(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function l(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function c(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(s(e))continue;return}if(a(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(a(e,t+1)){i.lastIndex=t,e.ch=t;var n=i.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function h(e){for(;;){i.lastIndex=e.ch;var t=i.exec(e.text);if(!t){if(s(e))continue;return}if(a(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function d(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(a(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function f(e,n){for(var r=[];;){var i,o=h(e),a=e.line,s=e.ch-(o?o[0].length:0);if(!o||!(i=c(e)))return;if("selfClose"!=i)if(o[1]){for(var l=r.length-1;l>=0;--l)if(r[l]==o[2]){r.length=l;break}if(l<0&&(!n||n==o[2]))return{tag:o[2],from:t(a,s),to:t(e.line,e.ch)}}else r.push(o[2])}}function p(e,n){for(var r=[];;){var i=d(e);if(!i)return;if("selfClose"!=i){var o=e.line,a=e.ch,s=u(e);if(!s)return;if(s[1])r.push(s[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==s[2]){r.length=l;break}if(l<0&&(!n||n==s[2]))return{tag:s[2],from:t(e.line,e.ch),to:t(o,a)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,r){for(var i=new o(e,r.line,0);;){var a=h(i);if(!a||i.line!=r.line)return;var s=c(i);if(!s)return;if(!a[1]&&"selfClose"!=s){var l=t(i.line,i.ch),u=f(i,a[2]);return u&&n(u.from,l)>0?{from:l,to:u.from}:null}}})),e.findMatchingTag=function(e,r,i){var a=new o(e,r.line,r.ch,i);if(-1!=a.text.indexOf(">")||-1!=a.text.indexOf("<")){var s=c(a),l=s&&t(a.line,a.ch),h=s&&u(a);if(s&&h&&!(n(a,r)>0)){var d={from:t(a.line,a.ch),to:l,tag:h[2]};return"selfClose"==s?{open:d,close:null,at:"open"}:h[1]?{open:p(a,h[2]),close:d,at:"close"}:{open:d,close:f(a=new o(e,l.line,l.ch,i),h[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var i=new o(e,t.line,t.ch,n);;){var a=p(i,r);if(!a)break;var s=f(new o(e,t.line,t.ch,n),a.tag);if(s)return{open:a,close:s}}},e.scanForClosingTag=function(e,t,n,r){return f(new o(e,t.line,t.ch,r?{from:0,to:r}:null),n)}}(n(/*! ../../lib/codemirror */"VrN/"))},p5ED:
/*!*********************************************!*\
!*** ./src/components/PreviewAll/index.tsx ***!
\*********************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/button/style */"+L6B");var r=n(/*! antd/es/button */"2/Rp"),i=(n(/*! antd/es/tooltip/style */"5Dmo"),n(/*! antd/es/tooltip */"3S7+")),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! ./index.less?modules */"vHTk"),u=n.n(c),h=n(/*! @ant-design/icons */"yEEn"),d=n(/*! @/components/monaco-editor */"ZW9T"),f=n(/*! @/utils/util */"1vsH");t.a=function(e){var t=e.name,n=e.data,c=(e.theme,e.type),p=e.filename,m=e.monacoEditor,g=e.className,v=e.style,y=e.close,b=e.onClose,x=e.hasMask,w=Object(s.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),E=Object(a.a)(w,2),S=(E[0],E[1],Object(s.useState)("")),C=Object(a.a)(S,2),k=(C[0],C[1]),_=Object(s.useRef)();p&&(m.filename=p),Object(s.useEffect)((function(){var e,t,n=null===(e=document.cookie)||void 0===e||null===(t=e.replace(/\s/g,""))||void 0===t?void 0:t.split(";");null==n||n.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&k(t[1])}))}),[]);var T=function(){n.startsWith("http")||n.startsWith("/")?O():Object(f.x)(p||"educoder",n,p)},O=function(){Object(f.v)(p||t,n)};return console.log("data:",n,"fileanme:",p," name:",t),l.a.createElement("div",{style:Object(o.a)({},v||{}),className:"".concat(x&&u.a.bgBlack," ").concat(c?u.a.wrp:"hide")},y&&l.a.createElement("div",{className:u.a.close,ref:_},l.a.createElement(i.a,{title:"点击下载此文件",getPopupContainer:function(){return _.current}},l.a.createElement("span",{onClick:O},l.a.createElement("i",{className:"icon-quxiaozhiding"}))),l.a.createElement(i.a,{title:"关闭",getPopupContainer:function(){return _.current}},l.a.createElement("span",{className:"",onClick:b},l.a.createElement("i",{className:"icon-guanbi1"})))),l.a.createElement("div",{className:"".concat(u.a[g]," ").concat(g," ").concat(u.a.monaco," ").concat("txt"===c?"show":"hide")},"txt"===c&&l.a.createElement(d.b,m)),"audio"===c&&l.a.createElement("audio",{src:"".concat(null!=n&&n.startsWith("/")||(null==n?void 0:n.indexOf("https://"))>-1?n:"data:audio/mp3;base64,").concat(n),autoPlay:!0}),"video"===c&&l.a.createElement(l.a.Fragment,null,null!=n&&n.startsWith("/")?l.a.createElement("video",{controls:!0,src:"".concat(n),autoPlay:!0}):l.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(n),autoPlay:!0})),"html"===c&&l.a.createElement("iframe",{src:n+"&disposition=inline"}),"pdf"===c&&l.a.createElement("embed",{className:u.a.embed,src:n}),"pdfeditor"===c&&l.a.createElement("div",null,l.a.createElement("iframe",{src:"https://a1office.co/solutions/editor/pdf-editor/查重文档1-8839d79b81e8bda0d298ca058913ab88.pdf"}),l.a.createElement("div",{style:{position:"absolute",left:"1px",top:"1px",width:180,height:60,background:"#f9f9f9"}})),"image"===c&&l.a.createElement(l.a.Fragment,null,l.a.createElement("img",{src:"".concat(null!=n&&n.startsWith("/")||(null==n?void 0:n.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(n)})),"other"===c&&l.a.createElement("div",null,l.a.createElement(r.a,{type:"primary",size:"large",onClick:T},l.a.createElement(h.a,null),"点击下载")),("download"===c||"office"===c)&&l.a.createElement(r.a,{type:"primary",size:"large",onClick:T},l.a.createElement(h.a,null),"点击下载"))}},"p77/":
/*!****************************************************!*\
!*** ./node_modules/codemirror/lib/codemirror.css ***!
\****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},pA7S:
/*!*********************************************!*\
!*** ./node_modules/crypto-js/tripledes.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./enc-base64 */"ETIr"),n(/*! ./md5 */"cv67"),n(/*! ./evpkdf */"K3mO"),n(/*! ./cipher-core */"OLod"),function(){var e=r,t=e.lib,n=t.WordArray,i=t.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=a[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var c=i[o]=[],u=l[o];for(n=0;n<24;n++)c[n/6|0]|=t[(s[n]-1+u)%28]<<31-n%6,c[4+(n/6|0)]|=t[28+(s[n+24]-1+u)%28]<<31-n%6;for(c[0]=c[0]<<1|c[0]>>>31,n=1;n<7;n++)c[n]=c[n]>>>4*(n-1)+3;c[7]=c[7]<<5|c[7]>>>27}var h=this._invSubKeys=[];for(n=0;n<16;n++)h[n]=i[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],d.call(this,4,252645135),d.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),d.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],o=this._lBlock,a=this._rBlock,s=0,l=0;l<8;l++)s|=c[l][((a^i[l])&u[l])>>>0];this._lBlock=a,this._rBlock=o^s}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,d.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function d(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<<e}function f(e,t){var n=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<<e}e.DES=i._createHelper(h);var p=o.TripleDES=i.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=h.createEncryptor(n.create(t)),this._des2=h.createEncryptor(n.create(r)),this._des3=h.createEncryptor(n.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),r.TripleDES)},pIsd:
/*!***************************************!*\
!*** ./node_modules/json2mq/index.js ***!
\***************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! string-convert/camel2hyphen */"BJfS"),i=function(e){var t="",n=Object.keys(e);return n.forEach((function(i,o){var a=e[i];(function(e){return/[height|width]$/.test(e)})(i=r(i))&&"number"==typeof a&&(a+="px"),t+=!0===a?i:!1===a?"not "+i:"("+i+": "+a+")",o<n.length-1&&(t+=" and ")})),t};e.exports=function(e){var t="";return"string"==typeof e?e:e instanceof Array?(e.forEach((function(n,r){t+=i(n),r<e.length-1&&(t+=", ")})),t):i(e)}},qBft:
/*!************************************************!*\
!*** ./node_modules/crypto-js/pad-ansix923.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),r.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,r=4*t,i=r-n%r,o=n+i-1;e.clamp(),e.words[o>>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Ansix923)},qHvr:
/*!******************************************************************!*\
!*** ./src/pages/Competitions/Entered/Enteredmodel/Addteams.tsx ***!
\******************************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/modal/style */"2qtc");var r=n(/*! antd/es/modal */"kLXV"),i=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),o=(n(/*! antd/es/message/style */"miYZ"),n(/*! antd/es/message */"tsqr")),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! @ant-design/icons */"4i/N");t.a=function(e){var t=e.isAddmodle,n=e.setIsAdd,u=e.createTeam,h=Object(s.useState)(""),d=Object(a.a)(h,2),f=d[0],p=d[1];return l.a.createElement(r.a,{centered:!0,title:l.a.createElement("div",{style:{alignItems:"center",display:"flex"}},l.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"创建战队"),l.a.createElement(c.a,{onClick:function(){return n(!1)},style:{cursor:"porint"}})),visible:t,closable:!1,destroyOnClose:!0,onOk:function(){f?u(f):o.b.info("战队名不能为空")},onCancel:function(){return n(!1)}},l.a.createElement("div",null,l.a.createElement("span",{style:{fontSize:"14px",color:"#F73737"}},"*"),"队名:",l.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px"}},l.a.createElement(i.a,{placeholder:"请输入队名",value:f,maxLength:60,addonAfter:String(f&&f.length||0)+"/60",onChange:function(e){return p(e.target.value)}}))))}},qM6L:
/*!*********************************************!*\
!*** ./node_modules/crypto-js/enc-utf16.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),function(){var e=r,t=e.lib.WordArray,n=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i+=2){var o=t[i>>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var n=e.length,r=[],i=0;i<n;i++)r[i>>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(r,2*n)}},n.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o+=2){var a=i(t[o>>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(a))}return r.join("")},parse:function(e){for(var n=e.length,r=[],o=0;o<n;o++)r[o>>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(r,2*n)}}}(),r.enc.Utf16)},qu8F:
/*!****************************************************!*\
!*** ./node_modules/crypto-js/mode-ctr-gladman.js ***!
\****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),
/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/
r.mode.CTRGladman=function(){var e=r.lib.BlockCipherMode.extend();function t(e){if(255==(e>>24&255)){var t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}var n=e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),function(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}(a);var s=a.slice(0);r.encryptBlock(s,0);for(var l=0;l<i;l++)e[n+l]^=s[l]}});return e.Decryptor=n,e}(),r.mode.CTRGladman)},"rAM+":
/*!*******************************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js ***!
\*******************************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */"Qw5x");function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}},rUJ1:
/*!********************************************!*\
!*** ./node_modules/marked/src/helpers.js ***!
\********************************************/
/*! no static exports found */
/*! exports used: escape */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){const n=/[&<>"']/,r=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},s=e=>a[e];const l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(e){return e.replace(l,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const u=/(^|[^\[])\^/g;const h=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const f={},p=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(e,t){f[" "+e]||(p.test(e)?f[" "+e]=e+"/":f[" "+e]=y(e,"/",!0));const n=-1===(e=f[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(m,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(g,"$1")+t:e+t}function y(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i<r;){const o=e.charAt(r-i-1);if(o!==t||n){if(o===t||!n)break;i++}else i++}return e.substr(0,r-i)}e.exports={escape:function(e,t){if(t){if(n.test(e))return e.replace(r,s)}else if(i.test(e))return e.replace(o,s);return e},unescape:c,edit:function(e,t){e=e.source||e,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(u,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n},cleanUrl:function(e,t,n){if(e){let e;try{e=decodeURIComponent(c(n)).replace(h,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!d.test(n)&&(n=v(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:v,noopTest:{exec:function(){}},merge:function(e){let t,n,r=1;for(;r<arguments.length;r++)for(n in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},splitCells:function(e,t){const n=e.replace(/\|/g,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},rtrim:y,findClosingBracket:function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1},checkSanitizeDeprecation:function(e){e&&e.sanitize&&!e.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")}}},rcnY:
/*!*******************************************!*\
!*** ./node_modules/qr.js/lib/RSBlock.js ***!
\*******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./ErrorCorrectLevel */"aRTE");function i(e,t){this.totalCount=e,this.dataCount=t}i.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],i.getRSBlocks=function(e,t){var n=i.getRsBlockTable(e,t);if(null==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=n.length/3,o=new Array,a=0;a<r;a++)for(var s=n[3*a+0],l=n[3*a+1],c=n[3*a+2],u=0;u<s;u++)o.push(new i(l,c));return o},i.getRsBlockTable=function(e,t){switch(t){case r.L:return i.RS_BLOCK_TABLE[4*(e-1)+0];case r.M:return i.RS_BLOCK_TABLE[4*(e-1)+1];case r.Q:return i.RS_BLOCK_TABLE[4*(e-1)+2];case r.H:return i.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},e.exports=i},sR1s:
/*!*****************************************************!*\
!*** ./node_modules/rc-table/es/utils/valueUtil.js ***!
\*****************************************************/
/*! exports provided: getPathValue, getColumnsKey, mergeObject, validateValue */
/*! exports used: getColumnsKey, getPathValue, mergeObject, validateValue */function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l}));var r=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU");function i(e){return null==e?[]:Array.isArray(e)?e:[e]}function o(e,t){if(!t&&"number"!=typeof t)return e;for(var n=i(t),r=e,o=0;o<n.length;o+=1){if(!r)return null;r=r[n[o]]}return r}function a(e){var t=[],n={};return e.forEach((function(e){for(var r=e||{},o=r.key,a=r.dataIndex,s=o||i(a).join("-")||"RC_TABLE_KEY";n[s];)s="".concat(s,"_next");n[s]=!0,t.push(s)})),t}function s(){var e={};function t(e,n){n&&Object.keys(n).forEach((function(i){var o=n[i];o&&"object"===Object(r.a)(o)?(e[i]=e[i]||{},t(e[i],o)):e[i]=o}))}for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return i.forEach((function(n){t(e,n)})),e}function l(e){return null!=e}},sboe:
/*!*************************************************!*\
!*** ./node_modules/rc-tree/es/contextTypes.js ***!
\*************************************************/
/*! exports provided: TreeContext */
/*! exports used: TreeContext */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! react */"q1tI"),i=r.createContext(null)},t23M:
/*!*****************************************************!*\
!*** ./node_modules/rc-resize-observer/es/index.js ***!
\*****************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),i=n(/*! @babel/runtime/helpers/esm/classCallCheck */"1OyB"),o=n(/*! @babel/runtime/helpers/esm/createClass */"vuIU"),a=n(/*! @babel/runtime/helpers/esm/inherits */"Ji7U"),s=n(/*! @babel/runtime/helpers/esm/createSuper */"LK+K"),l=n(/*! react */"q1tI"),c=n(/*! rc-util/es/Dom/findDOMNode */"m+aA"),u=n(/*! rc-util/es/Children/toArray */"Zm9Q"),h=n(/*! rc-util/es/warning */"Kwbf"),d=n(/*! rc-util/es/ref */"c+Xe"),f=n(/*! resize-observer-polyfill */"bdgK"),p=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.childNode=null,e.currentElement=null,e.state={width:0,height:0,offsetHeight:0,offsetWidth:0},e.onResize=function(t){var n=e.props.onResize,i=t[0].target,o=i.getBoundingClientRect(),a=o.width,s=o.height,l=i.offsetWidth,c=i.offsetHeight,u=Math.floor(a),h=Math.floor(s);if(e.state.width!==u||e.state.height!==h||e.state.offsetWidth!==l||e.state.offsetHeight!==c){var d={width:u,height:h,offsetWidth:l,offsetHeight:c};e.setState(d),n&&Promise.resolve().then((function(){n(Object(r.a)(Object(r.a)({},d),{},{offsetWidth:l,offsetHeight:c}))}))}},e.setChildNode=function(t){e.childNode=t},e}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){if(this.props.disabled)this.destroyObserver();else{var e=Object(c.a)(this.childNode||this);e!==this.currentElement&&(this.destroyObserver(),this.currentElement=e),!this.resizeObserver&&e&&(this.resizeObserver=new f.default(this.onResize),this.resizeObserver.observe(e))}}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var e=this.props.children,t=Object(u.a)(e);if(t.length>1)Object(h.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(0===t.length)return Object(h.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var n=t[0];if(l.isValidElement(n)&&Object(d.c)(n)){var r=n.ref;t[0]=l.cloneElement(n,{ref:Object(d.a)(r,this.setChildNode)})}return 1===t.length?t[0]:t.map((function(e,t){return!l.isValidElement(e)||"key"in e&&null!==e.key?e:l.cloneElement(e,{key:"".concat("rc-observer-key","-").concat(t)})}))}}]),n}(l.Component);p.displayName="ResizeObserver",t.a=p},uGsb:
/*!******************************************!*\
!*** ./node_modules/crypto-js/sha384.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o,a,s,l,c,u;e.exports=(u=n(/*! ./core */"Ib8C"),n(/*! ./x64-core */"MlIO"),n(/*! ./sha512 */"1uat"),i=(r=u).x64,o=i.Word,a=i.WordArray,s=r.algo,l=s.SHA512,c=s.SHA384=l.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var e=l._doFinalize.call(this);return e.sigBytes-=16,e}}),r.SHA384=l._createHelper(c),r.HmacSHA384=l._createHmacHelper(c),u.SHA384)},uGxW:
/*!*************************************************!*\
!*** ./node_modules/crypto-js/pad-nopadding.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},uK0f:
/*!*****************************************************!*\
!*** ./node_modules/array-tree-filter/lib/index.js ***!
\*****************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=function(){"use strict";return function(e,t,n){(n=n||{}).childrenKeyName=n.childrenKeyName||"children";var r=e||[],i=[],o=0;do{var a=r.filter((function(e){return t(e,o)}))[0];if(!a)break;i.push(a),r=a[n.childrenKeyName]||[],o+=1}while(r.length>0);return i}}()},ulZh:
/*!*****************************************!*\
!*** ./node_modules/hls.js/dist/hls.js ***!
\*****************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;"undefined"!=typeof window&&(r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":
/*!*********************************************!*\
!*** ./node_modules/eventemitter3/index.js ***!
\*********************************************/
/*! no static exports found */function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function o(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,r,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new a(n,r||e,o),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function l(e,t){0==--e._eventsCount?e._events=new o:delete e._events[t]}function c(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),c.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},c.prototype.listeners=function(e){var t=i?i+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,a=new Array(o);r<o;r++)a[r]=n[r].fn;return a},c.prototype.listenerCount=function(e){var t=i?i+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,r,o,a){var s=i?i+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],h=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,r),!0;case 5:return u.fn.call(u.context,t,n,r,o),!0;case 6:return u.fn.call(u.context,t,n,r,o,a),!0}for(c=1,l=new Array(h-1);c<h;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var d,f=u.length;for(c=0;c<f;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),h){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,r);break;default:if(!l)for(d=1,l=new Array(h-1);d<h;d++)l[d-1]=arguments[d];u[c].fn.apply(u[c].context,l)}}return!0},c.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,r){var o=i?i+e:e;if(!this._events[o])return this;if(!t)return l(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||r&&!a.once||n&&a.context!==n||l(this,o);else{for(var s=0,c=[],u=a.length;s<u;s++)(a[s].fn!==t||r&&!a[s].once||n&&a[s].context!==n)&&c.push(a[s]);c.length?this._events[o]=1===c.length?c[0]:c:l(this,o)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&l(this,t)):(this._events=new o,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=i,c.EventEmitter=c,e.exports=c},"./node_modules/url-toolkit/src/url-toolkit.js":
/*!*****************************************************!*\
!*** ./node_modules/url-toolkit/src/url-toolkit.js ***!
\*****************************************************/
/*! no static exports found */function(e,t,n){var r,i,o,a,s;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,i=/^([^\/?#]*)([^]*)$/,o=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var o=s.parseURL(t);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return n.alwaysNormalize?(o.path=s.normalizePath(o.path),s.buildURLFromParts(o)):t;var a=s.parseURL(e);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var l=i.exec(a.path);a.netLoc=l[1],a.path=l[2]}a.netLoc&&!a.path&&(a.path="/");var c={scheme:a.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(c.netLoc=a.netLoc,"/"!==o.path[0]))if(o.path){var u=a.path,h=u.substring(0,u.lastIndexOf("/")+1)+o.path;c.path=s.normalizePath(h)}else c.path=a.path,o.params||(c.params=a.params,o.query||(c.query=a.query));return null===c.path&&(c.path=n.alwaysNormalize?s.normalizePath(o.path):o.path),s.buildURLFromParts(c)},parseURL:function(e){var t=r.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(o,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},"./node_modules/webworkify-webpack/index.js":
/*!**************************************************!*\
!*** ./node_modules/webworkify-webpack/index.js ***!
\**************************************************/
/*! no static exports found */function(e,t,n){function r(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n.oe=function(e){throw console.error(e),e};var r=n(n.s=ENTRY_MODULE);return r.default||r}function i(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function o(e,t,r){var o={};o[r]=[];var a=t.toString(),s=a.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return o;for(var l,c=s[1],u=new RegExp("(\\\\n|\\W)"+i(c)+"\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");l=u.exec(a);)"dll-reference"!==l[3]&&o[r].push(l[3]);for(u=new RegExp("\\("+i(c)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");l=u.exec(a);)e[l[2]]||(o[r].push(l[1]),e[l[2]]=n(l[1]).m),o[l[2]]=o[l[2]]||[],o[l[2]].push(l[4]);for(var h,d=Object.keys(o),f=0;f<d.length;f++)for(var p=0;p<o[d[f]].length;p++)h=o[d[f]][p],isNaN(1*h)||(o[d[f]][p]=1*o[d[f]][p]);return o}function a(e){return Object.keys(e).reduce((function(t,n){return t||e[n].length>0}),!1)}e.exports=function(e,t){t=t||{};var i={main:n.m},s=t.all?{main:Object.keys(i.main)}:function(e,t){for(var n={main:[t]},r={main:[]},i={main:{}};a(n);)for(var s=Object.keys(n),l=0;l<s.length;l++){var c=s[l],u=n[c].pop();if(i[c]=i[c]||{},!i[c][u]&&e[c][u]){i[c][u]=!0,r[c]=r[c]||[],r[c].push(u);for(var h=o(e,e[c][u],c),d=Object.keys(h),f=0;f<d.length;f++)n[d[f]]=n[d[f]]||[],n[d[f]]=n[d[f]].concat(h[d[f]])}}return r}(i,e),l="";Object.keys(s).filter((function(e){return"main"!==e})).forEach((function(e){for(var t=0;s[e][t];)t++;s[e].push(t),i[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",l=l+"var "+e+" = ("+r.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+s[e].map((function(t){return JSON.stringify(t)+": "+i[e][t].toString()})).join(",")+"});\n"})),l=l+"new (("+r.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+s.main.map((function(e){return JSON.stringify(e)+": "+i.main[e].toString()})).join(",")+"}))(self);";var c=new window.Blob([l],{type:"text/javascript"});if(t.bare)return c;var u=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(c),h=new window.Worker(u);return h.objectURL=u,h}},"./src/config.ts":
/*!***********************!*\
!*** ./src/config.ts ***!
\***********************/
/*! exports provided: hlsDefaultConfig, mergeConfig, enableStreamingMode */function(e,t,n){"use strict";n.r(t),n.d(t,"hlsDefaultConfig",(function(){return S})),n.d(t,"mergeConfig",(function(){return C})),n.d(t,"enableStreamingMode",(function(){return k}));var r=n(/*! ./controller/abr-controller */"./src/controller/abr-controller.ts"),i=n(/*! ./controller/audio-stream-controller */"./src/controller/audio-stream-controller.ts"),o=n(/*! ./controller/audio-track-controller */"./src/controller/audio-track-controller.ts"),a=n(/*! ./controller/subtitle-stream-controller */"./src/controller/subtitle-stream-controller.ts"),s=n(/*! ./controller/subtitle-track-controller */"./src/controller/subtitle-track-controller.ts"),l=n(/*! ./controller/buffer-controller */"./src/controller/buffer-controller.ts"),c=n(/*! ./controller/timeline-controller */"./src/controller/timeline-controller.ts"),u=n(/*! ./controller/cap-level-controller */"./src/controller/cap-level-controller.ts"),h=n(/*! ./controller/fps-controller */"./src/controller/fps-controller.ts"),d=n(/*! ./controller/eme-controller */"./src/controller/eme-controller.ts"),f=n(/*! ./controller/cmcd-controller */"./src/controller/cmcd-controller.ts"),p=n(/*! ./utils/xhr-loader */"./src/utils/xhr-loader.ts"),m=n(/*! ./utils/fetch-loader */"./src/utils/fetch-loader.ts"),g=n(/*! ./utils/cues */"./src/utils/cues.ts"),v=n(/*! ./utils/mediakeys-helper */"./src/utils/mediakeys-helper.ts"),y=n(/*! ./utils/logger */"./src/utils/logger.ts");function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=w(w({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:p.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:r.default,bufferController:l.default,capLevelController:u.default,fpsController:h.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:v.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},{cueHandler:g.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:a.SubtitleStreamController,subtitleTrackController:s.default,timelineController:c.TimelineController,audioStreamController:i.default,audioTrackController:o.default,emeController:d.default,cmcdController:f.default});function C(e,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return b({},e,t)}function k(e){var t=e.loader;t!==m.default&&t!==p.default?(y.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1):Object(m.fetchSupported)()&&(e.loader=m.default,e.progressive=!0,e.enableSoftwareAES=!0,y.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}},"./src/controller/abr-controller.ts":
/*!******************************************!*\
!*** ./src/controller/abr-controller.ts ***!
\******************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/ewma-bandwidth-estimator */"./src/utils/ewma-bandwidth-estimator.ts"),o=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../types/loader */"./src/types/loader.ts"),c=n(/*! ../utils/logger */"./src/utils/logger.ts");function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var h=function(){function e(e){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=e;var t=e.config;this.bwEstimator=new i.default(t.abrEwmaSlowVoD,t.abrEwmaFastVoD,t.abrEwmaDefaultEstimate),this.registerListeners()}var t,n,h,d=e.prototype;return d.registerListeners=function(){var e=this.hls;e.on(o.Events.FRAG_LOADING,this.onFragLoading,this),e.on(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(o.Events.ERROR,this.onError,this)},d.unregisterListeners=function(){var e=this.hls;e.off(o.Events.FRAG_LOADING,this.onFragLoading,this),e.off(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(o.Events.ERROR,this.onError,this)},d.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},d.onFragLoading=function(e,t){var n,r=t.frag;r.type===l.PlaylistLevelType.MAIN&&(this.timer||(this.fragCurrent=r,this.partCurrent=null!=(n=t.part)?n:null,this.timer=self.setInterval(this.onCheck,100)))},d.onLevelLoaded=function(e,t){var n=this.hls.config;t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)},d._abandonRulesCheck=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,i=n.autoLevelEnabled,s=n.config,l=n.media;if(e&&l){var u=t?t.stats:e.stats,h=t?t.duration:e.duration;if(u.aborted)return c.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);if(i&&!l.paused&&l.playbackRate&&l.readyState){var d=performance.now()-u.loading.start,f=Math.abs(l.playbackRate);if(!(d<=500*h/f)){var p=n.levels,m=n.minAutoLevel,g=p[e.level],v=u.total||Math.max(u.loaded,Math.round(h*g.maxBitrate/8)),y=Math.max(1,u.bwEstimate?u.bwEstimate/8:1e3*u.loaded/d),b=(v-u.loaded)/y,x=l.currentTime,w=(a.BufferHelper.bufferInfo(l,x,s.maxBufferHole).end-x)/f;if(!(w>=2*h/f||b<=w)){var E,S=Number.POSITIVE_INFINITY;for(E=e.level-1;E>m&&!((S=h*p[E].maxBitrate/(6.4*y))<w);E--);if(!(S>=b)){var C=this.bwEstimator.getEstimate();c.logger.warn("Fragment "+e.sn+(t?" part "+t.index:"")+" of level "+e.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+E+"\n Current BW estimate: "+(Object(r.isFiniteNumber)(C)?(C/1024).toFixed(3):"Unknown")+" Kb/s\n Estimated load time for current fragment: "+b.toFixed(3)+" s\n Estimated load time for the next fragment: "+S.toFixed(3)+" s\n Time to underbuffer: "+w.toFixed(3)+" s"),n.nextLoadLevel=E,this.bwEstimator.sample(d,u.loaded),this.clearTimer(),e.loader&&(this.fragCurrent=this.partCurrent=null,e.loader.abort()),n.trigger(o.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:u})}}}}}},d.onFragLoaded=function(e,t){var n=t.frag,i=t.part;if(n.type===l.PlaylistLevelType.MAIN&&Object(r.isFiniteNumber)(n.sn)){var a=i?i.stats:n.stats,s=i?i.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var c=this.hls.levels[n.level],u=(c.loaded?c.loaded.bytes:0)+a.loaded,h=(c.loaded?c.loaded.duration:0)+s;c.loaded={bytes:u,duration:h},c.realBitrate=Math.round(8*u/h)}if(n.bitrateTest){var d={stats:a,frag:n,part:i,id:n.type};this.onFragBuffered(o.Events.FRAG_BUFFERED,d),n.bitrateTest=!1}}},d.onFragBuffered=function(e,t){var n=t.frag,r=t.part,i=r?r.stats:n.stats;if(!i.aborted&&n.type===l.PlaylistLevelType.MAIN&&"initSegment"!==n.sn){var o=i.parsing.end-i.loading.start;this.bwEstimator.sample(o,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=o/1e3:this.bitrateTestDelay=0}},d.onError=function(e,t){switch(t.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},d.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},d.getNextABRAutoLevel=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,r=n.maxAutoLevel,i=n.config,o=n.minAutoLevel,s=n.media,l=t?t.duration:e?e.duration:0,u=s?s.currentTime:0,h=s&&0!==s.playbackRate?Math.abs(s.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,f=(a.BufferHelper.bufferInfo(s,u,i.maxBufferHole).end-u)/h,p=this.findBestLevel(d,o,r,f,i.abrBandWidthFactor,i.abrBandWidthUpFactor);if(p>=0)return p;c.logger.trace((f?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var m=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay,g=i.abrBandWidthFactor,v=i.abrBandWidthUpFactor;if(!f){var y=this.bitrateTestDelay;y&&(m=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-y,c.logger.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*m)+" ms"),g=v=1)}return p=this.findBestLevel(d,o,r,f+m,g,v),Math.max(p,0)},d.findBestLevel=function(e,t,n,r,i,o){for(var a,s=this.fragCurrent,l=this.partCurrent,u=this.lastLoadedFragLevel,h=this.hls.levels,d=h[u],f=!(null==d||null===(a=d.details)||void 0===a||!a.live),p=null==d?void 0:d.codecSet,m=l?l.duration:s?s.duration:0,g=n;g>=t;g--){var v=h[g];if(v&&(!p||v.codecSet===p)){var y=v.details,b=(l?null==y?void 0:y.partTarget:null==y?void 0:y.averagetargetduration)||m,x=void 0;x=g<=u?i*e:o*e;var w=h[g].maxBitrate,E=w*b/x;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+g+"/"+Math.round(x)+"/"+w+"/"+b+"/"+r+"/"+E),x>w&&(!E||f&&!this.bitrateTestDelay||E<r))return g}}return-1},t=e,(n=[{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this.bwEstimator;if(!(-1===e||t&&t.canEstimate()))return e;var n=this.getNextABRAutoLevel();return-1!==e&&(n=Math.min(e,n)),n},set:function(e){this._nextAutoLevel=e}}])&&u(t.prototype,n),h&&u(t,h),e}();t.default=h},"./src/controller/audio-stream-controller.ts":
/*!***************************************************!*\
!*** ./src/controller/audio-stream-controller.ts ***!
\***************************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),o=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),l=n(/*! ../types/level */"./src/types/level.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),h=n(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts"),d=n(/*! ../demux/transmuxer-interface */"./src/demux/transmuxer-interface.ts"),f=n(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),p=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),m=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),g=n(/*! ../errors */"./src/errors.ts"),v=n(/*! ../utils/logger */"./src/utils/logger.ts");function y(){return(y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var x=function(e){var t,n;function x(t,n){var r;return(r=e.call(this,t,n,"[audio-stream-controller]")||this).videoBuffer=null,r.videoTrackCC=-1,r.waitingVideoCC=-1,r.audioSwitch=!1,r.trackId=-1,r.waitingData=null,r.mainDetails=null,r.bufferFlushed=!1,r._registerListeners(),r}n=e,(t=x).prototype=Object.create(n.prototype),t.prototype.constructor=t,b(t,n);var w=x.prototype;return w.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},w._registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(o.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(o.Events.ERROR,this.onError,this),e.on(o.Events.BUFFER_RESET,this.onBufferReset,this),e.on(o.Events.BUFFER_CREATED,this.onBufferCreated,this),e.on(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},w._unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(o.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(o.Events.ERROR,this.onError,this),e.off(o.Events.BUFFER_RESET,this.onBufferReset,this),e.off(o.Events.BUFFER_CREATED,this.onBufferCreated,this),e.off(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},w.onInitPtsFound=function(e,t){var n=t.frag,r=t.id,o=t.initPTS;if("main"===r){var a=n.cc;this.initPTS[n.cc]=o,this.log("InitPTS for cc: "+a+" found from main: "+o),this.videoTrackCC=a,this.state===i.State.WAITING_INIT_PTS&&this.tick()}},w.startLoad=function(e){if(!this.levels)return this.startPosition=e,void(this.state=i.State.STOPPED);var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,t>0&&-1===e?(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=i.State.IDLE):(this.loadedmetadata=!1,this.state=i.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},w.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_TRACK:var t,n=this.levels,r=this.trackId,o=null==n||null===(t=n[r])||void 0===t?void 0:t.details;if(o){if(this.waitForCdnTuneIn(o))break;this.state=i.State.WAITING_INIT_PTS}break;case i.State.FRAG_LOADING_WAITING_RETRY:var s,l=performance.now(),c=this.retryDate;(!c||l>=c||null!==(s=this.media)&&void 0!==s&&s.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=i.State.IDLE);break;case i.State.WAITING_INIT_PTS:var u=this.waitingData;if(u){var h=u.frag,d=u.part,f=u.cache,m=u.complete;if(void 0!==this.initPTS[h.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.FRAG_LOADING;var g={frag:h,part:d,payload:f.flush(),networkDetails:null};this._handleFragmentLoadProgress(g),m&&e.prototype._handleFragmentLoadComplete.call(this,g)}else if(this.videoTrackCC!==this.waitingVideoCC)v.logger.log("Waiting fragment cc ("+h.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var y=this.getLoadPosition(),b=a.BufferHelper.bufferInfo(this.mediaBuffer,y,this.config.maxBufferHole);Object(p.fragmentWithinToleranceTest)(b.end,this.config.maxFragLookUpTolerance,h)<0&&(v.logger.log("Waiting fragment cc ("+h.cc+") @ "+h.start+" cancelled because another fragment at "+b.end+" is needed"),this.clearWaitingFragment())}}else this.state=i.State.IDLE}this.onTickEnd()},w.clearWaitingFragment=function(){var e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.IDLE)},w.onTickEnd=function(){var e=this.media;if(e&&e.readyState){var t=(this.mediaBuffer?this.mediaBuffer:e).buffered;!this.loadedmetadata&&t.length&&(this.loadedmetadata=!0),this.lastCurrentTime=e.currentTime}},w.doTickIdle=function(){var e,t,n=this.hls,r=this.levels,a=this.media,s=this.trackId,l=n.config;if(r&&r[s]&&(a||!this.startFragRequested&&l.startFragPrefetch)){var h=r[s].details;if(!h||h.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(h))this.state=i.State.WAITING_TRACK;else{this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,u.ElementaryStreamTypes.AUDIO,c.PlaylistLevelType.AUDIO));var d=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,c.PlaylistLevelType.AUDIO);if(null!==d){var f=d.len,p=this.getMaxBufferLength(),m=this.audioSwitch;if(!(f>=p)||m){if(!m&&this._streamEnded(d,h))return n.trigger(o.Events.BUFFER_EOS,{type:"audio"}),void(this.state=i.State.ENDED);var g=h.fragments[0].start,v=d.end;if(m){var y=this.getLoadPosition();v=y,h.PTSKnown&&y<g&&(d.end>g||d.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),a.currentTime=g+.05)}var b=this.getNextFragment(v,h);b?"identity"!==(null===(e=b.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=b.decryptdata)&&void 0!==t&&t.key?this.loadFragment(b,h,v):this.loadKey(b,h):this.bufferFlushed=!0}}}}},w.getMaxBufferLength=function(){var t=e.prototype.getMaxBufferLength.call(this),n=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,c.PlaylistLevelType.MAIN);return null===n?t:Math.max(t,n.len)},w.onMediaDetaching=function(){this.videoBuffer=null,e.prototype.onMediaDetaching.call(this)},w.onAudioTracksUpdated=function(e,t){var n=t.audioTracks;this.resetTransmuxer(),this.levels=n.map((function(e){return new l.Level(e)}))},w.onAudioTrackSwitching=function(e,t){var n=!!t.url;this.trackId=t.id;var r=this.fragCurrent;null!=r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),n?this.setInterval(100):this.resetTransmuxer(),n?(this.audioSwitch=!0,this.state=i.State.IDLE):this.state=i.State.STOPPED,this.tick()},w.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},w.onLevelLoaded=function(e,t){this.mainDetails=t.details},w.onAudioTrackLoaded=function(e,t){var n,r=this.levels,o=t.details,a=t.id;if(r){this.log("Track "+a+" loaded ["+o.startSN+","+o.endSN+"],duration:"+o.totalduration);var s=r[a],l=0;if(o.live||null!==(n=s.details)&&void 0!==n&&n.live){var c=this.mainDetails;if(o.fragments[0]||(o.deltaUpdateFailed=!0),o.deltaUpdateFailed||!c)return;!s.details&&o.hasProgramDateTime&&c.hasProgramDateTime?(Object(m.alignMediaPlaylistByPDT)(o,c),l=o.fragments[0].start):l=this.alignPlaylists(o,s.details)}s.details=o,this.levelLastLoaded=a,this.startFragRequested||!this.mainDetails&&o.live||this.setStartPosition(s.details,l),this.state!==i.State.WAITING_TRACK||this.waitForCdnTuneIn(o)||(this.state=i.State.IDLE),this.tick()}else this.warn("Audio tracks were reset while loading level "+a)},w._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,o=e.payload,a=this.config,s=this.trackId,l=this.levels;if(l){var u=l[s];console.assert(u,"Audio track is defined on fragment load progress");var p=u.details;console.assert(p,"Audio track details are defined on fragment load progress");var m=a.defaultAudioCodec||u.audioCodec||"mp4a.40.2",g=this.transmuxer;g||(g=this.transmuxer=new d.default(this.hls,c.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var y=this.initPTS[n.cc],b=null===(t=n.initSegment)||void 0===t?void 0:t.data;if(void 0!==y){var x=r?r.index:-1,w=-1!==x,E=new f.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,o.byteLength,x,w);g.push(o,b,m,"",n,r,p.totalduration,!1,E,y)}else v.logger.log("Unknown video PTS for cc "+n.cc+", waiting for video PTS before demuxing audio frag "+n.sn+" of ["+p.startSN+" ,"+p.endSN+"],track "+s),(this.waitingData=this.waitingData||{frag:n,part:r,cache:new h.default,complete:!1}).cache.push(new Uint8Array(o)),this.waitingVideoCC=this.videoTrackCC,this.state=i.State.WAITING_INIT_PTS}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},w._handleFragmentLoadComplete=function(t){this.waitingData?this.waitingData.complete=!0:e.prototype._handleFragmentLoadComplete.call(this,t)},w.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},w.onBufferCreated=function(e,t){var n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},w.onFragBuffered=function(e,t){var n=t.frag,r=t.part;n.type===c.PlaylistLevelType.AUDIO&&(this.fragContextChanged(n)?this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==n.sn&&(this.fragPrevious=n,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(n,r)))},w.onError=function(t,n){switch(n.details){case g.ErrorDetails.FRAG_LOAD_ERROR:case g.ErrorDetails.FRAG_LOAD_TIMEOUT:case g.ErrorDetails.KEY_LOAD_ERROR:case g.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.AUDIO,n);break;case g.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case g.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==i.State.ERROR&&this.state!==i.State.STOPPED&&(this.state=n.fatal?i.State.ERROR:i.State.IDLE,this.warn(n.details+" while loading frag, switching to "+this.state+" state"));break;case g.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===n.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var r=!0,o=this.getFwdBufferInfo(this.mediaBuffer,c.PlaylistLevelType.AUDIO);o&&o.len>.5&&(r=!this.reduceMaxBufferLength(o.len)),r&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}}},w.onBufferFlushed=function(e,t){t.type===u.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},w._handleTransmuxComplete=function(e){var t,n="audio",r=this.hls,a=e.remuxResult,s=e.chunkMeta,l=this.getCurrentContext(s);if(!l)return this.warn("The loading context changed while buffering fragment "+s.sn+" of level "+s.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(s.level);var c=l.frag,h=l.part,d=a.audio,f=a.text,p=a.id3,m=a.initSegment;if(!this.fragContextChanged(c)){if(this.state=i.State.PARSING,this.audioSwitch&&d&&this.completeAudioSwitch(),null!=m&&m.tracks&&(this._bufferInitSegment(m.tracks,c,s),r.trigger(o.Events.FRAG_PARSING_INIT_SEGMENT,{frag:c,id:n,tracks:m.tracks})),d){var g=d.startPTS,v=d.endPTS,b=d.startDTS,x=d.endDTS;h&&(h.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:g,endPTS:v,startDTS:b,endDTS:x}),c.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,g,v,b,x),this.bufferFragmentData(d,c,h,s)}if(null!=p&&null!==(t=p.samples)&&void 0!==t&&t.length){var w=y({frag:c,id:n},p);r.trigger(o.Events.FRAG_PARSING_METADATA,w)}if(f){var E=y({frag:c,id:n},f);r.trigger(o.Events.FRAG_PARSING_USERDATA,E)}}},w._bufferInitSegment=function(e,t,n){if(this.state===i.State.PARSING){e.video&&delete e.video;var r=e.audio;if(r){r.levelCodec=r.codec,r.id="audio",this.log("Init audio buffer, container:"+r.container+", codecs[parsed]=["+r.codec+"]"),this.hls.trigger(o.Events.BUFFER_CODECS,e);var a=r.initSegment;if(null!=a&&a.byteLength){var s={type:"audio",frag:t,part:null,chunkMeta:n,parent:t.type,data:a};this.hls.trigger(o.Events.BUFFER_APPENDING,s)}this.tick()}}},w.loadFragment=function(t,n,o){var a=this.fragmentTracker.getState(t);this.fragCurrent=t,(this.audioSwitch||a===s.FragmentState.NOT_LOADED||a===s.FragmentState.PARTIAL)&&("initSegment"===t.sn?this._loadInitSegment(t):n.live&&!Object(r.isFiniteNumber)(this.initPTS[t.cc])?(this.log("Waiting for video PTS in continuity counter "+t.cc+" of live stream before loading audio fragment "+t.sn+" of level "+this.trackId),this.state=i.State.WAITING_INIT_PTS):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,o)))},w.completeAudioSwitch=function(){var t=this.hls,n=this.media,r=this.trackId;n&&(this.log("Switching audio track : flushing all audio"),e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,t.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:r})},x}(i.default);t.default=x},"./src/controller/audio-track-controller.ts":
/*!**************************************************!*\
!*** ./src/controller/audio-track-controller.ts ***!
\**************************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),a=n(/*! ../types/loader */"./src/types/loader.ts");function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){var t,n;function o(t){var n;return(n=e.call(this,t,"[audio-track-controller]")||this).tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.trackName="",n.selectDefaultTrack=!0,n.registerListeners(),n}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var c,u,h,d=o.prototype;return d.registerListeners=function(){var e=this.hls;e.on(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(r.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(r.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(r.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(r.Events.ERROR,this.onError,this)},d.unregisterListeners=function(){var e=this.hls;e.off(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(r.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(r.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(r.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(r.Events.ERROR,this.onError,this)},d.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,e.prototype.destroy.call(this)},d.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},d.onManifestParsed=function(e,t){this.tracks=t.audioTracks||[]},d.onAudioTrackLoaded=function(e,t){var n=t.id,r=t.details,i=this.tracksInGroup[n];if(i){var o=i.details;i.details=t.details,this.log("audioTrack "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,o))}else this.warn("Invalid audio track id "+n)},d.onLevelLoading=function(e,t){this.switchLevel(t.level)},d.onLevelSwitching=function(e,t){this.switchLevel(t.level)},d.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.audioGroupIds){var n=t.audioGroupIds[t.urlId];if(this.groupId!==n){this.groupId=n;var i=this.tracks.filter((function(e){return!n||e.groupId===n}));this.selectDefaultTrack&&!i.some((function(e){return e.default}))&&(this.selectDefaultTrack=!1),this.tracksInGroup=i;var o={audioTracks:i};this.log("Updating audio tracks, "+i.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(r.Events.AUDIO_TRACKS_UPDATED,o),this.selectInitialTrack()}}},d.onError=function(t,n){e.prototype.onError.call(this,t,n),!n.fatal&&n.context&&n.context.type===a.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},d.setAudioTrack=function(e){var t=this.tracksInGroup;if(e<0||e>=t.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var n=t[this.trackId];this.log("Now switching to audio-track index "+e);var i=t[e],o=i.id,a=i.groupId,s=void 0===a?"":a,l=i.name,c=i.type,u=i.url;if(this.trackId=e,this.trackName=l,this.selectDefaultTrack=!1,this.hls.trigger(r.Events.AUDIO_TRACK_SWITCHING,{id:o,groupId:s,name:l,type:c,url:u}),!i.details||i.details.live){var h=this.switchParams(i.url,null==n?void 0:n.details);this.loadPlaylist(h)}}},d.selectInitialTrack=function(){var e=this.tracksInGroup;console.assert(e.length,"Initial audio track should be selected when tracks are known");var t=this.trackName,n=this.findTrackId(t)||this.findTrackId();-1!==n?this.setAudioTrack(n):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},d.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n<t.length;n++){var r=t[n];if((!this.selectDefaultTrack||r.default)&&(!e||e===r.name))return r.id}return-1},d.loadPlaylist=function(e){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var n=t.id,i=t.groupId,o=t.url;if(e)try{o=e.addDirectives(o)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("loading audio-track playlist for id: "+n),this.clearTimer(),this.hls.trigger(r.Events.AUDIO_TRACK_LOADING,{url:o,id:n,groupId:i,deliveryDirectives:e||null})}},c=o,(u=[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}}])&&s(c.prototype,u),h&&s(c,h),o}(o.default);t.default=c},"./src/controller/base-playlist-controller.ts":
/*!****************************************************!*\
!*** ./src/controller/base-playlist-controller.ts ***!
\****************************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return l}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../types/level */"./src/types/level.ts"),o=n(/*! ./level-helper */"./src/controller/level-helper.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=function(){function e(e,t){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=a.logger.log.bind(a.logger,t+":"),this.warn=a.logger.warn.bind(a.logger,t+":"),this.hls=e}var t=e.prototype;return t.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},t.onError=function(e,t){t.fatal&&t.type===s.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},t.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},t.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},t.stopLoad=function(){this.canLoad=!1,this.clearTimer()},t.switchParams=function(e,t){var n=null==t?void 0:t.renditionReports;if(n)for(var o=0;o<n.length;o++){var a=n[o],s=""+a.URI;if(s===e.substr(-s.length)){var l=parseInt(a["LAST-MSN"]),c=parseInt(a["LAST-PART"]);if(t&&this.hls.config.lowLatencyMode){var u=Math.min(t.age-t.partTarget,t.targetduration);void 0!==c&&u>t.partTarget&&(c+=1)}if(Object(r.isFiniteNumber)(l))return new i.HlsUrlParameters(l,Object(r.isFiniteNumber)(c)?c:void 0,i.HlsSkip.No)}}},t.loadPlaylist=function(e){},t.shouldLoadTrack=function(e){return this.canLoad&&e&&!!e.url&&(!e.details||e.details.live)},t.playlistLoaded=function(e,t,n){var r=this,i=t.details,a=t.stats,s=a.loading.end?Math.max(0,self.performance.now()-a.loading.end):0;if(i.advancedDateTime=Date.now()-s,i.live||null!=n&&n.live){if(i.reloaded(n),n&&this.log("live playlist "+e+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),n&&i.fragments.length>0&&Object(o.mergeDetails)(n,i),!this.canLoad||!i.live)return;var l,c=void 0,u=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var h=this.hls.config.lowLatencyMode,d=i.lastPartSn,f=i.endSN,p=i.lastPartIndex,m=d===f;-1!==p?(c=m?f+1:d,u=m?h?0:p:p+1):c=f+1;var g=i.age,v=g+i.ageHeader,y=Math.min(v-i.partTarget,1.5*i.targetduration);if(y>0){if(n&&y>n.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+n.tuneInGoal+" to: "+y+" with playlist age: "+i.age),y=0;else{var b=Math.floor(y/i.targetduration);c+=b,void 0!==u&&(u+=Math.round(y%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+g.toFixed(2)+"s goal: "+y+" skip sn "+b+" to part "+u)}i.tuneInGoal=y}if(l=this.getDeliveryDirectives(i,t.deliveryDirectives,c,u),h||!m)return void this.loadPlaylist(l)}else l=this.getDeliveryDirectives(i,t.deliveryDirectives,c,u);var x=Object(o.computeReloadInterval)(i,a);void 0!==c&&i.canBlockReload&&(x-=i.partTarget||1),this.log("reload live playlist "+e+" in "+Math.round(x)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(l)}),x)}else this.clearTimer()},t.getDeliveryDirectives=function(e,t,n,r){var o=Object(i.getSkipValue)(e,n);return null!=t&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,o=i.HlsSkip.No),new i.HlsUrlParameters(n,r,o)},t.retryLoadingOrFail=function(e){var t,n=this,r=this.hls.config,i=this.retryCount<r.levelLoadingMaxRetry;if(i)if(this.retryCount++,e.details.indexOf("LoadTimeOut")>-1&&null!==(t=e.context)&&void 0!==t&&t.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+e.details+'"'),this.loadPlaylist();else{var o=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return n.loadPlaylist()}),o),this.warn("retry playlist loading #"+this.retryCount+" in "+o+' ms after "'+e.details+'"')}else this.warn('cannot recover from error "'+e.details+'"'),this.clearTimer(),e.fatal=!0;return i},e}()},"./src/controller/base-stream-controller.ts":
/*!**************************************************!*\
!*** ./src/controller/base-stream-controller.ts ***!
\**************************************************/
/*! exports provided: State, default */function(e,t,n){"use strict";n.r(t),n.d(t,"State",(function(){return w})),n.d(t,"default",(function(){return E}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../task-loop */"./src/task-loop.ts"),o=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=n(/*! ../utils/logger */"./src/utils/logger.ts"),l=n(/*! ../events */"./src/events.ts"),c=n(/*! ../errors */"./src/errors.ts"),u=n(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),h=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),d=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),f=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),p=n(/*! ./level-helper */"./src/controller/level-helper.ts"),m=n(/*! ../loader/fragment-loader */"./src/loader/fragment-loader.ts"),g=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),v=n(/*! ../utils/time-ranges */"./src/utils/time-ranges.ts"),y=n(/*! ../types/loader */"./src/types/loader.ts");function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var w={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},E=function(e){var t,n;function i(t,n,r){var i;return(i=e.call(this)||this).hls=void 0,i.fragPrevious=null,i.fragCurrent=null,i.fragmentTracker=void 0,i.transmuxer=null,i._state=w.STOPPED,i.media=void 0,i.mediaBuffer=void 0,i.config=void 0,i.bitrateTest=!1,i.lastCurrentTime=0,i.nextLoadPosition=0,i.startPosition=0,i.loadedmetadata=!1,i.fragLoadError=0,i.retryDate=0,i.levels=null,i.fragmentLoader=void 0,i.levelLastLoaded=null,i.startFragRequested=!1,i.decrypter=void 0,i.initPTS=[],i.onvseeking=null,i.onvended=null,i.logPrefix="",i.log=void 0,i.warn=void 0,i.logPrefix=r,i.log=s.logger.log.bind(s.logger,r+":"),i.warn=s.logger.warn.bind(s.logger,r+":"),i.hls=t,i.fragmentLoader=new m.default(t.config),i.fragmentTracker=n,i.config=t.config,i.decrypter=new g.default(t,t.config),t.on(l.Events.KEY_LOADED,i.onKeyLoaded,function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i)),i}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,x(t,n);var E,S,C,k=i.prototype;return k.doTick=function(){this.onTickEnd()},k.onTickEnd=function(){},k.startLoad=function(e){},k.stopLoad=function(){this.fragmentLoader.abort();var e=this.fragCurrent;e&&this.fragmentTracker.removeFragment(e),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=w.STOPPED},k._streamEnded=function(e,t){var n=this.fragCurrent,r=this.fragmentTracker;if(!t.live&&n&&n.sn===t.endSN&&!e.nextStart){var i=r.getState(n);return i===o.FragmentState.PARTIAL||i===o.FragmentState.OK}return!1},k.onMediaAttached=function(e,t){var n=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),n.addEventListener("seeking",this.onvseeking),n.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.state===w.STOPPED&&this.startLoad(r.startPosition)},k.onMediaDetaching=function(){var e=this.media;null!=e&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},k.onMediaSeeking=function(){var e=this.config,t=this.fragCurrent,n=this.media,i=this.mediaBuffer,o=this.state,s=n?n.currentTime:0,l=a.BufferHelper.bufferInfo(i||n,s,e.maxBufferHole);if(this.log("media seeking to "+(Object(r.isFiniteNumber)(s)?s.toFixed(3):s)+", state: "+o),o===w.ENDED)this.resetLoadingState();else if(t&&!l.len){var c=e.maxFragLookUpTolerance,u=t.start-c,h=s>t.start+t.duration+c;(s<u||h)&&(h&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.loader.abort()),this.resetLoadingState())}n&&(this.lastCurrentTime=s),this.loadedmetadata||l.len||(this.nextLoadPosition=this.startPosition=s),this.tickImmediate()},k.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},k.onKeyLoaded=function(e,t){if(this.state===w.KEY_LOADING&&t.frag===this.fragCurrent&&this.levels){this.state=w.IDLE;var n=this.levels[t.frag.level].details;n&&this.loadFragment(t.frag,n,t.frag.start)}},k.onHandlerDestroying=function(){this.stopLoad(),e.prototype.onHandlerDestroying.call(this)},k.onHandlerDestroyed=function(){this.state=w.STOPPED,this.hls.off(l.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,e.prototype.onHandlerDestroyed.call(this)},k.loadKey=function(e,t){this.log("Loading key for "+e.sn+" of ["+t.startSN+"-"+t.endSN+"], "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level),this.state=w.KEY_LOADING,this.fragCurrent=e,this.hls.trigger(l.Events.KEY_LOADING,{frag:e})},k.loadFragment=function(e,t,n){this._loadFragForPlayback(e,t,n)},k._loadFragForPlayback=function(e,t,n){var r=this;this._doFragLoad(e,t,n,(function(t){if(r.fragContextChanged(e))return r.warn("Fragment "+e.sn+(t.part?" p: "+t.part.index:"")+" of level "+e.level+" was dropped during download."),void r.fragmentTracker.removeFragment(e);e.stats.chunkCount++,r._handleFragmentLoadProgress(t)})).then((function(t){if(t){r.fragLoadError=0;var n=r.state;if(!r.fragContextChanged(e))return"payload"in t&&(r.log("Loaded fragment "+e.sn+" of level "+e.level),r.hls.trigger(l.Events.FRAG_LOADED,t),r.state===w.BACKTRACKING)?(r.fragmentTracker.backtrack(e,t),void r.resetFragmentLoading(e)):void r._handleFragmentLoadComplete(t);(n===w.FRAG_LOADING||n===w.BACKTRACKING||!r.fragCurrent&&n===w.PARSING)&&(r.fragmentTracker.removeFragment(e),r.state=w.IDLE)}})).catch((function(t){r.warn(t),r.resetFragmentLoading(e)}))},k.flushMainBuffer=function(e,t,n){if(void 0===n&&(n=null),e-t){var r={startOffset:e,endOffset:t,type:n};this.fragLoadError=0,this.hls.trigger(l.Events.BUFFER_FLUSHING,r)}},k._loadInitSegment=function(e){var t=this;this._doFragLoad(e).then((function(n){if(!n||t.fragContextChanged(e)||!t.levels)throw new Error("init load aborted");return n})).then((function(n){var r=t.hls,i=n.payload,o=e.decryptdata;if(i&&i.byteLength>0&&o&&o.key&&o.iv&&"AES-128"===o.method){var a=self.performance.now();return t.decrypter.webCryptoDecrypt(new Uint8Array(i),o.key.buffer,o.iv.buffer).then((function(t){var i=self.performance.now();return r.trigger(l.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:a,tdecrypt:i}}),n.payload=t,n}))}return n})).then((function(n){var r=t.fragCurrent,i=t.hls,o=t.levels;if(!o)throw new Error("init load aborted, missing levels");var a=o[e.level].details;console.assert(a,"Level details are defined when init segment is loaded");var s=e.stats;t.state=w.IDLE,t.fragLoadError=0,e.data=new Uint8Array(n.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),n.frag===r&&i.trigger(l.Events.FRAG_BUFFERED,{stats:s,frag:r,part:null,id:e.type}),t.tick()})).catch((function(n){t.warn(n),t.resetFragmentLoading(e)}))},k.fragContextChanged=function(e){var t=this.fragCurrent;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId},k.fragBufferedComplete=function(e,t){var n=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+e.type+" sn: "+e.sn+(t?" part: "+t.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level+" "+v.default.toString(a.BufferHelper.getBuffered(n))),this.state=w.IDLE,this.tick()},k._handleFragmentLoadComplete=function(e){var t=this.transmuxer;if(t){var n=e.frag,r=e.part,i=e.partsLoaded,o=!i||0===i.length||i.some((function(e){return!e})),a=new u.ChunkMetadata(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!o);t.flush(a)}},k._handleFragmentLoadProgress=function(e){},k._doFragLoad=function(e,t,n,i){var o=this;if(void 0===n&&(n=null),!this.levels)throw new Error("frag load aborted, missing levels");if(n=Math.max(e.start,n||0),this.config.lowLatencyMode&&t){var a=t.partList;if(a&&i){n>e.end&&t.fragmentHint&&(e=t.fragmentHint);var s=this.getNextPart(a,e,n);if(s>-1){var c=a[s];return this.log("Loading part sn: "+e.sn+" p: "+c.index+" cc: "+e.cc+" of playlist ["+t.startSN+"-"+t.endSN+"] parts [0-"+s+"-"+(a.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),this.nextLoadPosition=c.start+c.duration,this.state=w.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:e,part:a[s],targetBufferTime:n}),this.doFragPartsLoad(e,a,s,i).catch((function(e){return o.handleFragLoadError(e)}))}if(!e.url||this.loadedEndOfParts(a,n))return Promise.resolve(null)}}return this.log("Loading fragment "+e.sn+" cc: "+e.cc+" "+(t?"of ["+t.startSN+"-"+t.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),Object(r.isFiniteNumber)(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=w.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragmentLoader.load(e,i).catch((function(e){return o.handleFragLoadError(e)}))},k.doFragPartsLoad=function(e,t,n,r){var i=this;return new Promise((function(o,a){var s=[];!function n(c){var u=t[c];i.fragmentLoader.loadPart(e,u,r).then((function(r){s[u.index]=r;var a=r.part;i.hls.trigger(l.Events.FRAG_LOADED,r);var h=t[c+1];if(!h||h.fragment!==e)return o({frag:e,part:a,partsLoaded:s});n(c+1)})).catch(a)}(n)}))},k.handleFragLoadError=function(e){var t=e.data;return t&&t.details===c.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(l.Events.ERROR,t),null},k._handleTransmuxerFlush=function(e){var t=this.getCurrentContext(e);if(t&&this.state===w.PARSING){var n=t.frag,r=t.part,i=t.level,o=self.performance.now();n.stats.parsing.end=o,r&&(r.stats.parsing.end=o),this.updateLevelTiming(n,r,i,e.partial)}else this.fragCurrent||(this.state=w.IDLE)},k.getCurrentContext=function(e){var t=this.levels,n=e.level,r=e.sn,i=e.part;if(!t||!t[n])return this.warn("Levels object was unset while buffering fragment "+r+" of level "+n+". The current chunk will not be buffered."),null;var o=t[n],a=i>-1?Object(p.getPartWith)(o,r,i):null,s=a?a.fragment:Object(p.getFragmentWithSN)(o,r,this.fragCurrent);return s?{frag:s,part:a,level:o}:null},k.bufferFragmentData=function(e,t,n,r){if(e&&this.state===w.PARSING){var i=e.data1,o=e.data2,a=i;if(i&&o&&(a=Object(h.appendUint8Array)(i,o)),a&&a.length){var s={type:e.type,frag:t,part:n,chunkMeta:r,parent:t.type,data:a};this.hls.trigger(l.Events.BUFFER_APPENDING,s),e.dropped&&e.independent&&!n&&this.flushBufferGap(t)}}},k.flushBufferGap=function(e){var t=this.media;if(t)if(a.BufferHelper.isBuffered(t,t.currentTime)){var n=t.currentTime,r=a.BufferHelper.bufferInfo(t,n,0),i=e.duration,o=Math.min(2*this.config.maxFragLookUpTolerance,.25*i),s=Math.max(Math.min(e.start-o,r.end-o),n+o);e.start-s>o&&this.flushMainBuffer(s,e.start)}else this.flushMainBuffer(0,e.start)},k.getFwdBufferInfo=function(e,t){var n=this.config,i=this.getLoadPosition();if(!Object(r.isFiniteNumber)(i))return null;var o=a.BufferHelper.bufferInfo(e,i,n.maxBufferHole);if(0===o.len&&void 0!==o.nextStart){var s=this.fragmentTracker.getBufferedFrag(i,t);if(s&&o.nextStart<s.end)return a.BufferHelper.bufferInfo(e,i,Math.max(o.nextStart,n.maxBufferHole))}return o},k.getMaxBufferLength=function(e){var t,n=this.config;return t=e?Math.max(8*n.maxBufferSize/e,n.maxBufferLength):n.maxBufferLength,Math.min(t,n.maxMaxBufferLength)},k.reduceMaxBufferLength=function(e){var t=this.config,n=e||t.maxBufferLength;return t.maxMaxBufferLength>=n&&(t.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},k.getNextFragment=function(e,t){var n,r,i=t.fragments,o=i.length;if(!o)return null;var a,s=this.config,l=i[0].start;if(t.live){var c=s.initialLiveManifestSize;if(o<c)return this.warn("Not enough fragments to start playback (have: "+o+", need: "+c+")"),null;t.PTSKnown||this.startFragRequested||-1!==this.startPosition||(a=this.getInitialLiveFragment(t,i),this.startPosition=a?this.hls.liveSyncPosition||a.start:e)}else e<=l&&(a=i[0]);if(!a){var u=s.lowLatencyMode?t.partEnd:t.fragmentEnd;a=this.getFragmentAtPosition(e,u,t)}return null===(n=a)||void 0===n||!n.initSegment||null!==(r=a)&&void 0!==r&&r.initSegment.data||this.bitrateTest||(a=a.initSegment),a},k.getNextPart=function(e,t,n){for(var r=-1,i=!1,o=!0,a=0,s=e.length;a<s;a++){var l=e[a];if(o=o&&!l.independent,r>-1&&n<l.start)break;var c=l.loaded;!c&&(i||l.independent||o)&&l.fragment===t&&(r=a),i=c}return r},k.loadedEndOfParts=function(e,t){var n=e[e.length-1];return n&&t>n.start&&n.loaded},k.getInitialLiveFragment=function(e,t){var n=this.fragPrevious,r=null;if(n){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),r=Object(f.findFragmentByPDT)(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){var i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){var o=t[i-e.startSN];n.cc===o.cc&&(r=o,this.log("Live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=Object(f.findFragWithCC)(t,n.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+r.sn)}}else{var a=this.hls.liveSyncPosition;null!==a&&(r=this.getFragmentAtPosition(a,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r},k.getFragmentAtPosition=function(e,t,n){var r,i=this.config,a=this.fragPrevious,s=n.fragments,l=n.endSN,c=n.fragmentHint,u=i.maxFragLookUpTolerance,h=!!(i.lowLatencyMode&&n.partList&&c);if(h&&c&&!this.bitrateTest&&(s=s.concat(c),l=c.sn),e<t){var d=e>t-u?0:u;r=Object(f.findFragmentByPTS)(a,s,e,d)}else r=s[s.length-1];if(r){var p=r.sn-n.startSN,m=a&&r.level===a.level,g=s[p+1];if(this.fragmentTracker.getState(r)===o.FragmentState.BACKTRACKED){r=null;for(var v=p;s[v]&&this.fragmentTracker.getState(s[v])===o.FragmentState.BACKTRACKED;)r=a?s[v--]:s[--v];r||(r=g)}else a&&r.sn===a.sn&&!h&&m&&(r.sn<l&&this.fragmentTracker.getState(g)!==o.FragmentState.OK?(this.log("SN "+r.sn+" just loaded, load next one: "+g.sn),r=g):r=null)}return r},k.synchronizeToLiveEdge=function(e){var t=this.config,n=this.media;if(n){var r=this.hls.liveSyncPosition,i=n.currentTime,o=e.fragments[0].start,a=e.edge,s=i>=o-t.maxFragLookUpTolerance&&i<=a;if(null!==r&&n.duration>r&&(i<r||!s)){var l=void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!s&&n.readyState<4||i<a-l)&&(this.loadedmetadata||(this.nextLoadPosition=r),n.readyState&&(this.warn("Playback: "+i.toFixed(3)+" is located too far from the end of live sliding playlist: "+a+", reset currentTime to : "+r.toFixed(3)),n.currentTime=r))}}},k.alignPlaylists=function(e,t){var n=this.levels,i=this.levelLastLoaded,o=this.fragPrevious,a=null!==i?n[i]:null,s=e.fragments.length;if(!s)return this.warn("No fragments in live playlist"),0;var l=e.fragments[0].start,c=!t,u=e.alignedSliding&&Object(r.isFiniteNumber)(l);if(c||!u&&!l){Object(d.alignStream)(o,a,e);var h=e.fragments[0].start;return this.log("Live playlist sliding: "+h.toFixed(2)+" start-sn: "+(t?t.startSN:"na")+"->"+e.startSN+" prev-sn: "+(o?o.sn:"na")+" fragments: "+s),h}return l},k.waitForCdnTuneIn=function(e){return e.live&&e.canBlockReload&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)},k.setStartPosition=function(e,t){var n=this.startPosition;if(n<t&&(n=-1),-1===n||-1===this.lastCurrentTime){var i=e.startTimeOffset;Object(r.isFiniteNumber)(i)?(n=t+i,i<0&&(n+=e.totalduration),n=Math.min(Math.max(t,n),t+e.totalduration),this.log("Start time offset "+i+" found in playlist, adjust startPosition to "+n),this.startPosition=n):e.live?n=this.hls.liveSyncPosition||t:this.startPosition=n=0,this.lastCurrentTime=n}this.nextLoadPosition=n},k.getLoadPosition=function(){var e=this.media,t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t},k.handleFragLoadAborted=function(e,t){this.transmuxer&&"initSegment"!==e.sn&&e.stats.aborted&&(this.warn("Fragment "+e.sn+(t?" part"+t.index:"")+" of level "+e.level+" was aborted"),this.resetFragmentLoading(e))},k.resetFragmentLoading=function(e){this.fragCurrent&&this.fragContextChanged(e)||(this.state=w.IDLE)},k.onFragmentOrKeyLoadError=function(e,t){if(!t.fatal){var n=t.frag;if(n&&n.type===e){var r=this.fragCurrent;console.assert(r&&n.sn===r.sn&&n.level===r.level&&n.urlId===r.urlId,"Frag load error must match current frag to retry");var i=this.config;if(this.fragLoadError+1<=i.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(n.level))return;var o=Math.min(Math.pow(2,this.fragLoadError)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);this.warn("Fragment "+n.sn+" of "+e+" "+n.level+" failed to load, retrying in "+o+"ms"),this.retryDate=self.performance.now()+o,this.fragLoadError++,this.state=w.FRAG_LOADING_WAITING_RETRY}else t.levelRetry?(e===y.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=w.IDLE):(s.logger.error(t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.hls.stopLoad(),this.state=w.ERROR)}}},k.afterBufferFlushed=function(e,t,n){if(e){var r=a.BufferHelper.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===w.ENDED&&this.resetLoadingState()}},k.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=w.IDLE},k.resetLiveStartWhenNotLoaded=function(e){if(!this.loadedmetadata){this.startFragRequested=!1;var t=this.levels?this.levels[e].details:null;if(null!=t&&t.live)return this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},k.updateLevelTiming=function(e,t,n,r){var i=this,o=n.details;console.assert(!!o,"level.details must be defined"),Object.keys(e.elementaryStreams).reduce((function(t,a){var s=e.elementaryStreams[a];if(s){var c=s.endPTS-s.startPTS;if(c<=0)return i.warn("Could not parse fragment "+e.sn+" "+a+" duration reliably ("+c+") resetting transmuxer to fallback to playlist timing"),i.resetTransmuxer(),t||!1;var u=r?0:Object(p.updateFragPTSDTS)(o,e,s.startPTS,s.endPTS,s.startDTS,s.endDTS);return i.hls.trigger(l.Events.LEVEL_PTS_UPDATED,{details:o,level:n,drift:u,type:a,frag:e,start:s.startPTS,end:s.endPTS}),!0}return t}),!1)?(this.state=w.PARSED,this.hls.trigger(l.Events.FRAG_PARSED,{frag:e,part:t})):this.resetLoadingState()},k.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},E=i,(S=[{key:"state",get:function(){return this._state},set:function(e){var t=this._state;t!==e&&(this._state=e,this.log(t+"->"+e))}}])&&b(E.prototype,S),C&&b(E,C),i}(i.default)},"./src/controller/buffer-controller.ts":
/*!*********************************************!*\
!*** ./src/controller/buffer-controller.ts ***!
\*********************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=n(/*! ../errors */"./src/errors.ts"),s=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),u=n(/*! ./buffer-operation-queue */"./src/controller/buffer-operation-queue.ts"),h=Object(l.getMediaSource)(),d=/([ha]vc.)(?:\.[^.,]+)+/,f=function(){function e(e){var t=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var e=t.hls,n=t.media,r=t.mediaSource;o.logger.log("[buffer-controller]: Media source opened"),n&&(t.updateMediaElementDuration(),e.trigger(i.Events.MEDIA_ATTACHED,{media:n})),r&&r.removeEventListener("sourceopen",t._onMediaSourceOpen),t.checkPendingTracks()},this._onMediaSourceClose=function(){o.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){o.logger.log("[buffer-controller]: Media source ended")},this.hls=e,this._initSourceBuffer(),this.registerListeners()}var t=e.prototype;return t.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},t.destroy=function(){this.unregisterListeners(),this.details=null},t.registerListeners=function(){var e=this.hls;e.on(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(i.Events.BUFFER_RESET,this.onBufferReset,this),e.on(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.on(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(i.Events.BUFFER_EOS,this.onBufferEos,this),e.on(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(i.Events.FRAG_PARSED,this.onFragParsed,this),e.on(i.Events.FRAG_CHANGED,this.onFragChanged,this)},t.unregisterListeners=function(){var e=this.hls;e.off(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(i.Events.BUFFER_RESET,this.onBufferReset,this),e.off(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.off(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(i.Events.BUFFER_EOS,this.onBufferEos,this),e.off(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(i.Events.FRAG_PARSED,this.onFragParsed,this),e.off(i.Events.FRAG_CHANGED,this.onFragChanged,this)},t._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new u.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},t.onManifestParsed=function(e,t){var n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,this.details=null,o.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},t.onMediaAttaching=function(e,t){var n=this.media=t.media;if(n&&h){var r=this.mediaSource=new h;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),n.src=self.URL.createObjectURL(r),this._objectUrl=n.src}},t.onMediaDetaching=function(){var e=this.media,t=this.mediaSource,n=this._objectUrl;if(t){if(o.logger.log("[buffer-controller]: media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){o.logger.warn("[buffer-controller]: onMediaDetaching: "+e.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(n&&self.URL.revokeObjectURL(n),e.src===n?(e.removeAttribute("src"),e.load()):o.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(i.Events.MEDIA_DETACHED,void 0)},t.onBufferReset=function(){var e=this;this.getSourceBufferTypes().forEach((function(t){var n=e.sourceBuffer[t];try{n&&(e.removeBufferListeners(t),e.mediaSource&&e.mediaSource.removeSourceBuffer(n),e.sourceBuffer[t]=void 0)}catch(e){o.logger.warn("[buffer-controller]: Failed to reset the "+t+" buffer",e)}})),this._initSourceBuffer()},t.onBufferCodecs=function(e,t){var n=this,r=this.getSourceBufferTypes().length;Object.keys(t).forEach((function(e){if(r){var i=n.tracks[e];if(i&&"function"==typeof i.buffer.changeType){var o=t[e],a=o.codec,s=o.levelCodec,l=o.container;if((i.levelCodec||i.codec).replace(d,"$1")!==(s||a).replace(d,"$1")){var c=l+";codecs="+(s||a);n.appendChangeType(e,c)}}}else n.pendingTracks[e]=t[e]})),r||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},t.appendChangeType=function(e,t){var n=this,r=this.operationQueue,i={execute:function(){var i=n.sourceBuffer[e];i&&(o.logger.log("[buffer-controller]: changing "+e+" sourceBuffer type to "+t),i.changeType(t)),r.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(t){o.logger.warn("[buffer-controller]: Failed to change "+e+" SourceBuffer type",t)}};r.append(i,e)},t.onBufferAppending=function(e,t){var n=this,r=this.hls,l=this.operationQueue,c=this.tracks,u=t.data,h=t.type,d=t.frag,f=t.part,p=t.chunkMeta,m=p.buffering[h],g=self.performance.now();m.start=g;var v=d.stats.buffering,y=f?f.stats.buffering:null;0===v.start&&(v.start=g),y&&0===y.start&&(y.start=g);var b=c.audio,x="audio"===h&&1===p.id&&"audio/mpeg"===(null==b?void 0:b.container),w={execute:function(){if(m.executeStart=self.performance.now(),x){var e=n.sourceBuffer[h];if(e){var t=d.start-e.timestampOffset;Math.abs(t)>=.1&&(o.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+d.start+" (delta: "+t+") sn: "+d.sn+")"),e.timestampOffset=d.start)}}n.appendExecutor(u,h)},onStart:function(){},onComplete:function(){var e=self.performance.now();m.executeEnd=m.end=e,0===v.first&&(v.first=e),y&&0===y.first&&(y.first=e);var t=n.sourceBuffer,r={};for(var o in t)r[o]=s.BufferHelper.getBuffered(t[o]);n.appendError=0,n.hls.trigger(i.Events.BUFFER_APPENDED,{type:h,frag:d,part:f,chunkMeta:p,parent:d.type,timeRanges:r})},onError:function(e){o.logger.error("[buffer-controller]: Error encountered while trying to append to the "+h+" SourceBuffer",e);var t={type:a.ErrorTypes.MEDIA_ERROR,parent:d.type,details:a.ErrorDetails.BUFFER_APPEND_ERROR,err:e,fatal:!1};e.code===DOMException.QUOTA_EXCEEDED_ERR?t.details=a.ErrorDetails.BUFFER_FULL_ERROR:(n.appendError++,t.details=a.ErrorDetails.BUFFER_APPEND_ERROR,n.appendError>r.config.appendErrorMaxRetry&&(o.logger.error("[buffer-controller]: Failed "+r.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),t.fatal=!0)),r.trigger(i.Events.ERROR,t)}};l.append(w,h)},t.onBufferFlushing=function(e,t){var n=this,r=this.operationQueue,a=function(e){return{execute:n.removeExecutor.bind(n,e,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){n.hls.trigger(i.Events.BUFFER_FLUSHED,{type:e})},onError:function(t){o.logger.warn("[buffer-controller]: Failed to remove from "+e+" SourceBuffer",t)}}};t.type?r.append(a(t.type),t.type):this.getSourceBufferTypes().forEach((function(e){r.append(a(e),e)}))},t.onFragParsed=function(e,t){var n=this,r=t.frag,a=t.part,s=[],l=a?a.elementaryStreams:r.elementaryStreams;l[c.ElementaryStreamTypes.AUDIOVIDEO]?s.push("audiovideo"):(l[c.ElementaryStreamTypes.AUDIO]&&s.push("audio"),l[c.ElementaryStreamTypes.VIDEO]&&s.push("video")),0===s.length&&o.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+r.type+" level: "+r.level+" sn: "+r.sn),this.blockBuffers((function(){var e=self.performance.now();r.stats.buffering.end=e,a&&(a.stats.buffering.end=e);var t=a?a.stats:r.stats;n.hls.trigger(i.Events.FRAG_BUFFERED,{frag:r,part:a,stats:t,id:r.type})}),s)},t.onFragChanged=function(e,t){this.flushBackBuffer()},t.onBufferEos=function(e,t){var n=this;this.getSourceBufferTypes().reduce((function(e,r){var i=n.sourceBuffer[r];return t.type&&t.type!==r||i&&!i.ended&&(i.ended=!0,o.logger.log("[buffer-controller]: "+r+" sourceBuffer now EOS")),e&&!(i&&!i.ended)}),!0)&&this.blockBuffers((function(){var e=n.mediaSource;e&&"open"===e.readyState&&e.endOfStream()}))},t.onLevelUpdated=function(e,t){var n=t.details;n.fragments.length&&(this.details=n,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},t.flushBackBuffer=function(){var e=this.hls,t=this.details,n=this.media,o=this.sourceBuffer;if(n&&null!==t){var a=this.getSourceBufferTypes();if(a.length){var l=t.live&&null!==e.config.liveBackBufferLength?e.config.liveBackBufferLength:e.config.backBufferLength;if(Object(r.isFiniteNumber)(l)&&!(l<0)){var c=n.currentTime,u=t.levelTargetDuration,h=Math.max(l,u),d=Math.floor(c/u)*u-h;a.forEach((function(n){var r=o[n];if(r){var a=s.BufferHelper.getBuffered(r);a.length>0&&d>a.start(0)&&(e.trigger(i.Events.BACK_BUFFER_REACHED,{bufferEnd:d}),t.live&&e.trigger(i.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d}),e.trigger(i.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:n}))}}))}}}},t.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var e=this.details,t=this.hls,n=this.media,i=this.mediaSource,a=e.fragments[0].start+e.totalduration,s=n.duration,l=Object(r.isFiniteNumber)(i.duration)?i.duration:0;e.live&&t.config.liveDurationInfinity?(o.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),i.duration=1/0,this.updateSeekableRange(e)):(a>l&&a>s||!Object(r.isFiniteNumber)(s))&&(o.logger.log("[buffer-controller]: Updating Media Source duration to "+a.toFixed(3)),i.duration=a)}},t.updateSeekableRange=function(e){var t=this.mediaSource,n=e.fragments;if(n.length&&e.live&&null!=t&&t.setLiveSeekableRange){var r=Math.max(0,n[0].start),i=Math.max(r,r+e.totalduration);t.setLiveSeekableRange(r,i)}},t.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.operationQueue,n=this.pendingTracks,r=Object.keys(n).length;if(r&&!e||2===r){this.createSourceBuffers(n),this.pendingTracks={};var o=this.getSourceBufferTypes();if(0===o.length)return void this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});o.forEach((function(e){t.executeNext(e)}))}},t.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");var r=0;for(var s in e)if(!t[s]){var l=e[s];if(!l)throw Error("source buffer exists for track "+s+", however track does not");var c=l.levelCodec||l.codec,u=l.container+";codecs="+c;o.logger.log("[buffer-controller]: creating sourceBuffer("+u+")");try{var h=t[s]=n.addSourceBuffer(u),d=s;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[s]={buffer:h,codec:c,container:l.container,levelCodec:l.levelCodec,id:l.id},r++}catch(e){o.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+e.message),this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,mimeType:u})}}r&&this.hls.trigger(i.Events.BUFFER_CREATED,{tracks:this.tracks})},t._onSBUpdateStart=function(e){this.operationQueue.current(e).onStart()},t._onSBUpdateEnd=function(e){var t=this.operationQueue;t.current(e).onComplete(),t.shiftAndExecuteNext(e)},t._onSBUpdateError=function(e,t){o.logger.error("[buffer-controller]: "+e+" SourceBuffer error",t),this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var n=this.operationQueue.current(e);n&&n.onError(t)},t.removeExecutor=function(e,t,n){var i=this.media,a=this.mediaSource,s=this.operationQueue,l=this.sourceBuffer[e];if(!i||!a||!l)return o.logger.warn("[buffer-controller]: Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),void s.shiftAndExecuteNext(e);var c=Object(r.isFiniteNumber)(i.duration)?i.duration:1/0,u=Object(r.isFiniteNumber)(a.duration)?a.duration:1/0,h=Math.max(0,t),d=Math.min(n,c,u);d>h?(o.logger.log("[buffer-controller]: Removing ["+h+","+d+"] from the "+e+" SourceBuffer"),console.assert(!l.updating,e+" sourceBuffer must not be updating"),l.remove(h,d)):s.shiftAndExecuteNext(e)},t.appendExecutor=function(e,t){var n=this.operationQueue,r=this.sourceBuffer[t];if(!r)return o.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),void n.shiftAndExecuteNext(t);r.ended=!1,console.assert(!r.updating,t+" sourceBuffer must not be updating"),r.appendBuffer(e)},t.blockBuffers=function(e,t){var n=this;if(void 0===t&&(t=this.getSourceBufferTypes()),!t.length)return o.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve(e);var r=this.operationQueue,i=t.map((function(e){return r.appendBlocker(e)}));Promise.all(i).then((function(){e(),t.forEach((function(e){var t=n.sourceBuffer[e];t&&t.updating||r.shiftAndExecuteNext(e)}))}))},t.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},t.addBufferListener=function(e,t,n){var r=this.sourceBuffer[e];if(r){var i=n.bind(this,e);this.listeners[e].push({event:t,listener:i}),r.addEventListener(t,i)}},t.removeBufferListeners=function(e){var t=this.sourceBuffer[e];t&&this.listeners[e].forEach((function(e){t.removeEventListener(e.event,e.listener)}))},e}()},"./src/controller/buffer-operation-queue.ts":
/*!**************************************************!*\
!*** ./src/controller/buffer-operation-queue.ts ***!
\**************************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return i}));var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=function(){function e(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}var t=e.prototype;return t.append=function(e,t){var n=this.queues[t];n.push(e),1===n.length&&this.buffers[t]&&this.executeNext(t)},t.insertAbort=function(e,t){this.queues[t].unshift(e),this.executeNext(t)},t.appendBlocker=function(e){var t,n=new Promise((function(e){t=e})),r={execute:t,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(r,e),n},t.executeNext=function(e){var t=this.buffers,n=this.queues,i=t[e],o=n[e];if(o.length){var a=o[0];try{a.execute()}catch(t){r.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),a.onError(t),i&&i.updating||(o.shift(),this.executeNext(e))}}},t.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},t.current=function(e){return this.queues[e][0]},e}()},"./src/controller/cap-level-controller.ts":
/*!************************************************!*\
!*** ./src/controller/cap-level-controller.ts ***!
\************************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts");function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=function(){function e(e){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var t,n,o,a=e.prototype;return a.setStreamController=function(e){this.streamController=e},a.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},a.registerListeners=function(){var e=this.hls;e.on(r.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(r.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},a.unregisterListener=function(){var e=this.hls;e.off(r.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(r.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},a.onFpsDropLevelCapping=function(t,n){e.isLevelAllowed(n.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(n.droppedLevel)},a.onMediaAttaching=function(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null},a.onManifestParsed=function(e,t){var n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()},a.onBufferCodecs=function(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()},a.onMediaDetaching=function(){this.stopCapping()},a.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var e=this.hls.levels;if(e.length){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e.length-1),t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},a.getMaxLevel=function(t){var n=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter((function(r,i){return e.isLevelAllowed(i,n.restrictedLevels)&&i<=t}));return this.clientRect=null,e.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},a.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},a.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},a.getDimensions=function(){if(this.clientRect)return this.clientRect;var e=this.media,t={width:0,height:0};if(e){var n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,t.width||t.height||(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t},e.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},e.getMaxLevelByMediaSize=function(e,t,n){if(!e||!e.length)return-1;for(var r,i,o=e.length-1,a=0;a<e.length;a+=1){var s=e[a];if((s.width>=t||s.height>=n)&&(r=s,!(i=e[a+1])||r.width!==i.width||r.height!==i.height)){o=a;break}}return o},t=e,o=[{key:"contentScaleFactor",get:function(){var e=1;try{e=self.devicePixelRatio}catch(e){}return e}}],(n=[{key:"mediaWidth",get:function(){return this.getDimensions().width*e.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*e.contentScaleFactor}}])&&i(t.prototype,n),o&&i(t,o),e}();t.default=o},"./src/controller/cmcd-controller.ts":
/*!*******************************************!*\
!*** ./src/controller/cmcd-controller.ts ***!
\*******************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return d}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../types/cmcd */"./src/types/cmcd.ts"),o=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts");function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var d=function(){function e(t){var n=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){n.initialized&&(n.starved=!0),n.buffering=!0},this.onPlaying=function(){n.initialized||(n.initialized=!0),n.buffering=!1},this.applyPlaylistData=function(e){try{n.apply(e,{ot:i.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(e){a.logger.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=function(e){try{var t=e.frag,r=n.hls.levels[t.level],o=n.getObjectType(t),s={d:1e3*t.duration,ot:o};o!==i.CMCDObjectType.VIDEO&&o!==i.CMCDObjectType.AUDIO&&o!=i.CMCDObjectType.MUXED||(s.br=r.bitrate/1e3,s.tb=n.getTopBandwidth(o),s.bl=n.getBufferLength(o)),n.apply(e,s)}catch(e){a.logger.warn("Could not generate segment CMCD data.",e)}},this.hls=t;var r=this.config=t.config,o=r.cmcd;null!=o&&(r.pLoader=this.createPlaylistLoader(),r.fLoader=this.createFragmentLoader(),this.sid=o.sessionId||e.uuid(),this.cid=o.contentId,this.useHeaders=!0===o.useHeaders,this.registerListeners())}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(r.Events.MEDIA_DETACHED,this.onMediaDetached,this),e.on(r.Events.BUFFER_CREATED,this.onBufferCreated,this)},t.unregisterListeners=function(){var e=this.hls;e.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(r.Events.MEDIA_DETACHED,this.onMediaDetached,this),e.off(r.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},t.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},t.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},t.onMediaDetached=function(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)},t.onBufferCreated=function(e,t){var n,r;this.audioBuffer=null===(n=t.tracks.audio)||void 0===n?void 0:n.buffer,this.videoBuffer=null===(r=t.tracks.video)||void 0===r?void 0:r.buffer},t.createData=function(){var e;return{v:i.CMCDVersion,sf:i.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:null===(e=this.media)||void 0===e?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},t.apply=function(t,n){void 0===n&&(n={}),h(n,this.createData());var r=n.ot===i.CMCDObjectType.INIT||n.ot===i.CMCDObjectType.VIDEO||n.ot===i.CMCDObjectType.MUXED;if(this.starved&&r&&(n.bs=!0,n.su=!0,this.starved=!1),null==n.su&&(n.su=this.buffering),this.useHeaders){var o=e.toHeaders(n);if(!Object.keys(o).length)return;t.headers||(t.headers={}),h(t.headers,o)}else{var a=e.toQuery(n);if(!a)return;t.url=e.appendQueryToUri(t.url,a)}},t.getObjectType=function(e){var t=e.type;return"subtitle"===t?i.CMCDObjectType.TIMED_TEXT:"initSegment"===e.sn?i.CMCDObjectType.INIT:"audio"===t?i.CMCDObjectType.AUDIO:"main"===t?this.hls.audioTracks.length?i.CMCDObjectType.VIDEO:i.CMCDObjectType.MUXED:void 0},t.getTopBandwidth=function(e){for(var t,n=0,r=c(e===i.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels);!(t=r()).done;){var o=t.value;o.bitrate>n&&(n=o.bitrate)}return n>0?n:NaN},t.getBufferLength=function(e){var t=this.hls.media,n=e===i.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;return n&&t?1e3*o.BufferHelper.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len:NaN},t.createPlaylistLoader=function(){var e=this.config.pLoader,t=this.applyPlaylistData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},l(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},t.createFragmentLoader=function(){var e=this.config.fLoader,t=this.applyFragmentData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},l(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},e.uuid=function(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)},e.serialize=function(e){for(var t,n=[],r=function(e){return!Number.isNaN(e)&&null!=e&&""!==e&&!1!==e},i=function(e){return Math.round(e)},o=function(e){return 100*i(e/100)},a={br:i,d:i,bl:o,dl:o,mtp:o,nor:function(e){return encodeURIComponent(e)},rtp:o,tb:i},s=c(Object.keys(e||{}).sort());!(t=s()).done;){var l=t.value,u=e[l];if(r(u)&&!("v"===l&&1===u||"pr"==l&&1===u)){var h=a[l];h&&(u=h(u));var d=typeof u,f=void 0;f="ot"===l||"sf"===l||"st"===l?l+"="+u:"boolean"===d?l:"number"===d?l+"="+u:l+"="+JSON.stringify(u),n.push(f)}}return n.join(",")},e.toHeaders=function(t){for(var n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],o={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},a=0,s=Object.keys(t);a<s.length;a++){var l=s[a];i[null!=o[l]?o[l]:1][l]=t[l]}for(var c=0;c<i.length;c++){var u=e.serialize(i[c]);u&&(n["CMCD-"+r[c]]=u)}return n},e.toQuery=function(t){return"CMCD="+encodeURIComponent(e.serialize(t))},e.appendQueryToUri=function(e,t){if(!t)return e;var n=e.includes("?")?"&":"?";return""+e+n+t},e}()},"./src/controller/eme-controller.ts":
/*!******************************************!*\
!*** ./src/controller/eme-controller.ts ***!
\******************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=n(/*! ../utils/mediakeys-helper */"./src/utils/mediakeys-helper.ts");function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(e){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=e,this._config=e.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var t,n,l,c=e.prototype;return c.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},c._registerListeners=function(){this.hls.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(r.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(r.Events.MANIFEST_PARSED,this.onManifestParsed,this)},c._unregisterListeners=function(){this.hls.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(r.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(r.Events.MANIFEST_PARSED,this.onManifestParsed,this)},c.getLicenseServerUrl=function(e){switch(e){case a.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+e+'"')},c._attemptKeySystemAccess=function(e,t,n){var r=this,i=function(e,t,n,r){switch(e){case a.KeySystems.WIDEVINE:return function(e,t,n){var r={audioCapabilities:[],videoCapabilities:[]};return e.forEach((function(e){r.audioCapabilities.push({contentType:'audio/mp4; codecs="'+e+'"',robustness:n.audioRobustness||""})})),t.forEach((function(e){r.videoCapabilities.push({contentType:'video/mp4; codecs="'+e+'"',robustness:n.videoRobustness||""})})),[r]}(t,n,r);default:throw new Error("Unknown key-system: "+e)}}(e,t,n,this._drmSystemOptions);o.logger.log("Requesting encrypted media key-system access");var s=this.requestMediaKeySystemAccess(e,i);this.mediaKeysPromise=s.then((function(t){return r._onMediaKeySystemAccessObtained(e,t)})),s.catch((function(t){o.logger.error('Failed to obtain key-system "'+e+'" access:',t)}))},c._onMediaKeySystemAccessObtained=function(e,t){var n=this;o.logger.log('Access for key-system "'+e+'" obtained');var r={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:e};this._mediaKeysList.push(r);var i=Promise.resolve().then((function(){return t.createMediaKeys()})).then((function(t){return r.mediaKeys=t,o.logger.log('Media-keys created for key-system "'+e+'"'),n._onMediaKeysCreated(),t}));return i.catch((function(e){o.logger.error("Failed to create media-keys:",e)})),i},c._onMediaKeysCreated=function(){var e=this;this._mediaKeysList.forEach((function(t){t.mediaKeysSession||(t.mediaKeysSession=t.mediaKeys.createSession(),e._onNewMediaKeySession(t.mediaKeysSession))}))},c._onNewMediaKeySession=function(e){var t=this;o.logger.log("New key-system session "+e.sessionId),e.addEventListener("message",(function(n){t._onKeySessionMessage(e,n.message)}),!1)},c._onKeySessionMessage=function(e,t){o.logger.log("Got EME message event, creating license request"),this._requestLicense(t,(function(t){o.logger.log("Received license data (length: "+(t?t.byteLength:t)+"), updating key-session"),e.update(t)}))},c.onMediaEncrypted=function(e){var t=this;if(o.logger.log('Media is encrypted using "'+e.initDataType+'" init data type'),!this.mediaKeysPromise)return o.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});var n=function(n){t._media&&(t._attemptSetMediaKeys(n),t._generateRequestWithPreferredKeySession(e.initDataType,e.initData))};this.mediaKeysPromise.then(n).catch(n)},c._attemptSetMediaKeys=function(e){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var t=this._mediaKeysList[0];if(!t||!t.mediaKeys)return o.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});o.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(t.mediaKeys),this._hasSetMediaKeys=!0}},c._generateRequestWithPreferredKeySession=function(e,t){var n=this,a=this._mediaKeysList[0];if(!a)return o.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(a.mediaKeysSessionInitialized)o.logger.warn("Key-Session already initialized but requested again");else{var s=a.mediaKeysSession;if(!s)return o.logger.error("Fatal: Media is encrypted but no key-session existing"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});if(!t)return o.logger.warn("Fatal: initData required for generating a key session is null"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});o.logger.log('Generating key-session request for "'+e+'" init data type'),a.mediaKeysSessionInitialized=!0,s.generateRequest(e,t).then((function(){o.logger.debug("Key-session generation succeeded")})).catch((function(e){o.logger.error("Error generating key-session request:",e),n.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})}))}},c._createLicenseXhr=function(e,t,n){var r=new XMLHttpRequest;r.responseType="arraybuffer",r.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,r,e,t,n);var i=this._licenseXhrSetup;if(i)try{i.call(this.hls,r,e),i=void 0}catch(e){o.logger.error(e)}try{r.readyState||r.open("POST",e,!0),i&&i.call(this.hls,r,e)}catch(e){throw new Error("issue setting up KeySystem license XHR "+e)}return r},c._onLicenseRequestReadyStageChange=function(e,t,n,a){switch(e.readyState){case 4:if(200===e.status){this._requestLicenseFailureCount=0,o.logger.log("License request succeeded");var s=e.response,l=this._licenseResponseCallback;if(l)try{s=l.call(this.hls,e,t)}catch(e){o.logger.error(e)}a(s)}else{if(o.logger.error("License Request XHR failed ("+t+"). Status: "+e.status+" ("+e.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>3)return void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var c=3-this._requestLicenseFailureCount+1;o.logger.warn("Retrying license request, "+c+" attempts left"),this._requestLicense(n,a)}}},c._generateLicenseRequestChallenge=function(e,t){switch(e.mediaKeySystemDomain){case a.KeySystems.WIDEVINE:return t}throw new Error("unsupported key-system: "+e.mediaKeySystemDomain)},c._requestLicense=function(e,t){o.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n)return o.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var a=this.getLicenseServerUrl(n.mediaKeySystemDomain),s=this._createLicenseXhr(a,e,t);o.logger.log("Sending license request to URL: "+a);var l=this._generateLicenseRequestChallenge(n,e);s.send(l)}catch(e){o.logger.error("Failure requesting DRM license: "+e),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},c.onMediaAttached=function(e,t){if(this._emeEnabled){var n=t.media;this._media=n,n.addEventListener("encrypted",this._onMediaEncrypted)}},c.onMediaDetached=function(){var e=this._media,t=this._mediaKeysList;e&&(e.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(t.map((function(e){if(e.mediaKeysSession)return e.mediaKeysSession.close().catch((function(){}))}))).then((function(){return e.setMediaKeys(null)})).catch((function(){})))},c.onManifestParsed=function(e,t){if(this._emeEnabled){var n=t.levels.map((function(e){return e.audioCodec})).filter((function(e){return!!e})),r=t.levels.map((function(e){return e.videoCodec})).filter((function(e){return!!e}));this._attemptKeySystemAccess(a.KeySystems.WIDEVINE,n,r)}},t=e,(n=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&s(t.prototype,n),l&&s(t,l),e}();t.default=l},"./src/controller/fps-controller.ts":
/*!******************************************!*\
!*** ./src/controller/fps-controller.ts ***!
\******************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=function(){function e(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var t=e.prototype;return t.setStreamController=function(e){this.streamController=e},t.registerListeners=function(){this.hls.on(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},t.unregisterListeners=function(){this.hls.off(r.Events.MEDIA_ATTACHING,this.onMediaAttaching)},t.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},t.onMediaAttaching=function(e,t){var n=this.hls.config;if(n.capLevelOnFPSDrop){var r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&"function"==typeof r.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}},t.checkFPS=function(e,t,n){var o=performance.now();if(t){if(this.lastTime){var a=o-this.lastTime,s=n-this.lastDroppedFrames,l=t-this.lastDecodedFrames,c=1e3*s/a,u=this.hls;if(u.trigger(r.Events.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:n}),c>0&&s>u.config.fpsDroppedMonitoringThreshold*l){var h=u.currentLevel;i.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+h),h>0&&(-1===u.autoLevelCapping||u.autoLevelCapping>=h)&&(h-=1,u.trigger(r.Events.FPS_DROP_LEVEL_CAPPING,{level:h,droppedLevel:u.currentLevel}),u.autoLevelCapping=h,this.streamController.nextLevelSwitch())}}this.lastTime=o,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},t.checkFPSInterval=function(){var e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},e}();t.default=o},"./src/controller/fragment-finders.ts":
/*!********************************************!*\
!*** ./src/controller/fragment-finders.ts ***!
\********************************************/
/*! exports provided: findFragmentByPDT, findFragmentByPTS, fragmentWithinToleranceTest, pdtWithinToleranceTest, findFragWithCC */function(e,t,n){"use strict";n.r(t),n.d(t,"findFragmentByPDT",(function(){return o})),n.d(t,"findFragmentByPTS",(function(){return a})),n.d(t,"fragmentWithinToleranceTest",(function(){return s})),n.d(t,"pdtWithinToleranceTest",(function(){return l})),n.d(t,"findFragWithCC",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/binary-search */"./src/utils/binary-search.ts");function o(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!Object(r.isFiniteNumber)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;n=n||0;for(var i=0;i<e.length;++i){var o=e[i];if(l(t,n,o))return o}return null}function a(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var o=null;if(e?o=t[e.sn-t[0].sn+1]||null:0===n&&0===t[0].start&&(o=t[0]),o&&0===s(n,r,o))return o;var a=i.default.search(t,s.bind(null,n,r));return a||o}function s(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0);var r=Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-r<=e?1:n.start-r>e&&n.start?-1:0}function l(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>e}function c(e,t){return i.default.search(e,(function(e){return e.cc<t?1:e.cc>t?-1:0}))}},"./src/controller/fragment-tracker.ts":
/*!********************************************!*\
!*** ./src/controller/fragment-tracker.ts ***!
\********************************************/
/*! exports provided: FragmentState, FragmentTracker */function(e,t,n){"use strict";n.r(t),n.d(t,"FragmentState",(function(){return r})),n.d(t,"FragmentTracker",(function(){return a}));var r,i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../types/loader */"./src/types/loader.ts");!function(e){e.NOT_LOADED="NOT_LOADED",e.BACKTRACKED="BACKTRACKED",e.APPENDING="APPENDING",e.PARTIAL="PARTIAL",e.OK="OK"}(r||(r={}));var a=function(){function e(e){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){var e=this.hls;e.on(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.on(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(i.Events.FRAG_LOADED,this.onFragLoaded,this)},t._unregisterListeners=function(){var e=this.hls;e.off(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.off(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(i.Events.FRAG_LOADED,this.onFragLoaded,this)},t.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},t.getAppendedFrag=function(e,t){if(t===o.PlaylistLevelType.MAIN){var n=this.activeFragment,r=this.activeParts;if(!n)return null;if(r)for(var i=r.length;i--;){var a=r[i],s=a?a.end:n.appendedPTS;if(a.start<=e&&void 0!==s&&e<=s)return i>9&&(this.activeParts=r.slice(i-9)),a}else if(n.start<=e&&void 0!==n.appendedPTS&&e<=n.appendedPTS)return n}return this.getBufferedFrag(e,t)},t.getBufferedFrag=function(e,t){for(var n=this.fragments,r=Object.keys(n),i=r.length;i--;){var o=n[r[i]];if((null==o?void 0:o.body.type)===t&&o.buffered){var a=o.body;if(a.start<=e&&e<=a.end)return a}}return null},t.detectEvictedFragments=function(e,t,n){var r=this;Object.keys(this.fragments).forEach((function(i){var o=r.fragments[i];if(o)if(o.buffered){var a=o.range[e];a&&a.time.some((function(e){var n=!r.isTimeBuffered(e.startPTS,e.endPTS,t);return n&&r.removeFragment(o.body),n}))}else o.body.type===n&&r.removeFragment(o.body)}))},t.detectPartialFragments=function(e){var t=this,n=this.timeRanges,r=e.frag,i=e.part;if(n&&"initSegment"!==r.sn){var o=l(r),a=this.fragments[o];a&&(Object.keys(n).forEach((function(e){var o=r.elementaryStreams[e];if(o){var s=n[e],l=null!==i||!0===o.partial;a.range[e]=t.getBufferedTimes(r,i,l,s)}})),a.backtrack=a.loaded=null,Object.keys(a.range).length?a.buffered=!0:this.removeFragment(a.body))}},t.fragBuffered=function(e){var t=l(e),n=this.fragments[t];n&&(n.backtrack=n.loaded=null,n.buffered=!0)},t.getBufferedTimes=function(e,t,n,r){for(var i={time:[],partial:n},o=t?t.start:e.start,a=t?t.end:e.end,s=e.minEndPTS||a,l=e.maxStartPTS||o,c=0;c<r.length;c++){var u=r.start(c)-this.bufferPadding,h=r.end(c)+this.bufferPadding;if(l>=u&&s<=h){i.time.push({startPTS:Math.max(o,r.start(c)),endPTS:Math.min(a,r.end(c))});break}if(o<h&&a>u)i.partial=!0,i.time.push({startPTS:Math.max(o,r.start(c)),endPTS:Math.min(a,r.end(c))});else if(a<=u)break}return i},t.getPartialFragment=function(e){var t,n,r,i=null,o=0,a=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach((function(c){var u=l[c];u&&s(u)&&(n=u.body.start-a,r=u.body.end+a,e>=n&&e<=r&&(t=Math.min(e-n,r-e),o<=t&&(i=u.body,o=t)))})),i},t.getState=function(e){var t=l(e),n=this.fragments[t];return n?n.buffered?s(n)?r.PARTIAL:r.OK:n.backtrack?r.BACKTRACKED:r.APPENDING:r.NOT_LOADED},t.backtrack=function(e,t){var n=l(e),r=this.fragments[n];if(!r||r.backtrack)return null;var i=r.backtrack=t||r.loaded;return r.loaded=null,i},t.getBacktrackData=function(e){var t=l(e),n=this.fragments[t];if(n){var r,i=n.backtrack;if(null!=i&&null!==(r=i.payload)&&void 0!==r&&r.byteLength)return i;this.removeFragment(e)}return null},t.isTimeBuffered=function(e,t,n){for(var r,i,o=0;o<n.length;o++){if(r=n.start(o)-this.bufferPadding,i=n.end(o)+this.bufferPadding,e>=r&&t<=i)return!0;if(t<=r)return!1}return!1},t.onFragLoaded=function(e,t){var n=t.frag,r=t.part;if("initSegment"!==n.sn&&!n.bitrateTest&&!r){var i=l(n);this.fragments[i]={body:n,loaded:t,backtrack:null,buffered:!1,range:Object.create(null)}}},t.onBufferAppended=function(e,t){var n=this,r=t.frag,i=t.part,a=t.timeRanges;if(r.type===o.PlaylistLevelType.MAIN)if(this.activeFragment=r,i){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(i)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach((function(e){var t=a[e];if(n.detectEvictedFragments(e,t),!i)for(var o=0;o<t.length;o++)r.appendedPTS=Math.max(t.end(o),r.appendedPTS||0)}))},t.onFragBuffered=function(e,t){this.detectPartialFragments(t)},t.hasFragment=function(e){var t=l(e);return!!this.fragments[t]},t.removeFragmentsInRange=function(e,t,n){var r=this;Object.keys(this.fragments).forEach((function(i){var o=r.fragments[i];if(o&&o.buffered){var a=o.body;a.type===n&&a.start<t&&a.end>e&&r.removeFragment(a)}}))},t.removeFragment=function(e){var t=l(e);e.stats.loaded=0,e.clearElementaryStreamInfo(),delete this.fragments[t]},t.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},e}();function s(e){var t,n;return e.buffered&&((null===(t=e.range.video)||void 0===t?void 0:t.partial)||(null===(n=e.range.audio)||void 0===n?void 0:n.partial))}function l(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn}},"./src/controller/gap-controller.ts":
/*!******************************************!*\
!*** ./src/controller/gap-controller.ts ***!
\******************************************/
/*! exports provided: STALL_MINIMUM_DURATION_MS, MAX_START_GAP_JUMP, SKIP_BUFFER_HOLE_STEP_SECONDS, SKIP_BUFFER_RANGE_START, default */function(e,t,n){"use strict";n.r(t),n.d(t,"STALL_MINIMUM_DURATION_MS",(function(){return s})),n.d(t,"MAX_START_GAP_JUMP",(function(){return l})),n.d(t,"SKIP_BUFFER_HOLE_STEP_SECONDS",(function(){return c})),n.d(t,"SKIP_BUFFER_RANGE_START",(function(){return u})),n.d(t,"default",(function(){return h}));var r=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),i=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=250,l=2,c=.1,u=.05,h=function(){function e(e,t,n,r){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=n,this.hls=r}var t=e.prototype;return t.destroy=function(){this.hls=this.fragmentTracker=this.media=null},t.poll=function(e){var t=this.config,n=this.media,i=this.stalled,o=n.currentTime,c=n.seeking,u=this.seeking&&!c,h=!this.seeking&&c;if(this.seeking=c,o===e){if((h||u)&&(this.stalled=null),!n.paused&&!n.ended&&0!==n.playbackRate&&r.BufferHelper.getBuffered(n).length){var d=r.BufferHelper.bufferInfo(n,o,0),f=d.len>0,p=d.nextStart||0;if(f||p){if(c){var m=d.len>l,g=!p||p-o>l&&!this.fragmentTracker.getPartialFragment(o);if(m||g)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var v,y=Math.max(p,d.start||0)-o,b=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,x=(null==b||null===(v=b.details)||void 0===v?void 0:v.live)?2*b.details.targetduration:l;if(y>0&&y<=x)return void this._trySkipBufferHole(null)}var w=self.performance.now();if(null!==i){var E=w-i;!c&&E>=s&&this._reportStall(d.len);var S=r.BufferHelper.bufferInfo(n,o,t.maxBufferHole);this._tryFixBufferStall(S,E)}else this.stalled=w}}}else if(this.moved=!0,null!==i){if(this.stallReported){var C=self.performance.now()-i;a.logger.warn("playback not stuck anymore @"+o+", after "+Math.round(C)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},t._tryFixBufferStall=function(e,t){var n=this.config,r=this.fragmentTracker,i=this.media.currentTime,o=r.getPartialFragment(i);o&&this._trySkipBufferHole(o)||e.len>n.maxBufferHole&&t>1e3*n.highBufferWatchdogPeriod&&(a.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},t._reportStall=function(e){var t=this.hls,n=this.media;this.stallReported||(this.stallReported=!0,a.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+e+")"),t.trigger(o.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))},t._trySkipBufferHole=function(e){for(var t=this.config,n=this.hls,s=this.media,l=s.currentTime,h=0,d=r.BufferHelper.getBuffered(s),f=0;f<d.length;f++){var p=d.start(f);if(l+t.maxBufferHole>=h&&l<p){var m=Math.max(p+u,s.currentTime+c);return a.logger.warn("skipping hole, adjusting currentTime from "+l+" to "+m),this.moved=!0,this.stalled=null,s.currentTime=m,e&&n.trigger(o.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+l+" to "+m,frag:e}),m}h=d.end(f)}return 0},t._tryNudgeBuffer=function(){var e=this.config,t=this.hls,n=this.media,r=n.currentTime,s=(this.nudgeRetry||0)+1;if(this.nudgeRetry=s,s<e.nudgeMaxRetry){var l=r+s*e.nudgeOffset;a.logger.warn("Nudging 'currentTime' from "+r+" to "+l),n.currentTime=l,t.trigger(o.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else a.logger.error("Playhead still not moving while enough data buffered @"+r+" after "+e.nudgeMaxRetry+" nudges"),t.trigger(o.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},e}()},"./src/controller/id3-track-controller.ts":
/*!************************************************!*\
!*** ./src/controller/id3-track-controller.ts ***!
\************************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.ts"),o=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=function(){function e(e){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=e,this._registerListeners()}var t=e.prototype;return t.destroy=function(){this._unregisterListeners()},t._registerListeners=function(){var e=this.hls;e.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(r.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(r.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},t._unregisterListeners=function(){var e=this.hls;e.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(r.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(r.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},t.onMediaAttached=function(e,t){this.media=t.media},t.onMediaDetaching=function(){this.id3Track&&(Object(i.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null)},t.getID3Track=function(e){if(this.media){for(var t=0;t<e.length;t++){var n=e[t];if("metadata"===n.kind&&"id3"===n.label)return Object(i.sendAddTrackEvent)(n,this.media),n}return this.media.addTextTrack("metadata","id3")}},t.onFragParsingMetadata=function(e,t){if(this.media){var n=t.frag,r=t.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var i=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,a=0;a<r.length;a++){var s=o.getID3Frames(r[a].data);if(s){var l=r[a].pts,c=a<r.length-1?r[a+1].pts:n.end;c-l<=0&&(c=l+.25);for(var u=0;u<s.length;u++){var h=s[u];if(!o.isTimeStampFrame(h)){var d=new i(l,c,"");d.value=h,this.id3Track.addCue(d)}}}}}},t.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset,o=t.type;if(!o||"audio"===o){var a=this.id3Track;a&&Object(i.removeCuesInRange)(a,n,r)}},e}();t.default=a},"./src/controller/latency-controller.ts":
/*!**********************************************!*\
!*** ./src/controller/latency-controller.ts ***!
\**********************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return s}));var r=n(/*! ../errors */"./src/errors.ts"),i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts");function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(e){var t=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return t.timeupdate()},this.hls=e,this.config=e.config,this.registerListeners()}var t,n,s,l=e.prototype;return l.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},l.registerListeners=function(){this.hls.on(i.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(i.Events.ERROR,this.onError,this)},l.unregisterListeners=function(){this.hls.off(i.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(i.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(i.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(i.Events.ERROR,this.onError)},l.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},l.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},l.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},l.onLevelUpdated=function(e,t){var n=t.details;this.levelDetails=n,n.advanced&&this.timeupdate(),!n.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},l.onError=function(e,t){t.details===r.ErrorDetails.BUFFER_STALLED_ERROR&&(this.stallCount++,o.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))},l.timeupdate=function(){var e=this.media,t=this.levelDetails;if(e&&t){this.currentTime=e.currentTime;var n=this.computeLatency();if(null!==n){this._latency=n;var r=this.config,i=r.lowLatencyMode,o=r.maxLiveSyncPlaybackRate;if(i&&1!==o){var a=this.targetLatency;if(null!==a){var s=n-a,l=s<Math.min(this.maxLatency,a+t.targetduration);if(t.live&&l&&s>.05&&this.forwardBufferLength>1){var c=Math.min(2,Math.max(1,o)),u=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;e.playbackRate=Math.min(c,Math.max(1,u))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}}}}},l.estimateLiveEdge=function(){var e=this.levelDetails;return null===e?null:e.edge+e.age},l.computeLatency=function(){var e=this.estimateLiveEdge();return null===e?null:e-this.currentTime},t=e,(n=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var e=this.config,t=this.levelDetails;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}},{key:"targetLatency",get:function(){var e=this.levelDetails;if(null===e)return null;var t=e.holdBack,n=e.partHoldBack,r=e.targetduration,i=this.config,o=i.liveSyncDuration,a=i.liveSyncDurationCount,s=i.lowLatencyMode,l=this.hls.userConfig,c=s&&n||t;(l.liveSyncDuration||l.liveSyncDurationCount||0===c)&&(c=void 0!==o?o:a*r);var u=r;return c+Math.min(1*this.stallCount,u)}},{key:"liveSyncPosition",get:function(){var e=this.estimateLiveEdge(),t=this.targetLatency,n=this.levelDetails;if(null===e||null===t||null===n)return null;var r=n.edge,i=e-t-this.edgeStalled,o=r-n.totalduration,a=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(o,i),a)}},{key:"drift",get:function(){var e=this.levelDetails;return null===e?1:e.drift}},{key:"edgeStalled",get:function(){var e=this.levelDetails;if(null===e)return 0;var t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}},{key:"forwardBufferLength",get:function(){var e=this.media,t=this.levelDetails;if(!e||!t)return 0;var n=e.buffered.length;return n?e.buffered.end(n-1):t.edge-this.currentTime}}])&&a(t.prototype,n),s&&a(t,s),e}()},"./src/controller/level-controller.ts":
/*!********************************************!*\
!*** ./src/controller/level-controller.ts ***!
\********************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return p}));var r=n(/*! ../types/level */"./src/types/level.ts"),i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../utils/codecs */"./src/utils/codecs.ts"),s=n(/*! ./level-helper */"./src/controller/level-helper.ts"),l=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts");function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),p=function(e){var t,n;function l(t){var n;return(n=e.call(this,t,"[level-controller]")||this)._levels=[],n._firstLevel=-1,n._startLevel=void 0,n.currentLevelIndex=-1,n.manualLevelIndex=-1,n.onParsedComplete=void 0,n._registerListeners(),n}n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var p,m,g,v=l.prototype;return v._registerListeners=function(){var e=this.hls;e.on(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(i.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(i.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(i.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(i.Events.ERROR,this.onError,this)},v._unregisterListeners=function(){var e=this.hls;e.off(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(i.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(i.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(i.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(i.Events.ERROR,this.onError,this)},v.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,e.prototype.destroy.call(this)},v.startLoad=function(){this._levels.forEach((function(e){e.loadError=0})),e.prototype.startLoad.call(this)},v.onManifestLoaded=function(e,t){var n,l,c=[],u=[],h=[],d={},p=!1,m=!1,g=!1;if(t.levels.forEach((function(e){var t=e.attrs;p=p||!(!e.width||!e.height),m=m||!!e.videoCodec,g=g||!!e.audioCodec,f&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec=void 0);var n=e.bitrate+"-"+e.attrs.RESOLUTION+"-"+e.attrs.CODECS;(l=d[n])?l.url.push(e.url):(l=new r.Level(e),d[n]=l,c.push(l)),t&&(t.AUDIO&&Object(s.addGroupId)(l,"audio",t.AUDIO),t.SUBTITLES&&Object(s.addGroupId)(l,"text",t.SUBTITLES))})),(p||m)&&g&&(c=c.filter((function(e){var t=e.videoCodec,n=e.width,r=e.height;return!!t||!(!n||!r)}))),c=c.filter((function(e){var t=e.audioCodec,n=e.videoCodec;return(!t||Object(a.isCodecSupportedInMp4)(t,"audio"))&&(!n||Object(a.isCodecSupportedInMp4)(n,"video"))})),t.audioTracks&&(u=t.audioTracks.filter((function(e){return!e.audioCodec||Object(a.isCodecSupportedInMp4)(e.audioCodec,"audio")})),Object(s.assignTrackIdsByGroup)(u)),t.subtitles&&(h=t.subtitles,Object(s.assignTrackIdsByGroup)(h)),c.length>0){n=c[0].bitrate,c.sort((function(e,t){return e.bitrate-t.bitrate})),this._levels=c;for(var v=0;v<c.length;v++)if(c[v].bitrate===n){this._firstLevel=v,this.log("manifest loaded, "+c.length+" level(s) found, first bitrate: "+n);break}var y=g&&!m,b={levels:c,audioTracks:u,subtitleTracks:h,firstLevel:this._firstLevel,stats:t.stats,audio:g,video:m,altAudio:!y&&u.some((function(e){return!!e.url}))};this.hls.trigger(i.Events.MANIFEST_PARSED,b),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,reason:"no level with compatible codecs found in manifest"})},v.onError=function(t,n){if(e.prototype.onError.call(this,t,n),!n.fatal){var r=n.context,i=this._levels[this.currentLevelIndex];if(r&&(r.type===c.PlaylistContextType.AUDIO_TRACK&&i.audioGroupIds&&r.groupId===i.audioGroupIds[i.urlId]||r.type===c.PlaylistContextType.SUBTITLE_TRACK&&i.textGroupIds&&r.groupId===i.textGroupIds[i.urlId]))this.redundantFailover(this.currentLevelIndex);else{var a,s=!1,l=!0;switch(n.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:if(n.frag){var u=this._levels[n.frag.level];u?(u.fragmentError++,u.fragmentError>this.hls.config.fragLoadingMaxRetry&&(a=n.frag.level)):a=n.frag.level}break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:r&&(r.deliveryDirectives&&(l=!1),a=r.level),s=!0;break;case o.ErrorDetails.REMUX_ALLOC_ERROR:a=n.level,s=!0}void 0!==a&&this.recoverLevel(n,a,s,l)}}},v.recoverLevel=function(e,t,n,r){var i=e.details,o=this._levels[t];if(o.loadError++,n){if(!this.retryLoadingOrFail(e))return void(this.currentLevelIndex=-1);e.levelRetry=!0}if(r){var a=o.url.length;if(a>1&&o.loadError<a)e.levelRetry=!0,this.redundantFailover(t);else if(-1===this.manualLevelIndex){var s=0===t?this._levels.length-1:t-1;this.currentLevelIndex!==s&&0===this._levels[s].loadError&&(this.warn(i+": switch to "+s),e.levelRetry=!0,this.hls.nextAutoLevel=s)}}},v.redundantFailover=function(e){var t=this._levels[e],n=t.url.length;if(n>1){var r=(t.urlId+1)%n;this.warn("Switching to redundant URL-id "+r),this._levels.forEach((function(e){e.urlId=r})),this.level=e}},v.onFragLoaded=function(e,t){var n=t.frag;if(void 0!==n&&n.type===c.PlaylistLevelType.MAIN){var r=this._levels[n.level];void 0!==r&&(r.fragmentError=0,r.loadError=0)}},v.onLevelLoaded=function(e,t){var n,r,i=t.level,o=t.details,a=this._levels[i];if(!a)return this.warn("Invalid level index "+i),void(null!==(r=t.deliveryDirectives)&&void 0!==r&&r.skip&&(o.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===a.fragmentError&&(a.loadError=0,this.retryCount=0),this.playlistLoaded(i,t,a.details)):null!==(n=t.deliveryDirectives)&&void 0!==n&&n.skip&&(o.deltaUpdateFailed=!0)},v.onAudioTrackSwitched=function(e,t){var n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){for(var r=-1,i=this.hls.audioTracks[t.id].groupId,o=0;o<n.audioGroupIds.length;o++)if(n.audioGroupIds[o]===i){r=o;break}r!==n.urlId&&(n.urlId=r,this.startLoad())}},v.loadPlaylist=function(e){var t=this.currentLevelIndex,n=this._levels[t];if(this.canLoad&&n&&n.url.length>0){var r=n.urlId,o=n.url[r];if(e)try{o=e.addDirectives(o)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Attempt loading level index "+t+(e?" at sn "+e.msn+" part "+e.part:"")+" with URL-id "+r+" "+o),this.clearTimer(),this.hls.trigger(i.Events.LEVEL_LOADING,{url:o,level:t,id:r,deliveryDirectives:e||null})}},v.removeLevel=function(e,t){var n=function(e,n){return n!==t},r=this._levels.filter((function(r,i){return i!==e||r.url.length>1&&void 0!==t&&(r.url=r.url.filter(n),r.audioGroupIds&&(r.audioGroupIds=r.audioGroupIds.filter(n)),r.textGroupIds&&(r.textGroupIds=r.textGroupIds.filter(n)),r.urlId=0,!0)})).map((function(e,t){var n=e.details;return null!=n&&n.fragments&&n.fragments.forEach((function(e){e.level=t})),e}));this._levels=r,this.hls.trigger(i.Events.LEVELS_UPDATED,{levels:r})},p=l,(m=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t,n=this._levels;if(0!==n.length&&(this.currentLevelIndex!==e||null===(t=n[e])||void 0===t||!t.details)){if(e<0||e>=n.length){var r=e<0;if(this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:r,reason:"invalid level idx"}),r)return;e=Math.min(e,n.length-1)}this.clearTimer();var a=this.currentLevelIndex,s=n[a],l=n[e];this.log("switching to level "+e+" from "+a),this.currentLevelIndex=e;var c=u({},l,{level:e,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete c._urlId,this.hls.trigger(i.Events.LEVEL_SWITCHING,c);var h=l.details;if(!h||h.live){var d=this.switchParams(l.uri,null==s?void 0:s.details);this.loadPlaylist(d)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])&&h(p.prototype,m),g&&h(p,g),l}(l.default)},"./src/controller/level-helper.ts":
/*!****************************************!*\
!*** ./src/controller/level-helper.ts ***!
\****************************************/
/*! exports provided: addGroupId, assignTrackIdsByGroup, updatePTS, updateFragPTSDTS, mergeDetails, mapPartIntersection, mapFragmentIntersection, adjustSliding, addSliding, computeReloadInterval, getFragmentWithSN, getPartWith */function(e,t,n){"use strict";n.r(t),n.d(t,"addGroupId",(function(){return o})),n.d(t,"assignTrackIdsByGroup",(function(){return a})),n.d(t,"updatePTS",(function(){return s})),n.d(t,"updateFragPTSDTS",(function(){return c})),n.d(t,"mergeDetails",(function(){return u})),n.d(t,"mapPartIntersection",(function(){return h})),n.d(t,"mapFragmentIntersection",(function(){return d})),n.d(t,"adjustSliding",(function(){return f})),n.d(t,"addSliding",(function(){return p})),n.d(t,"computeReloadInterval",(function(){return m})),n.d(t,"getFragmentWithSN",(function(){return g})),n.d(t,"getPartWith",(function(){return v}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts");function o(e,t,n){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(n);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(n)}}function a(e){var t={};e.forEach((function(e){var n=e.groupId||"";e.id=t[n]=t[n]||0,t[n]++}))}function s(e,t,n){l(e[t],e[n])}function l(e,t){var n=t.startPTS;if(Object(r.isFiniteNumber)(n)){var i,o=0;t.sn>e.sn?(o=n-e.start,i=e):(o=e.start-n,i=t),i.duration!==o&&(i.duration=o)}else t.sn>e.sn?e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration:t.start=Math.max(e.start-t.duration,0)}function c(e,t,n,o,a,s){o-n<=0&&(i.logger.warn("Fragment should have a positive duration",t),o=n+t.duration,s=a+t.duration);var c=n,u=o,h=t.startPTS,d=t.endPTS;if(Object(r.isFiniteNumber)(h)){var f=Math.abs(h-n);Object(r.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(f,t.deltaPTS):t.deltaPTS=f,c=Math.max(n,h),n=Math.min(n,h),a=Math.min(a,t.startDTS),u=Math.min(o,d),o=Math.max(o,d),s=Math.max(s,t.endDTS)}t.duration=o-n;var p=n-t.start;t.appendedPTS=o,t.start=t.startPTS=n,t.maxStartPTS=c,t.startDTS=a,t.endPTS=o,t.minEndPTS=u,t.endDTS=s;var m,g=t.sn;if(!e||g<e.startSN||g>e.endSN)return 0;var v=g-e.startSN,y=e.fragments;for(y[v]=t,m=v;m>0;m--)l(y[m],y[m-1]);for(m=v;m<y.length-1;m++)l(y[m],y[m+1]);return e.fragmentHint&&l(y[y.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,p}function u(e,t){for(var n=null,o=e.fragments,a=o.length-1;a>=0;a--){var s=o[a].initSegment;if(s){n=s;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;var l,u=0;if(d(e,t,(function(e,i){e.relurl&&(u=e.cc-i.cc),Object(r.isFiniteNumber)(e.startPTS)&&Object(r.isFiniteNumber)(e.endPTS)&&(i.start=i.startPTS=e.startPTS,i.startDTS=e.startDTS,i.appendedPTS=e.appendedPTS,i.maxStartPTS=e.maxStartPTS,i.endPTS=e.endPTS,i.endDTS=e.endDTS,i.minEndPTS=e.minEndPTS,i.duration=e.endPTS-e.startPTS,i.duration&&(l=i),t.PTSKnown=t.alignedSliding=!0),i.elementaryStreams=e.elementaryStreams,i.loader=e.loader,i.stats=e.stats,i.urlId=e.urlId,e.initSegment&&(i.initSegment=e.initSegment,n=e.initSegment)})),n&&(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((function(e){var t;e.initSegment&&e.initSegment.relurl!==(null===(t=n)||void 0===t?void 0:t.relurl)||(e.initSegment=n)})),t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some((function(e){return!e})),t.deltaUpdateFailed)){i.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=t.skippedSegments;p--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var m=t.fragments;if(u){i.logger.warn("discontinuity sliding from playlist, take drift into account");for(var g=0;g<m.length;g++)m[g].cc+=u}t.skippedSegments&&(t.startCC=t.fragments[0].cc),h(e.partList,t.partList,(function(e,t){t.elementaryStreams=e.elementaryStreams,t.stats=e.stats})),l?c(t,l,l.startPTS,l.endPTS,l.startDTS,l.endDTS):f(e,t),m.length&&(t.totalduration=t.edge-m[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;var v=t.advancedDateTime;if(t.advanced&&v){var y=t.edge;t.driftStart||(t.driftStartTime=v,t.driftStart=y),t.driftEndTime=v,t.driftEnd=y}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime}function h(e,t,n){if(e&&t)for(var r=0,i=0,o=e.length;i<=o;i++){var a=e[i],s=t[i+r];a&&s&&a.index===s.index&&a.fragment.sn===s.fragment.sn?n(a,s):r--}}function d(e,t,n){for(var r=t.skippedSegments,i=Math.max(e.startSN,t.startSN)-t.startSN,o=(e.fragmentHint?1:0)+(r?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,a=t.startSN-e.startSN,s=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,c=i;c<=o;c++){var u=l[a+c],h=s[c];r&&!h&&c<r&&(h=t.fragments[c]=u),u&&h&&n(u,h)}}function f(e,t){var n=t.startSN+t.skippedSegments-e.startSN,r=e.fragments;n<0||n>=r.length||p(t,r[n].start)}function p(e,t){if(t){for(var n=e.fragments,r=e.skippedSegments;r<n.length;r++)n[r].start+=t;e.fragmentHint&&(e.fragmentHint.start+=t)}}function m(e,t){var n,r=1e3*e.levelTargetDuration,i=r/2,o=e.age,a=o>0&&o<3*r,s=t.loading.end-t.loading.start,l=e.availabilityDelay;if(!1===e.updated)if(a){var c=333*e.misses;n=Math.max(Math.min(i,2*s),c),e.availabilityDelay=(e.availabilityDelay||0)+n}else n=i;else a?(l=Math.min(l||r/2,o),e.availabilityDelay=l,n=l+r-o):n=r-s;return Math.round(n)}function g(e,t,n){if(!e||!e.details)return null;var r=e.details,i=r.fragments[t-r.startSN];return i||((i=r.fragmentHint)&&i.sn===t?i:t<r.startSN&&n&&n.sn===t?n:null)}function v(e,t,n){if(!e||!e.details)return null;var r=e.details.partList;if(r)for(var i=r.length;i--;){var o=r[i];if(o.index===n&&o.fragment.sn===t)return o}return null}},"./src/controller/stream-controller.ts":
/*!*********************************************!*\
!*** ./src/controller/stream-controller.ts ***!
\*********************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return y}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),o=n(/*! ../is-supported */"./src/is-supported.ts"),a=n(/*! ../events */"./src/events.ts"),s=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),h=n(/*! ../demux/transmuxer-interface */"./src/demux/transmuxer-interface.ts"),d=n(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),f=n(/*! ./gap-controller */"./src/controller/gap-controller.ts"),p=n(/*! ../errors */"./src/errors.ts"),m=n(/*! ../utils/logger */"./src/utils/logger.ts");function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){var t,n;function y(t,n){var r;return(r=e.call(this,t,n,"[stream-controller]")||this).audioCodecSwap=!1,r.gapController=null,r.level=-1,r._forceStartLoad=!1,r.altAudio=!1,r.audioOnly=!1,r.fragPlaying=null,r.onvplaying=null,r.onvseeked=null,r.fragLastKbps=0,r.stalled=!1,r.couldBacktrack=!1,r.audioCodecSwitch=!1,r.videoBuffer=null,r._registerListeners(),r}n=e,(t=y).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n);var b,x,w,E=y.prototype;return E._registerListeners=function(){var e=this.hls;e.on(a.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(a.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(a.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(a.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(a.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(a.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(a.Events.ERROR,this.onError,this),e.on(a.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(a.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(a.Events.BUFFER_CREATED,this.onBufferCreated,this),e.on(a.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(a.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(a.Events.FRAG_BUFFERED,this.onFragBuffered,this)},E._unregisterListeners=function(){var e=this.hls;e.off(a.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(a.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(a.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(a.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(a.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(a.Events.ERROR,this.onError,this),e.off(a.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(a.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(a.Events.BUFFER_CREATED,this.onBufferCreated,this),e.off(a.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(a.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(a.Events.FRAG_BUFFERED,this.onFragBuffered,this)},E.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},E.startLoad=function(e){if(this.levels){var t=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var r=n.startLevel;-1===r&&(n.config.testBandwidth?(r=0,this.bitrateTest=!0):r=n.nextAutoLevel),this.level=n.nextLoadLevel=r,this.loadedmetadata=!1}t>0&&-1===e&&(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=i.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=i.State.STOPPED},E.stopLoad=function(){this._forceStartLoad=!1,e.prototype.stopLoad.call(this)},E.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_LEVEL:var e,t=this.levels,n=this.level,r=null==t||null===(e=t[n])||void 0===e?void 0:e.details;if(r&&(!r.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(r))break;this.state=i.State.IDLE;break}break;case i.State.FRAG_LOADING_WAITING_RETRY:var o,a=self.performance.now(),s=this.retryDate;(!s||a>=s||null!==(o=this.media)&&void 0!==o&&o.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=i.State.IDLE)}this.onTickEnd()},E.onTickEnd=function(){e.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},E.doTickIdle=function(){var e,t,n=this.hls,r=this.levelLastLoaded,o=this.levels,s=this.media,h=n.config,d=n.nextLoadLevel;if(null!==r&&(s||!this.startFragRequested&&h.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&o&&o[d]){var f=o[d];this.level=n.nextLoadLevel=d;var p=f.details;if(!p||this.state===i.State.WAITING_LEVEL||p.live&&this.levelLastLoaded!==d)this.state=i.State.WAITING_LEVEL;else{var m=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:s,c.PlaylistLevelType.MAIN);if(null!==m&&!(m.len>=this.getMaxBufferLength(f.maxBitrate))){if(this._streamEnded(m,p)){var g={};return this.altAudio&&(g.type="video"),this.hls.trigger(a.Events.BUFFER_EOS,g),void(this.state=i.State.ENDED)}var v=m.end,y=this.getNextFragment(v,p);if(this.couldBacktrack&&!this.fragPrevious&&y&&"initSegment"!==y.sn){var b=y.sn-p.startSN;b>1&&(y=p.fragments[b-1],this.fragmentTracker.removeFragment(y))}if(y&&this.fragmentTracker.getState(y)===l.FragmentState.OK&&this.nextLoadPosition>v){var x=this.audioOnly&&!this.altAudio?u.ElementaryStreamTypes.AUDIO:u.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(s,x,c.PlaylistLevelType.MAIN),y=this.getNextFragment(this.nextLoadPosition,p)}y&&(!y.initSegment||y.initSegment.data||this.bitrateTest||(y=y.initSegment),"identity"!==(null===(e=y.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=y.decryptdata)&&void 0!==t&&t.key?this.loadFragment(y,p,v):this.loadKey(y,p))}}}},E.loadFragment=function(t,n,r){var i,o=this.fragmentTracker.getState(t);if(this.fragCurrent=t,o===l.FragmentState.BACKTRACKED){var a=this.fragmentTracker.getBacktrackData(t);if(a)return this._handleFragmentLoadProgress(a),void this._handleFragmentLoadComplete(a);o=l.FragmentState.NOT_LOADED}o===l.FragmentState.NOT_LOADED||o===l.FragmentState.PARTIAL?"initSegment"===t.sn?this._loadInitSegment(t):this.bitrateTest?(t.bitrateTest=!0,this.log("Fragment "+t.sn+" of level "+t.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(t)):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r)):o===l.FragmentState.APPENDING?this.reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t):0===(null===(i=this.media)||void 0===i?void 0:i.buffered.length)&&this.fragmentTracker.removeAllFragments()},E.getAppendedFrag=function(e){var t=this.fragmentTracker.getAppendedFrag(e,c.PlaylistLevelType.MAIN);return t&&"fragment"in t?t.fragment:t},E.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,c.PlaylistLevelType.MAIN)},E.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},E.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},E.nextLevelSwitch=function(){var e=this.levels,t=this.media;if(null!=t&&t.readyState){var n,r=this.getAppendedFrag(t.currentTime);if(r&&r.start>1&&this.flushMainBuffer(0,r.start-1),!t.paused&&e){var i=e[this.hls.nextLoadLevel],o=this.fragLastKbps;n=o&&this.fragCurrent?this.fragCurrent.duration*i.maxBitrate/(1e3*o)+1:0}else n=0;var a=this.getBufferedFrag(t.currentTime+n);if(a){var s=this.followingBufferedFrag(a);if(s){this.abortCurrentFrag();var l=s.maxStartPTS?s.maxStartPTS:s.start,c=s.duration,u=Math.max(a.end,l+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,.5*c),.75*c));this.flushMainBuffer(u,Number.POSITIVE_INFINITY)}}}},E.abortCurrentFrag=function(){var e=this.fragCurrent;this.fragCurrent=null,null!=e&&e.loader&&e.loader.abort(),this.state===i.State.KEY_LOADING&&(this.state=i.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},E.flushMainBuffer=function(t,n){e.prototype.flushMainBuffer.call(this,t,n,this.altAudio?"video":null)},E.onMediaAttached=function(t,n){e.prototype.onMediaAttached.call(this,t,n);var r=n.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),r.addEventListener("playing",this.onvplaying),r.addEventListener("seeked",this.onvseeked),this.gapController=new f.default(this.config,r,this.fragmentTracker,this.hls)},E.onMediaDetaching=function(){var t=this.media;t&&(t.removeEventListener("playing",this.onvplaying),t.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),e.prototype.onMediaDetaching.call(this)},E.onMediaPlaying=function(){this.tick()},E.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:null;Object(r.isFiniteNumber)(t)&&this.log("Media seeked to "+t.toFixed(3)),this.tick()},E.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(a.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},E.onManifestParsed=function(e,t){var n,r=!1,i=!1;t.levels.forEach((function(e){(n=e.audioCodec)&&(-1!==n.indexOf("mp4a.40.2")&&(r=!0),-1!==n.indexOf("mp4a.40.5")&&(i=!0))})),this.audioCodecSwitch=r&&i&&!Object(o.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1},E.onLevelLoading=function(e,t){var n=this.levels;if(n&&this.state===i.State.IDLE){var r=n[t.level];(!r.details||r.details.live&&this.levelLastLoaded!==t.level||this.waitForCdnTuneIn(r.details))&&(this.state=i.State.WAITING_LEVEL)}},E.onLevelLoaded=function(e,t){var n,r=this.levels,o=t.level,s=t.details,l=s.totalduration;if(r){this.log("Level "+o+" loaded ["+s.startSN+","+s.endSN+"], cc ["+s.startCC+", "+s.endCC+"] duration:"+l);var c=this.fragCurrent;!c||this.state!==i.State.FRAG_LOADING&&this.state!==i.State.FRAG_LOADING_WAITING_RETRY||c.level!==t.level&&c.loader&&(this.state=i.State.IDLE,c.loader.abort());var u=r[o],h=0;if(s.live||null!==(n=u.details)&&void 0!==n&&n.live){if(s.fragments[0]||(s.deltaUpdateFailed=!0),s.deltaUpdateFailed)return;h=this.alignPlaylists(s,u.details)}if(u.details=s,this.levelLastLoaded=o,this.hls.trigger(a.Events.LEVEL_UPDATED,{details:s,level:o}),this.state===i.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(s))return;this.state=i.State.IDLE}this.startFragRequested?s.live&&this.synchronizeToLiveEdge(s):this.setStartPosition(s,h),this.tick()}else this.warn("Levels were reset while loading level "+o)},E._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,i=e.payload,o=this.levels;if(o){var a=o[n.level],s=a.details;if(s){var l=a.videoCodec,u=s.PTSKnown||!s.live,f=null===(t=n.initSegment)||void 0===t?void 0:t.data,p=this._getAudioCodec(a),m=this.transmuxer=this.transmuxer||new h.default(this.hls,c.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),g=r?r.index:-1,v=-1!==g,y=new d.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,i.byteLength,g,v),b=this.initPTS[n.cc];m.push(i,f,p,l,n,r,s.totalduration,u,y,b)}else this.warn("Dropping fragment "+n.sn+" of level "+n.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},E.onAudioTrackSwitching=function(e,t){var n=this.altAudio,r=!!t.url,i=t.id;if(!r){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var o=this.fragCurrent;null!=o&&o.loader&&(this.log("Switching to main audio track, cancel main fragment load"),o.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var s=this.hls;n&&s.trigger(a.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),s.trigger(a.Events.AUDIO_TRACK_SWITCHED,{id:i})}},E.onAudioTrackSwitched=function(e,t){var n=t.id,r=!!this.hls.audioTracks[n].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},E.onBufferCreated=function(e,t){var n,r,i=t.tracks,o=!1;for(var a in i){var s=i[a];if("main"===s.id){if(r=a,n=s,"video"===a){var l=i[a];l&&(this.videoBuffer=l.buffer)}}else o=!0}o&&n?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media},E.onFragBuffered=function(e,t){var n=t.frag,r=t.part;if(!n||n.type===c.PlaylistLevelType.MAIN){if(this.fragContextChanged(n))return this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===i.State.PARSED&&(this.state=i.State.IDLE));var o=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*o.total/(o.buffering.end-o.loading.first)),"initSegment"!==n.sn&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}},E.onError=function(e,t){switch(t.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:case p.ErrorDetails.KEY_LOAD_ERROR:case p.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.MAIN,t);break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==i.State.ERROR&&(t.fatal?(this.warn(""+t.details),this.state=i.State.ERROR):t.levelRetry||this.state!==i.State.WAITING_LEVEL||(this.state=i.State.IDLE));break;case p.ErrorDetails.BUFFER_FULL_ERROR:if("main"===t.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var n=!0,r=this.getFwdBufferInfo(this.media,c.PlaylistLevelType.MAIN);r&&r.len>.5&&(n=!this.reduceMaxBufferLength(r.len)),n&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}},E.checkBuffer=function(){var e=this.media,t=this.gapController;if(e&&t&&e.readyState){var n=s.BufferHelper.getBuffered(e);!this.loadedmetadata&&n.length?(this.loadedmetadata=!0,this.seekToStartPos()):t.poll(this.lastCurrentTime),this.lastCurrentTime=e.currentTime}},E.onFragLoadEmergencyAborted=function(){this.state=i.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},E.onBufferFlushed=function(e,t){var n=t.type;if(n!==u.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var r=(n===u.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,n,c.PlaylistLevelType.MAIN)}},E.onLevelsUpdated=function(e,t){this.levels=t.levels},E.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},E.seekToStartPos=function(){var e=this.media,t=e.currentTime,n=this.startPosition;if(n>=0&&t<n){if(e.seeking)return void m.logger.log("could not seek to "+n+", already seeking at "+t);var r=s.BufferHelper.getBuffered(e),i=(r.length?r.start(0):0)-n;i>0&&(i<this.config.maxBufferHole||i<this.config.maxFragLookUpTolerance)&&(m.logger.log("adjusting start position by "+i+" to match buffer start"),n+=i,this.startPosition=n),this.log("seek to target start position "+n+" from current time "+t),e.currentTime=n}},E._getAudioCodec=function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),t},E._loadBitrateTestFrag=function(e){var t=this;this._doFragLoad(e).then((function(n){var r=t.hls;if(n&&!r.nextLoadLevel&&!t.fragContextChanged(e)){t.fragLoadError=0,t.state=i.State.IDLE,t.startFragRequested=!1,t.bitrateTest=!1;var o=e.stats;o.parsing.start=o.parsing.end=o.buffering.start=o.buffering.end=self.performance.now(),r.trigger(a.Events.FRAG_LOADED,n)}}))},E._handleTransmuxComplete=function(e){var t,n="main",o=this.hls,s=e.remuxResult,l=e.chunkMeta,c=this.getCurrentContext(l);if(!c)return this.warn("The loading context changed while buffering fragment "+l.sn+" of level "+l.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(l.level);var h=c.frag,d=c.part,f=c.level,p=s.video,m=s.text,g=s.id3,v=s.initSegment,y=this.altAudio?void 0:s.audio;if(!this.fragContextChanged(h)){if(this.state=i.State.PARSING,v){v.tracks&&(this._bufferInitSegment(f,v.tracks,h,l),o.trigger(a.Events.FRAG_PARSING_INIT_SEGMENT,{frag:h,id:n,tracks:v.tracks}));var b=v.initPTS,x=v.timescale;Object(r.isFiniteNumber)(b)&&(this.initPTS[h.cc]=b,o.trigger(a.Events.INIT_PTS_FOUND,{frag:h,id:n,initPTS:b,timescale:x}))}if(p&&!1!==s.independent){if(f.details){var w=p.startPTS,E=p.endPTS,S=p.startDTS,C=p.endDTS;if(d)d.elementaryStreams[p.type]={startPTS:w,endPTS:E,startDTS:S,endDTS:C};else if(p.firstKeyFrame&&p.independent&&(this.couldBacktrack=!0),p.dropped&&p.independent){if(this.getLoadPosition()+this.config.maxBufferHole<w)return void this.backtrack(h);h.setElementaryStreamInfo(p.type,h.start,E,h.start,C,!0)}h.setElementaryStreamInfo(p.type,w,E,S,C),this.bufferFragmentData(p,h,d,l)}}else if(!1===s.independent)return void this.backtrack(h);if(y){var k=y.startPTS,_=y.endPTS,T=y.startDTS,O=y.endDTS;d&&(d.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:k,endPTS:_,startDTS:T,endDTS:O}),h.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,k,_,T,O),this.bufferFragmentData(y,h,d,l)}if(null!=g&&null!==(t=g.samples)&&void 0!==t&&t.length){var A={frag:h,id:n,samples:g.samples};o.trigger(a.Events.FRAG_PARSING_METADATA,A)}if(m){var L={frag:h,id:n,samples:m.samples};o.trigger(a.Events.FRAG_PARSING_USERDATA,L)}}},E._bufferInitSegment=function(e,t,n,r){var o=this;if(this.state===i.State.PARSING){this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;var s=t.audio,l=t.video,c=t.audiovideo;if(s){var u=e.audioCodec,h=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(u&&(u=-1!==u.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),1!==s.metadata.channelCount&&-1===h.indexOf("firefox")&&(u="mp4a.40.5")),-1!==h.indexOf("android")&&"audio/mpeg"!==s.container&&(u="mp4a.40.2",this.log("Android: force audio codec to "+u)),e.audioCodec&&e.audioCodec!==u&&this.log('Swapping manifest audio codec "'+e.audioCodec+'" for "'+u+'"'),s.levelCodec=u,s.id="main",this.log("Init audio buffer, container:"+s.container+", codecs[selected/level/parsed]=["+(u||"")+"/"+(e.audioCodec||"")+"/"+s.codec+"]")}l&&(l.levelCodec=e.videoCodec,l.id="main",this.log("Init video buffer, container:"+l.container+", codecs[level/parsed]=["+(e.videoCodec||"")+"/"+l.codec+"]")),c&&this.log("Init audiovideo buffer, container:"+c.container+", codecs[level/parsed]=["+(e.attrs.CODECS||"")+"/"+c.codec+"]"),this.hls.trigger(a.Events.BUFFER_CODECS,t),Object.keys(t).forEach((function(e){var i=t[e].initSegment;null!=i&&i.byteLength&&o.hls.trigger(a.Events.BUFFER_APPENDING,{type:e,data:i,frag:n,part:null,chunkMeta:r,parent:n.type})})),this.tick()}},E.backtrack=function(e){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(e);var t=this.fragmentTracker.backtrack(e);this.fragPrevious=null,this.nextLoadPosition=e.start,t?this.resetFragmentLoading(e):this.state=i.State.BACKTRACKING},E.checkFragmentChanged=function(){var e=this.media,t=null;if(e&&e.readyState>1&&!1===e.seeking){var n=e.currentTime;if(s.BufferHelper.isBuffered(e,n)?t=this.getAppendedFrag(n):s.BufferHelper.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){var r=this.fragPlaying,i=t.level;r&&t.sn===r.sn&&r.level===i&&t.urlId===r.urlId||(this.hls.trigger(a.Events.FRAG_CHANGED,{frag:t}),r&&r.level===i||this.hls.trigger(a.Events.LEVEL_SWITCHED,{level:i}),this.fragPlaying=t)}}},b=y,(x=[{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getAppendedFrag(e.currentTime);if(t)return t.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;if(e){var t=this.getAppendedFrag(e.currentTime);return this.followingBufferedFrag(t)}return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&g(b.prototype,x),w&&g(b,w),y}(i.default)},"./src/controller/subtitle-stream-controller.ts":
/*!******************************************************!*\
!*** ./src/controller/subtitle-stream-controller.ts ***!
\******************************************************/
/*! exports provided: SubtitleStreamController */function(e,t,n){"use strict";n.r(t),n.d(t,"SubtitleStreamController",(function(){return m}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),a=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),s=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),l=n(/*! ./level-helper */"./src/controller/level-helper.ts"),c=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),u=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),h=n(/*! ../types/loader */"./src/types/loader.ts"),d=n(/*! ../types/level */"./src/types/level.ts");function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=function(e){var t,n;function m(t,n){var r;return(r=e.call(this,t,n,"[subtitle-stream-controller]")||this).levels=[],r.currentTrackId=-1,r.tracksBuffered=[],r.mainDetails=null,r._registerListeners(),r}n=e,(t=m).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var g,v,y,b=m.prototype;return b.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},b._registerListeners=function(){var e=this.hls;e.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(r.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(r.Events.ERROR,this.onError,this),e.on(r.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(r.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(r.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(r.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(r.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b._unregisterListeners=function(){var e=this.hls;e.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(r.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(r.Events.ERROR,this.onError,this),e.off(r.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(r.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(r.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(r.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(r.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b.startLoad=function(){this.stopLoad(),this.state=u.State.IDLE,this.setInterval(500),this.tick()},b.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},b.onLevelLoaded=function(e,t){this.mainDetails=t.details},b.onSubtitleFragProcessed=function(e,t){var n=t.frag,r=t.success;if(this.fragPrevious=n,this.state=u.State.IDLE,r){var i=this.tracksBuffered[this.currentTrackId];if(i){for(var o,a=n.start,s=0;s<i.length;s++)if(a>=i[s].start&&a<=i[s].end){o=i[s];break}var l=n.start+n.duration;o?o.end=l:(o={start:a,end:l},i.push(o)),this.fragmentTracker.fragBuffered(n)}}},b.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset;if(0===n&&r!==Number.POSITIVE_INFINITY){var i=this.currentTrackId,o=this.levels;if(!o.length||!o[i]||!o[i].details)return;var a=r-o[i].details.targetduration;if(a<=0)return;t.endOffsetSubtitles=Math.max(0,a),this.tracksBuffered.forEach((function(e){for(var t=0;t<e.length;)if(e[t].end<=a)e.shift();else{if(!(e[t].start<a))break;e[t].start=a,t++}})),this.fragmentTracker.removeFragmentsInRange(n,a,h.PlaylistLevelType.SUBTITLE)}},b.onError=function(e,t){var n,r=t.frag;r&&r.type===h.PlaylistLevelType.SUBTITLE&&(null!==(n=this.fragCurrent)&&void 0!==n&&n.loader&&this.fragCurrent.loader.abort(),this.state=u.State.IDLE)},b.onSubtitleTracksUpdated=function(e,t){var n=this,r=t.subtitleTracks;this.tracksBuffered=[],this.levels=r.map((function(e){return new d.Level(e)})),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach((function(e){n.tracksBuffered[e.id]=[]})),this.mediaBuffer=null},b.onSubtitleTrackSwitch=function(e,t){if(this.currentTrackId=t.id,this.levels.length&&-1!==this.currentTrackId){var n=this.levels[this.currentTrackId];null!=n&&n.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,n&&this.setInterval(500)}else this.clearInterval()},b.onSubtitleTrackLoaded=function(e,t){var n,r=t.details,i=t.id,o=this.currentTrackId,c=this.levels;if(c.length){var h=c[o];if(!(i>=c.length||i!==o)&&h){if(this.mediaBuffer=this.mediaBufferTimeRanges,r.live||null!==(n=h.details)&&void 0!==n&&n.live){var d=this.mainDetails;if(r.deltaUpdateFailed||!d)return;var f=d.fragments[0];h.details?0===this.alignPlaylists(r,h.details)&&f&&Object(l.addSliding)(r,f.start):r.hasProgramDateTime&&d.hasProgramDateTime?Object(s.alignMediaPlaylistByPDT)(r,d):f&&Object(l.addSliding)(r,f.start)}h.details=r,this.levelLastLoaded=i,this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===u.State.IDLE&&(Object(a.findFragmentByPTS)(null,r.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),h.details=void 0))}}},b._handleFragmentLoadComplete=function(e){var t=e.frag,n=e.payload,i=t.decryptdata,o=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&i&&i.key&&i.iv&&"AES-128"===i.method){var a=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(n),i.key.buffer,i.iv.buffer).then((function(e){var n=performance.now();o.trigger(r.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:a,tdecrypt:n}})}))}},b.doTick=function(){if(this.media){if(this.state===u.State.IDLE){var e,t=this.currentTrackId,n=this.levels;if(!n.length||!n[t]||!n[t].details)return;var s=n[t].details,l=s.targetduration,h=this.config,d=this.media,f=o.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,d.currentTime-l,h.maxBufferHole),p=f.end;if(f.len>this.getMaxBufferLength()+l)return;console.assert(s,"Subtitle track details are defined on idle subtitle stream controller tick");var m,g=s.fragments,v=g.length,y=s.edge,b=this.fragPrevious;if(p<y){var x=h.maxFragLookUpTolerance;b&&s.hasProgramDateTime&&(m=Object(a.findFragmentByPDT)(g,b.endProgramDateTime,x)),m||!(m=Object(a.findFragmentByPTS)(b,g,p,x))&&b&&b.start<g[0].start&&(m=g[0])}else m=g[v-1];null!==(e=m)&&void 0!==e&&e.encrypted?(i.logger.log("Loading key for "+m.sn),this.state=u.State.KEY_LOADING,this.hls.trigger(r.Events.KEY_LOADING,{frag:m})):m&&this.fragmentTracker.getState(m)===c.FragmentState.NOT_LOADED&&this.loadFragment(m,s,p)}}else this.state=u.State.IDLE},b.loadFragment=function(t,n,r){this.fragCurrent=t,e.prototype.loadFragment.call(this,t,n,r)},g=m,(v=[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}])&&f(g.prototype,v),y&&f(g,y),m}(u.default)},"./src/controller/subtitle-track-controller.ts":
/*!*****************************************************!*\
!*** ./src/controller/subtitle-track-controller.ts ***!
\*****************************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.ts"),o=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),a=n(/*! ../types/loader */"./src/types/loader.ts");function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){var t,n;function o(t){var n;return(n=e.call(this,t,"[subtitle-track-controller]")||this).media=null,n.tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.selectDefaultTrack=!0,n.queuedDefaultTrack=-1,n.trackChangeListener=function(){return n.onTextTracksChanged()},n.asyncPollTrackChange=function(){return n.pollTrackChange(0)},n.useTextTrackPolling=!1,n.subtitlePollingInterval=-1,n.subtitleDisplay=!0,n.registerListeners(),n}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var c,h,d,f=o.prototype;return f.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,e.prototype.destroy.call(this)},f.registerListeners=function(){var e=this.hls;e.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(r.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(r.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(r.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(r.Events.ERROR,this.onError,this)},f.unregisterListeners=function(){var e=this.hls;e.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(r.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(r.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(r.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(r.Events.ERROR,this.onError,this)},f.onMediaAttached=function(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))},f.pollTrackChange=function(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)},f.onMediaDetaching=function(){this.media&&(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),u(this.media.textTracks).forEach((function(e){Object(i.clearCurrentCues)(e)})),this.subtitleTrack=-1,this.media=null)},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(e,t){this.tracks=t.subtitleTracks},f.onSubtitleTrackLoaded=function(e,t){var n=t.id,r=t.details,i=this.trackId,o=this.tracksInGroup[i];if(o){var a=o.details;o.details=t.details,this.log("subtitle track "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,a))}else this.warn("Invalid subtitle track id "+n)},f.onLevelLoading=function(e,t){this.switchLevel(t.level)},f.onLevelSwitching=function(e,t){this.switchLevel(t.level)},f.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.textGroupIds){var n=t.textGroupIds[t.urlId];if(this.groupId!==n){var i=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,o=this.tracks.filter((function(e){return!n||e.groupId===n}));this.tracksInGroup=o;var a=this.findTrackId(null==i?void 0:i.name)||this.findTrackId();this.groupId=n;var s={subtitleTracks:o};this.log("Updating subtitle tracks, "+o.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(r.Events.SUBTITLE_TRACKS_UPDATED,s),-1!==a&&this.setSubtitleTrack(a,i)}}},f.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n<t.length;n++){var r=t[n];if((!this.selectDefaultTrack||r.default)&&(!e||e===r.name))return r.id}return-1},f.onError=function(t,n){e.prototype.onError.call(this,t,n),!n.fatal&&n.context&&n.context.type===a.PlaylistContextType.SUBTITLE_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},f.loadPlaylist=function(e){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var n=t.id,i=t.groupId,o=t.url;if(e)try{o=e.addDirectives(o)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Loading subtitle playlist for id "+n),this.hls.trigger(r.Events.SUBTITLE_TRACK_LOADING,{url:o,id:n,groupId:i,deliveryDirectives:e||null})}},f.toggleTrackModes=function(e){var t=this,n=this.media,r=this.subtitleDisplay,i=this.trackId;if(n){var o=u(n.textTracks),a=o.filter((function(e){return e.groupId===t.groupId}));if(-1===e)[].slice.call(o).forEach((function(e){e.mode="disabled"}));else{var s=a[i];s&&(s.mode="disabled")}var l=a[e];l&&(l.mode=r?"showing":"hidden")}},f.setSubtitleTrack=function(e,t){var n,i=this.tracksInGroup;if(this.media){if(this.trackId!==e&&this.toggleTrackModes(e),!(this.trackId===e&&(-1===e||null!==(n=i[e])&&void 0!==n&&n.details)||e<-1||e>=i.length)){this.clearTimer();var o=i[e];if(this.log("Switching to subtitle track "+e),this.trackId=e,o){var a=o.id,s=o.groupId,l=void 0===s?"":s,c=o.name,u=o.type,h=o.url;this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:a,groupId:l,name:c,type:u,url:h});var d=this.switchParams(o.url,null==t?void 0:t.details);this.loadPlaylist(d)}else this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:e})}}else this.queuedDefaultTrack=e},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var e=-1,t=u(this.media.textTracks),n=0;n<t.length;n++)if("hidden"===t[n].mode)e=n;else if("showing"===t[n].mode){e=n;break}this.subtitleTrack!==e&&(this.subtitleTrack=e)}},c=o,(h=[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1;var t=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(e,t)}}])&&s(c.prototype,h),d&&s(c,d),o}(o.default);function u(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"subtitles"===r.kind&&r.label&&t.push(e[n])}return t}t.default=c},"./src/controller/timeline-controller.ts":
/*!***********************************************!*\
!*** ./src/controller/timeline-controller.ts ***!
\***********************************************/
/*! exports provided: TimelineController */function(e,t,n){"use strict";n.r(t),n.d(t,"TimelineController",(function(){return d}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/cea-608-parser */"./src/utils/cea-608-parser.ts"),a=n(/*! ../utils/output-filter */"./src/utils/output-filter.ts"),s=n(/*! ../utils/webvtt-parser */"./src/utils/webvtt-parser.ts"),l=n(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.ts"),c=n(/*! ../utils/imsc1-ttml-parser */"./src/utils/imsc1-ttml-parser.ts"),u=n(/*! ../types/loader */"./src/types/loader.ts"),h=n(/*! ../utils/logger */"./src/utils/logger.ts"),d=function(){function e(e){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var t=new a.default(this,"textTrack1"),n=new a.default(this,"textTrack2"),r=new a.default(this,"textTrack3"),s=new a.default(this,"textTrack4");this.cea608Parser1=new o.default(1,t,n),this.cea608Parser2=new o.default(3,r,s)}e.on(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(i.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(i.Events.FRAG_LOADING,this.onFragLoading,this),e.on(i.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(i.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(i.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(i.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(i.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var t=e.prototype;return t.destroy=function(){var e=this.hls;e.off(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(i.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(i.Events.FRAG_LOADING,this.onFragLoading,this),e.off(i.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(i.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(i.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(i.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(i.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},t.addCues=function(e,t,n,r,o){for(var a,s,l,c,u=!1,h=o.length;h--;){var d=o[h],f=(a=d[0],s=d[1],l=t,c=n,Math.min(s,c)-Math.max(a,l));if(f>=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],n),u=!0,f/(n-t)>.5))return}if(u||o.push([t,n]),this.config.renderTextTracksNatively){var p=this.captionsTracks[e];this.Cues.newCue(p,t,n,r)}else{var m=this.Cues.newCue(null,t,n,r);this.hls.trigger(i.Events.CUES_PARSED,{type:"captions",cues:m,track:e})}},t.onInitPtsFound=function(e,t){var n=this,r=t.frag,o=t.id,a=t.initPTS,s=t.timescale,l=this.unparsedVttFrags;"main"===o&&(this.initPTS[r.cc]=a,this.timescale[r.cc]=s),l.length&&(this.unparsedVttFrags=[],l.forEach((function(e){n.onFragLoaded(i.Events.FRAG_LOADED,e)})))},t.getExistingTrack=function(e){var t=this.media;if(t)for(var n=0;n<t.textTracks.length;n++){var r=t.textTracks[n];if(r[e])return r}return null},t.createCaptionsTrack=function(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)},t.createNativeTrack=function(e){if(!this.captionsTracks[e]){var t=this.captionsProperties,n=this.captionsTracks,r=this.media,i=t[e],o=i.label,a=i.languageCode,s=this.getExistingTrack(e);if(s)n[e]=s,Object(l.clearCurrentCues)(n[e]),Object(l.sendAddTrackEvent)(n[e],r);else{var c=this.createTextTrack("captions",o,a);c&&(c[e]=!0,n[e]=c)}}},t.createNonNativeTrack=function(e){if(!this.nonNativeCaptionsTracks[e]){var t=this.captionsProperties[e];if(t){var n={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=n,this.hls.trigger(i.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[n]})}}},t.createTextTrack=function(e,t,n){var r=this.media;if(r)return r.addTextTrack(e,t,n)},t.onMediaAttaching=function(e,t){this.media=t.media,this._cleanTracks()},t.onMediaDetaching=function(){var e=this.captionsTracks;Object.keys(e).forEach((function(t){Object(l.clearCurrentCues)(e[t]),delete e[t]})),this.nonNativeCaptionsTracks={}},t.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},t._cleanTracks=function(){var e=this.media;if(e){var t=e.textTracks;if(t)for(var n=0;n<t.length;n++)Object(l.clearCurrentCues)(t[n])}},t.onSubtitleTracksUpdated=function(e,t){var n=this;this.textTracks=[];var r=t.subtitleTracks||[],o=r.some((function(e){return e.textCodec===c.IMSC1_CODEC}));if(this.config.enableWebVTT||o&&this.config.enableIMSC1){var a=this.tracks&&r&&this.tracks.length===r.length;if(this.tracks=r||[],this.config.renderTextTracksNatively){var s=this.media?this.media.textTracks:[];this.tracks.forEach((function(e,t){var r;if(t<s.length){for(var i=null,o=0;o<s.length;o++)if(f(s[o],e)){i=s[o];break}i&&(r=i)}r?Object(l.clearCurrentCues)(r):(r=n.createTextTrack("subtitles",e.name,e.lang))&&(r.mode="disabled"),r&&(r.groupId=e.groupId,n.textTracks.push(r))}))}else if(!a&&this.tracks&&this.tracks.length){var u=this.tracks.map((function(e){return{label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e}}));this.hls.trigger(i.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:u})}}},t.onManifestLoaded=function(e,t){var n=this;this.config.enableCEA708Captions&&t.captions&&t.captions.forEach((function(e){var t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(t){var r="textTrack"+t[1],i=n.captionsProperties[r];i&&(i.label=e.name,e.lang&&(i.languageCode=e.lang),i.media=e)}}))},t.onFragLoading=function(e,t){var n=this.cea608Parser1,r=this.cea608Parser2,i=this.lastSn,o=this.lastPartIndex;if(this.enabled&&n&&r&&t.frag.type===u.PlaylistLevelType.MAIN){var a,s,l=t.frag.sn,c=null!=(a=null==t||null===(s=t.part)||void 0===s?void 0:s.index)?a:-1;l===i+1||l===i&&c===o+1||(n.reset(),r.reset()),this.lastSn=l,this.lastPartIndex=c}},t.onFragLoaded=function(e,t){var n=t.frag,o=t.payload,a=this.initPTS,s=this.unparsedVttFrags;if(n.type===u.PlaylistLevelType.SUBTITLE)if(o.byteLength){if(!Object(r.isFiniteNumber)(a[n.cc]))return s.push(t),void(a.length&&this.hls.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Missing initial subtitle PTS")}));var l=n.decryptdata;if(null==l||null==l.key||"AES-128"!==l.method){var h=this.tracks[n.level],d=this.vttCCs;d[n.cc]||(d[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),h&&h.textCodec===c.IMSC1_CODEC?this._parseIMSC1(n,o):this._parseVTTs(n,o,d)}}else this.hls.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})},t._parseIMSC1=function(e,t){var n=this,r=this.hls;Object(c.parseIMSC1)(t,this.initPTS[e.cc],this.timescale[e.cc],(function(t){n._appendCues(t,e.level),r.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(t){h.logger.log("Failed to parse IMSC1: "+t),r.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))},t._parseVTTs=function(e,t,n){var r=this,o=this.hls;Object(s.parseWebVTT)(t,this.initPTS[e.cc],this.timescale[e.cc],n,e.cc,e.start,(function(t){r._appendCues(t,e.level),o.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(n){r._fallbackToIMSC1(e,t),h.logger.log("Failed to parse VTT cue: "+n),o.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:n})}))},t._fallbackToIMSC1=function(e,t){var n=this,r=this.tracks[e.level];r.textCodec||Object(c.parseIMSC1)(t,this.initPTS[e.cc],this.timescale[e.cc],(function(){r.textCodec=c.IMSC1_CODEC,n._parseIMSC1(e,t)}),(function(){r.textCodec="wvtt"}))},t._appendCues=function(e,t){var n=this.hls;if(this.config.renderTextTracksNatively){var r=this.textTracks[t];if("disabled"===r.mode)return;e.forEach((function(e){return Object(l.addCueToTrack)(r,e)}))}else{var o=this.tracks[t].default?"default":"subtitles"+t;n.trigger(i.Events.CUES_PARSED,{type:"subtitles",cues:e,track:o})}},t.onFragDecrypted=function(e,t){var n=t.frag;if(n.type===u.PlaylistLevelType.SUBTITLE){if(!Object(r.isFiniteNumber)(this.initPTS[n.cc]))return void this.unparsedVttFrags.push(t);this.onFragLoaded(i.Events.FRAG_LOADED,t)}},t.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},t.onFragParsingUserdata=function(e,t){var n=this.cea608Parser1,r=this.cea608Parser2;if(this.enabled&&n&&r)for(var i=0;i<t.samples.length;i++){var o=t.samples[i].bytes;if(o){var a=this.extractCea608Data(o);n.addData(t.samples[i].pts,a[0]),r.addData(t.samples[i].pts,a[1])}}},t.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset,i=t.endOffsetSubtitles,o=t.type,a=this.media;if(a&&!(a.currentTime<r)){if(!o||"video"===o){var s=this.captionsTracks;Object.keys(s).forEach((function(e){return Object(l.removeCuesInRange)(s[e],n,r)}))}if(this.config.renderTextTracksNatively&&0===n&&void 0!==i){var c=this.textTracks;Object.keys(c).forEach((function(e){return Object(l.removeCuesInRange)(c[e],n,i)}))}}},t.extractCea608Data=function(e){for(var t=31&e[0],n=2,r=[[],[]],i=0;i<t;i++){var o=e[n++],a=127&e[n++],s=127&e[n++],l=3&o;0===a&&0===s||0!=(4&o)&&(0!==l&&1!==l||(r[l].push(a),r[l].push(s)))}return r},e}();function f(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}},"./src/crypt/aes-crypto.ts":
/*!*********************************!*\
!*** ./src/crypt/aes-crypto.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}return e.prototype.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},e}()},"./src/crypt/aes-decryptor.ts":
/*!************************************!*\
!*** ./src/crypt/aes-decryptor.ts ***!
\************************************/
/*! exports provided: removePadding, default */function(e,t,n){"use strict";n.r(t),n.d(t,"removePadding",(function(){return i})),n.d(t,"default",(function(){return o}));var r=n(/*! ../utils/typed-array */"./src/utils/typed-array.ts");function i(e){var t=e.byteLength,n=t&&new DataView(e.buffer).getUint8(t-1);return n?Object(r.sliceUint8)(e,0,t-n):e}var o=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var t=e.prototype;return t.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),n=new Uint32Array(4),r=0;r<4;r++)n[r]=t.getUint32(4*r);return n},t.initTable=function(){var e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],o=n[2],a=n[3],s=this.invSubMix,l=s[0],c=s[1],u=s[2],h=s[3],d=new Uint32Array(256),f=0,p=0,m=0;for(m=0;m<256;m++)d[m]=m<128?m<<1:m<<1^283;for(m=0;m<256;m++){var g=p^p<<1^p<<2^p<<3^p<<4;g=g>>>8^255&g^99,e[f]=g,t[g]=f;var v=d[f],y=d[v],b=d[y],x=257*d[g]^16843008*g;r[f]=x<<24|x>>>8,i[f]=x<<16|x>>>16,o[f]=x<<8|x>>>24,a[f]=x,x=16843009*b^65537*y^257*v^16843008*f,l[g]=x<<24|x>>>8,c[g]=x<<16|x>>>16,u[g]=x<<8|x>>>24,h[g]=x,f?(f=v^d[d[d[b^v]]],p^=d[d[p]]):f=p=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;r<t.length&&n;)n=t[r]===this.key[r],r++;if(!n){this.key=t;var i=this.keySize=t.length;if(4!==i&&6!==i&&8!==i)throw new Error("Invalid aes key size="+i);var o,a,s,l,c=this.ksRows=4*(i+6+1),u=this.keySchedule=new Uint32Array(c),h=this.invKeySchedule=new Uint32Array(c),d=this.sBox,f=this.rcon,p=this.invSubMix,m=p[0],g=p[1],v=p[2],y=p[3];for(o=0;o<c;o++)o<i?s=u[o]=t[o]:(l=s,o%i==0?(l=d[(l=l<<8|l>>>24)>>>24]<<24|d[l>>>16&255]<<16|d[l>>>8&255]<<8|d[255&l],l^=f[o/i|0]<<24):i>6&&o%i==4&&(l=d[l>>>24]<<24|d[l>>>16&255]<<16|d[l>>>8&255]<<8|d[255&l]),u[o]=s=(u[o-i]^l)>>>0);for(a=0;a<c;a++)o=c-a,l=3&a?u[o]:u[o-4],h[a]=a<4||o<=4?l:m[d[l>>>24]]^g[d[l>>>16&255]]^v[d[l>>>8&255]]^y[d[255&l]],h[a]=h[a]>>>0}},t.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},t.decrypt=function(e,t,n){for(var r,i,o,a,s,l,c,u,h,d,f,p,m,g,v=this.keySize+6,y=this.invKeySchedule,b=this.invSBox,x=this.invSubMix,w=x[0],E=x[1],S=x[2],C=x[3],k=this.uint8ArrayToUint32Array_(n),_=k[0],T=k[1],O=k[2],A=k[3],L=new Int32Array(e),D=new Int32Array(L.length),I=this.networkToHostOrderSwap;t<L.length;){for(h=I(L[t]),d=I(L[t+1]),f=I(L[t+2]),p=I(L[t+3]),s=h^y[0],l=p^y[1],c=f^y[2],u=d^y[3],m=4,g=1;g<v;g++)r=w[s>>>24]^E[l>>16&255]^S[c>>8&255]^C[255&u]^y[m],i=w[l>>>24]^E[c>>16&255]^S[u>>8&255]^C[255&s]^y[m+1],o=w[c>>>24]^E[u>>16&255]^S[s>>8&255]^C[255&l]^y[m+2],a=w[u>>>24]^E[s>>16&255]^S[l>>8&255]^C[255&c]^y[m+3],s=r,l=i,c=o,u=a,m+=4;r=b[s>>>24]<<24^b[l>>16&255]<<16^b[c>>8&255]<<8^b[255&u]^y[m],i=b[l>>>24]<<24^b[c>>16&255]<<16^b[u>>8&255]<<8^b[255&s]^y[m+1],o=b[c>>>24]<<24^b[u>>16&255]<<16^b[s>>8&255]<<8^b[255&l]^y[m+2],a=b[u>>>24]<<24^b[s>>16&255]<<16^b[l>>8&255]<<8^b[255&c]^y[m+3],D[t]=I(r^_),D[t+1]=I(a^T),D[t+2]=I(o^O),D[t+3]=I(i^A),_=h,T=d,O=f,A=p,t+=4}return D.buffer},e}()},"./src/crypt/decrypter.ts":
/*!********************************!*\
!*** ./src/crypt/decrypter.ts ***!
\********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return c}));var r=n(/*! ./aes-crypto */"./src/crypt/aes-crypto.ts"),i=n(/*! ./fast-aes-key */"./src/crypt/fast-aes-key.ts"),o=n(/*! ./aes-decryptor */"./src/crypt/aes-decryptor.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=n(/*! ../utils/typed-array */"./src/utils/typed-array.ts"),c=function(){function e(e,t,n){var r=(void 0===n?{}:n).removePKCS7Padding,i=void 0===r||r;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=e,this.config=t,this.removePKCS7Padding=i,i)try{var o=self.crypto;o&&(this.subtle=o.subtle||o.webkitSubtle)}catch(e){}null===this.subtle&&(this.config.enableSoftwareAES=!0)}var t=e.prototype;return t.destroy=function(){this.observer=null},t.isSync=function(){return this.config.enableSoftwareAES},t.flush=function(){var e=this.currentResult;if(e){var t=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?Object(o.removePadding)(t):t}this.reset()},t.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},t.decrypt=function(e,t,n,r){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(e),t,n);var i=this.flush();i&&r(i.buffer)}else this.webCryptoDecrypt(new Uint8Array(e),t,n).then(r)},t.softwareDecrypt=function(e,t,n){var r=this.currentIV,i=this.currentResult,a=this.remainderData;this.logOnce("JS AES decrypt"),a&&(e=Object(s.appendUint8Array)(a,e),this.remainderData=null);var c=this.getValidChunk(e);if(!c.length)return null;r&&(n=r);var u=this.softwareDecrypter;u||(u=this.softwareDecrypter=new o.default),u.expandKey(t);var h=i;return this.currentResult=u.decrypt(c.buffer,0,n),this.currentIV=Object(l.sliceUint8)(c,-16).buffer,h||null},t.webCryptoDecrypt=function(e,t,n){var o=this,a=this.subtle;return this.key===t&&this.fastAesKey||(this.key=t,this.fastAesKey=new i.default(a,t)),this.fastAesKey.expandKey().then((function(t){return a?new r.default(a,n).decrypt(e.buffer,t):Promise.reject(new Error("web crypto not initialized"))})).catch((function(r){return o.onWebCryptoError(r,e,t,n)}))},t.onWebCryptoError=function(e,t,n,r){return a.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",e),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(t,n,r)},t.getValidChunk=function(e){var t=e,n=e.length-e.length%16;return n!==e.length&&(t=Object(l.sliceUint8)(e,0,n),this.remainderData=Object(l.sliceUint8)(e,n)),t},t.logOnce=function(e){this.logEnabled&&(a.logger.log("[decrypter.ts]: "+e),this.logEnabled=!1)},e}()},"./src/crypt/fast-aes-key.ts":
/*!***********************************!*\
!*** ./src/crypt/fast-aes-key.ts ***!
\***********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}return e.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}()},"./src/demux/aacdemuxer.ts":
/*!*********************************!*\
!*** ./src/demux/aacdemuxer.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),i=n(/*! ./adts */"./src/demux/adts.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=n(/*! ../demux/id3 */"./src/demux/id3.ts");function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this).observer=void 0,r.config=void 0,r.observer=t,r.config=n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var l=r.prototype;return l.resetInitSegment=function(t,n,r){e.prototype.resetInitSegment.call(this,t,n,r),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}},r.probe=function(e){if(!e)return!1;for(var t=(a.getID3Data(e,0)||[]).length,n=e.length;t<n;t++)if(i.probe(e,t))return o.logger.log("ADTS sync word found !"),!0;return!1},l.canParse=function(e,t){return i.canParse(e,t)},l.appendFrame=function(e,t,n){i.initTrackConfig(e,this.observer,t,n,e.manifestCodec);var r=i.appendFrame(e,t,n,this.initPTS,this.frameIndex);if(r&&0===r.missing)return r},r}(r.default);l.minProbeByteLength=9,t.default=l},"./src/demux/adts.ts":
/*!***************************!*\
!*** ./src/demux/adts.ts ***!
\***************************/
/*! exports provided: getAudioConfig, isHeaderPattern, getHeaderLength, getFullFrameLength, canGetFrameLength, isHeader, canParse, probe, initTrackConfig, getFrameDuration, parseFrameHeader, appendFrame */function(e,t,n){"use strict";n.r(t),n.d(t,"getAudioConfig",(function(){return a})),n.d(t,"isHeaderPattern",(function(){return s})),n.d(t,"getHeaderLength",(function(){return l})),n.d(t,"getFullFrameLength",(function(){return c})),n.d(t,"canGetFrameLength",(function(){return u})),n.d(t,"isHeader",(function(){return h})),n.d(t,"canParse",(function(){return d})),n.d(t,"probe",(function(){return f})),n.d(t,"initTrackConfig",(function(){return p})),n.d(t,"getFrameDuration",(function(){return m})),n.d(t,"parseFrameHeader",(function(){return g})),n.d(t,"appendFrame",(function(){return v}));var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../events */"./src/events.ts");function a(e,t,n,a){var s,l,c,u,h=navigator.userAgent.toLowerCase(),d=a,f=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];s=1+((192&t[n+2])>>>6);var p=(60&t[n+2])>>>2;if(!(p>f.length-1))return c=(1&t[n+2])<<2,c|=(192&t[n+3])>>>6,r.logger.log("manifest codec:"+a+", ADTS type:"+s+", samplingIndex:"+p),/firefox/i.test(h)?p>=6?(s=5,u=new Array(4),l=p-3):(s=2,u=new Array(2),l=p):-1!==h.indexOf("android")?(s=2,u=new Array(2),l=p):(s=5,u=new Array(4),a&&(-1!==a.indexOf("mp4a.40.29")||-1!==a.indexOf("mp4a.40.5"))||!a&&p>=6?l=p-3:((a&&-1!==a.indexOf("mp4a.40.2")&&(p>=6&&1===c||/vivaldi/i.test(h))||!a&&1===c)&&(s=2,u=new Array(2)),l=p)),u[0]=s<<3,u[0]|=(14&p)>>1,u[1]|=(1&p)<<7,u[1]|=c<<3,5===s&&(u[1]|=(14&l)>>1,u[2]=(1&l)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:f[p],channelCount:c,codec:"mp4a.40."+s,manifestCodec:d};e.trigger(o.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+p})}function s(e,t){return 255===e[t]&&240==(246&e[t+1])}function l(e,t){return 1&e[t+1]?7:9}function c(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function u(e,t){return t+5<e.length}function h(e,t){return t+1<e.length&&s(e,t)}function d(e,t){return u(e,t)&&s(e,t)&&c(e,t)<=e.length-t}function f(e,t){if(h(e,t)){var n=l(e,t);if(t+n>=e.length)return!1;var r=c(e,t);if(r<=n)return!1;var i=t+r;return i===e.length||h(e,i)}return!1}function p(e,t,n,i,o){if(!e.samplerate){var s=a(t,n,i,o);if(!s)return;e.config=s.config,e.samplerate=s.samplerate,e.channelCount=s.channelCount,e.codec=s.codec,e.manifestCodec=s.manifestCodec,r.logger.log("parsed codec:"+e.codec+", rate:"+s.samplerate+", channels:"+s.channelCount)}}function m(e){return 9216e4/e}function g(e,t,n,r,i){var o=l(e,t),a=c(e,t);if((a-=o)>0)return{headerLength:o,frameLength:a,stamp:n+r*i}}function v(e,t,n,r,i){var o=g(t,n,r,i,m(e.samplerate));if(o){var a,s=o.frameLength,l=o.headerLength,c=o.stamp,u=l+s,h=Math.max(0,n+u-t.length);h?(a=new Uint8Array(u-l)).set(t.subarray(n+l,t.length),0):a=t.subarray(n+l,n+u);var d={unit:a,pts:c};return h||e.samples.push(d),{sample:d,length:u,missing:h}}}},"./src/demux/base-audio-demuxer.ts":
/*!*****************************************!*\
!*** ./src/demux/base-audio-demuxer.ts ***!
\*****************************************/
/*! exports provided: initPTSFn, default */function(e,t,n){"use strict";n.r(t),n.d(t,"initPTSFn",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),o=n(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),a=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),s=n(/*! ../utils/typed-array */"./src/utils/typed-array.ts"),l=function(){function e(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var t=e.prototype;return t.resetInitSegment=function(e,t,n){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},t.resetTimeStamp=function(){},t.resetContiguity=function(){},t.canParse=function(e,t){return!1},t.appendFrame=function(e,t,n){},t.demux=function(e,t){this.cachedData&&(e=Object(a.appendUint8Array)(this.cachedData,e),this.cachedData=null);var n,r,l=i.getID3Data(e,0),u=l?l.length:0,h=this._audioTrack,d=this._id3Track,f=l?i.getTimeStamp(l):void 0,p=e.length;for(0!==this.frameIndex&&null!==this.initPTS||(this.initPTS=c(f,t)),l&&l.length>0&&d.samples.push({pts:this.initPTS,dts:this.initPTS,data:l}),r=this.initPTS;u<p;){if(this.canParse(e,u)){var m=this.appendFrame(h,e,u);m?(this.frameIndex++,r=m.sample.pts,n=u+=m.length):u=p}else i.canParse(e,u)?(l=i.getID3Data(e,u),d.samples.push({pts:r,dts:r,data:l}),n=u+=l.length):u++;if(u===p&&n!==p){var g=Object(s.sliceUint8)(e,n);this.cachedData?this.cachedData=Object(a.appendUint8Array)(this.cachedData,g):this.cachedData=g}}return{audioTrack:h,avcTrack:Object(o.dummyTrack)(),id3Track:d,textTrack:Object(o.dummyTrack)()}},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},t.flush=function(e){var t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(o.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(o.dummyTrack)()}},t.destroy=function(){},e}(),c=function(e,t){return Object(r.isFiniteNumber)(e)?90*e:9e4*t};t.default=l},"./src/demux/chunk-cache.ts":
/*!**********************************!*\
!*** ./src/demux/chunk-cache.ts ***!
\**********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(){this.chunks=[],this.dataLength=0}var t=e.prototype;return t.push=function(e){this.chunks.push(e),this.dataLength+=e.length},t.flush=function(){var e,t=this.chunks,n=this.dataLength;return t.length?(e=1===t.length?t[0]:function(e,t){for(var n=new Uint8Array(t),r=0,i=0;i<e.length;i++){var o=e[i];n.set(o,r),r+=o.length}return n}(t,n),this.reset(),e):new Uint8Array(0)},t.reset=function(){this.chunks.length=0,this.dataLength=0},e}()},"./src/demux/dummy-demuxed-track.ts":
/*!******************************************!*\
!*** ./src/demux/dummy-demuxed-track.ts ***!
\******************************************/
/*! exports provided: dummyTrack */function(e,t,n){"use strict";function r(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}n.r(t),n.d(t,"dummyTrack",(function(){return r}))},"./src/demux/exp-golomb.ts":
/*!*********************************!*\
!*** ./src/demux/exp-golomb.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=function(){function e(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}var t=e.prototype;return t.loadWord=function(){var e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(0===i)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*i,this.bytesAvailable-=i},t.skipBits=function(e){var t;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&r.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?n<<t|this.readBits(t):n},t.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){for(var t=8,n=8,r=0;r<e;r++)0!==n&&(n=(t+this.readEG()+256)%256),t=0===n?t:n},t.readSPS=function(){var e,t,n,r=0,i=0,o=0,a=0,s=this.readUByte.bind(this),l=this.readBits.bind(this),c=this.readUEG.bind(this),u=this.readBoolean.bind(this),h=this.skipBits.bind(this),d=this.skipEG.bind(this),f=this.skipUEG.bind(this),p=this.skipScalingList.bind(this);s();var m=s();if(l(5),h(3),s(),f(),100===m||110===m||122===m||244===m||44===m||83===m||86===m||118===m||128===m){var g=c();if(3===g&&h(1),f(),f(),h(1),u())for(t=3!==g?8:12,n=0;n<t;n++)u()&&p(n<6?16:64)}f();var v=c();if(0===v)c();else if(1===v)for(h(1),d(),d(),e=c(),n=0;n<e;n++)d();f(),h(1);var y=c(),b=c(),x=l(1);0===x&&h(1),h(1),u()&&(r=c(),i=c(),o=c(),a=c());var w=[1,1];if(u()&&u())switch(s()){case 1:w=[1,1];break;case 2:w=[12,11];break;case 3:w=[10,11];break;case 4:w=[16,11];break;case 5:w=[40,33];break;case 6:w=[24,11];break;case 7:w=[20,11];break;case 8:w=[32,11];break;case 9:w=[80,33];break;case 10:w=[18,11];break;case 11:w=[15,11];break;case 12:w=[64,33];break;case 13:w=[160,99];break;case 14:w=[4,3];break;case 15:w=[3,2];break;case 16:w=[2,1];break;case 255:w=[s()<<8|s(),s()<<8|s()]}return{width:Math.ceil(16*(y+1)-2*r-2*i),height:(2-x)*(b+1)*16-(x?2:4)*(o+a),pixelRatio:w}},t.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}();t.default=i},"./src/demux/id3.ts":
/*!**************************!*\
!*** ./src/demux/id3.ts ***!
\**************************/
/*! exports provided: isHeader, isFooter, getID3Data, canParse, getTimeStamp, isTimeStampFrame, getID3Frames, decodeFrame, utf8ArrayToStr, testables */function(e,t,n){"use strict";n.r(t),n.d(t,"isHeader",(function(){return i})),n.d(t,"isFooter",(function(){return o})),n.d(t,"getID3Data",(function(){return a})),n.d(t,"canParse",(function(){return l})),n.d(t,"getTimeStamp",(function(){return c})),n.d(t,"isTimeStampFrame",(function(){return u})),n.d(t,"getID3Frames",(function(){return d})),n.d(t,"decodeFrame",(function(){return f})),n.d(t,"utf8ArrayToStr",(function(){return y})),n.d(t,"testables",(function(){return b}));var r,i=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},o=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},a=function(e,t){for(var n=t,r=0;i(e,t);)r+=10,r+=s(e,t+6),o(e,t+10)&&(r+=10),t+=r;if(r>0)return e.subarray(n,n+r)},s=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3]},l=function(e,t){return i(e,t)&&s(e,t+6)+10<=e.length-t},c=function(e){for(var t=d(e),n=0;n<t.length;n++){var r=t[n];if(u(r))return v(r)}},u=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},h=function(e){var t=String.fromCharCode(e[0],e[1],e[2],e[3]),n=s(e,4);return{type:t,size:n,data:e.subarray(10,10+n)}},d=function(e){for(var t=0,n=[];i(e,t);){for(var r=s(e,t+6),a=(t+=10)+r;t+8<a;){var l=h(e.subarray(t)),c=f(l);c&&n.push(c),t+=l.size+10}o(e,t)&&(t+=10)}return n},f=function(e){return"PRIV"===e.type?p(e):"W"===e.type[0]?g(e):m(e)},p=function(e){if(!(e.size<2)){var t=y(e.data,!0),n=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:n.buffer}}},m=function(e){if(!(e.size<2)){if("TXXX"===e.type){var t=1,n=y(e.data.subarray(t),!0);t+=n.length+1;var r=y(e.data.subarray(t));return{key:e.type,info:n,data:r}}var i=y(e.data.subarray(1));return{key:e.type,data:i}}},g=function(e){if("WXXX"===e.type){if(e.size<2)return;var t=1,n=y(e.data.subarray(t),!0);t+=n.length+1;var r=y(e.data.subarray(t));return{key:e.type,info:n,data:r}}var i=y(e.data);return{key:e.type,data:i}},v=function(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),n=1&t[3],r=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return r/=45,n&&(r+=47721858.84),Math.round(r)}},y=function(e,t){void 0===t&&(t=!1);var n=x();if(n){var r=n.decode(e);if(t){var i=r.indexOf("\0");return-1!==i?r.substring(0,i):r}return r.replace(/\0/g,"")}for(var o,a,s,l=e.length,c="",u=0;u<l;){if(0===(o=e[u++])&&t)return c;if(0!==o&&3!==o)switch(o>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(o);break;case 12:case 13:a=e[u++],c+=String.fromCharCode((31&o)<<6|63&a);break;case 14:a=e[u++],s=e[u++],c+=String.fromCharCode((15&o)<<12|(63&a)<<6|(63&s)<<0)}}return c},b={decodeTextFrame:m};function x(){return r||void 0===self.TextDecoder||(r=new self.TextDecoder("utf-8")),r}},"./src/demux/mp3demuxer.ts":
/*!*********************************!*\
!*** ./src/demux/mp3demuxer.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=n(/*! ./mpegaudio */"./src/demux/mpegaudio.ts");function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var l=r.prototype;return l.resetInitSegment=function(t,n,r){e.prototype.resetInitSegment.call(this,t,n,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}},r.probe=function(e){if(!e)return!1;for(var t=(i.getID3Data(e,0)||[]).length,n=e.length;t<n;t++)if(a.probe(e,t))return o.logger.log("MPEG Audio sync word found !"),!0;return!1},l.canParse=function(e,t){return a.canParse(e,t)},l.appendFrame=function(e,t,n){if(null!==this.initPTS)return a.appendFrame(e,t,n,this.initPTS,this.frameIndex)},r}(r.default);l.minProbeByteLength=4,t.default=l},"./src/demux/mp4demuxer.ts":
/*!*********************************!*\
!*** ./src/demux/mp4demuxer.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),i=n(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),o=function(){function e(e,t){this.remainderData=null,this.config=void 0,this.config=t}var t=e.prototype;return t.resetTimeStamp=function(){},t.resetInitSegment=function(){},t.resetContiguity=function(){},e.probe=function(e){return Object(r.findBox)({data:e,start:0,end:Math.min(e.length,16384)},["moof"]).length>0},t.demux=function(e){var t=e,n=Object(i.dummyTrack)();if(this.config.progressive){this.remainderData&&(t=Object(r.appendUint8Array)(this.remainderData,e));var o=Object(r.segmentValidRange)(t);this.remainderData=o.remainder,n.samples=o.valid||new Uint8Array}else n.samples=t;return{audioTrack:Object(i.dummyTrack)(),avcTrack:n,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},t.flush=function(){var e=Object(i.dummyTrack)();return e.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(i.dummyTrack)(),avcTrack:e,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},t.destroy=function(){},e}();o.minProbeByteLength=1024,t.default=o},"./src/demux/mpegaudio.ts":
/*!********************************!*\
!*** ./src/demux/mpegaudio.ts ***!
\********************************/
/*! exports provided: appendFrame, parseHeader, isHeaderPattern, isHeader, canParse, probe */function(e,t,n){"use strict";n.r(t),n.d(t,"appendFrame",(function(){return l})),n.d(t,"parseHeader",(function(){return c})),n.d(t,"isHeaderPattern",(function(){return u})),n.d(t,"isHeader",(function(){return h})),n.d(t,"canParse",(function(){return d})),n.d(t,"probe",(function(){return f}));var r=null,i=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],o=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],a=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],s=[0,1,1,4];function l(e,t,n,r,i){if(!(n+24>t.length)){var o=c(t,n);if(o&&n+o.frameLength<=t.length){var a=r+i*(9e4*o.samplesPerFrame/o.sampleRate),s={unit:t.subarray(n,n+o.frameLength),pts:a,dts:a};return e.config=[],e.channelCount=o.channelCount,e.samplerate=o.sampleRate,e.samples.push(s),{sample:s,length:o.frameLength,missing:0}}}}function c(e,t){var n=e[t+1]>>3&3,l=e[t+1]>>1&3,c=e[t+2]>>4&15,u=e[t+2]>>2&3;if(1!==n&&0!==c&&15!==c&&3!==u){var h=e[t+2]>>1&1,d=e[t+3]>>6,f=1e3*i[14*(3===n?3-l:3===l?3:4)+c-1],p=o[3*(3===n?0:2===n?1:2)+u],m=3===d?1:2,g=a[n][l],v=s[l],y=8*g*v,b=Math.floor(g*f/p+h)*v;if(null===r){var x=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);r=x?parseInt(x[1]):0}return!!r&&r<=87&&2===l&&f>=224e3&&0===d&&(e[t+3]=128|e[t+3]),{sampleRate:p,channelCount:m,frameLength:b,samplesPerFrame:y}}}function u(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function h(e,t){return t+1<e.length&&u(e,t)}function d(e,t){return u(e,t)&&4<=e.length-t}function f(e,t){if(t+1<e.length&&u(e,t)){var n=c(e,t),r=4;null!=n&&n.frameLength&&(r=n.frameLength);var i=t+r;return i===e.length||h(e,i)}return!1}},"./src/demux/sample-aes.ts":
/*!*********************************!*\
!*** ./src/demux/sample-aes.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),i=n(/*! ./tsdemuxer */"./src/demux/tsdemuxer.ts"),o=function(){function e(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new r.default(e,t,{removePKCS7Padding:!1})}var t=e.prototype;return t.decryptBuffer=function(e,t){this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,t)},t.decryptAacSample=function(e,t,n,r){var i=e[t].unit,o=i.subarray(16,i.length-i.length%16),a=o.buffer.slice(o.byteOffset,o.byteOffset+o.length),s=this;this.decryptBuffer(a,(function(o){var a=new Uint8Array(o);i.set(a,16),r||s.decryptAacSamples(e,t+1,n)}))},t.decryptAacSamples=function(e,t,n){for(;;t++){if(t>=e.length)return void n();if(!(e[t].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(e,t,n,r),!r)return}}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n},t.getAvcDecryptedUnit=function(e,t){for(var n=new Uint8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)e.set(n.subarray(r,r+16),i);return e},t.decryptAvcSample=function(e,t,n,r,o,a){var s=Object(i.discardEPB)(o.data),l=this.getAvcEncryptedData(s),c=this;this.decryptBuffer(l.buffer,(function(i){o.data=c.getAvcDecryptedUnit(s,i),a||c.decryptAvcSamples(e,t,n+1,r)}))},t.decryptAvcSamples=function(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length)return void r();for(var i=e[t].units;!(n>=i.length);n++){var o=i[n];if(!(o.data.length<=48||1!==o.type&&5!==o.type)){var a=this.decrypter.isSync();if(this.decryptAvcSample(e,t,n,r,o,a),!a)return}}}},e}();t.default=o},"./src/demux/transmuxer-interface.ts":
/*!*******************************************!*\
!*** ./src/demux/transmuxer-interface.ts ***!
\*******************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return h}));var r=n(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),u=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},h=function(){function e(e,t,n,l){var h=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=e,this.id=t,this.onTransmuxComplete=n,this.onFlush=l;var d=e.config,f=function(t,n){(n=n||{}).frag=h.frag,n.id=h.id,e.trigger(t,n)};this.observer=new c.EventEmitter,this.observer.on(i.Events.FRAG_DECRYPTED,f),this.observer.on(i.Events.ERROR,f);var p={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},m=navigator.vendor;if(d.enableWorker&&"undefined"!=typeof Worker){var g;a.logger.log("demuxing in webworker");try{g=this.worker=r(/*! ../demux/transmuxer-worker.ts */"./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(t){e.trigger(i.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(t.message+" ("+t.filename+":"+t.lineno+")")})},g.postMessage({cmd:"init",typeSupported:p,vendor:m,id:t,config:JSON.stringify(d)})}catch(e){a.logger.warn("Error in worker:",e),a.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.objectURL),this.transmuxer=new o.default(this.observer,p,d,m,t),this.worker=null}}else this.transmuxer=new o.default(this.observer,p,d,m,t)}var t=e.prototype;return t.destroy=function(){var e=this.worker;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.worker=null;else{var t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}var n=this.observer;n&&n.removeAllListeners(),this.observer=null},t.push=function(e,t,n,r,i,s,l,c,u,h){var d=this;u.transmuxing.start=self.performance.now();var f=this.transmuxer,p=this.worker,m=s?s.start:i.start,g=i.decryptdata,v=this.frag,y=!(v&&i.cc===v.cc),b=!(v&&u.level===v.level),x=v?u.sn-v.sn:-1,w=this.part?u.part-this.part.index:1,E=!b&&(1===x||0===x&&1===w),S=self.performance.now();(b||x||0===i.stats.parsing.start)&&(i.stats.parsing.start=S),!s||!w&&E||(s.stats.parsing.start=S);var C=new o.TransmuxState(y,E,c,b,m);if(!E||y){a.logger.log("[transmuxer-interface, "+i.type+"]: Starting new transmux session for sn: "+u.sn+" p: "+u.part+" level: "+u.level+" id: "+u.id+"\n discontinuity: "+y+"\n trackSwitch: "+b+"\n contiguous: "+E+"\n accurateTimeOffset: "+c+"\n timeOffset: "+m);var k=new o.TransmuxConfig(n,r,t,l,h);this.configureTransmuxer(k)}if(this.frag=i,this.part=s,p)p.postMessage({cmd:"demux",data:e,decryptdata:g,chunkMeta:u,state:C},e instanceof ArrayBuffer?[e]:[]);else if(f){var _=f.push(e,g,u,C);Object(o.isPromise)(_)?_.then((function(e){d.handleTransmuxComplete(e)})):this.handleTransmuxComplete(_)}},t.flush=function(e){var t=this;e.transmuxing.start=self.performance.now();var n=this.transmuxer,r=this.worker;if(r)r.postMessage({cmd:"flush",chunkMeta:e});else if(n){var i=n.flush(e);Object(o.isPromise)(i)?i.then((function(n){t.handleFlushResult(n,e)})):this.handleFlushResult(i,e)}},t.handleFlushResult=function(e,t){var n=this;e.forEach((function(e){n.handleTransmuxComplete(e)})),this.onFlush(t)},t.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}},t.configureTransmuxer=function(e){var t=this.worker,n=this.transmuxer;t?t.postMessage({cmd:"configure",config:e}):n&&n.configure(e)},t.handleTransmuxComplete=function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)},e}()},"./src/demux/transmuxer-worker.ts":
/*!****************************************!*\
!*** ./src/demux/transmuxer-worker.ts ***!
\****************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return s}));var r=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");function s(e){var t=new a.EventEmitter,n=function(t,n){e.postMessage({event:t,data:n})};t.on(i.Events.FRAG_DECRYPTED,n),t.on(i.Events.ERROR,n),e.addEventListener("message",(function(i){var a=i.data;switch(a.cmd){case"init":var s=JSON.parse(a.config);e.transmuxer=new r.default(t,a.typeSupported,s,a.vendor,a.id),Object(o.enableLogs)(s.debug),n("init",null);break;case"configure":e.transmuxer.configure(a.config);break;case"demux":var c=e.transmuxer.push(a.data,a.decryptdata,a.chunkMeta,a.state);Object(r.isPromise)(c)?c.then((function(t){l(e,t)})):l(e,c);break;case"flush":var h=a.chunkMeta,d=e.transmuxer.flush(h);Object(r.isPromise)(d)?d.then((function(t){u(e,t,h)})):u(e,d,h)}}))}function l(e,t){if((n=t.remuxResult).audio||n.video||n.text||n.id3||n.initSegment){var n,r=[],i=t.remuxResult,o=i.audio,a=i.video;o&&c(r,o),a&&c(r,a),e.postMessage({event:"transmuxComplete",data:t},r)}}function c(e,t){t.data1&&e.push(t.data1.buffer),t.data2&&e.push(t.data2.buffer)}function u(e,t,n){t.forEach((function(t){l(e,t)})),e.postMessage({event:"flush",data:n})}},"./src/demux/transmuxer.ts":
/*!*********************************!*\
!*** ./src/demux/transmuxer.ts ***!
\*********************************/
/*! exports provided: default, isPromise, TransmuxConfig, TransmuxState */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return y})),n.d(t,"isPromise",(function(){return x})),n.d(t,"TransmuxConfig",(function(){return w})),n.d(t,"TransmuxState",(function(){return E}));var r,i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),s=n(/*! ../demux/aacdemuxer */"./src/demux/aacdemuxer.ts"),l=n(/*! ../demux/mp4demuxer */"./src/demux/mp4demuxer.ts"),c=n(/*! ../demux/tsdemuxer */"./src/demux/tsdemuxer.ts"),u=n(/*! ../demux/mp3demuxer */"./src/demux/mp3demuxer.ts"),h=n(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),d=n(/*! ../remux/passthrough-remuxer */"./src/remux/passthrough-remuxer.ts"),f=n(/*! ./chunk-cache */"./src/demux/chunk-cache.ts"),p=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),m=n(/*! ../utils/logger */"./src/utils/logger.ts");try{r=self.performance.now.bind(self.performance)}catch(e){m.logger.debug("Unable to use Performance API on this environment"),r=self.Date.now}var g=[{demux:c.default,remux:h.default},{demux:l.default,remux:d.default},{demux:s.default,remux:h.default},{demux:u.default,remux:h.default}],v=1024;g.forEach((function(e){var t=e.demux;v=Math.max(v,t.minProbeByteLength)}));var y=function(){function e(e,t,n,r,i){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new f.default,this.observer=e,this.typeSupported=t,this.config=n,this.vendor=r,this.id=i}var t=e.prototype;return t.configure=function(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()},t.push=function(e,t,n,i){var o=this,a=n.transmuxing;a.executeStart=r();var s=new Uint8Array(e),l=this.cache,c=this.config,u=this.currentTransmuxState,h=this.transmuxConfig;i&&(this.currentTransmuxState=i);var d=function(e,t){var n=null;return e.byteLength>0&&null!=t&&null!=t.key&&null!==t.iv&&null!=t.method&&(n=t),n}(s,t);if(d&&"AES-128"===d.method){var f=this.getDecrypter();if(!c.enableSoftwareAES)return this.decryptionPromise=f.webCryptoDecrypt(s,d.key.buffer,d.iv.buffer).then((function(e){var t=o.push(e,null,n);return o.decryptionPromise=null,t})),this.decryptionPromise;var m=f.softwareDecrypt(s,d.key.buffer,d.iv.buffer);if(!m)return a.executeEnd=r(),b(n);s=new Uint8Array(m)}var g=i||u,v=g.contiguous,y=g.discontinuity,x=g.trackSwitch,w=g.accurateTimeOffset,E=g.timeOffset,S=h.audioCodec,C=h.videoCodec,k=h.defaultInitPts,_=h.duration,T=h.initSegmentData;if((y||x)&&this.resetInitSegment(T,S,C,_),y&&this.resetInitialTimestamp(k),v||this.resetContiguity(),this.needsProbing(s,y,x)){if(l.dataLength){var O=l.flush();s=Object(p.appendUint8Array)(O,s)}this.configureTransmuxer(s,h)}var A=this.transmux(s,d,E,w,n),L=this.currentTransmuxState;return L.contiguous=!0,L.discontinuity=!1,L.trackSwitch=!1,a.executeEnd=r(),A},t.flush=function(e){var t=this,n=e.transmuxing;n.executeStart=r();var a=this.decrypter,s=this.cache,l=this.currentTransmuxState,c=this.decryptionPromise;if(c)return c.then((function(){return t.flush(e)}));var u=[],h=l.timeOffset;if(a){var d=a.flush();d&&u.push(this.push(d,null,e))}var f=s.dataLength;s.reset();var p=this.demuxer,m=this.remuxer;if(!p||!m)return f>=v&&this.observer.emit(i.Events.ERROR,i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),n.executeEnd=r(),[b(e)];var g=p.flush(h);return x(g)?g.then((function(n){return t.flushRemux(u,n,e),u})):(this.flushRemux(u,g,e),u)},t.flushRemux=function(e,t,n){var i=t.audioTrack,o=t.avcTrack,a=t.id3Track,s=t.textTrack,l=this.currentTransmuxState,c=l.accurateTimeOffset,u=l.timeOffset;m.logger.log("[transmuxer.ts]: Flushed fragment "+n.sn+(n.part>-1?" p: "+n.part:"")+" of level "+n.level);var h=this.remuxer.remux(i,o,a,s,u,c,!0,this.id);e.push({remuxResult:h,chunkMeta:n}),n.transmuxing.executeEnd=r()},t.resetInitialTimestamp=function(e){var t=this.demuxer,n=this.remuxer;t&&n&&(t.resetTimeStamp(e),n.resetTimeStamp(e))},t.resetContiguity=function(){var e=this.demuxer,t=this.remuxer;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())},t.resetInitSegment=function(e,t,n,r){var i=this.demuxer,o=this.remuxer;i&&o&&(i.resetInitSegment(t,n,r),o.resetInitSegment(e,t,n))},t.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},t.transmux=function(e,t,n,r,i){return t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,n,r,i):this.transmuxUnencrypted(e,n,r,i)},t.transmuxUnencrypted=function(e,t,n,r){var i=this.demuxer.demux(e,t,!1,!this.config.progressive),o=i.audioTrack,a=i.avcTrack,s=i.id3Track,l=i.textTrack;return{remuxResult:this.remuxer.remux(o,a,s,l,t,n,!1,this.id),chunkMeta:r}},t.transmuxSampleAes=function(e,t,n,r,i){var o=this;return this.demuxer.demuxSampleAes(e,t,n).then((function(e){return{remuxResult:o.remuxer.remux(e.audioTrack,e.avcTrack,e.id3Track,e.textTrack,n,r,!1,o.id),chunkMeta:i}}))},t.configureTransmuxer=function(e,t){for(var n,r=this.config,i=this.observer,o=this.typeSupported,a=this.vendor,s=t.audioCodec,c=t.defaultInitPts,u=t.duration,h=t.initSegmentData,f=t.videoCodec,p=0,v=g.length;p<v;p++)if(g[p].demux.probe(e)){n=g[p];break}n||(m.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),n={demux:l.default,remux:d.default});var y=this.demuxer,b=this.remuxer,x=n.remux,w=n.demux;b&&b instanceof x||(this.remuxer=new x(i,r,o,a)),y&&y instanceof w||(this.demuxer=new w(i,r,o),this.probe=w.probe),this.resetInitSegment(h,s,f,u),this.resetInitialTimestamp(c)},t.needsProbing=function(e,t,n){return!this.demuxer||!this.remuxer||t||n},t.getDecrypter=function(){var e=this.decrypter;return e||(e=this.decrypter=new a.default(this.observer,this.config)),e},e}(),b=function(e){return{remuxResult:{},chunkMeta:e}};function x(e){return"then"in e&&e.then instanceof Function}var w=function(e,t,n,r,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=n,this.duration=r,this.defaultInitPts=i},E=function(e,t,n,r,i){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=r,this.timeOffset=i}},"./src/demux/tsdemuxer.ts":
/*!********************************!*\
!*** ./src/demux/tsdemuxer.ts ***!
\********************************/
/*! exports provided: discardEPB, default */function(e,t,n){"use strict";n.r(t),n.d(t,"discardEPB",(function(){return x}));var r=n(/*! ./adts */"./src/demux/adts.ts"),i=n(/*! ./mpegaudio */"./src/demux/mpegaudio.ts"),o=n(/*! ./exp-golomb */"./src/demux/exp-golomb.ts"),a=n(/*! ./id3 */"./src/demux/id3.ts"),s=n(/*! ./sample-aes */"./src/demux/sample-aes.ts"),l=n(/*! ../events */"./src/events.ts"),c=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),u=n(/*! ../utils/logger */"./src/utils/logger.ts"),h=n(/*! ../errors */"./src/errors.ts"),d={video:1,audio:2,id3:3,text:4},f=function(){function e(e,t,n){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=e,this.config=t,this.typeSupported=n}e.probe=function(t){var n=e.syncOffset(t);return!(n<0||(n&&u.logger.warn("MPEG2-TS detected but first sync word found @ offset "+n+", junk ahead ?"),0))},e.syncOffset=function(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(71===e[n]&&71===e[n+188]&&71===e[n+376])return n;n++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:d[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}};var t=e.prototype;return t.resetInitSegment=function(t,n,r){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=e.createTrack("video",r),this._audioTrack=e.createTrack("audio",r),this._id3Track=e.createTrack("id3",r),this._txtTrack=e.createTrack("text",r),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=t,this.videoCodec=n,this._duration=r},t.resetTimeStamp=function(){},t.resetContiguity=function(){var e=this._audioTrack,t=this._avcTrack,n=this._id3Track;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},t.demux=function(t,n,r,i){var o;void 0===r&&(r=!1),void 0===i&&(i=!1),r||(this.sampleAes=null);var a=this._avcTrack,s=this._audioTrack,d=this._id3Track,f=a.pid,p=a.pesData,y=s.pid,b=d.pid,x=s.pesData,w=d.pesData,E=!1,S=this.pmtParsed,C=this._pmtId,k=t.length;if(this.remainderData&&(k=(t=Object(c.appendUint8Array)(this.remainderData,t)).length,this.remainderData=null),k<188&&!i)return this.remainderData=t,{audioTrack:s,avcTrack:a,id3Track:d,textTrack:this._txtTrack};var _=Math.max(0,e.syncOffset(t));(k-=(k+_)%188)<t.byteLength&&!i&&(this.remainderData=new Uint8Array(t.buffer,k,t.buffer.byteLength-k));for(var T=_;T<k;T+=188)if(71===t[T]){var O=!!(64&t[T+1]),A=((31&t[T+1])<<8)+t[T+2],L=void 0;if((48&t[T+3])>>4>1){if((L=T+5+t[T+4])===T+188)continue}else L=T+4;switch(A){case f:O&&(p&&(o=v(p))&&this.parseAVCPES(o,!1),p={data:[],size:0}),p&&(p.data.push(t.subarray(L,T+188)),p.size+=T+188-L);break;case y:O&&(x&&(o=v(x))&&(s.isAAC?this.parseAACPES(o):this.parseMPEGPES(o)),x={data:[],size:0}),x&&(x.data.push(t.subarray(L,T+188)),x.size+=T+188-L);break;case b:O&&(w&&(o=v(w))&&this.parseID3PES(o),w={data:[],size:0}),w&&(w.data.push(t.subarray(L,T+188)),w.size+=T+188-L);break;case 0:O&&(L+=t[L]+1),C=this._pmtId=m(t,L);break;case C:O&&(L+=t[L]+1);var D=g(t,L,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,r);(f=D.avc)>0&&(a.pid=f),(y=D.audio)>0&&(s.pid=y,s.isAAC=D.isAAC),(b=D.id3)>0&&(d.pid=b),E&&!S&&(u.logger.log("reparse from beginning"),E=!1,T=_-188),S=this.pmtParsed=!0;break;case 17:case 8191:break;default:E=!0}}else this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});a.pesData=p,s.pesData=x,d.pesData=w;var I={audioTrack:s,avcTrack:a,id3Track:d,textTrack:this._txtTrack};return i&&this.extractRemainingSamples(I),I},t.flush=function(){var e,t=this.remainderData;return this.remainderData=null,e=t?this.demux(t,-1,!1,!0):{audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e},t.extractRemainingSamples=function(e){var t,n=e.audioTrack,r=e.avcTrack,i=e.id3Track,o=r.pesData,a=n.pesData,s=i.pesData;o&&(t=v(o))?(this.parseAVCPES(t,!0),r.pesData=null):r.pesData=o,a&&(t=v(a))?(n.isAAC?this.parseAACPES(t):this.parseMPEGPES(t),n.pesData=null):(null!=a&&a.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),n.pesData=a),s&&(t=v(s))?(this.parseID3PES(t),i.pesData=null):i.pesData=s},t.demuxSampleAes=function(e,t,n){var r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new s.default(this.observer,this.config,t);return this.decrypt(r,i)},t.decrypt=function(e,t){return new Promise((function(n){var r=e.audioTrack,i=e.avcTrack;r.samples&&r.isAAC?t.decryptAacSamples(r.samples,0,(function(){i.samples?t.decryptAvcSamples(i.samples,0,0,(function(){n(e)})):n(e)})):i.samples&&t.decryptAvcSamples(i.samples,0,0,(function(){n(e)}))}))},t.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},t.parseAVCPES=function(e,t){var n,r=this,i=this._avcTrack,s=this.parseAVCNALu(e.data),l=this.avcSample,c=!1;e.data=null,l&&s.length&&!i.audFound&&(y(l,i),l=this.avcSample=p(!1,e.pts,e.dts,"")),s.forEach((function(t){switch(t.type){case 1:n=!0,l||(l=r.avcSample=p(!0,e.pts,e.dts,"")),l.frame=!0;var s=t.data;if(c&&s.length>4){var u=new o.default(s).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(l.key=!0)}break;case 5:n=!0,l||(l=r.avcSample=p(!0,e.pts,e.dts,"")),l.key=!0,l.frame=!0;break;case 6:n=!0;var h=new o.default(x(t.data));h.readUByte();for(var d=0,f=0,m=!1,g=0;!m&&h.bytesAvailable>1;){d=0;do{d+=g=h.readUByte()}while(255===g);f=0;do{f+=g=h.readUByte()}while(255===g);if(4===d&&0!==h.bytesAvailable){if(m=!0,181===h.readUByte()&&49===h.readUShort()&&1195456820===h.readUInt()&&3===h.readUByte()){for(var v=h.readUByte(),w=31&v,E=[v,h.readUByte()],S=0;S<w;S++)E.push(h.readUByte()),E.push(h.readUByte()),E.push(h.readUByte());b(r._txtTrack.samples,{type:3,pts:e.pts,bytes:E})}}else if(5===d&&0!==h.bytesAvailable){if(m=!0,f>16){for(var C=[],k=0;k<16;k++)C.push(h.readUByte().toString(16)),3!==k&&5!==k&&7!==k&&9!==k||C.push("-");for(var _=f-16,T=new Uint8Array(_),O=0;O<_;O++)T[O]=h.readUByte();b(r._txtTrack.samples,{pts:e.pts,payloadType:d,uuid:C.join(""),userData:Object(a.utf8ArrayToStr)(T),userDataBytes:T})}}else if(f<h.bytesAvailable)for(var A=0;A<f;A++)h.readUByte()}break;case 7:if(n=!0,c=!0,!i.sps){var L=new o.default(t.data).readSPS();i.width=L.width,i.height=L.height,i.pixelRatio=L.pixelRatio,i.sps=[t.data],i.duration=r._duration;for(var D=t.data.subarray(1,4),I="avc1.",R=0;R<3;R++){var M=D[R].toString(16);M.length<2&&(M="0"+M),I+=M}i.codec=I}break;case 8:n=!0,i.pps||(i.pps=[t.data]);break;case 9:n=!1,i.audFound=!0,l&&y(l,i),l=r.avcSample=p(!1,e.pts,e.dts,"");break;case 12:n=!1;break;default:n=!1,l&&(l.debug+="unknown NAL "+t.type+" ")}l&&n&&l.units.push(t)})),t&&l&&(y(l,i),this.avcSample=null)},t.getLastNalUnit=function(){var e,t,n=this.avcSample;if(!n||0===n.units.length){var r=this._avcTrack.samples;n=r[r.length-1]}if(null!==(e=n)&&void 0!==e&&e.units){var i=n.units;t=i[i.length-1]}return t},t.parseAVCNALu=function(e){var t,n,r=e.byteLength,i=this._avcTrack,o=i.naluState||0,a=o,s=[],l=0,c=-1,u=0;for(-1===o&&(c=0,u=31&e[0],o=0,l=1);l<r;)if(t=e[l++],o)if(1!==o)if(t)if(1===t){if(c>=0){var h={data:e.subarray(c,l-o-1),type:u};s.push(h)}else{var d=this.getLastNalUnit();if(d&&(a&&l<=4-a&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-a)),(n=l-o-1)>0)){var f=new Uint8Array(d.data.byteLength+n);f.set(d.data,0),f.set(e.subarray(0,n),d.data.byteLength),d.data=f,d.state=0}}l<r?(c=l,u=31&e[l],o=0):o=-1}else o=0;else o=3;else o=t?0:2;else o=t?0:1;if(c>=0&&o>=0){var p={data:e.subarray(c,r),type:u,state:o};s.push(p)}if(0===s.length){var m=this.getLastNalUnit();if(m){var g=new Uint8Array(m.data.byteLength+e.byteLength);g.set(m.data,0),g.set(e,m.data.byteLength),m.data=g}}return i.naluState=o,s},t.parseAACPES=function(e){var t,n,i,o,a,s=0,c=this._audioTrack,d=this.aacOverFlow,f=e.data;if(d){this.aacOverFlow=null;var p=d.sample.unit.byteLength,m=Math.min(d.missing,p),g=p-m;d.sample.unit.set(f.subarray(0,m),g),c.samples.push(d.sample),s=d.missing}for(t=s,n=f.length;t<n-1&&!r.isHeader(f,t);t++);if(t===s||(t<n-1?(i="AAC PES did not start with ADTS header,offset:"+t,o=!1):(i="no ADTS header found in AAC PES",o=!0),u.logger.warn("parsing error:"+i),this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:o,reason:i}),!o)){if(r.initTrackConfig(c,this.observer,f,t,this.audioCodec),void 0!==e.pts)a=e.pts;else{if(!d)return void u.logger.warn("[tsdemuxer]: AAC PES unknown PTS");var v=r.getFrameDuration(c.samplerate);a=d.sample.pts+v}for(var y=0;t<n;){if(r.isHeader(f,t)){if(t+5<n){var b=r.appendFrame(c,f,t,a,y);if(b){if(!b.missing){t+=b.length,y++;continue}this.aacOverFlow=b}}break}t++}}},t.parseMPEGPES=function(e){var t=e.data,n=t.length,r=0,o=0,a=e.pts;if(void 0!==a)for(;o<n;)if(i.isHeader(t,o)){var s=i.appendFrame(this._audioTrack,t,o,a,r);if(!s)break;o+=s.length,r++}else o++;else u.logger.warn("[tsdemuxer]: MPEG PES unknown PTS")},t.parseID3PES=function(e){void 0!==e.pts?this._id3Track.samples.push(e):u.logger.warn("[tsdemuxer]: ID3 PES unknown PTS")},e}();function p(e,t,n,r){return{key:e,frame:!1,pts:t,dts:n,units:[],debug:r,length:0}}function m(e,t){return(31&e[t+10])<<8|e[t+11]}function g(e,t,n,r){var i={audio:-1,avc:-1,id3:-1,isAAC:!0},o=t+3+((15&e[t+1])<<8|e[t+2])-4;for(t+=12+((15&e[t+10])<<8|e[t+11]);t<o;){var a=(31&e[t+1])<<8|e[t+2];switch(e[t]){case 207:if(!r){u.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:-1===i.audio&&(i.audio=a);break;case 21:-1===i.id3&&(i.id3=a);break;case 219:if(!r){u.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:-1===i.avc&&(i.avc=a);break;case 3:case 4:n?-1===i.audio&&(i.audio=a,i.isAAC=!1):u.logger.log("MPEG audio found, not supported in this browser");break;case 36:u.logger.warn("Unsupported HEVC stream type found")}t+=5+((15&e[t+3])<<8|e[t+4])}return i}function v(e){var t,n,r,i,o,a=0,s=e.data;if(!e||0===e.size)return null;for(;s[0].length<19&&s.length>1;){var l=new Uint8Array(s[0].length+s[1].length);l.set(s[0]),l.set(s[1],s[0].length),s[0]=l,s.splice(1,1)}if(1===((t=s[0])[0]<<16)+(t[1]<<8)+t[2]){if((n=(t[4]<<8)+t[5])&&n>e.size-6)return null;var c=t[7];192&c&&(i=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&c?i-(o=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>54e5&&(u.logger.warn(Math.round((i-o)/9e4)+"s delta between PTS and DTS, align them"),i=o):o=i);var h=(r=t[8])+9;if(e.size<=h)return null;e.size-=h;for(var d=new Uint8Array(e.size),f=0,p=s.length;f<p;f++){var m=(t=s[f]).byteLength;if(h){if(h>m){h-=m;continue}t=t.subarray(h),m-=h,h=0}d.set(t,a),a+=m}return n&&(n-=r+3),{data:d,pts:i,dts:o,len:n}}return null}function y(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){var n=t.samples,r=n.length;if(!r)return void t.dropped++;var i=n[r-1];e.pts=i.pts,e.dts=i.dts}t.samples.push(e)}e.debug.length&&u.logger.log(e.pts+"/"+e.dts+":"+e.debug)}function b(e,t){var n=e.length;if(n>0){if(t.pts>=e[n-1].pts)e.push(t);else for(var r=n-1;r>=0;r--)if(t.pts<e[r].pts){e.splice(r,0,t);break}}else e.push(t)}function x(e){for(var t=e.byteLength,n=[],r=1;r<t-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;var i=t-n.length,o=new Uint8Array(i),a=0;for(r=0;r<i;a++,r++)a===n[0]&&(a++,n.shift()),o[r]=e[a];return o}f.minProbeByteLength=188,t.default=f},"./src/errors.ts":
/*!***********************!*\
!*** ./src/errors.ts ***!
\***********************/
/*! exports provided: ErrorTypes, ErrorDetails */function(e,t,n){"use strict";var r,i;n.r(t),n.d(t,"ErrorTypes",(function(){return r})),n.d(t,"ErrorDetails",(function(){return i})),function(e){e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError"}(r||(r={})),function(e){e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_EMPTY_ERROR="levelEmptyError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",e.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException",e.INTERNAL_ABORTED="aborted",e.UNKNOWN="unknown"}(i||(i={}))},"./src/events.ts":
/*!***********************!*\
!*** ./src/events.ts ***!
\***********************/
/*! exports provided: Events */function(e,t,n){"use strict";var r;n.r(t),n.d(t,"Events",(function(){return r})),function(e){e.MEDIA_ATTACHING="hlsMediaAttaching",e.MEDIA_ATTACHED="hlsMediaAttached",e.MEDIA_DETACHING="hlsMediaDetaching",e.MEDIA_DETACHED="hlsMediaDetached",e.BUFFER_RESET="hlsBufferReset",e.BUFFER_CODECS="hlsBufferCodecs",e.BUFFER_CREATED="hlsBufferCreated",e.BUFFER_APPENDING="hlsBufferAppending",e.BUFFER_APPENDED="hlsBufferAppended",e.BUFFER_EOS="hlsBufferEos",e.BUFFER_FLUSHING="hlsBufferFlushing",e.BUFFER_FLUSHED="hlsBufferFlushed",e.MANIFEST_LOADING="hlsManifestLoading",e.MANIFEST_LOADED="hlsManifestLoaded",e.MANIFEST_PARSED="hlsManifestParsed",e.LEVEL_SWITCHING="hlsLevelSwitching",e.LEVEL_SWITCHED="hlsLevelSwitched",e.LEVEL_LOADING="hlsLevelLoading",e.LEVEL_LOADED="hlsLevelLoaded",e.LEVEL_UPDATED="hlsLevelUpdated",e.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",e.LEVELS_UPDATED="hlsLevelsUpdated",e.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",e.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",e.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",e.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",e.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",e.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",e.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",e.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",e.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",e.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",e.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",e.CUES_PARSED="hlsCuesParsed",e.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",e.INIT_PTS_FOUND="hlsInitPtsFound",e.FRAG_LOADING="hlsFragLoading",e.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",e.FRAG_LOADED="hlsFragLoaded",e.FRAG_DECRYPTED="hlsFragDecrypted",e.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",e.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",e.FRAG_PARSING_METADATA="hlsFragParsingMetadata",e.FRAG_PARSED="hlsFragParsed",e.FRAG_BUFFERED="hlsFragBuffered",e.FRAG_CHANGED="hlsFragChanged",e.FPS_DROP="hlsFpsDrop",e.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",e.ERROR="hlsError",e.DESTROYING="hlsDestroying",e.KEY_LOADING="hlsKeyLoading",e.KEY_LOADED="hlsKeyLoaded",e.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",e.BACK_BUFFER_REACHED="hlsBackBufferReached"}(r||(r={}))},"./src/hls.ts":
/*!********************!*\
!*** ./src/hls.ts ***!
\********************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return y}));var r=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),i=n(/*! ./loader/playlist-loader */"./src/loader/playlist-loader.ts"),o=n(/*! ./loader/key-loader */"./src/loader/key-loader.ts"),a=n(/*! ./controller/id3-track-controller */"./src/controller/id3-track-controller.ts"),s=n(/*! ./controller/latency-controller */"./src/controller/latency-controller.ts"),l=n(/*! ./controller/level-controller */"./src/controller/level-controller.ts"),c=n(/*! ./controller/fragment-tracker */"./src/controller/fragment-tracker.ts"),u=n(/*! ./controller/stream-controller */"./src/controller/stream-controller.ts"),h=n(/*! ./is-supported */"./src/is-supported.ts"),d=n(/*! ./utils/logger */"./src/utils/logger.ts"),f=n(/*! ./config */"./src/config.ts"),p=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),m=n(/*! ./events */"./src/events.ts"),g=n(/*! ./errors */"./src/errors.ts");function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var y=function(){function e(t){void 0===t&&(t={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new p.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var n=this.config=Object(f.mergeConfig)(e.DefaultConfig,t);this.userConfig=t,Object(d.enableLogs)(n.debug),this._autoLevelCapping=-1,n.progressive&&Object(f.enableStreamingMode)(n);var r=n.abrController,h=n.bufferController,m=n.capLevelController,g=n.fpsController,v=this.abrController=new r(this),y=this.bufferController=new h(this),b=this.capLevelController=new m(this),x=new g(this),w=new i.default(this),E=new o.default(this),S=new a.default(this),C=this.levelController=new l.default(this),k=new c.FragmentTracker(this),_=this.streamController=new u.default(this,k);b.setStreamController(_),x.setStreamController(_);var T=[C,_];this.networkControllers=T;var O=[w,E,v,y,b,x,S,k];this.audioTrackController=this.createController(n.audioTrackController,null,T),this.createController(n.audioStreamController,k,T),this.subtitleTrackController=this.createController(n.subtitleTrackController,null,T),this.createController(n.subtitleStreamController,k,T),this.createController(n.timelineController,null,O),this.emeController=this.createController(n.emeController,null,O),this.cmcdController=this.createController(n.cmcdController,null,O),this.latencyController=this.createController(s.default,null,O),this.coreComponents=O}e.isSupported=function(){return Object(h.isSupported)()};var t,n,y,b=e.prototype;return b.createController=function(e,t,n){if(e){var r=t?new e(this,t):new e(this);return n&&n.push(r),r}return null},b.on=function(e,t,n){void 0===n&&(n=this),this._emitter.on(e,t,n)},b.once=function(e,t,n){void 0===n&&(n=this),this._emitter.once(e,t,n)},b.removeAllListeners=function(e){this._emitter.removeAllListeners(e)},b.off=function(e,t,n,r){void 0===n&&(n=this),this._emitter.off(e,t,n,r)},b.listeners=function(e){return this._emitter.listeners(e)},b.emit=function(e,t,n){return this._emitter.emit(e,t,n)},b.trigger=function(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){d.logger.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.trigger(m.Events.ERROR,{type:g.ErrorTypes.OTHER_ERROR,details:g.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:e,error:t})}return!1},b.listenerCount=function(e){return this._emitter.listenerCount(e)},b.destroy=function(){d.logger.log("destroy"),this.trigger(m.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((function(e){return e.destroy()})),this.networkControllers.length=0,this.coreComponents.forEach((function(e){return e.destroy()})),this.coreComponents.length=0},b.attachMedia=function(e){d.logger.log("attachMedia"),this._media=e,this.trigger(m.Events.MEDIA_ATTACHING,{media:e})},b.detachMedia=function(){d.logger.log("detachMedia"),this.trigger(m.Events.MEDIA_DETACHING,void 0),this._media=null},b.loadSource=function(e){this.stopLoad();var t=this.media,n=this.url,i=this.url=r.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});d.logger.log("loadSource:"+i),t&&n&&n!==i&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(t)),this.trigger(m.Events.MANIFEST_LOADING,{url:e})},b.startLoad=function(e){void 0===e&&(e=-1),d.logger.log("startLoad("+e+")"),this.networkControllers.forEach((function(t){t.startLoad(e)}))},b.stopLoad=function(){d.logger.log("stopLoad"),this.networkControllers.forEach((function(e){e.stopLoad()}))},b.swapAudioCodec=function(){d.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},b.recoverMediaError=function(){d.logger.log("recoverMediaError");var e=this._media;this.detachMedia(),e&&this.attachMedia(e)},b.removeLevel=function(e,t){void 0===t&&(t=0),this.levelController.removeLevel(e,t)},t=e,y=[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return m.Events}},{key:"ErrorTypes",get:function(){return g.ErrorTypes}},{key:"ErrorDetails",get:function(){return g.ErrorDetails}},{key:"DefaultConfig",get:function(){return e.defaultConfig?e.defaultConfig:f.hlsDefaultConfig},set:function(t){e.defaultConfig=t}}],(n=[{key:"levels",get:function(){var e=this.levelController.levels;return e||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){d.logger.log("set currentLevel:"+e),this.loadLevel=e,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){d.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){d.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){d.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){d.logger.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(e){var t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){this._autoLevelCapping!==e&&(d.logger.log("set autoLevelCapping:"+e),this._autoLevelCapping=e)}},{key:"bandwidthEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var e=this.levels,t=this.config.minAutoBitrate;if(!e)return 0;for(var n=e.length,r=0;r<n;r++)if(e[r].maxBitrate>t)return r;return 0}},{key:"maxAutoLevel",get:function(){var e=this.levels,t=this.autoLevelCapping;return-1===t&&e&&e.length?e.length-1:t}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(e){this.config.lowLatencyMode=e}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}])&&v(t.prototype,n),y&&v(t,y),e}();y.defaultConfig=void 0},"./src/is-supported.ts":
/*!*****************************!*\
!*** ./src/is-supported.ts ***!
\*****************************/
/*! exports provided: isSupported, changeTypeSupported */function(e,t,n){"use strict";n.r(t),n.d(t,"isSupported",(function(){return o})),n.d(t,"changeTypeSupported",(function(){return a}));var r=n(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.ts");function i(){return self.SourceBuffer||self.WebKitSourceBuffer}function o(){var e=Object(r.getMediaSource)();if(!e)return!1;var t=i(),n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),o=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!o}function a(){var e,t=i();return"function"==typeof(null==t||null===(e=t.prototype)||void 0===e?void 0:e.changeType)}},"./src/loader/fragment-loader.ts":
/*!***************************************!*\
!*** ./src/loader/fragment-loader.ts ***!
\***************************************/
/*! exports provided: default, LoadError */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return h})),n.d(t,"LoadError",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../errors */"./src/errors.ts");function o(e){var t="function"==typeof Map?new Map:void 0;return(o=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return a(e,arguments,c(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,e)})(e)}function a(e,t,n){return(a=s()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&l(i,n.prototype),i}).apply(null,arguments)}function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=Math.pow(2,17),h=function(){function e(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}var t=e.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(e,t){var n=this,r=e.url;if(!r)return Promise.reject(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,networkDetails:null},"Fragment does not have a "+(r?"part list":"url")));this.abort();var o=this.config,a=o.fLoader,s=o.loader;return new Promise((function(r,l){n.loader&&n.loader.destroy();var c=n.loader=e.loader=a?new a(o):new s(o),h=d(e),p={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:o.fragLoadingMaxRetryTimeout,highWaterMark:u};e.stats=c.stats,c.load(h,p,{onSuccess:function(t,i,o,a){n.resetLoader(e,c),r({frag:e,part:null,payload:t.data,networkDetails:a})},onError:function(t,r,o){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:t,networkDetails:o}))},onAbort:function(t,r,o){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,networkDetails:o}))},onTimeout:function(t,r,o){n.resetLoader(e,c),l(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,networkDetails:o}))},onProgress:function(n,r,i,o){t&&t({frag:e,part:null,payload:i,networkDetails:o})}})}))},t.loadPart=function(e,t,n){var r=this;this.abort();var o=this.config,a=o.fLoader,s=o.loader;return new Promise((function(l,c){r.loader&&r.loader.destroy();var h=r.loader=e.loader=a?new a(o):new s(o),p=d(e,t),m={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:o.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=h.stats,h.load(p,m,{onSuccess:function(i,o,a,s){r.resetLoader(e,h),r.updateStatsFromPart(e,t);var c={frag:e,part:t,payload:i.data,networkDetails:s};n(c),l(c)},onError:function(n,o,a){r.resetLoader(e,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:n,networkDetails:a}))},onAbort:function(n,o,a){e.stats.aborted=t.stats.aborted,r.resetLoader(e,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,networkDetails:a}))},onTimeout:function(n,o,a){r.resetLoader(e,h),c(new f({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,networkDetails:a}))}})}))},t.updateStatsFromPart=function(e,t){var n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){var o=Math.round(e.duration/t.duration),a=Math.min(Math.round(n.loaded/i),o),s=(o-a)*Math.round(n.loaded/a);n.total=n.loaded+s}else n.total=Math.max(n.loaded,n.total);var l=n.loading,c=r.loading;l.start?l.first+=c.first-c.start:(l.start=c.start,l.first=c.first),l.end=c.end},t.resetLoader=function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()},e}();function d(e,t){void 0===t&&(t=null);var n=t||e,i={frag:e,part:t,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},o=n.byteRangeStartOffset,a=n.byteRangeEndOffset;return Object(r.isFiniteNumber)(o)&&Object(r.isFiniteNumber)(a)&&(i.rangeStart=o,i.rangeEnd=a),i}var f=function(e){var t,n;function r(t){for(var n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return(n=e.call.apply(e,[this].concat(i))||this).data=void 0,n.data=t,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n),r}(o(Error))},"./src/loader/fragment.ts":
/*!********************************!*\
!*** ./src/loader/fragment.ts ***!
\********************************/
/*! exports provided: ElementaryStreamTypes, BaseSegment, Fragment, Part */function(e,t,n){"use strict";n.r(t),n.d(t,"ElementaryStreamTypes",(function(){return r})),n.d(t,"BaseSegment",(function(){return f})),n.d(t,"Fragment",(function(){return p})),n.d(t,"Part",(function(){return m}));var r,i=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),o=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ./level-key */"./src/loader/level-key.ts"),l=n(/*! ./load-stats */"./src/loader/load-stats.ts");function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,u(e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),e}!function(e){e.AUDIO="audio",e.VIDEO="video",e.AUDIOVIDEO="audiovideo"}(r||(r={}));var f=function(){function e(e){var t;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=((t={})[r.AUDIO]=null,t[r.VIDEO]=null,t[r.AUDIOVIDEO]=null,t),this.baseurl=e}return e.prototype.setByteRange=function(e,t){var n=e.split("@",2),r=[];1===n.length?r[0]=t?t.byteRangeEndOffset:0:r[0]=parseInt(n[1]),r[1]=parseInt(n[0])+r[0],this._byteRange=r},d(e,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(o.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(e){this._url=e}}]),e}(),p=function(e){function t(t,n){var r;return(r=e.call(this,n)||this)._decryptdata=null,r.rawProgramDateTime=null,r.programDateTime=null,r.tagList=[],r.duration=0,r.sn=0,r.levelkey=void 0,r.type=void 0,r.loader=null,r.level=-1,r.cc=0,r.startPTS=void 0,r.endPTS=void 0,r.appendedPTS=void 0,r.startDTS=void 0,r.endDTS=void 0,r.start=0,r.deltaPTS=void 0,r.maxStartPTS=void 0,r.minEndPTS=void 0,r.stats=new l.LoadStats,r.urlId=0,r.data=void 0,r.bitrateTest=!1,r.title=null,r.initSegment=null,r.type=t,r}c(t,e);var n=t.prototype;return n.createInitializationVector=function(e){for(var t=new Uint8Array(16),n=12;n<16;n++)t[n]=e>>8*(15-n)&255;return t},n.setDecryptDataFromLevelKey=function(e,t){var n=e;return"AES-128"===(null==e?void 0:e.method)&&e.uri&&!e.iv&&((n=s.LevelKey.fromURI(e.uri)).method=e.method,n.iv=this.createInitializationVector(t),n.keyFormat="identity"),n},n.setElementaryStreamInfo=function(e,t,n,r,i,o){void 0===o&&(o=!1);var a=this.elementaryStreams,s=a[e];s?(s.startPTS=Math.min(s.startPTS,t),s.endPTS=Math.max(s.endPTS,n),s.startDTS=Math.min(s.startDTS,r),s.endDTS=Math.max(s.endDTS,i)):a[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:o}},n.clearElementaryStreamInfo=function(){var e=this.elementaryStreams;e[r.AUDIO]=null,e[r.VIDEO]=null,e[r.AUDIOVIDEO]=null},d(t,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var e=this.sn;"number"!=typeof e&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&a.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),e=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,e)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(i.isFiniteNumber)(this.programDateTime))return null;var e=Object(i.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){var e;return!(null===(e=this.decryptdata)||void 0===e||!e.keyFormat||!this.decryptdata.uri)}}]),t}(f),m=function(e){function t(t,n,r,i,o){var a;(a=e.call(this,r)||this).fragOffset=0,a.duration=0,a.gap=!1,a.independent=!1,a.relurl=void 0,a.fragment=void 0,a.index=void 0,a.stats=new l.LoadStats,a.duration=t.decimalFloatingPoint("DURATION"),a.gap=t.bool("GAP"),a.independent=t.bool("INDEPENDENT"),a.relurl=t.enumeratedString("URI"),a.fragment=n,a.index=i;var s=t.enumeratedString("BYTERANGE");return s&&a.setByteRange(s,o),o&&(a.fragOffset=o.fragOffset+o.duration),a}return c(t,e),d(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var e=this.elementaryStreams;return!!(e.audio||e.video||e.audiovideo)}}]),t}(f)},"./src/loader/key-loader.ts":
/*!**********************************!*\
!*** ./src/loader/key-loader.ts ***!
\**********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return a}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=function(){function e(e){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){this.hls.on(r.Events.KEY_LOADING,this.onKeyLoading,this)},t._unregisterListeners=function(){this.hls.off(r.Events.KEY_LOADING,this.onKeyLoading)},t.destroy=function(){for(var e in this._unregisterListeners(),this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={}},t.onKeyLoading=function(e,t){var n=t.frag,i=n.type,a=this.loaders[i];if(n.decryptdata){var s=n.decryptdata.uri;if(s!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;if(a&&(o.logger.warn("abort previous key loader for type:"+i),a.abort()),!s)return void o.logger.warn("key uri is falsy");var c=l.loader,u=n.loader=this.loaders[i]=new c(l);this.decrypturl=s,this.decryptkey=null;var h={url:s,frag:n,responseType:"arraybuffer"},d={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},f={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(h,d,f)}else this.decryptkey&&(n.decryptdata.key=this.decryptkey,this.hls.trigger(r.Events.KEY_LOADED,{frag:n}))}else o.logger.warn("Missing decryption data on fragment in onKeyLoading")},t.loadsuccess=function(e,t,n){var i=n.frag;i.decryptdata?(this.decryptkey=i.decryptdata.key=new Uint8Array(e.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(r.Events.KEY_LOADED,{frag:i})):o.logger.error("after key load, decryptdata unset")},t.loaderror=function(e,t){var n=t.frag,o=n.loader;o&&o.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:e})},t.loadtimeout=function(e,t){var n=t.frag,o=n.loader;o&&o.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},e}()},"./src/loader/level-details.ts":
/*!*************************************!*\
!*** ./src/loader/level-details.ts ***!
\*************************************/
/*! exports provided: LevelDetails */function(e,t,n){"use strict";n.r(t),n.d(t,"LevelDetails",(function(){return o}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts");function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=function(){function e(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=e}var t,n,o;return e.prototype.reloaded=function(e){if(!e)return this.advanced=!0,void(this.updated=!0);var t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t,this.advanced=this.endSN>e.endSN||t>0||0===t&&n>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay},t=e,(n=[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&Object(r.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var e=this.driftEndTime-this.driftStartTime;return e>0?1e3*(this.driftEnd-this.driftStart)/e:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var e;return null!==(e=this.fragments)&&void 0!==e&&e.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&i(t.prototype,n),o&&i(t,o),e}()},"./src/loader/level-key.ts":
/*!*********************************!*\
!*** ./src/loader/level-key.ts ***!
\*********************************/
/*! exports provided: LevelKey */function(e,t,n){"use strict";n.r(t),n.d(t,"LevelKey",(function(){return o}));var r=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js");function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=function(){function e(e,t){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,this._uri=t?Object(r.buildAbsoluteURL)(e,t,{alwaysNormalize:!0}):e}var t,n,o;return e.fromURL=function(t,n){return new e(t,n)},e.fromURI=function(t){return new e(t)},t=e,(n=[{key:"uri",get:function(){return this._uri}}])&&i(t.prototype,n),o&&i(t,o),e}()},"./src/loader/load-stats.ts":
/*!**********************************!*\
!*** ./src/loader/load-stats.ts ***!
\**********************************/
/*! exports provided: LoadStats */function(e,t,n){"use strict";n.r(t),n.d(t,"LoadStats",(function(){return r}));var r=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":
/*!***********************************!*\
!*** ./src/loader/m3u8-parser.ts ***!
\***********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return g}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),o=n(/*! ./fragment */"./src/loader/fragment.ts"),a=n(/*! ./level-details */"./src/loader/level-details.ts"),s=n(/*! ./level-key */"./src/loader/level-key.ts"),l=n(/*! ../utils/attr-list */"./src/utils/attr-list.ts"),c=n(/*! ../utils/logger */"./src/utils/logger.ts"),u=n(/*! ../utils/codecs */"./src/utils/codecs.ts"),h=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,d=/#EXT-X-MEDIA:(.*)/g,f=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),p=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),m=/\.(mp4|m4s|m4v|m4a)$/i,g=function(){function e(){}return e.findGroup=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.id===t)return r}},e.convertAVC1ToAVCOTI=function(e){var t=e.split(".");if(t.length>2){var n=t.shift()+".";return n+=parseInt(t.shift()).toString(16),n+=("000"+parseInt(t.shift()).toString(16)).substr(-4)}return e},e.resolve=function(e,t){return i.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.parseMasterPlaylist=function(t,n){var r,i=[],o={},a=!1;for(h.lastIndex=0;null!=(r=h.exec(t));)if(r[1]){var s=new l.AttrList(r[1]),c={attrs:s,bitrate:s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),name:s.NAME,url:e.resolve(r[2],n)},u=s.decimalResolution("RESOLUTION");u&&(c.width=u.width,c.height=u.height),v((s.CODECS||"").split(/[ ,]+/).filter((function(e){return e})),c),c.videoCodec&&-1!==c.videoCodec.indexOf("avc1")&&(c.videoCodec=e.convertAVC1ToAVCOTI(c.videoCodec)),i.push(c)}else if(r[3]){var d=new l.AttrList(r[3]);d["DATA-ID"]&&(a=!0,o[d["DATA-ID"]]=d)}return{levels:i,sessionData:a?o:null}},e.parseMasterPlaylistMedia=function(t,n,r,i){var o;void 0===i&&(i=[]);var a=[],s=0;for(d.lastIndex=0;null!==(o=d.exec(t));){var c=new l.AttrList(o[1]);if(c.TYPE===r){var u={attrs:c,bitrate:0,id:s++,groupId:c["GROUP-ID"],instreamId:c["INSTREAM-ID"],name:c.NAME||c.LANGUAGE||"",type:r,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:c.LANGUAGE,url:c.URI?e.resolve(c.URI,n):""};if(i.length){var h=e.findGroup(i,u.groupId)||i[0];y(u,h,"audioCodec"),y(u,h,"textCodec")}a.push(u)}}return a},e.parseLevelPlaylist=function(e,t,n,u,h){var d,g,v,y=new a.LevelDetails(t),x=y.fragments,w=null,E=0,S=0,C=0,k=0,_=null,T=new o.Fragment(u,t),O=-1,A=!1;for(f.lastIndex=0,y.m3u8=e;null!==(d=f.exec(e));){A&&(A=!1,(T=new o.Fragment(u,t)).start=C,T.sn=E,T.cc=k,T.level=n,w&&(T.initSegment=w,T.rawProgramDateTime=w.rawProgramDateTime));var L=d[1];if(L){T.duration=parseFloat(L);var D=(" "+d[2]).slice(1);T.title=D||null,T.tagList.push(D?["INF",L,D]:["INF",L])}else if(d[3])Object(r.isFiniteNumber)(T.duration)&&(T.start=C,v&&(T.levelkey=v),T.sn=E,T.level=n,T.cc=k,T.urlId=h,x.push(T),T.relurl=(" "+d[3]).slice(1),b(T,_),_=T,C+=T.duration,E++,S=0,A=!0);else if(d[4]){var I=(" "+d[4]).slice(1);_?T.setByteRange(I,_):T.setByteRange(I)}else if(d[5])T.rawProgramDateTime=(" "+d[5]).slice(1),T.tagList.push(["PROGRAM-DATE-TIME",T.rawProgramDateTime]),-1===O&&(O=x.length);else{if(!(d=d[0].match(p))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(g=1;g<d.length&&void 0===d[g];g++);var R=(" "+d[g]).slice(1),M=(" "+d[g+1]).slice(1),N=d[g+2]?(" "+d[g+2]).slice(1):"";switch(R){case"PLAYLIST-TYPE":y.type=M.toUpperCase();break;case"MEDIA-SEQUENCE":E=y.startSN=parseInt(M);break;case"SKIP":var j=new l.AttrList(M),P=j.decimalInteger("SKIPPED-SEGMENTS");if(Object(r.isFiniteNumber)(P)){y.skippedSegments=P;for(var B=P;B--;)x.unshift(null);E+=P}var F=j.enumeratedString("RECENTLY-REMOVED-DATERANGES");F&&(y.recentlyRemovedDateranges=F.split("\t"));break;case"TARGETDURATION":y.targetduration=parseFloat(M);break;case"VERSION":y.version=parseInt(M);break;case"EXTM3U":break;case"ENDLIST":y.live=!1;break;case"#":(M||N)&&T.tagList.push(N?[M,N]:[M]);break;case"DIS":k++;case"GAP":T.tagList.push([R]);break;case"BITRATE":T.tagList.push([R,M]);break;case"DISCONTINUITY-SEQ":k=parseInt(M);break;case"KEY":var U,H=new l.AttrList(M),z=H.enumeratedString("METHOD"),G=H.URI,V=H.hexadecimalInteger("IV"),W=H.enumeratedString("KEYFORMATVERSIONS"),K=H.enumeratedString("KEYID"),q=null!=(U=H.enumeratedString("KEYFORMAT"))?U:"identity";if(["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"].indexOf(q)>-1){c.logger.warn("Keyformat "+q+" is not supported from the manifest");continue}if("identity"!==q)continue;z&&(v=s.LevelKey.fromURL(t,G),G&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(z)>=0&&(v.method=z,v.keyFormat=q,K&&(v.keyID=K),W&&(v.keyFormatVersions=W),v.iv=V));break;case"START":var X=new l.AttrList(M).decimalFloatingPoint("TIME-OFFSET");Object(r.isFiniteNumber)(X)&&(y.startTimeOffset=X);break;case"MAP":var Y=new l.AttrList(M);T.relurl=Y.URI,Y.BYTERANGE&&T.setByteRange(Y.BYTERANGE),T.level=n,T.sn="initSegment",v&&(T.levelkey=v),T.initSegment=null,w=T,A=!0;break;case"SERVER-CONTROL":var $=new l.AttrList(M);y.canBlockReload=$.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=$.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&$.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=$.optionalFloat("PART-HOLD-BACK",0),y.holdBack=$.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var J=new l.AttrList(M);y.partTarget=J.decimalFloatingPoint("PART-TARGET");break;case"PART":var Z=y.partList;Z||(Z=y.partList=[]);var Q=S>0?Z[Z.length-1]:void 0,ee=S++,te=new o.Part(new l.AttrList(M),T,t,ee,Q);Z.push(te),T.duration+=te.duration;break;case"PRELOAD-HINT":var ne=new l.AttrList(M);y.preloadHint=ne;break;case"RENDITION-REPORT":var re=new l.AttrList(M);y.renditionReports=y.renditionReports||[],y.renditionReports.push(re);break;default:c.logger.warn("line parsed but not handled: "+d)}}}_&&!_.relurl?(x.pop(),C-=_.duration,y.partList&&(y.fragmentHint=_)):y.partList&&(b(T,_),T.cc=k,y.fragmentHint=T);var ie=x.length,oe=x[0],ae=x[ie-1];if((C+=y.skippedSegments*y.targetduration)>0&&ie&&ae){y.averagetargetduration=C/ie;var se=ae.sn;y.endSN="initSegment"!==se?se:0,oe&&(y.startCC=oe.cc,oe.initSegment||y.fragments.every((function(e){return e.relurl&&(t=e.relurl,m.test(null!=(n=null===(r=i.parseURL(t))||void 0===r?void 0:r.path)?n:""));var t,n,r}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(T=new o.Fragment(u,t)).relurl=ae.relurl,T.level=n,T.sn="initSegment",oe.initSegment=T,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(C+=y.fragmentHint.duration),y.totalduration=C,y.endCC=k,O>0&&function(e,t){for(var n=e[t],r=t;r--;){var i=e[r];if(!i)return;i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}(x,O),y},e}();function v(e,t){["video","audio","text"].forEach((function(n){var r=e.filter((function(e){return Object(u.isCodecType)(e,n)}));if(r.length){var i=r.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[n+"Codec"]=i.length>0?i[0]:r[0],e=e.filter((function(e){return-1===r.indexOf(e)}))}})),t.unknownCodecs=e}function y(e,t,n){var r=t[n];r&&(e[n]=r)}function b(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),Object(r.isFiniteNumber)(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":
/*!***************************************!*\
!*** ./src/loader/playlist-loader.ts ***!
\***************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),o=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=n(/*! ./m3u8-parser */"./src/loader/m3u8-parser.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/attr-list */"./src/utils/attr-list.ts");function h(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n}var d=function(){function e(e){this.hls=void 0,this.loaders=Object.create(null),this.hls=e,this.registerListeners()}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(i.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.unregisterListeners=function(){var e=this.hls;e.off(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(i.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.createInternalLoader=function(e){var t=this.hls.config,n=t.pLoader,r=t.loader,i=new(n||r)(t);return e.loader=i,this.loaders[e.type]=i,i},t.getInternalLoader=function(e){return this.loaders[e.type]},t.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},t.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},t.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},t.onManifestLoading=function(e,t){var n=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:c.PlaylistContextType.MANIFEST,url:n,deliveryDirectives:null})},t.onLevelLoading=function(e,t){var n=t.id,r=t.level,i=t.url,o=t.deliveryDirectives;this.load({id:n,groupId:null,level:r,responseType:"text",type:c.PlaylistContextType.LEVEL,url:i,deliveryDirectives:o})},t.onAudioTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,o=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:i,deliveryDirectives:o})},t.onSubtitleTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,o=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:i,deliveryDirectives:o})},t.load=function(e){var t,n,r,i,o,s,l=this.hls.config,u=this.getInternalLoader(e);if(u){var h=u.context;if(h&&h.url===e.url)return void a.logger.trace("[playlist-loader]: playlist request ongoing");a.logger.log("[playlist-loader]: aborting previous loader for type: "+e.type),u.abort()}switch(e.type){case c.PlaylistContextType.MANIFEST:n=l.manifestLoadingMaxRetry,r=l.manifestLoadingTimeOut,i=l.manifestLoadingRetryDelay,o=l.manifestLoadingMaxRetryTimeout;break;case c.PlaylistContextType.LEVEL:case c.PlaylistContextType.AUDIO_TRACK:case c.PlaylistContextType.SUBTITLE_TRACK:n=0,r=l.levelLoadingTimeOut;break;default:n=l.levelLoadingMaxRetry,r=l.levelLoadingTimeOut,i=l.levelLoadingRetryDelay,o=l.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(e),null!==(t=e.deliveryDirectives)&&void 0!==t&&t.part&&(e.type===c.PlaylistContextType.LEVEL&&null!==e.level?s=this.hls.levels[e.level].details:e.type===c.PlaylistContextType.AUDIO_TRACK&&null!==e.id?s=this.hls.audioTracks[e.id].details:e.type===c.PlaylistContextType.SUBTITLE_TRACK&&null!==e.id&&(s=this.hls.subtitleTracks[e.id].details),s)){var d=s.partTarget,f=s.targetduration;d&&f&&(r=Math.min(1e3*Math.max(3*d,.8*f),r))}var p={timeout:r,maxRetry:n,retryDelay:i,maxRetryDelay:o,highWaterMark:0},m={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(e,p,m)},t.loadsuccess=function(e,t,n,r){if(void 0===r&&(r=null),n.isSidxRequest)return this.handleSidxRequest(e,n),void this.handlePlaylistLoaded(e,t,n,r);this.resetInternalLoader(n.type);var i=e.data;0===i.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(e,t,n,r):this.handleMasterPlaylist(e,t,n,r)):this.handleManifestParsingError(e,n,"no EXTM3U delimiter",r)},t.loaderror=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!1,e)},t.loadtimeout=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!0)},t.handleMasterPlaylist=function(e,t,n,r){var o=this.hls,s=e.data,c=h(e,n),d=l.default.parseMasterPlaylist(s,c),f=d.levels,p=d.sessionData;if(f.length){var m=f.map((function(e){return{id:e.attrs.AUDIO,audioCodec:e.audioCodec}})),g=f.map((function(e){return{id:e.attrs.SUBTITLES,textCodec:e.textCodec}})),v=l.default.parseMasterPlaylistMedia(s,c,"AUDIO",m),y=l.default.parseMasterPlaylistMedia(s,c,"SUBTITLES",g),b=l.default.parseMasterPlaylistMedia(s,c,"CLOSED-CAPTIONS");v.length&&(v.some((function(e){return!e.url}))||!f[0].audioCodec||f[0].attrs.AUDIO||(a.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),v.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new u.AttrList({}),bitrate:0,url:""}))),o.trigger(i.Events.MANIFEST_LOADED,{levels:f,audioTracks:v,subtitles:y,captions:b,url:c,stats:t,networkDetails:r,sessionData:p})}else this.handleManifestParsingError(e,n,"no level found in manifest",r)},t.handleTrackOrLevelPlaylist=function(e,t,n,a){var s=this.hls,d=n.id,f=n.level,p=n.type,m=h(e,n),g=Object(r.isFiniteNumber)(d)?d:0,v=Object(r.isFiniteNumber)(f)?f:g,y=function(e){switch(e.type){case c.PlaylistContextType.AUDIO_TRACK:return c.PlaylistLevelType.AUDIO;case c.PlaylistContextType.SUBTITLE_TRACK:return c.PlaylistLevelType.SUBTITLE;default:return c.PlaylistLevelType.MAIN}}(n),b=l.default.parseLevelPlaylist(e.data,m,v,y,g);if(b.fragments.length){if(p===c.PlaylistContextType.MANIFEST){var x={attrs:new u.AttrList({}),bitrate:0,details:b,name:"",url:m};s.trigger(i.Events.MANIFEST_LOADED,{levels:[x],audioTracks:[],url:m,stats:t,networkDetails:a,sessionData:null})}if(t.parsing.end=performance.now(),b.needSidxRanges){var w,E=null===(w=b.fragments[0].initSegment)||void 0===w?void 0:w.url;this.load({url:E,isSidxRequest:!0,type:p,level:f,levelDetails:b,id:d,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null})}else n.levelDetails=b,this.handlePlaylistLoaded(e,t,n,a)}else s.trigger(i.Events.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:m,reason:"no fragments found in level",level:"number"==typeof n.level?n.level:void 0})},t.handleSidxRequest=function(e,t){var n=Object(s.parseSegmentIndex)(new Uint8Array(e.data));if(n){var r=n.references,i=t.levelDetails;r.forEach((function(e,t){var r=e.info,o=i.fragments[t];0===o.byteRange.length&&o.setByteRange(String(1+r.end-r.start)+"@"+String(r.start)),o.initSegment&&o.initSegment.setByteRange(String(n.moovEndOffset)+"@0")}))}},t.handleManifestParsingError=function(e,t,n,r){this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===c.PlaylistContextType.MANIFEST,url:e.url,reason:n,response:e,context:t,networkDetails:r})},t.handleNetworkError=function(e,t,n,r){void 0===n&&(n=!1),a.logger.warn("[playlist-loader]: A network "+(n?"timeout":"error")+" occurred while loading "+e.type+" level: "+e.level+" id: "+e.id+' group-id: "'+e.groupId+'"');var s=o.ErrorDetails.UNKNOWN,l=!1,u=this.getInternalLoader(e);switch(e.type){case c.PlaylistContextType.MANIFEST:s=n?o.ErrorDetails.MANIFEST_LOAD_TIMEOUT:o.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case c.PlaylistContextType.LEVEL:s=n?o.ErrorDetails.LEVEL_LOAD_TIMEOUT:o.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.AUDIO_TRACK:s=n?o.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:s=n?o.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:o.ErrorDetails.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(e.type);var h={type:o.ErrorTypes.NETWORK_ERROR,details:s,fatal:l,url:e.url,loader:u,context:e,networkDetails:t};r&&(h.response=r),this.hls.trigger(i.Events.ERROR,h)},t.handlePlaylistLoaded=function(e,t,n,r){var o=n.type,a=n.level,s=n.id,l=n.groupId,u=n.loader,h=n.levelDetails,d=n.deliveryDirectives;if(null!=h&&h.targetduration){if(u)switch(h.live&&(u.getCacheAge&&(h.ageHeader=u.getCacheAge()||0),u.getCacheAge&&!isNaN(h.ageHeader)||(h.ageHeader=0)),o){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(i.Events.LEVEL_LOADED,{details:h,level:a||0,id:s||0,stats:t,networkDetails:r,deliveryDirectives:d});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(i.Events.AUDIO_TRACK_LOADED,{details:h,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:d});break;case c.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(i.Events.SUBTITLE_TRACK_LOADED,{details:h,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:d})}}else this.handleManifestParsingError(e,n,"invalid target duration",r)},e}();t.default=d},"./src/polyfills/number.ts":
/*!*********************************!*\
!*** ./src/polyfills/number.ts ***!
\*********************************/
/*! exports provided: isFiniteNumber, MAX_SAFE_INTEGER */function(e,t,n){"use strict";n.r(t),n.d(t,"isFiniteNumber",(function(){return r})),n.d(t,"MAX_SAFE_INTEGER",(function(){return i}));var r=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},i=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":
/*!*********************************!*\
!*** ./src/remux/aac-helper.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=function(){function e(){}return e.getSilentFrame=function(e,t){switch(e){case"mp4a.40.2":if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)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(6===t)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]);break;default:if(1===t)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(2===t)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(3===t)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])}},e}();t.default=r},"./src/remux/mp4-generator.ts":
/*!************************************!*\
!*** ./src/remux/mp4-generator.ts ***!
\************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=Math.pow(2,32)-1,i=function(){function e(){}return e.init=function(){var t;for(t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=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]),r=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]);e.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),o=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=o,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var a=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,a,l,a,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,i))},e.box=function(e){for(var t=8,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(var o=r.length,a=o;o--;)t+=r[o].byteLength;var s=new Uint8Array(t);for(s[0]=t>>24&255,s[1]=t>>16&255,s[2]=t>>8&255,s[3]=255&t,s.set(e,4),o=0,t=8;o<a;o++)s.set(r[o],t),t+=r[o].byteLength;return s},e.hdlr=function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])},e.mdat=function(t){return e.box(e.types.mdat,t)},e.mdhd=function(t,n){n*=t;var i=Math.floor(n/(r+1)),o=Math.floor(n%(r+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,o>>24,o>>16&255,o>>8&255,255&o,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,n,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,n))},e.moov=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(r))},e.mvhd=function(t,n){n*=t;var i=Math.floor(n/(r+1)),o=Math.floor(n%(r+1)),a=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,o>>24,o>>16&255,o>>8&255,255&o,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]);return e.box(e.types.mvhd,a)},e.sdtp=function(t){var n,r,i=t.samples||[],o=new Uint8Array(4+i.length);for(n=0;n<i.length;n++)r=i[n].flags,o[n+4]=r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy;return e.box(e.types.sdtp,o)},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(t){var n,r,i,o=[],a=[];for(n=0;n<t.sps.length;n++)i=(r=t.sps[n]).byteLength,o.push(i>>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));for(n=0;n<t.pps.length;n++)i=(r=t.pps[n]).byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));var s=e.box(e.types.avcC,new Uint8Array([1,o[3],o[4],o[5],255,224|t.sps.length].concat(o).concat([t.pps.length]).concat(a))),l=t.width,c=t.height,u=t.pixelRatio[0],h=t.pixelRatio[1];return e.box(e.types.avc1,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,l>>8&255,255&l,c>>8&255,255&c,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,h>>24,h>>16&255,h>>8&255,255&h])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var n=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var n=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},e.stsd=function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var n=t.id,i=t.duration*t.timescale,o=t.width,a=t.height,s=Math.floor(i/(r+1)),l=Math.floor(i%(r+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,l>>24,l>>16&255,l>>8&255,255&l,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,o>>8&255,255&o,0,0,a>>8&255,255&a,0,0]))},e.traf=function(t,n){var i=e.sdtp(t),o=t.id,a=Math.floor(n/(r+1)),s=Math.floor(n%(r+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,s>>24,s>>16&255,s>>8&255,255&s])),e.trun(t,i.length+16+20+8+16+8+8),i)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var r,i,o,a,s,l,c=t.samples||[],u=c.length,h=12+16*u,d=new Uint8Array(h);for(n+=8+h,d.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,255&u,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r<u;r++)o=(i=c[r]).duration,a=i.size,s=i.flags,l=i.cts,d.set([o>>>24&255,o>>>16&255,o>>>8&255,255&o,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return e.box(e.types.trun,d)},e.initSegment=function(t){e.types||e.init();var n=e.moov(t),r=new Uint8Array(e.FTYP.byteLength+n.byteLength);return r.set(e.FTYP),r.set(n,e.FTYP.byteLength),r},e}();i.types=void 0,i.HDLR_TYPES=void 0,i.STTS=void 0,i.STSC=void 0,i.STCO=void 0,i.STSZ=void 0,i.VMHD=void 0,i.SMHD=void 0,i.STSD=void 0,i.FTYP=void 0,i.DINF=void 0,t.default=i},"./src/remux/mp4-remuxer.ts":
/*!**********************************!*\
!*** ./src/remux/mp4-remuxer.ts ***!
\**********************************/
/*! exports provided: default, normalizePts */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return m})),n.d(t,"normalizePts",(function(){return g}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./aac-helper */"./src/remux/aac-helper.ts"),o=n(/*! ./mp4-generator */"./src/remux/mp4-generator.ts"),a=n(/*! ../events */"./src/events.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/logger */"./src/utils/logger.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/timescale-conversion */"./src/utils/timescale-conversion.ts");function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var d=null,f=null,p=!1,m=function(){function e(e,t,n,r){if(void 0===r&&(r=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=e,this.config=t,this.typeSupported=n,this.ISGenerated=!1,null===d){var i=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);d=i?parseInt(i[1]):0}if(null===f){var o=navigator.userAgent.match(/Safari\/(\d+)/i);f=o?parseInt(o[1]):0}p=!!d&&d<75||!!f&&f<600}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){l.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e},t.resetNextTimestamp=function(){l.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},t.resetInitSegment=function(){l.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},t.getVideoStartPts=function(e){var t=!1,n=e.reduce((function(e,n){var r=n.pts-e;return r<-4294967296?(t=!0,g(e,n.pts)):r>0?e:n.pts}),e[0].pts);return t&&l.logger.debug("PTS rollover detected"),n},t.remux=function(e,t,n,r,i,o,a,s){var u,h,d,f,p,m,v=i,y=i,b=e.pid>-1,x=t.pid>-1,w=t.samples.length,E=e.samples.length>0,S=w>1;if((!b||E)&&(!x||S)||this.ISGenerated||a){this.ISGenerated||(d=this.generateIS(e,t,i));var C=this.isVideoContiguous,k=-1;if(S&&(k=function(e){for(var t=0;t<e.length;t++)if(e[t].key)return t;return-1}(t.samples),!C&&this.config.forceKeyFrameOnDiscontinuity))if(m=!0,k>0){l.logger.warn("[mp4-remuxer]: Dropped "+k+" out of "+w+" video samples due to a missing keyframe");var _=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(k),t.dropped+=k,y+=(t.samples[0].pts-_)/(t.timescale||9e4)}else-1===k&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+w+" video samples"),m=!1);if(this.ISGenerated){if(E&&S){var T=this.getVideoStartPts(t.samples),O=(g(e.samples[0].pts,T)-T)/t.inputTimeScale;v+=Math.max(0,O),y+=Math.max(0,-O)}if(E){if(e.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(e,t,i)),h=this.remuxAudio(e,v,this.isAudioContiguous,o,x||S||s===c.PlaylistLevelType.AUDIO?y:void 0),S){var A=h?h.endPTS-h.startPTS:0;t.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(e,t,i)),u=this.remuxVideo(t,y,C,A)}}else S&&(u=this.remuxVideo(t,y,C,0));u&&(u.firstKeyFrame=k,u.independent=-1!==k)}}return this.ISGenerated&&(n.samples.length&&(p=this.remuxID3(n,i)),r.samples.length&&(f=this.remuxText(r,i))),{audio:h,video:u,initSegment:d,independent:m,text:f,id3:p}},t.generateIS=function(e,t,n){var i,a,s,l=e.samples,c=t.samples,u=this.typeSupported,h={},d=!Object(r.isFiniteNumber)(this._initPTS),f="audio/mp4";if(d&&(i=a=1/0),e.config&&l.length&&(e.timescale=e.samplerate,e.isAAC||(u.mpeg?(f="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3")),h.audio={id:"audio",container:f,codec:e.codec,initSegment:!e.isAAC&&u.mpeg?new Uint8Array(0):o.default.initSegment([e]),metadata:{channelCount:e.channelCount}},d&&(s=e.inputTimeScale,i=a=l[0].pts-Math.round(s*n))),t.sps&&t.pps&&c.length&&(t.timescale=t.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:o.default.initSegment([t]),metadata:{width:t.width,height:t.height}},d)){s=t.inputTimeScale;var p=this.getVideoStartPts(c),m=Math.round(s*n);a=Math.min(a,g(c[0].dts,p)-m),i=Math.min(i,p-m)}if(Object.keys(h).length)return this.ISGenerated=!0,d&&(this._initPTS=i,this._initDTS=a),{tracks:h,initPTS:i,timescale:s}},t.remuxVideo=function(e,t,n,r){var i,c,f,m=e.inputTimeScale,y=e.samples,b=[],x=y.length,w=this._initPTS,E=this.nextAvcDts,S=8,C=Number.POSITIVE_INFINITY,k=Number.NEGATIVE_INFINITY,_=0,T=!1;n&&null!==E||(E=t*m-(y[0].pts-g(y[0].dts,y[0].pts)));for(var O=0;O<x;O++){var A=y[O];A.pts=g(A.pts-w,E),A.dts=g(A.dts-w,E),A.dts>A.pts&&(_=Math.max(Math.min(_,A.pts-A.dts),-18e3)),A.dts<y[O>0?O-1:O].dts&&(T=!0)}T&&y.sort((function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||r})),c=y[0].dts,f=y[y.length-1].dts;var L=Math.round((f-c)/(x-1));if(_<0){if(_<-2*L){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(u.toMsFromMpegTsClock)(-L,!0)+" ms");for(var D=_,I=0;I<x;I++)y[I].dts=D=Math.max(D,y[I].pts-L),y[I].pts=Math.max(D,y[I].pts)}else{l.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(u.toMsFromMpegTsClock)(_,!0)+" ms to overcome this issue");for(var R=0;R<x;R++)y[R].dts=y[R].dts+_}c=y[0].dts}if(n){var M=c-E,N=M>L;if(N||M<-1){N?l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(M,!0)+" ms ("+M+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(-M,!0)+" ms ("+M+"dts) overlapping between fragments detected"),c=E;var j=y[0].pts-M;y[0].dts=c,y[0].pts=j,l.logger.log("Video: First PTS/DTS adjusted: "+Object(u.toMsFromMpegTsClock)(j,!0)+"/"+Object(u.toMsFromMpegTsClock)(c,!0)+", delta: "+Object(u.toMsFromMpegTsClock)(M,!0)+" ms")}}p&&(c=Math.max(0,c));for(var P=0,B=0,F=0;F<x;F++){for(var U=y[F],H=U.units,z=H.length,G=0,V=0;V<z;V++)G+=H[V].data.length;B+=G,P+=z,U.length=G,U.dts=Math.max(U.dts,c),U.pts=Math.max(U.pts,U.dts,0),C=Math.min(U.pts,C),k=Math.max(U.pts,k)}f=y[x-1].dts;var W,K=B+4*P+8;try{W=new Uint8Array(K)}catch(e){return void this.observer.emit(a.Events.ERROR,a.Events.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:K,reason:"fail allocating video mdat "+K})}var q=new DataView(W.buffer);q.setUint32(0,K),W.set(o.default.types.mdat,4);for(var X=0;X<x;X++){for(var Y=y[X],$=Y.units,J=0,Z=0,Q=$.length;Z<Q;Z++){var ee=$[Z],te=ee.data,ne=ee.data.byteLength;q.setUint32(S,ne),S+=4,W.set(te,S),S+=ne,J+=4+ne}if(X<x-1)i=y[X+1].dts-Y.dts;else{var re=this.config,ie=Y.dts-y[X>0?X-1:X].dts;if(re.stretchShortVideoTrack&&null!==this.nextAudioPts){var oe=Math.floor(re.maxBufferHole*m),ae=(r?C+r*m:this.nextAudioPts)-Y.pts;ae>oe?((i=ae-ie)<0&&(i=ie),l.logger.log("[mp4-remuxer]: It is approximately "+ae/90+" ms to the next segment; using duration "+i/90+" ms for the last video frame.")):i=ie}else i=ie}var se=Math.round(Y.pts-Y.dts);b.push(new v(Y.key,i,J,se))}if(b.length&&d&&d<70){var le=b[0].flags;le.dependsOn=2,le.isNonSync=0}console.assert(void 0!==i,"mp4SampleDuration must be computed"),this.nextAvcDts=E=f+i,this.isVideoContiguous=!0;var ce={data1:o.default.moof(e.sequenceNumber++,c,h({},e,{samples:b})),data2:W,startPTS:C/m,endPTS:(k+i)/m,startDTS:c/m,endDTS:E/m,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:e.dropped};return e.samples=[],e.dropped=0,console.assert(W.length,"MDAT length must not be zero"),ce},t.remuxAudio=function(e,t,n,r,c){var u=e.inputTimeScale,d=u/(e.samplerate?e.samplerate:u),f=e.isAAC?1024:1152,p=f*d,m=this._initPTS,y=!e.isAAC&&this.typeSupported.mpeg,b=[],x=e.samples,w=y?0:8,E=this.nextAudioPts||-1,S=t*u;if(this.isAudioContiguous=n=n||x.length&&E>0&&(r&&Math.abs(S-E)<9e3||Math.abs(g(x[0].pts-m,S)-E)<20*p),x.forEach((function(e){e.pts=g(e.pts-m,S)})),!n||E<0){if(!(x=x.filter((function(e){return e.pts>=0}))).length)return;E=0===c?0:r?Math.max(0,S):x[0].pts}if(e.isAAC)for(var C=void 0!==c,k=this.config.maxAudioFramesDrift,_=0,T=E;_<x.length;_++){var O=x[_],A=O.pts,L=A-T,D=Math.abs(1e3*L/u);if(L<=-k*p&&C)0===_&&(l.logger.warn("Audio frame @ "+(A/u).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*L/u)+" ms."),this.nextAudioPts=E=T=A);else if(L>=k*p&&D<1e4&&C){var I=Math.round(L/p);(T=A-I*p)<0&&(I--,T+=p),0===_&&(this.nextAudioPts=E=T),l.logger.warn("[mp4-remuxer]: Injecting "+I+" audio frame @ "+(T/u).toFixed(3)+"s due to "+Math.round(1e3*L/u)+" ms gap.");for(var R=0;R<I;R++){var M=Math.max(T,0),N=i.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);N||(l.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),N=O.unit.subarray()),x.splice(_,0,{unit:N,pts:M}),T+=p,_++}}O.pts=T,T+=p}for(var j,P=null,B=null,F=0,U=x.length;U--;)F+=x[U].unit.byteLength;for(var H=0,z=x.length;H<z;H++){var G=x[H],V=G.unit,W=G.pts;if(null!==B)b[H-1].duration=Math.round((W-B)/d);else{if(n&&e.isAAC&&(W=E),P=W,!(F>0))return;F+=w;try{j=new Uint8Array(F)}catch(e){return void this.observer.emit(a.Events.ERROR,a.Events.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:F,reason:"fail allocating audio mdat "+F})}y||(new DataView(j.buffer).setUint32(0,F),j.set(o.default.types.mdat,4))}j.set(V,w);var K=V.byteLength;w+=K,b.push(new v(!0,f,K,0)),B=W}var q=b.length;if(q){var X=b[b.length-1];this.nextAudioPts=E=B+d*X.duration;var Y=y?new Uint8Array(0):o.default.moof(e.sequenceNumber++,P/d,h({},e,{samples:b}));e.samples=[];var $=P/u,J=E/u,Z={data1:Y,data2:j,startPTS:$,endPTS:J,startDTS:$,endDTS:J,type:"audio",hasAudio:!0,hasVideo:!1,nb:q};return this.isAudioContiguous=!0,console.assert(j.length,"MDAT length must not be zero"),Z}},t.remuxEmptyAudio=function(e,t,n,r){var o=e.inputTimeScale,a=o/(e.samplerate?e.samplerate:o),s=this.nextAudioPts,c=(null!==s?s:r.startDTS*o)+this._initDTS,u=r.endDTS*o+this._initDTS,h=1024*a,d=Math.ceil((u-c)/h),f=i.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),f){for(var p=[],m=0;m<d;m++){var g=c+m*h;p.push({unit:f,pts:g,dts:g})}return e.samples=p,this.remuxAudio(e,t,n,!1)}l.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec")},t.remuxID3=function(e,t){var n=e.samples.length;if(n){for(var r=e.inputTimeScale,i=this._initPTS,o=this._initDTS,a=0;a<n;a++){var s=e.samples[a];s.pts=g(s.pts-i,t*r)/r,s.dts=g(s.dts-o,t*r)/r}var l=e.samples;return e.samples=[],{samples:l}}},t.remuxText=function(e,t){var n=e.samples.length;if(n){for(var r=e.inputTimeScale,i=this._initPTS,o=0;o<n;o++){var a=e.samples[o];a.pts=g(a.pts-i,t*r)/r}e.samples.sort((function(e,t){return e.pts-t.pts}));var s=e.samples;return e.samples=[],{samples:s}}},e}();function g(e,t){var n;if(null===t)return e;for(n=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=n;return e}var v=function(e,t,n,r){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=n,this.cts=r,this.flags=new y(e)},y=function(e){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=e?2:1,this.isNonSync=e?0:1}},"./src/remux/passthrough-remuxer.ts":
/*!******************************************!*\
!*** ./src/remux/passthrough-remuxer.ts ***!
\******************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),o=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=function(){function e(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this.initPTS=e,this.lastEndDTS=null},t.resetNextTimestamp=function(){this.lastEndDTS=null},t.resetInitSegment=function(e,t,n){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(e),this.emitInitSegment=!0},t.generateInitSegment=function(e){var t=this.audioCodec,n=this.videoCodec;if(!e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var r=this.initData=Object(i.parseInitSegment)(e);t||(t=c(r.audio,o.ElementaryStreamTypes.AUDIO)),n||(n=c(r.video,o.ElementaryStreamTypes.VIDEO));var s={};r.audio&&r.video?s.audiovideo={container:"video/mp4",codec:t+","+n,initSegment:e,id:"main"}:r.audio?s.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:r.video?s.video={container:"video/mp4",codec:n,initSegment:e,id:"main"}:a.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=s},t.remux=function(e,t,n,o,s){var c=this.initPTS,u=this.lastEndDTS,h={audio:void 0,video:void 0,text:o,id3:n,initSegment:void 0};Object(r.isFiniteNumber)(u)||(u=this.lastEndDTS=s||0);var d=t.samples;if(!d||!d.length)return h;var f={initPTS:void 0,timescale:1},p=this.initData;if(p&&p.length||(this.generateInitSegment(d),p=this.initData),!p||!p.length)return a.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),h;this.emitInitSegment&&(f.tracks=this.initTracks,this.emitInitSegment=!1),Object(r.isFiniteNumber)(c)||(this.initPTS=f.initPTS=c=l(p,d,u));var m=Object(i.getDuration)(d,p),g=u,v=m+g;Object(i.offsetStartDTS)(p,d,c),m>0?this.lastEndDTS=v:(a.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var y=!!p.audio,b=!!p.video,x="";y&&(x+="audio"),b&&(x+="video");var w={data1:d,startPTS:g,startDTS:g,endPTS:v,endDTS:v,type:x,hasAudio:y,hasVideo:b,nb:1,dropped:0};return h.audio="audio"===w.type?w:void 0,h.video="audio"!==w.type?w:void 0,h.text=o,h.id3=n,h.initSegment=f,h},e}(),l=function(e,t,n){return Object(i.getStartDTS)(e,t)-n};function c(e,t){var n=null==e?void 0:e.codec;return n&&n.length>4?n:"hvc1"===n?"hvc1.1.c.L120.90":"av01"===n?"av01.0.04M.08":"avc1"===n||t===o.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}t.default=s},"./src/task-loop.ts":
/*!**************************!*\
!*** ./src/task-loop.ts ***!
\**************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},t.onHandlerDestroyed=function(){},t.hasInterval=function(){return!!this._tickInterval},t.hasNextTick=function(){return!!this._tickTimer},t.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,e),!0)},t.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},t.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},t.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},t.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},t.doTick=function(){},e}()},"./src/types/cmcd.ts":
/*!***************************!*\
!*** ./src/types/cmcd.ts ***!
\***************************/
/*! exports provided: CMCDVersion, CMCDObjectType, CMCDStreamingFormat, CMCDStreamType */function(e,t,n){"use strict";n.r(t),n.d(t,"CMCDVersion",(function(){return a})),n.d(t,"CMCDObjectType",(function(){return r})),n.d(t,"CMCDStreamingFormat",(function(){return i})),n.d(t,"CMCDStreamType",(function(){return o}));var r,i,o,a=1;!function(e){e.MANIFEST="m",e.AUDIO="a",e.VIDEO="v",e.MUXED="av",e.INIT="i",e.CAPTION="c",e.TIMED_TEXT="tt",e.KEY="k",e.OTHER="o"}(r||(r={})),function(e){e.DASH="d",e.HLS="h",e.SMOOTH="s",e.OTHER="o"}(i||(i={})),function(e){e.VOD="v",e.LIVE="l"}(o||(o={}))},"./src/types/level.ts":
/*!****************************!*\
!*** ./src/types/level.ts ***!
\****************************/
/*! exports provided: HlsSkip, getSkipValue, HlsUrlParameters, Level */function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i;function o(e,t){var n=e.canSkipUntil,r=e.canSkipDateRanges,o=e.endSN;return n&&(void 0!==t?t-o:0)<n?r?i.v2:i.Yes:i.No}n.r(t),n.d(t,"HlsSkip",(function(){return i})),n.d(t,"getSkipValue",(function(){return o})),n.d(t,"HlsUrlParameters",(function(){return a})),n.d(t,"Level",(function(){return s})),function(e){e.No="",e.Yes="YES",e.v2="v2"}(i||(i={}));var a=function(){function e(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}return e.prototype.addDirectives=function(e){var t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.toString()},e}(),s=function(){function e(e){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[e.url],this.attrs=e.attrs,this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.unknownCodecs=e.unknownCodecs,this.codecSet=[e.videoCodec,e.audioCodec].filter((function(e){return e})).join(",").replace(/\.[^.,]+/g,"")}var t,n,i;return t=e,(n=[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(e){var t=e%this.url.length;this._urlId!==t&&(this.details=void 0,this._urlId=t)}}])&&r(t.prototype,n),i&&r(t,i),e}()},"./src/types/loader.ts":
/*!*****************************!*\
!*** ./src/types/loader.ts ***!
\*****************************/
/*! exports provided: PlaylistContextType, PlaylistLevelType */function(e,t,n){"use strict";var r,i;n.r(t),n.d(t,"PlaylistContextType",(function(){return r})),n.d(t,"PlaylistLevelType",(function(){return i})),function(e){e.MANIFEST="manifest",e.LEVEL="level",e.AUDIO_TRACK="audioTrack",e.SUBTITLE_TRACK="subtitleTrack"}(r||(r={})),function(e){e.MAIN="main",e.AUDIO="audio",e.SUBTITLE="subtitle"}(i||(i={}))},"./src/types/transmuxer.ts":
/*!*********************************!*\
!*** ./src/types/transmuxer.ts ***!
\*********************************/
/*! exports provided: ChunkMetadata */function(e,t,n){"use strict";n.r(t),n.d(t,"ChunkMetadata",(function(){return r}));var r=function(e,t,n,r,i,o){void 0===r&&(r=0),void 0===i&&(i=-1),void 0===o&&(o=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=o}},"./src/utils/attr-list.ts":
/*!********************************!*\
!*** ./src/utils/attr-list.ts ***!
\********************************/
/*! exports provided: AttrList */function(e,t,n){"use strict";n.r(t),n.d(t,"AttrList",(function(){return o}));var r=/^(\d+)x(\d+)$/,i=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,o=function(){function e(t){for(var n in"string"==typeof t&&(t=e.parseAttrList(t)),t)t.hasOwnProperty(n)&&(this[n]=t[n])}var t=e.prototype;return t.decimalInteger=function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(2*r,2*r+2),16);return n}return null},t.hexadecimalIntegerAsNumber=function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.optionalFloat=function(e,t){var n=this[e];return n?parseFloat(n):t},t.enumeratedString=function(e){return this[e]},t.bool=function(e){return"YES"===this[e]},t.decimalResolution=function(e){var t=r.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,n={};for(i.lastIndex=0;null!==(t=i.exec(e));){var r=t[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[t[1]]=r}return n},e}()},"./src/utils/binary-search.ts":
/*!************************************!*\
!*** ./src/utils/binary-search.ts ***!
\************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default={search:function(e,t){for(var n=0,r=e.length-1,i=null,o=null;n<=r;){var a=t(o=e[i=(n+r)/2|0]);if(a>0)n=i+1;else{if(!(a<0))return o;r=i-1}}return null}}},"./src/utils/buffer-helper.ts":
/*!************************************!*\
!*** ./src/utils/buffer-helper.ts ***!
\************************************/
/*! exports provided: BufferHelper */function(e,t,n){"use strict";n.r(t),n.d(t,"BufferHelper",(function(){return o}));var r=n(/*! ./logger */"./src/utils/logger.ts"),i={length:0,start:function(){return 0},end:function(){return 0}},o=function(){function e(){}return e.isBuffered=function(t,n){try{if(t)for(var r=e.getBuffered(t),i=0;i<r.length;i++)if(n>=r.start(i)&&n<=r.end(i))return!0}catch(e){}return!1},e.bufferInfo=function(t,n,r){try{if(t){var i,o=e.getBuffered(t),a=[];for(i=0;i<o.length;i++)a.push({start:o.start(i),end:o.end(i)});return this.bufferedInfo(a,n,r)}}catch(e){}return{len:0,start:n,end:n,nextStart:void 0}},e.bufferedInfo=function(e,t,n){t=Math.max(0,t),e.sort((function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var r=[];if(n)for(var i=0;i<e.length;i++){var o=r.length;if(o){var a=r[o-1].end;e[i].start-a<n?e[i].end>a&&(r[o-1].end=e[i].end):r.push(e[i])}else r.push(e[i])}else r=e;for(var s,l=0,c=t,u=t,h=0;h<r.length;h++){var d=r[h].start,f=r[h].end;if(t+n>=d&&t<f)c=d,l=(u=f)-t;else if(t+n<d){s=d;break}}return{len:l,start:c||0,end:u||0,nextStart:s}},e.getBuffered=function(e){try{return e.buffered}catch(e){return r.logger.log("failed to get media.buffered",e),i}},e}()},"./src/utils/cea-608-parser.ts":
/*!*************************************!*\
!*** ./src/utils/cea-608-parser.ts ***!
\*************************************/
/*! exports provided: Row, CaptionScreen, default */function(e,t,n){"use strict";n.r(t),n.d(t,"Row",(function(){return g})),n.d(t,"CaptionScreen",(function(){return v}));var r,i=n(/*! ../utils/logger */"./src/utils/logger.ts"),o={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},a=function(e){var t=e;return o.hasOwnProperty(e)&&(t=o[e]),String.fromCharCode(t)},s={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},l={17:2,18:4,21:6,22:8,23:10,19:13,20:15},c={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},u={25:2,26:4,29:6,30:8,31:10,27:13,28:15},h=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(e){e[e.ERROR=0]="ERROR",e[e.TEXT=1]="TEXT",e[e.WARNING=2]="WARNING",e[e.INFO=2]="INFO",e[e.DEBUG=3]="DEBUG",e[e.DATA=3]="DATA"}(r||(r={}));var d=function(){function e(){this.time=null,this.verboseLevel=r.ERROR}return e.prototype.log=function(e,t){this.verboseLevel>=e&&i.logger.log(this.time+" ["+e+"] "+t)},e}(),f=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},p=function(){function e(e,t,n,r,i){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=e||"white",this.underline=t||!1,this.italics=n||!1,this.background=r||"black",this.flash=i||!1}var t=e.prototype;return t.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}},t.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},t.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},t.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},e}(),m=function(){function e(e,t,n,r,i,o){this.uchar=void 0,this.penState=void 0,this.uchar=e||" ",this.penState=new p(t,n,r,i,o)}var t=e.prototype;return t.reset=function(){this.uchar=" ",this.penState.reset()},t.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},t.setPenState=function(e){this.penState.copy(e)},t.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},t.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},t.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},e}(),g=function(){function e(e){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var t=0;t<100;t++)this.chars.push(new m);this.logger=e,this.pos=0,this.currPenState=new p}var t=e.prototype;return t.equals=function(e){for(var t=!0,n=0;n<100;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<100;t++)this.chars[t].copy(e.chars[t])},t.isEmpty=function(){for(var e=!0,t=0;t<100;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},t.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(r.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>100&&(this.logger.log(r.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},t.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.insertChar=function(e){e>=144&&this.backSpace();var t=a(e);this.pos>=100?this.logger.log(r.ERROR,"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var t;for(t=e;t<100;t++)this.chars[t].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,n=0;n<100;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),v=function(){function e(e){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var t=0;t<15;t++)this.rows.push(new g(e));this.logger=e,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var t=e.prototype;return t.reset=function(){for(var e=0;e<15;e++)this.rows[e].clear();this.currRow=14},t.equals=function(e){for(var t=!0,n=0;n<15;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<15;t++)this.rows[t].copy(e.rows[t])},t.isEmpty=function(){for(var e=!0,t=0;t<15;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){this.logger.log(r.INFO,"setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){this.logger.log(r.INFO,"pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var n=0;n<15;n++)this.rows[n].clear();var i=this.currRow+1-this.nrRollUpRows,o=this.lastOutputScreen;if(o){var a=o.rows[i].cueStartTime,s=this.logger.time;if(a&&null!==s&&a<s)for(var l=0;l<this.nrRollUpRows;l++)this.rows[t-this.nrRollUpRows+l+1].copy(o.rows[i+l])}}this.currRow=t;var c=this.rows[this.currRow];if(null!==e.indent){var u=e.indent,h=Math.max(u-1,0);c.setCursor(e.indent),e.color=c.chars[h].penState.foreground}var d={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(d)},t.setBkgData=function(e){this.logger.log(r.INFO,"bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},t.setRollUpRows=function(e){this.nrRollUpRows=e},t.rollUp=function(){if(null!==this.nrRollUpRows){this.logger.log(r.TEXT,this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(r.INFO,"Rolling up")}else this.logger.log(r.DEBUG,"roll_up but nrRollUpRows not set yet")},t.getDisplayText=function(e){e=e||!1;for(var t=[],n="",r=-1,i=0;i<15;i++){var o=this.rows[i].getTextString();o&&(r=i+1,e?t.push("Row "+r+": '"+o+"'"):t.push(o.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},t.getTextAndFormat=function(){return this.rows},e}(),y=function(){function e(e,t,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new v(n),this.nonDisplayedMemory=new v(n),this.lastOutputScreen=new v(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}var t=e.prototype;return t.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,this.logger.log(r.INFO,"MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},t.insertChars=function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(r.INFO,n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(r.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},t.ccRCL=function(){this.logger.log(r.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.ccBS=function(){this.logger.log(r.INFO,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.ccAOF=function(){},t.ccAON=function(){},t.ccDER=function(){this.logger.log(r.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.ccRU=function(e){this.logger.log(r.INFO,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},t.ccFON=function(){this.logger.log(r.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.ccRDC=function(){this.logger.log(r.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.ccTR=function(){this.logger.log(r.INFO,"TR"),this.setMode("MODE_TEXT")},t.ccRTD=function(){this.logger.log(r.INFO,"RTD"),this.setMode("MODE_TEXT")},t.ccEDM=function(){this.logger.log(r.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.ccCR=function(){this.logger.log(r.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.ccENM=function(){this.logger.log(r.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.ccEOC=function(){if(this.logger.log(r.INFO,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(r.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},t.ccTO=function(e){this.logger.log(r.INFO,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},t.ccMIDROW=function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}this.logger.log(r.INFO,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),b=function(){function e(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var r=new d;this.channels=[null,new y(e,t,r),new y(e+1,n,r)],this.cmdHistory={a:null,b:null},this.logger=r}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var n,i,o,a=!1;this.logger.time=e;for(var s=0;s<t.length;s+=2)if(i=127&t[s],o=127&t[s+1],0!==i||0!==o){if(this.logger.log(r.DATA,"["+f([t[s],t[s+1]])+"] -> ("+f([i,o])+")"),(n=this.parseCmd(i,o))||(n=this.parseMidrow(i,o)),n||(n=this.parsePAC(i,o)),n||(n=this.parseBackgroundAttributes(i,o)),!n&&(a=this.parseChars(i,o))){var l=this.currentChannel;l&&l>0?this.channels[l].insertChars(a):this.logger.log(r.WARNING,"No channel found yet. TEXT-MODE?")}n||a||this.logger.log(r.WARNING,"Couldn't parse cleaned data "+f([i,o])+" orig: "+f([t[s],t[s+1]]))}},t.parseCmd=function(e,t){var n=this.cmdHistory;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;if(w(e,t,n))return x(null,null,n),this.logger.log(r.DEBUG,"Repeated command ("+f([e,t])+") is dropped"),!0;var i=20===e||21===e||23===e?1:2,o=this.channels[i];return 20===e||21===e||28===e||29===e?32===t?o.ccRCL():33===t?o.ccBS():34===t?o.ccAOF():35===t?o.ccAON():36===t?o.ccDER():37===t?o.ccRU(2):38===t?o.ccRU(3):39===t?o.ccRU(4):40===t?o.ccFON():41===t?o.ccRDC():42===t?o.ccTR():43===t?o.ccRTD():44===t?o.ccEDM():45===t?o.ccCR():46===t?o.ccENM():47===t&&o.ccEOC():o.ccTO(t-32),x(e,t,n),this.currentChannel=i,!0},t.parseMidrow=function(e,t){var n=0;if((17===e||25===e)&&t>=32&&t<=47){if((n=17===e?1:2)!==this.currentChannel)return this.logger.log(r.ERROR,"Mismatch channel in midrow parsing"),!1;var i=this.channels[n];return!!i&&(i.ccMIDROW(t),this.logger.log(r.DEBUG,"MIDROW ("+f([e,t])+")"),!0)}return!1},t.parsePAC=function(e,t){var n,r=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;if(w(e,t,r))return x(null,null,r),!0;var i=e<=23?1:2;n=t>=64&&t<=95?1===i?s[e]:c[e]:1===i?l[e]:u[e];var o=this.channels[i];return!!o&&(o.setPAC(this.interpretPAC(n,t)),x(e,t,r),this.currentChannel=i,!0)},t.interpretPAC=function(e,t){var n,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},t.parseChars=function(e,t){var n,i,o=null,s=null;if(e>=25?(n=2,s=e-8):(n=1,s=e),s>=17&&s<=19?(i=17===s?t+80:18===s?t+112:t+144,this.logger.log(r.INFO,"Special char '"+a(i)+"' in channel "+n),o=[i]):e>=32&&e<=127&&(o=0===t?[e]:[e,t]),o){var l=f(o);this.logger.log(r.DEBUG,"Char codes = "+l.join(",")),x(e,t,this.cmdHistory)}return o},t.parseBackgroundAttributes=function(e,t){var n;if(!((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47))return!1;var r={};16===e||24===e?(n=Math.floor((t-32)/2),r.background=h[n],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0));var i=e<=23?1:2;return this.channels[i].setBkgData(r),x(e,t,this.cmdHistory),!0},t.reset=function(){for(var e=0;e<Object.keys(this.channels).length;e++){var t=this.channels[e];t&&t.reset()}this.cmdHistory={a:null,b:null}},t.cueSplitAtTime=function(e){for(var t=0;t<this.channels.length;t++){var n=this.channels[t];n&&n.cueSplitAtTime(e)}},e}();function x(e,t,n){n.a=e,n.b=t}function w(e,t,n){return n.a===e&&n.b===t}t.default=b},"./src/utils/codecs.ts":
/*!*****************************!*\
!*** ./src/utils/codecs.ts ***!
\*****************************/
/*! exports provided: isCodecType, isCodecSupportedInMp4 */function(e,t,n){"use strict";n.r(t),n.d(t,"isCodecType",(function(){return i})),n.d(t,"isCodecSupportedInMp4",(function(){return o}));var r={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function i(e,t){var n=r[t];return!!n&&!0===n[e.slice(0,4)]}function o(e,t){return MediaSource.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"')}},"./src/utils/cues.ts":
/*!***************************!*\
!*** ./src/utils/cues.ts ***!
\***************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./vttparser */"./src/utils/vttparser.ts"),i=n(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts"),o=n(/*! ./texttrack-utils */"./src/utils/texttrack-utils.ts"),a=/\s/,s={newCue:function(e,t,n,s){for(var l,c,u,h,d,f=[],p=self.VTTCue||self.TextTrackCue,m=0;m<s.rows.length;m++)if(u=!0,h=0,d="",!(l=s.rows[m]).isEmpty()){for(var g=0;g<l.chars.length;g++)a.test(l.chars[g].uchar)&&u?h++:(d+=l.chars[g].uchar,u=!1);l.cueStartTime=t,t===n&&(n+=1e-4),h>=16?h--:h++;var v=Object(r.fixLineBreaks)(d.trim()),y=Object(i.generateCueId)(t,n,v);e&&e.cues&&e.cues.getCueById(y)||((c=new p(t,n,v)).id=y,c.line=m+1,c.align="left",c.position=10+Math.min(80,10*Math.floor(8*h/32)),f.push(c))}return e&&f.length&&(f.sort((function(e,t){return"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line})),f.forEach((function(t){return Object(o.addCueToTrack)(e,t)}))),f}};t.default=s},"./src/utils/discontinuities.ts":
/*!**************************************!*\
!*** ./src/utils/discontinuities.ts ***!
\**************************************/
/*! exports provided: findFirstFragWithCC, shouldAlignOnDiscontinuities, findDiscontinuousReferenceFrag, adjustSlidingStart, alignStream, alignPDT, alignFragmentByPDTDelta, alignMediaPlaylistByPDT */function(e,t,n){"use strict";n.r(t),n.d(t,"findFirstFragWithCC",(function(){return a})),n.d(t,"shouldAlignOnDiscontinuities",(function(){return s})),n.d(t,"findDiscontinuousReferenceFrag",(function(){return l})),n.d(t,"adjustSlidingStart",(function(){return u})),n.d(t,"alignStream",(function(){return h})),n.d(t,"alignPDT",(function(){return d})),n.d(t,"alignFragmentByPDTDelta",(function(){return f})),n.d(t,"alignMediaPlaylistByPDT",(function(){return p}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./logger */"./src/utils/logger.ts"),o=n(/*! ../controller/level-helper */"./src/controller/level-helper.ts");function a(e,t){for(var n=null,r=0,i=e.length;r<i;r++){var o=e[r];if(o&&o.cc===t){n=o;break}}return n}function s(e,t,n){return!(!t.details||!(n.endCC>n.startCC||e&&e.cc<n.startCC))}function l(e,t){var n=e.fragments,r=t.fragments;if(r.length&&n.length){var o=a(n,r[0].cc);if(o&&(!o||o.startPTS))return o;i.logger.log("No frag in previous level to align on")}else i.logger.log("No fragments to align")}function c(e,t){if(e){var n=e.start+t;e.start=e.startPTS=n,e.endPTS=n+e.duration}}function u(e,t){for(var n=t.fragments,r=0,i=n.length;r<i;r++)c(n[r],e);t.fragmentHint&&c(t.fragmentHint,e),t.alignedSliding=!0}function h(e,t,n){t&&(function(e,t,n){if(s(e,n,t)){var o=l(n.details,t);o&&Object(r.isFiniteNumber)(o.start)&&(i.logger.log("Adjusting PTS using last level due to CC increase within current level "+t.url),u(o.start,t))}}(e,n,t),!n.alignedSliding&&t.details&&d(n,t.details),n.alignedSliding||!t.details||n.skippedSegments||Object(o.adjustSliding)(t.details,n))}function d(e,t){if(t.fragments.length&&e.hasProgramDateTime&&t.hasProgramDateTime){var n=t.fragments[0].programDateTime,o=e.fragments[0].programDateTime,a=(o-n)/1e3+t.fragments[0].start;a&&Object(r.isFiniteNumber)(a)&&(i.logger.log("Adjusting PTS using programDateTime delta "+(o-n)+"ms, sliding:"+a.toFixed(3)+" "+e.url+" "),u(a,e))}}function f(e,t){var n=e.programDateTime;if(n){var r=(n-t)/1e3;e.start=e.startPTS=r,e.endPTS=r+e.duration}}function p(e,t){if(t.fragments.length&&e.hasProgramDateTime&&t.hasProgramDateTime){var n=t.fragments[0].programDateTime-1e3*t.fragments[0].start;e.fragments.forEach((function(e){f(e,n)})),e.fragmentHint&&f(e.fragmentHint,n),e.alignedSliding=!0}}},"./src/utils/ewma-bandwidth-estimator.ts":
/*!***********************************************!*\
!*** ./src/utils/ewma-bandwidth-estimator.ts ***!
\***********************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/ewma */"./src/utils/ewma.ts"),i=function(){function e(e,t,n){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new r.default(e),this.fast_=new r.default(t)}var t=e.prototype;return t.update=function(e,t){var n=this.slow_,i=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new r.default(e,n.getEstimate(),n.getTotalWeight())),this.fast_.halfLife!==t&&(this.fast_=new r.default(t,i.getEstimate(),i.getTotalWeight()))},t.sample=function(e,t){var n=(e=Math.max(e,this.minDelayMs_))/1e3,r=8*t/n;this.fast_.sample(n,r),this.slow_.sample(n,r)},t.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.destroy=function(){},e}();t.default=i},"./src/utils/ewma.ts":
/*!***************************!*\
!*** ./src/utils/ewma.ts ***!
\***************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=function(){function e(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}var t=e.prototype;return t.sample=function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_},e}();t.default=r},"./src/utils/fetch-loader.ts":
/*!***********************************!*\
!*** ./src/utils/fetch-loader.ts ***!
\***********************************/
/*! exports provided: fetchSupported, default */function(e,t,n){"use strict";n.r(t),n.d(t,"fetchSupported",(function(){return d}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),o=n(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts");function a(e){var t="function"==typeof Map?new Map:void 0;return(a=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,u(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)})(e)}function s(e,t,n){return(s=l()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&c(i,n.prototype),i}).apply(null,arguments)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function d(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1}var f=function(){function e(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||p,this.controller=new self.AbortController,this.stats=new i.LoadStats}var t=e.prototype;return t.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},t.abortInternal=function(){var e=this.response;e&&e.ok||(this.stats.aborted=!0,this.controller.abort())},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},t.load=function(e,t,n){var i=this,o=this.stats;if(o.loading.start)throw new Error("Loader can only be used once.");o.loading.start=self.performance.now();var a=function(e,t){var n={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(h({},e.headers))};return e.rangeEnd&&n.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1)),n}(e,this.controller.signal),s=n.onProgress,l="arraybuffer"===e.responseType,c=l?"byteLength":"length";this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,a),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout((function(){i.abortInternal(),n.onTimeout(o,e,i.response)}),t.timeout),self.fetch(this.request).then((function(n){if(i.response=i.loader=n,!n.ok){var a=n.status,c=n.statusText;throw new m(c||"fetch, bad network response",a,n)}return o.loading.first=Math.max(self.performance.now(),o.loading.start),o.total=parseInt(n.headers.get("Content-Length")||"0"),s&&Object(r.isFiniteNumber)(t.highWaterMark)?i.loadProgressively(n,o,e,t.highWaterMark,s):l?n.arrayBuffer():n.text()})).then((function(a){var l=i.response;self.clearTimeout(i.requestTimeout),o.loading.end=Math.max(self.performance.now(),o.loading.first),o.loaded=o.total=a[c];var u={url:l.url,data:a};s&&!Object(r.isFiniteNumber)(t.highWaterMark)&&s(o,e,a,l),n.onSuccess(u,o,e,l)})).catch((function(t){if(self.clearTimeout(i.requestTimeout),!o.aborted){var r=t.code||0;n.onError({code:r,text:t.message},e,t.details)}}))},t.getCacheAge=function(){var e=null;if(this.response){var t=this.response.headers.get("age");e=t?parseFloat(t):null}return e},t.loadProgressively=function(e,t,n,r,i){void 0===r&&(r=0);var a=new o.default,s=e.body.getReader();return function o(){return s.read().then((function(s){if(s.done)return a.dataLength&&i(t,n,a.flush(),e),Promise.resolve(new ArrayBuffer(0));var l=s.value,c=l.length;return t.loaded+=c,c<r||a.dataLength?(a.push(l),a.dataLength>=r&&i(t,n,a.flush(),e)):i(t,n,l,e),o()})).catch((function(){return Promise.reject()}))}()},e}();function p(e,t){return new self.Request(e.url,t)}var m=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this,t)||this).code=void 0,i.details=void 0,i.code=n,i.details=r,i}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),r}(a(Error));t.default=f},"./src/utils/imsc1-ttml-parser.ts":
/*!****************************************!*\
!*** ./src/utils/imsc1-ttml-parser.ts ***!
\****************************************/
/*! exports provided: IMSC1_CODEC, parseIMSC1 */function(e,t,n){"use strict";n.r(t),n.d(t,"IMSC1_CODEC",(function(){return u})),n.d(t,"parseIMSC1",(function(){return p}));var r=n(/*! ./mp4-tools */"./src/utils/mp4-tools.ts"),i=n(/*! ./vttparser */"./src/utils/vttparser.ts"),o=n(/*! ./vttcue */"./src/utils/vttcue.ts"),a=n(/*! ../demux/id3 */"./src/demux/id3.ts"),s=n(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),l=n(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts");function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var u="stpp.ttml.im1t",h=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,d=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,f={left:"start",center:"center",right:"end",start:"start",end:"end"};function p(e,t,n,i,u){var h=Object(r.findBox)(new Uint8Array(e),["mdat"]);if(0!==h.length){var d=h[0],p=Object(a.utf8ArrayToStr)(new Uint8Array(e,d.start,d.end-d.start)),x=Object(s.toTimescaleFromScale)(t,1,n);try{i(function(e,t){var n=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");var r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},i=Object.keys(r).reduce((function(e,t){return e[t]=n.getAttribute("ttp:"+t)||r[t],e}),{}),a="preserve"!==n.getAttribute("xml:space"),s=g(m(n,"styling","style")),u=g(m(n,"layout","region")),h=m(n,"body","[begin]");return[].map.call(h,(function(e){var n=function e(t,n){return[].slice.call(t.childNodes).reduce((function(t,r,i){var o;return"br"===r.nodeName&&i?t+"\n":null!==(o=r.childNodes)&&void 0!==o&&o.length?e(r,n):n?t+r.textContent.trim().replace(/\s+/g," "):t+r.textContent}),"")}(e,a);if(!n||!e.hasAttribute("begin"))return null;var r=b(e.getAttribute("begin"),i),h=b(e.getAttribute("dur"),i),d=b(e.getAttribute("end"),i);if(null===r)throw y(e);if(null===d){if(null===h)throw y(e);d=r+h}var p=new o.default(r-t,d-t,n);p.id=Object(l.generateCueId)(p.startTime,p.endTime,p.text);var m=u[e.getAttribute("region")],g=s[e.getAttribute("style")];p.position=10,p.size=80;var x=function(e,t){var n="http://www.w3.org/ns/ttml#styling";return["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"].reduce((function(r,i){var o=v(t,n,i)||v(e,n,i);return o&&(r[i]=o),r}),{})}(m,g),w=x.textAlign;if(w){var E=f[w];E&&(p.lineAlign=E),p.align=w}return c(p,x),p})).filter((function(e){return null!==e}))}(p,x))}catch(e){u(e)}}else u(new Error("Could not parse IMSC1 mdat"))}function m(e,t,n){var r=e.getElementsByTagName(t)[0];return r?[].slice.call(r.querySelectorAll(n)):[]}function g(e){return e.reduce((function(e,t){var n=t.getAttribute("xml:id");return n&&(e[n]=t),e}),{})}function v(e,t,n){return e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function y(e){return new Error("Could not parse ttml timestamp "+e)}function b(e,t){if(!e)return null;var n=Object(i.parseTimeStamp)(e);return null===n&&(h.test(e)?n=function(e,t){var n=h.exec(e),r=(0|n[4])+(0|n[5])/t.subFrameRate;return 3600*(0|n[1])+60*(0|n[2])+(0|n[3])+r/t.frameRate}(e,t):d.test(e)&&(n=function(e,t){var n=d.exec(e),r=Number(n[1]);switch(n[2]){case"h":return 3600*r;case"m":return 60*r;case"ms":return 1e3*r;case"f":return r/t.frameRate;case"t":return r/t.tickRate}return r}(e,t))),n}},"./src/utils/logger.ts":
/*!*****************************!*\
!*** ./src/utils/logger.ts ***!
\*****************************/
/*! exports provided: enableLogs, logger */function(e,t,n){"use strict";n.r(t),n.d(t,"enableLogs",(function(){return s})),n.d(t,"logger",(function(){return l}));var r=function(){},i={trace:r,debug:r,log:r,warn:r,info:r,error:r},o=i;function a(e){var t=self.console[e];return t?t.bind(self.console,"["+e+"] >"):r}function s(e){if(self.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n.forEach((function(t){o[t]=e[t]?e[t].bind(e):a(t)}))}(e,"debug","log","info","warn","error");try{o.log()}catch(e){o=i}}else o=i}var l=i},"./src/utils/mediakeys-helper.ts":
/*!***************************************!*\
!*** ./src/utils/mediakeys-helper.ts ***!
\***************************************/
/*! exports provided: KeySystems, requestMediaKeySystemAccess */function(e,t,n){"use strict";var r;n.r(t),n.d(t,"KeySystems",(function(){return r})),n.d(t,"requestMediaKeySystemAccess",(function(){return i})),function(e){e.WIDEVINE="com.widevine.alpha",e.PLAYREADY="com.microsoft.playready"}(r||(r={}));var i="undefined"!=typeof self&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null},"./src/utils/mediasource-helper.ts":
/*!*****************************************!*\
!*** ./src/utils/mediasource-helper.ts ***!
\*****************************************/
/*! exports provided: getMediaSource */function(e,t,n){"use strict";function r(){return self.MediaSource||self.WebKitMediaSource}n.r(t),n.d(t,"getMediaSource",(function(){return r}))},"./src/utils/mp4-tools.ts":
/*!********************************!*\
!*** ./src/utils/mp4-tools.ts ***!
\********************************/
/*! exports provided: bin2str, readUint16, readUint32, writeUint32, findBox, parseSegmentIndex, parseInitSegment, getStartDTS, getDuration, computeRawDurationFromSamples, offsetStartDTS, segmentValidRange, appendUint8Array */function(e,t,n){"use strict";n.r(t),n.d(t,"bin2str",(function(){return s})),n.d(t,"readUint16",(function(){return l})),n.d(t,"readUint32",(function(){return c})),n.d(t,"writeUint32",(function(){return u})),n.d(t,"findBox",(function(){return h})),n.d(t,"parseSegmentIndex",(function(){return d})),n.d(t,"parseInitSegment",(function(){return f})),n.d(t,"getStartDTS",(function(){return p})),n.d(t,"getDuration",(function(){return m})),n.d(t,"computeRawDurationFromSamples",(function(){return g})),n.d(t,"offsetStartDTS",(function(){return v})),n.d(t,"segmentValidRange",(function(){return y})),n.d(t,"appendUint8Array",(function(){return b}));var r=n(/*! ./typed-array */"./src/utils/typed-array.ts"),i=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),o=Math.pow(2,32)-1,a=[].push;function s(e){return String.fromCharCode.apply(null,e)}function l(e,t){"data"in e&&(t+=e.start,e=e.data);var n=e[t]<<8|e[t+1];return n<0?65536+n:n}function c(e,t){"data"in e&&(t+=e.start,e=e.data);var n=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return n<0?4294967296+n:n}function u(e,t,n){"data"in e&&(t+=e.start,e=e.data),e[t]=n>>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function h(e,t){var n,r,i,o=[];if(!t.length)return o;"data"in e?(n=e.data,r=e.start,i=e.end):(r=0,i=(n=e).byteLength);for(var l=r;l<i;){var u=c(n,l),d=u>1?l+u:i;if(s(n.subarray(l+4,l+8))===t[0])if(1===t.length)o.push({data:n,start:l+8,end:d});else{var f=h({data:n,start:l+8,end:d},t.slice(1));f.length&&a.apply(o,f)}l=d}return o}function d(e){var t=h(e,["moov"])[0],n=t?t.end:null,r=h(e,["sidx"]);if(!r||!r[0])return null;var i=[],o=r[0],a=o.data[0],s=0===a?8:16,u=c(o,s);s+=4,s+=0===a?8:16,s+=2;var d=o.end+0,f=l(o,s);s+=2;for(var p=0;p<f;p++){var m=s,g=c(o,m);m+=4;var v=2147483647&g;if(1==(2147483648&g)>>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var y=c(o,m);m+=4,i.push({referenceSize:v,subsegmentDuration:y,info:{duration:y/u,start:d,end:d+v-1}}),d+=v,s=m+=4}return{earliestPresentationTime:0,timescale:u,version:a,referencesCount:f,references:i,moovEndOffset:n}}function f(e){for(var t=[],n=h(e,["moov","trak"]),r=0;r<n.length;r++){var o=n[r],a=h(o,["tkhd"])[0];if(a){var l=a.data[a.start],u=0===l?12:20,d=c(a,u),f=h(o,["mdia","mdhd"])[0];if(f){var p=c(f,u=0===(l=f.data[f.start])?12:20),m=h(o,["mdia","hdlr"])[0];if(m){var g=s(m.data.subarray(m.start+8,m.start+12)),v={soun:i.ElementaryStreamTypes.AUDIO,vide:i.ElementaryStreamTypes.VIDEO}[g];if(v){var y=h(o,["mdia","minf","stbl","stsd"])[0],b=void 0;y&&(b=s(y.data.subarray(y.start+12,y.start+16))),t[d]={timescale:p,type:v},t[v]={timescale:p,id:d,codec:b}}}}}}return h(e,["moov","mvex","trex"]).forEach((function(e){var n=c(e,4),r=t[n];r&&(r.default={duration:c(e,12),flags:c(e,20)})})),t}function p(e,t){return h(t,["moof","traf"]).reduce((function(t,n){var r=h(n,["tfdt"])[0],i=r.data[r.start],o=h(n,["tfhd"]).reduce((function(t,n){var o=c(n,4),a=e[o];if(a){var s=c(r,4);1===i&&(s*=Math.pow(2,32),s+=c(r,8));var l=s/(a.timescale||9e4);if(isFinite(l)&&(null===t||l<t))return l}return t}),null);return null!==o&&isFinite(o)&&(null===t||o<t)?o:t}),null)||0}function m(e,t){for(var n=0,r=0,o=0,a=h(e,["moof","traf"]),s=0;s<a.length;s++){var l=a[s],u=h(l,["tfhd"])[0],f=t[c(u,4)];if(f){var p=f.default,m=c(u,0)|(null==p?void 0:p.flags),v=null==p?void 0:p.duration;8&m&&(v=c(u,2&m?12:8));for(var y=f.timescale||9e4,b=h(l,["trun"]),x=0;x<b.length;x++)n=v?v*c(b[x],4):g(b[x]),f.type===i.ElementaryStreamTypes.VIDEO?r+=n/y:f.type===i.ElementaryStreamTypes.AUDIO&&(o+=n/y)}}if(0===r&&0===o){var w=d(e);if(null!=w&&w.references)return w.references.reduce((function(e,t){return e+t.info.duration||0}),0)}return r||o}function g(e){var t=c(e,0),n=8;1&t&&(n+=4),4&t&&(n+=4);for(var r=0,i=c(e,4),o=0;o<i;o++)256&t&&(r+=c(e,n),n+=4),512&t&&(n+=4),1024&t&&(n+=4),2048&t&&(n+=4);return r}function v(e,t,n){h(t,["moof","traf"]).forEach((function(t){h(t,["tfhd"]).forEach((function(r){var i=c(r,4),a=e[i];if(a){var s=a.timescale||9e4;h(t,["tfdt"]).forEach((function(e){var t=e.data[e.start],r=c(e,4);if(0===t)u(e,4,r-n*s);else{r*=Math.pow(2,32),r+=c(e,8),r-=n*s,r=Math.max(r,0);var i=Math.floor(r/(o+1)),a=Math.floor(r%(o+1));u(e,4,i),u(e,8,a)}}))}}))}))}function y(e){var t={valid:null,remainder:null},n=h(e,["moof"]);if(!n)return t;if(n.length<2)return t.remainder=e,t;var i=n[n.length-1];return t.valid=Object(r.sliceUint8)(e,0,i.start-8),t.remainder=Object(r.sliceUint8)(e,i.start-8),t}function b(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}},"./src/utils/output-filter.ts":
/*!************************************!*\
!*** ./src/utils/output-filter.ts ***!
\************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}var t=e.prototype;return t.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},t.newCue=function(e,t,n){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},t.reset=function(){this.cueRanges=[]},e}()},"./src/utils/texttrack-utils.ts":
/*!**************************************!*\
!*** ./src/utils/texttrack-utils.ts ***!
\**************************************/
/*! exports provided: sendAddTrackEvent, addCueToTrack, clearCurrentCues, removeCuesInRange, getCuesInRange */function(e,t,n){"use strict";n.r(t),n.d(t,"sendAddTrackEvent",(function(){return i})),n.d(t,"addCueToTrack",(function(){return o})),n.d(t,"clearCurrentCues",(function(){return a})),n.d(t,"removeCuesInRange",(function(){return s})),n.d(t,"getCuesInRange",(function(){return l}));var r=n(/*! ./logger */"./src/utils/logger.ts");function i(e,t){var n;try{n=new Event("addtrack")}catch(e){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function o(e,t){var n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error("addCue is failed for: "+t)}catch(n){r.logger.debug("[texttrack-utils]: "+n);var i=new self.TextTrackCue(t.startTime,t.endTime,t.text);i.id=t.id,e.addCue(i)}"disabled"===n&&(e.mode=n)}function a(e){var t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(var n=e.cues.length;n--;)e.removeCue(e.cues[n]);"disabled"===t&&(e.mode=t)}function s(e,t,n){var r=e.mode;if("disabled"===r&&(e.mode="hidden"),e.cues&&e.cues.length>0)for(var i=l(e.cues,t,n),o=0;o<i.length;o++)e.removeCue(i[o]);"disabled"===r&&(e.mode=r)}function l(e,t,n){var r=[],i=function(e,t){if(t<e[0].startTime)return 0;var n=e.length-1;if(t>e[n].endTime)return-1;for(var r=0,i=n;r<=i;){var o=Math.floor((i+r)/2);if(t<e[o].startTime)i=o-1;else{if(!(t>e[o].startTime&&r<n))return o;r=o+1}}return e[r].startTime-t<t-e[i].startTime?r:i}(e,t);if(i>-1)for(var o=i,a=e.length;o<a;o++){var s=e[o];if(s.startTime>=t&&s.endTime<=n)r.push(s);else if(s.startTime>n)return r}return r}},"./src/utils/time-ranges.ts":
/*!**********************************!*\
!*** ./src/utils/time-ranges.ts ***!
\**********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default={toString:function(e){for(var t="",n=e.length,r=0;r<n;r++)t+="["+e.start(r).toFixed(3)+","+e.end(r).toFixed(3)+"]";return t}}},"./src/utils/timescale-conversion.ts":
/*!*******************************************!*\
!*** ./src/utils/timescale-conversion.ts ***!
\*******************************************/
/*! exports provided: toTimescaleFromBase, toTimescaleFromScale, toMsFromMpegTsClock, toMpegTsClockFromTimescale */function(e,t,n){"use strict";function r(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=!1);var i=e*t*n;return r?Math.round(i):i}function i(e,t,n,i){return void 0===n&&(n=1),void 0===i&&(i=!1),r(e,t,1/n,i)}function o(e,t){return void 0===t&&(t=!1),r(e,1e3,1/9e4,t)}function a(e,t){return void 0===t&&(t=1),r(e,9e4,1/t)}n.r(t),n.d(t,"toTimescaleFromBase",(function(){return r})),n.d(t,"toTimescaleFromScale",(function(){return i})),n.d(t,"toMsFromMpegTsClock",(function(){return o})),n.d(t,"toMpegTsClockFromTimescale",(function(){return a}))},"./src/utils/typed-array.ts":
/*!**********************************!*\
!*** ./src/utils/typed-array.ts ***!
\**********************************/
/*! exports provided: sliceUint8 */function(e,t,n){"use strict";function r(e,t,n){return Uint8Array.prototype.slice?e.slice(t,n):new Uint8Array(Array.prototype.slice.call(e,t,n))}n.r(t),n.d(t,"sliceUint8",(function(){return r}))},"./src/utils/vttcue.ts":
/*!*****************************!*\
!*** ./src/utils/vttcue.ts ***!
\*****************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default=function(){if("undefined"!=typeof self&&self.VTTCue)return self.VTTCue;var e=["","lr","rl"],t=["start","middle","end","left","right"];function n(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;var n=t.toLowerCase();return!!~e.indexOf(n)&&n}function r(e){return n(t,e)}function i(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var a in o)e[a]=o[a]}return e}function o(t,o,a){var s=this,l={enumerable:!0};s.hasBeenReset=!1;var c="",u=!1,h=t,d=o,f=a,p=null,m="",g=!0,v="auto",y="start",b=50,x="middle",w=50,E="middle";Object.defineProperty(s,"id",i({},l,{get:function(){return c},set:function(e){c=""+e}})),Object.defineProperty(s,"pauseOnExit",i({},l,{get:function(){return u},set:function(e){u=!!e}})),Object.defineProperty(s,"startTime",i({},l,{get:function(){return h},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");h=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",i({},l,{get:function(){return d},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",i({},l,{get:function(){return f},set:function(e){f=""+e,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",i({},l,{get:function(){return p},set:function(e){p=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",i({},l,{get:function(){return m},set:function(t){var r=function(t){return n(e,t)}(t);if(!1===r)throw new SyntaxError("An invalid or illegal string was specified.");m=r,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",i({},l,{get:function(){return g},set:function(e){g=!!e,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",i({},l,{get:function(){return v},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",i({},l,{get:function(){return y},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");y=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",i({},l,{get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},l,{get:function(){return x},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");x=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",i({},l,{get:function(){return w},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");w=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",i({},l,{get:function(){return E},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");E=t,this.hasBeenReset=!0}})),s.displayState=void 0}return o.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},o}()},"./src/utils/vttparser.ts":
/*!********************************!*\
!*** ./src/utils/vttparser.ts ***!
\********************************/
/*! exports provided: parseTimeStamp, fixLineBreaks, VTTParser */function(e,t,n){"use strict";n.r(t),n.d(t,"parseTimeStamp",(function(){return o})),n.d(t,"fixLineBreaks",(function(){return h})),n.d(t,"VTTParser",(function(){return d}));var r=n(/*! ./vttcue */"./src/utils/vttcue.ts"),i=function(){function e(){}return e.prototype.decode=function(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))},e}();function o(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+parseFloat(r||0)}var n=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return n?parseFloat(n[2])>59?t(n[2],n[3],0,n[4]):t(n[1],n[2],n[3],n[4]):null}var a=function(){function e(){this.values=Object.create(null)}var t=e.prototype;return t.set=function(e,t){this.get(e)||""===t||(this.values[e]=t)},t.get=function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},t.has=function(e){return e in this.values},t.alt=function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},t.integer=function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},t.percent=function(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){var n=parseFloat(t);if(n>=0&&n<=100)return this.set(e,n),!0}return!1},e}();function s(e,t,n,r){var i=r?e.split(r):[e];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(n);2===a.length&&t(a[0],a[1])}}var l=new r.default(0,0,""),c="middle"===l.align?"middle":"center";function u(e,t,n){var r=e;function i(){var t=o(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=i(),u(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),u(),t.endTime=i(),u(),function(e,t){var r=new a;s(e,(function(e,t){var i;switch(e){case"region":for(var o=n.length-1;o>=0;o--)if(n[o].id===t){r.set(e,n[o].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":i=t.split(","),r.integer(e,i[0]),r.percent(e,i[0])&&r.set("snapToLines",!1),r.alt(e,i[0],["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start",c,"end"]);break;case"position":i=t.split(","),r.percent(e,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start",c,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",c,"end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===l.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",c);var o=r.get("position","auto");"auto"===o&&50===l.position&&(o="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=o}(e,t)}function h(e){return e.replace(/<br(?: \/)?>/gi,"\n")}var d=function(){function e(){this.state="INITIAL",this.buffer="",this.decoder=new i,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var t=e.prototype;return t.parse=function(e){var t=this;function n(){var e=t.buffer,n=0;for(e=h(e);n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i="";if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var o=(i=n()).match(/^()?WEBVTT([ \t].*)?$/);if(!o||!o[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var a=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(a?a=!1:i=n(),t.state){case"HEADER":/:/.test(i)?s(i,(function(e,t){}),/:/):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new r.default(0,0,""),t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{u(i,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var l=-1!==i.indexOf("--\x3e");if(!i||l&&(a=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(null===t.cue)continue;t.cue.text&&(t.cue.text+="\n"),t.cue.text+=i;continue;case"BADCUE":i||(t.state="ID")}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},t.flush=function(){try{if((this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state||"BADWEBVTT"===this.state)throw new Error("Malformed WebVTT signature.")}catch(e){this.onparsingerror&&this.onparsingerror(e)}return this.onflush&&this.onflush(),this},e}()},"./src/utils/webvtt-parser.ts":
/*!************************************!*\
!*** ./src/utils/webvtt-parser.ts ***!
\************************************/
/*! exports provided: generateCueId, parseWebVTT */function(e,t,n){"use strict";n.r(t),n.d(t,"generateCueId",(function(){return h})),n.d(t,"parseWebVTT",(function(){return d}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./vttparser */"./src/utils/vttparser.ts"),o=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=n(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),s=n(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),l=/\r\n|\n\r|\n|\r/g,c=function(e,t,n){return void 0===n&&(n=0),e.substr(n,t.length)===t},u=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()};function h(e,t,n){return u(e.toString())+u(t.toString())+u(n)}function d(e,t,n,u,d,f,p,m){var g,v=new i.VTTParser,y=Object(o.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(l,"\n").split("\n"),b=[],x=Object(a.toMpegTsClockFromTimescale)(t,n),w="00:00.000",E=0,S=0,C=!0,k=!1;v.oncue=function(e){var t=u[d],n=u.ccOffset,r=(E-x)/9e4;if(null!=t&&t.new&&(void 0!==S?n=u.ccOffset=t.start:function(e,t,n){var r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);for(;null!==(o=i)&&void 0!==o&&o.new;){var o;e.ccOffset+=r.start-i.start,r.new=!1,i=e[(r=i).prevCC]}e.presentationOffset=n}(u,d,r)),r&&(n=r-u.presentationOffset),k){var i=e.endTime-e.startTime,o=Object(s.normalizePts)(9e4*(e.startTime+n-S),9e4*f)/9e4;e.startTime=o,e.endTime=o+i}var a=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(a)),e.id||(e.id=h(e.startTime,e.endTime,a)),e.endTime>0&&b.push(e)},v.onparsingerror=function(e){g=e},v.onflush=function(){g?m(g):p(b)},y.forEach((function(e){if(C){if(c(e,"X-TIMESTAMP-MAP=")){C=!1,k=!0,e.substr(16).split(",").forEach((function(e){c(e,"LOCAL:")?w=e.substr(6):c(e,"MPEGTS:")&&(E=parseInt(e.substr(7)))}));try{S=function(e){var t=parseInt(e.substr(-3)),n=parseInt(e.substr(-6,2)),i=parseInt(e.substr(-9,2)),o=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;if(!(Object(r.isFiniteNumber)(t)&&Object(r.isFiniteNumber)(n)&&Object(r.isFiniteNumber)(i)&&Object(r.isFiniteNumber)(o)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*n,t+=6e4*i,t+=36e5*o}(w)/1e3}catch(e){k=!1,g=e}return}""===e&&(C=!1)}v.parse(e+"\n")})),v.flush()}},"./src/utils/xhr-loader.ts":
/*!*********************************!*\
!*** ./src/utils/xhr-loader.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),o=/^age:\s*[\d.]+\s*$/m,a=function(){function e(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=e?e.xhrSetup:null,this.stats=new i.LoadStats,this.retryDelay=0}var t=e.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e=this.config,t=this.context;if(e){var n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(n,t.url)}catch(e){n.open("GET",t.url,!0),i(n,t.url)}n.readyState||n.open("GET",t.url,!0);var o=this.context.headers;if(o)for(var a in o)n.setRequestHeader(a,o[a])}catch(e){return void this.callbacks.onError({code:n.status,text:e.message},t,n)}t.rangeEnd&&n.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),n.onreadystatechange=this.readystatechange.bind(this),n.onprogress=this.loadprogress.bind(this),n.responseType=t.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),e.timeout),n.send()}},t.readystatechange=function(){var e=this.context,t=this.loader,n=this.stats;if(e&&t){var i=t.readyState,o=this.config;if(!n.aborted&&i>=2)if(self.clearTimeout(this.requestTimeout),0===n.loading.first&&(n.loading.first=Math.max(self.performance.now(),n.loading.start)),4===i){t.onreadystatechange=null,t.onprogress=null;var a=t.status;if(a>=200&&a<300){var s,l;if(n.loading.end=Math.max(self.performance.now(),n.loading.first),l="arraybuffer"===e.responseType?(s=t.response).byteLength:(s=t.responseText).length,n.loaded=n.total=l,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(n,e,s,t),!this.callbacks)return;var u={url:t.responseURL,data:s};this.callbacks.onSuccess(u,n,e,t)}else n.retry>=o.maxRetry||a>=400&&a<499?(r.logger.error(a+" while loading "+e.url),this.callbacks.onError({code:a,text:t.statusText},e,t)):(r.logger.warn(a+" while loading "+e.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,o.maxRetryDelay),n.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.timeout)}},t.loadtimeout=function(){r.logger.warn("timeout while loading "+this.context.url);var e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)},t.getCacheAge=function(){var e=null;if(this.loader&&o.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e},e}();t.default=a}}).default},e.exports=r())},vHTk:
/*!******************************************************!*\
!*** ./src/components/PreviewAll/index.less?modules ***!
\******************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:
/*!***************************************!*\
!*** ./node_modules/crypto-js/rc4.js ***!
\***************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./enc-base64 */"ETIr"),n(/*! ./md5 */"cv67"),n(/*! ./evpkdf */"K3mO"),n(/*! ./cipher-core */"OLod"),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var a=i%n,s=t[a>>>2]>>>24-a%4*8&255;o=(o+r[i]+s)%256;var l=r[i];r[i]=r[o],r[o]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[n],e[n]=o,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}e.RC4=t._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(a)}(),r.RC4)},wCXF:
/*!********************************************************!*\
!*** ./node_modules/rc-table/es/Table.js + 17 modules ***!
\********************************************************/
/*! exports provided: INTERNAL_HOOKS, default */
/*! exports used: INTERNAL_HOOKS, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return Z}));var r=n("rePB"),i=n("VTBJ"),o=n("KQm4"),a=n("U8pU"),s=n("ODXe"),l=n("q1tI"),c=n("TSYQ"),u=n.n(c),h=n("Gytx"),d=n.n(h),f=n("Kwbf"),p=n("t23M"),m=n("qx4F"),g=n("6eGT"),v=n("IBYe"),y=n("Ff2n"),b=n("c+Xe"),x=n("fyJ8"),w=n("biw7");function E(e,t,n,r,i){var o,a,s=n[e]||{},l=n[t]||{};"left"===s.fixed?o=r.left[e]:"right"===l.fixed&&(a=r.right[t]);var c=!1,u=!1,h=!1,d=!1,f=n[t+1],p=n[e-1];if("rtl"===i){if(void 0!==o)d=!(p&&"left"===p.fixed);else if(void 0!==a){h=!(f&&"right"===f.fixed)}}else if(void 0!==o){c=!(f&&"left"===f.fixed)}else if(void 0!==a){u=!(p&&"right"===p.fixed)}return{fixLeft:o,fixRight:a,lastFixLeft:c,firstFixRight:u,lastFixRight:h,firstFixLeft:d,isSticky:r.isSticky}}var S=n("sR1s");function C(e){var t,n=e.cells,r=e.stickyOffsets,i=e.flattenColumns,o=e.rowComponent,a=e.cellComponent,s=e.onHeaderRow,c=e.index,u=l.useContext(w.a),h=u.prefixCls,d=u.direction;s&&(t=s(n.map((function(e){return e.column})),c));var f=Object(S.a)(n.map((function(e){return e.column})));return l.createElement(o,Object.assign({},t),n.map((function(e,t){var n,o=e.column,s=E(e.colStart,e.colEnd,i,r,d);return o&&o.onHeaderCell&&(n=e.column.onHeaderCell(o)),l.createElement(x.a,Object.assign({},e,{ellipsis:o.ellipsis,align:o.align,component:a,prefixCls:h,key:f[t]},s,{additionalProps:n,rowType:"header"}))})))}C.displayName="HeaderRow";var k=C;var _=function(e){var t=e.stickyOffsets,n=e.columns,r=e.flattenColumns,i=e.onHeaderRow,o=l.useContext(w.a),a=o.prefixCls,s=o.getComponent,c=l.useMemo((function(){return function(e){var t=[];!function e(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t[i]=t[i]||[];var o=r,a=n.filter(Boolean).map((function(n){var r={key:n.key,className:n.className||"",children:n.title,column:n,colStart:o},a=1,s=n.children;return s&&s.length>0&&(a=e(s,o,i+1).reduce((function(e,t){return e+t}),0),r.hasSubColumns=!0),"colSpan"in n&&(a=n.colSpan),"rowSpan"in n&&(r.rowSpan=n.rowSpan),r.colSpan=a,r.colEnd=r.colStart+a-1,t[i].push(r),o+=a,a}));return a}(e,0);for(var n=t.length,r=function(e){t[e].forEach((function(t){"rowSpan"in t||t.hasSubColumns||(t.rowSpan=n-e)}))},i=0;i<n;i+=1)r(i);return t}(n)}),[n]),u=s(["header","wrapper"],"thead"),h=s(["header","row"],"tr"),d=s(["header","cell"],"th");return l.createElement(u,{className:"".concat(a,"-thead")},c.map((function(e,n){return l.createElement(k,{key:n,flattenColumns:r,cells:e,stickyOffsets:t,rowComponent:h,cellComponent:d,onHeaderRow:i,index:n})})))},T=n("hW8S");var O=function(e){for(var t=e.colWidths,n=e.columns,r=[],i=!1,o=(e.columCount||n.length)-1;o>=0;o-=1){var a=t[o],s=n&&n[o],c=s&&s[T.a];(a||c||i)&&(r.unshift(l.createElement("col",Object.assign({key:o,style:{width:a,minWidth:a}},c))),i=!0)}return l.createElement("colgroup",null,r)};var A=l.forwardRef((function(e,t){var n=e.noData,a=e.columns,s=e.flattenColumns,c=e.colWidths,h=e.columCount,d=e.stickyOffsets,f=e.direction,p=e.fixHeader,m=e.offsetHeader,g=e.stickyClassName,v=e.onScroll,x=Object(y.a)(e,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),E=l.useContext(w.a),S=E.prefixCls,C=E.scrollbarSize,k=E.isSticky,T=k&&!p?0:C,A=l.useRef(null),L=l.useCallback((function(e){Object(b.b)(t,e),Object(b.b)(A,e)}),[]);l.useEffect((function(){var e;function t(e){var t=e.currentTarget,n=e.deltaX;n&&(v({currentTarget:t,scrollLeft:t.scrollLeft+n}),e.preventDefault())}return null===(e=A.current)||void 0===e||e.addEventListener("wheel",t),function(){var e;null===(e=A.current)||void 0===e||e.removeEventListener("wheel",t)}}),[]);var D=s[s.length-1],I={fixed:D?D.fixed:null,onHeaderCell:function(){return{className:"".concat(S,"-cell-scrollbar")}}},R=Object(l.useMemo)((function(){return T?[].concat(Object(o.a)(a),[I]):a}),[T,a]),M=Object(l.useMemo)((function(){return T?[].concat(Object(o.a)(s),[I]):s}),[T,s]),N=Object(l.useMemo)((function(){var e=d.right,t=d.left;return Object(i.a)(Object(i.a)({},d),{},{left:"rtl"===f?[].concat(Object(o.a)(t.map((function(e){return e+T}))),[0]):t,right:"rtl"===f?e:[].concat(Object(o.a)(e.map((function(e){return e+T}))),[0]),isSticky:k})}),[T,d,k]),j=function(e,t){return Object(l.useMemo)((function(){for(var n=[],r=0;r<t;r+=1){var i=e[r];if(void 0===i)return null;n[r]=i}return n}),[e.join("_"),t])}(c,h);return l.createElement("div",{style:Object(i.a)({overflow:"hidden"},k?{top:m}:{}),ref:L,className:u()("".concat(S,"-header"),Object(r.a)({},g,!!g))},l.createElement("table",{style:{tableLayout:"fixed",visibility:n||j?null:"hidden"}},l.createElement(O,{colWidths:j?[].concat(Object(o.a)(j),[T]):[],columCount:h+1,columns:M}),l.createElement(_,Object.assign({},x,{stickyOffsets:N,columns:R,flattenColumns:M}))))}));A.displayName="FixedHeader";var L=A,D=l.createContext(null);var I=function(e){var t=e.prefixCls,n=e.children,r=e.component,i=e.cellComponent,o=e.fixHeader,a=e.fixColumn,s=e.horizonScroll,c=e.className,u=e.expanded,h=e.componentWidth,d=e.colSpan,f=l.useContext(w.a).scrollbarSize;return l.useMemo((function(){var e=n;return a&&(e=l.createElement("div",{style:{width:h-(o?f:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},e)),l.createElement(r,{className:c,style:{display:u?null:"none"}},l.createElement(x.a,{component:i,prefixCls:t,colSpan:d},e))}),[n,r,o,s,c,u,h,d,f])};function R(e){var t=e.className,n=e.style,r=e.record,o=e.index,a=e.rowKey,c=e.getRowKey,h=e.rowExpandable,d=e.expandedKeys,f=e.onRow,p=e.indent,m=void 0===p?0:p,g=e.rowComponent,v=e.cellComponent,y=e.childrenColumnName,b=l.useContext(w.a),E=b.prefixCls,C=b.fixedInfoList,k=l.useContext(D),_=k.fixHeader,T=k.fixColumn,O=k.horizonScroll,A=k.componentWidth,L=k.flattenColumns,M=k.expandableType,N=k.expandRowByClick,j=k.onTriggerExpand,P=k.rowClassName,B=k.expandedRowClassName,F=k.indentSize,U=k.expandIcon,H=k.expandedRowRender,z=k.expandIconColumnIndex,G=l.useState(!1),V=Object(s.a)(G,2),W=V[0],K=V[1],q=d&&d.has(e.recordKey);l.useEffect((function(){q&&K(!0)}),[q]);var X,Y="row"===M&&(!h||h(r)),$="nest"===M,J=y&&r&&r[y],Z=Y||$;f&&(X=f(r,o));var Q;"string"==typeof P?Q=P:"function"==typeof P&&(Q=P(r,o,m));var ee,te,ne=Object(S.a)(L),re=l.createElement(g,Object.assign({},X,{"data-row-key":a,className:u()(t,"".concat(E,"-row"),"".concat(E,"-row-level-").concat(m),Q,X&&X.className),style:Object(i.a)(Object(i.a)({},n),X?X.style:null),onClick:function(e){if(N&&Z&&j(r,e),X&&X.onClick){for(var t,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];(t=X).onClick.apply(t,[e].concat(i))}}}),L.map((function(e,t){var n,i,a=e.render,s=e.dataIndex,c=e.className,u=ne[t],h=C[t];return t===(z||0)&&$&&(n=l.createElement(l.Fragment,null,l.createElement("span",{style:{paddingLeft:"".concat(F*m,"px")},className:"".concat(E,"-row-indent indent-level-").concat(m)}),U({prefixCls:E,expanded:q,expandable:J,record:r,onExpand:j}))),e.onCell&&(i=e.onCell(r,o)),l.createElement(x.a,Object.assign({className:c,ellipsis:e.ellipsis,align:e.align,component:v,prefixCls:E,key:u,record:r,index:o,dataIndex:s,render:a,shouldCellUpdate:e.shouldCellUpdate},h,{appendNode:n,additionalProps:i}))})));if(Y&&(W||q)){var ie=H(r,o,m+1,q),oe=B&&B(r,o,m);ee=l.createElement(I,{expanded:q,className:u()("".concat(E,"-expanded-row"),"".concat(E,"-expanded-row-level-").concat(m+1),oe),prefixCls:E,fixHeader:_,fixColumn:T,horizonScroll:O,component:g,componentWidth:A,cellComponent:v,colSpan:L.length},ie)}return J&&q&&(te=(r[y]||[]).map((function(t,n){var r=c(t,n);return l.createElement(R,Object.assign({},e,{key:r,rowKey:r,record:t,recordKey:r,index:n,indent:m+1}))}))),l.createElement(l.Fragment,null,re,ee,te)}R.displayName="BodyRow";var M=R,N=l.createContext(null);function j(e){var t=e.columnKey,n=e.onColumnResize,r=l.useRef();return l.useEffect((function(){r.current&&n(t,r.current.offsetWidth)}),[]),l.createElement(p.a,{onResize:function(e){var r=e.offsetWidth;n(t,r)}},l.createElement("td",{ref:r,style:{padding:0,border:0,height:0}},l.createElement("div",{style:{height:0,overflow:"hidden"}}," ")))}var P=l.memo((function(e){var t=e.data,n=e.getRowKey,r=e.measureColumnWidth,i=e.expandedKeys,o=e.onRow,a=e.rowExpandable,s=e.emptyNode,c=e.childrenColumnName,u=l.useContext(N).onColumnResize,h=l.useContext(w.a),d=h.prefixCls,f=h.getComponent,p=l.useContext(D),m=p.fixHeader,g=p.horizonScroll,v=p.flattenColumns,y=p.componentWidth;return l.useMemo((function(){var e,h=f(["body","wrapper"],"tbody"),p=f(["body","row"],"tr"),b=f(["body","cell"],"td");e=t.length?t.map((function(e,t){var r=n(e,t);return l.createElement(M,{key:r,rowKey:r,record:e,recordKey:r,index:t,rowComponent:p,cellComponent:b,expandedKeys:i,onRow:o,getRowKey:n,rowExpandable:a,childrenColumnName:c})})):l.createElement(I,{expanded:!0,className:"".concat(d,"-placeholder"),prefixCls:d,fixHeader:m,fixColumn:g,horizonScroll:g,component:p,componentWidth:y,cellComponent:b,colSpan:v.length},s);var x=Object(S.a)(v);return l.createElement(h,{className:"".concat(d,"-tbody")},r&&l.createElement("tr",{"aria-hidden":"true",className:"".concat(d,"-measure-row"),style:{height:0}},x.map((function(e){return l.createElement(j,{key:e,columnKey:e,onColumnResize:u})}))),e)}),[t,d,o,r,i,n,f,y,s,v])}));P.displayName="Body";var B=P,F=n("wRmb"),U=n("xEkU"),H=n.n(U);function z(e){var t=Object(l.useRef)(e),n=Object(l.useState)({}),r=Object(s.a)(n,2)[1],i=Object(l.useRef)(null),o=Object(l.useRef)([]);return Object(l.useEffect)((function(){return function(){H.a.cancel(i.current)}}),[]),[t.current,function(e){null===i.current&&(o.current=[],i.current=H()((function(){o.current.forEach((function(e){t.current=e(t.current)})),i.current=null,r({})}))),o.current.push(e)}]}var G=function(e,t,n){return Object(l.useMemo)((function(){for(var r=[],i=[],o=0,a=0,s=0;s<t;s+=1)if("rtl"===n){i[s]=a,a+=e[s]||0;var l=t-s-1;r[l]=o,o+=e[l]||0}else{r[s]=o,o+=e[s]||0;var c=t-s-1;i[c]=a,a+=e[c]||0}return{left:r,right:i}}),[e,t,n])};var V=function(e){var t=e.className,n=e.children;return l.createElement("div",{className:t},n)},W=n("n6Qo");function K(e){var t,n=e.prefixCls,i=e.record,o=e.onExpand,a=e.expanded,s=e.expandable,c="".concat(n,"-row-expand-icon");if(!s)return l.createElement("span",{className:u()(c,"".concat(n,"-row-spaced"))});return l.createElement("span",{className:u()(c,(t={},Object(r.a)(t,"".concat(n,"-row-expanded"),a),Object(r.a)(t,"".concat(n,"-row-collapsed"),!a),t)),onClick:function(e){o(i,e),e.stopPropagation()}})}var q=n("zT1h"),X=n("y0+3"),Y=l.forwardRef((function(e,t){var n,o,a=e.scrollBodyRef,c=e.onScroll,h=e.offsetScroll,d=l.useContext(w.a).prefixCls,f=(null===(n=a.current)||void 0===n?void 0:n.scrollWidth)||0,p=(null===(o=a.current)||void 0===o?void 0:o.clientWidth)||0,g=f&&p*(p/f),v=l.useRef(),y=z({scrollLeft:0,isHiddenScrollBar:!1}),b=Object(s.a)(y,2),x=b[0],E=b[1],S=l.useRef({delta:0,x:0}),C=l.useState(!1),k=Object(s.a)(C,2),_=k[0],T=k[1],O=function(){T(!1)},A=function(e){var t,n=(e||(null===(t=window)||void 0===t?void 0:t.event)).buttons;if(_&&0!==n){var r=S.current.x+e.pageX-S.current.x-S.current.delta;r<=0&&(r=0),r+g>=p&&(r=p-g),c({scrollLeft:r/p*(f+2)}),S.current.x=e.pageX}else _&&T(!1)},L=function(){var e=Object(X.b)(a.current).top,t=e+a.current.offsetHeight,n=document.documentElement.scrollTop+window.innerHeight;t-Object(m.a)()<=n||e>=n-h?E((function(e){return Object(i.a)(Object(i.a)({},e),{},{isHiddenScrollBar:!0})})):E((function(e){return Object(i.a)(Object(i.a)({},e),{},{isHiddenScrollBar:!1})}))},D=function(e){E((function(t){return Object(i.a)(Object(i.a)({},t),{},{scrollLeft:e/f*p||0})}))};return l.useImperativeHandle(t,(function(){return{setScrollLeft:D}})),l.useEffect((function(){var e=Object(q.a)(document.body,"mouseup",O,!1),t=Object(q.a)(document.body,"mousemove",A,!1);return L(),function(){e.remove(),t.remove()}}),[g,_]),l.useEffect((function(){var e=Object(q.a)(window,"scroll",L,!1),t=Object(q.a)(window,"resize",L,!1);return function(){e.remove(),t.remove()}}),[]),l.useEffect((function(){x.isHiddenScrollBar||E((function(e){var t,n;return Object(i.a)(Object(i.a)({},e),{},{scrollLeft:a.current.scrollLeft/(null===(t=a.current)||void 0===t?void 0:t.scrollWidth)*(null===(n=a.current)||void 0===n?void 0:n.clientWidth)})}))}),[x.isHiddenScrollBar]),f<=p||!g||x.isHiddenScrollBar?null:l.createElement("div",{style:{height:Object(m.a)(),width:p,bottom:h},className:"".concat(d,"-sticky-scroll")},l.createElement("div",{onMouseDown:function(e){e.persist(),S.current.delta=e.pageX-x.scrollLeft,S.current.x=0,T(!0),e.preventDefault()},ref:v,className:u()("".concat(d,"-sticky-scroll-bar"),Object(r.a)({},"".concat(d,"-sticky-scroll-bar-active"),_)),style:{width:"".concat(g,"px"),transform:"translate3d(".concat(x.scrollLeft,"px, 0, 0)")}}))}));var $=[],J={},Z="rc-table-internal-hook",Q=l.memo((function(e){return e.children}),(function(e,t){return!!d()(e.props,t.props)&&(e.pingLeft!==t.pingLeft||e.pingRight!==t.pingRight)}));function ee(e){var t,n=e.prefixCls,c=e.className,h=e.rowClassName,d=e.style,g=e.data,v=e.rowKey,y=e.scroll,b=e.tableLayout,x=e.direction,C=e.title,k=e.footer,A=e.summary,I=e.id,R=e.showHeader,M=e.components,j=e.emptyText,P=e.onRow,U=e.onHeaderRow,H=e.internalHooks,q=e.transformColumns,X=e.internalRefs,ee=e.sticky,te=g||$,ne=!!te.length,re=l.useState(0),ie=Object(s.a)(re,2),oe=ie[0],ae=ie[1];l.useEffect((function(){ae(Object(m.a)())}));var se,le,ce,ue=l.useMemo((function(){return Object(S.c)(M,{})}),[M]),he=l.useCallback((function(e,t){return Object(S.b)(ue,e)||t}),[ue]),de=l.useMemo((function(){return"function"==typeof v?v:function(e){return e&&e[v]}}),[v]),fe=Object(T.c)(e),pe=fe.expandIcon,me=fe.expandedRowKeys,ge=fe.defaultExpandedRowKeys,ve=fe.defaultExpandAllRows,ye=fe.expandedRowRender,be=fe.onExpand,xe=fe.onExpandedRowsChange,we=fe.expandRowByClick,Ee=fe.rowExpandable,Se=fe.expandIconColumnIndex,Ce=fe.expandedRowClassName,ke=fe.childrenColumnName,_e=fe.indentSize,Te=pe||K,Oe=ke||"children",Ae=l.useMemo((function(){return ye?"row":!!(e.expandable&&H===Z&&e.expandable.__PARENT_RENDER_ICON__||te.some((function(e){return e&&"object"===Object(a.a)(e)&&e[Oe]})))&&"nest"}),[!!ye,te]),Le=l.useState((function(){return ge||(ve?function(e,t,n){var r=[];return function e(i){(i||[]).forEach((function(i,o){r.push(t(i,o)),e(i[n])}))}(e),r}(te,de,Oe):[])})),De=Object(s.a)(Le,2),Ie=De[0],Re=De[1],Me=l.useMemo((function(){return new Set(me||Ie||[])}),[me,Ie]),Ne=l.useCallback((function(e){var t,n=de(e,te.indexOf(e)),r=Me.has(n);r?(Me.delete(n),t=Object(o.a)(Me)):t=[].concat(Object(o.a)(Me),[n]),Re(t),be&&be(!r,e),xe&&xe(t)}),[de,Me,te,be,xe]),je=l.useState(0),Pe=Object(s.a)(je,2),Be=Pe[0],Fe=Pe[1],Ue=Object(F.b)(Object(i.a)(Object(i.a)(Object(i.a)({},e),fe),{},{expandable:!!ye,expandedKeys:Me,getRowKey:de,onTriggerExpand:Ne,expandIcon:Te,expandIconColumnIndex:Se,direction:x}),H===Z?q:null),He=Object(s.a)(Ue,2),ze=He[0],Ge=He[1],Ve=l.useMemo((function(){return{columns:ze,flattenColumns:Ge}}),[ze,Ge]),We=l.useRef(),Ke=l.useRef(),qe=l.useRef(),Xe=l.useState(!1),Ye=Object(s.a)(Xe,2),$e=Ye[0],Je=Ye[1],Ze=l.useState(!1),Qe=Object(s.a)(Ze,2),et=Qe[0],tt=Qe[1],nt=z(new Map),rt=Object(s.a)(nt,2),it=rt[0],ot=rt[1],at=Object(S.a)(Ge).map((function(e){return it.get(e)})),st=l.useMemo((function(){return at}),[at.join("_")]),lt=G(st,Ge.length,x),ct=y&&Object(S.d)(y.y),ut=y&&Object(S.d)(y.x),ht=ut&&Ge.some((function(e){return e.fixed})),dt=l.useRef(),ft=function(e,t){return l.useMemo((function(){var n=!!e;return{isSticky:n,stickyClassName:n?"".concat(t,"-sticky-header"):"",offsetHeader:"object"===Object(a.a)(e)&&e.offsetHeader||0,offsetScroll:"object"===Object(a.a)(e)&&e.offsetScroll||0}}),[e,t])}(ee,n),pt=ft.isSticky,mt=ft.offsetHeader,gt=ft.offsetScroll,vt=ft.stickyClassName;ct&&(le={overflowY:"scroll",maxHeight:y.y}),ut&&(se={overflowX:"auto"},ct||(le={overflowY:"hidden"}),ce={width:!0===y.x?"auto":y.x,minWidth:"100%"});var yt=l.useCallback((function(e,t){ot((function(n){var r=new Map(n);return r.set(e,t),r}))}),[]),bt=function(e){var t=Object(l.useRef)(e),n=Object(l.useRef)(null);function r(){window.clearTimeout(n.current)}return Object(l.useEffect)((function(){return r}),[]),[function(e){t.current=e,r(),n.current=window.setTimeout((function(){t.current=null,n.current=null}),100)},function(){return t.current}]}(null),xt=Object(s.a)(bt,2),wt=xt[0],Et=xt[1];function St(e,t){t&&("function"==typeof t?t(e):t.scrollLeft!==e&&(t.scrollLeft=e))}var Ct=function(e){var t,n=e.currentTarget,r=e.scrollLeft,i="number"==typeof r?r:n.scrollLeft,o=n||J;Et()&&Et()!==o||(wt(o),St(i,Ke.current),St(i,qe.current),St(i,null===(t=dt.current)||void 0===t?void 0:t.setScrollLeft));if(n){var a=n.scrollWidth,s=n.clientWidth;Je(i>0),tt(i<a-s)}},kt=function(){qe.current&&Ct({currentTarget:qe.current})};l.useEffect((function(){return kt}),[]),l.useEffect((function(){ut&&kt()}),[ut]),l.useEffect((function(){H===Z&&X&&(X.body.current=qe.current)}));var _t,Tt,Ot=he(["table"],"table"),At=l.useMemo((function(){return b||(ht?"max-content"===y.x?"auto":"fixed":ct||Ge.some((function(e){return e.ellipsis}))?"fixed":"auto")}),[ct,ht,Ge,b]),Lt={colWidths:st,columCount:Ge.length,stickyOffsets:lt,onHeaderRow:U,fixHeader:ct},Dt=l.useMemo((function(){return ne?null:"function"==typeof j?j():j}),[ne,j]),It=l.createElement(B,{data:te,measureColumnWidth:ct||ut||pt,expandedKeys:Me,rowExpandable:Ee,getRowKey:de,onRow:P,emptyNode:Dt,childrenColumnName:Oe}),Rt=l.createElement(O,{colWidths:Ge.map((function(e){return e.width})),columns:Ge}),Mt=A&&l.createElement(W.b,null,A(te)),Nt=he(["body"]);ct||pt?("function"==typeof Nt?(Tt=Nt(te,{scrollbarSize:oe,ref:qe,onScroll:Ct}),Lt.colWidths=Ge.map((function(e,t){var n=e.width,r=t===ze.length-1?n-oe:n;return"number"!=typeof r||Number.isNaN(r)?(Object(f.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0):r}))):Tt=l.createElement("div",{style:Object(i.a)(Object(i.a)({},se),le),onScroll:Ct,ref:qe,className:u()("".concat(n,"-body"))},l.createElement(Ot,{style:Object(i.a)(Object(i.a)({},ce),{},{tableLayout:At})},Rt,It,Mt),pt&&l.createElement(Y,{ref:dt,offsetScroll:gt,scrollBodyRef:qe,onScroll:Ct})),_t=l.createElement(l.Fragment,null,!1!==R&&l.createElement(L,Object.assign({noData:!te.length},Lt,Ve,{direction:x,offsetHeader:mt,stickyClassName:vt,ref:Ke,onScroll:Ct})),Tt)):_t=l.createElement("div",{style:Object(i.a)(Object(i.a)({},se),le),className:u()("".concat(n,"-content")),onScroll:Ct,ref:qe},l.createElement(Ot,{style:Object(i.a)(Object(i.a)({},ce),{},{tableLayout:At})},Rt,!1!==R&&l.createElement(_,Object.assign({},Lt,Ve)),It,Mt));var jt=Object(T.b)(e),Pt=l.createElement("div",Object.assign({className:u()(n,c,(t={},Object(r.a)(t,"".concat(n,"-rtl"),"rtl"===x),Object(r.a)(t,"".concat(n,"-ping-left"),$e),Object(r.a)(t,"".concat(n,"-ping-right"),et),Object(r.a)(t,"".concat(n,"-layout-fixed"),"fixed"===b),Object(r.a)(t,"".concat(n,"-fixed-header"),ct),Object(r.a)(t,"".concat(n,"-fixed-column"),ht),Object(r.a)(t,"".concat(n,"-scroll-horizontal"),ut),Object(r.a)(t,"".concat(n,"-has-fix-left"),Ge[0]&&Ge[0].fixed),Object(r.a)(t,"".concat(n,"-has-fix-right"),Ge[Ge.length-1]&&"right"===Ge[Ge.length-1].fixed),t)),style:d,id:I,ref:We},jt),l.createElement(Q,{pingLeft:$e,pingRight:et,props:Object(i.a)(Object(i.a)({},e),{},{stickyOffsets:lt,mergedExpandedKeys:Me})},C&&l.createElement(V,{className:"".concat(n,"-title")},C(te)),l.createElement("div",{className:"".concat(n,"-container")},_t),k&&l.createElement(V,{className:"".concat(n,"-footer")},k(te))));ut&&(Pt=l.createElement(p.a,{onResize:function(e){var t=e.width;kt(),Fe(We.current?We.current.offsetWidth:t)}},Pt));var Bt=l.useMemo((function(){return{prefixCls:n,getComponent:he,scrollbarSize:oe,direction:x,fixedInfoList:Ge.map((function(e,t){return E(t,t,Ge,lt,x)})),isSticky:pt}}),[n,he,oe,x,Ge,lt,x,pt]),Ft=l.useMemo((function(){return Object(i.a)(Object(i.a)({},Ve),{},{tableLayout:At,rowClassName:h,expandedRowClassName:Ce,componentWidth:Be,fixHeader:ct,fixColumn:ht,horizonScroll:ut,expandIcon:Te,expandableType:Ae,expandRowByClick:we,expandedRowRender:ye,onTriggerExpand:Ne,expandIconColumnIndex:Se,indentSize:_e})}),[Ve,At,h,Ce,Be,ct,ht,ut,Te,Ae,we,ye,Ne,Se,_e]),Ut=l.useMemo((function(){return{onColumnResize:yt}}),[yt]);return l.createElement(w.a.Provider,{value:Bt},l.createElement(D.Provider,{value:Ft},l.createElement(N.Provider,{value:Ut},Pt)))}ee.Column=v.a,ee.ColumnGroup=g.a,ee.Summary=W.a,ee.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};t.b=ee},wRmb:
/*!******************************************************!*\
!*** ./node_modules/rc-table/es/hooks/useColumns.js ***!
\******************************************************/
/*! exports provided: convertChildrenToColumns, default */
/*! exports used: convertChildrenToColumns, default */function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),o=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),s=n(/*! react */"q1tI"),l=(n(/*! rc-util/es/warning */"Kwbf"),n(/*! rc-util/es/Children/toArray */"Zm9Q")),c=n(/*! ../utils/legacyUtil */"hW8S");function u(e){return Object(l.a)(e).filter((function(e){return s.isValidElement(e)})).map((function(e){var t=e.key,n=e.props,r=n.children,i=Object(a.a)(n,["children"]),s=Object(o.a)({key:t},i);return r&&(s.children=u(r)),s}))}function h(e){return e.reduce((function(e,t){var n=t.fixed,r=!0===n?"left":n,a=t.children;return a&&a.length>0?[].concat(Object(i.a)(e),Object(i.a)(h(a).map((function(e){return Object(o.a)({fixed:r},e)})))):[].concat(Object(i.a)(e),[Object(o.a)(Object(o.a)({},t),{},{fixed:r})])}),[])}t.b=function(e,t){var n=e.prefixCls,i=e.columns,l=e.children,d=e.expandable,f=e.expandedKeys,p=e.getRowKey,m=e.onTriggerExpand,g=e.expandIcon,v=e.rowExpandable,y=e.expandIconColumnIndex,b=e.direction,x=e.expandRowByClick,w=s.useMemo((function(){return i||u(l)}),[i,l]),E=s.useMemo((function(){if(d){var e,t=y||0,i=w[t],o=(e={},Object(r.a)(e,c.a,{className:"".concat(n,"-expand-icon-col")}),Object(r.a)(e,"title",""),Object(r.a)(e,"fixed",i?i.fixed:null),Object(r.a)(e,"className","".concat(n,"-row-expand-icon-cell")),Object(r.a)(e,"render",(function(e,t,r){var i=p(t,r),o=f.has(i),a=!v||v(t),l=g({prefixCls:n,expanded:o,expandable:a,record:t,onExpand:m});return x?s.createElement("span",{onClick:function(e){return e.stopPropagation()}},l):l})),e),a=w.slice();return t>=0&&a.splice(t,0,o),a}return w}),[d,w,p,f,g,b]),S=s.useMemo((function(){var e=E;return t&&(e=t(e)),e.length||(e=[{render:function(){return null}}]),e}),[t,E,b]),C=s.useMemo((function(){return"rtl"===b?function(e){return e.map((function(e){var t=e.fixed,n=Object(a.a)(e,["fixed"]),r=t;return"left"===t?r="right":"right"===t&&(r="left"),Object(o.a)({fixed:r},n)}))}(h(S)):h(S)}),[S,b]);return[S,C]}},wU8J:
/*!*********************************************!*\
!*** ./node_modules/qr.js/lib/BitBuffer.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(){this.buffer=new Array,this.length=0}n.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=n},wZgz:
/*!***************************************!*\
!*** ./node_modules/crypto-js/aes.js ***!
\***************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./enc-base64 */"ETIr"),n(/*! ./md5 */"cv67"),n(/*! ./evpkdf */"K3mO"),n(/*! ./cipher-core */"OLod"),function(){var e=r,t=e.lib.BlockCipher,n=e.algo,i=[],o=[],a=[],s=[],l=[],c=[],u=[],h=[],d=[],f=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var m=e[n],g=e[m],v=e[g],y=257*e[p]^16843008*p;a[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,l[n]=y<<8|y>>>24,c[n]=y,y=16843009*v^65537*g^257*m^16843008*n,u[p]=y<<24|y>>>8,h[p]=y<<16|y>>>16,d[p]=y<<8|y>>>24,f[p]=y,n?(n=m^e[e[e[v^m]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a<r;a++)a<n?o[a]=t[a]:(c=o[a-1],a%n?n>6&&a%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[a/n|0]<<24),o[a]=o[a-n]^c);for(var s=this._invKeySchedule=[],l=0;l<r;l++){if(a=r-l,l%4)var c=o[a];else c=o[a-4];s[l]=l<4||a<=4?c:u[i[c>>>24]]^h[i[c>>>16&255]]^d[i[c>>>8&255]]^f[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,l,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,h,d,f,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,a,s){for(var l=this._nRounds,c=e[t]^n[0],u=e[t+1]^n[1],h=e[t+2]^n[2],d=e[t+3]^n[3],f=4,p=1;p<l;p++){var m=r[c>>>24]^i[u>>>16&255]^o[h>>>8&255]^a[255&d]^n[f++],g=r[u>>>24]^i[h>>>16&255]^o[d>>>8&255]^a[255&c]^n[f++],v=r[h>>>24]^i[d>>>16&255]^o[c>>>8&255]^a[255&u]^n[f++],y=r[d>>>24]^i[c>>>16&255]^o[u>>>8&255]^a[255&h]^n[f++];c=m,u=g,h=v,d=y}m=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[h>>>8&255]<<8|s[255&d])^n[f++],g=(s[u>>>24]<<24|s[h>>>16&255]<<16|s[d>>>8&255]<<8|s[255&c])^n[f++],v=(s[h>>>24]<<24|s[d>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^n[f++],y=(s[d>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&h])^n[f++],e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=y},keySize:8});e.AES=t._createHelper(m)}(),r.AES)},wbyO:
/*!*************************************************!*\
!*** ./node_modules/crypto-js/enc-base64url.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o;e.exports=(o=n(/*! ./core */"Ib8C"),i=(r=o).lib.WordArray,r.enc.Base64url={stringify:function(e,t=!0){var n=e.words,r=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],a=0;a<r;a+=3)for(var s=(n[a>>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,l=0;l<4&&a+.75*l<r;l++)o.push(i.charAt(s>>>6*(3-l)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e,t=!0){var n=e.length,r=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var a=0;a<r.length;a++)o[r.charCodeAt(a)]=a}var s=r.charAt(64);if(s){var l=e.indexOf(s);-1!==l&&(n=l)}return function(e,t,n){for(var r=[],o=0,a=0;a<t;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2,l=n[e.charCodeAt(a)]>>>6-a%4*2,c=s|l;r[o>>>2]|=c<<24-o%4*8,o++}return i.create(r,o)}(e,n,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},o.enc.Base64url)},"y0+3":
/*!********************************************!*\
!*** ./node_modules/rc-util/es/Dom/css.js ***!
\********************************************/
/*! exports provided: get, set, getOuterWidth, getOuterHeight, getDocSize, getClientSize, getScroll, getOffset */
/*! exports used: getClientSize, getOffset */function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));function r(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}function i(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}},zrhs:
/*!******************************************************!*\
!*** ./src/components/AuthenticationModel/index.tsx ***!
\******************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/modal/style */"2qtc");var r=n(/*! antd/es/modal */"kLXV"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties */"PpiC"),o=n(/*! react */"q1tI"),a=n.n(o),s=n(/*! umi */"9kvl");t.a=Object(s.a)((function(e){var t=e.shixunsDetail,n=e.loading;return{shixunsDetail:t,globalSetting:e.globalSetting,loading:n.models.index}}))((function(e){var t=e.shixunsDetail,n=(e.globalSetting,e.loading,e.dispatch);Object(i.a)(e,["shixunsDetail","globalSetting","loading","dispatch"]);return a.a.createElement(r.a,{centered:!0,keyboard:!1,closable:!1,zIndex:6666,title:"提示",visible:"Banner-Auth"===t.actionTabs.key,okText:"确定",cancelText:"取消",onOk:function(){n({type:"shixunsDetail/setActionTabs",payload:{}}),window.location.href="/account/certification"},onCancel:function(){n({type:"shixunsDetail/setActionTabs",payload:{}})}},a.a.createElement("p",{className:"tc font16"},"当前竞赛需要实名认证,请先完成实名认证后再报名参赛",a.a.createElement("br",null),"请问是否前往进行认证?"))}))}}]);