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__Question__AddOrEdit.a482...

1371 lines
1.4 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([[181,5,6,7,9,10],{"+NIl":
/*!***************************************************!*\
!*** ./node_modules/codemirror/mode/stex/stex.js ***!
\***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){!function(e){"use strict";e.defineMode("stex",(function(e,t){function r(e,t){e.cmdState.push(t)}function n(e){return e.cmdState.length>0?e.cmdState[e.cmdState.length-1]:null}function i(e,t,r){return function(){this.name=e,this.bracketNo=0,this.style=t,this.styles=r,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 r(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=n(t))?(i.closeBracket(u),a(t,c),"bracket"):"error":"{"==u||"["==u?(r(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,r=t.length-1;r>=0;r--){var n=t[r];if("DEFAULT"!=n.name)return n}return{styleIdentifier:function(){return null}}}(t)).name&&(i.argument=e.current()),i.styleIdentifier())}function l(e,t,r){if(e.eatSpace())return null;if(r&&e.match(r))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 n=e.next();return"{"==n||"}"==n||"["==n||"]"==n||"("==n||")"==n?"bracket":"%"==n?(e.skipToEnd(),"comment"):"error"}function c(e,t){var r=e.peek();return"{"==r||"["==r?(n(t).openBracket(r),e.eat(r),a(t,s),"bracket"):/[ \t\r]/.test(r)?(e.eat(r),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")}(r(/*! ../../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,r){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function r(e){t(e);var r=e.state.placeholder=document.createElement("pre");r.style.cssText="height: 0; overflow: visible",r.style.direction=e.getOption("direction"),r.className="CodeMirror-placeholder CodeMirror-line-like";var n=e.getOption("placeholder");"string"==typeof n&&(n=document.createTextNode(n)),r.appendChild(n),e.display.lineSpace.insertBefore(r,e.display.lineSpace.firstChild)}function n(e){o(e)&&r(e)}function i(e){var n=e.getWrapperElement(),i=o(e);n.className=n.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?r(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",n),o.on("change",i),o.on("swapDoc",i),e.on(o.getInputField(),"compositionupdate",o.state.placeholderCompose=function(){!function(e){setTimeout((function(){var n=!1,i=e.getInputField();"TEXTAREA"==i.nodeName?n=!i.value:1==e.lineCount()&&(n=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),n?r(e):t(e)}),20)}(o)}),i(o);else if(!a&&l){o.off("blur",n),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()&&n(o)}))}(r(/*! ../../lib/codemirror */"VrN/"))},"1T2W":
/*!*******************************************************************!*\
!*** ./src/pages/Question/AddOrEdit/CodePanel/index.less?modules ***!
\*******************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){e.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"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,r){!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},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(n,i){var o,a,s=n.indentUnit,l={},c=i.htmlMode?t:r;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function d(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();return"<"==n?e.eat("!")?e.eat("[")?e.match("CDATA[")?r(h("atom","]]>")):null:e.match("--")?r(h("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(function e(t){return function(r,n){for(var i;null!=(i=r.next());){if("<"==i)return n.tokenize=e(t+1),n.tokenize(r,n);if(">"==i){if(1==t){n.tokenize=d;break}return n.tokenize=e(t-1),n.tokenize(r,n)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=h("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):"&"==n?(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 f(e,t){var r,n,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=d,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){t.tokenize=d,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=(r=i,(n=function(e,t){for(;!e.eol();)if(e.next()==r){t.tokenize=f;break}return"string"}).isInAttribute=!0,n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=d;break}r.next()}return e}}function p(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(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 r;;){if(!e.context)return;if(r=e.context.tagName,!l.contextGrabbers.hasOwnProperty(r)||!l.contextGrabbers[r].hasOwnProperty(t))return;m(e)}}function v(e,t,r){return"openTag"==e?(r.tagStart=t.column(),b):"closeTag"==e?y:v}function b(e,t,r){return"word"==e?(r.tagName=t.current(),a="tag",E):l.allowMissingTagName&&"endTag"==e?(a="tag bracket",E(e,0,r)):(a="error",b)}function y(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&l.implicitlyClosed.hasOwnProperty(r.context.tagName)&&m(r),r.context&&r.context.tagName==n||!1===l.matchClosing?(a="tag",x):(a="tag error",w)}return l.allowMissingTagName&&"endTag"==e?(a="tag bracket",x(e,0,r)):(a="error",w)}function x(e,t,r){return"endTag"!=e?(a="error",x):(m(r),v)}function w(e,t,r){return a="error",x(e,0,r)}function E(e,t,r){if("word"==e)return a="attribute",S;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(n)?g(r,n):(g(r,n),r.context=new p(r,n,i==r.indented)),v}return a="error",E}function S(e,t,r){return"equals"==e?_:(l.allowMissing||(a="error"),E(e,0,r))}function _(e,t,r){return"string"==e?T:"word"==e&&l.allowUnquoted?(a="string",E):(a="error",E(e,0,r))}function T(e,t,r){return"string"==e?T:E(e,0,r)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,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 r=t.tokenize(e,t);return(r||o)&&"comment"!=r&&(a=null,t.state=t.state(o||r,e,t),a&&(r="error"==a?r+" error":a)),r},indent:function(t,r,n){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!=f&&t.tokenize!=d)return n?n.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(r))return 0;var o=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);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==_&&(e.state=E)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],r=e.context;r;r=r.prev)r.tagName&&t.push(r.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})}(r(/*! ../../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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),r(/*! ./x64-core */"MlIO"),function(){var e=n,t=e.lib.Hasher,r=e.x64,i=r.Word,o=r.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 r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],u=r[5],d=r[6],f=r[7],h=n.high,p=n.low,m=i.high,g=i.low,v=o.high,b=o.low,y=a.high,x=a.low,w=s.high,E=s.low,S=u.high,_=u.low,T=d.high,k=d.low,O=f.high,C=f.low,A=h,D=p,L=m,I=g,j=v,R=b,M=y,N=x,P=w,F=E,B=S,U=_,H=T,z=k,G=O,K=C,W=0;W<80;W++){var V,q,X=c[W];if(W<16)q=X.high=0|e[t+2*W],V=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,re=ee.low,ne=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,ie=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>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+((V=Q+se)>>>0<Q>>>0?1:0))+ne+((V+=ie)>>>0<ie>>>0?1:0))+ce+((V+=ue)>>>0<ue>>>0?1:0),X.high=q,X.low=V}var de,fe=P&B^~P&H,he=F&U^~F&z,pe=A&L^A&j^L&j,me=D&I^D&R^I&R,ge=(A>>>28|D<<4)^(A<<30|D>>>2)^(A<<25|D>>>7),ve=(D>>>28|A<<4)^(D<<30|A>>>2)^(D<<25|A>>>7),be=(P>>>14|F<<18)^(P>>>18|F<<14)^(P<<23|F>>>9),ye=(F>>>14|P<<18)^(F>>>18|P<<14)^(F<<23|P>>>9),xe=l[W],we=xe.high,Ee=xe.low,Se=G+be+((de=K+ye)>>>0<K>>>0?1:0),_e=ve+me;G=H,K=z,H=B,z=U,B=P,U=F,P=M+(Se=(Se=(Se=Se+fe+((de+=he)>>>0<he>>>0?1:0))+we+((de+=Ee)>>>0<Ee>>>0?1:0))+q+((de+=V)>>>0<V>>>0?1:0))+((F=N+de|0)>>>0<N>>>0?1:0)|0,M=j,N=R,j=L,R=I,L=A,I=D,A=Se+(ge+pe+(_e>>>0<ve>>>0?1:0))+((D=de+_e|0)>>>0<de>>>0?1:0)|0}p=n.low=p+D,n.high=h+A+(p>>>0<D>>>0?1:0),g=i.low=g+I,i.high=m+L+(g>>>0<I>>>0?1:0),b=o.low=b+R,o.high=v+j+(b>>>0<R>>>0?1:0),x=a.low=x+N,a.high=y+M+(x>>>0<N>>>0?1:0),E=s.low=E+F,s.high=w+P+(E>>>0<F>>>0?1:0),_=u.low=_+U,u.high=S+B+(_>>>0<U>>>0?1:0),k=d.low=k+z,d.high=T+H+(k>>>0<z>>>0?1:0),C=f.low=C+K,f.high=O+G+(C>>>0<K>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,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)}(),n.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,r){var n,i,o,a,s,l,c,u;e.exports=(u=r(/*! ./core */"Ib8C"),i=(n=u).lib,o=i.WordArray,a=i.Hasher,s=n.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 r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[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 d=(n<<5|n>>>27)+s+l[c];d+=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=n,n=d}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=a._createHelper(c),n.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){},"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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),r(/*! ./x64-core */"MlIO"),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,a=t.x64.Word,s=t.algo,l=[],c=[],u=[];!function(){for(var e=1,t=0,r=0;r<24;r++){l[e+5*t]=(r+1)*(r+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}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,d=0,f=0;f<7;f++){if(1&i){var h=(1<<f)-1;h<32?d^=1<<h:s^=1<<h-32}128&i?i=i<<1^113:i<<=1}u[o]=a.create(s,d)}}();var d=[];!function(){for(var e=0;e<25;e++)d[e]=a.create()}();var f=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 r=this._state,n=this.blockSize/2,i=0;i<n;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),(C=r[i]).high^=a,C.low^=o}for(var s=0;s<24;s++){for(var f=0;f<5;f++){for(var h=0,p=0,m=0;m<5;m++)h^=(C=r[f+5*m]).high,p^=C.low;var g=d[f];g.high=h,g.low=p}for(f=0;f<5;f++){var v=d[(f+4)%5],b=d[(f+1)%5],y=b.high,x=b.low;for(h=v.high^(y<<1|x>>>31),p=v.low^(x<<1|y>>>31),m=0;m<5;m++)(C=r[f+5*m]).high^=h,C.low^=p}for(var w=1;w<25;w++){var E=(C=r[w]).high,S=C.low,_=l[w];_<32?(h=E<<_|S>>>32-_,p=S<<_|E>>>32-_):(h=S<<_-32|E>>>64-_,p=E<<_-32|S>>>64-_);var T=d[c[w]];T.high=h,T.low=p}var k=d[0],O=r[0];for(k.high=O.high,k.low=O.low,f=0;f<5;f++)for(m=0;m<5;m++){var C=r[w=f+5*m],A=d[w],D=d[(f+1)%5+5*m],L=d[(f+2)%5+5*m];C.high=A.high^~D.high&L.high,C.low=A.low^~D.low&L.low}C=r[0];var I=u[s];C.high^=I.high,C.low^=I.low}},_doFinalize:function(){var t=this._data,r=t.words,n=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(e.ceil((n+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u<l;u++){var d=a[u],f=d.high,h=d.low;f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),c.push(h),c.push(f)}return new i.init(c,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});t.SHA3=o._createHelper(f),t.HmacSHA3=o._createHmacHelper(f)}(Math),n.SHA3)},"5nXd":
/*!************************************************!*\
!*** ./node_modules/store/src/store-engine.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){var n=r(/*! ./util */"MFOe"),i=n.slice,o=n.pluck,a=n.each,s=n.bind,l=n.create,c=n.isList,u=n.isFunction,d=n.isObject;e.exports={createStore:h};var f={version:"2.0.12",enabled:!1,get:function(e,t){var r=this.storage.read(this._namespacePrefix+e);return this._deserialize(r,t)},set:function(e,t){return void 0===t?this.remove(e):(this.storage.write(this._namespacePrefix+e,this._serialize(t)),t)},remove:function(e){this.storage.remove(this._namespacePrefix+e)},each:function(e){var t=this;this.storage.each((function(r,n){e.call(t,t._deserialize(r),(n||"").replace(t._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(e){return this._namespacePrefix=="__storejs_"+e+"_"},createStore:function(){return h.apply(this,arguments)},addPlugin:function(e){this._addPlugin(e)},namespace:function(e){return h(this.storage,this.plugins,e)}};function h(e,t,r){r||(r=""),e&&!c(e)&&(e=[e]),t&&!c(t)&&(t=[t]);var n=r?"__storejs_"+r+"_":"",h=r?new RegExp("^"+n):null;if(!/^[a-zA-Z0-9_\-]*$/.test(r))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var p=l({_namespacePrefix:n,_namespaceRegexp:h,_testStorage:function(e){try{var t="__storejs__test__";e.write(t,t);var r=e.read(t)===t;return e.remove(t),r}catch(e){return!1}},_assignPluginFnProp:function(e,t){var r=this[t];this[t]=function(){var t=i(arguments,0),n=this;function o(){if(r)return a(arguments,(function(e,r){t[r]=e})),r.apply(n,t)}var s=[o].concat(t);return e.apply(n,s)}},_serialize:function(e){return JSON.stringify(e)},_deserialize:function(e,t){if(!e)return t;var r="";try{r=JSON.parse(e)}catch(t){r=e}return void 0!==r?r:t},_addStorage:function(e){this.enabled||this._testStorage(e)&&(this.storage=e,this.enabled=!0)},_addPlugin:function(e){var t=this;if(c(e))a(e,(function(e){t._addPlugin(e)}));else if(!o(this.plugins,(function(t){return e===t}))){if(this.plugins.push(e),!u(e))throw new Error("Plugins must be function values that return objects");var r=e.call(this);if(!d(r))throw new Error("Plugins must return an object of function properties");a(r,(function(r,n){if(!u(r))throw new Error("Bad plugin property: "+n+" from plugin "+e.name+". Plugins should only return functions.");t._assignPluginFnProp(r,n)}))}},addStorage:function(e){!function(){var e="undefined"==typeof console?null:console;if(e){var t=e.warn?e.warn:e.log;t.apply(e,arguments)}}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(e)}},f,{plugins:[]});return p.raw={},a(p,(function(e,t){u(e)&&(p.raw[t]=s(p,e))})),a(e,(function(e){p._addStorage(e)})),a(t,(function(e){p._addPlugin(e)})),p}},"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,r){"use strict";r.d(t,"a",(function(){return _}));var n=r("wx14"),i=r("rePB"),o=r("VTBJ"),a=r("1OyB"),s=r("vuIU"),l=r("Ji7U"),c=r("LK+K"),u=r("q1tI"),d=r.n(u),f=r("TSYQ"),h=r.n(f),p=function(e){var t,r="".concat(e.rootPrefixCls,"-item"),n=h()(r,"".concat(r,"-").concat(e.page),(t={},Object(i.a)(t,"".concat(r,"-active"),e.active),Object(i.a)(t,e.className,!!e.className),Object(i.a)(t,"".concat(r,"-disabled"),!e.page),t));return d.a.createElement("li",{title:e.showTitle?e.page:null,className:n,onClick:function(){e.onClick(e.page)},onKeyPress:function(t){e.onKeyPress(t,e.onClick,e.page)},tabIndex:"0"},e.itemRender(e.page,"page",d.a.createElement("a",{rel:"nofollow"},e.page)))},m=13,g=38,v=40,b=function(e){Object(l.a)(r,e);var t=Object(c.a)(r);function r(){var e;Object(a.a)(this,r);for(var n=arguments.length,i=new Array(n),o=0;o<n;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 r=e.props,n=r.goButton,i=r.quickGo,o=r.rootPrefixCls,a=e.state.goInputText;n||""===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)(r,[{key:"getValidValue",value:function(){var e=this.state,t=e.goInputText,r=e.current;return!t||isNaN(t)?r:Number(t)}},{key:"getPageSizeOptions",value:function(){var e=this.props,t=e.pageSize,r=e.pageSizeOptions;return r.some((function(e){return e.toString()===t.toString()}))?r:r.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,r=t.pageSize,n=t.locale,i=t.rootPrefixCls,o=t.changeSize,a=t.quickGo,s=t.goButton,l=t.selectComponentClass,c=t.buildOptionText,u=t.selectPrefixCls,f=t.disabled,h=this.state.goInputText,p="".concat(i,"-options"),m=l,g=null,v=null,b=null;if(!o&&!a)return null;var y=this.getPageSizeOptions();if(o&&m){var x=y.map((function(t,r){return d.a.createElement(m.Option,{key:r,value:t.toString()},(c||e.buildOptionText)(t))}));g=d.a.createElement(m,{disabled:f,prefixCls:u,showSearch:!1,className:"".concat(p,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(r||y[0]).toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode}},x)}return a&&(s&&(b="boolean"==typeof s?d.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:f,className:"".concat(p,"-quick-jumper-button")},n.jump_to_confirm):d.a.createElement("span",{onClick:this.go,onKeyUp:this.go},s)),v=d.a.createElement("div",{className:"".concat(p,"-quick-jumper")},n.jump_to,d.a.createElement("input",{disabled:f,type:"text",value:h,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),n.page,b)),d.a.createElement("li",{className:"".concat(p)},g,v)}}]),r}(d.a.Component);b.defaultProps={pageSizeOptions:["10","20","50","100"]};var y=b,x=r("N2Kk");function w(){}function E(e,t,r){var n=void 0===e?t.pageSize:e;return Math.floor((r.total-1)/n)+1}var S=function(e){Object(l.a)(r,e);var t=Object(c.a)(r);function r(e){var n;Object(a.a)(this,r),(n=t.call(this,e)).getJumpPrevPage=function(){return Math.max(1,n.state.current-(n.props.showLessItems?3:5))},n.getJumpNextPage=function(){return Math.min(E(void 0,n.state,n.props),n.state.current+(n.props.showLessItems?3:5))},n.getItemIcon=function(e,t){var r=n.props.prefixCls,i=e||d.a.createElement("button",{type:"button","aria-label":t,className:"".concat(r,"-item-link")});return"function"==typeof e&&(i=d.a.createElement(e,Object(o.a)({},n.props))),i},n.savePaginationNode=function(e){n.paginationNode=e},n.isValid=function(e){return"number"==typeof(t=e)&&isFinite(t)&&Math.floor(t)===t&&e!==n.state.current;var t},n.shouldDisplayQuickJumper=function(){var e=n.props,t=e.showQuickJumper,r=e.pageSize;return!(e.total<=r)&&t},n.handleKeyDown=function(e){e.keyCode!==g&&e.keyCode!==v||e.preventDefault()},n.handleKeyUp=function(e){var t=n.getValidValue(e);t!==n.state.currentInputValue&&n.setState({currentInputValue:t}),e.keyCode===m?n.handleChange(t):e.keyCode===g?n.handleChange(t-1):e.keyCode===v&&n.handleChange(t+1)},n.changePageSize=function(e){var t=n.state.current,r=E(e,n.state,n.props);t=t>r?r:t,0===r&&(t=n.state.current),"number"==typeof e&&("pageSize"in n.props||n.setState({pageSize:e}),"current"in n.props||n.setState({current:t,currentInputValue:t})),n.props.onShowSizeChange(t,e),"onChange"in n.props&&n.props.onChange&&n.props.onChange(t,e)},n.handleChange=function(e){var t=n.props.disabled,r=e;if(n.isValid(r)&&!t){var i=E(void 0,n.state,n.props);r>i?r=i:r<1&&(r=1),"current"in n.props||n.setState({current:r,currentInputValue:r});var o=n.state.pageSize;return n.props.onChange(r,o),r}return n.state.current},n.prev=function(){n.hasPrev()&&n.handleChange(n.state.current-1)},n.next=function(){n.hasNext()&&n.handleChange(n.state.current+1)},n.jumpPrev=function(){n.handleChange(n.getJumpPrevPage())},n.jumpNext=function(){n.handleChange(n.getJumpNextPage())},n.hasPrev=function(){return n.state.current>1},n.hasNext=function(){return n.state.current<E(void 0,n.state,n.props)},n.runIfEnter=function(e,t){if("Enter"===e.key||13===e.charCode){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];t.apply(void 0,n)}},n.runIfEnterPrev=function(e){n.runIfEnter(e,n.prev)},n.runIfEnterNext=function(e){n.runIfEnter(e,n.next)},n.runIfEnterJumpPrev=function(e){n.runIfEnter(e,n.jumpPrev)},n.runIfEnterJumpNext=function(e){n.runIfEnter(e,n.jumpNext)},n.handleGoTO=function(e){e.keyCode!==m&&"click"!==e.type||n.handleChange(n.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)),n.state={current:s,currentInputValue:s,pageSize:l},n}return Object(s.a)(r,[{key:"componentDidUpdate",value:function(e,t){var r=this.props.prefixCls;if(t.current!==this.state.current&&this.paginationNode){var n=this.paginationNode.querySelector(".".concat(r,"-item-").concat(t.current));n&&document.activeElement===n&&n.blur()}}},{key:"getValidValue",value:function(e){var t=e.target.value,r=E(void 0,this.state,this.props),n=this.state.currentInputValue;return""===t?t:isNaN(Number(t))?n:t>=r?r:Number(t)}},{key:"getShowSizeChanger",value:function(){var e=this.props,t=e.showSizeChanger,r=e.total,n=e.totalBoundaryShowSizeChanger;return void 0!==t?t:r>n}},{key:"renderPrev",value:function(e){var t=this.props,r=t.prevIcon,n=(0,t.itemRender)(e,"prev",this.getItemIcon(r,"prev page")),i=!this.hasPrev();return Object(u.isValidElement)(n)?Object(u.cloneElement)(n,{disabled:i}):n}},{key:"renderNext",value:function(e){var t=this.props,r=t.nextIcon,n=(0,t.itemRender)(e,"next",this.getItemIcon(r,"next page")),i=!this.hasNext();return Object(u.isValidElement)(n)?Object(u.cloneElement)(n,{disabled:i}):n}},{key:"render",value:function(){var e=this,t=this.props,r=t.prefixCls,o=t.className,a=t.style,s=t.disabled,l=t.hideOnSinglePage,c=t.total,f=t.locale,m=t.showQuickJumper,g=t.showLessItems,v=t.showTitle,b=t.showTotal,x=t.simple,w=t.itemRender,S=t.showPrevNextJumpers,_=t.jumpPrevIcon,T=t.jumpNextIcon,k=t.selectComponentClass,O=t.selectPrefixCls,C=t.pageSizeOptions,A=this.state,D=A.current,L=A.pageSize,I=A.currentInputValue;if(!0===l&&c<=L)return null;var j=E(void 0,this.state,this.props),R=[],M=null,N=null,P=null,F=null,B=null,U=m&&m.goButton,H=g?1:2,z=D-1>0?D-1:0,G=D+1<j?D+1:j,K=Object.keys(this.props).reduce((function(t,r){return"data-"!==r.substr(0,5)&&"aria-"!==r.substr(0,5)&&"role"!==r||(t[r]=e.props[r]),t}),{});if(x)return U&&(B="boolean"==typeof U?d.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},f.jump_to_confirm):d.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},U),B=d.a.createElement("li",{title:v?"".concat(f.jump_to).concat(D,"/").concat(j):null,className:"".concat(r,"-simple-pager")},B)),d.a.createElement("ul",Object(n.a)({className:h()(r,"".concat(r,"-simple"),Object(i.a)({},"".concat(r,"-disabled"),s),o),style:a,ref:this.savePaginationNode},K),d.a.createElement("li",{title:v?f.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:h()("".concat(r,"-prev"),Object(i.a)({},"".concat(r,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(z)),d.a.createElement("li",{title:v?"".concat(D,"/").concat(j):null,className:"".concat(r,"-simple-pager")},d.a.createElement("input",{type:"text",value:I,disabled:s,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),d.a.createElement("span",{className:"".concat(r,"-slash")},"/"),j),d.a.createElement("li",{title:v?f.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:h()("".concat(r,"-next"),Object(i.a)({},"".concat(r,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(G)),B);if(j<=3+2*H){var W={locale:f,rootPrefixCls:r,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:v,itemRender:w};j||R.push(d.a.createElement(p,Object(n.a)({},W,{key:"noPager",page:j,className:"".concat(r,"-disabled")})));for(var V=1;V<=j;V+=1){var q=D===V;R.push(d.a.createElement(p,Object(n.a)({},W,{key:V,page:V,active:q})))}}else{var X=g?f.prev_3:f.prev_5,Y=g?f.next_3:f.next_5;S&&(M=d.a.createElement("li",{title:v?X:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:h()("".concat(r,"-jump-prev"),Object(i.a)({},"".concat(r,"-jump-prev-custom-icon"),!!_))},w(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(_,"prev page"))),N=d.a.createElement("li",{title:v?Y:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:h()("".concat(r,"-jump-next"),Object(i.a)({},"".concat(r,"-jump-next-custom-icon"),!!T))},w(this.getJumpNextPage(),"jump-next",this.getItemIcon(T,"next page")))),F=d.a.createElement(p,{locale:f,last:!0,rootPrefixCls:r,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:j,page:j,active:!1,showTitle:v,itemRender:w}),P=d.a.createElement(p,{locale:f,rootPrefixCls:r,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:v,itemRender:w});var $=Math.max(1,D-H),J=Math.min(D+H,j);D-1<=H&&(J=1+2*H),j-D<=H&&($=j-2*H);for(var Z=$;Z<=J;Z+=1){var Q=D===Z;R.push(d.a.createElement(p,{locale:f,rootPrefixCls:r,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Z,page:Z,active:Q,showTitle:v,itemRender:w}))}D-1>=2*H&&3!==D&&(R[0]=Object(u.cloneElement)(R[0],{className:"".concat(r,"-item-after-jump-prev")}),R.unshift(M)),j-D>=2*H&&D!==j-2&&(R[R.length-1]=Object(u.cloneElement)(R[R.length-1],{className:"".concat(r,"-item-before-jump-next")}),R.push(N)),1!==$&&R.unshift(P),J!==j&&R.push(F)}var ee=null;b&&(ee=d.a.createElement("li",{className:"".concat(r,"-total-text")},b(c,[0===c?0:(D-1)*L+1,D*L>c?c:D*L])));var te=!this.hasPrev()||!j,re=!this.hasNext()||!j;return d.a.createElement("ul",Object(n.a)({className:h()(r,o,Object(i.a)({},"".concat(r,"-disabled"),s)),style:a,unselectable:"unselectable",ref:this.savePaginationNode},K),ee,d.a.createElement("li",{title:v?f.prev_page:null,onClick:this.prev,tabIndex:te?null:0,onKeyPress:this.runIfEnterPrev,className:h()("".concat(r,"-prev"),Object(i.a)({},"".concat(r,"-disabled"),te)),"aria-disabled":te},this.renderPrev(z)),R,d.a.createElement("li",{title:v?f.next_page:null,onClick:this.next,tabIndex:re?null:0,onKeyPress:this.runIfEnterNext,className:h()("".concat(r,"-next"),Object(i.a)({},"".concat(r,"-disabled"),re)),"aria-disabled":re},this.renderNext(G)),d.a.createElement(y,{disabled:s,locale:f,rootPrefixCls:r,selectComponentClass:k,selectPrefixCls:O,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:D,pageSize:L,pageSizeOptions:C,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:U}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r={};if("current"in e&&(r.current=e.current,e.current!==t.current&&(r.currentInputValue=r.current)),"pageSize"in e&&e.pageSize!==t.pageSize){var n=t.current,i=E(e.pageSize,t,e);n=n>i?i:n,"current"in e||(r.current=n,r.currentInputValue=n),r.pageSize=e.pageSize}return r}}]),r}(d.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,r){return r},totalBoundaryShowSizeChanger:50};var _=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,r){"use strict";var n=r(/*! ./Table */"wCXF"),i=r(/*! ./Footer */"n6Qo");r.d(t,"b",(function(){return i.a}));r(/*! ./sugar/Column */"IBYe"),r(/*! ./sugar/ColumnGroup */"6eGT");var o=r(/*! ./utils/legacyUtil */"hW8S");r.d(t,"a",(function(){return o.a})),t.c=n.b},"6eGT":
/*!*******************************************************!*\
!*** ./node_modules/rc-table/es/sugar/ColumnGroup.js ***!
\*******************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,r){"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,r){"use strict";var n="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(!n)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(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,r=(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(r))throw TypeError("Stringified UUID is invalid");return r};t.a=function(e,t,r){var n=(e=e||{}).random||(e.rng||o)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return u(n)}},"7ahc":
/*!*************************************************************!*\
!*** ./src/components/markdown-editor/code-block/index.tsx ***!
\*************************************************************/
/*! exports provided: default, MyCodeMirror */
/*! exports used: MyCodeMirror, default */function(e,t,r){"use strict";r.d(t,"a",(function(){return g}));var n=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),i=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),o=(r(/*! antd/es/button/style */"+L6B"),r(/*! antd/es/button */"2/Rp")),a=(r(/*! antd/es/form/style */"y8nQ"),r(/*! antd/es/form */"Vl3Y")),s=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=(r(/*! antd/es/select/style */"OaEy"),r(/*! antd/es/select */"2fM7")),c=r(/*! react */"q1tI"),u=r.n(c),d=r(/*! codemirror */"VrN/"),f=r.n(d),h=(r(/*! codemirror/lib/codemirror.css */"p77/"),r(/*! 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,r=e.onChange,i=e.mode,o=e.options,a=void 0===o?{}:o,l=Object(c.useRef)(),d=Object(c.useState)(),h=Object(s.a)(d,2),p=h[0],m=h[1];return Object(c.useEffect)((function(){if(p){function e(e){var t=e.getValue();r&&r(t)}return p.on("change",e),function(){p.off("change",e)}}}),[p,r]),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=f.a.fromTextArea(l.current,Object(n.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,r=e.onCancel,n=Object(c.useState)("python"),d=Object(s.a)(n,2),f=d[0],v=d[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(h,{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:f})),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:r},"取消")))}},"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,r){"use strict";r.d(t,"e",(function(){return c})),r.d(t,"c",(function(){return u})),r.d(t,"d",(function(){return d})),r.d(t,"a",(function(){return h})),r.d(t,"f",(function(){return p})),r.d(t,"b",(function(){return m}));var n=r(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=r(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),o=r(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),a=r(/*! rc-util/es/Children/toArray */"Zm9Q"),s=r(/*! rc-util/es/warning */"Kwbf"),l=r(/*! ../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 r=t.key,n=t.props,a=n.children,c=Object(o.a)(n,["children"]),u=Object(i.a)({key:r},c),d=e(a);return d.length&&(u.children=d),u})).filter((function(e){return e}))}(e)}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=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,d){var f=Object(l.h)(s?s.pos:"0",d),h=c(u.key,f),p=Object(i.a)(Object(i.a)({},u),{},{parent:s,pos:f,children:null,data:u,isStart:[].concat(Object(n.a)(s?s.isStart:[]),[0===d]),isEnd:[].concat(Object(n.a)(s?s.isEnd:[]),[d===e.length-1])});return o.push(p),!0===t||r.has(h)?p.children=a(u.children||[],p):p.children=[],p}))}return a(e),o}function f(e,t,r){var n;r?"string"==typeof r?n=function(e){return e[r]}:"function"==typeof r&&(n=function(e){return r(e)}):n=function(e,t){return c(e.key,t)},function r(i,o,a){var s=i?i.children:e,c=i?Object(l.h)(a.pos,o):"0";if(i){var u=n(i,c),d={node:i,index:o,pos:c,key:u,parentPos:a.node?a.pos:null,level:a.level+1};t(d)}s&&s.forEach((function(e,t){r(e,t,{node:i,pos:c,level:a?a.level+1:-1})}))}(null)}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.initWrapper,n=t.processEntity,i=t.onProcessFinished,o=arguments.length>2?arguments[2]:void 0,a={},s={},l={posEntities:a,keyEntities:s};return r&&(l=r(l)||l),f(e,(function(e){var t=e.node,r=e.index,i=e.pos,o=e.key,u=e.parentPos,d={node:t,index:r,key:o,pos:i,level:e.level},f=c(o,i);a[i]=d,s[f]=d,d.parent=a[u],d.parent&&(d.parent.children=d.parent.children||[],d.parent.children.push(d)),n&&n(d,l)}),o),i&&i(l),l}function p(e,t){var r=t.expandedKeys,n=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!==r.indexOf(e),selected:-1!==n.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,r=e.expanded,n=e.selected,o=e.checked,a=e.loaded,l=e.loading,c=e.halfChecked,u=e.dragOver,d=e.dragOverGapTop,f=e.dragOverGapBottom,h=e.pos,p=e.active,m=Object(i.a)(Object(i.a)({},t),{},{expanded:r,selected:n,checked:o,loaded:a,loading:l,halfChecked:c,dragOver:u,dragOverGapTop:d,dragOverGapBottom:f,pos:h,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,r){!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 r=e.modeInfo[t];r.mimes&&(r.mime=r.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var r=0;r<e.modeInfo.length;r++){var n=e.modeInfo[r];if(n.mime==t)return n;if(n.mimes)for(var i=0;i<n.mimes.length;i++)if(n.mimes[i]==t)return n}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 r=0;r<e.modeInfo.length;r++){var n=e.modeInfo[r];if(n.ext)for(var i=0;i<n.ext.length;i++)if(n.ext[i]==t)return n}},e.findModeByFileName=function(t){for(var r=0;r<e.modeInfo.length;r++){var n=e.modeInfo[r];if(n.file&&n.file.test(t))return n}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 r=0;r<e.modeInfo.length;r++){var n=e.modeInfo[r];if(n.name.toLowerCase()==t)return n;if(n.alias)for(var i=0;i<n.alias.length;i++)if(n.alias[i].toLowerCase()==t)return n}}}(r(/*! ../lib/codemirror */"VrN/"))},"9Bee":
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! 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 ./src/components/PreviewAll/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
/*! 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,r){"use strict";var n=r("k1fw"),i=r("tJVT"),o=r("q1tI"),a=r.n(o),s=(r("vg9a"),r("DlQD")),l=r.n(s),c=r("rUJ1");var u=[],d=["<ul>"],f=new l.a.Renderer,h=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function p(){u.length=0,d=["<ul>"]}var m={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function g(){return function e(t,r,n,i){if(r>=t.length||t[r].level<=n)return r;var o=t[r];i.push("<li><a href='#"+o.anchor+"'>"+o.text+"</a>");var a=[];return r=e(t,++r,o.level,a),a.length>0&&(i.push("<ul>"),a.forEach((function(e){i.push(e)})),i.push("</ul>")),i.push("</li>"),r=e(t,r,n,i)}(u,0,0,d),d.push("</ul>"),d.join("")}var v={heading:function(e){var t=h.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 r=t[0],n=function(e,t){var r=e.match(/^(\s+)(?:```)/);if(null===r)return t;var n=r[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:Object(i.a)(t,1)[0].length>=n.length?e.slice(n.length):e})).join("\n")}(r,t[3]||""),o=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(o)>=0){var a=x(),s=n;n=a,w[a]={type:"block",expression:s}}return{type:"code",raw:r,lang:o,text:n}}}},b=/(?:\${2})([^\n`]+?)(?:\${2})/gi,y=0,x=function(){return"__special_katext_id_".concat(y++,"__")},w={};function E(){y=0,w={}}function S(e){return e=e.replace(b,(function(e,t){var r=x();return w[r]={type:"inline",expression:t},r}))}var _=f.listitem;f.listitem=function(e){return _(S(e))};var T=f.paragraph;f.paragraph=function(e){return T(S(e))};var k=f.tablecell;f.tablecell=function(e,t){return k(S(e),t)},f.code=function(e,t,r){var n=(t||"").match(/\S*/)[0];return n?["latex","katex","math"].indexOf(n)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(t,'">').concat(r?e:Object(c.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(r?e:Object(c.escape)(e,!0))+"</code></pre>"},f.heading=function(e,t,r){var n=this.options.headerPrefix+r.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return u.push({anchor:n,level:t,text:e}),"<h"+t+' id="'+n+'">'+e+"</h"+t+">"},l.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),l.a.use({tokenizer:v,renderer:f});var O=l.a,C=(r("SJMd"),r("ulZh")),A=r.n(C),D=r("m3rI"),L=r("Oy/b"),I=r("p5ED"),j=/<pre[^>]*>/g;t.a=function(e){var t=e.value,r=void 0===t?"":t,s=e.className,l=e.showTextOnly,c=e.showLines,u=e.style,d=void 0===u?{}:u,f=e.stylesPrev,h=void 0===f?{}:f,v=String(r),b=Object(o.useState)(""),y=Object(i.a)(b,2),x=y[0],S=y[1],_=Object(o.useMemo)((function(){try{v=(v=v.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+D.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+D.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+D.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=O(v),t=w;if(v.match(/\[TOC\]/)&&(e=e.replace("<p>[TOC]</p>",g()),p()),e=(e=e.replace(/(__special_katext_id_\d+__)/g,(function(e,r){var n=t[r],i=n.type,o=n.expression;return Object(L.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,"▁▁▁"),E(),l){var r=document.createElement("div");return r.innerHTML=e,r.innerText}return setTimeout((function(){return C()}),500),e}),[v]),T=Object(o.useRef)();function k(e){var t=e.target;if("A"===t.tagName.toUpperCase()){var r=t.getAttribute("href");if(r.indexOf("office")>-1)e.preventDefault(),S(r);else if(r.startsWith("#")){e.preventDefault();var n=document.getElementById(r.replace("#",""));n&&n.scrollIntoView(!0)}}}m.WebkitLineClamp=c,c&&(d=Object(n.a)(Object(n.a)({},d),m));var C=function(){var e,t=null===(e=T.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(A.a.isSupported()){var t=new A.a;t.loadSource(e.src),t.attachMedia(e)}}))};return Object(o.useEffect)((function(){if(T.current&&_&&_.match(j)&&window.PR.prettyPrint(),T.current)return T.current.addEventListener("click",k),function(){T.current.removeEventListener("click",k),E(),p()}}),[_,T.current,k]),a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{ref:T,style:Object(n.a)({},d),className:"".concat(s||""," markdown-body "),dangerouslySetInnerHTML:{__html:_}}),a.a.createElement(I.a,{close:!0,data:x,type:null!=x&&x.length?"office":"",style:Object(n.a)({},h),onClose:function(){return S("")}}))}},"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,r){var n,i,o;e.exports=(o=r(/*! ./core */"Ib8C"),r(/*! ./cipher-core */"OLod"),o.mode.CTR=(n=o.lib.BlockCipherMode.extend(),i=n.Encryptor=n.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,i=this._iv,o=this._counter;i&&(o=this._counter=i.slice(0),this._iv=void 0);var a=o.slice(0);r.encryptBlock(a,0),o[n-1]=o[n-1]+1|0;for(var s=0;s<n;s++)e[t+s]^=a[s]}}),n.Decryptor=i,n),o.mode.CTR)},"9VGf":
/*!****************************************!*\
!*** ./src/components/useInterval.tsx ***!
\****************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(/*! react */"q1tI");function i(e,t){var r=Object(n.useRef)();Object(n.useEffect)((function(){r.current=e})),Object(n.useEffect)((function(){if(null!==t){var e=setInterval((function(){r.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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),r(/*! ./cipher-core */"OLod"),n.mode.CFB=function(){var e=n.lib.BlockCipherMode.extend();function t(e,t,r,n){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,n.encryptBlock(i,0);for(var a=0;a<r;a++)e[t+a]^=i[a]}return e.Encryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize;t.call(this,e,r,i,n),this._prevBlock=e.slice(r,r+i)}}),e.Decryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize,o=e.slice(r,r+i);t.call(this,e,r,i,n),this._prevBlock=o}}),e}(),n.mode.CFB)},B7Ph:
/*!**************************************************************************************!*\
!*** ./src/pages/Shixuns/Edit/body/Level/Challenges/components/UploadFile/index.tsx ***!
\**************************************************************************************/
/*! exports provided: dealList, UploadTable, default */
/*! exports used: UploadTable, default */function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));r(/*! antd/es/input/style */"5NDa");var n=r(/*! antd/es/input */"5rEg"),i=(r(/*! antd/es/button/style */"+L6B"),r(/*! antd/es/button */"2/Rp")),o=(r(/*! antd/es/modal/style */"2qtc"),r(/*! antd/es/modal */"kLXV")),a=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),s=(r(/*! antd/es/message/style */"miYZ"),r(/*! antd/es/message */"tsqr")),l=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),c=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),u=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),d=(r(/*! antd/es/upload/style */"DZo9"),r(/*! antd/es/upload */"8z0m")),f=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),h=r.n(f),p=r(/*! react */"q1tI"),m=r.n(p),g=r(/*! ./index.less?modules */"Bvq2"),v=r.n(g),b=r(/*! ./nodata.svg */"nj2k"),y=r.n(b),x=r(/*! ali-oss */"mxV5"),w=r.n(x),E=r(/*! @/components/UploadFile */"KhGG"),S=r(/*! @/utils/fetch */"ErOA"),_=r(/*! uuid */"7Cbv"),T=r(/*! @/utils/util */"1vsH"),k=(d.a.Dragger,function(e){for(var t=function(e){return e?e.substring(0,e.lastIndexOf(".")):e},r=Object(u.a)(e),n=0,i=[],o=0;o<r.length;o++){for(var a="",s=0;s<i.length;s++)if(t(i[s][0].name)==t(r[o].name)){n=1,a=s;break}if(1==n)i[a].push(r[o]),n=0;else if(0==n){var l=new Array;l.push(r[o]),i.push(l)}}return i.map((function(e){return e[0].name.includes(".in")?2===e.length?e:[e[0],{}]:e[0].name.includes(".out")?2===e.length?e.reverse():[{},e[0]]:void 0}))}),O=function(e){var t=e.data,r=void 0===t?[]:t,i=e.onRemove,a=e.width,s=void 0===a?"auto":a,l=e.showScore,c=void 0!==l&&l,u=e.disabled,d=void 0!==u&&u,f=e.inputChange,h=function(e){var t=document.createElement("a");document.body.appendChild(t);var r=URL.createObjectURL(e.file);t.href=r,t.download=e.name,t.click(),URL.revokeObjectURL(r),document.body.removeChild(t)},p=function(e,t){Object(T.w)(e,t)};return r.length?m.a.createElement("div",{style:{width:s}},m.a.createElement("div",{className:v.a.head},m.a.createElement("div",{style:{width:"20%"}},"用例"),m.a.createElement("div",{style:{width:c?"25%":"35%"}},"输入"),m.a.createElement("div",{style:{width:c?"25%":"35%"}},"输出"),c&&m.a.createElement("div",{style:{width:"20%"}},"得分比例"),m.a.createElement("div",{style:{width:"10%"}},"操作")),r.map((function(e,t){var r,a,s,l;return m.a.createElement("div",{key:t,className:v.a.list},m.a.createElement("div",{style:{width:"20%"}},"测试用例",t+1),m.a.createElement("div",{className:v.a.info,style:{width:c?"25%":"35%"}},m.a.createElement("span",{title:e.input||(null===(r=e[0])||void 0===r?void 0:r.name),onClick:function(){e.input?e.input_file_url?p(e.input_file_url,e.input):h(e.in_file):h(e[0])}},e.input||(null===(a=e[0])||void 0===a?void 0:a.name))),m.a.createElement("div",{className:v.a.info,style:{width:c?"25%":"35%"}},m.a.createElement("span",{title:e.output||(null===(s=e[1])||void 0===s?void 0:s.name),onClick:function(){e.input?e.output_file_url?p(e.output_file_url,e.output):h(e.out_file):h(e[1])}},e.output||(null===(l=e[1])||void 0===l?void 0:l.name))),c&&m.a.createElement("div",{style:{width:"20%"}},m.a.createElement(n.a,{disabled:d,style:{width:"70%"},onChange:function(e){return f(e,t)},value:e.score}),m.a.createElement("span",null," %")),m.a.createElement("div",{onClick:function(){return function(e,t){o.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:m.a.createElement("div",{className:"tc font16"},"请确认是否删除该测试用例?"),onOk:function(){i(e,t)},onCancel:function(){}})}(e,t)},style:{width:"10%"}},m.a.createElement("span",{className:v.a.del},"删除")))}))):m.a.createElement(m.a.Fragment,null)};t.b=function(e){var t=e.onClose,r=e.onOK,n=e.visible,f=e.wrapClassName,g=e.rootIdentifier,b=Object(p.useState)([]),x=Object(c.a)(b,2),T=x[0],C=x[1],A=Object(p.useState)({}),D=Object(c.a)(A,2),L=D[0],I=D[1],j=Object(p.useState)(!1),R=Object(c.a)(j,2),M=R[0],N=R[1],P=Object(p.useRef)([]),F=Object(p.useRef)(0);Object(p.useEffect)((function(){B()}),[]),Object(p.useEffect)((function(){n&&(P.current=[],F.current=0,C([]))}),[n]);var B=function(){var e=Object(l.a)(h.a.mark((function e(){var t,r;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(S.a)("/api/buckets/get_upload_token_for_big_files",{method:"get"});case 3:t=e.sent,r=JSON.parse(Object(E.a)(t.data)),I(r),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),s.b.error(e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),U=function(e){return e?e.substring(0,e.lastIndexOf(".")):e},H=function(e){var n=new w.a({endpoint:L.end_point,region:L.region,accessKeyId:L.access_key_id,accessKeySecret:L.access_key_secret,bucket:L.bucket,stsToken:L.security_token}),i=e.name,o={container_type:"TestSet",file_name:i},s=Object(_.a)(),l="testsets/".concat(g,"/").concat(s).concat(i.indexOf(".")>-1?"."+i.split(".").pop():"");null===g&&(l="testsets/".concat(s).concat(i.indexOf(".")>-1?"."+i.split(".").pop():"")),n.multipartUpload(l,new Blob([e.file],{type:e.file.type}),{timeout:36e5,partSize:1002400,callback:{customValue:{id:i+""},url:null==L?void 0:L.callback_url,host:null==L?void 0:L.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(S.e)(o)}}).then((function(n){if(0===n.data.status){F.current=F.current+1;var i=P.current.map((function(t){var r,i;if(t.name===(null===(r=n.data)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.file_name)){var o,s,l,c,u,d,f,h,p,m,g,v,b,y,x,w=Object(a.a)({},t);if(null!==(o=n.data)&&void 0!==o&&null!==(s=o.data)&&void 0!==s&&null!==(l=s.file_name)&&void 0!==l&&l.includes(".in"))w.in_object_key=null===(c=n.data)||void 0===c||null===(u=c.data)||void 0===u?void 0:u.object,w.in_object_size=null===(d=n.data)||void 0===d||null===(f=d.data)||void 0===f?void 0:f.size,w.input=null===(h=n.data)||void 0===h||null===(p=h.data)||void 0===p?void 0:p.file_name,w.in_file=e;else w.out_object_key=null===(m=n.data)||void 0===m||null===(g=m.data)||void 0===g?void 0:g.object,w.out_object_size=null===(v=n.data)||void 0===v||null===(b=v.data)||void 0===b?void 0:b.size,w.output=null===(y=n.data)||void 0===y||null===(x=y.data)||void 0===x?void 0:x.file_name,w.out_file=e;return w}return t}));if(P.current=Object(u.a)(i),C(Object(u.a)(i)),F.current>0&&F.current===T.length){N(!1);var o=k(i);o=(o=o.filter((function(e){var t,r;return!(null===(t=e[0])||void 0===t||!t.name||null===(r=e[1])||void 0===r||!r.name)}))).map((function(e){return Object(a.a)(Object(a.a)(Object(a.a)({},e[0]),e[1]),{},{is_file:!0})})),r(o),t()}}}))},z={name:"file",fileList:T,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:function(e){if(null!=T&&T.some((function(t){return t.name===e.name})))return s.b.info("".concat(e.name,"文件已存在")),!1;if(e.size/1024/1024>100)return s.b.info("文件超过100M不符合上传要求"),!1;if(!/\.(in|out|IN|OUT)$/.test(e.name))return s.b.warn("输入文件只能上传.in和.out类型的文本文件"),!1;var t={name:e.name,uid:e.uid,file:e,percent:0};return T.push(t),P.current=Object(u.a)(T),C(Object(u.a)(T)),!1}},G=k(T);return console.log(T,G,"fileList"),m.a.createElement(o.a,{visible:n,wrapClassName:f,onOk:function(){var e;0!==T.length?(N(!0),k(T).some((function(e){var t,r;return!(null!==(t=e[0])&&void 0!==t&&t.name&&null!==(r=e[1])&&void 0!==r&&r.name)}))?o.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"上传的测试用例中存在未配对的文件,请确认是否仅保存已配对的测试用例?",onOk:(e=Object(l.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:T.map(function(){var e=Object(l.a)(h.a.mark((function e(t){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:H(t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)}),onCancel:function(){N(!1)}}):T.map(function(){var e=Object(l.a)(h.a.mark((function e(t){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:H(t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())):s.b.warn("请选择上传文件")},centered:!0,okText:"确认",cancelText:"取消",okButtonProps:{loading:M},onCancel:function(){t()},width:"1000px",title:"批量上传测试用例"},m.a.createElement("div",{className:v.a.wrap},T.length?m.a.createElement("div",null,m.a.createElement(d.a,z,m.a.createElement(i.a,{className:v.a.btnS},"上传文件")),m.a.createElement(O,{data:G,onRemove:function(e){var t,r,n=U(null===(t=e[0])||void 0===t?void 0:t.name)||U(null===(r=e[1])||void 0===r?void 0:r.name),i=T.filter((function(e){return U(e.name)!==n}));P.current=Object(u.a)(i),C(Object(u.a)(i))}})):m.a.createElement("div",{className:v.a.noData},m.a.createElement("img",{src:y.a,alt:""}),m.a.createElement(d.a,z,m.a.createElement(i.a,{className:v.a.btn},"上传文件"))),m.a.createElement("div",{className:v.a.text},"上传限制:",m.a.createElement("br",null),"1、文件必须上传.in和.out类型的文本文件。",m.a.createElement("br",null),"2、输入输出文件需文件名称一一对应未对应时将无法上传。",m.a.createElement("br",null),"3、单个上传文件不能超过100MB超过时可以分批次上传。")))}},BU3w:
/*!***************************************************!*\
!*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***!
\***************************************************/
/*! exports provided: injectCSS, updateCSS */
/*! exports used: updateCSS */function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(/*! ./canUseDom */"MNnm");function i(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function o(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(n.a)())return null;var o,a=document.createElement("style");(null===(t=r.csp)||void 0===t?void 0:t.nonce)&&(a.nonce=null===(o=r.csp)||void 0===o?void 0:o.nonce);a.innerHTML=e;var s=i(r),l=s.firstChild;return r.prepend&&s.prepend?s.prepend(a):r.prepend&&l?s.insertBefore(a,l):s.appendChild(a),a}var a=new Map;function s(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i(r);if(!a.has(n)){var s=o("",r),l=s.parentNode;a.set(n,l),l.removeChild(s)}var c=Array.from(a.get(n).children).find((function(e){return"STYLE"===e.tagName&&e["rc-util-key"]===t}));if(c){var u,d,f;if((null===(u=r.csp)||void 0===u?void 0:u.nonce)&&c.nonce!==(null===(d=r.csp)||void 0===d?void 0:d.nonce))c.nonce=null===(f=r.csp)||void 0===f?void 0:f.nonce;return c.innerHTML!==e&&(c.innerHTML=e),c}var h=o(e,r);return h["rc-util-key"]=t,h}},Bd2K:
/*!********************************************************!*\
!*** ./node_modules/codemirror/addon/edit/closetag.js ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){!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:n(t,!0)}(t)}),"object"==typeof s&&!1===s.whenOpening||(c["'>'"]=function(n){return function(n){if(n.getOption("disableInput"))return e.Pass;for(var a=n.listSelections(),s=[],l=n.getOption("autoCloseTags"),c=0;c<a.length;c++){if(!a[c].empty())return e.Pass;var u=a[c].head,d=n.getTokenAt(u),f=e.innerMode(n.getMode(),d.state),h=f.state,p=f.mode.xmlCurrentTag&&f.mode.xmlCurrentTag(h),m=p&&p.name;if(!m)return e.Pass;var g="html"==f.mode.configuration,v="object"==typeof l&&l.dontCloseTags||g&&t,b="object"==typeof l&&l.indentTags||g&&r;d.end>u.ch&&(m=m.slice(0,m.length-d.end+u.ch));var y=m.toLowerCase();if(!m||"string"==d.type&&(d.end!=u.ch||!/[\"\']/.test(d.string.charAt(d.string.length-1))||1==d.string.length)||"tag"==d.type&&p.close||d.string.indexOf("/")==u.ch-d.start-1||v&&i(v,y)>-1||o(n,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(h)||[],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=b&&i(b,y)>-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];n.replaceRange(S.text,a[c].head,a[c].anchor,"+insert");var _=n.listSelections().slice(0);_[c]={head:S.newPos,anchor:S.newPos},n.setSelections(_),!E&&S.indent&&(n.indentLine(S.newPos.line,null,!0),n.indentLine(S.newPos.line+1,null,!0))}}(n)}),a.addKeyMap(c)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],r=["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 n(t,r){for(var n=t.listSelections(),i=[],a=r?"/":"</",s=t.getOption("autoCloseTags"),l="object"==typeof s&&s.dontIndentOnSlash,c=0;c<n.length;c++){if(!n[c].empty())return e.Pass;var u=n[c].head,d=t.getTokenAt(u),f=e.innerMode(t.getMode(),d.state),h=f.state;if(r&&("string"==d.type||"<"!=d.string.charAt(0)||d.start!=u.ch-1))return e.Pass;var p,m="xml"!=f.mode.name&&"htmlmixed"==t.getMode().name;if(m&&"javascript"==f.mode.name)p=a+"script";else if(m&&"css"==f.mode.name)p=a+"style";else{var g=f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(h);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(d.end)&&(p+=">"),i[c]=p}if(t.replaceSelections(i),n=t.listSelections(),!l)for(c=0;c<n.length;c++)(c==n.length-1||n[c].head.line<n[c+1].head.line)&&t.indentLine(n[c].head.line)}function i(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;++r)if(e[r]==t)return r;return-1}function o(t,r,n,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!=n)return!1;for(var l=o?1:0,c=r.length-1;c>=0&&r[c]==n;c--)++l;for(i=s.to,c=1;c<l;c++){var u=e.scanForClosingTag(t,i,null,a);if(!u||u.tag!=n)return!1;i=u.to}return!0}e.commands.closeTag=function(e){return n(e)}}(r(/*! ../../lib/codemirror */"VrN/"),r(/*! ../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,r){"use strict";function n(e){var t=!0;if(e.length>0){for(var r=0;r<e.length;r++)if(0==e[r].compile_success||!e[r].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]:"",r=[],n=0;n<e.length;n++){var i=e[n],o=t?"".concat(t,"/").concat(i.name):"".concat(i.name);r.push({title:i.name,isLeaf:"tree"!==i.type,key:o})}return r}function o(e,t,r){for(var n=0;n<e.length;n++){var i=e[n];if(i.key===t){i.children=r;break}i.children&&o(i.children,t,r)}return e}function a(e,t,r){var n;return function(){var i=this,o=arguments,a=function(){n=null,r||e.apply(i,o)},s=r&&!n;clearTimeout(n),n=setTimeout(a,t),s&&e.apply(i,o)}}r.d(t,"d",(function(){return n})),r.d(t,"c",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return s}));var s=r(/*! @/utils/env */"m3rI").a.API_SERVER},Bvq2:
/*!***********************************************************************************************!*\
!*** ./src/pages/Shixuns/Edit/body/Level/Challenges/components/UploadFile/index.less?modules ***!
\***********************************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){e.exports={wrap:"wrap___2zRY4",colorBlue:"colorBlue___XalpT",repeatedName:"repeatedName___2Tfh4",text:"text___1sYHg",noData:"noData___3pdB4",btn:"btn___3WWjB",btnS:"btnS___2M_9t",head:"head____NWmz",list:"list___2fE4M",del:"del___2BO6Y",info:"info___3GJ70"}},"C+DQ":
/*!*********************************************************!*\
!*** ./src/components/markdown-editor/css/iconfont.css ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){},CrYA:
/*!*******************************************************!*\
!*** ./node_modules/store/storages/sessionStorage.js ***!
\*******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){var n=r(/*! ../src/util */"MFOe").Global;function i(){return n.sessionStorage}function o(e){return i().getItem(e)}e.exports={name:"sessionStorage",read:o,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var r=i().key(t);e(o(r),r)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},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,r){e.exports=function(){"use strict";function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function r(e,r){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return t(e,r);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)?t(e,r):void 0}}(e))||r&&e&&"number"==typeof e.length){n&&(e=n);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(n=e[Symbol.iterator]()).next.bind(n)}var n=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=(n.defaults,n.getDefaults,n.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 d(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 f=/(^|[^\[])\^/g,h=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,m={},g=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function y(e,t){m[" "+e]||(g.test(e)?m[" "+e]=e+"/":m[" "+e]=x(e,"/",!0));var r=-1===(e=m[" "+e]).indexOf(":");return"//"===t.substring(0,2)?r?t:e.replace(v,"$1")+t:"/"===t.charAt(0)?r?t:e.replace(b,"$1")+t:e+t}function x(e,t,r){var n=e.length;if(0===n)return"";for(var i=0;i<n;){var o=e.charAt(n-i-1);if(o!==t||r){if(o===t||!r)break;i++}else i++}return e.substr(0,n-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=d,S=function(e,t){e=e.source||e,t=t||"";var r={replace:function(t,n){return n=(n=n.source||n).replace(f,"$1"),e=e.replace(t,n),r},getRegex:function(){return new RegExp(e,t)}};return r},_=function(e,t,r){if(e){var n;try{n=decodeURIComponent(d(r)).replace(h,"").toLowerCase()}catch(e){return null}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return null}t&&!p.test(r)&&(r=y(t,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch(e){return null}return r},T={exec:function(){}},k=function(e){for(var t,r,n=1;n<arguments.length;n++)for(r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},O=function(e,t){var r=e.replace(/\|/g,(function(e,t,r){for(var n=!1,i=t;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(/\\\|/g,"|");return r},C=x,A=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var r=e.length,n=0,i=0;i<r;i++)if("\\"===e[i])i++;else if(e[i]===t[0])n++;else if(e[i]===t[1]&&--n<0)return i;return-1},D=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")},L=n.defaults,I=C,j=O,R=w,M=A;function N(e,t,r){var n=t.href,i=t.title?R(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:r,href:n,title:i,text:o}:{type:"image",raw:r,href:n,title:i,text:R(o)}}var P=function(){function e(e){this.options=e||L}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 r=this.rules.block.code.exec(e);if(r){var n=t[t.length-1];if(n&&"paragraph"===n.type)return{raw:r[0],text:r[0].trimRight()};var i=r[0].replace(/^ {4}/gm,"");return{type:"code",raw:r[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 r=t[0],n=function(e,t){var r=e.match(/^(\s+)(?:```)/);if(null===r)return t;var n=r[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=n.length?e.slice(n.length):e})).join("\n")}(r,t[3]||"");return{type:"code",raw:r,lang:t[2]?t[2].trim():t[2],text:n}}},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 r={type:"table",header:j(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(r.header.length===r.align.length){var n,i=r.align.length;for(n=0;n<i;n++)/^ *-+: *$/.test(r.align[n])?r.align[n]="right":/^ *:-+: *$/.test(r.align[n])?r.align[n]="center":/^ *:-+ *$/.test(r.align[n])?r.align[n]="left":r.align[n]=null;for(i=r.cells.length,n=0;n<i;n++)r.cells[n]=j(r.cells[n],r.header.length);return r}}},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 r=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],text:r}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var r,n,i,o,a,s,l,c=t[0],u=t[2],d=u.length>1,f=")"===u[u.length-1],h={type:"list",raw:c,ordered:d,start:d?+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=r=p[v],n=r.length,~(r=r.replace(/^ *([*+-]|\d+[.)]) */,"")).indexOf("\n ")&&(n-=r.length,r=this.options.pedantic?r.replace(/^ {1,4}/gm,""):r.replace(new RegExp("^ {1,"+n+"}","gm"),"")),v!==g-1&&(i=this.rules.block.bullet.exec(p[v+1])[0],(d?1===i.length||!f&&")"===i[i.length-1]:i.length>1||this.options.smartLists&&i!==u)&&(o=p.slice(v+1).join("\n"),h.raw=h.raw.substring(0,h.raw.length-o.length),v=g-1)),a=m||/\n\n(?!\s*$)/.test(r),v!==g-1&&(m="\n"===r.charAt(r.length-1),a||(a=m)),a&&(h.loose=!0),l=void 0,(s=/^\[[ xX]\] /.test(r))&&(l=" "!==r[1],r=r.replace(/^\[[ xX]\] +/,"")),h.items.push({type:"list_item",raw:c,task:s,checked:l,loose:a,text:r});return h}},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]):R(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 r={type:"table",header:j(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(r.header.length===r.align.length){r.raw=t[0];var n,i=r.align.length;for(n=0;n<i;n++)/^ *-+: *$/.test(r.align[n])?r.align[n]="right":/^ *:-+: *$/.test(r.align[n])?r.align[n]="center":/^ *:-+ *$/.test(r.align[n])?r.align[n]="left":r.align[n]=null;for(i=r.cells.length,n=0;n<i;n++)r.cells[n]=j(r.cells[n].replace(/^ *\| *| *\| *$/g,""),r.header.length);return r}}},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 r=this.rules.block.text.exec(e);if(r){var n=t[t.length-1];return n&&"text"===n.type?{raw:r[0],text:r[0]}:{type:"text",raw:r[0],text:r[0]}}},t.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:R(t[1])}},t.tag=function(e,t,r){var n=this.rules.inline.tag.exec(e);if(n)return!t&&/^<a /i.test(n[0])?t=!0:t&&/^<\/a>/i.test(n[0])&&(t=!1),!r&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?r=!0:r&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(r=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:t,inRawBlock:r,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):R(n[0]):n[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var r=M(t[2],"()");if(r>-1){var n=(0===t[0].indexOf("!")?5:4)+t[1].length+r;t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,n).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 N(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 r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){var n=(r[2]||r[1]).replace(/\s+/g," ");if(!(n=t[n.toLowerCase()])||!n.href){var i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return N(r,n,r[0])}},t.strong=function(e,t,r){void 0===r&&(r="");var n=this.rules.inline.strong.start.exec(e);if(n&&(!n[1]||n[1]&&(""===r||this.rules.inline.punctuation.exec(r)))){t=t.slice(-1*e.length);var i,o="**"===n[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(o.lastIndex=0;null!=(n=o.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,n.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,r){void 0===r&&(r="");var n=this.rules.inline.em.start.exec(e);if(n&&(!n[1]||n[1]&&(""===r||this.rules.inline.punctuation.exec(r)))){t=t.slice(-1*e.length);var i,o="*"===n[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(o.lastIndex=0;null!=(n=o.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,n.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 r=t[2].replace(/\n/g," "),n=/[^ ]/.test(r),i=r.startsWith(" ")&&r.endsWith(" ");return n&&i&&(r=r.substring(1,r.length-1)),r=R(r,!0),{type:"codespan",raw:t[0],text:r}}},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 r,n,i=this.rules.inline.autolink.exec(e);if(i)return n="@"===i[2]?"mailto:"+(r=R(this.options.mangle?t(i[1]):i[1])):r=R(i[1]),{type:"link",raw:i[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}},t.url=function(e,t){var r;if(r=this.rules.inline.url.exec(e)){var n,i;if("@"===r[2])i="mailto:"+(n=R(this.options.mangle?t(r[0]):r[0]));else{var o;do{o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0]}while(o!==r[0]);n=R(r[0]),i="www."===r[1]?"http://"+n:n}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}},t.inlineText=function(e,t,r){var n,i=this.rules.inline.text.exec(e);if(i)return n=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):R(i[0]):i[0]:R(this.options.smartypants?r(i[0]):i[0]),{type:"text",raw:i[0],text:n}},e}(),F=T,B=S,U=k,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:F,table:F,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=B(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=B(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=B(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=B(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=B(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=B(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=B(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=B(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:B("^ *(?: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:F,paragraph:B(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:F,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:F,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};z.punctuation=B(z.punctuation).replace(/punctuation/g,z._punctuation).getRegex(),z._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",z._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",z.em.start=B(z.em.start).replace(/punctuation/g,z._punctuation).getRegex(),z.em.middle=B(z.em.middle).replace(/punctuation/g,z._punctuation).replace(/overlapSkip/g,z._overlapSkip).getRegex(),z.em.endAst=B(z.em.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.em.endUnd=B(z.em.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.start=B(z.strong.start).replace(/punctuation/g,z._punctuation).getRegex(),z.strong.middle=B(z.strong.middle).replace(/punctuation/g,z._punctuation).replace(/blockSkip/g,z._blockSkip).getRegex(),z.strong.endAst=B(z.strong.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.endUnd=B(z.strong.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.blockSkip=B(z._blockSkip,"g").getRegex(),z.overlapSkip=B(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=B(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=B(z.tag).replace("comment",H._comment).replace("attribute",z._attribute).getRegex(),z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,z._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,z.link=B(z.link).replace("label",z._label).replace("href",z._href).replace("title",z._title).getRegex(),z.reflink=B(z.reflink).replace("label",z._label).getRegex(),z.reflinkSearch=B(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:B(/^!?\[(label)\]\((.*?)\)/).replace("label",z._label).getRegex(),reflink:B(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z._label).getRegex()}),z.gfm=U({},z.normal,{escape:B(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=B(z.gfm.url,"i").replace("email",z.gfm._extended_email).getRegex(),z.breaks=U({},z.gfm,{br:B(z.br).replace("{2,}","*").getRegex(),text:B(z.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var G={block:H,inline:z},K=n.defaults,W=G.block,V=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,r,n="",i=e.length;for(t=0;t<i;t++)r=e.charCodeAt(t),Math.random()>.5&&(r="x"+r.toString(16)),n+="&#"+r+";";return n}var Y=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||K,this.options.tokenizer=this.options.tokenizer||new P,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:W.normal,inline:V.normal};this.options.pedantic?(t.block=W.pedantic,t.inline=V.pedantic):this.options.gfm&&(t.block=W.gfm,this.options.breaks?t.inline=V.breaks:t.inline=V.gfm),this.tokenizer.rules=t}t.lex=function(e,r){return new t(r).lex(e)};var r,n,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,r){var n,i,o,a;for(void 0===t&&(t=[]),void 0===r&&(r=!0),e=e.replace(/^ +$/gm,"");e;)if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),n.type&&t.push(n);else if(n=this.tokenizer.code(e,t))e=e.substring(n.raw.length),n.type?t.push(n):((a=t[t.length-1]).raw+="\n"+n.raw,a.text+="\n"+n.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.nptable(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),n.tokens=this.blockTokens(n.text,[],r),t.push(n);else if(n=this.tokenizer.list(e)){for(e=e.substring(n.raw.length),o=n.items.length,i=0;i<o;i++)n.items[i].tokens=this.blockTokens(n.items[i].text,[],!1);t.push(n)}else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(r&&(n=this.tokenizer.def(e)))e=e.substring(n.raw.length),this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else if(r&&(n=this.tokenizer.paragraph(e)))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.text(e,t))e=e.substring(n.raw.length),n.type?t.push(n):((a=t[t.length-1]).raw+="\n"+n.raw,a.text+="\n"+n.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,r,n,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,r=0;r<i;r++)a.tokens.header[r]=[],this.inlineTokens(a.header[r],a.tokens.header[r]);for(i=a.cells.length,r=0;r<i;r++)for(o=a.cells[r],a.tokens.cells[r]=[],n=0;n<o.length;n++)a.tokens.cells[r][n]=[],this.inlineTokens(o[n],a.tokens.cells[r][n]);break;case"blockquote":this.inline(a.tokens);break;case"list":for(i=a.items.length,r=0;r<i;r++)this.inline(a.items[r].tokens)}return e},o.inlineTokens=function(e,t,r,n,i){var o;void 0===t&&(t=[]),void 0===r&&(r=!1),void 0===n&&(n=!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,r,n))e=e.substring(o.raw.length),r=o.inLink,n=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,n)),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,n)),t.push(o);else if(o=this.tokenizer.strong(e,s,i))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],r,n),t.push(o);else if(o=this.tokenizer.em(e,s,i))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],r,n),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,[],r,n),t.push(o);else if(o=this.tokenizer.autolink(e,X))e=e.substring(o.raw.length),t.push(o);else if(r||!(o=this.tokenizer.url(e,X))){if(o=this.tokenizer.inlineText(e,n,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},r=t,i=[{key:"rules",get:function(){return{block:W,inline:V}}}],(n=null)&&e(r.prototype,n),i&&e(r,i),t}(),$=n.defaults,J=_,Z=w,Q=function(){function e(e){this.options=e||$}var t=e.prototype;return t.code=function(e,t,r){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,n);null!=i&&i!==e&&(r=!0,e=i)}return n?'<pre><code class="'+this.options.langPrefix+Z(n,!0)+'">'+(r?e:Z(e,!0))+"</code></pre>\n":"<pre><code>"+(r?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,r,n){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+n.slug(r)+'">'+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,r){var n=t?"ol":"ul";return"<"+n+(t&&1!==r?' start="'+r+'"':"")+">\n"+e+"</"+n+">\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 r=t.header?"th":"td";return(t.align?"<"+r+' align="'+t.align+'">':"<"+r+">")+e+"</"+r+">\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,r){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return r;var n='<a href="'+Z(e)+'"';return t&&(n+=' title="'+t+'"'),n+=">"+r+"</a>"},t.image=function(e,t,r){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return r;var n='<img src="'+e+'" alt="'+r+'"';return t&&(n+=' title="'+t+'"'),n+=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,r){return""+r},t.image=function(e,t,r){return""+r},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 r=t;do{this.seen[r]++,t=r+"-"+this.seen[r]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},e}(),re=n.defaults,ne=E,ie=function(){function e(e){this.options=e||re,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,r){return new e(r).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var r,n,i,o,a,s,l,c,u,d,f,h,p,m,g,v,b,y,x="",w=e.length;for(r=0;r<w;r++)switch((d=e[r]).type){case"space":continue;case"hr":x+=this.renderer.hr();continue;case"heading":x+=this.renderer.heading(this.parseInline(d.tokens),d.depth,ne(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":x+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(c="",l="",o=d.header.length,n=0;n<o;n++)l+=this.renderer.tablecell(this.parseInline(d.tokens.header[n]),{header:!0,align:d.align[n]});for(c+=this.renderer.tablerow(l),u="",o=d.cells.length,n=0;n<o;n++){for(l="",a=(s=d.tokens.cells[n]).length,i=0;i<a;i++)l+=this.renderer.tablecell(this.parseInline(s[i]),{header:!1,align:d.align[i]});u+=this.renderer.tablerow(l)}x+=this.renderer.table(c,u);continue;case"blockquote":u=this.parse(d.tokens),x+=this.renderer.blockquote(u);continue;case"list":for(f=d.ordered,h=d.start,p=d.loose,o=d.items.length,u="",n=0;n<o;n++)v=(g=d.items[n]).checked,b=g.task,m="",g.task&&(y=this.renderer.checkbox(v),p?g.tokens.length>0&&"text"===g.tokens[0].type?(g.tokens[0].text=y+" "+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=y+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:y}):m+=y),m+=this.parse(g.tokens,p),u+=this.renderer.listitem(m,b,v);x+=this.renderer.list(u,f,h);continue;case"html":x+=this.renderer.html(d.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;r+1<w&&"text"===e[r+1].type;)u+="\n"+((d=e[++r]).tokens?this.parseInline(d.tokens):d.text);x+=t?this.renderer.paragraph(u):u;continue;default:var E='Token with "'+d.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 r,n,i="",o=e.length;for(r=0;r<o;r++)switch((n=e[r]).type){case"escape":i+=t.text(n.text);break;case"html":i+=t.html(n.text);break;case"link":i+=t.link(n.href,n.title,this.parseInline(n.tokens,t));break;case"image":i+=t.image(n.href,n.title,n.text);break;case"strong":i+=t.strong(this.parseInline(n.tokens,t));break;case"em":i+=t.em(this.parseInline(n.tokens,t));break;case"codespan":i+=t.codespan(n.text);break;case"br":i+=t.br();break;case"del":i+=t.del(this.parseInline(n.tokens,t));break;case"text":i+=t.text(n.text);break;default:var a='Token with "'+n.type+'" type was not found.';if(this.options.silent)return void console.error(a);throw new Error(a)}return i},e}(),oe=k,ae=D,se=w,le=n.getDefaults,ce=n.changeDefaults,ue=n.defaults;function de(e,t,r){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&&(r=t,t=null),t=oe({},de.defaults,t||{}),ae(t),r){var n,i=t.highlight;try{n=Y.lex(e,t)}catch(e){return r(e)}var o=function(e){var o;if(!e)try{o=ie.parse(n,t)}catch(t){e=t}return t.highlight=i,e?r(e):r(null,o)};if(!i||i.length<3)return o();if(delete t.highlight,!n.length)return o();var a=0;return de.walkTokens(n,(function(e){"code"===e.type&&(a++,setTimeout((function(){i(e.text,e.lang,(function(t,r){if(t)return o(t);null!=r&&r!==e.text&&(e.text=r,e.escaped=!0),0==--a&&o()}))}),0))})),void(0===a&&o())}try{var s=Y.lex(e,t);return t.walkTokens&&de.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 de.options=de.setOptions=function(e){return oe(de.defaults,e),ce(de.defaults),de},de.getDefaults=le,de.defaults=ue,de.use=function(e){var t=oe({},e);if(e.renderer&&function(){var r=de.defaults.renderer||new Q,n=function(t){var n=r[t];r[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(r,o);return!1===s&&(s=n.apply(r,o)),s}};for(var i in e.renderer)n(i);t.renderer=r}(),e.tokenizer&&function(){var r=de.defaults.tokenizer||new P,n=function(t){var n=r[t];r[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(r,o);return!1===s&&(s=n.apply(r,o)),s}};for(var i in e.tokenizer)n(i);t.tokenizer=r}(),e.walkTokens){var r=de.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens(t),r&&r(t)}}de.setOptions(t)},de.walkTokens=function(e,t){for(var n,i=r(e);!(n=i()).done;){var o=n.value;switch(t(o),o.type){case"table":for(var a,s=r(o.tokens.header);!(a=s()).done;){var l=a.value;de.walkTokens(l,t)}for(var c,u=r(o.tokens.cells);!(c=u()).done;)for(var d,f=r(c.value);!(d=f()).done;){var h=d.value;de.walkTokens(h,t)}break;case"list":de.walkTokens(o.items,t);break;default:o.tokens&&de.walkTokens(o.tokens,t)}}},de.Parser=ie,de.parser=ie.parse,de.Renderer=Q,de.TextRenderer=ee,de.Lexer=Y,de.lexer=Y.lex,de.Tokenizer=P,de.Slugger=te,de.parse=de,de}()},"DlR+":
/*!******************************************************!*\
!*** ./node_modules/store/storages/cookieStorage.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){var n=r(/*! ../src/util */"MFOe"),i=n.Global,o=n.trim;e.exports={name:"cookieStorage",read:function(e){if(!e||!c(e))return null;var t="(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(a.cookie.replace(new RegExp(t),"$1"))},write:function(e,t){if(!e)return;a.cookie=escape(e)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"},each:s,remove:l,clearAll:function(){s((function(e,t){l(t)}))}};var a=i.document;function s(e){for(var t=a.cookie.split(/; ?/g),r=t.length-1;r>=0;r--)if(o(t[r])){var n=t[r].split("="),i=unescape(n[0]);e(unescape(n[1]),i)}}function l(e){e&&c(e)&&(a.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function c(e){return new RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(a.cookie)}},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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),r(/*! ./enc-base64 */"ETIr"),r(/*! ./md5 */"cv67"),r(/*! ./evpkdf */"K3mO"),r(/*! ./cipher-core */"OLod"),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],o=[],a=[],s=r.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var 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],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,r=0;r<4;r++)l.call(this);for(r=0;r<8;r++)i[r]^=n[r+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),d=c>>>16|4294901760&u,f=u<<16|65535&c;for(i[0]^=c,i[1]^=d,i[2]^=u,i[3]^=f,i[4]^=c,i[5]^=d,i[6]^=u,i[7]^=f,r=0;r<4;r++)l.call(this)}},_doProcessBlock:function(e,t){var r=this._X;l.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];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,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=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)}(),n.Rabbit)},ELLl:
/*!*************************************************************!*\
!*** ./node_modules/codemirror/addon/edit/closebrackets.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},r=e.Pos;function n(e,r){return"pairs"==r&&"string"==typeof e?e:"object"==typeof e&&null!=e[r]?e[r]:t[r]}e.defineOption("autoCloseBrackets",!1,(function(t,r,a){a&&a!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),r&&(o(n(r,"pairs")),t.state.closeBrackets=r,t.addKeyMap(i))}));var i={Backspace:function(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=n(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 d=a[c].head;t.replaceRange("",r(d.line,d.ch-1),r(d.line,d.ch+1),"+delete")}},Enter:function(t){var r=s(t),i=r&&n(r,"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 r=0;r<o.length;r++){var n=o[r].head.line;t.indentLine(n,null,!0),t.indentLine(n+1,null,!0)}}))}};function o(e){for(var t=0;t<e.length;t++){var r=e.charAt(t),n="'"+r+"'";i[n]||(i[n]=a(r))}}function a(t){return function(i){return function(t,i){var o=s(t);if(!o||t.getOption("disableInput"))return e.Pass;var a=n(o,"pairs"),l=a.indexOf(i);if(-1==l)return e.Pass;for(var u,d=n(o,"closeBefore"),f=n(o,"triples"),h=a.charAt(l+1)==i,p=t.listSelections(),m=l%2==0,g=0;g<p.length;g++){var v,b=p[g],y=b.head,x=t.getRange(y,r(y.line,y.ch+1));if(m&&!b.empty())v="surround";else if(!h&&m||x!=i)if(h&&y.ch>1&&f.indexOf(i)>=0&&t.getRange(r(y.line,y.ch-2),y)==i+i){if(y.ch>2&&/\bstring/.test(t.getTokenTypeAt(r(y.line,y.ch-2))))return e.Pass;v="addFour"}else if(h){var w=0==y.ch?" ":t.getRange(r(y.line,y.ch-1),y);if(e.isWordChar(x)||w==i||e.isWordChar(w))return e.Pass;v="both"}else{if(!m||!(0===x.length||/\s/.test(x)||d.indexOf(x)>-1))return e.Pass;v="both"}else v=h&&c(t,y)?"both":f.indexOf(i)>=0&&t.getRange(y,r(y.line,y.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 n=0;n<3;n++)t.execCommand("goCharRight");else if("surround"==u){var i=t.getSelections();for(n=0;n<i.length;n++)i[n]=E+i[n]+S;for(t.replaceSelections(i,"around"),i=t.listSelections().slice(),n=0;n<i.length;n++)i[n]=(o=i[n],a=void 0,a=e.cmpPos(o.anchor,o.head)>0,{anchor:new r(o.anchor.line,o.anchor.ch+(a?-1:1)),head:new r(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 n=e.getRange(r(t.line,t.ch-1),r(t.line,t.ch+1));return 2==n.length?n:null}function c(e,t){var n=e.getTokenAt(r(t.line,t.ch+1));return/\bstring/.test(n.type)&&n.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}o(t.pairs+"`")}(r(/*! ../../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,r){var n;e.exports=(n=r(/*! ./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=n,r=t.lib,i=r.WordArray,o=r.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]),d=i.create([0,1518500249,1859775393,2400959708,2840853838]),f=i.create([1352829926,1548603684,1836072691,2053994217,0]),h=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,a,h,x,w,E,S,_,T,k,O,C=this._hash.words,A=d.words,D=f.words,L=s.words,I=l.words,j=c.words,R=u.words;for(E=o=C[0],S=a=C[1],_=h=C[2],T=x=C[3],k=w=C[4],r=0;r<80;r+=1)O=o+e[t+L[r]]|0,O+=r<16?p(a,h,x)+A[0]:r<32?m(a,h,x)+A[1]:r<48?g(a,h,x)+A[2]:r<64?v(a,h,x)+A[3]:b(a,h,x)+A[4],O=(O=y(O|=0,j[r]))+w|0,o=w,w=x,x=y(h,10),h=a,a=O,O=E+e[t+I[r]]|0,O+=r<16?b(S,_,T)+D[0]:r<32?v(S,_,T)+D[1]:r<48?g(S,_,T)+D[2]:r<64?m(S,_,T)+D[3]:p(S,_,T)+D[4],O=(O=y(O|=0,R[r]))+k|0,E=k,k=T,T=y(_,10),_=S,S=O;O=C[1]+h+T|0,C[1]=C[2]+x+k|0,C[2]=C[3]+w+E|0,C[3]=C[4]+o+S|0,C[4]=C[0]+a+_|0,C[0]=O},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>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,r){return e^t^r}function m(e,t,r){return e&t|~e&r}function g(e,t,r){return(e|~t)^r}function v(e,t,r){return e&r|t&~r}function b(e,t,r){return e^(t|~r)}function y(e,t){return e<<t|e>>>32-t}t.RIPEMD160=o._createHelper(h),t.HmacRIPEMD160=o._createHmacHelper(h)}(Math),n.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,r){var n,i,o;e.exports=(o=r(/*! ./core */"Ib8C"),i=(n=o).lib.WordArray,n.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],o=0;o<r;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<r;s++)i.push(n.charAt(a>>>6*(3-s)&63));var l=n.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o<r.length;o++)n[r.charCodeAt(o)]=o}var a=r.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return function(e,t,r){for(var n=[],o=0,a=0;a<t;a++)if(a%4){var s=r[e.charCodeAt(a-1)]<<a%4*2,l=r[e.charCodeAt(a)]>>>6-a%4*2,c=s|l;n[o>>>2]|=c<<24-o%4*8,o++}return i.create(n,o)}(e,t,n)},_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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),function(){if("function"==typeof ArrayBuffer){var e=n.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 r=e.byteLength,n=[],i=0;i<r;i++)n[i>>>2]|=e[i]<<24-i%4*8;t.call(this,n,r)}else t.apply(this,arguments)}).prototype=e}}(),n.lib.WordArray)},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,r){var n,i,o,a,s,l;e.exports=(l=r(/*! ./core */"Ib8C"),r(/*! ./sha256 */"lPiR"),i=(n=l).lib.WordArray,o=n.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}}),n.SHA224=a._createHelper(s),n.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,r){"use strict";var n=r("q1tI"),i=r.n(n),o=r("TSYQ"),a=r.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 r=new FormData;e.data&&Object.keys(e.data).forEach((function(t){var n=e.data[t];Array.isArray(n)?n.forEach((function(e){r.append(t+"[]",e)})):r.append(t,e.data[t])})),e.file instanceof Blob?r.append(e.filename,e.file,e.file.name):r.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 r="cannot "+e.method+" "+e.action+" "+t.status+"'",n=new Error(r);return n.status=t.status,n.method=e.method,n.url=e.action,n}(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 n=e.headers||{};return null!==n["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(n).forEach((function(e){null!==n[e]&&t.setRequestHeader(e,n[e])})),t.send(r),{abort:function(){t.abort()}}}var c=+new Date,u=0;function d(){return"rc-upload-"+c+"-"+ ++u}var f=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(","),n=e.name||"",i=e.type||"",o=i.replace(/\/.*$/,"");return r.some((function(e){var t,r,a=e.trim();return"."===a.charAt(0)?(t=n.toLowerCase(),r=a.toLowerCase(),-1!==t.indexOf(r,t.length-r.length)):/\/\*$/.test(a)?o===a.replace(/\/.*$/,""):i===a}))}return!0};var h=function(e,t,r){var n=function e(n,i){i=i||"",n.isFile?n.file((function(e){r(e)&&(n.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=n.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))})):n.isDirectory&&function(e,t){var r=e.createReader(),n=[];!function e(){r.readEntries((function(r){var i=Array.prototype.slice.apply(r);n=n.concat(i),!i.length?t(n):e()}))}()}(n,(function(t){t.forEach((function(t){e(t,""+i+n.name+"/")}))}))};e.forEach((function(e){n(e.webkitGetAsEntry())}))},p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},g=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(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,r,n;b(this,t);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=n=y(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),n.state={uid:d()},n.reqs={},n.onChange=function(e){var t=e.target.files;n.uploadFiles(t),n.reset()},n.onClick=function(e){var t=n.fileInput;if(t){var r=n.props,i=r.children,o=r.onClick;i&&"button"===i.type&&(t.parentNode.focus(),t.parentNode.querySelector("button").blur()),t.click(),o&&o(e)}},n.onKeyDown=function(e){"Enter"===e.key&&n.onClick()},n.onFileDrop=function(e){var t=n.props.multiple;if(e.preventDefault(),"dragover"!==e.type)if(n.props.directory)h(Array.prototype.slice.call(e.dataTransfer.items),n.uploadFiles,(function(e){return f(e,n.props.accept)}));else{var r=Array.prototype.slice.call(e.dataTransfer.files).filter((function(e){return f(e,n.props.accept)}));!1===t&&(r=r.slice(0,1)),n.uploadFiles(r)}},n.uploadFiles=function(e){var t=Array.prototype.slice.call(e);t.map((function(e){return e.uid=d(),e})).forEach((function(e){n.upload(e,t)}))},n.saveFileInput=function(e){n.fileInput=e},y(n,r)}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 r=this,n=this.props;if(!n.beforeUpload)return setTimeout((function(){return r.post(e)}),0);var i=n.beforeUpload(e,t);i&&i.then?i.then((function(t){var n=Object.prototype.toString.call(t);return"[object File]"===n||"[object Blob]"===n?r.post(t):r.post(e)})).catch((function(e){console.log(e)})):!1!==i&&setTimeout((function(){return r.post(e)}),0)}},{key:"post",value:function(e){var t=this;if(this._isMounted){var r=this.props,n=r.onStart,i=r.onProgress,o=r.transformFile,a=void 0===o?function(e){return e}:o;new Promise((function(t){var n=r.action;return"function"==typeof n&&(n=n(e)),t(n)})).then((function(o){var s=e.uid,c=r.customRequest||l;Promise.resolve(a(e)).then((function(e){var t=r.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],d=l[1],f={action:o,filename:r.name,data:d,file:u,headers:r.headers,withCredentials:r.withCredentials,method:r.method||"post",onProgress:i?function(t){i(t,e)}:null,onSuccess:function(n,i){delete t.reqs[s],r.onSuccess(n,e,i)},onError:function(n,i){delete t.reqs[s],r.onError(n,i,e)}};n(e),t.reqs[s]=c(f)}))}))}}},{key:"reset",value:function(){this.setState({uid:d()})}},{key:"abort",value:function(e){var t=this.reqs;if(e){var r=e;e&&e.uid&&(r=e.uid),t[r]&&t[r].abort&&t[r].abort(),delete t[r]}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,r=this.props,n=r.component,o=r.prefixCls,s=r.className,l=r.disabled,c=r.id,u=r.style,d=r.multiple,f=r.accept,h=r.children,m=r.directory,g=r.openFileDialogOnClick,b=r.onMouseEnter,y=r.onMouseLeave,x=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(r,["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:b,onMouseLeave:y,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return i.a.createElement(n,p({},E,{className:w,role:"button",style:u}),i.a.createElement("input",p({},(t=x,Object.keys(t).reduce((function(e,r){return"data-"!==r.substr(0,5)&&"aria-"!==r.substr(0,5)&&"role"!==r||(e[r]=t[r]),e}),{})),{id:c,type:"file",ref:this.saveFileInput,onClick:function(e){return e.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:f,directory:m?"directory":null,webkitdirectory:m?"webkitdirectory":null,multiple:d,onChange:this.onChange})),h)}}]),t}(n.Component),w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(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 T(){}var k=function(e){function t(){var e,r,n;S(this,t);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=n=_(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),n.saveUploader=function(e){n.uploader=e},_(n,r)}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}(n.Component);k.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:T,onError:T,onSuccess:T,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var O=k;t.a=O},HmJG:
/*!****************************************************************!*\
!*** ./src/components/markdown-editor/upload-image/index.less ***!
\****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){},IBYe:
/*!**************************************************!*\
!*** ./node_modules/rc-table/es/sugar/Column.js ***!
\**************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,r){"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,r){(function(t){var n;e.exports=(n=n||function(e,n){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=r(/*! 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 r;return e.prototype=t,r=new e,e.prototype=null,r}}(),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||f).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var a=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(var s=0;s<i;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(o());return new u.init(t,e)}}),d=s.enc={},f=d.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new u.init(r,t/2)}},h=d.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new u.init(r,t)}},p=d.Utf8={stringify:function(e){try{return decodeURIComponent(escape(h.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return h.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 r,n=this._data,i=n.words,o=n.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 d=0;d<l;d+=a)this._doProcessBlock(i,d);r=i.splice(0,l),n.sigBytes-=c}return new u.init(r,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,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new g.HMAC.init(e,r).finalize(t)}}}),s.algo={});return s}(Math),n)}).call(this,r(/*! ./../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},J66h:
/*!******************************************!*\
!*** ./node_modules/js-base64/base64.js ***!
\******************************************/
/*! no static exports found */
/*! exports used: Base64 */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){(function(r){var n;!function(r,i){e.exports=function(r){"use strict";var i,o=(r=r||{}).Base64,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=function(e){for(var t={},r=0,n=e.length;r<n;r++)t[e.charAt(r)]=r;return t}(a),l=String.fromCharCode,c=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?l(192|t>>>6)+l(128|63&t):l(224|t>>>12&15)+l(128|t>>>6&63)+l(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return l(240|t>>>18&7)+l(128|t>>>12&63)+l(128|t>>>6&63)+l(128|63&t)},u=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(e){return e.replace(u,c)},f=function(e){var t=[0,2,1][e.length%3],r=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[a.charAt(r>>>18),a.charAt(r>>>12&63),t>=2?"=":a.charAt(r>>>6&63),t>=1?"=":a.charAt(63&r)].join("")},h=r.btoa&&"function"==typeof r.btoa?function(e){return r.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,f)},p=function(e){return h(d(String(e)))},m=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},g=function(e,t){return t?m(p(e)):p(e)};r.Uint8Array&&(i=function(e,t){for(var r="",n=0,i=e.length;n<i;n+=3){var o=e[n],s=e[n+1],l=e[n+2],c=o<<16|s<<8|l;r+=a.charAt(c>>>18)+a.charAt(c>>>12&63)+(void 0!==s?a.charAt(c>>>6&63):"=")+(void 0!==l?a.charAt(63&c):"=")}return t?m(r):r});var v,b=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,y=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 l(55296+(t>>>10))+l(56320+(1023&t));case 3:return l((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return l((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},x=function(e){return e.replace(b,y)},w=function(e){var t=e.length,r=t%4,n=(t>0?s[e.charAt(0)]<<18:0)|(t>1?s[e.charAt(1)]<<12:0)|(t>2?s[e.charAt(2)]<<6:0)|(t>3?s[e.charAt(3)]:0),i=[l(n>>>16),l(n>>>8&255),l(255&n)];return i.length-=[0,0,2,1][r],i.join("")},E=r.atob&&"function"==typeof r.atob?function(e){return r.atob(e)}:function(e){return e.replace(/\S{1,4}/g,w)},S=function(e){return E(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},_=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},T=function(e){return function(e){return x(E(e))}(_(e))};r.Uint8Array&&(v=function(e){return Uint8Array.from(S(_(e)),(function(e){return e.charCodeAt(0)}))});var k=function(){var e=r.Base64;return r.Base64=o,e};if(r.Base64={VERSION:"2.6.4",atob:S,btoa:h,fromBase64:T,toBase64:g,utob:d,encode:g,encodeURI:function(e){return g(e,!0)},btou:x,decode:T,noConflict:k,fromUint8Array:i,toUint8Array:v},"function"==typeof Object.defineProperty){var O=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};r.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",O((function(){return T(this)}))),Object.defineProperty(String.prototype,"toBase64",O((function(e){return g(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",O((function(){return g(this,!0)})))}}r.Meteor&&(Base64=r.Base64);e.exports?e.exports.Base64=r.Base64:void 0===(n=function(){return r.Base64}.apply(t,[]))||(e.exports=n);return{Base64:r.Base64}}(r)}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r?r:this)}).call(this,r(/*! ./../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},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,r){var n,i,o,a,s,l,c,u;e.exports=(u=r(/*! ./core */"Ib8C"),r(/*! ./sha1 */"3y9D"),r(/*! ./hmac */"WYAk"),i=(n=u).lib,o=i.Base,a=i.WordArray,s=n.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 r,n=this.cfg,i=n.hasher.create(),o=a.create(),s=o.words,l=n.keySize,c=n.iterations;s.length<l;){r&&i.update(r),r=i.update(e).finalize(t),i.reset();for(var u=1;u<c;u++)r=i.finalize(r),i.reset();o.concat(r)}return o.sigBytes=4*l,o}}),n.EvpKDF=function(e,t,r){return c.create(r).compute(e,t)},u.EvpKDF)},KhGG:
/*!*********************************************!*\
!*** ./src/components/UploadFile/index.tsx ***!
\*********************************************/
/*! exports provided: decrypt, uploadFile, UploadFile, default */
/*! exports used: decrypt, default, uploadFile */function(e,t,r){"use strict";r.d(t,"a",(function(){return S})),r.d(t,"c",(function(){return _}));var n=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),i=(r(/*! antd/es/message/style */"miYZ"),r(/*! antd/es/message */"tsqr")),o=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */"oBTY"),a=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),s=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties */"PpiC"),l=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),c=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),u=(r(/*! antd/es/upload/style */"DZo9"),r(/*! antd/es/upload */"8z0m")),d=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),f=r.n(d),h=r(/*! react */"q1tI"),p=r.n(h),m=r(/*! @/utils/fetch */"ErOA"),g=r(/*! crypto-js */"NFKh"),v=r.n(g),b=r(/*! uuid */"7Cbv"),y=r(/*! umi */"9kvl"),x=r(/*! ali-oss */"mxV5"),w=r.n(x),E=u.a.Dragger,S=function(e){var t=v.a.enc.Utf8.parse("bf3c199c2470cb477d907b1e0917c17b"),r=v.a.enc.Utf8.parse("5183666c72eec9e4"),n=v.a.AES.decrypt(e,t,{iv:r,mode:v.a.mode.CBC});return n.toString(v.a.enc.Utf8)},_=function(){var e=Object(c.a)(f.a.mark((function e(t,r,n){var i,o,a,s,c,u,d,h,p;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.file_name=t.name,e.next=3,Object(m.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return d=e.sent,console.log("decrypt(res.data):",S(d.data)),d.data=JSON.parse(S(d.data)),h=Object(b.a)(),p=new w.a({endpoint:null==d||null===(i=d.data)||void 0===i?void 0:i.end_point,region:null==d||null===(o=d.data)||void 0===o?void 0:o.region,accessKeyId:null==d||null===(a=d.data)||void 0===a?void 0:a.access_key_id,accessKeySecret:null==d||null===(s=d.data)||void 0===s?void 0:s.access_key_secret,bucket:null==d||null===(c=d.data)||void 0===c?void 0:c.bucket,stsToken:null==d||null===(u=d.data)||void 0===u?void 0:u.security_token}),e.abrupt("return",new Promise((function(e,i){var o;p.multipartUpload("".concat(h),new Blob([t],{type:t.type}),Object(l.a)(Object(l.a)({timeout:2e5,partSize:102400},n),{},{callback:{url:null==d||null===(o=d.data)||void 0===o?void 0:o.callback_url,host:null==d?void 0:d.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(m.e)(r)}})).then((function(r){var n;t.response=null===(n=r.data)||void 0===n?void 0:n.data,e(null==r?void 0:r.data)})).catch((function(e){i(e),console.log("err:",e)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}();t.b=Object(y.a)((function(e){var t=e.loading,r=e.globalSetting,n=e.user;return{globalSetting:r,loading:t.models.competitions,user:n}}))((function(e){var t,r=e.user,l=e.cancelUpload,u=Object(s.a)(e,["user","cancelUpload"]),d=Object(h.useState)([]),g=Object(a.a)(d,2),v=g[0],y=g[1],x=Object(h.useState)(),_=Object(a.a)(x,2),T=_[0],k=_[1],O={onRemove:function(e){y(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)(f.a.mark((function e(t){var r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=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)>r)){e.next=7;break}return i.b.info("文件超过".concat(r/1024/1024/1024,"GB不符合上传要求")),e.abrupt("return",!1);case 7:return v.push({name:t.name,file:t}),y(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)})},C=function(){var e=Object(c.a)(f.a.mark((function e(t,r){var n,a,s,l,c,d,h,p,g;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.file_name=t.name,h=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===h}))].status="error",v[v.findIndex((function(e){return e.name===h}))].file.status="error",u.onChange(v),i.b.warn("上传失败,请重新尝试"),e.abrupt("return");case 12:return T=new w.a({endpoint:null==p||null===(n=p.data)||void 0===n?void 0:n.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===(d=p.data)||void 0===d?void 0:d.security_token}),console.log(t,"file"),k(T),g=Object(b.a)(),e.abrupt("return",new Promise((function(e,n){try{var a;T.multipartUpload("".concat(u.identifier,"/").concat(g).concat(h.indexOf(".")>-1?"."+h.split(".").pop():""),new Blob([t.file],{type:t.file.type}),{timeout:36e5,partSize:1002400,progress:function(e,t,r){try{console.log("进度",e,t,r);var n=v.findIndex((function(e){return e.name===h}));v[n].file.percent=100*e,v[n].tempCheckpoint=t,y(Object(o.a)(v))}catch(e){}},checkpoint:v[v.findIndex((function(e){return e.name===h}))].tempCheckpoint,callback:{customValue:{id:h+""},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)(r)}}).then((function(r){var n,o=v.findIndex((function(e){return e.name===h})),a="done";if(0===(null===(n=r.data)||void 0===n?void 0:n.status)){var s;t.response=null===(s=r.data)||void 0===s?void 0:s.data;var l=v.findIndex((function(e){return e.name===h}));v[l].status="done",v[l].file.status="done"}else{var c;i.b.warn(null===(c=r.data)||void 0===c?void 0:c.message),a="error"}v[o].status=a,v[o].file.status=a,u.onChange(v),e(null==r?void 0:r.data)})).catch((function(e){v[v.findIndex((function(e){return e.name===h}))].status="error",v[v.findIndex((function(e){return e.name===h}))].file.status="error",i.b.warn("上传失败,请重新尝试"),y(Object(o.a)(v)),u.onChange(v),n(e),console.log("err:",e)}))}catch(e){}})));case 17:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();return Object(h.useEffect)((function(){v.every((function(e){return"done"===e||"error"===e}))&&u.onComplete(v)}),[v]),Object(h.useEffect)((function(){var e;l&&(null===(e=T)||void 0===e||e.cancel())}),[l]),Object(h.useEffect)((function(){u.uploading&&v.map(function(){var e=Object(c.a)(f.a.mark((function e(t){var n;return f.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,C(t,{login:null==r||null===(n=r.userInfo)||void 0===n?void 0:n.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(n.a)({},O,{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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),r(/*! ./cipher-core */"OLod"),n.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},n.pad.ZeroPadding)},L9qf:
/*!*********************************************************************!*\
!*** ./src/pages/Question/AddOrEdit/ManageModal/index.less?modules ***!
\*********************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){e.exports={flex_box_center:"flex_box_center___3J7Qj",flex_space_between:"flex_space_between___3P3xx",flex_box_vertical_center:"flex_box_vertical_center___3QrMz",flex_box_center_end:"flex_box_center_end___37g4V",flex_box_column:"flex_box_column___2PxMN",wrap:"wrap___1xDeN",in:"in___364z1",btns:"btns___8vHXH",customModal:"customModal___2Vkln"}},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,r){"use strict";r.d(t,"b",(function(){return w})),r.d(t,"a",(function(){return S}));var n=r("1OyB"),i=r("vuIU"),o=r("Ji7U"),a=r("LK+K"),s=r("q1tI"),l=r("rePB"),c=r("Ff2n"),u=r("ODXe"),d=r("4IlW"),f=r("bX4T"),h=r("YrtM"),p=r("TSYQ"),m=r.n(p),g=r("+nKL"),v=r("8OUc"),b=s.forwardRef((function(e,t){var r=e.prefixCls,n=e.id,i=e.flattenOptions,o=e.childrenAsData,a=e.values,p=e.searchValue,b=e.multiple,y=e.defaultActiveFirstOption,x=e.height,w=e.itemHeight,E=e.notFoundContent,S=e.open,_=e.menuItemSelectedIcon,T=e.virtual,k=e.onSelect,O=e.onToggleOpen,C=e.onActiveValue,A=e.onScroll,D=e.onMouseEnter,L="".concat(r,"-item"),I=Object(h.a)((function(){return i}),[S,i],(function(e,t){return t[0]&&e[1]!==t[1]})),j=s.useRef(null),R=function(e){e.preventDefault()},M=function(e){j.current&&j.current.scrollTo({index:e})},N=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=I.length,n=0;n<r;n+=1){var i=(e+n*t+r)%r,o=I[i],a=o.group,s=o.data;if(!a&&!s.disabled)return i}return-1},P=s.useState((function(){return N(0)})),F=Object(u.a)(P,2),B=F[0],U=F[1],H=function(e){U(e);var t=I[e];t?C(t.data.value,e):C(null,-1)};s.useEffect((function(){H(!1!==y?N(0):-1)}),[I.length,p]),s.useEffect((function(){var e=setTimeout((function(){if(!b&&S&&1===a.size){var e=Array.from(a)[0],t=I.findIndex((function(t){return t.data.value===e}));H(t),M(t)}}));return function(){return clearTimeout(e)}}),[S]);var z=function(e){void 0!==e&&k(e,{selected:!a.has(e)}),b||O(!1)};if(s.useImperativeHandle(t,(function(){return{onKeyDown:function(e){var t=e.which;switch(t){case d.a.UP:case d.a.DOWN:var r=0;if(t===d.a.UP?r=-1:t===d.a.DOWN&&(r=1),0!==r){var n=N(B+r,r);M(n),H(n)}break;case d.a.ENTER:var i=I[B];i&&!i.data.disabled?z(i.data.value):z(void 0),S&&e.preventDefault();break;case d.a.ESC:O(!1)}},onKeyUp:function(){},scrollTo:function(e){M(e)}}})),0===I.length)return s.createElement("div",{role:"listbox",id:"".concat(n,"_list"),className:"".concat(L,"-empty"),onMouseDown:R},E);function G(e){var t=I[e];if(!t)return null;var r=t.data||{},i=r.value,l=r.label,c=r.children,u=Object(f.a)(r,!0),d=o?c:l;return t?s.createElement("div",Object.assign({"aria-label":"string"==typeof d?d:null},u,{key:e,role:"option",id:"".concat(n,"_list_").concat(e),"aria-selected":a.has(i)}),i):null}return s.createElement(s.Fragment,null,s.createElement("div",{role:"listbox",id:"".concat(n,"_list"),style:{height:0,width:0,overflow:"hidden"}},G(B-1),G(B),G(B+1)),s.createElement(g.a,{itemKey:"key",ref:j,data:I,height:x,itemHeight:w,fullHeight:!1,onMouseDown:R,onScroll:A,virtual:T,onMouseEnter:D},(function(e,t){var r,n=e.group,i=e.groupOption,u=e.data,d=u.label,f=u.key;if(n)return s.createElement("div",{className:m()(L,"".concat(L,"-group"))},void 0!==d?d:f);var h=u.disabled,p=u.value,g=u.title,b=u.children,y=u.style,x=u.className,w=Object(c.a)(u,["disabled","value","title","children","style","className"]),E=a.has(p),S="".concat(L,"-option"),T=m()(L,S,x,(r={},Object(l.a)(r,"".concat(S,"-grouped"),i),Object(l.a)(r,"".concat(S,"-active"),B===t&&!h),Object(l.a)(r,"".concat(S,"-disabled"),h),Object(l.a)(r,"".concat(S,"-selected"),E),r)),k=o?b:d,O=!_||"function"==typeof _||E;return s.createElement("div",Object.assign({},w,{"aria-selected":E,className:T,title:g,onMouseMove:function(){B===t||h||H(t)},onClick:function(){h||z(p)},style:y}),s.createElement("div",{className:"".concat(S,"-content")},k||p),s.isValidElement(_)||E,O&&s.createElement(v.a,{className:"".concat(L,"-option-state"),customizeIcon:_,customizeIconProps:{isSelected:E}},E?"✓":null))})))}));b.displayName="OptionList";var y=b,x=function(){return null};x.isSelectOption=!0;var w=x,E=function(){return null};E.isSelectOptGroup=!0;var S=E,_=r("VTBJ"),T=r("Zm9Q");function k(e){var t=e.key,r=e.props,n=r.children,i=r.value,o=Object(c.a)(r,["children","value"]);return Object(_.a)({key:t,value:void 0!==i?i:t,children:n},o)}function O(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(T.a)(e).map((function(e,r){if(!s.isValidElement(e)||!e.type)return null;var n=e.type.isSelectOptGroup,i=e.key,o=e.props,a=o.children,l=Object(c.a)(o,["children"]);return t||!n?k(e):Object(_.a)(Object(_.a)({key:"__RC_SELECT_GRP__".concat(null===i?r:i,"__"),label:i},l),{},{options:O(a)})})).filter((function(e){return e}))}var C=r("2Qr1"),A=r("qNPg"),D=r("U8pU"),L=r("Kwbf"),I=r("WKfj");var j=function(e){var t=e.mode,r=e.options,n=e.children,i=e.backfill,o=e.allowClear,a=e.placeholder,l=e.getInputElement,c=e.showSearch,u=e.onSearch,d=e.defaultOpen,f=e.autoFocus,h=e.labelInValue,p=e.value,m=e.inputValue,g=e.optionLabelProp,v="multiple"===t||"tags"===t,b=void 0!==c?c:v||"combobox"===t,y=r||O(n);if(Object(L.a)("tags"!==t||y.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=y.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(L.a)(!x,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(L.a)("combobox"!==t||!g,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(L.a)("combobox"===t||!i,"`backfill` only works with `combobox` mode."),Object(L.a)("combobox"===t||!l,"`getInputElement` only work with `combobox` mode."),Object(L.b)("combobox"!==t||!l||!o||!a,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!b&&"combobox"!==t&&"tags"!==t&&Object(L.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(L.b)(!d||f,"`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(L.a)(!h||w.every((function(e){return"object"===Object(D.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(L.a)(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(n){var E=null;Object(T.a)(n).some((function(e){if(!s.isValidElement(e)||!e.type)return!1;var t=e.type;return!t.isSelectOption&&(t.isSelectOptGroup?!Object(T.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(L.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(E.displayName||E.name||E,"`.")),Object(L.a)(void 0===m,"`inputValue` is deprecated, please use `searchValue` instead.")}},R=Object(A.a)({prefixCls:"rc-select",components:{optionList:y},convertChildrenToData:O,flattenOptions:C.d,getLabeledValue:C.e,filterOptions:C.b,isValueDisabled:C.g,findValueOption:C.c,warningProps:j,fillOptionsWithMissingValue:C.a}),M=function(e){Object(o.a)(r,e);var t=Object(a.a)(r);function r(){var e;return Object(n.a)(this,r),(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)(r,[{key:"render",value:function(){return s.createElement(R,Object.assign({ref:this.selectRef},this.props))}}]),r}(s.Component);M.Option=w,M.OptGroup=S;var N=M;t.c=N},M8RZ:
/*!**********************************!*\
!*** ./src/components/modal.tsx ***!
\**********************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),i=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),o=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),a=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),s=r(/*! react */"q1tI"),l=r.n(s),c=r(/*! react-dom */"i8i4"),u=function(e){Object(o.a)(r,e);var t=Object(a.a)(r);function r(e){var i;Object(n.a)(this,r),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)(r,[{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)}}]),r}(l.a.Component)},MFOe:
/*!****************************************!*\
!*** ./node_modules/store/src/util.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){(function(t){var r=Object.assign?Object.assign:function(e,t,r,n){for(var i=1;i<arguments.length;i++)s(Object(arguments[i]),(function(t,r){e[r]=t}));return e},n=function(){if(Object.create)return function(e,t,n,i){var o=a(arguments,1);return r.apply(this,[Object.create(e)].concat(o))};{function e(){}return function(t,n,i,o){var s=a(arguments,1);return e.prototype=t,r.apply(this,[new e].concat(s))}}}(),i=String.prototype.trim?function(e){return String.prototype.trim.call(e)}:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},o="undefined"!=typeof window?window:t;function a(e,t){return Array.prototype.slice.call(e,t||0)}function s(e,t){l(e,(function(e,r){return t(e,r),!1}))}function l(e,t){if(c(e)){for(var r=0;r<e.length;r++)if(t(e[r],r))return e[r]}else for(var n in e)if(e.hasOwnProperty(n)&&t(e[n],n))return e[n]}function c(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}e.exports={assign:r,create:n,trim:i,bind:function(e,t){return function(){return t.apply(e,Array.prototype.slice.call(arguments,0))}},slice:a,each:s,map:function(e,t){var r=c(e)?[]:{};return l(e,(function(e,n){return r[n]=t(e,n),!1})),r},pluck:l,isList:c,isFunction:function(e){return e&&"[object Function]"==={}.toString.call(e)},isObject:function(e){return e&&"[object Object]"==={}.toString.call(e)},Global:o}}).call(this,r(/*! ./../../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},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,r){var n,i,o,a,s,l;e.exports=(l=r(/*! ./core */"Ib8C"),i=(n=l).lib,o=i.Base,a=i.WordArray,(s=n.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,r=[],n=0;n<t;n++){var i=e[n];r.push(i.high),r.push(i.low)}return a.create(r,this.sigBytes)},clone:function(){for(var e=o.clone.call(this),t=e.words=this.words.slice(0),r=t.length,n=0;n<r;n++)t[n]=t[n].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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),r(/*! ./x64-core */"MlIO"),r(/*! ./lib-typedarrays */"F+F2"),r(/*! ./enc-utf16 */"qM6L"),r(/*! ./enc-base64 */"ETIr"),r(/*! ./enc-base64url */"wbyO"),r(/*! ./md5 */"cv67"),r(/*! ./sha1 */"3y9D"),r(/*! ./sha256 */"lPiR"),r(/*! ./sha224 */"GRuw"),r(/*! ./sha512 */"1uat"),r(/*! ./sha384 */"uGsb"),r(/*! ./sha3 */"5hvy"),r(/*! ./ripemd160 */"ELcG"),r(/*! ./hmac */"WYAk"),r(/*! ./pbkdf2 */"e7zE"),r(/*! ./evpkdf */"K3mO"),r(/*! ./cipher-core */"OLod"),r(/*! ./mode-cfb */"ALsQ"),r(/*! ./mode-ctr */"9OqN"),r(/*! ./mode-ctr-gladman */"qu8F"),r(/*! ./mode-ofb */"S6kV"),r(/*! ./mode-ecb */"gb/T"),r(/*! ./pad-ansix923 */"qBft"),r(/*! ./pad-iso10126 */"oRuE"),r(/*! ./pad-iso97971 */"jO9C"),r(/*! ./pad-zeropadding */"KmYQ"),r(/*! ./pad-nopadding */"uGxW"),r(/*! ./format-hex */"bQjk"),r(/*! ./aes */"wZgz"),r(/*! ./tripledes */"pA7S"),r(/*! ./rc4 */"w7YG"),r(/*! ./rabbit */"E4JC"),r(/*! ./rabbit-legacy */"PVpz"),n)},NvD2:
/*!******************************************************!*\
!*** ./node_modules/rc-tree/es/utils/conductUtil.js ***!
\******************************************************/
/*! exports provided: isCheckDisabled, conductCheck */
/*! exports used: conductCheck */function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(/*! rc-util/es/warning */"Kwbf");function i(e,t){var r=new Set;return e.forEach((function(e){t.has(e)||r.add(e)})),r}function o(e){var t=e||{},r=t.disabled,n=t.disableCheckbox,i=t.checkable;return!(!r&&!n)||!1===i}function a(e,t,r,a){var s,l=[];s=a||o;var c=new Set(e.filter((function(e){var t=!!r[e];return t||l.push(e),t}))),u=new Map,d=0;return Object.keys(r).forEach((function(e){var t=r[e],n=t.level,i=u.get(n);i||(i=new Set,u.set(n,i)),i.add(t),d=Math.max(d,n)})),Object(n.a)(!l.length,"Tree missing follow keys: ".concat(l.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),!0===t?function(e,t,r,n){for(var o=new Set(e),a=new Set,s=0;s<=r;s+=1){(t.get(s)||new Set).forEach((function(e){var t=e.key,r=e.node,i=e.children,a=void 0===i?[]:i;o.has(t)&&!n(r)&&a.filter((function(e){return!n(e.node)})).forEach((function(e){o.add(e.key)}))}))}for(var l=new Set,c=r;c>=0;c-=1){(t.get(c)||new Set).forEach((function(e){var t=e.parent,r=e.node;if(!n(r)&&e.parent&&!l.has(e.parent.key))if(n(e.parent.node))l.add(t.key);else{var i=!0,s=!1;(t.children||[]).filter((function(e){return!n(e.node)})).forEach((function(e){var t=e.key,r=o.has(t);i&&!r&&(i=!1),s||!r&&!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,d,s):function(e,t,r,n,o){for(var a=new Set(e),s=new Set(t),l=0;l<=n;l+=1){(r.get(l)||new Set).forEach((function(e){var t=e.key,r=e.node,n=e.children,i=void 0===n?[]:n;a.has(t)||s.has(t)||o(r)||i.filter((function(e){return!o(e.node)})).forEach((function(e){a.delete(e.key)}))}))}s=new Set;for(var c=new Set,u=n;u>=0;u-=1){(r.get(u)||new Set).forEach((function(e){var t=e.parent,r=e.node;if(!o(r)&&e.parent&&!c.has(e.parent.key))if(o(e.parent.node))c.add(t.key);else{var n=!0,i=!1;(t.children||[]).filter((function(e){return!o(e.node)})).forEach((function(e){var t=e.key,r=a.has(t);n&&!r&&(n=!1),i||!r&&!s.has(t)||(i=!0)})),n||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,d,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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),r(/*! ./evpkdf */"K3mO"),void(n.lib.Cipher||function(e){var t=n,r=t.lib,i=r.Base,o=r.WordArray,a=r.BufferedBlockAlgorithm,s=t.enc,l=(s.Utf8,s.Base64),c=t.algo.EvpKDF,u=r.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,r){this.cfg=this.cfg.extend(r),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?y:v}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()}),d=(r.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),t.mode={}),f=r.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}}),h=d.CBC=function(){var e=f.extend();function t(e,t,r){var n,i=this._iv;i?(n=i,this._iv=void 0):n=this._prevBlock;for(var o=0;o<r;o++)e[t+o]^=n[o]}return e.Encryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize;t.call(this,e,r,i),n.encryptBlock(e,r),this._prevBlock=e.slice(r,r+i)}}),e.Decryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize,o=e.slice(r,r+i);n.decryptBlock(e,r),t.call(this,e,r,i),this._prevBlock=o}}),e}(),p=(t.pad={}).Pkcs7={pad:function(e,t){for(var r=4*t,n=r-e.sigBytes%r,i=n<<24|n<<16|n<<8|n,a=[],s=0;s<n;s+=4)a.push(i);var l=o.create(a,n);e.concat(l)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},m=(r.BlockCipher=u.extend({cfg:u.cfg.extend({mode:h,padding:p}),reset:function(){var e;u.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.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}),r.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,r=e.salt;return(r?o.create([1398893684,1701076831]).concat(r).concat(t):t).toString(l)},parse:function(e){var t,r=l.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=o.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),m.create({ciphertext:r,salt:t})}},v=r.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),o=i.finalize(t),a=i.cfg;return m.create({ciphertext:o,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),b=(t.kdf={}).OpenSSL={execute:function(e,t,r,n){n||(n=o.random(8));var i=c.create({keySize:t+r}).compute(e,n),a=o.create(i.words.slice(t),4*r);return i.sigBytes=4*t,m.create({key:i,iv:a,salt:n})}},y=r.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:b}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;var o=v.encrypt.call(this,e,t,i.key,n);return o.mixIn(i),o},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);return n.iv=i.iv,v.decrypt.call(this,e,t,i.key,n)}})}()))},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,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return s})),r.d(t,"k",(function(){return l})),r.d(t,"h",(function(){return c})),r.d(t,"i",(function(){return u})),r.d(t,"g",(function(){return d})),r.d(t,"c",(function(){return f})),r.d(t,"d",(function(){return h})),r.d(t,"j",(function(){return p})),r.d(t,"e",(function(){return m})),r.d(t,"f",(function(){return g}));var n=r(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=r(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),o=(r(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),r(/*! react */"q1tI"),r(/*! rc-util/es/warning */"Kwbf"));r(/*! ./TreeNode */"WaYH");function a(e,t){var r=e.slice(),n=r.indexOf(t);return n>=0&&r.splice(n,1),r}function s(e,t){var r=e.slice();return-1===r.indexOf(t)&&r.push(t),r}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 d(e,t){var r=[e];return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.forEach((function(t){var n=t.key,i=t.children;r.push(n),e(i)}))}(t[e].children),r}function f(e,t){var r=e.clientY,n=t.selectHandle.getBoundingClientRect(),i=n.top,o=n.bottom,a=n.height,s=Math.max(.25*a,2);return r<=i+s?-1:r>=o-s?1:0}function h(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 r=new Set;return(e||[]).forEach((function(e){!function e(n){if(!r.has(n)){var i=t[n];if(i){r.add(n);var o=i.parent;i.node.disabled||o&&e(o.key)}}}(e)})),Object(n.a)(r)}function g(e){var t={};return Object.keys(e).forEach((function(r){(r.startsWith("data-")||r.startsWith("aria-"))&&(t[r]=e[r])})),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/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/slicedToArray.js */
/*! 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 ./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/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/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,r){"use strict";r("2qtc");var n=r("kLXV"),i=r("rAM+"),o=(r("miYZ"),r("tsqr")),a=r("tJVT"),s=r("jrin"),l=r("q1tI"),c=r.n(l),u=r("VrN/"),d=r.n(u),f=r("bdgK"),h=(r("p77/"),r("Bd2K"),r("ELLl"),r("19Vz"),r("lZu9"),r("+NIl"),r("kSUc"),r("9Bee")),p=function(e){var t=e.value,r=void 0===t?"":t,n=(e.className,e.showTextOnly,e.showLines,e.style,Object(l.useMemo)((function(){return""}),[r]));return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{dangerouslySetInnerHTML:{__html:n}}))},m=r("0Owb"),g=(r("dejd"),r("C+DQ"),[{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 v(e){var t=e.onActionCallback,r=e.title,n=e.icon,i=e.actionName,o=e.className,a=void 0===o?"":o,s=e.children;return c.a.createElement("a",{title:r,className:a,onClick:function(){t(i)}},c.a.createElement("i",{className:"md-iconfont ".concat(n)}),s)}var b=function(e){var t=e.watch,r=e.showNullButton,n=e.onActionCallback,i=e.fullScreen,o=e.insertTemp,a=e.hidetoolBar,s=[].concat(g,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return c.a.createElement("ul",{className:"markdown-toolbar-container"},!a&&s.map((function(e,t){return c.a.createElement("li",{key:t},e.actionName?c.a.createElement(v,Object(m.a)({},e,{onActionCallback:n})):c.a.createElement("span",{className:"v-line"}))})),r?c.a.createElement("li",null,c.a.createElement(v,{icon:"icon-edit",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:n},c.a.createElement("span",{className:"fill-tip"},"点击插入\b填空项"))):null,o&&c.a.createElement("li",null,c.a.createElement(v,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(o),onActionCallback:n},c.a.createElement("span",{className:"fill-tip"},"插入模板"))),c.a.createElement("li",{className:"btn-full-screen"},c.a.createElement(v,{icon:"".concat(i?"icon-shrink":"icon-enlarge"),title:i?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:n})))},y=r("M8RZ"),x=(r("+L6B"),r("2/Rp")),w=(r("y8nQ"),r("Vl3Y")),E=(r("5NDa"),r("5rEg")),S={labelCol:{span:4},wrapperCol:{span:20}},_=function(e){var t=e.callback,r=e.onCancel;return c.a.createElement(w.a,Object(m.a)({},S,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)}}),c.a.createElement(w.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},c.a.createElement(E.a,null)),c.a.createElement(w.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},c.a.createElement(E.a,null)),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(x.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),c.a.createElement(x.a,{type:"ghost",onClick:r},"取消")))},T=r("7ahc"),k=(r("HmJG"),r("BjJ7")),O=w.a.useForm,C={width:280,marginRight:10},A={labelCol:{span:5},wrapperCol:{span:19}},D=function(e){var t=e.callback,r=e.onCancel,n=O(),i=Object(a.a)(n,1)[0];function o(e,t){i.setFieldsValue({src:"/api/attachments/".concat(e.id),type:t.type})}return c.a.createElement(w.a,Object(m.a)({form:i},A,{className:"upload-image-panel",onFinish:function(e){t(e)}}),c.a.createElement(w.a.Item,{label:"图片地址",required:!0},c.a.createElement("div",{className:"flex-container"},c.a.createElement(w.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入图片地址"}]},c.a.createElement(E.a,{style:C})),c.a.createElement(L,{onFileChange:function(e){I(e.target.files[0],o)}}))),c.a.createElement(w.a.Item,{label:"图片描述",name:"alt",rules:[{required:!0,message:"请输入图片描述"}]},c.a.createElement(E.a,{style:{width:264}})),c.a.createElement(w.a.Item,{style:{textAlign:"right"}},c.a.createElement(x.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),c.a.createElement(x.a,{type:"ghost",onClick:r},"取消")))};function L(e){var t=e.onFileChange;return c.a.createElement("a",{className:"upload-button"},"本地上传",c.a.createElement("input",{type:"file",onChange:t}))}function I(e,t){if(!e)throw new String("没有文件");var r=new FormData;r.append("editormd-image-file",e),r.append("file_param_name","editormd-image-file"),r.append("byxhr","true");var n=new window.XMLHttpRequest;n.withCredentials=!0,n.addEventListener("load",(function(r){t(JSON.parse(r.target.responseText),e)}),!1),n.addEventListener("error",(function(e){console.error(e)}),!1),n.open("POST","".concat(k.a,"/api/attachments.json")),n.send(r)}r("giR+");var j,R,M=r("fyUT"),N=(r("7Kak"),r("9yH6")),P=N.a.Group,F={margin:"0 8px"},B=function(e){var t=e.callback,r=e.onCancel;return c.a.createElement(w.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)}},c.a.createElement("div",{className:"flex-container"},c.a.createElement("span",{style:F},"单元格数:"),c.a.createElement("span",{style:F},"行数"),c.a.createElement(w.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},c.a.createElement(M.a,null)),c.a.createElement("span",{style:F},"列数"),c.a.createElement(w.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},c.a.createElement(M.a,null))),c.a.createElement("div",{className:"flex-container",style:{marginTop:12}},c.a.createElement("span",{style:F},"对齐方式:"),c.a.createElement(w.a.Item,{name:"align"},c.a.createElement(P,null,c.a.createElement(N.a,{value:"default"},c.a.createElement("i",{className:"fa fa-align-justify"})),c.a.createElement(N.a,{value:"left"},c.a.createElement("i",{className:"fa fa-align-left"})),c.a.createElement(N.a,{value:"center"},c.a.createElement("i",{className:"fa fa-align-center"})),c.a.createElement(N.a,{value:"right"},c.a.createElement("i",{className:"fa fa-align-right"}))))),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(x.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),c.a.createElement(x.a,{type:"ghost",onClick:r},"取消")))},U=r("m3rI"),H="------------",z={default:H,left:":".concat(H),center:":".concat(H,":"),right:"".concat(H,":")},G=r("9VGf");function K(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var W=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",V=(j={},Object(s.a)(j,W+"-B","bold"),Object(s.a)(j,W+"-I","italic"),j),q=(R={},Object(s.a)(R,"link","添加链接"),Object(s.a)(R,"code-block","添加代码块"),Object(s.a)(R,"upload-image","添加图片"),Object(s.a)(R,"add-table","添加表格"),R);t.a=function(e){var t=e.defaultValue,r=void 0===t?"":t,u=e.onChange,m=e.width,g=void 0===m?"100%":m,v=e.height,x=void 0===v?400:v,w=e.miniToolbar,E=void 0!==w&&w,S=e.isFocus,k=void 0!==S&&S,O=e.watch,C=e.insertTemp,A=e.mode,L=void 0===A?"markdown":A,j=e.id,R=void 0===j?"markdown-editor-id":j,M=e.showResizeBar,N=void 0!==M&&M,P=e.noStorage,F=void 0!==P&&P,H=e.showNullButton,W=void 0!==H&&H,X=e.hidetoolBar,Y=void 0!==X&&X,$=e.fullScreen,J=void 0!==$&&$,Z=e.onBlur,Q=e.onCMBeforeChange,ee=e.onFullScreen,te=e.className,re=void 0===te?"":te,ne=e.disablePaste,ie=void 0!==ne&&ne,oe=e.placeholder,ae=void 0===oe?"":oe,se=e.values,le=void 0===se?"":se,ce=Object(l.useState)(null),ue=Object(a.a)(ce,2),de=ue[0],fe=ue[1],he=Object(l.useState)(r),pe=Object(a.a)(he,2),me=pe[0],ge=pe[1],ve=Object(l.useState)(O),be=Object(a.a)(ve,2),ye=be[0],xe=be[1],we=Object(l.useState)(J),Ee=Object(a.a)(we,2),Se=Ee[0],_e=Ee[1],Te=Object(l.useState)(""),ke=Object(a.a)(Te,2),Oe=ke[0],Ce=ke[1],Ae=Object(l.useState)(0),De=Object(a.a)(Ae,2),Le=De[0],Ie=De[1],je=Object(l.useState)(x),Re=Object(a.a)(je,2),Me=Re[0],Ne=Re[1],Pe=Object(l.useState)(!1),Fe=Object(a.a)(Pe,2),Be=(Fe[0],Fe[1]),Ue=Object(l.useRef)(),He=Object(l.useRef)(),ze=Object(l.useRef)(),Ge=Object(l.useRef)();Object(l.useEffect)((function(){ge(le),null==de||de.setValue(le)}),[le]),Object(l.useEffect)((function(){null==ee||ee(Se)}),[Se]),Object(l.useEffect)((function(){if(Ue.current){var e=d.a.fromTextArea(Ue.current,{mode:L,lineNumbers:!E,lineWrapping:!0,value:r,autoCloseTags:!0,autoCloseBrackets:!0});function t(t,r){if(!ie){var n=r.clipboardData;if(n){var i=n.types.toString(),a=n.items,s=["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"];if("Files"===i||n.types.indexOf("Files")>-1){if(r.preventDefault(),"stex"==L)return;try{var l,c=a[1];"file"===(null===(l=a[0])||void 0===l?void 0:l.kind)&&(c=a[0]);var u=c.getAsFile(),d=u.name.split(".").pop();I(u,(function(t){var r,n,i;t.id?(null==u||null===(r=u.type)||void 0===r?void 0:r.indexOf("image"))>-1?e.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):(null==u||null===(n=u.type)||void 0===n?void 0:n.indexOf("video"))>-1?e.replaceSelection('<video width="100%" controls src="'.concat(U.a.API_SERVER,"/api/attachments/").concat(t.id,'"></video>')):(null==u||null===(i=u.type)||void 0===i?void 0:i.indexOf("pdf"))>-1?e.replaceSelection('<a href="'.concat(U.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(u.type,'&disposition=inline" target="_blank">').concat(u.name,"</a>")):s.includes(d)?e.replaceSelection('<a href="'.concat(U.a.API_SERVER,"/api/attachments/").concat(t.id,'?type=office&disposition=inline" target="_blank">').concat(u.name,"</a>")):e.replaceSelection("[".concat(u.name,"](").concat(U.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(r){o.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}r.preventDefault()}return k&&e.focus(),e.on("paste",t),fe(e),function(){e.off("paste",t)}}}),[]);var Ke=Object(l.useCallback)((function(){He.current}),[Me,He,Se]);Object(l.useEffect)((function(){if(de){var e=function(){var e=new f.default((function(e){var t,r=Object(i.a)(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;(n.target.offsetHeight>0||n.target.offsetWidth>0)&&(Ke(),de.setSize("100%","100%"),de.refresh())}}catch(e){r.e(e)}finally{r.f()}}));return e.observe(Ue.current.parentElement),e}();return function(){e.unobserve(Ue.current.parentElement)}}}),[de,Ke]),Object(l.useEffect)((function(){if(de){for(var e=[],t=function(){var t=n[r],i=(o=Object(a.a)(t,2))[0],l=o[1],c=Object(s.a)({},i,(function(){We(l)}));e.push(c),de.addKeyMap(c)},r=0,n=Object.entries(V);r<n.length;r++){var o;t()}return function(){var t,r=Object(i.a)(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;de.removeKeyMap(n)}}catch(e){r.e(e)}finally{r.f()}}}}),[de]),Object(l.useEffect)((function(){J!==Se&&_e(J)}),[J]),Object(G.a)((function(){if(!F&&Le>0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(R);e>=Le+1e4&&(!t||t!==me)&&(window.sessionStorage.setItem(R,me),Be(!0))}}),1e4),Object(l.useEffect)((function(){xe(O)}),[de,O]),Object(l.useEffect)((function(){de&&k&&de.focus()}),[de,k]),Object(l.useEffect)((function(){if(ye&&de){var e=de.getScrollerElement();function t(e){var t=e.target;if(Ge.current){var r=t.scrollTop/t.scrollHeight;Ge.current.scrollTop=Ge.current.scrollHeight*r}}return e.addEventListener("scroll",t),function(){e.removeEventListener("scroll",t)}}}),[de,ye]),Object(l.useEffect)((function(){if(de&&Q){function e(e,t){Q(e,t)}return de.on("beforeChange",e),function(){de.off("beforeChange",e)}}}),[de,Q]),Object(l.useEffect)((function(){if(de&&Z){function e(){Z(de.getValue())}return de.on("blur",e),function(){de.off("blur",e)}}}),[de,Z]),Object(l.useEffect)((function(){if(de){function e(e){var t=e.getValue();ge(t),Ie((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),u&&u(t)}return de.on("change",e),function(){de.off("change",e)}}}),[de,u]),Object(l.useEffect)((function(){de&&(null==r?(de.setValue(""),ge("")):r!==de.getValue()&&(de.setValue(r),ge(r),de.setCursor(de.lineCount(),0)))}),[de,r]);var We=Object(l.useCallback)((function(e){var t=de.getCursor(),r=de.getSelection(),n=r.split("\n");switch(e){case"bold":return de.replaceSelection("**"+r+"**"),""===r&&de.setCursor(t.line,t.ch+2),de.focus();case"italic":return de.replaceSelection("*"+r+"*"),""===r&&de.setCursor(t.line,t.ch+1),de.focus();case"code":return de.replaceSelection("`"+r+"`"),""===r&&de.setCursor(t.line,t.ch+1),de.focus();case"inline-latex":return de.replaceSelection("`$$"+r+"$$`"),""===r&&de.setCursor(t.line,t.ch+3),de.focus();case"latex":return de.replaceSelection("```latex\n"+r+"\n```"),de.setCursor(t.line+1,r.length+1),de.focus();case"line-break":return de.replaceSelection("<br/>\n"),de.focus();case"list-ul":return""===r?de.replaceSelection("- "+r):de.replaceSelection(n.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),de.focus();case"list-ol":return""===r?de.replaceSelection("1. "+r):de.replaceSelection(n.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),de.focus();case"add-null-ch":return""===r&&de.setCursor(t.line,t.ch+1),de.replaceSelection("▁"),de.focus();case"inster-template-1":return""===r&&de.setCursor(t.line,t.ch),de.replaceSelection("\n**模板标题**\n模板正文内容可输入文本内容和粘贴图片等操作"),de.focus();case"eraser":return de.setValue(""),de.focus();case"trigger-watch":return xe(!ye),de.focus();case"trigger-full-screen":return _e(!Se),de.focus();case"link":return void Ce("link");case"code-block":return void Ce("code-block");case"upload-image":return void Ce("upload-image");case"add-table":return void Ce("add-table");default:throw new Error}}),[de,ye,Se]),Ve=Object(l.useCallback)((function(e){switch(Ce(""),Oe){case"link":var t=e.title,r=e.link;return de.replaceSelection("[".concat(t,"](").concat(r,")")),de.focus();case"code-block":var n=e.language,i=e.content;return de.replaceSelection(["```"+n,i,"```"].join("\n")),de.focus();case"upload-image":var o=e.src,a=e.alt;return de.replaceSelection("![ ".concat(a," ]( ").concat(o,' "').concat(a,'" )')),de.focus();case"add-table":for(var s=e.row,l=e.col,c=e.align,u="\n",d=0;d<s;d++){for(var f=[],h=[],p=0;p<l;p++)1===d&&h.push(z[c]),f.push(" ");1===d&&(u+="| ".concat(h.join(" | ")," |\n")),u+="| ".concat(f.join(1===l?"":" | ")," |\n")}return de.replaceSelection(u+"\n"),de.focus();default:throw new Error}}),[de,Oe]),qe=Object(l.useMemo)((function(){switch(Oe){case"link":return c.a.createElement(_,{callback:Ve,onCancel:Xe});case"code-block":return c.a.createElement(T.b,{callback:Ve,onCancel:Xe});case"upload-image":return c.a.createElement(D,{callback:Ve,onCancel:Xe});case"add-table":return c.a.createElement(B,{callback:Ve,onCancel:Xe});default:return null}}),[Oe]);function Xe(){Ce("")}Object(l.useEffect)((function(){if(ze.current){var e=ze.current,t=!1,r=0;function n(e){t=!0,r=e.pageY}function i(){t=!1}function o(e){if(t){var n=e.pageY-r;n<0&&(n=0),n>300&&(n=300),Ne(x+n+"px")}}return e.addEventListener("mousedown",n),document.addEventListener("mousemove",o),document.addEventListener("mouseup",i),function(){e.removeEventListener("mousedown",n),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",i)}}}),[de,ze]),Object(l.useEffect)((function(){Ne(x)}),[x]);var Ye={width:K(g),height:K(Me)};Object(l.useMemo)((function(){if(Le){var e=new Date(Le),t=e.getHours(),r=e.getMinutes(),n=e.getSeconds();return r=r<10?"0"+r:r,n=n<10?"0"+n:n,"".concat(t=t<10?"0"+t:t,":").concat(r,":").concat(n)}return 0}),[Le]);return c.a.createElement(l.Fragment,null,c.a.createElement("div",{className:"markdown-editor-wrapper",ref:He},c.a.createElement("div",{className:"markdown-editor-container ".concat(re," ").concat(ye?"on-preview":""," ").concat(E?"mini":""," ").concat(Se?"full-screen":""),style:Ye},c.a.createElement(b,{insertTemp:C,watch:ye,fullScreen:Se,showNullButton:W,onActionCallback:We,hidetoolBar:Y}),c.a.createElement("div",{className:"markdown-editor-body"},c.a.createElement("div",{className:"codemirror-container"},c.a.createElement("textarea",{ref:Ue,placeholder:ae})),ye?c.a.createElement("div",{ref:Ge,className:"preview-container"},"stex"===L&&c.a.createElement(p,{value:me}),"stex"!==L&&c.a.createElement(h.a,{value:me})):null))),N?c.a.createElement("a",{ref:ze,className:"editor-resize"}):null,c.a.createElement(y.a,null,q[Oe]?c.a.createElement(n.a,{centered:!0,title:q[Oe],visible:!0,onCancel:Xe,footer:null},qe):null))}},PD8m:
/*!******************************************************!*\
!*** ./node_modules/store/storages/memoryStorage.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports={name:"memoryStorage",read:function(e){return r[e]},write:function(e,t){r[e]=t},each:function(e){for(var t in r)r.hasOwnProperty(t)&&e(r[t],t)},remove:function(e){delete r[e]},clearAll:function(e){r={}}};var r={}},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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),r(/*! ./enc-base64 */"ETIr"),r(/*! ./md5 */"cv67"),r(/*! ./evpkdf */"K3mO"),r(/*! ./cipher-core */"OLod"),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],o=[],a=[],s=r.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,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],n=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++)n[i]^=r[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),d=c>>>16|4294901760&u,f=u<<16|65535&c;for(n[0]^=c,n[1]^=d,n[2]^=u,n[3]^=f,n[4]^=c,n[5]^=d,n[6]^=u,n[7]^=f,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var r=this._X;l.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];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,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=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)}(),n.RabbitLegacy)},RELg:
/*!**************************************************************!*\
!*** ./node_modules/store/storages/oldIE-userDataStorage.js ***!
\**************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){var n=r(/*! ../src/util */"MFOe").Global;e.exports={name:"oldIE-userDataStorage",write:function(e,t){if(a)return;var r=l(e);o((function(e){e.setAttribute(r,t),e.save("storejs")}))},read:function(e){if(a)return;var t=l(e),r=null;return o((function(e){r=e.getAttribute(t)})),r},each:function(e){o((function(t){for(var r=t.XMLDocument.documentElement.attributes,n=r.length-1;n>=0;n--){var i=r[n];e(t.getAttribute(i.name),i.name)}}))},remove:function(e){var t=l(e);o((function(e){e.removeAttribute(t),e.save("storejs")}))},clearAll:function(){o((function(e){var t=e.XMLDocument.documentElement.attributes;e.load("storejs");for(var r=t.length-1;r>=0;r--)e.removeAttribute(t[r].name);e.save("storejs")}))}};var i=n.document,o=function(){if(!i||!i.documentElement||!i.documentElement.addBehavior)return null;var e,t,r;try{(t=new ActiveXObject("htmlfile")).open(),t.write('<script>document.w=window<\/script><iframe src="/favicon.ico"></iframe>'),t.close(),e=t.w.frames[0].document,r=e.createElement("div")}catch(t){r=i.createElement("div"),e=i.body}return function(t){var n=[].slice.call(arguments,0);n.unshift(r),e.appendChild(r),r.addBehavior("#default#userData"),r.load("storejs"),t.apply(this,n),e.removeChild(r)}}(),a=(n.navigator?n.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);var s=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function l(e){return e.replace(/^\d/,"___$&").replace(s,"___")}},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,r){var n,i,o;e.exports=(o=r(/*! ./core */"Ib8C"),r(/*! ./cipher-core */"OLod"),o.mode.OFB=(n=o.lib.BlockCipherMode.extend(),i=n.Encryptor=n.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),r.encryptBlock(o,0);for(var a=0;a<n;a++)e[t+a]^=o[a]}}),n.Decryptor=i,n),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,r){var n=r(/*! ./arrayWithHoles.js */"wTVA"),i=r(/*! ./iterableToArray.js */"EbDI"),o=r(/*! ./unsupportedIterableToArray.js */"ZhPi"),a=r(/*! ./nonIterableRest.js */"wkBT");e.exports=function(e){return n(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"],r=[[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"],n=[r,"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=[r,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],o=[r,"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=[r,"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"],d=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;function f(e,t,r,n,i){if(r){var o={sourceNode:e,pre:1,langExtension:null,numberLines:null,sourceCode:r,spans:null,basePos:t,decorations:null};n(o),i.push.apply(i,o.decorations)}}var h=/\S/;function p(e){for(var t=void 0,r=e.firstChild;r;r=r.nextSibling){var n=r.nodeType;t=1===n?t?e:r:3===n&&h.test(r.nodeValue)?e:t}return t===e?void 0:t}function m(e,t){var r,n={};!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 d=u.length;--d>=0;)n[u.charAt(d)]=c;var f=c[1],h=""+f;a.hasOwnProperty(h)||(o.push(f),a[h]=null)}o.push(/[\0-\uffff]/),r=function(e){for(var t=0,r=!1,n=!1,i=0,o=e.length;i<o;++i){if((f=e[i]).ignoreCase)n=!0;else if(/[a-z]/i.test(f.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){r=!0,n=!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 r=e.charAt(1);return(t=a[r])||("0"<=r&&r<="7"?parseInt(e.substring(1),8):"u"===r||"x"===r?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")),r=[],n="^"===t[0],i=["["];n&&i.push("^");for(var o=n?1:0,a=t.length;o<a;++o){var c=t[o];if(/\\[bdsw]/i.test(c))i.push(c);else{var u,d=s(c);o+2<a&&"-"===t[o+1]?(u=s(t[o+2]),o+=2):u=d,r.push([d,u]),u<65||d>122||(u<65||d>90||r.push([32|Math.max(65,d),32|Math.min(u,90)]),u<97||d>122||r.push([-33&Math.max(97,d),-33&Math.min(u,122)]))}}r.sort((function(e,t){return e[0]-t[0]||t[1]-e[1]}));var f=[],h=[];for(o=0;o<r.length;++o){(p=r[o])[0]<=h[1]+1?h[1]=Math.max(h[1],p[1]):f.push(h=p)}for(o=0;o<f.length;++o){var p=f[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 n=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=n.length,o=[],a=0,s=0;a<i;++a){if("("===(d=n[a]))++s;else if("\\"===d.charAt(0)){(u=+d.substring(1))&&(u<=s?o[u]=-1:n[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("("===(d=n[a]))o[++s]||(n[a]="(?:");else if("\\"===d.charAt(0)){var u;(u=+d.substring(1))&&u<=s&&(n[a]="\\"+o[u])}}for(a=0;a<i;++a)"^"===n[a]&&"^"!==n[a+1]&&(n[a]="");if(e.ignoreCase&&r)for(a=0;a<i;++a){var d,f=(d=n[a]).charAt(0);d.length>=2&&"["===f?n[a]=c(d):"\\"!==f&&(n[a]=d.replace(/[a-zA-Z]/g,(function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(-33&t,32|t)+"]"})))}return n.join("")}var d=[];for(i=0,o=e.length;i<o;++i){var f;if((f=e[i]).global||f.multiline)throw new Error(""+f);d.push("(?:"+u(f)+")")}return new RegExp(d.join("|"),n?"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,d=a.match(r)||[],h={},p=0,m=d.length;p<m;++p){var g,v=d[p],b=h[v],y=void 0;if("string"==typeof b)g=!1;else{var x=n[v.charAt(0)];if(x)y=v.match(x[1]),b=x[0];else{for(var E=0;E<i;++E)if(x=t[E],y=v.match(x[1])){b=x[0];break}y||(b="pln")}!(g=b.length>=5&&"lang-"===b.substring(0,5))||y&&"string"==typeof y[1]||(g=!1,b="src"),g||(h[v]=b)}var S=u;if(u+=v.length,g){var _=y[1],T=v.indexOf(_),k=T+_.length;y[2]&&(T=(k=v.length-y[2].length)-_.length);var O=b.substring(5);f(l,s+S,v.substring(0,T),o,c),f(l,s+S+T,_,w(O,_),c),f(l,s+S+k,v.substring(k),o,c)}else c.push(s+S,b)}e.decorations=c};return o}function g(e){var t=[],r=[];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&&r.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var n=e.hashComments;n&&(e.cStyleComments?(n>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,"#"]),r.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):t.push(["com",/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(r.push(["com",/^\/\/[^\r\n]*/,null]),r.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|$))+/";r.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+s+")")])}var l=e.types;l&&r.push(["typ",l]);var c=(""+e.keywords).replace(/^ | $/g,"");c.length&&r.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*/)"),r.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,r)}var v=g({keywords:[n,o,i,a,s,l,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function b(e,t,r){for(var n=/(?:^|\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||n.test(e.className)){if((3==t||4==t)&&r){var a=e.nodeValue,s=a.match(i);if(s){var u=a.substring(0,s.index);e.nodeValue=u;var d=a.substring(s.index+s[0].length);if(d)e.parentNode.insertBefore(o.createTextNode(d),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 f=e.firstChild;f;f=f.nextSibling)l(f)}function c(e){for(;!e.nextSibling;)if(!(e=e.parentNode))return;for(var t,r=function e(t,r){var n=r?t.cloneNode(!1):t,i=t.parentNode;if(i){var o=e(i,1),a=t.nextSibling;o.appendChild(n);for(var s=a;s;s=a)a=s.nextSibling,o.appendChild(s)}return n}(e.nextSibling,0);(t=r.parentNode)&&1===t.nodeType;)r=t;s.push(r)}for(var u=0;u<s.length;++u)l(s[u]);t===(0|t)&&s[0].setAttribute("value",t);var d=o.createElement("ol");d.className="linenums";for(var f=Math.max(0,t-1|0)||0,h=(u=0,s.length);u<h;++u)(a=s[u]).className="L"+(u+f)%10,a.firstChild||a.appendChild(o.createTextNode(" ")),d.appendChild(a);e.appendChild(d)}var y={};function x(t,r){for(var n=r.length;--n>=0;){var i=r[n];y.hasOwnProperty(i)?e.console&&console.warn("cannot override language handler %s",i):y[i]=t}}function w(e,t){return e&&y.hasOwnProperty(e)||(e=/^\s*</.test(t)?"default-markup":"default-code"),y[e]}function E(t){var r,n,i,o,a,s,l,c=t.langExtension;try{var u=(r=t.sourceNode,n=t.pre,i=/(?:^|\s)nocode(?:\s|$)/,o=[],a=0,s=[],l=0,function e(t){var r=t.nodeType;if(1==r){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==r||4==r){var d=t.nodeValue;d.length&&(d=n?d.replace(/\r\n?/g,"\n"):d.replace(/[ \t\r\n]+/g," "),o[l]=d,s[l<<1]=a,a+=d.length,s[l++<<1|1]=t)}}(r),{sourceCode:o.join("").replace(/\n$/,""),spans:s}),d=u.sourceCode;t.sourceCode=d,t.spans=u.spans,t.basePos=0,w(c,d)(t),function(e){var t=/\bMSIE\s(\d+)/.exec(navigator.userAgent);t=t&&+t[1]<=8;var r,n,i=/\n/g,o=e.sourceCode,a=o.length,s=0,l=e.spans,c=l.length,u=0,d=e.decorations,f=d.length,h=0;for(d[f]=a,n=r=0;n<f;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;for(f=r,n=r=0;n<f;){for(var p=d[n],m=d[n+1],g=n+2;g+2<=f&&d[g+1]===m;)g+=2;d[r++]=p,d[r++]=m,n=g}f=d.length=r;var v=e.sourceNode,b="";v&&(b=v.style.display,v.style.display="none");try{for(;u<c;){l[u];var y,x=l[u+2]||a,w=d[h+2]||a,E=(g=Math.min(x,w),l[u+1]);if(1!==E.nodeType&&(y=o.substring(s,g))){t&&(y=y.replace(i,"\r")),E.nodeValue=y;var S=E.ownerDocument,_=S.createElement("span");_.className=d[h+1];var T=E.parentNode;T.replaceChild(_,E),_.appendChild(E),s<x&&(l[u+1]=E=S.createTextNode(o.substring(g,x)),T.insertBefore(E,_.nextSibling))}(s=g)>=x&&(u+=2),s>=w&&(h+=2)}}finally{v&&(v.style.display=b)}}(t)}catch(t){e.console&&console.log(t&&t.stack||t)}}function S(e,t,r){var n=r||!1,i=t||null,o=document.createElement("div");return o.innerHTML="<pre>"+e+"</pre>",o=o.firstChild,n&&b(o,n,!0),E({langExtension:i,numberLines:n,sourceNode:o,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),o.innerHTML}function _(t,r){var n=r||document.body,i=n.ownerDocument||document;function o(e){return n.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 d=Date;d.now||(d={now:function(){return+new Date}});var f=0,h=/\blang(?:uage)?-([\w.]+)(?!\S)/,m=/\bprettyprint\b/,g=/\bprettyprinted\b/,v=/pre|xmp/i,y=/^code$/i,x=/^(?:pre|code|xmp)$/i,w={};!function r(){for(var n=e.PR_SHOULD_USE_CONTINUATION?d.now()+250:1/0;f<s.length&&d.now()<n;f++){for(var o=s[f],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,r){a[t]=r}));break}}var S=o.className;if((a!==w||m.test(S))&&!g.test(S)){for(var _=!1,T=o.parentNode;T;T=T.parentNode){var k=T.tagName;if(x.test(k)&&T.className&&m.test(T.className)){_=!0;break}}if(!_){o.className+=" prettyprinted";var O,C,A=a.lang;if(!A)!(A=S.match(h))&&(O=p(o))&&y.test(O.tagName)&&(A=O.className.match(h)),A&&(A=A[1]);if(v.test(o.tagName))C=1;else{var D=o.currentStyle,L=i.defaultView,I=D?D.whiteSpace:L&&L.getComputedStyle?L.getComputedStyle(o,null).getPropertyValue("white-space"):0;C=I&&"pre"===I.substring(0,3)}var j=a.linenums;(j="true"===j||+j)||(j=!!(j=S.match(/\blinenums\b(?::(\d+))?/))&&(!j[1]||!j[1].length||+j[1])),j&&b(o,j,C),E({langExtension:A,sourceNode:o,numberLines:j,pre:C,sourceCode:null,basePos:null,spans:null,decorations:null})}}}f<s.length?e.setTimeout(r,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:n,hashComments:!0,cStyleComments:!0,types:d}),["c","cc","cpp","cxx","cyc","m"]),x(g({keywords:"null,true,false"}),["json"]),x(g({keywords:o,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:d}),["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 T=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:_},k=e.define;"function"==typeof k&&k.amd&&k("google-code-prettify",[],(function(){return T}))}()},"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,r){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=n||i||o,s=a&&(n?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),d=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),h=/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),b=m||/Mac/.test(t),y=/\bCrOS\b/.test(e),x=/win/i.test(t),w=d&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(d=!1,l=!0);var E=b&&(c||d&&(null==w||w<12.11)),S=r||a&&s>=9;function _(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var T,k=function(e,t){var r=e.className,n=_(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function O(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function C(e,t){return O(e).appendChild(t)}function A(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"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 D(e,t,r,n){var i=A(e,t,r,n);return i.setAttribute("role","presentation"),i}function L(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 j(e,t){var r=e.className;_(t).test(r)||(e.className+=(r?" ":"")+t)}function R(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!_(r[n]).test(t)&&(t+=" "+r[n]);return t}T=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var M=function(e){e.select()};function N(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function P(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function F(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=r-a%r,o=s+1}}m?M=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(M=function(e){try{e.select()}catch(e){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=N(this.onTimeout,this)};function U(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}B.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},B.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};var H={toString:function(){return"CodeMirror.Pass"}},z={scroll:!1},G={origin:"*mouse"},K={origin:"+move"};function W(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var a=o-n;if(o==e.length||i+a>=t)return n+Math.min(a,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var V=[""];function q(e){for(;V.length<=e;)V.push(X(V)+" ");return V[e]}function X(e){return e[e.length-1]}function Y(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function $(){}function J(e,t){var r;return Object.create?r=Object.create(e):($.prototype=e,r=new $),t&&P(t,r),r}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 re=/[\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 ne(e){return e.charCodeAt(0)>=768&&re.test(e)}function ie(e,t,r){for(;(r<0?t>0:t<e.length)&&ne(e.charAt(t));)t+=r;return t}function oe(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}var ae=null;function se(e,t,r){var n;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"==r?n=i:ae=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:ae=i)}return null!=n?n:ae}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,r=/[LRr]/,n=/[Lb1n]/,i=/[1n]/;function o(e,t,r){this.level=e,this.from=t,this.to=r}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,d=[],f=0;f<u;++f)d.push((c=a.charCodeAt(f))<=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 h=0,p=l;h<u;++h){var m=d[h];"m"==m?d[h]=p:p=m}for(var g=0,v=l;g<u;++g){var b=d[g];"1"==b&&"r"==v?d[g]="n":r.test(b)&&(v=b,"r"==b&&(d[g]="R"))}for(var y=1,x=d[0];y<u-1;++y){var w=d[y];"+"==w&&"1"==x&&"1"==d[y+1]?d[y]="1":","!=w||x!=d[y+1]||"1"!=x&&"n"!=x||(d[y]=x),x=w}for(var E=0;E<u;++E){var S=d[E];if(","==S)d[E]="N";else if("%"==S){var _=void 0;for(_=E+1;_<u&&"%"==d[_];++_);for(var T=E&&"!"==d[E-1]||_<u&&"1"==d[_]?"1":"N",k=E;k<_;++k)d[k]=T;E=_-1}}for(var O=0,C=l;O<u;++O){var A=d[O];"L"==C&&"1"==A?d[O]="L":r.test(A)&&(C=A)}for(var D=0;D<u;++D)if(t.test(d[D])){var L=void 0;for(L=D+1;L<u&&t.test(d[L]);++L);for(var I="L"==(D?d[D-1]:l),j=I==("L"==(L<u?d[L]:l))?I?"L":"R":l,R=D;R<L;++R)d[R]=j;D=L-1}for(var M,N=[],P=0;P<u;)if(n.test(d[P])){var F=P;for(++P;P<u&&n.test(d[P]);++P);N.push(new o(0,F,P))}else{var B=P,U=N.length,H="rtl"==s?1:0;for(++P;P<u&&"L"!=d[P];++P);for(var z=B;z<P;)if(i.test(d[z])){B<z&&(N.splice(U,0,new o(1,B,z)),U+=H);var G=z;for(++z;z<P&&i.test(d[z]);++z);N.splice(U,0,new o(2,G,z)),U+=H,B=z}else++z;B<P&&N.splice(U,0,new o(1,B,P))}return"ltr"==s&&(1==N[0].level&&(M=a.match(/^\s+/))&&(N[0].from=M[0].length,N.unshift(new o(0,0,M[0].length))),1==X(N).level&&(M=a.match(/\s+$/))&&(X(N).to-=M[0].length,N.push(new o(0,u-M[0].length,u)))),"rtl"==s?N.reverse():N}}();function ce(e,t){var r=e.order;return null==r&&(r=e.order=le(e.text,t)),r}var ue=[],de=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||ue).concat(r)}};function fe(e,t){return e._handlers&&e._handlers[t]||ue}function he(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=U(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function pe(e,t){var r=fe(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function me(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),pe(e,r||t.type,e,t),we(t)||t.codemirrorIgnore}function ge(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==U(r,t[n])&&r.push(t[n])}function ve(e,t){return fe(e,t).length>0}function be(e){e.prototype.on=function(e,t){de(this,e,t)},e.prototype.off=function(e,t){he(this,e,t)}}function ye(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){ye(e),xe(e)}function Se(e){return e.target||e.srcElement}function _e(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Te,ke,Oe=function(){if(a&&s<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function Ce(e){if(null==Te){var t=A("span","");C(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Te=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var r=Te?A("span",""):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Ae(e){if(null!=ke)return ke;var t=C(e,document.createTextNode("AخA")),r=T(t,0,1).getBoundingClientRect(),n=T(t,1,2).getBoundingClientRect();return O(e),!(!r||r.left==r.right)&&(ke=n.right-r.right<3)}var De,Le=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){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?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}: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)},je="oncopy"in(De=A("div"))||(De.setAttribute("oncopy","return;"),"function"==typeof De.oncopy),Re=null,Me={},Ne={};function Pe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Me[e]=t}function Fe(e){if("string"==typeof e&&Ne.hasOwnProperty(e))e=Ne[e];else if(e&&"string"==typeof e.name&&Ne.hasOwnProperty(e.name)){var t=Ne[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 Fe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Fe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Be(e,t){t=Fe(t);var r=Me[t.name];if(!r)return Be(e,"text/plain");var n=r(e,t);if(Ue.hasOwnProperty(t.name)){var i=Ue[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}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 r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Ge(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ke(e,t,r){return!e.startState||e.startState(t,r)}var We=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Ve(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 r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function qe(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,(function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i})),n}function Xe(e,t,r){var n=[];return e.iter(t,r,(function(e){n.push(e.text)})),n}function Ye(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function $e(e){if(null==e.parent)return null;for(var t=e.parent,r=U(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function Je(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}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 r+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,r){if(void 0===r&&(r=null),!(this instanceof et))return new et(e,t,r);this.line=e,this.ch=t,this.sticky=r}function tt(e,t){return e.line-t.line||e.ch-t.ch}function rt(e,t){return e.sticky==t.sticky&&0==tt(e,t)}function nt(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 r=e.first+e.size-1;return t.line>r?et(r,Ve(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?et(e.line,t):r<0?et(e.line,0):e}(t,Ve(e,t.line).text.length)}function lt(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=st(e,t[n]);return r}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=F(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},We.prototype.indentation=function(){return F(this.string,null,this.tabSize)-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},We.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?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,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function dt(e,t,r,n){var i=[e.state.modeGen],o={};xt(e,t.text,e.doc.mode,r,(function(e,t){return i.push(e,t)}),o,n);for(var a=r.state,s=function(n){r.baseTokens=i;var s=e.state.overlays[n],l=1,c=0;r.state=!0,xt(e,t.text,s.mode,r,(function(e,t){for(var r=l;c<e;){var n=i[l];n>e&&i.splice(l,1,e,i[l+1],n),l+=2,c=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,l-r,e,"overlay "+t),l=r+2;else for(;r<l;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}}),o),r.state=a,r.baseTokens=null,r.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function ft(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=ht(e,$e(t)),i=t.text.length>e.options.maxHighlightLength&&ze(e.doc.mode,n.state),o=dt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ht(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new ut(n,!0,t);var o=function(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=Ve(o,s-1),c=l.stateAfter;if(c&&(!r||s+(c instanceof ct?c.lookAhead:0)<=o.modeFrontier))return s;var u=F(l.text,null,e.options.tabSize);(null==i||n>u)&&(i=s-1,n=u)}return i}(e,t,r),a=o>n.first&&Ve(n,o-1).stateAfter,s=a?ut.fromSaved(n,a,o):new ut(n,Ke(n.mode),o);return n.iter(o,t,(function(r){pt(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&n<i.viewTo?s.save():null,s.nextLine()})),r&&(n.modeFrontier=s.line),s}function pt(e,t,r,n){var i=e.doc.mode,o=new We(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&mt(i,r.state);!o.eol();)gt(i,o,r.state),o.start=o.pos}function mt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Ge(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function gt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Ge(e,r).mode);var o=e.token(t,r);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,r){return t instanceof ct?new ut(e,ze(e.mode,t.state),r,t.lookAhead):new ut(e,ze(e.mode,t),r)},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,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function bt(e,t,r,n){var i,o,a=e.doc,s=a.mode,l=Ve(a,(t=st(a,t)).line),c=ht(e,t.line,r),u=new We(l.text,e.options.tabSize,c);for(n&&(o=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=gt(s,u,c.state),n&&o.push(new vt(u,i,ze(a.mode,c.state)));return n?o:new vt(u,i,c.state)}function yt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function xt(e,t,r,n,i,o,a){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,d=new We(t,e.options.tabSize,n),f=e.options.addModeClass&&[null];for(""==t&&yt(mt(r,n.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,a&&pt(e,t,n,d.pos),d.pos=t.length,l=null):l=yt(gt(r,d,n.state,f),o),f){var h=f[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!s||u!=l){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=l}d.start=d.pos}for(;c<d.pos;){var p=Math.min(d.pos,c+5e3);i(p,u),c=p}}var wt=!1,Et=!1;function St(e,t,r){this.marker=e,this.from=t,this.to=r}function _t(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Tt(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function kt(e,t){if(t.full)return null;var r=Ze(e,t.from.line)&&Ve(e,t.from.line).markedSpans,n=Ze(e,t.to.line)&&Ve(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==tt(t.from,t.to),s=function(e,t,r){var n;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&&(!r||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new St(a,o.from,s?null:o.to))}}return n}(r,i,a),l=function(e,t,r){var n;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&&(!r||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new St(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}(n,o,a),c=1==t.text.length,u=X(t.text).length+(c?i:0);if(s)for(var d=0;d<s.length;++d){var f=s[d];if(null==f.to){var h=_t(l,f.marker);h?c&&(f.to=null==h.to?null:h.to+u):f.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?_t(s,m.marker)||(m.from=u,c&&(s||(s=[])).push(m)):(m.from+=u,c&&(s||(s=[])).push(m))}s&&(s=Ot(s)),l&&l!=s&&(l=Ot(l));var g=[s];if(!c){var v,b=t.text.length-2;if(b>0&&s)for(var y=0;y<s.length;++y)null==s[y].to&&(v||(v=[])).push(new St(s[y].marker,null,null));for(var x=0;x<b;++x)g.push(v);g.push(l)}return g}function Ot(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Ct(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function At(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Dt(e){return e.inclusiveLeft?-1:0}function Lt(e){return e.inclusiveRight?1:0}function It(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=tt(n.from,i.from)||Dt(e)-Dt(t);if(o)return-o;var a=tt(n.to,i.to)||Lt(e)-Lt(t);return a||t.id-e.id}function jt(e,t){var r,n=Et&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||It(r,i.marker)<0)&&(r=i.marker);return r}function Rt(e){return jt(e,!0)}function Mt(e){return jt(e,!1)}function Nt(e,t){var r,n=Et&&e.markedSpans;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!r||It(r,o.marker)<0)&&(r=o.marker)}return r}function Pt(e,t,r,n,i){var o=Ve(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,r)||Dt(l.marker)-Dt(i),d=tt(c.to,n)||Lt(l.marker)-Lt(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.to,r)>=0:tt(c.to,r)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.from,n)<=0:tt(c.from,n)<0)))return!0}}}function Ft(e){for(var t;t=Rt(e);)e=t.find(-1,!0).line;return e}function Bt(e,t){var r=Ve(e,t),n=Ft(r);return r==n?t:$e(n)}function Ut(e,t){if(t>e.lastLine())return t;var r,n=Ve(e,t);if(!Ht(e,n))return t;for(;r=Mt(n);)n=r.find(1,!0).line;return $e(n)+1}function Ht(e,t){var r=Et&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&zt(e,t,n))return!0}}function zt(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return zt(e,n.line,_t(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.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==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&zt(e,t,i))return!0}function Gt(e){for(var t=0,r=(e=Ft(e)).parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;o=(r=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==r)break;t+=s.height}return t}function Kt(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=Rt(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=Mt(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function Wt(e){var t=e.display,r=e.doc;t.maxLine=Ve(r,r.first),t.maxLineLength=Kt(t.maxLine),t.maxLineChanged=!0,r.iter((function(e){var r=Kt(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var Vt=function(e,t,r){this.text=e,At(this,t),this.height=r?r(this):1};function qt(e){e.parent=null,Ct(e)}Vt.prototype.lineNo=function(){return $e(this)},be(Vt);var Xt={},Yt={};function $t(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Yt:Xt;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Jt(e,t){var r=D("span",null,null,l?"padding-right: .1px":null),n={pre:D("pre",[r],"CodeMirror-line"),content:r,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;n.pos=0,n.addToken=Qt,Ae(e.display.measure)&&(a=ce(o,e.doc.direction))&&(n.addToken=er(n.addToken,a)),n.map=[],rr(o,n,ft(e,o,t!=e.display.externalMeasured&&$e(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=R(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=R(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Ce(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return pe(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=R(n.pre.className,n.textClass||"")),n}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,r,n,i,o,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}(t,e.trailingSpace):t,d=e.cm.state.specialChars,f=!1;if(d.test(t)){c=document.createDocumentFragment();for(var h=0;;){d.lastIndex=h;var p=d.exec(t),m=p?p.index-h:t.length-h;if(m){var g=document.createTextNode(u.slice(h,h+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;h+=m+1;var v=void 0;if("\t"==p[0]){var b=e.cm.options.tabSize,y=b-e.col%b;(v=c.appendChild(A("span",q(y),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=y}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&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),r||n||i||f||o||l){var x=r||"";n&&(x+=n),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 er(e,t){return function(r,n,i,o,a,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=r.pos,u=c+n.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>c&&d.from<=c);f++);if(d.to>=u)return e(r,n,i,o,a,s,l);e(r,n.slice(0,d.to-c),i,o,null,s,l),o=null,n=n.slice(d.to-c),c=d.to}}}function tr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function rr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a,s,l,c,u,d,f,h=i.length,p=0,m=1,g="",v=0;;){if(v==p){l=c=u=s="",f=null,d=null,v=1/0;for(var b=[],y=void 0,x=0;x<n.length;++x){var w=n[x],E=w.marker;if("bookmark"==E.type&&w.from==p&&E.widgetNode)b.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&&(y||(y=[])).push(E.endStyle,w.to),E.title&&((f||(f={})).title=E.title),E.attributes)for(var S in E.attributes)(f||(f={}))[S]=E.attributes[S];E.collapsed&&(!d||It(d.marker,E)<0)&&(d=w)}else w.from>p&&v>w.from&&(v=w.from)}if(y)for(var _=0;_<y.length;_+=2)y[_+1]==v&&(c+=" "+y[_]);if(!d||d.from==p)for(var T=0;T<b.length;++T)tr(t,0,b[T]);if(d&&(d.from||0)==p){if(tr(t,(null==d.to?h+1:d.to)-p,d.marker,null==d.from),null==d.to)return;d.to==p&&(d=!1)}}if(p>=h)break;for(var k=Math.min(h,v);;){if(g){var O=p+g.length;if(!d){var C=O>k?g.slice(0,k-p):g;t.addToken(t,C,a?a+l:l,u,p+C.length==v?c:"",s,f)}if(O>=k){g=g.slice(k-p),p=k;break}p=O,u=""}g=i.slice(o,o=r[m++]),a=$t(r[m++],t.cm.options)}}else for(var A=1;A<r.length;A+=2)t.addToken(t,i.slice(o,o=r[A]),$t(r[A+1],t.cm.options))}function nr(e,t,r){this.line=t,this.rest=function(e){for(var t,r;t=Mt(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}(t),this.size=this.rest?$e(X(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Ht(e,t)}function ir(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new nr(e.doc,Ve(e.doc,o),o);n=o+a.size,i.push(a)}return i}var or=null,ar=null;function sr(e,t){var r=fe(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);or?n=or.delayedCallbacks:ar?n=ar:(n=ar=[],setTimeout(lr,0));for(var o=function(e){n.push((function(){return r[e].apply(null,i)}))},a=0;a<r.length;++a)o(a)}}function lr(){var e=ar;ar=null;for(var t=0;t<e.length;++t)e[t]()}function cr(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?fr(e,t):"gutter"==o?pr(e,t,r,n):"class"==o?hr(e,t):"widget"==o&&mr(e,t,n)}t.changes=null}function ur(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 dr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Jt(e,t)}function fr(e,t){var r=t.text.className,n=dr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,hr(e,t)):r&&(t.text.className=r)}function hr(e,t){!function(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=ur(t);t.background=n.insertBefore(A("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?ur(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function pr(e,t,r,n){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=ur(t);t.gutterBackground=A("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.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=ur(t),s=t.gutter=A("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.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,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.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: "+n.gutterLeft[c]+"px; width: "+n.gutterWidth[c]+"px"))}}}function mr(e,t,r){t.alignable&&(t.alignable=null);for(var n=_("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);vr(e,t,r)}function gr(e,t,r,n){var i=dr(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),hr(e,t),pr(e,t,r,n),vr(e,t,n),t.node}function vr(e,t,r){if(br(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)br(e,t.rest[n],t,r,!1)}function br(e,t,r,n,i){if(t.widgets)for(var o=ur(r),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"),yr(l,c,r,n),e.display.input.setUneditable(c),i&&l.above?o.insertBefore(c,r.gutter||r.text):o.appendChild(c),sr(l,"redraw")}}function yr(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function xr(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!L(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),C(t.display.measure,A("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function wr(e,t){for(var r=Se(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Er(e){return e.lineSpace.offsetTop}function Sr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function _r(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=C(e.measure,A("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function Tr(e){return 50-e.display.nativeBarWidth}function kr(e){return e.display.scroller.clientWidth-Tr(e)-e.display.barWidth}function Or(e){return e.display.scroller.clientHeight-Tr(e)-e.display.barHeight}function Cr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if($e(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Ar(e,t,r,n){return Ir(e,Lr(e,t),r,n)}function Dr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[un(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Lr(e,t){var r=$e(t),n=Dr(e,r);n&&!n.text?n=null:n&&n.changes&&(cr(e,n,r,on(e)),e.curOp.forceUpdate=!0),n||(n=function(e,t){var r=$e(t=Ft(t)),n=e.display.externalMeasured=new nr(e.doc,t,r);n.lineN=r;var i=n.built=Jt(e,n);return n.text=i.pre,C(e.display.lineMeasure,i.pre),n}(e,t));var i=Cr(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Ir(e,t,r,n,i){t.before&&(r=-1);var o,l=r+(n||"");return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,r){var n=e.options.lineWrapping,i=n&&kr(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){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-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,r,n){var i,o=Mr(t.map,r,n),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;c&&ne(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&ne(t.line.text.charAt(o.coverStart+u));)++u;if((i=a&&s<9&&0==c&&u==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():Nr(T(l,c,u).getClientRects(),n)).left||i.right||0==c)break;u=c,c-=1,d="right"}a&&s<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Re)return Re;var t=C(e,A("span","x")),r=t.getBoundingClientRect(),n=T(t,0,1).getBoundingClientRect();return Re=Math.abs(r.left-n.left)>1}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,i))}else{var h;c>0&&(d=n="right"),i=e.options.lineWrapping&&(h=l.getClientRects()).length>1?h["right"==n?h.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+nn(e.display),top:p.top,bottom:p.bottom}:Rr}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,b=t.view.measure.heights,y=0;y<b.length-1&&!(v<b[y]);y++);var x=y?b[y-1]:0,w=b[y],E={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?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,r,n)).bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var jr,Rr={left:0,right:0,top:0,bottom:0};function Mr(e,t,r){for(var n,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(n=e[c+2],s==l&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)n=e[2+(c-=3)],a="left";if("right"==r&&i==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)n=e[(c+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:s,coverEnd:l}}function Nr(e,t){var r=Rr;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function Pr(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 Fr(e){e.display.externalMeasure=null,O(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Pr(e.display.view[t])}function Br(e){Fr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Ur(){return u&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Hr(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function zr(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=xr(e.widgets[r]));return t}function Gr(e,t,r,n,i){if(!i){var o=zr(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=Gt(t);if("local"==n?a+=Er(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==n?0:Hr());var l=s.left+("window"==n?0:Ur());r.left+=l,r.right+=l}return r.top+=a,r.bottom+=a,r}function Kr(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=Ur(),i-=Hr();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function Wr(e,t,r,n,i){return n||(n=Ve(e.doc,t.line)),Gr(e,n,Ar(e,n,t.ch,i),r)}function Vr(e,t,r,n,i,o){function a(t,a){var s=Ir(e,i,t,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,Gr(e,n,s,r)}n=n||Ve(e.doc,t.line),i||(i=Lr(e,n));var s=ce(n,e.doc.direction),l=t.ch,c=t.sticky;if(l>=n.text.length?(l=n.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,r){return a(r?e-1:e,1==s[t].level!=r)}var d=se(s,l,c),f=ae,h=u(l,d,"before"==c);return null!=f&&(h.other=u(l,f,"before"!=c)),h}function qr(e,t){var r=0;t=st(e.doc,t),e.options.lineWrapping||(r=nn(e.display)*t.ch);var n=Ve(e.doc,t.line),i=Gt(n)+Er(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Xr(e,t,r,n,i){var o=et(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function Yr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return Xr(n.first,0,null,-1,-1);var i=Je(n,r),o=n.first+n.size-1;if(i>o)return Xr(n.first+n.size-1,Ve(n,o).text.length,null,1,1);t<0&&(t=0);for(var a=Ve(n,i);;){var s=Qr(e,a,i,t,r),l=Nt(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=Ve(n,i=c.line)}}function $r(e,t,r,n){n-=zr(t);var i=t.text.length,o=oe((function(t){return Ir(e,r,t-1).bottom<=n}),i,0);return{begin:o,end:i=oe((function(t){return Ir(e,r,t).top>n}),o,i)}}function Jr(e,t,r,n){return r||(r=Lr(e,t)),$r(e,t,r,Gr(e,t,Ir(e,r,n),"line").top)}function Zr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Qr(e,t,r,n,i){i-=Gt(t);var o=Lr(e,t),a=zr(t),s=0,l=t.text.length,c=!0,u=ce(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?tn:en)(e,t,r,o,u,n,i);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var f,h,p=null,m=null,g=oe((function(t){var r=Ir(e,o,t);return r.top+=a,r.bottom+=a,!!Zr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,m=r),!0)}),s,l),v=!1;if(m){var b=n-m.left<m.right-n,y=b==c;g=p+(y?0:1),h=y?"after":"before",f=b?m.left:m.right}else{c||g!=l&&g!=s||g++,h=0==g?"after":g==t.text.length?"before":Ir(e,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var x=Vr(e,et(r,g,h),"line",t,o);f=x.left,v=i<x.top?-1:i>=x.bottom?1:0}return Xr(r,g=ie(t.text,g,1),h,v,n-f)}function en(e,t,r,n,i,o,a){var s=oe((function(s){var l=i[s],c=1!=l.level;return Zr(Vr(e,et(r,c?l.to:l.from,c?"before":"after"),"line",t,n),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Vr(e,et(r,c?l.from:l.to,c?"after":"before"),"line",t,n);Zr(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function tn(e,t,r,n,i,o,a){var s=$r(e,t,n,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<i.length;f++){var h=i[f];if(!(h.from>=c||h.to<=l)){var p=Ir(e,n,1!=h.level?Math.min(c,h.to)-1:Math.max(l,h.from)).right,m=p<o?o-p+1e9:p-o;(!u||d>m)&&(u=h,d=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 rn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==jr){jr=A("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)jr.appendChild(document.createTextNode("x")),jr.appendChild(A("br"));jr.appendChild(document.createTextNode("x"))}C(e.measure,jr);var r=jr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),O(e.measure),r||1}function nn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=A("span","xxxxxxxxxx"),r=A("pre",[t],"CodeMirror-line-like");C(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function on(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;r[s]=o.offsetLeft+o.clientLeft+i,n[s]=o.clientWidth}return{fixedPos:an(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function an(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sn(e){var t=rn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/nn(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 r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function ln(e){var t=e.doc,r=sn(e);t.iter((function(e){var t=r(e);t!=e.height&&Ye(e,t)}))}function cn(e,t,r,n){var i=e.display;if(!r&&"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=Yr(e,o,a);if(n&&c.xRel>0&&(l=Ve(e.doc,c.line).text).length==c.ch){var u=F(l,l.length,e.options.tabSize)-l.length;c=et(c.line,Math.max(0,Math.round((o-_r(e.display).left)/nn(e.display))-u))}return c}function un(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function dn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Et&&Bt(e.doc,t)<i.viewTo&&hn(e);else if(r<=i.viewFrom)Et&&Ut(e.doc,r+n)>i.viewFrom?hn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)hn(e);else if(t<=i.viewFrom){var o=pn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):hn(e)}else if(r>=i.viewTo){var a=pn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):hn(e)}else{var s=pn(e,t,t,-1),l=pn(e,r,r+n,1);s&&l?(i.view=i.view.slice(0,s.index).concat(ir(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=n):hn(e)}var c=i.externalMeasured;c&&(r<c.lineN?c.lineN+=n:t<c.lineN+c.size&&(i.externalMeasured=null))}function fn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[un(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==U(a,r)&&a.push(r)}}}function hn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pn(e,t,r,n){var i,o=un(e,t),a=e.display.view;if(!Et||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=t){if(n>0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;Bt(e.doc,r)!=r;){if(o==(n<0?0:a.length-1))return null;r+=n*a[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function mn(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function gn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function vn(e,t){void 0===t&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(t||a!=r.sel.primIndex){var s=r.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var l=s.empty();(l||e.options.showCursorWhenSelecting)&&bn(e,s.head,i),l||xn(e,s,o)}}return n}function bn(e,t,r){var n=Vr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(A("div"," ","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(A("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function yn(e,t){return e.top-t.top||e.left-t.left}function xn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=_r(e.display),s=a.left,l=Math.max(n.sizerWidth,kr(e)-n.sizer.offsetLeft)-a.right,c="ltr"==i.direction;function u(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?l-e:r)+"px;\n height: "+(n-t)+"px"))}function d(t,r,n){var o,a,d=Ve(i,t),f=d.text.length;function h(r,n){return Wr(e,et(t,r),"div",d,n)}function p(t,r,n){var i=Jr(e,d,null,t),o="ltr"==r==("after"==n)?"left":"right";return h("after"==n?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),o)[o]}var m=ce(d,i.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(m,r||0,null==n?f:n,(function(e,t,i,d){var g="ltr"==i,v=h(e,g?"left":"right"),b=h(t-1,g?"right":"left"),y=null==r&&0==e,x=null==n&&t==f,w=0==d,E=!m||d==m.length-1;if(b.top-v.top<=3){var S=(c?x:y)&&E,_=(c?y:x)&&w?s:(g?v:b).left,T=S?l:(g?b:v).right;u(_,v.top,T-_,v.bottom)}else{var k,O,C,A;g?(k=c&&y&&w?s:v.left,O=c?l:p(e,i,"before"),C=c?s:p(t,i,"after"),A=c&&x&&E?l:b.right):(k=c?p(e,i,"before"):s,O=!c&&y&&w?l:v.right,C=!c&&x&&E?s:b.left,A=c?p(t,i,"after"):l),u(k,v.top,O-k,v.bottom),v.bottom<b.top&&u(s,v.bottom,null,b.top),u(C,b.top,A-C,b.bottom)}(!o||yn(v,o)<0)&&(o=v),yn(b,o)<0&&(o=b),(!a||yn(v,a)<0)&&(a=v),yn(b,a)<0&&(a=b)})),{start:o,end:a}}var f=t.from(),h=t.to();if(f.line==h.line)d(f.line,f.ch,h.ch);else{var p=Ve(i,f.line),m=Ve(i,h.line),g=Ft(p)==Ft(m),v=d(f.line,f.ch,g?p.text.length+1:null).end,b=d(h.line,g?0:null,h.ch).start;g&&(v.top<b.top-2?(u(v.right,v.top,null,v.bottom),u(s,b.top,b.left,b.bottom)):u(v.right,v.top,b.left-v.right,v.bottom)),v.bottom<b.top&&u(s,v.bottom,null,b.top)}r.appendChild(o)}function wn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Tn(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function En(e){e.state.focused||(e.display.input.focus(),_n(e))}function Sn(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Tn(e))}),100)}function _n(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,j(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()),wn(e))}function Tn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(pe(e,"blur",e,t),e.state.focused=!1,k(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function kn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],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-r,r=u}else{var d=i.node.getBoundingClientRect();l=d.bottom-d.top,!o&&i.text.firstChild&&(c=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var f=i.line.height-l;if((f>.005||f<-.005)&&(Ye(i.line,l),On(i.line),i.rest))for(var h=0;h<i.rest.length;h++)On(i.rest[h]);if(c>e.display.sizerWidth){var p=Math.ceil(c/nn(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function On(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function Cn(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Er(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=Je(t,n),a=Je(t,i);if(r&&r.ensure){var s=r.ensure.from.line,l=r.ensure.to.line;s<o?(o=s,a=Je(t,Gt(Ve(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=Je(t,Gt(Ve(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function An(e,t){var r=e.display,n=rn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Or(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Sr(r),l=t.top<n,c=t.bottom>s-n;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 d=e.options.fixedGutter?0:r.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-d,h=kr(e)-r.gutters.offsetWidth,p=t.right-t.left>h;return p&&(t.right=t.left+h),t.left<10?a.scrollLeft=0:t.left<f?a.scrollLeft=Math.max(0,t.left+d-(p?0:10)):t.right>h+f-3&&(a.scrollLeft=t.right+(p?0:10)-h),a}function Dn(e,t){null!=t&&(jn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Ln(e){jn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function In(e,t,r){null==t&&null==r||jn(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function jn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Rn(e,qr(e,t.from),qr(e,t.to),t.margin))}function Rn(e,t,r,n){var i=An(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});In(e,i.scrollLeft,i.scrollTop)}function Mn(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||li(e,{top:t}),Nn(e,t,!0),r&&li(e),ni(e,100))}function Nn(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Pn(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,di(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fn(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Sr(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?r:0,docHeight:n,scrollHeight:n+Tr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Bn=function(e,t,r){this.cm=r;var n=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");n.tabIndex=i.tabIndex=-1,e(n),e(i),de(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),de(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Bn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n: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=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n: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==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Bn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Bn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Bn.prototype.zeroWidthHack=function(){var e=b&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},Bn.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto",t.set(1e3,(function n(){var i=e.getBoundingClientRect();("vert"==r?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,n)}))},Bn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Un=function(){};function Hn(e,t){t||(t=Fn(e));var r=e.display.barWidth,n=e.display.barHeight;zn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&kn(e),zn(e,Fn(e)),r=e.display.barWidth,n=e.display.barHeight}function zn(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}Un.prototype.update=function(){return{bottom:0,right:0}},Un.prototype.setScrollLeft=function(){},Un.prototype.setScrollTop=function(){},Un.prototype.clear=function(){};var Gn={native:Bn,null:Un};function Kn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&k(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Gn[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),de(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?Pn(e,t):Mn(e,t)}),e),e.display.scrollbars.addClass&&j(e.display.wrapper,e.display.scrollbars.addClass)}var Wn=0;function Vn(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:++Wn},t=e.curOp,or?or.ops.push(t):t.ownsGroup=or={ops:[t],delayedCallbacks:[]}}function qn(e){var t=e.curOp;t&&function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}(r)}finally{or=null,t(r)}}(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,r=0;r<t.length;r++)Xn(t[r]);for(var n=0;n<t.length;n++)Yn(t[n]);for(var i=0;i<t.length;i++)$n(t[i]);for(var o=0;o<t.length;o++)Jn(t[o]);for(var a=0;a<t.length;a++)Zn(t[a])}(e)}))}function Xn(e){var t=e.cm,r=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=Tr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Tr(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<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new oi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Yn(e){e.updatedDisplay=e.mustUpdate&&ai(e.cm,e.update)}function $n(e){var t=e.cm,r=t.display;e.updatedDisplay&&kn(t),e.barMeasure=Fn(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ar(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Tr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-kr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Jn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Pn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==I();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Hn(t,e.barMeasure),e.updatedDisplay&&ui(t,e.barMeasure),e.selectionChanged&&wn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&En(e.cm)}function Zn(e){var t=e.cm,r=t.display,n=t.doc;e.updatedDisplay&&si(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&Nn(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Pn(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!me(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=A("div","",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Er(e.display))+"px;\n height: "+(t.bottom-t.top+Tr(e)+r.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,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="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=Vr(e,t),l=r&&r!=t?Vr(e,r):s,c=An(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-n,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+n}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Mn(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Pn(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}(t,st(n,e.scrollToPos.from),st(n,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");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&pe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Qn(e,t){if(e.curOp)return t();Vn(e);try{return t()}finally{qn(e)}}function ei(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Vn(e);try{return t.apply(e,arguments)}finally{qn(e)}}}function ti(e){return function(){if(this.curOp)return e.apply(this,arguments);Vn(this);try{return e.apply(this,arguments)}finally{qn(this)}}}function ri(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Vn(t);try{return e.apply(this,arguments)}finally{qn(t)}}}function ni(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,N(ii,e))}function ii(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=ht(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(n.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?ze(t.mode,n.state):null,l=dt(e,o,n,!0);s&&(n.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<a.length;++f)d=a[f]!=o.styles[f];d&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&pt(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ni(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Qn(e,(function(){for(var t=0;t<i.length;t++)fn(e,i[t],"text")}))}}var oi=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Cn(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=kr(e),this.force=r,this.dims=on(e),this.events=[]};function ai(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return hn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==mn(e))return!1;fi(e)&&(hn(e),t.dims=on(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),Et&&(o=Bt(e.doc,o),a=Ut(e.doc,a));var s=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;!function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=ir(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=ir(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(un(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(ir(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,un(e,r)))),n.viewTo=r}(e,o,a),r.viewOffset=Gt(Ve(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var c=mn(e);if(!s&&0==c&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=I();if(!t||!L(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&L(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return c>4&&(r.lineDiv.style.display="none"),function(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,a=o.firstChild;function s(t){var r=t.nextSibling;return l&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var c=n.view,u=n.viewFrom,d=0;d<c.length;d++){var f=c[d];if(f.hidden);else if(f.node&&f.node.parentNode==o){for(;a!=f.node;)a=s(a);var h=i&&null!=t&&t<=u&&f.lineNumber;f.changes&&(U(f.changes,"gutter")>-1&&(h=!1),cr(e,f,u,r)),h&&(O(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Qe(e.options,u)))),a=f.node.nextSibling}else{var p=gr(e,f,u,r);o.insertBefore(p,a)}u+=f.size}for(;a;)a=s(a)}(e,r.updateLineNumbers,t.dims),c>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=I()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&L(document.body,e.anchorNode)&&L(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(u),O(r.cursorDiv),O(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ni(e,400)),r.updateLineNumbers=null,!0}function si(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=kr(e))n&&(t.visible=Cn(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Sr(e.display)-Or(e),r.top)}),t.visible=Cn(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ai(e,t))break;kn(e);var i=Fn(e);gn(e),Hn(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 r=new oi(e,t);if(ai(e,r)){kn(e),si(e,r);var n=Fn(e);gn(e),Hn(e,n),ui(e,n),r.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+Tr(e)+"px"}function di(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=an(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var s=r[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function fi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Qe(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(A("div",[A("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",ci(e.display),!0}return!1}function hi(e,t){for(var r=[],n=!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;n=!0}r.push({className:o,style:a})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function pi(e){var t=e.gutters,r=e.gutterSpecs;O(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],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=r.length?"":"none",ci(e)}function mi(e){pi(e.display),dn(e),di(e)}function gi(e,t,n,i){var o=this;this.input=n,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=D("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=D("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=D("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||r&&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=hi(i.gutters,i.lineNumbers),pi(o),n.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,bi=null;function yi(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function xi(e){var t=yi(e);return t.x*=bi,t.y*=bi,t}function wi(e,t){var n=yi(t),i=n.x,o=n.y,a=e.display,s=a.scroller,c=s.scrollWidth>s.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&b&&l)e:for(var f=t.target,h=a.view;f!=s;f=f.parentNode)for(var p=0;p<h.length;p++)if(h[p].node==f){e.display.currentWheelTarget=f;break e}if(i&&!r&&!d&&null!=bi)return o&&u&&Mn(e,Math.max(0,s.scrollTop+o*bi)),Pn(e,Math.max(0,s.scrollLeft+i*bi)),(!o||o&&u)&&ye(t),void(a.wheelStartX=null);if(o&&null!=bi){var m=o*bi,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,r=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,r&&(bi=(bi*vi+r)/(vi+1),++vi)}}),200)):(a.wheelDX+=i,a.wheelDY+=o))}}a?bi=-.53:r?bi=15:u?bi=-.7:f&&(bi=-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 r=this.ranges[t],n=e.ranges[t];if(!rt(r.anchor,n.anchor)||!rt(r.head,n.head))return!1}return!0},Ei.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Si(nt(this.ranges[t].anchor),nt(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 r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(tt(t,n.from())>=0&&tt(e,n.to())<=0)return r}return-1};var Si=function(e,t){this.anchor=e,this.head=t};function _i(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort((function(e,t){return tt(e.from(),t.from())})),r=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(n&&!a.empty()?l>0:l>=0){var c=ot(s.from(),a.from()),u=it(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;o<=r&&--r,t.splice(--o,2,new Si(d?u:c,d?c:u))}}return new Ei(t,r)}function Ti(e,t){return new Ei([new Si(e,t||e)],0)}function ki(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 Oi(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return ki(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=ki(t).ch-t.to.ch),et(r,n)}function Ci(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new Si(Oi(i.anchor,t),Oi(i.head,t)))}return _i(e.cm,r,e.sel.primIndex)}function Ai(e,t,r){return e.line==t.line?et(r.line,e.ch-t.ch+r.ch):et(r.line+(e.line-t.line),e.ch)}function Di(e){e.doc.mode=Be(e.options,e.doc.modeOption),Li(e)}function Li(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,ni(e,100),e.state.modeGen++,e.curOp&&dn(e)}function Ii(e,t){return 0==t.from.ch&&0==t.to.ch&&""==X(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ji(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){!function(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Ct(e),At(e,r);var i=n?n(e):1;i!=e.height&&Ye(e,i)}(e,r,i,n),sr(e,"change",e,t)}function a(e,t){for(var r=[],o=e;o<t;++o)r.push(new Vt(c[o],i(o),n));return r}var s=t.from,l=t.to,c=t.text,u=Ve(e,s.line),d=Ve(e,l.line),f=X(c),h=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(d,d.text,h),p&&e.remove(s.line,p),m.length&&e.insert(s.line,m)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,s.ch)+f+u.text.slice(l.ch),h);else{var g=a(1,c.length-1);g.push(new Vt(f+u.text.slice(l.ch),h,n)),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]+d.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(d,f+d.text.slice(l.ch),h);var v=a(1,c.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}sr(e,"change",e,t)}function Ri(e,t,r){!function e(n,i,o){if(n.linked)for(var a=0;a<n.linked.length;++a){var s=n.linked[a];if(s.doc!=i){var l=o&&s.sharedHist;r&&!l||(t(s.doc,l),e(s.doc,n,l))}}}(e,null,!0)}function Mi(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ln(e),Di(e),Ni(e),e.options.lineWrapping||Wt(e),e.options.mode=t.modeOption,dn(e)}function Ni(e){("rtl"==e.doc.direction?j:k)(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 Fi(e,t){var r={from:nt(t.from),to:ki(t),text:qe(e,t.from,t.to)};return Gi(e,r,t.from.line,t.to.line+1),Ri(e,(function(e){return Gi(e,r,t.from.line,t.to.line+1)}),!0),r}function Bi(e){for(;e.length&&X(e).ranges;)e.pop()}function Ui(e,t,r,n){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==n||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?(Bi(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==n)))a=X(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=ki(t):o.changes.push(Fi(e,t));else{var l=X(i.done);for(l&&l.ranges||zi(e.sel,i.done),o={changes:[Fi(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(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||pe(e,"historyAdded")}function Hi(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.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=r,n&&!1!==n.clearRedo&&Bi(i.undone)}function zi(e,t){var r=X(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Gi(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o}))}function Ki(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function Wi(e,t){var r=function(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(Ki(r[i]));return n}(e,t),n=kt(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[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&&(r[i]=a)}return r}function Vi(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?Ei.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];n.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 d in c)(u=d.match(/^spans_(\d+)$/))&&U(t,Number(u[1]))>-1&&(X(s)[d]=c[d],delete c[d])}}}return n}function qi(e,t,r,n){if(n){var i=e.anchor;if(r){var o=tt(t,i)<0;o!=tt(r,i)<0?(i=t,t=r):o!=tt(t,r)<0&&(t=r)}return new Si(i,t)}return new Si(r||t,t)}function Xi(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Qi(e,new Ei([qi(e.sel.primary(),t,r,i)],0),n)}function Yi(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=qi(e.sel.ranges[o],t[o],null,i);Qi(e,_i(e.cm,n,e.sel.primIndex),r)}function $i(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Qi(e,_i(e.cm,i,e.sel.primIndex),n)}function Ji(e,t,r,n){Qi(e,Ti(t,r),n)}function Zi(e,t,r){var n=e.history.done,i=X(n);i&&i.ranges?(n[n.length-1]=t,eo(e,t,r)):Qi(e,t,r)}function Qi(e,t,r){eo(e,t,r),Hi(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function eo(e,t,r){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(t=function(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new Si(st(e,t[r].anchor),st(e,t[r].head))},origin:r&&r.origin};return pe(e,"beforeSelectionChange",e,n),e.cm&&pe(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?_i(e.cm,n.ranges,n.ranges.length-1):t}(e,t,r));var n=r&&r.bias||(tt(t.primary().head,e.sel.primary().head)<0?-1:1);to(e,no(e,t,n,!0)),r&&!1===r.scroll||!e.cm||Ln(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)),sr(e,"cursorActivity",e))}function ro(e){to(e,no(e,e.sel,null,!1))}function no(e,t,r,n){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,r,n),c=oo(e,a.head,s&&s.head,r,n);(i||l!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Si(l,c))}return i?_i(e.cm,i,t.primIndex):t}function io(e,t,r,n,i){var o=Ve(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(r){var d=l.find(n<0?1:-1),f=void 0;if((n<0?u:c)&&(d=ao(e,d,-n,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(f=tt(d,r))&&(n<0?f<0:f>0))return io(e,d,t,n,i)}var h=l.find(n<0?-1:1);return(n<0?c:u)&&(h=ao(e,h,n,h.line==t.line?o:null)),h?io(e,h,t,n,i):null}}return t}function oo(e,t,r,n,i){var o=n||1,a=io(e,t,r,o,i)||!i&&io(e,t,r,o,!0)||io(e,t,r,-o,i)||!i&&io(e,t,r,-o,!0);return a||(e.cantEdit=!0,et(e.first,0))}function ao(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:r>0&&t.ch==(n||Ve(e,t.line)).text.length?t.line<e.first+e.size-1?et(t.line+1,0):null:new et(t.line,t.ch+r)}function so(e){e.setSelection(et(e.firstLine(),0),et(e.lastLine()),z)}function lo(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=st(e,t)),r&&(n.to=st(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),pe(e,"beforeChange",e,n),e.cm&&pe(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function co(e,t,r){if(e.cm){if(!e.cm.curOp)return ei(e.cm,co)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))||(t=lo(e,t,!0))){var n=wt&&!r&&function(e,t,r){var n=null;if(e.iter(t.line,r.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=U(n,r)||(n||(n=[])).push(r)}})),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[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],d=tt(c.from,s.from),f=tt(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&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(n)for(var i=n.length-1;i>=0;--i)uo(e,{from:n[i].from,to:n[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 r=Ci(e,t);Ui(e,t,r,e.cm?e.cm.curOp.id:NaN),po(e,t,r,kt(e,t));var n=[];Ri(e,(function(e,r){r||-1!=U(n,e.history)||(bo(e.history,t),n.push(e.history)),po(e,t,null,kt(e,t))}))}}function fo(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){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],r?!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(n)return void s.push(i);break}if(zi(i,l),r&&!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 d=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),f=function(r){var n=i.changes[r];if(n.origin=t,d&&!lo(e,n,!1))return s.length=0,{};u.push(Fi(e,n));var o=r?Ci(e,n):X(s);po(e,n,o,Wi(e,n)),!r&&e.cm&&e.cm.scrollIntoView({from:n.from,to:ki(n)});var a=[];Ri(e,(function(e,t){t||-1!=U(a,e.history)||(bo(e.history,n),a.push(e.history)),po(e,n,null,Wi(e,n))}))},h=i.changes.length-1;h>=0;--h){var p=f(h);if(p)return p.v}}}}function ho(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)){dn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)fn(e.cm,n,"gutter")}}function po(e,t,r,n){if(e.cm&&!e.cm.curOp)return ei(e.cm,po)(e,t,r,n);if(t.to.line<e.first)ho(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);ho(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,Ve(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=qe(e,t.from,t.to),r||(r=Ci(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=$e(Ft(Ve(n,o.line))),n.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&ge(e),ji(n,t,r,sn(e)),e.options.lineWrapping||(n.iter(l,o.line+t.text.length,(function(e){var t=Kt(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 r=e.first,n=t-1;n>r;n--){var i=Ve(e,n).stateAfter;if(i&&(!(i instanceof ct)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}(n,o.line),ni(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?dn(e):o.line!=a.line||1!=t.text.length||Ii(e.doc,t)?dn(e,o.line,a.line+1,c):fn(e,o.line,"text");var u=ve(e,"changes"),d=ve(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&sr(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,n):ji(e,t,n),eo(e,r,z),e.cantEdit&&oo(e,et(e.firstLine(),0))&&(e.cantEdit=!1)}}function mo(e,t,r,n,i){var o;n||(n=r),tt(n,r)<0&&(r=(o=[n,r])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),co(e,{from:r,to:n,text:t,origin:i})}function go(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function vo(e,t,r,n){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,r,n),go(o.ranges[s].head,t,r,n)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(r<c.from.line)c.from=et(c.from.line+n,c.from.ch),c.to=et(c.to.line+n,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function bo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;vo(e.done,r,n,i),vo(e.undone,r,n,i)}function yo(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=Ve(e,at(e,t)):i=$e(t),null==i?null:(n(o,i)&&e.cm&&fn(e.cm,i,r),o)}function xo(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function wo(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,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 r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,qt(i),sr(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},wo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.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,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),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(++n,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 r=U(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new wo(e.children);n.parent=e,e.children=[n,t],e=n}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var Eo=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function So(e,t,r){Gt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Dn(e,r)}Eo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=$e(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=xr(this);Ye(r,Math.max(0,r.height-o)),e&&(Qn(e,(function(){So(e,r,-o),fn(e,n,"widget")})),sr(e,"lineWidgetCleared",e,this,n))}},Eo.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=xr(this)-t;i&&(Ht(this.doc,n)||Ye(n,n.height+i),r&&Qn(r,(function(){r.curOp.forceUpdate=!0,So(r,n,i),sr(r,"lineWidgetChanged",r,e,$e(n))})))},be(Eo);var _o=0,To=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++_o};function ko(e,t,r,n,i){if(n&&n.shared)return function(e,t,r,n,i){(n=P(n)).shared=!1;var o=[ko(e,t,r,n,i)],a=o[0],s=n.widgetNode;return Ri(e,(function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(ko(e,st(e,t),st(e,r),n,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=X(o)})),new Oo(o,a)}(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return ei(e.cm,ko)(e,t,r,n,i);var o=new To(e,i),a=tt(t,r);if(n&&P(n,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=D("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Pt(e,t.line,t,r,o)||t.line!=r.line&&Pt(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Et=!0}o.addToHistory&&Ui(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,r.line+1,(function(e){c&&o.collapsed&&!c.options.lineWrapping&&Ft(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==r.line?r.ch:null)),++l})),o.collapsed&&e.iter(t.line,r.line+1,(function(t){Ht(e,t)&&Ye(t,0)})),o.clearOnEnter&&de(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(wt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++_o,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)dn(c,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=r.line;u++)fn(c,u,"text");o.atomic&&ro(c.doc),sr(c,"markerAdded",c,o)}return o}To.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Vn(e),ve(this,"clear")){var r=this.find();r&&sr(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=_t(a.markedSpans,this);e&&!this.collapsed?fn(e,$e(a),"text"):e&&(null!=s.to&&(i=$e(a)),null!=s.from&&(n=$e(a))),a.markedSpans=Tt(a.markedSpans,s),null==s.from&&this.collapsed&&!Ht(this.doc,a)&&e&&Ye(a,rn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Ft(this.lines[l]),u=Kt(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&dn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ro(e.doc)),e&&sr(e,"markerCleared",e,this,n,i),t&&qn(e),this.parent&&this.parent.clear()}},To.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=_t(o.markedSpans,this);if(null!=a.from&&(r=et(t?o:$e(o),a.from),-1==e))return r;if(null!=a.to&&(n=et(t?o:$e(o),a.to),1==e))return n}return r&&{from:r,to:n}},To.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&Qn(n,(function(){var i=t.line,o=$e(t.line),a=Dr(n,o);if(a&&(Pr(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Ht(r.doc,i)&&null!=r.height){var s=r.height;r.height=null;var l=xr(r)-s;l&&Ye(i,i.height+l)}sr(n,"markerChanged",n,e)}))},To.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)},To.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)}},be(To);var Oo=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function Co(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 r=e[t],n=[r.primary.doc];Ri(r.primary.doc,(function(e){return n.push(e)}));for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==U(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}},r=0;r<e.length;r++)t(r)}Oo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();sr(this,"clear")}},Oo.prototype.find=function(e,t){return this.primary.find(e,t)},be(Oo);var Do=0,Lo=function(e,t,r,n,i){if(!(this instanceof Lo))return new Lo(e,t,r,n,i);null==r&&(r=0),wo.call(this,[new xo([new Vt("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=et(r,0);this.sel=Ti(o),this.history=new Pi(null),this.id=++Do,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),ji(this,{from:o,to:o,text:e}),Qi(this,Ti(o),z)};Lo.prototype=J(wo.prototype,{constructor:Lo,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},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:ri((function(e){var t=et(this.first,0),r=this.first+this.size-1;co(this,{from:t,to:et(r,Ve(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&In(this.cm,0,0),Qi(this,Ti(t),z)})),replaceRange:function(e,t,r,n){mo(this,e,t=st(this,t),r=r?st(this,r):t,n)},getRange:function(e,t,r){var n=qe(this,st(this,e),st(this,t));return!1===r?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Ze(this,e))return Ve(this,e)},getLineNumber:function(e){return $e(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ve(this,e)),Ft(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:ri((function(e,t,r){Ji(this,st(this,"number"==typeof e?et(e,t||0):e),null,r)})),setSelection:ri((function(e,t,r){Ji(this,st(this,e),st(this,t||e),r)})),extendSelection:ri((function(e,t,r){Xi(this,st(this,e),t&&st(this,t),r)})),extendSelections:ri((function(e,t){Yi(this,lt(this,e),t)})),extendSelectionsBy:ri((function(e,t){Yi(this,lt(this,Y(this.sel.ranges,e)),t)})),setSelections:ri((function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[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,_i(this.cm,n,t),r)}})),addSelection:ri((function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new Si(st(this,e),st(this,t||e))),Qi(this,_i(this.cm,n,n.length-1),r)})),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=qe(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=qe(this,r[n].from(),r[n].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:ri((function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var s=t&&"end"!=t&&function(e,t,r){for(var n=[],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(ki(s),i,o);if(i=s.to,o=c,"around"==r){var u=e.sel.ranges[a],d=tt(u.head,u.anchor)<0;n[a]=new Si(d?c:l,d?l:c)}else n[a]=new Si(l,l)}return new Ei(n,e.sel.primIndex)}(this,n,t),l=n.length-1;l>=0;l--)co(this,n[l]);s?Zi(this,s):this.cm&&Ln(this.cm)})),undo:ri((function(){fo(this,"undo")})),redo:ri((function(){fo(this,"redo")})),undoSelection:ri((function(){fo(this,"undo",!0)})),redoSelection:ri((function(){fo(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Pi(this.history.maxGeneration),Ri(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:Vi(this.history.done),undone:Vi(this.history.undone)}},setHistory:function(e){var t=this.history=new Pi(this.history.maxGeneration);t.done=Vi(e.done.slice(0),null,!0),t.undone=Vi(e.undone.slice(0),null,!0)},setGutterMarker:ri((function(e,t,r){return yo(this,e,"gutter",(function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&te(n)&&(e.gutterMarkers=null),!0}))})),clearGutter:ri((function(e){var t=this;this.iter((function(r){r.gutterMarkers&&r.gutterMarkers[e]&&yo(t,r,"gutter",(function(){return r.gutterMarkers[e]=null,te(r.gutterMarkers)&&(r.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!Ze(this,e))return null;if(t=e,!(e=Ve(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:ri((function(e,t,r){return yo(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(_(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0}))})),removeLineClass:ri((function(e,t,r){return yo(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{var o=i.match(_(r));if(!o)return!1;var a=o.index+o[0].length;e[n]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),addLineWidget:ri((function(e,t,r){return function(e,t,r,n){var i=new Eo(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),yo(e,t,"widget",(function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!Ht(e,t)){var n=Gt(t)<e.scrollTop;Ye(t,t.height+xr(i)),n&&Dn(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&sr(o,"lineWidgetAdded",o,i,"number"==typeof t?t:$e(t)),i}(this,e,t,r)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return ko(this,st(this,e),st(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return ko(this,e=st(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=Ve(this,(e=st(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(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,r){e=st(this,e),t=st(this,t);var n=[],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||r&&!r(l.marker)||n.push(l.marker.parent||l.marker)}++i})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)})),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r})),st(this,et(r,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+r})),t},copy:function(e){var t=new Lo(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,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new Lo(Xe(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(tt(o,a)){var s=ko(e,o,a,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}(n,Co(this)),n},unlinkDoc:function(e){if(e instanceof Oa&&(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(Co(this));break}if(e.history==this.history){var r=[e.id];Ri(e,(function(e){return r.push(e.id)}),!0),e.history=new Pi(null),e.history.done=Vi(this.history.done,r),e.history.undone=Vi(this.history.undone,r)}},iterLinkedDocs:function(e){Ri(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Le(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:ri((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Qn(t=this.cm,(function(){Ni(t),dn(t)})))}))}),Lo.prototype.eachLine=Lo.prototype.iter;var Io=0;function jo(e){var t=this;if(Ro(t),!me(t,e)&&!wr(t.display,e)){ye(e),a&&(Io=+new Date);var r=cn(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),s=0,l=function(){++s==i&&ei(t,(function(){var e={from:r=st(t.doc,r),to:r,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};co(t.doc,e),Zi(t.doc,Ti(st(t.doc,r),st(t.doc,ki(e))))}))()},c=function(e,r){if(t.options.allowDropFileTypes&&-1==U(t.options.allowDropFileTypes,e.type))l();else{var n=new FileReader;n.onerror=function(){return l()},n.onload=function(){var e=n.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[r]=e),l()},n.readAsText(e)}},u=0;u<n.length;u++)c(n[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),eo(t.doc,Ti(r,r)),f)for(var h=0;h<f.length;++h)mo(t.doc,"",f[h].anchor,f[h].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Ro(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Mo(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation((function(){for(var t=0;t<r.length;t++)e(r[t])}))}}var No=!1;function Po(){var e;No||(de(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Mo(Fo)}),100))})),de(window,"blur",(function(){return Mo(Tn)})),No=!0)}function Fo(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Bo={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++)Bo[Uo+48]=Bo[Uo+96]=String(Uo);for(var Ho=65;Ho<=90;Ho++)Bo[Ho]=String.fromCharCode(Ho);for(var zo=1;zo<=12;zo++)Bo[zo+111]=Bo[zo+63235]="F"+zo;var Go={};function Ko(e){var t,r,n,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))r=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Wo(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=Y(r.split(" "),Ko),o=0;o<i.length;o++){var a=void 0,s=void 0;o==i.length-1?(s=i.join(" "),a=n):(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[r]}for(var c in t)e[c]=t[c];return e}function Vo(e,t,r,n){var i=(t=$o(t)).call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Vo(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Vo(e,t.fallthrough[o],r,n);if(a)return a}}}function qo(e){var t="string"==typeof e?e:Bo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Xo(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(E?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(E?t.ctrlKey:t.metaKey)&&"Mod"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Yo(e,t){if(d&&34==e.keyCode&&e.char)return!1;var r=Bo[e.keyCode];return null!=r&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(r=e.code),Xo(r,e,t))}function $o(e){return"string"==typeof e?Go[e]:e}function Jo(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&tt(o.from,X(n).to)<=0;){var a=n.pop();if(tt(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}Qn(e,(function(){for(var t=n.length-1;t>=0;t--)mo(e.doc,"",n[t].from,n[t].to,"+delete");Ln(e)}))}function Zo(e,t,r){var n=ie(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Qo(e,t,r){var n=Zo(e,t.ch,r);return null==n?null:new et(t.line,n,r<0?"after":"before")}function ea(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ce(r,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=Lr(t,r);a=i<0?r.text.length-1:0;var u=Ir(t,c,a).top;a=oe((function(e){return Ir(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Zo(r,a,1))}else a=i<0?s.to:s.from;return new et(n,a,l)}}return new et(n,i<0?r.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=b?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 r=Ve(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:et(t.head.line+1,0)}:{from:t.head,to:et(t.head.line,r)}}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 r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Jo(e,(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}}))},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 ra(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return na(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var r=Ve(e.doc,t),n=function(e){for(var t;t=Mt(e);)e=t.find(1,!0).line;return e}(r);return n!=r&&(t=$e(n)),ea(!0,e,r,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")}),K)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")}),K)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?na(e,t.head):n}),K)},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=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=F(e.getLine(o.line),o.ch,n);t.push(q(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Qn(e,(function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=Ve(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=Ve(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"))}r.push(new Si(i,i))}e.setSelections(r)}))},newlineAndIndent:function(e){return Qn(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Ln(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function ra(e,t){var r=Ve(e.doc,t),n=Ft(r);return n!=r&&(t=$e(n)),ea(!0,e,n,t,1)}function na(e,t){var r=ra(e,t.line),n=Ve(e.doc,r.line),i=ce(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(r.ch,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return et(r.line,a?0:o,r.sticky)}return r}function ia(e,t,r){if("string"==typeof t&&!(t=ta[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=H}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}var oa=new B;function aa(e,t,r,n){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,r,n))return!0}return sa(e,t,r,n)}function sa(e,t,r,n){var i=function(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Vo(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Vo(t,e.options.extraKeys,r,e)||Vo(t,e.options.keyMap,r,e)}(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&sr(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(ye(r),wn(e)),!!i}function la(e,t){var r=Yo(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?aa(e,"Shift-"+r,t,(function(t){return ia(e,t,!0)}))||aa(e,r,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ia(e,t)})):aa(e,r,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 n=e.keyCode;t.display.shift=16==n||e.shiftKey;var i=la(t,e);d&&(ca=i?n:null,i||88!=n||je||!(b?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),r&&!b&&!i&&46==n&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(k(t,"CodeMirror-crosshair"),he(document,"keyup",r),he(document,"mouseover",r))}j(t,"CodeMirror-crosshair"),de(document,"keyup",r),de(document,"mouseover",r)}(t)}}function da(e){16==e.keyCode&&(this.doc.sel.shift=!1),me(this,e)}function fa(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||wr(t.display,e)||me(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(d&&r==ca)return ca=null,void ye(e);if(!d||e.which&&!(e.which<10)||!la(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(function(e,t,r){return aa(e,"'"+r+"'",t,(function(t){return ia(e,t,!0)}))}(t,e,i)||t.display.input.onKeyPress(e))}}}var ha,pa,ma=function(e,t,r){this.time=e,this.pos=t,this.button=r};function ga(e){var t=this,r=t.display;if(!(me(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,wr(r,e))l||(r.scroller.draggable=!1,setTimeout((function(){return r.scroller.draggable=!0}),100));else if(!ya(t,e)){var n=cn(t,e),i=_e(e),o=n?function(e,t){var r=+new Date;return pa&&pa.compare(r,e,t)?(ha=pa=null,"triple"):ha&&ha.compare(r,e,t)?(pa=new ma(r,e,t),ha=null,"double"):(ha=new ma(r,e,t),pa=null,"single")}(n,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),n&&function(e,t,r,n,i){var o="Click";return"double"==n?o="Double"+o:"triple"==n&&(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 n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=H}finally{e.state.suppressEdits=!1}return n}))}(t,i,n,o,e)||(1==i?n?function(e,t,r,n){a?setTimeout(N(En,e),0):e.curOp.focus=I();var i,o=function(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=y?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),null==i.addNew&&(i.addNew=b?r.metaKey:r.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(b?r.altKey:r.ctrlKey)),i}(e,r,n),c=e.doc.sel;e.options.dragDrop&&Oe&&!e.isReadOnly()&&"single"==r&&(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,r,n){var i=e.display,o=!1,c=ei(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,he(i.wrapper.ownerDocument,"mouseup",c),he(i.wrapper.ownerDocument,"mousemove",u),he(i.scroller,"dragstart",d),he(i.scroller,"drop",c),o||(ye(t),n.addNew||Xi(e.doc,r,null,null,n.extend),l&&!f||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},d=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),de(i.wrapper.ownerDocument,"mouseup",c),de(i.wrapper.ownerDocument,"mousemove",u),de(i.scroller,"dragstart",d),de(i.scroller,"drop",c),Sn(e),setTimeout((function(){return i.input.focus()}),20)}(e,n,t,o):function(e,t,r,n){var i=e.display,o=e.doc;ye(t);var a,s,l=o.sel,c=l.ranges;if(n.addNew&&!n.extend?(s=o.sel.contains(r),a=s>-1?c[s]:new Si(r,r)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(a=new Si(r,r)),r=cn(e,t,!0,!0),s=-1;else{var u=va(e,r,n.unit);a=n.extend?qi(a,u.anchor,u.head,n.extend):u}n.addNew?-1==s?(s=c.length,Qi(o,_i(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==n.unit&&!n.extend?(Qi(o,_i(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 d=r;function f(t){if(0!=tt(d,t))if(d=t,"rectangle"==n.unit){for(var i=[],c=e.options.tabSize,u=F(Ve(o,r.line).text,r.ch,c),f=F(Ve(o,t.line).text,t.ch,c),h=Math.min(u,f),p=Math.max(u,f),m=Math.min(r.line,t.line),g=Math.min(e.lastLine(),Math.max(r.line,t.line));m<=g;m++){var v=Ve(o,m).text,b=W(v,h,c);h==p?i.push(new Si(et(m,b),et(m,b))):v.length>b&&i.push(new Si(et(m,b),et(m,W(v,p,c))))}i.length||i.push(new Si(r,r)),Qi(o,_i(e,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,x=a,w=va(e,t,n.unit),E=x.anchor;tt(w.anchor,E)>0?(y=w.head,E=ot(x.from(),w.anchor)):(y=w.anchor,E=it(x.to(),w.head));var S=l.ranges.slice(0);S[s]=function(e,t){var r=t.anchor,n=t.head,i=Ve(e.doc,r.line);if(0==tt(r,n)&&r.sticky==n.sticky)return t;var o=ce(i);if(!o)return t;var a=se(o,r.ch,r.sticky),s=o[a];if(s.from!=r.ch&&s.to!=r.ch)return t;var l,c=a+(s.from==r.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(n.line!=r.line)l=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=se(o,n.ch,n.sticky),d=u-a||(n.ch-r.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var f=o[c+(l?-1:0)],h=l==(1==f.level),p=h?f.from:f.to,m=h?"after":"before";return r.ch==p&&r.sticky==m?t:new Si(new et(r.line,p,m),n)}(e,new Si(st(o,E),y)),Qi(o,_i(e,S,s),G)}}var h=i.wrapper.getBoundingClientRect(),p=0;function m(t){e.state.selectingText=!1,p=1/0,t&&(ye(t),i.input.focus()),he(i.wrapper.ownerDocument,"mousemove",g),he(i.wrapper.ownerDocument,"mouseup",v),o.history.lastSelOrigin=null}var g=ei(e,(function(t){0!==t.buttons&&_e(t)?function t(r){var a=++p,s=cn(e,r,!0,"rectangle"==n.unit);if(s)if(0!=tt(s,d)){e.curOp.focus=I(),f(s);var l=Cn(i,o);(s.line>=l.to||s.line<l.from)&&setTimeout(ei(e,(function(){p==a&&t(r)})),150)}else{var c=r.clientY<h.top?-20:r.clientY>h.bottom?20:0;c&&setTimeout(ei(e,(function(){p==a&&(i.scroller.scrollTop+=c,t(r))})),50)}}(t):m(t)})),v=ei(e,m);e.state.selectingText=v,de(i.wrapper.ownerDocument,"mousemove",g),de(i.wrapper.ownerDocument,"mouseup",v)}(e,n,t,o)}(t,n,o,e):Se(e)==r.scroller&&ye(e):2==i?(n&&Xi(t.doc,n),setTimeout((function(){return r.input.focus()}),20)):3==i&&(S?t.display.input.onContextMenu(e):Sn(t)))}}function va(e,t,r){if("char"==r)return new Si(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new Si(et(t.line,0),st(e.doc,et(t.line+1,0)));var n=r(e,t);return new Si(n.from,n.to)}function ba(e,t,r,n){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;n&&ye(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ve(e,r))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,r,e,Je(e.doc,o),e.display.gutterSpecs[l].className,t),we(t)}}function ya(e,t){return ba(e,t,"gutterClick",!0)}function xa(e,t){wr(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&ba(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-"),Br(e)}ma.prototype.compare=function(e,t,r){return this.time+400>e&&0==tt(t,this.pos)&&r==this.button};var Ea={toString:function(){return"CodeMirror.Init"}},Sa={},_a={};function Ta(e,t,r){if(!t!=!(r&&r!=Ea)){var n=e.display.dragFunctions,i=t?de:he;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function ka(e){e.options.lineWrapping?(j(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(k(e.display.wrapper,"CodeMirror-wrap"),Wt(e)),ln(e),dn(e),Br(e),setTimeout((function(){return Hn(e)}),100)}function Oa(e,t){var r=this;if(!(this instanceof Oa))return new Oa(e,t);this.options=t=t?P(t):{},P(Sa,t,!1);var n=t.value;"string"==typeof n?n=new Lo(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Oa.inputStyles[t.inputStyle](this),o=this.display=new gi(e,n,i,t);for(var c in o.wrapper.CodeMirror=this,wa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Kn(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 B,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),function(e){var t=e.display;de(t.scroller,"mousedown",ei(e,ga)),de(t.scroller,"dblclick",a&&s<11?ei(e,(function(t){if(!me(e,t)){var r=cn(e,t);if(r&&!ya(e,t)&&!wr(e.display,t)){ye(t);var n=e.findWordAt(r);Xi(e.doc,n.anchor,n.head)}}})):function(t){return me(e,t)||ye(t)}),de(t.scroller,"contextmenu",(function(t){return xa(e,t)})),de(t.input.getField(),"contextmenu",(function(r){t.scroller.contains(r.target)||xa(e,r)}));var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout((function(){return t.activeTouch=null}),1e3),(n=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}de(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)&&!ya(e,i)){t.input.ensurePolled(),clearTimeout(r);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),de(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),de(t.scroller,"touchend",(function(r){var n=t.activeTouch;if(n&&!wr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var a,s=e.coordsChar(t.activeTouch,"page");a=!n.prev||o(n,n.prev)?new Si(s,s):!n.prev.prev||o(n,n.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(),ye(r)}i()})),de(t.scroller,"touchcancel",i),de(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Mn(e,t.scroller.scrollTop),Pn(e,t.scroller.scrollLeft,!0),pe(e,"scroll",e))})),de(t.scroller,"mousewheel",(function(t){return wi(e,t)})),de(t.scroller,"DOMMouseScroll",(function(t){return wi(e,t)})),de(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 r=cn(e,t);if(r){var n=document.createDocumentFragment();bn(e,r,n),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),C(e.display.dragCursor,n)}}(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)&&!wr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var r=A("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),d&&r.parentNode.removeChild(r)}}(e,t)},drop:ei(e,jo),leave:function(t){me(e,t)||Ro(e)}};var l=t.input.getField();de(l,"keyup",(function(t){return da.call(e,t)})),de(l,"keydown",ei(e,ua)),de(l,"keypress",ei(e,fa)),de(l,"focus",(function(t){return _n(e,t)})),de(l,"blur",(function(t){return Tn(e,t)}))}(this),Po(),Vn(this),this.curOp.forceUpdate=!0,Mi(this,n),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&_n(r)}),20):Tn(this),_a)_a.hasOwnProperty(c)&&_a[c](this,t[c],Ea);fi(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Ca.length;++u)Ca[u](this);qn(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Oa.defaults=Sa,Oa.optionHandlers=_a;var Ca=[];function Aa(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=ht(e,t).state:r="prev");var a=e.options.tabSize,s=Ve(o,t),l=F(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((c=o.mode.indent(i,s.text.slice(u.length),s.text))==H||c>150)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>o.first?F(Ve(o,t-1).text,null,a):0:"add"==r?c=l+e.options.indentUnit:"subtract"==r?c=l-e.options.indentUnit:"number"==typeof r&&(c=l+r),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/a);h;--h)f+=a,d+="\t";if(f<c&&(d+=q(c-f)),d!=u)return mo(o,d,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}}}Oa.defineInitHook=function(e){return Ca.push(e)};var Da=null;function La(e){Da=e}function Ia(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=+new Date-200,s="paste"==i||e.state.pasteIncoming>a,l=Le(t),c=null;if(s&&n.ranges.length>1)if(Da&&Da.text.join("\n")==t){if(n.ranges.length%Da.text.length==0){c=[];for(var u=0;u<Da.text.length;u++)c.push(o.splitLines(Da.text[u]))}}else l.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(c=Y(l,(function(e){return[e]})));for(var d=e.curOp.updateInput,f=n.ranges.length-1;f>=0;f--){var h=n.ranges[f],p=h.from(),m=h.to();h.empty()&&(r&&r>0?p=et(p.line,p.ch-r):e.state.overwrite&&!s?m=et(m.line,Math.min(Ve(o,m.line).text.length,m.ch+X(l).length)):s&&Da&&Da.lineWise&&Da.text.join("\n")==l.join("\n")&&(p=m=et(p.line,0)));var g={from:p,to:m,text:c?c[f%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};co(e.doc,g),sr(e,"inputRead",e,g)}t&&!s&&Ra(e,t),Ln(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function ja(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Qn(t,(function(){return Ia(t,r,0,null,"paste")})),!0}function Ra(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-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(Ve(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Aa(e,i.head.line,"smart"));a&&sr(e,"electricInput",e,i.head.line)}}}function Ma(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:et(i,0),head:et(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Na(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"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"),Na(e),t}function Fa(e,t,r,n,i){var o=t,a=r,s=Ve(e,t.line),l=i&&"rtl"==e.direction?-r:r;function c(o){var a,c;if("codepoint"==n){var u=s.text.charCodeAt(t.ch+(n>0?0:-1));a=isNaN(u)?null:new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(u>=55296&&u<56320?2:1))),-r)}else a=i?function(e,t,r,n){var i=ce(t,e.doc.direction);if(!i)return Qo(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=se(i,r.ch,r.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return Qo(t,r,n);var s,l=function(e,r){return Zo(t,e instanceof et?e.ch:e,r)},c=function(r){return e.options.lineWrapping?(s=s||Lr(e,t),Jr(e,t,s,r)):{begin:0,end:t.text.length}},u=c("before"==r.sticky?l(r,-1):r.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==n<0,f=l(r,d?1:-1);if(null!=f&&(d?f<=a.to&&f<=u.end:f>=a.from&&f>=u.begin)){var h=d?"before":"after";return new et(r.line,f,h)}}var p=function(e,t,n){for(var o=function(e,t){return t?new et(r.line,l(e,1),"before"):new et(r.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],s=t>0==(1!=a.level),c=s?n.begin:l(n.end,-1);if(a.from<=c&&c<a.to)return o(c,s);if(c=s?a.from:l(a.to,-1),n.begin<=c&&c<n.end)return o(c,s)}},m=p(o+n,n,u);if(m)return m;var g=n>0?u.end:l(u.begin,-1);return null==g||n>0&&g==t.text.length||!(m=p(n>0?0:i.length-1,n,c(g)))?null:m}(e.cm,s,t,r):Qo(s,t,r);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=Ve(e,c))))return!1;t=ea(i,e.cm,s,t.line,l)}else t=a;return!0}if("char"==n||"codepoint"==n)c();else if("column"==n)c(!0);else if("word"==n||"group"==n)for(var u=null,d="group"==n,f=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(r<0)||c(!h);h=!1){var p=s.text.charAt(t.ch)||"\n",m=ee(p,f)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||h||m||(m="s"),u&&u!=m){r<0&&(r=1,c(),t.sticky="after");break}if(m&&(u=m),r>0&&!c(!h))break}var g=oo(e,t,o,a,!0);return rt(o,g)&&(g.hitSide=!0),g}function Ba(e,t,r,n){var i,o,a=e.doc,s=t.left;if("page"==n){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rn(e.display),3);i=(r>0?t.bottom:t.top)+r*c}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=Yr(e,s,i)).outside;){if(r<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*r}return o}var Ua=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ha(e,t){var r=Dr(e,t.line);if(!r||r.hidden)return null;var n=Ve(e.doc,t.line),i=Cr(r,n,t.line),o=ce(n,e.doc.direction),a="left";o&&(a=se(o,t.ch)%2?"right":"left");var s=Mr(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,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return za(e.clipPos(et(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return Ka(o,t,r)}}function Ka(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!L(n,t))return za(et($e(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=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,r&&(r=a.nodeValue.length));s.parentNode!=n;)s=s.parentNode;var l=e.measure,c=l.maps;function u(t,r,n){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==r){var u=$e(i<0?e.line:e.rest[i]),d=o[a]+n;return(n<0||s!=t)&&(d=o[a+(n?1:0)]),et(u,d)}}}var d=u(a,s,r);if(d)return za(d,i);for(var f=s.nextSibling,h=a?a.nodeValue.length-r:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0))return za(et(d.line,d.ch-h),i);h+=f.textContent.length}for(var p=s.previousSibling,m=r;p;p=p.previousSibling){if(d=u(p,p.firstChild,-1))return za(et(d.line,d.ch+m),i);m+=p.textContent.length}}Ua.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.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(n,e)){if(n.somethingSelected())La({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=Ma(n);La({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation((function(){n.setSelections(t.ranges,0,z),n.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=Da.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var s=Pa(),l=s.firstChild;n.display.lineSpace.insertBefore(s,n.display.lineSpace.firstChild),l.value=Da.text.join("\n");var c=document.activeElement;M(l),setTimeout((function(){n.display.lineSpace.removeChild(s),c.focus(),c==i&&r.showPrimarySelection()}),50)}}Na(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize),de(i,"paste",(function(e){!o(e)||me(n,e)||ja(e,n)||s<=11&&setTimeout(ei(n,(function(){return t.updateFromDOM()})),20)})),de(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),de(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),de(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),de(i,"touchstart",(function(){return r.forceCompositionEnd()})),de(i,"input",(function(){t.composing||t.readFromDOMSoon()})),de(i,"copy",a),de(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=vn(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,n=t.doc.sel.primary(),i=n.from(),o=n.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 d=l[l.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(c&&u){var h,p=e.rangeCount&&e.getRangeAt(0);try{h=T(c.node,c.offset,u.offset,u.node)}catch(e){}h&&(!r&&t.state.focused?(e.collapse(c.node,c.offset),h.collapsed||(e.removeAllRanges(),e.addRange(h))):(e.removeAllRanges(),e.addRange(h)),p&&null==e.anchorNode?e.addRange(p):r&&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){C(this.cm.display.cursorDiv,e.cursors),C(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 L(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():Qn(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 r=Ga(t,e.anchorNode,e.anchorOffset),n=Ga(t,e.focusNode,e.focusOffset);r&&n&&Qn(t,(function(){Qi(t.doc,Ti(r,n),z),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)}))}}},Ua.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,i=n.display,o=n.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>n.firstLine()&&(a=et(a.line-1,Ve(n.doc,a.line-1).length)),s.ch==Ve(n.doc,s.line).text.length&&s.line<n.lastLine()&&(s=et(s.line+1,0)),a.line<i.viewFrom||s.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(e=un(n,a.line))?(t=$e(i.view[0].line),r=i.view[0].node):(t=$e(i.view[e].line),r=i.view[e-1].node.nextSibling);var l,c,u=un(n,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),!r)return!1;for(var d=n.doc.splitLines(function(e,t,r,n,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 d(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void u(r);var o,f=t.getAttribute("cm-marker");if(f){var h=e.findMarks(et(n,0),et(i+1,0),(g=+f,function(e){return e.id==g}));return void(h.length&&(o=h[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++)d(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(;d(t),t!=r;)t=t.nextSibling,l=!1;return o}(n,r,c,t,l)),f=qe(n.doc,et(t,0),et(l,Ve(n.doc,l).text.length));d.length>1&&f.length>1;)if(X(d)==X(f))d.pop(),f.pop(),l--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var h=0,p=0,m=d[0],g=f[0],v=Math.min(m.length,g.length);h<v&&m.charCodeAt(h)==g.charCodeAt(h);)++h;for(var b=X(d),y=X(f),x=Math.min(b.length-(1==d.length?h:0),y.length-(1==f.length?h:0));p<x&&b.charCodeAt(b.length-p-1)==y.charCodeAt(y.length-p-1);)++p;if(1==d.length&&1==f.length&&t==a.line)for(;h&&h>a.ch&&b.charCodeAt(b.length-p-1)==y.charCodeAt(y.length-p-1);)h--,p++;d[d.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"");var w=et(t,h),E=et(l,f.length?X(f).length-p:0);return d.length>1||d[0]||tt(w,E)?(mo(n.doc,d,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()||Qn(this.cm,(function(){return dn(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 B,this.hasSelection=!1,this.composing=null};Wa.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!me(n,e)){if(n.somethingSelected())La({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Ma(n);La({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,z):(r.prevInput="",i.value=t.text.join("\n"),M(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),de(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),de(i,"paste",(function(e){me(n,e)||ja(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),de(i,"cut",o),de(i,"copy",o),de(e.scroller,"paste",(function(t){if(!wr(e,t)&&!me(n,t)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),de(e.lineSpace,"selectstart",(function(t){wr(e,t)||ye(t)})),de(i,"compositionstart",(function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),de(i,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.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,r=e.doc,n=vn(e);if(e.options.moveInputWithCursor){var i=Vr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},Wa.prototype.showSelection=function(e){var t=this.cm.display;C(t.cursorDiv,e.cursors),C(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 r=t.getSelection();this.textarea.value=r,t.state.focused&&M(this.textarea),a&&s>=9&&(this.hasSelection=r)}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 r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}))},Wa.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ie(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||b&&/[\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||n||(n=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(n.length,i.length);l<c&&n.charCodeAt(l)==i.charCodeAt(l);)++l;return Qn(t,(function(){Ia(t,i.slice(l),n.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.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,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=cn(r,e),c=n.scroller.scrollTop;if(o&&!d){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&ei(r,Qi)(r.doc,Ti(o),z);var u,f=i.style.cssText,h=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),n.input.focus(),l&&window.scrollTo(null,u),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),a&&s>=9&&g(),S){Ee(e);var m=function(){he(window,"mouseup",m),setTimeout(v,20)};de(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=r.somethingSelected(),o=""+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,i.style.cssText=f,a&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&g();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?ei(r,so)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.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 r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=Ea&&i(e,t,r)}:i)}e.defineOption=r,e.Init=Ea,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,Di(e)}),!0),r("indentUnit",2,Di,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){Li(e),Br(e),dn(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=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,r.push(et(n,o))}n++}));for(var i=r.length-1;i>=0;i--)mo(e.doc,t,r[i],et(r[i].line,r[i].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Ea&&e.refresh()})),r("specialCharPlaceholder",Zt,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!x),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){wa(e),mi(e)}),!0),r("keyMap","default",(function(e,t,r){var n=$o(t),i=r!=Ea&&$o(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,ka,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=hi(t,e.options.lineNumbers),mi(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?an(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return Hn(e)}),!0),r("scrollbarStyle","native",(function(e){Kn(e),Hn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=hi(e.options.gutters,t),mi(e)}),!0),r("firstLineNumber",1,mi,!0),r("lineNumberFormatter",(function(e){return e}),mi,!0),r("showCursorWhenSelecting",!1,gn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(Tn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,Ta),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,gn,!0),r("singleCursorHeightPerLine",!0,gn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Li,!0),r("addModeClass",!1,Li,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,Li,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}(Oa),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&ei(this,t[e])(this,r,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,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:ti((function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");!function(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},(function(e){return e.priority})),this.state.modeGen++,dn(this)})),removeOverlay:ti((function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void dn(this)}})),indentLine:ti((function(e,t,r){"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,r)})),indentSelection:ti((function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(Aa(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&Ln(this));else{var o=i.from(),a=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<r;++l)Aa(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[n].from().ch>0&&$i(this.doc,n,new Si(o,c[n].to()),z)}}})),getTokenAt:function(e,t){return bt(this,e,t)},getLineTokens:function(e,t){return bt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,r=ft(this,Ve(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var a=n+i>>1;if((a?r[2*a-1]:0)>=o)i=a;else{if(!(r[2*a+1]<o)){t=r[2*a+2];break}n=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 r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!r.hasOwnProperty(t))return n;var i=r[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&n.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var s=i[o[t][a]];s&&n.push(s)}else o.helperType&&i[o.helperType]?n.push(i[o.helperType]):i[o.name]&&n.push(i[o.name]);for(var l=0;l<i._global.length;l++){var c=i._global[l];c.pred(o,this)&&-1==U(n,c.val)&&n.push(c.val)}return n},getStateAfter:function(e,t){var r=this.doc;return ht(this,(e=at(r,null==e?r.first+r.size-1:e))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary();return Vr(this,null==e?r.head:"object"==typeof e?st(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return Wr(this,st(this.doc,e),t||"page")},coordsChar:function(e,t){return Yr(this,(e=Kr(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Kr(this,{top:e,left:0},t||"page").top,Je(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,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),n=Ve(this.doc,e)}else n=e;return Gr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-Gt(n):0)},defaultTextHeight:function(){return rn(this.display)},defaultCharWidth:function(){return nn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o,a,s,l=this.display,c=(e=Vr(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"==n)c=e.top;else if("above"==n||"near"==n){var d=Math.max(l.wrapper.clientHeight,this.doc.height),f=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(c=e.bottom),u+t.offsetWidth>f&&(u=f-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"),r&&(o=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=An(o,a)).scrollTop&&Mn(o,s.scrollTop),null!=s.scrollLeft&&Pn(o,s.scrollLeft))},triggerOnKeyDown:ti(ua),triggerOnKeyPress:ti(fa),triggerOnKeyUp:da,triggerOnMouseDown:ti(ga),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:ti((function(e){Ra(this,e)})),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),a=0;a<t&&!(o=Fa(this.doc,o,i,r,n)).hitSide;++a);return o},moveH:ti((function(e,t){var r=this;this.extendSelectionsBy((function(n){return r.display.shift||r.doc.extend||n.empty()?Fa(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()}),K)})),deleteH:ti((function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):Jo(this,(function(r){var i=Fa(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}}))})),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var a=st(this.doc,e),s=0;s<t;++s){var l=Vr(this,a,"div");if(null==o?o=l.left:l.left=o,(a=Ba(this,l,i,r)).hitSide)break}return a},moveV:ti((function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var s=Vr(r,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=Ba(r,s,e,t);return"page"==t&&a==n.sel.primary()&&Dn(r,Wr(r,l,"div").top-s.top),l}),K),i.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(e){var t=Ve(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var o=t.charAt(r),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)};r>0&&a(t.charAt(r-1));)--r;for(;n<t.length&&a(t.charAt(n));)++n}return new Si(et(e.line,r),et(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?j(this.display.cursorDiv,"CodeMirror-overwrite"):k(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){In(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Tr(this)-this.display.barHeight,width:e.scrollWidth-Tr(this)-this.display.barWidth,clientHeight:Or(this),clientWidth:kr(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){jn(e),e.curOp.scrollToPos=t}(this,e):Rn(this,e.from,e.to,e.margin)})),setSize:ti((function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&Fr(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){fn(r,i,"widget");break}++i})),this.curOp.forceUpdate=!0,pe(this,"refresh",this)})),operation:function(e){return Qn(this,e)},startOperation:function(){return Vn(this)},endOperation:function(){return qn(this)},refresh:ti((function(){var e=this.display.cachedTextHeight;dn(this),this.curOp.forceUpdate=!0,Br(this),In(this,this.doc.scrollLeft,this.doc.scrollTop),ci(this.display),(null==e||Math.abs(e-rn(this.display))>.5||this.options.lineWrapping)&&ln(this),pe(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Mi(this,e),Br(this),this.display.input.reset(),In(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sr(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}},be(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(Oa);var Va="iter insert remove copy getEditor constructor".split(" ");for(var qa in Lo.prototype)Lo.prototype.hasOwnProperty(qa)&&U(Va,qa)<0&&(Oa.prototype[qa]=function(e){return function(){return e.apply(this.doc,arguments)}}(Lo.prototype[qa]));return be(Lo),Oa.inputStyles={textarea:Wa,contenteditable:Ua},Oa.defineMode=function(e){Oa.defaults.mode||"null"==e||(Oa.defaults.mode=e),Pe.apply(this,arguments)},Oa.defineMIME=function(e,t){Ne[e]=t},Oa.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Oa.defineMIME("text/plain","null"),Oa.defineExtension=function(e,t){Oa.prototype[e]=t},Oa.defineDocExtension=function(e,t){Lo.prototype[e]=t},Oa.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 r=I();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(de(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(he(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Oa((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=he,e.on=de,e.wheelEventPixels=xi,e.Doc=Lo,e.splitLines=Le,e.countColumn=F,e.findColumn=W,e.isWordChar=Q,e.Pass=H,e.signal=pe,e.Line=Vt,e.changeEnd=ki,e.scrollbarModel=Gn,e.Pos=et,e.cmpPos=tt,e.modes=Me,e.mimeModes=Ne,e.resolveMode=Fe,e.getMode=Be,e.modeExtensions=Ue,e.extendMode=He,e.copyState=ze,e.startState=Ke,e.innerMode=Ge,e.commands=ta,e.keyMap=Go,e.keyName=Yo,e.isModifierKey=qo,e.lookupKey=Vo,e.normalizeKeyMap=Wo,e.StringStream=We,e.SharedTextMarker=Oo,e.TextMarker=To,e.LineWidget=Eo,e.e_preventDefault=ye,e.e_stopPropagation=xe,e.e_stop=Ee,e.addClass=j,e.contains=L,e.rmClass=k,e.keyNames=Bo}(Oa),Oa.version="5.58.2",Oa}()},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,r){var n,i,o,a;e.exports=(n=r(/*! ./core */"Ib8C"),o=(i=n).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 r=e.blockSize,n=4*r;t.sigBytes>n&&(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<r;c++)s[c]^=1549556828,l[c]^=909522486;i.sigBytes=o.sigBytes=n,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,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})))},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/tree/DirectoryTree.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/utils/treeUtil.js because of ./node_modules/antd/es/tree/DirectoryTree.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,r){"use strict";var n=r("rePB"),i=r("Ff2n"),o=r("VTBJ"),a=r("1OyB"),s=r("vuIU"),l=r("JX7q"),c=r("Ji7U"),u=r("LK+K"),d=r("q1tI"),f=r("TSYQ"),h=r.n(f),p=r("sboe"),m=r("OZM5"),g=function(e){var t=e.prefixCls,r=e.level,i=e.isStart,o=e.isEnd;if(!r)return null;for(var a="".concat(t,"-indent-unit"),s=[],l=0;l<r;l+=1){var c;s.push(d.createElement("span",{key:l,className:h()(a,(c={},Object(n.a)(c,"".concat(a,"-start"),i[l+1]),Object(n.a)(c,"".concat(a,"-end"),o[l+1]),Object(n.a)(c,"".concat(a,"-end-first-level"),!l&&o[0]),c))}))}return d.createElement("span",{"aria-hidden":"true",className:"".concat(t,"-indent")},s)},v=r("815F"),b=function(e){Object(c.a)(r,e);var t=Object(u.a)(r);function r(){var e;return Object(a.a)(this,r),(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 r=e.props.context.onNodeSelect;t.preventDefault(),r(t,Object(v.b)(e.props))}},e.onCheck=function(t){if(!e.isDisabled()){var r=e.props,n=r.disableCheckbox,i=r.checked,o=e.props.context.onNodeCheck;if(e.isCheckable()&&!n){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 r=e.props.context.onNodeDragStart;t.stopPropagation(),e.setState({dragNodeHighlight:!0}),r(t,Object(l.a)(e));try{t.dataTransfer.setData("text/plain","")}catch(e){}},e.onDragEnter=function(t){var r=e.props.context.onNodeDragEnter;t.preventDefault(),t.stopPropagation(),r(t,Object(l.a)(e))},e.onDragOver=function(t){var r=e.props.context.onNodeDragOver;t.preventDefault(),t.stopPropagation(),r(t,Object(l.a)(e))},e.onDragLeave=function(t){var r=e.props.context.onNodeDragLeave;t.stopPropagation(),r(t,Object(l.a)(e))},e.onDragEnd=function(t){var r=e.props.context.onNodeDragEnd;t.stopPropagation(),e.setState({dragNodeHighlight:!1}),r(t,Object(l.a)(e))},e.onDrop=function(t){var r=e.props.context.onNodeDrop;t.preventDefault(),t.stopPropagation(),e.setState({dragNodeHighlight:!1}),r(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,r=t.isLeaf,n=t.loaded,i=e.props.context.loadData,o=e.hasChildren();return!1!==r&&(r||!i&&!o||i&&n&&!o)},e.isDisabled=function(){var t=e.props.disabled;return!(!e.props.context.disabled&&!t)},e.isCheckable=function(){var t=e.props.checkable,r=e.props.context.checkable;return!(!r||!1===t)&&r},e.syncLoadData=function(t){var r=t.expanded,n=t.loading,i=t.loaded,o=e.props.context,a=o.loadData,s=o.onNodeLoad;n||a&&r&&!e.isLeaf()&&(e.hasChildren()||i||s(Object(v.b)(e.props)))},e.renderSwitcher=function(){var t=e.props,r=t.expanded,n=t.switcherIcon,i=e.props.context,a=i.prefixCls,s=i.switcherIcon,l=n||s;if(e.isLeaf())return d.createElement("span",{className:h()("".concat(a,"-switcher"),"".concat(a,"-switcher-noop"))},"function"==typeof l?l(Object(o.a)(Object(o.a)({},e.props),{},{isLeaf:!0})):l);var c=h()("".concat(a,"-switcher"),"".concat(a,"-switcher_").concat(r?"open":"close"));return d.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,r=t.checked,n=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 d.createElement("span",{className:h()("".concat(o,"-checkbox"),r&&"".concat(o,"-checkbox-checked"),!r&&n&&"".concat(o,"-checkbox-indeterminate"),(a||i)&&"".concat(o,"-checkbox-disabled")),onClick:e.onCheck},l)},e.renderIcon=function(){var t=e.props.loading,r=e.props.context.prefixCls;return d.createElement("span",{className:h()("".concat(r,"-iconEle"),"".concat(r,"-icon__").concat(e.getNodeState()||"docu"),t&&"".concat(r,"-icon_loading"))})},e.renderSelector=function(){var t,r,n=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,f=u.prefixCls,p=u.showIcon,m=u.icon,g=u.draggable,v=u.loadData,b=u.titleRender,y=e.isDisabled(),x="".concat(f,"-node-content-wrapper");if(p){var w=s||m;t=w?d.createElement("span",{className:h()("".concat(f,"-iconEle"),"".concat(f,"-icon__customize"))},"function"==typeof w?w(e.props):w):e.renderIcon()}else v&&l&&(t=e.renderIcon());r="function"==typeof o?o(c):b?b(c):o;var E=d.createElement("span",{className:"".concat(f,"-title")},r);return d.createElement("span",{ref:e.setSelectHandle,title:"string"==typeof o?o:"",className:h()("".concat(x),"".concat(x,"-").concat(e.getNodeState()||"normal"),!y&&(a||n)&&"".concat(f,"-node-selected"),!y&&g&&"draggable"),draggable:!y&&g||void 0,"aria-grabbed":!y&&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)(r,[{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,r=t.eventKey,o=t.className,a=t.style,s=t.dragOver,l=t.dragOverGapTop,c=t.dragOverGapBottom,u=t.isLeaf,f=t.isStart,p=t.isEnd,b=t.expanded,y=t.selected,x=t.checked,w=t.halfChecked,E=t.loading,S=t.domRef,_=t.active,T=t.onMouseMove,k=Object(i.a)(t,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),O=this.props.context,C=O.prefixCls,A=O.filterTreeNode,D=O.draggable,L=O.keyEntities,I=this.isDisabled(),j=Object(m.f)(k),R=(L[r]||{}).level,M=p[p.length-1];return d.createElement("div",Object.assign({ref:S,className:h()(o,"".concat(C,"-treenode"),(e={},Object(n.a)(e,"".concat(C,"-treenode-disabled"),I),Object(n.a)(e,"".concat(C,"-treenode-switcher-").concat(b?"open":"close"),!u),Object(n.a)(e,"".concat(C,"-treenode-checkbox-checked"),x),Object(n.a)(e,"".concat(C,"-treenode-checkbox-indeterminate"),w),Object(n.a)(e,"".concat(C,"-treenode-selected"),y),Object(n.a)(e,"".concat(C,"-treenode-loading"),E),Object(n.a)(e,"".concat(C,"-treenode-active"),_),Object(n.a)(e,"".concat(C,"-treenode-leaf-last"),M),Object(n.a)(e,"drag-over",!I&&s),Object(n.a)(e,"drag-over-gap-top",!I&&l),Object(n.a)(e,"drag-over-gap-bottom",!I&&c),Object(n.a)(e,"filter-node",A&&A(Object(v.b)(this.props))),e)),style:a,onDragEnter:D?this.onDragEnter:void 0,onDragOver:D?this.onDragOver:void 0,onDragLeave:D?this.onDragLeave:void 0,onDrop:D?this.onDrop:void 0,onDragEnd:D?this.onDragEnd:void 0,onMouseMove:T},j),d.createElement(g,{prefixCls:C,level:R,isStart:f,isEnd:p}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),r}(d.Component),y=function(e){return d.createElement(p.a.Consumer,null,(function(t){return d.createElement(b,Object.assign({},e,{context:t}))}))};y.displayName="TreeNode",y.defaultProps={title:"---"},y.isTreeNode=1;t.a=y},XIdC:
/*!********************************************!*\
!*** ./node_modules/rc-switch/es/index.js ***!
\********************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,r){"use strict";var n=r(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=r(/*! @babel/runtime/helpers/esm/slicedToArray */"ODXe"),o=r(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),a=r(/*! react */"q1tI"),s=r(/*! classnames */"TSYQ"),l=r.n(s),c=r(/*! rc-util/es/hooks/useMergedState */"6cGi"),u=r(/*! rc-util/es/KeyCode */"4IlW"),d=a.forwardRef((function(e,t){var r,s=e.prefixCls,d=void 0===s?"rc-switch":s,f=e.className,h=e.checked,p=e.defaultChecked,m=e.disabled,g=e.loadingIcon,v=e.checkedChildren,b=e.unCheckedChildren,y=e.onClick,x=e.onChange,w=e.onKeyDown,E=Object(o.a)(e,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),S=Object(c.a)(!1,{value:h,defaultValue:p}),_=Object(i.a)(S,2),T=_[0],k=_[1];function O(e,t){var r=T;return m||(k(r=e),null==x||x(r,t)),r}var C=l()(d,f,(r={},Object(n.a)(r,"".concat(d,"-checked"),T),Object(n.a)(r,"".concat(d,"-disabled"),m),r));return a.createElement("button",Object.assign({},E,{type:"button",role:"switch","aria-checked":T,disabled:m,className:C,ref:t,onKeyDown:function(e){e.which===u.a.LEFT?O(!1,e):e.which===u.a.RIGHT&&O(!0,e),null==w||w(e)},onClick:function(e){var t=O(!T,e);null==y||y(t,e)}}),g,a.createElement("span",{className:"".concat(d,"-inner")},T?v:b))}));d.displayName="Switch",t.a=d},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,r){"use strict";r.r(t),r.d(t,"ResizableTextArea",(function(){return j}));var n=r("wx14"),i=r("1OyB"),o=r("vuIU"),a=r("Ji7U"),s=r("LK+K"),l=r("q1tI"),c=r("VTBJ"),u=r("rePB"),d=r("Zm9Q"),f=(r("Kwbf"),r("c+Xe")),h=r("m+aA"),p=r("bdgK"),m=new Map;var g=new p.default((function(e){e.forEach((function(e){var t,r=e.target;null===(t=m.get(r))||void 0===t||t.forEach((function(e){return e(r)}))}))}));var v=function(e){Object(a.a)(r,e);var t=Object(s.a)(r);function r(){return Object(i.a)(this,r),t.apply(this,arguments)}return Object(o.a)(r,[{key:"render",value:function(){return this.props.children}}]),r}(l.Component),b=l.createContext(null);function y(e){var t=e.children,r=e.disabled,n=l.useRef(null),i=l.useRef(null),o=l.useContext(b),a=l.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),s=l.isValidElement(t)&&Object(f.c)(t),u=s?t.ref:null,d=l.useMemo((function(){return Object(f.a)(u,n)}),[u,n]),p=l.useRef(e);p.current=e;var y=l.useCallback((function(e){var t=p.current,r=t.onResize,n=t.data,i=e.getBoundingClientRect(),s=i.width,l=i.height,u=e.offsetWidth,d=e.offsetHeight,f=Math.floor(s),h=Math.floor(l);if(a.current.width!==f||a.current.height!==h||a.current.offsetWidth!==u||a.current.offsetHeight!==d){var m={width:f,height:h,offsetWidth:u,offsetHeight:d};a.current=m;var g=u===Math.round(s)?s:u,v=d===Math.round(l)?l:d,b=Object(c.a)(Object(c.a)({},m),{},{offsetWidth:g,offsetHeight:v});null==o||o(b,e,n),r&&Promise.resolve().then((function(){r(b,e)}))}}),[]);return l.useEffect((function(){var e,t,o=Object(h.a)(n.current)||Object(h.a)(i.current);return o&&!r&&(e=o,t=y,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,y)}}),[n.current,r]),l.createElement(v,{ref:i},s?l.cloneElement(t,{ref:d}):t)}function x(e){var t=e.children;return Object(d.a)(t).map((function(t,r){var i=(null==t?void 0:t.key)||"".concat("rc-observer-key","-").concat(r);return l.createElement(y,Object(n.a)({},e,{key:i}),t)}))}x.Collection=function(e){var t=e.children,r=e.onBatchResize,n=l.useRef(0),i=l.useRef([]),o=l.useContext(b),a=l.useCallback((function(e,t,a){n.current+=1;var s=n.current;i.current.push({size:e,element:t,data:a}),Promise.resolve().then((function(){s===n.current&&(null==r||r(i.current),i.current=[])})),null==o||o(e,t,a)}),[r,o]);return l.createElement(b.Provider,{value:a},t)};var w,E=x,S=r("bT9E"),_=r("TSYQ"),T=r.n(_),k="\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",O=["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"],C={};function A(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&C[r])return C[r];var n=window.getComputedStyle(e),i=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),o=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),a=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),s=O.map((function(e){return"".concat(e,":").concat(n.getPropertyValue(e))})).join(";"),l={sizingStyle:s,paddingSize:o,borderSize:a,boxSizing:i};return t&&r&&(C[r]=l),l}var D,L=r("Gytx"),I=r.n(L);!function(e){e[e.NONE=0]="NONE",e[e.RESIZING=1]="RESIZING",e[e.RESIZED=2]="RESIZED"}(D||(D={}));var j=function(e){Object(a.a)(r,e);var t=Object(s.a)(r);function r(e){var o;return Object(i.a)(this,r),(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,r=o.props,n=r.autoSize,i=r.onResize;t===D.NONE&&("function"==typeof i&&i(e),n&&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,r=e.maxRows,n=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=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(k)),w.value=e.value||e.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,d=Number.MAX_SAFE_INTEGER,f=w.scrollHeight;if("border-box"===s?f+=a:"content-box"===s&&(f-=o),null!==r||null!==n){w.value=" ";var h=w.scrollHeight-o;null!==r&&(u=h*r,"border-box"===s&&(u=u+o+a),f=Math.max(u,f)),null!==n&&(d=h*n,"border-box"===s&&(d=d+o+a),c=f>d?"":"hidden",f=Math.min(d,f))}return{height:f,minHeight:u,maxHeight:d,overflowY:c,resize:"none"}}(o.textArea,!1,t,r);o.setState({textareaStyles:n,resizeStatus:D.RESIZING},(function(){cancelAnimationFrame(o.resizeFrameId),o.resizeFrameId=requestAnimationFrame((function(){o.setState({resizeStatus:D.RESIZED},(function(){o.resizeFrameId=requestAnimationFrame((function(){o.setState({resizeStatus:D.NONE}),o.fixFirefoxAutoScroll()}))}))}))}))}},o.renderTextArea=function(){var e=o.props,t=e.prefixCls,r=void 0===t?"rc-textarea":t,i=e.autoSize,a=e.onResize,s=e.className,d=e.disabled,f=o.state,h=f.textareaStyles,p=f.resizeStatus,m=Object(S.a)(o.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),g=T()(r,s,Object(u.a)({},"".concat(r,"-disabled"),d));"value"in m&&(m.value=m.value||"");var v=Object(c.a)(Object(c.a)(Object(c.a)({},o.props.style),h),p===D.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(E,{onResize:o.handleResize,disabled:!(i||a)},l.createElement("textarea",Object(n.a)({},m,{className:g,style:v,ref:o.saveTextArea})))},o.state={textareaStyles:{},resizeStatus:D.NONE},o}return Object(o.a)(r,[{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()}}]),r}(l.Component),R=function(e){Object(a.a)(r,e);var t=Object(s.a)(r);function r(e){var n;Object(i.a)(this,r),(n=t.call(this,e)).resizableTextArea=void 0,n.focus=function(){n.resizableTextArea.textArea.focus()},n.saveTextArea=function(e){n.resizableTextArea=e},n.handleChange=function(e){var t=n.props.onChange;n.setValue(e.target.value,(function(){n.resizableTextArea.resizeTextarea()})),t&&t(e)},n.handleKeyDown=function(e){var t=n.props,r=t.onPressEnter,i=t.onKeyDown;13===e.keyCode&&r&&r(e),i&&i(e)};var o=void 0===e.value||null===e.value?e.defaultValue:e.value;return n.state={value:o},n}return Object(o.a)(r,[{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(j,Object(n.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}}]),r}(l.Component);t.default=R},ZD9Y:
/*!*********************************************************!*\
!*** ./src/components/tpi-code-setting/CodeSetting.tsx ***!
\*********************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,r){"use strict";r(/*! antd/es/switch/style */"BoS7");var n=r(/*! antd/es/switch */"Sdc0"),i=(r(/*! antd/es/select/style */"OaEy"),r(/*! antd/es/select */"2fM7")),o=r(/*! react */"q1tI"),a=r.n(o),s=(r(/*! ./index.less */"lOMy"),i.a.Option);t.a=function(e){var t=e.onFontSizeChange,r=e.cmFontSize,o=e.cmCodeMode,l=e.onCodeModeChange,c=e.onTabToSpace,u=e.className,d=void 0===u?"":u,f=e.tabToSpace,h=e.children;return a.a.createElement("div",{className:"tpi-code-setting ".concat(d)},a.a.createElement("h3",null,"代码格式"),a.a.createElement("section",null,a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"显示模式"),a.a.createElement(i.a,{bordered:!1,size:"small",value:o,onChange:l},a.a.createElement(s,{value:"vs"},"白色背景"),a.a.createElement(s,{value:"vs-dark"},"黑色背景"))),a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"字体大小"),a.a.createElement(i.a,{bordered:!1,size:"small",value:r,onChange:t},a.a.createElement(s,{value:12},"12px"),a.a.createElement(s,{value:14},"14px"),a.a.createElement(s,{value:16},"16px"),a.a.createElement(s,{value:18},"18px"),a.a.createElement(s,{value:20},"20px"),a.a.createElement(s,{value:22},"22px"))),a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"Tab转换"),a.a.createElement(n.a,{checked:f,onChange:c}))),a.a.createElement("h3",null,"快捷键"),a.a.createElement("section",null,a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"保存代码"),a.a.createElement("span",null,"Ctrl + S")),a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"唤出快捷键列表"),a.a.createElement("span",null,"F1 / Alt + F1")),a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"左右缩进"),a.a.createElement("span",null,"Ctrl + ]/[")),a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"跳到匹配的括号"),a.a.createElement("span",null,"Ctrl + Shift + \\")),a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"转到行首"),a.a.createElement("span",null,"Home")),a.a.createElement("div",{className:"file-item"},a.a.createElement("b",null,"转到行尾"),a.a.createElement("span",null,"End"))),h)}},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,r){"use strict";r.d(t,"a",(function(){return v}));var n=r("k1fw"),i=(r("miYZ"),r("tsqr")),o=r("rAM+"),a=r("tJVT"),s=r("PpiC"),l=r("q1tI"),c=r.n(l),u=r("bdgK");function d(e,t,r,i,o){var a=t.getWordUntilPosition(r),s={startLineNumber:r.lineNumber,endLineNumber:r.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(n.a)(Object(n.a)({},e),{},{range:s}))})),l}r("LvDl");function f(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}function h(){}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 r=0;r<e.length;r++){var n=p[e[r]];if(n)return n}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,b=void 0===v?"100%":v,y=e.value,x=e.language,w=void 0===x?"javascript":x,E=e.style,S=void 0===E?{}:E,_=e.options,T=void 0===_?{}:_,k=e.overrideServices,O=void 0===k?{}:k,C=e.theme,A=void 0===C?"vs-dark":C,D=e.onEditBlur,L=e.onSave,I=e.autoHeight,j=void 0!==I&&I,R=e.forbidCopy,M=void 0!==R&&R,N=e.onChange,P=void 0===N?h:N,F=e.editorDidMount,B=void 0===F?h:F,U=e.onFocus,H=void 0===U?h:U,z=e.filename,G=void 0===z?"educoder.txt":z,K=(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)({}),V=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(),r=W.current.pastePos||{},n=new g.Range(r.startLineNumber||t.endLineNumber,r.startColumn||t.endColumn,r.endLineNumber||t.endLineNumber,r.endColumn||t.endColumn);setTimeout((function(){e.executeEdits("",[{range:n,text:""}])}),300)}}function te(e){(window.navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&83==e.keyCode&&(e.preventDefault(),L())}Object(l.useEffect)((function(){V.current&&clearTimeout(V.current),V.current=setTimeout((function(){!function(){var e=W.current.instance;if(null!=y&&e&&J){var t=e.getModel();t&&y!==t.getValue()&&(!0,t.setValue(y),e.layout(),!1)}}()}),500)}),[y,J,W.current]);var re=function(){if(j&&W.current.instance){var e=W.current.instance.getContentHeight();ue(e<b?b:e)}else ue(b)};function ne(e,t){var r,n,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,r=a,(n=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(n)}Object(l.useEffect)((function(){re()}),[re]),Object(l.useEffect)((function(){K.current&&!J&&r.e(/*! import() | monaco-editor */27).then(r.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(K.current,{value:y,language:m(w),theme:A,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},O);var t=W.current.instance;if(B(t,g),setTimeout((function(){re(),W.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){ne(G||"educoder.txt",t.getValue())}})}),500),W.current.subscription=t.onDidChangeModelContent((function(e){q.current?clearTimeout(X.current):(re(),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},r=["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(n,i){return{suggestions:d(e,n,i,r,[t])}}});var n=["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,r){var i=[{label:"print",kind:e.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join("\n"),insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet}];return{suggestions:d(e,t,r,n,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(r,n){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:d(e,r,n,i,o)}}})}(g),M&&(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,D&&t.onDidBlurEditorWidget((function(){D(t.getValue())})),H&&t.onDidFocusEditorText((function(){H(t.getValue())})),M){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 r=function(){var e;return K.current&&(e=new u.default((function(e){var t,r=Object(o.a)(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;(n.target.offsetHeight>0||n.target.offsetWidth>0)&&W.current.instance.layout()}}catch(e){r.e(e)}finally{r.f()}}))).observe(K.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(),M&&window.removeEventListener("paste",ee),r.unobserve(K.current)}}catch(e){}}))}),[]),Object(l.useEffect)((function(){if(W.current.instance&&J)return document.addEventListener("keydown",te,!1),function(){document.removeEventListener("keydown",te)}}),[L,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(n.a)({},T)),setTimeout((function(){e.getModel().updateOptions(Object(n.a)({},T))}),200))}),[JSON.stringify(T),J]),Object(l.useEffect)((function(){var e=W.current.instance;e&&J&&e.layout()}),[p,b,J]);var ie=Object(l.useState)(f(p)),oe=Object(a.a)(ie,2),ae=oe[0],se=(oe[1],Object(l.useState)(f(b))),le=Object(a.a)(se,2),ce=le[0],ue=le[1],de=Object(n.a)(Object(n.a)({},S),{},{width:ae,height:ce});return c.a.createElement("div",{className:"my-monaco-editor",ref:K,style:de})};function v(e){var t=e.width,i=void 0===t?"100%":t,s=e.height,d=void 0===s?"100%":s,h=e.original,p=e.modified,m=e.language,v=e.options,b=void 0===v?{}:v,y=Object(l.useRef)(),x=Object(l.useState)(null),w=Object(a.a)(x,2),E=w[0],S=w[1];Object(l.useEffect)((function(){y.current&&r.e(/*! import() | monaco-editor */27).then(r.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(e){var t=(g=e).editor.createDiffEditor(y.current,Object(n.a)(Object(n.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},b),{},{wordWrap:!0}));S(t);var r=function(e){var t;return y.current&&(t=new u.default((function(t){var r,n=Object(o.a)(t);try{for(n.s();!(r=n.n()).done;){var i=r.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&e.layout()}}catch(e){n.e(e)}finally{n.f()}}))).observe(y.current),t}(t);return function(){t.dispose();var e=t.getModel();e&&e.dispose(),r.unobserve(y.current)}}))}),[]),Object(l.useEffect)((function(){E&&E.setModel({original:g.editor.createModel(h,m),modified:g.editor.createModel(p,m)})}),[h,p,m,E]);var _={width:f(i),height:f(d)};return c.a.createElement("div",{className:"my-diff-editor",ref:y,style:_})}},ZpRC:
/*!*************************************************************************!*\
!*** ./node_modules/scroll-into-view-if-needed/es/index.js + 1 modules ***!
\*************************************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,r){"use strict";function n(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 r=getComputedStyle(e,null);return i(r.overflowY,t)||i(r.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,r,n,i,o,a,s){return o<e&&a>t||o>e&&a<t?0:o<=e&&s<=r||a>=t&&s>=r?o-e-n:a>t&&s<r||o<e&&s>r?a-t+i:0}var s=function(e,t){var r=window,i=t.scrollMode,s=t.block,l=t.inline,c=t.boundary,u=t.skipOverflowHiddenElements,d="function"==typeof c?c:function(e){return e!==c};if(!n(e))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,h=[],p=e;n(p)&&d(p);){if((p=p.parentElement)===f){h.push(p);break}null!=p&&p===document.body&&o(p)&&!o(document.documentElement)||null!=p&&o(p,u)&&h.push(p)}for(var m=r.visualViewport?r.visualViewport.width:innerWidth,g=r.visualViewport?r.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),x=y.height,w=y.width,E=y.top,S=y.right,_=y.bottom,T=y.left,k="start"===s||"nearest"===s?E:"end"===s?_:E+x/2,O="center"===l?T+w/2:"end"===l?S:T,C=[],A=0;A<h.length;A++){var D=h[A],L=D.getBoundingClientRect(),I=L.height,j=L.width,R=L.top,M=L.right,N=L.bottom,P=L.left;if("if-needed"===i&&E>=0&&T>=0&&_<=g&&S<=m&&E>=R&&_<=N&&T>=P&&S<=M)return C;var F=getComputedStyle(D),B=parseInt(F.borderLeftWidth,10),U=parseInt(F.borderTopWidth,10),H=parseInt(F.borderRightWidth,10),z=parseInt(F.borderBottomWidth,10),G=0,K=0,W="offsetWidth"in D?D.offsetWidth-D.clientWidth-B-H:0,V="offsetHeight"in D?D.offsetHeight-D.clientHeight-U-z:0;if(f===D)G="start"===s?k:"end"===s?k-g:"nearest"===s?a(b,b+g,g,U,z,b+k,b+k+x,x):k-g/2,K="start"===l?O:"center"===l?O-m/2:"end"===l?O-m:a(v,v+m,m,B,H,v+O,v+O+w,w),G=Math.max(0,G+b),K=Math.max(0,K+v);else{G="start"===s?k-R-U:"end"===s?k-N+z+V:"nearest"===s?a(R,N,I,U,z+V,k,k+x,x):k-(R+I/2)+V/2,K="start"===l?O-P-B:"center"===l?O-(P+j/2)+W/2:"end"===l?O-M+H+W:a(P,M,j,B,H+W,O,O+w,w);var q=D.scrollLeft,X=D.scrollTop;k+=X-(G=Math.max(0,Math.min(X+G,D.scrollHeight-I+V))),O+=q-(K=Math.max(0,Math.min(q+K,D.scrollWidth-j+W)))}C.push({el:D,top:G,left:K})}return C};function l(e){return e===Object(e)&&0!==Object.keys(e).length}t.a=function(e,t){var r=!e.ownerDocument.documentElement.contains(e);if(l(t)&&"function"==typeof t.behavior)return t.behavior(r?[]:s(e,t));if(!r){var n=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 r="scrollBehavior"in document.body.style;e.forEach((function(e){var n=e.el,i=e.top,o=e.left;n.scroll&&r?n.scroll({top:i,left:o,behavior:t}):(n.scrollTop=i,n.scrollLeft=o)}))}(s(e,n),n.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,r){var n;!function(i){var o=/^\s+/,a=/\s+$/,s=0,l=i.round,c=i.min,u=i.max,d=i.random;function f(e,t){if(t=t||{},(e=e||"")instanceof f)return e;if(!(this instanceof f))return new f(e,t);var r=function(e){var t={r:0,g:0,b:0},r=1,n=null,s=null,l=null,d=!1,f=!1;"string"==typeof e&&(e=function(e){e=e.replace(o,"").replace(a,"").toLowerCase();var t,r=!1;if(D[e])e=D[e],r=!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:M(t[1]),g:M(t[2]),b:M(t[3]),a:B(t[4]),format:r?"name":"hex8"};if(t=G.hex6.exec(e))return{r:M(t[1]),g:M(t[2]),b:M(t[3]),format:r?"name":"hex"};if(t=G.hex4.exec(e))return{r:M(t[1]+""+t[1]),g:M(t[2]+""+t[2]),b:M(t[3]+""+t[3]),a:B(t[4]+""+t[4]),format:r?"name":"hex8"};if(t=G.hex3.exec(e))return{r:M(t[1]+""+t[1]),g:M(t[2]+""+t[2]),b:M(t[3]+""+t[3]),format:r?"name":"hex"};return!1}(e));"object"==typeof e&&(K(e.r)&&K(e.g)&&K(e.b)?(h=e.r,p=e.g,m=e.b,t={r:255*j(h,255),g:255*j(p,255),b:255*j(m,255)},d=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):K(e.h)&&K(e.s)&&K(e.v)?(n=P(e.s),s=P(e.v),t=function(e,t,r){e=6*j(e,360),t=j(t,100),r=j(r,100);var n=i.floor(e),o=e-n,a=r*(1-t),s=r*(1-o*t),l=r*(1-(1-o)*t),c=n%6;return{r:255*[r,s,a,a,l,r][c],g:255*[l,r,r,s,a,a][c],b:255*[a,a,l,r,r,s][c]}}(e.h,n,s),d=!0,f="hsv"):K(e.h)&&K(e.s)&&K(e.l)&&(n=P(e.s),l=P(e.l),t=function(e,t,r){var n,i,o;function a(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=j(e,360),t=j(t,100),r=j(r,100),0===t)n=i=o=r;else{var s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=a(l,s,e+1/3),i=a(l,s,e),o=a(l,s,e-1/3)}return{r:255*n,g:255*i,b:255*o}}(e.h,n,l),d=!0,f="hsl"),e.hasOwnProperty("a")&&(r=e.a));var h,p,m;return r=I(r),{ok:d,format:e.format||f,r:c(255,u(t.r,0)),g:c(255,u(t.g,0)),b:c(255,u(t.b,0)),a:r}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=l(100*this._a)/100,this._format=t.format||r.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=r.ok,this._tc_id=s++}function h(e,t,r){e=j(e,255),t=j(t,255),r=j(r,255);var n,i,o=u(e,t,r),a=c(e,t,r),s=(o+a)/2;if(o==a)n=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case e:n=(t-r)/l+(t<r?6:0);break;case t:n=(r-e)/l+2;break;case r:n=(e-t)/l+4}n/=6}return{h:n,s:i,l:s}}function p(e,t,r){e=j(e,255),t=j(t,255),r=j(r,255);var n,i,o=u(e,t,r),a=c(e,t,r),s=o,l=o-a;if(i=0===o?0:l/o,o==a)n=0;else{switch(o){case e:n=(t-r)/l+(t<r?6:0);break;case t:n=(r-e)/l+2;break;case r:n=(e-t)/l+4}n/=6}return{h:n,s:i,v:s}}function m(e,t,r,n){var i=[N(l(e).toString(16)),N(l(t).toString(16)),N(l(r).toString(16))];return n&&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,r,n){return[N(F(n)),N(l(e).toString(16)),N(l(t).toString(16)),N(l(r).toString(16))].join("")}function v(e,t){t=0===t?0:t||10;var r=f(e).toHsl();return r.s-=t/100,r.s=R(r.s),f(r)}function b(e,t){t=0===t?0:t||10;var r=f(e).toHsl();return r.s+=t/100,r.s=R(r.s),f(r)}function y(e){return f(e).desaturate(100)}function x(e,t){t=0===t?0:t||10;var r=f(e).toHsl();return r.l+=t/100,r.l=R(r.l),f(r)}function w(e,t){t=0===t?0:t||10;var r=f(e).toRgb();return r.r=u(0,c(255,r.r-l(-t/100*255))),r.g=u(0,c(255,r.g-l(-t/100*255))),r.b=u(0,c(255,r.b-l(-t/100*255))),f(r)}function E(e,t){t=0===t?0:t||10;var r=f(e).toHsl();return r.l-=t/100,r.l=R(r.l),f(r)}function S(e,t){var r=f(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,f(r)}function _(e){var t=f(e).toHsl();return t.h=(t.h+180)%360,f(t)}function T(e){var t=f(e).toHsl(),r=t.h;return[f(e),f({h:(r+120)%360,s:t.s,l:t.l}),f({h:(r+240)%360,s:t.s,l:t.l})]}function k(e){var t=f(e).toHsl(),r=t.h;return[f(e),f({h:(r+90)%360,s:t.s,l:t.l}),f({h:(r+180)%360,s:t.s,l:t.l}),f({h:(r+270)%360,s:t.s,l:t.l})]}function O(e){var t=f(e).toHsl(),r=t.h;return[f(e),f({h:(r+72)%360,s:t.s,l:t.l}),f({h:(r+216)%360,s:t.s,l:t.l})]}function C(e,t,r){t=t||6,r=r||30;var n=f(e).toHsl(),i=360/r,o=[f(e)];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,o.push(f(n));return o}function A(e,t){t=t||6;for(var r=f(e).toHsv(),n=r.h,i=r.s,o=r.v,a=[],s=1/t;t--;)a.push(f({h:n,s:i,v:o})),o=(o+s)%1;return a}f.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,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.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*(r<=.03928?r/12.92:i.pow((r+.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),r=l(100*e.s),n=l(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=l(360*e.h),r=l(100*e.s),n=l(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+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,r,n,i){var o=[N(l(e).toString(16)),N(l(t).toString(16)),N(l(r).toString(16)),N(F(n))];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*j(this._r,255))+"%",g:l(100*j(this._g,255))+"%",b:l(100*j(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*j(this._r,255))+"%, "+l(100*j(this._g,255))+"%, "+l(100*j(this._b,255))+"%)":"rgba("+l(100*j(this._r,255))+"%, "+l(100*j(this._g,255))+"%, "+l(100*j(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(L[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=f(e);r="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._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(b,arguments)},greyscale:function(){return this._applyModification(y,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(C,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(T,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:P(e[n]));e=r}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:d(),g:d(),b:d()})},f.mix=function(e,t,r){r=0===r?0:r||50;var n=f(e).toRgb(),i=f(t).toRgb(),o=r/100;return f({r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a})},f.readability=function(e,t){var r=f(e),n=f(t);return(i.max(r.getLuminance(),n.getLuminance())+.05)/(i.min(r.getLuminance(),n.getLuminance())+.05)},f.isReadable=function(e,t,r){var n,i,o=f.readability(e,t);switch(i=!1,(n=function(e){var t,r;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==r&&"large"!==r&&(r="small");return{level:t,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},f.mostReadable=function(e,t,r){var n,i,o,a,s=null,l=0;i=(r=r||{}).includeFallbackColors,o=r.level,a=r.size;for(var c=0;c<t.length;c++)(n=f.readability(e,t[c]))>l&&(l=n,s=f(t[c]));return f.isReadable(e,s,{level:o,size:a})||!i?s:(r.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],r))};var D=f.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"},L=f.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(D);function I(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function j(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,u(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function R(e){return c(1,u(0,e))}function M(e){return parseInt(e,16)}function N(e){return 1==e.length?"0"+e:""+e}function P(e){return e<=1&&(e=100*e+"%"),e}function F(e){return i.round(255*parseFloat(e)).toString(16)}function B(e){return M(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 K(e){return!!G.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(n=function(){return f}.call(t,r,t,e))||(e.exports=n)}(Math)},bCnd:
/*!******************************!*\
!*** ./src/utils/urlTool.ts ***!
\******************************/
/*! exports provided: toStore, fromStore */
/*! exports used: fromStore, toStore */function(e,t,r){"use strict";r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return a}));var n=r(/*! store */"je13"),i=r.n(n);function o(e,t){var r=i.a.get("__ec");r||(r={}),r[e]=t,i.a.set("__ec",r)}function a(e,t){var r=i.a.get("__ec");return r?void 0===r[e]?t:r[e]:t}},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,r){var n,i,o,a;e.exports=(a=r(/*! ./core */"Ib8C"),r(/*! ./cipher-core */"OLod"),i=(n=a).lib.CipherParams,o=n.enc.Hex,n.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,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ");function i(e,t){var r=Object(n.a)({},e);return Array.isArray(t)&&t.forEach((function(e){delete r[e]})),r}},biw7:
/*!**********************************************************!*\
!*** ./node_modules/rc-table/es/context/TableContext.js ***!
\**********************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,r){"use strict";var n=r(/*! react */"q1tI"),i=n.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,r){},cDPC:
/*!*************************************************!*\
!*** ./src/components/SplitContainer/index.tsx ***!
\*************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,r){"use strict";var n=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),i=r(/*! react */"q1tI"),o=r.n(i);r(/*! ./index.less */"i3hx");t.a=function(e){var t=e.defaultX,r=void 0===t?"40%":t,a=e.leftChild,s=e.rightChild,l=e.className,c=e.hideResize,u=void 0!==c&&c,d=Object(i.useState)(r),f=Object(n.a)(d,2),h=f[0],p=f[1],m=Object(i.useRef)();Object(i.useEffect)((function(){function e(e){m.current&&p(e.pageX)}function t(){m.current=!1}return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),function(){window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}}),[]);var g="number"==typeof h&&.01!==h?"".concat(h,"px"):r,v="calc(100% - ".concat(u?"0px":"4px"," - ").concat(g,")");return o.a.createElement("div",{className:"split-panel-container ".concat(l)},o.a.createElement("section",{style:{width:g,display:.01===h?"none":""}},a),o.a.createElement("section",{className:"resize-x-bar",onMouseDown:function(){m.current=!0}},o.a.createElement("a",{className:"btn-resize"},o.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},o.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),o.a.createElement("section",{style:{width:v}},s))}},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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.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 r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],l=e[t+1],h=e[t+2],p=e[t+3],m=e[t+4],g=e[t+5],v=e[t+6],b=e[t+7],y=e[t+8],x=e[t+9],w=e[t+10],E=e[t+11],S=e[t+12],_=e[t+13],T=e[t+14],k=e[t+15],O=o[0],C=o[1],A=o[2],D=o[3];O=c(O,C,A,D,a,7,s[0]),D=c(D,O,C,A,l,12,s[1]),A=c(A,D,O,C,h,17,s[2]),C=c(C,A,D,O,p,22,s[3]),O=c(O,C,A,D,m,7,s[4]),D=c(D,O,C,A,g,12,s[5]),A=c(A,D,O,C,v,17,s[6]),C=c(C,A,D,O,b,22,s[7]),O=c(O,C,A,D,y,7,s[8]),D=c(D,O,C,A,x,12,s[9]),A=c(A,D,O,C,w,17,s[10]),C=c(C,A,D,O,E,22,s[11]),O=c(O,C,A,D,S,7,s[12]),D=c(D,O,C,A,_,12,s[13]),A=c(A,D,O,C,T,17,s[14]),O=u(O,C=c(C,A,D,O,k,22,s[15]),A,D,l,5,s[16]),D=u(D,O,C,A,v,9,s[17]),A=u(A,D,O,C,E,14,s[18]),C=u(C,A,D,O,a,20,s[19]),O=u(O,C,A,D,g,5,s[20]),D=u(D,O,C,A,w,9,s[21]),A=u(A,D,O,C,k,14,s[22]),C=u(C,A,D,O,m,20,s[23]),O=u(O,C,A,D,x,5,s[24]),D=u(D,O,C,A,T,9,s[25]),A=u(A,D,O,C,p,14,s[26]),C=u(C,A,D,O,y,20,s[27]),O=u(O,C,A,D,_,5,s[28]),D=u(D,O,C,A,h,9,s[29]),A=u(A,D,O,C,b,14,s[30]),O=d(O,C=u(C,A,D,O,S,20,s[31]),A,D,g,4,s[32]),D=d(D,O,C,A,y,11,s[33]),A=d(A,D,O,C,E,16,s[34]),C=d(C,A,D,O,T,23,s[35]),O=d(O,C,A,D,l,4,s[36]),D=d(D,O,C,A,m,11,s[37]),A=d(A,D,O,C,b,16,s[38]),C=d(C,A,D,O,w,23,s[39]),O=d(O,C,A,D,_,4,s[40]),D=d(D,O,C,A,a,11,s[41]),A=d(A,D,O,C,p,16,s[42]),C=d(C,A,D,O,v,23,s[43]),O=d(O,C,A,D,x,4,s[44]),D=d(D,O,C,A,S,11,s[45]),A=d(A,D,O,C,k,16,s[46]),O=f(O,C=d(C,A,D,O,h,23,s[47]),A,D,a,6,s[48]),D=f(D,O,C,A,b,10,s[49]),A=f(A,D,O,C,T,15,s[50]),C=f(C,A,D,O,g,21,s[51]),O=f(O,C,A,D,S,6,s[52]),D=f(D,O,C,A,p,10,s[53]),A=f(A,D,O,C,w,15,s[54]),C=f(C,A,D,O,l,21,s[55]),O=f(O,C,A,D,y,6,s[56]),D=f(D,O,C,A,k,10,s[57]),A=f(A,D,O,C,v,15,s[58]),C=f(C,A,D,O,_,21,s[59]),O=f(O,C,A,D,m,6,s[60]),D=f(D,O,C,A,E,10,s[61]),A=f(A,D,O,C,h,15,s[62]),C=f(C,A,D,O,x,21,s[63]),o[0]=o[0]+O|0,o[1]=o[1]+C|0,o[2]=o[2]+A|0,o[3]=o[3]+D|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(r.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,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<<o|s>>>32-o)+t}function u(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<<o|s>>>32-o)+t}function d(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<<o|s>>>32-o)+t}function f(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<<o|s>>>32-o)+t}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),n.MD5)},dejd:
/*!***********************************************************!*\
!*** ./src/components/markdown-editor/toolbar/index.less ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){},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,r){"use strict";var n=r("Ff2n"),i=r("rePB"),o=r("1OyB"),a=r("vuIU"),s=r("Ji7U"),l=r("md7G"),c=r("foSv"),u=r("q1tI"),d=r.n(u),f=r("TSYQ"),h=r.n(f),p=r("4IlW");function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){Object(i.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,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 r,n=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Object(l.a)(this,r)}}function b(){}function y(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)(r,e);var t=v(r);function r(e){var n;Object(o.a)(this,r),(n=t.call(this,e)).onKeyDown=function(e){var t=n.props,r=t.onKeyDown,i=t.onPressEnter;if(e.keyCode===p.a.UP){var o=n.getRatio(e);n.up(e,o,null),n.stop()}else if(e.keyCode===p.a.DOWN){var a=n.getRatio(e);n.down(e,a,null),n.stop()}else e.keyCode===p.a.ENTER&&i&&i(e);if(n.recordCursorPosition(),n.lastKeyCode=e.keyCode,r){for(var s=arguments.length,l=new Array(s>1?s-1:0),c=1;c<s;c++)l[c-1]=arguments[c];r.apply(void 0,[e].concat(l))}},n.onKeyUp=function(e){var t=n.props.onKeyUp;if(n.stop(),n.recordCursorPosition(),t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];t.apply(void 0,[e].concat(i))}},n.onChange=function(e){var t=n.props.onChange;n.state.focused&&(n.inputting=!0),n.rawInput=n.props.parser(n.getValueFromEvent(e)),n.setState({inputValue:n.rawInput}),t(n.toNumber(n.rawInput))},n.onMouseUp=function(){var e=n.props.onMouseUp;n.recordCursorPosition(),e&&e.apply(void 0,arguments)},n.onFocus=function(){var e;n.setState({focused:!0}),(e=n.props).onFocus.apply(e,arguments)},n.onBlur=function(){var e=n.props.onBlur;n.inputting=!1,n.setState({focused:!1});var t=n.getCurrentValidValue(n.state.inputValue),r=n.setValue(t,b);if(e){var i=n.input.value,o=n.getInputDisplayValue({focus:!1,value:r});n.input.value=o?Number(o):o,e.apply(void 0,arguments),n.input.value=i}},n.getRatio=function(e){var t=1;return e.metaKey||e.ctrlKey?t=.1:e.shiftKey&&(t=10),t},n.getFullNum=function(e){return isNaN(e)?e:/e/i.test(String(e))?Number(e).toFixed(18).replace(/\.?0+$/,""):e},n.getPrecision=function(e){if(w(n.props.precision))return n.props.precision;var t=String(e);if(t.indexOf("e-")>=0)return parseInt(t.slice(t.indexOf("e-")+2),10);var r=0;return t.indexOf(".")>=0&&(r=t.length-t.indexOf(".")-1),r},n.getInputDisplayValue=function(e){var t,r=e||n.state,i=r.focused,o=r.inputValue,a=r.value;null==(t=i?o:n.toPrecisionAsStep(a))&&(t="");var s=n.formatWrapper(t);return w(n.props.decimalSeparator)&&(s=s.toString().replace(".",n.props.decimalSeparator)),s},n.recordCursorPosition=function(){try{n.cursorStart=n.input.selectionStart,n.cursorEnd=n.input.selectionEnd,n.currentValue=n.input.value,n.cursorBefore=n.input.value.substring(0,n.cursorStart),n.cursorAfter=n.input.value.substring(n.cursorEnd)}catch(e){}},n.restoreByAfter=function(e){if(void 0===e)return!1;var t=n.input.value,r=t.lastIndexOf(e);if(-1===r)return!1;var i=n.cursorBefore.length;return n.lastKeyCode===p.a.DELETE&&n.cursorBefore.charAt(i-1)===e[0]?(n.fixCaret(i,i),!0):r+e.length===t.length&&(n.fixCaret(r,r),!0)},n.partRestoreByAfter=function(e){return void 0!==e&&Array.prototype.some.call(e,(function(t,r){var i=e.substring(r);return n.restoreByAfter(i)}))},n.isNotCompleteNumber=function(e){return isNaN(e)||""===e||null===e||e&&e.toString().indexOf(".")===e.toString().length-1},n.stop=function(){n.autoStepTimer&&clearTimeout(n.autoStepTimer)},n.down=function(e,t,r){n.pressingUpOrDown=!0,n.step("down",e,t,r)},n.up=function(e,t,r){n.pressingUpOrDown=!0,n.step("up",e,t,r)},n.saveInput=function(e){n.input=e};var i=e.value;void 0===i&&(i=e.defaultValue),n.state={focused:e.autoFocus};var a=n.getValidValue(n.toNumber(i));return n.state=g(g({},n.state),{},{inputValue:n.toPrecisionAsStep(a),value:a}),n}return Object(a.a)(r,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.value,n=t.onChange,i=t.max,o=t.min,a=this.state.focused;if(e){if(!E(e.value,r)||!E(e.max,i)||!E(e.min,o)){var s,l=a?r:this.getValidValue(r);s=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:s})}var c="value"in this.props?r:this.state.value;"max"in this.props&&e.max!==i&&"number"==typeof c&&c>i&&n&&n(i),"min"in this.props&&e.min!==o&&"number"==typeof c&&c<o&&n&&n(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,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.max,n=parseFloat(e);return isNaN(n)?e:(n<t&&(n=t),n>r&&(n=r),n)}},{key:"setValue",value:function(e,t){var r=this.props.precision,n=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 n?n.toFixed(r):"".concat(n),c=n!==o||l!=="".concat(s);return"value"in this.props?(s=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:s},t)):this.setState({value:n,inputValue:this.toPrecisionAsStep(e)},t),c&&this.props.onChange(n),n}},{key:"getMaxPrecision",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.props,n=r.precision,i=r.step;if(w(n))return n;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,r=this.getMaxPrecision(e,t);return Math.pow(10,r)}},{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,r=this.state.focused,n=e&&e.length>16&&r;return this.isNotCompleteNumber(e)||n?e:w(t)?Math.round(e*Math.pow(10,t))/Math.pow(10,t):Number(e)}},{key:"upStep",value:function(e,t){var r=this.props.step,n=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),o=((n*e+n*r*t)/n).toFixed(i);return this.toNumber(o)}},{key:"downStep",value:function(e,t){var r=this.props.step,n=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),o=((n*e-n*r*t)/n).toFixed(i);return this.toNumber(o)}},{key:"step",value:function(e,t){var r=this,n=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,n),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(){r.pressingUpOrDown=!1})),l||(this.autoStepTimer=setTimeout((function(){r[e](t,n,!0)}),i?200:600))}}}},{key:"fixCaret",value:function(e,t){if(void 0!==e&&void 0!==t&&this.input&&this.input.value)try{var r=this.input.selectionStart,n=this.input.selectionEnd;e===r&&t===n||this.input.setSelectionRange(e,t)}catch(e){}}},{key:"render",value:function(){var e,t=this.props,r=t.prefixCls,o=t.disabled,a=t.readOnly,s=t.useTouch,l=t.autoComplete,c=t.upHandler,u=t.downHandler,f=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,_=t.required,T=t.onClick,k=t.tabIndex,O=t.type,C=t.placeholder,A=t.id,D=t.inputMode,L=t.pattern,I=t.step,j=t.maxLength,R=t.autoFocus,M=t.name,N=t.onPaste,P=t.onInput,F=Object(n.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"]),B=this.state,U=B.value,H=B.focused,z=h()(r,(e={},Object(i.a)(e,f,!!f),Object(i.a)(e,"".concat(r,"-disabled"),o),Object(i.a)(e,"".concat(r,"-focused"),H),e)),G={};Object.keys(F).forEach((function(e){"data-"!==e.substr(0,5)&&"aria-"!==e.substr(0,5)&&"role"!==e||(G[e]=F[e])}));var K=!a&&!o,W=this.getInputDisplayValue(null),V=(U||0===U)&&(isNaN(U)||Number(U)>=p)||o||a,q=(U||0===U)&&(isNaN(U)||Number(U)<=m)||o||a,X=h()("".concat(r,"-handler"),"".concat(r,"-handler-up"),Object(i.a)({},"".concat(r,"-handler-up-disabled"),V)),Y=h()("".concat(r,"-handler"),"".concat(r,"-handler-down"),Object(i.a)({},"".concat(r,"-handler-down-disabled"),q)),$=s?{onTouchStart:V?b:this.up,onTouchEnd:this.stop}:{onMouseDown:V?b:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},J=s?{onTouchStart:q?b:this.down,onTouchEnd:this.stop}:{onMouseDown:q?b:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return d.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}},d.a.createElement("div",{className:"".concat(r,"-handler-wrap")},d.a.createElement("span",Object.assign({unselectable:"on"},$,{role:"button","aria-label":"Increase Value","aria-disabled":V,className:X}),c||d.a.createElement("span",{unselectable:"on",className:"".concat(r,"-handler-up-inner"),onClick:y})),d.a.createElement("span",Object.assign({unselectable:"on"},J,{role:"button","aria-label":"Decrease Value","aria-disabled":q,className:Y}),u||d.a.createElement("span",{unselectable:"on",className:"".concat(r,"-handler-down-inner"),onClick:y}))),d.a.createElement("div",{className:"".concat(r,"-input-wrap")},d.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":m,"aria-valuemax":p,"aria-valuenow":U,required:_,type:O,placeholder:C,onPaste:N,onClick:T,onMouseUp:this.onMouseUp,className:"".concat(r,"-input"),tabIndex:k,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:K?this.onKeyDown:b,onKeyUp:K?this.onKeyUp:b,autoFocus:R,maxLength:j,readOnly:a,disabled:o,max:p,min:m,step:I,name:M,title:v,id:A,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(W),pattern:L,inputMode:D,onInput:P},G))))}}]),r}(d.a.Component);S.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:x,min:-x,step:1,style:{},onChange:b,onKeyDown:b,onPressEnter:b,onFocus:b,onBlur:b,parser:function(e){return e.replace(/[^\w.-]+/g,"")},required:!1,autoComplete:"off"};var _=S;t.a=_},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,r){var n,i,o,a,s,l,c,u,d;e.exports=(d=r(/*! ./core */"Ib8C"),r(/*! ./sha1 */"3y9D"),r(/*! ./hmac */"WYAk"),i=(n=d).lib,o=i.Base,a=i.WordArray,s=n.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 r=this.cfg,n=c.create(r.hasher,e),i=a.create(),o=a.create([1]),s=i.words,l=o.words,u=r.keySize,d=r.iterations;s.length<u;){var f=n.update(t).finalize(o);n.reset();for(var h=f.words,p=h.length,m=f,g=1;g<d;g++){m=n.finalize(m),n.reset();for(var v=m.words,b=0;b<p;b++)h[b]^=v[b]}i.concat(f),l[0]++}return i.sigBytes=4*u,i}}),n.PBKDF2=function(e,t,r){return u.create(r).compute(e,t)},d.PBKDF2)},eRFJ:
/*!*********************************************************!*\
!*** ./src/pages/Question/AddOrEdit/index.less?modules ***!
\*********************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){e.exports={header:"header___2DEfS",field:"field___2KFR1","oj-form-container":"oj-form-container___11-CJ","oj-left-panel":"oj-left-panel___2_COu","oj-form-info":"oj-form-info___3RmjJ",footer:"footer___13GF0",result:"result___2TPH2",passText:"passText___m4yU3",noPassText:"noPassText___bU8yW",pass:"pass___1qwzN",noPass:"noPass___35fR7","test-case-name":"test-case-name___JX6gg","btn-remove-case":"btn-remove-case___20q0s","icon-tag":"icon-tag___ahN2d",btn_back:"btn_back___2GR2u",testJi:"testJi___lY3ok",upBtn:"upBtn___14ov-","oj-problems":"oj-problems___3xexO",row:"row____2CFx",a:"a___1o_MZ",b:"b___2s_8T",inputTwo:"inputTwo___2QE50",inputOne:"inputOne___3VLjS",cusModal:"cusModal___3HaCu","oj-custom-large-spin":"oj-custom-large-spin___18Uw5",MdEditor:"MdEditor___2TQ6G"}},fcSX:
/*!********************************************************!*\
!*** ./node_modules/rc-drawer/es/index.js + 3 modules ***!
\********************************************************/
/*! exports provided: 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/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/rc-util/es/PortalWrapper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,r){"use strict";var n=r("Ff2n"),i=r("1OyB"),o=r("vuIU"),a=r("Ji7U"),s=r("md7G"),l=r("foSv"),c=r("1W/9"),u=r("q1tI"),d=r("rePB"),f=r("JX7q"),h=r("TSYQ"),p=r.n(h),m=r("qx4F"),g=r("4IlW");var v={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},b=Object.keys(v).filter((function(e){if("undefined"==typeof document)return!1;var t=document.getElementsByTagName("html")[0];return e in(t?t.style:{})}))[0],y=v[b];function x(e,t,r,n){e.addEventListener?e.addEventListener(t,r,n):e.attachEvent&&e.attachEvent("on".concat(t),r)}function w(e,t,r,n){e.removeEventListener?e.removeEventListener(t,r,n):e.attachEvent&&e.detachEvent("on".concat(t),r)}var E=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},S=!("undefined"!=typeof window&&window.document&&window.document.createElement);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 r,n=Object(l.a)(e);if(t){var i=Object(l.a)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Object(s.a)(this,r)}}var T={},k=function(e){Object(a.a)(r,e);var t=_(r);function r(e){var n;return Object(i.a)(this,r),(n=t.call(this,e)).domFocus=function(){n.dom&&n.dom.focus()},n.removeStartHandler=function(e){e.touches.length>1||(n.startPos={x:e.touches[0].clientX,y:e.touches[0].clientY})},n.removeMoveHandler=function(e){if(!(e.changedTouches.length>1)){var t=e.currentTarget,r=e.changedTouches[0].clientX-n.startPos.x,i=e.changedTouches[0].clientY-n.startPos.y;(t===n.maskDom||t===n.handlerDom||t===n.contentDom&&function e(t,r,n,i){if(!r||r===document||r instanceof Document)return!1;if(r===t.parentNode)return!0;var o=Math.max(Math.abs(n),Math.abs(i))===Math.abs(i),a=Math.max(Math.abs(n),Math.abs(i))===Math.abs(n),s=r.scrollHeight-r.clientHeight,l=r.scrollWidth-r.clientWidth,c=document.defaultView.getComputedStyle(r),u="auto"===c.overflowY||"scroll"===c.overflowY,d="auto"===c.overflowX||"scroll"===c.overflowX,f=s&&u,h=l&&d;return!!(o&&(!f||f&&(r.scrollTop>=s&&i<0||r.scrollTop<=0&&i>0))||a&&(!h||h&&(r.scrollLeft>=l&&n<0||r.scrollLeft<=0&&n>0)))&&e(t,r.parentNode,n,i)}(t,e.target,r,i))&&e.cancelable&&e.preventDefault()}},n.transitionEnd=function(e){var t=e.target;w(t,y,n.transitionEnd),t.style.transition=""},n.onKeyDown=function(e){if(e.keyCode===g.a.ESC){var t=n.props.onClose;e.stopPropagation(),t&&t(e)}},n.onWrapperTransitionEnd=function(e){var t=n.props,r=t.open,i=t.afterVisibleChange;e.target===n.contentWrapper&&e.propertyName.match(/transform$/)&&(n.dom.style.transition="",!r&&n.getCurrentDrawerSome()&&(document.body.style.overflowX="",n.maskDom&&(n.maskDom.style.left="",n.maskDom.style.width="")),i&&i(!!r))},n.openLevelTransition=function(){var e=n.props,t=e.open,r=e.width,i=e.height,o=n.getHorizontalBoolAndPlacementName(),a=o.isHorizontal,s=o.placementName,l=n.contentDom?n.contentDom.getBoundingClientRect()[a?"width":"height"]:0,c=(a?r:i)||l;n.setLevelAndScrolling(t,s,c)},n.setLevelTransform=function(e,t,r,i){var o=n.props,a=o.placement,s=o.levelMove,l=o.duration,c=o.ease,u=o.showMask;n.levelDom.forEach((function(o){o.style.transition="transform ".concat(l," ").concat(c),x(o,y,n.transitionEnd);var d,f,h,p=e?r:0;if(s){var m=(f={target:o,open:e},h="function"==typeof(d=s)?d(f):d,Array.isArray(h)?2===h.length?h:[h[0],h[1]]:[h]);p=e?m[0]:m[1]||0}var g="number"==typeof p?"".concat(p,"px"):p,v="left"===a||"top"===a?g:"-".concat(g);v=u&&"right"===a&&i?"calc(".concat(v," + ").concat(i,"px)"):v,o.style.transform=p?"".concat(t,"(").concat(v,")"):""}))},n.setLevelAndScrolling=function(e,t,r){var i=n.props.onChange;if(!S){var o=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(m.a)(!0):0;n.setLevelTransform(e,t,r,o),n.toggleScrollingToDrawerAndBody(o)}i&&i(e)},n.toggleScrollingToDrawerAndBody=function(e){var t=n.props,r=t.getOpenCount,i=t.getContainer,o=t.showMask,a=t.open,s=i&&i(),l=r&&r();if(s&&s.parentNode===document.body&&o){var c=["touchstart"],u=[document.body,n.maskDom,n.handlerDom,n.contentDom];a&&"hidden"!==document.body.style.overflow?(e&&n.addScrollingEffect(e),1===l&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",u.forEach((function(e,t){e&&x(e,c[t]||"touchmove",t?n.removeMoveHandler:n.removeStartHandler,n.passive)}))):n.getCurrentDrawerSome()&&(l||(document.body.style.overflow=""),document.body.style.touchAction="",e&&n.remScrollingEffect(e),u.forEach((function(e,t){e&&w(e,c[t]||"touchmove",t?n.removeMoveHandler:n.removeStartHandler,n.passive)})))}},n.addScrollingEffect=function(e){var t=n.props,r=t.placement,i=t.duration,o=t.ease,a=t.getOpenCount,s=t.switchScrollingEffect;1===(a&&a())&&s();var l="width ".concat(i," ").concat(o),c="transform ".concat(i," ").concat(o);switch(n.dom.style.transition="none",r){case"right":n.dom.style.transform="translateX(-".concat(e,"px)");break;case"top":case"bottom":n.dom.style.width="calc(100% - ".concat(e,"px)"),n.dom.style.transform="translateZ(0)"}clearTimeout(n.timeout),n.timeout=setTimeout((function(){n.dom&&(n.dom.style.transition="".concat(c,",").concat(l),n.dom.style.width="",n.dom.style.transform="")}))},n.remScrollingEffect=function(e){var t,r=n.props,i=r.placement,o=r.duration,a=r.ease,s=r.getOpenCount,l=r.switchScrollingEffect;s&&s()||l(!0),b&&(document.body.style.overflowX="hidden"),n.dom.style.transition="none";var c="width ".concat(o," ").concat(a),u="transform ".concat(o," ").concat(a);switch(i){case"left":n.dom.style.width="100%",c="width 0s ".concat(a," ").concat(o);break;case"right":n.dom.style.transform="translateX(".concat(e,"px)"),n.dom.style.width="100%",c="width 0s ".concat(a," ").concat(o),n.maskDom&&(n.maskDom.style.left="-".concat(e,"px"),n.maskDom.style.width="calc(100% + ".concat(e,"px)"));break;case"top":case"bottom":n.dom.style.width="calc(100% + ".concat(e,"px)"),n.dom.style.height="100%",n.dom.style.transform="translateZ(0)",t="height 0s ".concat(a," ").concat(o)}clearTimeout(n.timeout),n.timeout=setTimeout((function(){n.dom&&(n.dom.style.transition="".concat(u,",").concat(t?"".concat(t,","):"").concat(c),n.dom.style.transform="",n.dom.style.width="",n.dom.style.height="")}))},n.getCurrentDrawerSome=function(){return!Object.keys(T).some((function(e){return T[e]}))},n.getLevelDom=function(e){var t=e.level,r=e.getContainer;if(!S){var i,o=r&&r(),a=o?o.parentNode:null;if(n.levelDom=[],"all"===t)(a?Array.prototype.slice.call(a.children):[]).forEach((function(e){"SCRIPT"!==e.nodeName&&"STYLE"!==e.nodeName&&"LINK"!==e.nodeName&&e!==o&&n.levelDom.push(e)}));else t&&(i=t,Array.isArray(i)?i:[i]).forEach((function(e){document.querySelectorAll(e).forEach((function(e){n.levelDom.push(e)}))}))}},n.getHorizontalBoolAndPlacementName=function(){var e=n.props.placement,t="left"===e||"right"===e;return{isHorizontal:t,placementName:"translate".concat(t?"X":"Y")}},n.state={_self:Object(f.a)(n)},n}return Object(o.a)(r,[{key:"componentDidMount",value:function(){var e=this;if(!S){var t=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return t=!0,null}}))}catch(e){}this.passive=!!t&&{passive:!1}}var r=this.props,n=r.open,i=r.getContainer,o=i&&i();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(9*Math.random()).toString())).toString(16)),this.getLevelDom(this.props),n&&(o&&o.parentNode===document.body&&(T[this.drawerId]=n),this.openLevelTransition(),this.forceUpdate((function(){e.domFocus()})))}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.open,n=t.getContainer,i=n&&n();r!==e.open&&(r&&this.domFocus(),i&&i.parentNode===document.body&&(T[this.drawerId]=!!r),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.getOpenCount,r=e.open,n=e.switchScrollingEffect,i="function"==typeof t&&t();delete T[this.drawerId],r&&(this.setLevelTransform(!1),document.body.style.touchAction=""),i||(document.body.style.overflow="",n(!0))}},{key:"render",value:function(){var e,t=this,r=this.props,i=r.className,o=r.children,a=r.style,s=r.width,l=r.height,c=(r.defaultOpen,r.open),f=r.prefixCls,h=r.placement,m=(r.level,r.levelMove,r.ease,r.duration,r.getContainer,r.handler),g=(r.onChange,r.afterVisibleChange,r.showMask),v=r.maskClosable,b=r.maskStyle,y=r.onClose,x=r.onHandleClick,w=r.keyboard,S=(r.getOpenCount,r.switchScrollingEffect,Object(n.a)(r,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"])),_=!!this.dom&&c,T=p()(f,(e={},Object(d.a)(e,"".concat(f,"-").concat(h),!0),Object(d.a)(e,"".concat(f,"-open"),_),Object(d.a)(e,i||"",!!i),Object(d.a)(e,"no-mask",!g),e)),k=this.getHorizontalBoolAndPlacementName().placementName,O="left"===h||"top"===h?"-100%":"100%",C=_?"":"".concat(k,"(").concat(O,")"),A=m&&u.cloneElement(m,{onClick:function(e){m.props.onClick&&m.props.onClick(),x&&x(e)},ref:function(e){t.handlerDom=e}});return u.createElement("div",Object.assign({},S,{tabIndex:-1,className:T,style:a,ref:function(e){t.dom=e},onKeyDown:_&&w?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),g&&u.createElement("div",{className:"".concat(f,"-mask"),onClick:v?y:void 0,style:b,ref:function(e){t.maskDom=e}}),u.createElement("div",{className:"".concat(f,"-content-wrapper"),style:{transform:C,msTransform:C,width:E(s)?"".concat(s,"px"):s,height:E(l)?"".concat(l,"px"):l},ref:function(e){t.contentWrapper=e}},u.createElement("div",{className:"".concat(f,"-content"),ref:function(e){t.contentDom=e},onTouchStart:_&&g?this.removeStartHandler:void 0,onTouchMove:_&&g?this.removeMoveHandler:void 0},o),A))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=t.prevProps,n=t._self,i={prevProps:e};if(void 0!==r){var o=e.placement,a=e.level;o!==r.placement&&(n.contentDom=null),a!==r.level&&n.getLevelDom(e)}return i}}]),r}(u.Component);k.defaultProps={switchScrollingEffect:function(){}};var O=k;function C(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 r,n=Object(l.a)(e);if(t){var i=Object(l.a)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Object(s.a)(this,r)}}var A=function(e){Object(a.a)(r,e);var t=C(r);function r(e){var n;Object(i.a)(this,r),(n=t.call(this,e)).onHandleClick=function(e){var t=n.props,r=t.onHandleClick,i=t.open;if(r&&r(e),void 0===i){var o=n.state.open;n.setState({open:!o})}},n.onClose=function(e){var t=n.props,r=t.onClose,i=t.open;r&&r(e),void 0===i&&n.setState({open:!1})};var o=void 0!==e.open?e.open:!!e.defaultOpen;return n.state={open:o},"onMaskClick"in e&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),n}return Object(o.a)(r,[{key:"render",value:function(){var e=this,t=this.props,r=(t.defaultOpen,t.getContainer),i=t.wrapperClassName,o=t.forceRender,a=t.handler,s=Object(n.a)(t,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),l=this.state.open;if(!r)return u.createElement("div",{className:i,ref:function(t){e.dom=t}},u.createElement(O,Object.assign({},s,{open:l,handler:a,getContainer:function(){return e.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var d=!!a||o;return u.createElement(c.a,{visible:l,forceRender:d,getContainer:r,wrapperClassName:i},(function(t){var r=t.visible,i=t.afterClose,o=Object(n.a)(t,["visible","afterClose"]);return u.createElement(O,Object.assign({},s,o,{open:void 0!==r?r:l,afterVisibleChange:void 0!==i?i:s.afterVisibleChange,handler:a,onClose:e.onClose,onHandleClick:e.onHandleClick}))}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=t.prevProps,n={prevProps:e};return void 0!==r&&e.open!==r.open&&(n.open=e.open),n}}]),r}(u.Component);A.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:u.createElement("div",{className:"drawer-handle"},u.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var D=A;t.a=D},fyJ8:
/*!************************************************!*\
!*** ./node_modules/rc-table/es/Cell/index.js ***!
\************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,r){"use strict";var n=r(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=r(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),o=r(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),a=r(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),s=r(/*! react */"q1tI"),l=r(/*! classnames */"TSYQ"),c=r.n(l),u=r(/*! rc-util/es/ref */"c+Xe"),d=r(/*! ../utils/valueUtil */"sR1s");var f=s.forwardRef((function(e,t){var r,l,f,h,p=e.prefixCls,m=e.className,g=e.record,v=e.index,b=e.dataIndex,y=e.render,x=e.children,w=e.component,E=void 0===w?"td":w,S=e.colSpan,_=e.rowSpan,T=e.fixLeft,k=e.fixRight,O=e.firstFixLeft,C=e.lastFixLeft,A=e.firstFixRight,D=e.lastFixRight,L=e.appendNode,I=e.additionalProps,j=void 0===I?{}:I,R=e.ellipsis,M=e.align,N=e.rowType,P=e.isSticky,F="".concat(p,"-cell");if(x)f=x;else{var B=Object(d.b)(g,b);if(f=B,y){var U=y(B,g,v);!(h=U)||"object"!==Object(a.a)(h)||Array.isArray(h)||s.isValidElement(h)?f=U:(f=U.children,l=U.props)}}"object"!==Object(a.a)(f)||Array.isArray(f)||s.isValidElement(f)||(f=null),R&&(C||A)&&(f=s.createElement("span",{className:"".concat(F,"-content")},f));var H=l||{},z=H.colSpan,G=H.rowSpan,K=H.style,W=H.className,V=Object(o.a)(H,["colSpan","rowSpan","style","className"]),q=void 0!==z?z:S,X=void 0!==G?G:_;if(0===q||0===X)return null;var Y={},$="number"==typeof T,J="number"==typeof k;$&&(Y.position="sticky",Y.left=T),J&&(Y.position="sticky",Y.right=k);var Z,Q={};M&&(Q.textAlign=M);var ee=!0===R?{showTitle:!0}:R;ee&&(ee.showTitle||"header"===N)&&("string"==typeof f||"number"==typeof f?Z=f.toString():s.isValidElement(f)&&"string"==typeof f.props.children&&(Z=f.props.children));var te,re=Object(i.a)(Object(i.a)(Object(i.a)({title:Z},V),j),{},{colSpan:q&&1!==q?q:null,rowSpan:X&&1!==X?X:null,className:c()(F,m,(r={},Object(n.a)(r,"".concat(F,"-fix-left"),$),Object(n.a)(r,"".concat(F,"-fix-left-first"),O),Object(n.a)(r,"".concat(F,"-fix-left-last"),C),Object(n.a)(r,"".concat(F,"-fix-right"),J),Object(n.a)(r,"".concat(F,"-fix-right-first"),A),Object(n.a)(r,"".concat(F,"-fix-right-last"),D),Object(n.a)(r,"".concat(F,"-ellipsis"),R),Object(n.a)(r,"".concat(F,"-with-append"),L),Object(n.a)(r,"".concat(F,"-fix-sticky"),($||J)&&P),r),j.className,W),style:Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({},j.style),Q),Y),K),ref:(te=E,"string"==typeof te||Object(u.c)(te)?t:null)});return s.createElement(E,Object.assign({},re),L,f)}));f.displayName="Cell";var h=s.memo(f,(function(e,t){return!!t.shouldCellUpdate&&!t.shouldCellUpdate(t.record,e.record)}));t.a=h},gRFJ:
/*!********************************************!*\
!*** ./node_modules/store/storages/all.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){e.exports=[r(/*! ./localStorage */"rdUC"),r(/*! ./oldFF-globalStorage */"ynwM"),r(/*! ./oldIE-userDataStorage */"RELg"),r(/*! ./cookieStorage */"DlR+"),r(/*! ./sessionStorage */"CrYA"),r(/*! ./memoryStorage */"PD8m")]},gaXo:
/*!*************************************************!*\
!*** ./node_modules/store/plugins/lib/json2.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(module,exports){"object"!=typeof JSON&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,(function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function str(e,t){var r,n,i,o,a,s=gap,l=t[e];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(e)),"function"==typeof rep&&(l=rep.call(t,e,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(l)){for(o=l.length,r=0;r<o;r+=1)a[r]=str(r,l)||"null";return i=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+s+"]":"["+a.join(",")+"]",gap=s,i}if(rep&&"object"==typeof rep)for(o=rep.length,r=0;r<o;r+=1)"string"==typeof rep[r]&&(i=str(n=rep[r],l))&&a.push(quote(n)+(gap?": ":":")+i);else for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(i=str(n,l))&&a.push(quote(n)+(gap?": ":":")+i);return i=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+s+"}":"{"+a.join(",")+"}",gap=s,i}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,r){var n;if(gap="",indent="","number"==typeof r)for(n=0;n<r;n+=1)indent+=" ";else"string"==typeof r&&(indent=r);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(e,t){var r,n,i=e[t];if(i&&"object"==typeof i)for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(void 0!==(n=walk(i,r))?i[r]=n:delete i[r]);return reviver.call(e,t,i)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},"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,r){var n,i;e.exports=(i=r(/*! ./core */"Ib8C"),r(/*! ./cipher-core */"OLod"),i.mode.ECB=((n=i.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),n.Decryptor=n.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),n),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,r){"use strict";r.d(t,"a",(function(){return S}));var n=r("q1tI"),i=r.n(n),o=r("TSYQ"),a=r.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(n.useRef)()})),r=Object(n.useRef)();return Object(n.useEffect)((function(){var e=Date.now(),n=!1;Object.keys(t).forEach((function(i){var o=t[i].current;if(o){n=!0;var a=o.style;a.transitionDuration=".3s, .3s, .3s, .06s",r.current&&e-r.current<100&&(a.transitionDuration="0s, 0s")}})),n&&(r.current=Date.now())})),[t]};function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}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 r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(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 d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var h=function(e){var t=e.className,r=e.percent,n=e.prefixCls,o=e.strokeColor,s=e.strokeLinecap,d=e.strokeWidth,h=e.style,p=e.trailColor,m=e.trailWidth,g=e.transition,v=f(e,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete v.gapPosition;var b=Array.isArray(r)?r:[r],y=Array.isArray(o)?o:[o],x=u(l(b),1)[0],w=d/2,E=100-d/2,S="M ".concat("round"===s?w:0,",").concat(w,"\n L ").concat("round"===s?E:100,",").concat(w),_="0 0 100 ".concat(d),T=0;return i.a.createElement("svg",c({className:a()("".concat(n,"-line"),t),viewBox:_,preserveAspectRatio:"none",style:h},v),i.a.createElement("path",{className:"".concat(n,"-line-trail"),d:S,strokeLinecap:s,stroke:p,strokeWidth:m||d,fillOpacity:"0"}),b.map((function(e,t){var r={strokeDasharray:"".concat(e,"px, 100px"),strokeDashoffset:"-".concat(T,"px"),transition:g||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},o=y[t]||y[y.length-1];return T+=e,i.a.createElement("path",{key:t,className:"".concat(n,"-line-path"),d:S,strokeLinecap:s,stroke:o,strokeWidth:d,fillOpacity:"0",ref:x[t],style:r})})))};h.defaultProps=s;function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}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 r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var b=0;function y(e){return+e.replace("%","")}function x(e){return Array.isArray(e)?e:[e]}function w(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5?arguments[5]:void 0,a=50-n/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 d="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),f=2*Math.PI*a,h={stroke:r,strokeDasharray:"".concat(t/100*(f-i),"px ").concat(f,"px"),strokeDashoffset:"-".concat(i/2+e/100*(f-i),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:d,pathStyle:h}}var E=function(e){var t,r=e.prefixCls,o=e.strokeWidth,s=e.trailWidth,c=e.gapDegree,u=e.gapPosition,d=e.trailColor,f=e.strokeLinecap,h=e.style,g=e.className,E=e.strokeColor,S=e.percent,_=v(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),T=Object(n.useMemo)((function(){return b+=1}),[]),k=w(0,100,d,o,c,u),O=k.pathString,C=k.pathStyle,A=x(S),D=x(E),L=D.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(r,"-circle"),g),viewBox:"0 0 100 100",style:h},_),L&&i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"".concat(r,"-gradient-").concat(T),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(L).sort((function(e,t){return y(e)-y(t)})).map((function(e,t){return i.a.createElement("stop",{key:t,offset:e,stopColor:L[e]})})))),i.a.createElement("path",{className:"".concat(r,"-circle-trail"),d:O,stroke:d,strokeLinecap:f,strokeWidth:s||o,fillOpacity:"0",style:C}),(t=0,A.map((function(e,n){var a=D[n]||D[D.length-1],s="[object Object]"===Object.prototype.toString.call(a)?"url(#".concat(r,"-gradient-").concat(T,")"):"",l=w(t,e,a,o,c,u);return t+=e,i.a.createElement("path",{key:n,className:"".concat(r,"-circle-path"),d:l.pathString,stroke:s,strokeLinecap:f,strokeWidth:o,opacity:0===e?0:1,fillOpacity:"0",style:l.pathStyle,ref:I[n]})}))).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,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"c",(function(){return a})),r.d(t,"b",(function(){return s}));var n=r(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),i=r(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=(r(/*! rc-util/es/warning */"Kwbf"),"RC_TABLE_INTERNAL_COL_DEFINE");function a(e){var t=e.expandable,r=Object(i.a)(e,["expandable"]);return"expandable"in e?Object(n.a)(Object(n.a)({},r),t):r}function s(e){return Object.keys(e).reduce((function(t,r){return"data-"!==r.substr(0,5)&&"aria-"!==r.substr(0,5)||(t[r]=e[r]),t}),{})}},i3hx:
/*!**************************************************!*\
!*** ./src/components/SplitContainer/index.less ***!
\**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){},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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),r(/*! ./cipher-core */"OLod"),n.pad.Iso97971={pad:function(e,t){e.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(e,t)},unpad:function(e){n.pad.ZeroPadding.unpad(e),e.sigBytes--}},n.pad.Iso97971)},je13:
/*!*************************************************!*\
!*** ./node_modules/store/dist/store.legacy.js ***!
\*************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){var n=r(/*! ../src/store-engine */"5nXd"),i=r(/*! ../storages/all */"gRFJ"),o=[r(/*! ../plugins/json2 */"uQRt")];e.exports=n.createStore(i,o)},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,r){"use strict";r.d(t,"a",(function(){return Wt}));var n=r("rePB"),i=r("ODXe"),o=r("Ff2n"),a=r("VTBJ"),s=r("q1tI"),l=r("TSYQ"),c=r.n(l),u=r("Zm9Q"),d=r("6cGi"),f=r("KQm4"),h=r("xEkU"),p=r.n(h),m=r("t23M");function g(e){var t=Object(s.useRef)(),r=Object(s.useRef)(!1);return Object(s.useEffect)((function(){return function(){r.current=!0,p.a.cancel(t.current)}}),[]),function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];r.current||(p.a.cancel(t.current),t.current=p()((function(){e.apply(void 0,i)})))}}var v=r("4IlW");var b=s.forwardRef((function(e,t){var r,i=e.prefixCls,o=e.id,a=e.active,l=e.rtl,u=e.tab,d=u.key,f=u.tab,h=u.disabled,p=u.closeIcon,m=e.tabBarGutter,g=e.tabPosition,b=e.closable,y=e.renderWrapper,x=e.removeAriaLabel,w=e.editable,E=e.onClick,S=e.onRemove,_=e.onFocus,T="".concat(i,"-tab");s.useEffect((function(){return S}),[]);var k={};"top"===g||"bottom"===g?k[l?"marginLeft":"marginRight"]=m:k.marginBottom=m;var O=w&&!1!==b&&!h;function C(e){h||E(e)}var A=s.createElement("div",{key:d,ref:t,className:c()(T,(r={},Object(n.a)(r,"".concat(T,"-with-remove"),O),Object(n.a)(r,"".concat(T,"-active"),a),Object(n.a)(r,"".concat(T,"-disabled"),h),r)),style:k,onClick:C},s.createElement("div",{role:"tab","aria-selected":a,id:o&&"".concat(o,"-tab-").concat(d),className:"".concat(T,"-btn"),"aria-controls":o&&"".concat(o,"-panel-").concat(d),"aria-disabled":h,tabIndex:h?null:0,onClick:function(e){e.stopPropagation(),C(e)},onKeyDown:function(e){[v.a.SPACE,v.a.ENTER].includes(e.which)&&(e.preventDefault(),C(e))},onFocus:_},f),O&&s.createElement("button",{type:"button","aria-label":x||"remove",tabIndex:0,className:"".concat(T,"-remove"),onClick:function(e){var t;e.stopPropagation(),(t=e).preventDefault(),t.stopPropagation(),w.onEdit("remove",{key:d,event:t})}},p||w.removeIcon||"×"));return y&&(A=y(A)),A})),y={width:0,height:0,left:0,top:0};var x={width:0,height:0,left:0,top:0,right:0};var w=r("wx14"),E=r("1OyB"),S=r("vuIU"),_=r("JX7q"),T=r("Ji7U"),k=r("LK+K"),O=r("I8Z2"),C=r("bT9E"),A=r("2GS6"),D=r("Gytx"),L=r.n(D),I=r("U8pU"),j=/iPhone/i,R=/iPod/i,M=/iPad/i,N=/\bAndroid(?:.+)Mobile\b/i,P=/Android/i,F=/\bAndroid(?:.+)SD4930UR\b/i,B=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,U=/Windows Phone/i,H=/\bWindows(?:.+)ARM\b/i,z=/BlackBerry/i,G=/BB10/i,K=/Opera Mini/i,W=/\b(CriOS|Chrome)(?:.+)Mobile/i,V=/Mobile(?:.+)Firefox\b/i;function q(e,t){return e.test(t)}function X(e){var t=e||("undefined"!=typeof navigator?navigator.userAgent:""),r=(t||"").split("[FBAN");if(void 0!==r[1]){var n=r;t=Object(i.a)(n,1)[0]}if(void 0!==(r=t.split("Twitter"))[1]){var o=r;t=Object(i.a)(o,1)[0]}var a={apple:{phone:q(j,t)&&!q(U,t),ipod:q(R,t),tablet:!q(j,t)&&q(M,t)&&!q(U,t),device:(q(j,t)||q(R,t)||q(M,t))&&!q(U,t)},amazon:{phone:q(F,t),tablet:!q(F,t)&&q(B,t),device:q(F,t)||q(B,t)},android:{phone:!q(U,t)&&q(F,t)||!q(U,t)&&q(N,t),tablet:!q(U,t)&&!q(F,t)&&!q(N,t)&&(q(B,t)||q(P,t)),device:!q(U,t)&&(q(F,t)||q(B,t)||q(N,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(K,t),firefox:q(V,t),chrome:q(W,t),device:q(z,t)||q(G,t)||q(K,t)||q(V,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,r){var n=t||"";return e.key||"".concat(n,"item_").concat(r)}function Z(e){return"".concat(e,"-menu-")}function Q(e,t){var r=-1;s.Children.forEach(e,(function(e){r+=1,e&&e.type&&e.type.isMenuItemGroup?s.Children.forEach(e.props.children,(function(e){t(e,r+=1)})):t(e,r)}))}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],r=e&&"function"==typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(r){if(t){var n=getComputedStyle(e),i=n.marginLeft,o=n.marginRight;r+=+i.replace("px","")+ +o.replace("px","")}r=+r.toFixed(6)}return r||0},re=function(e,t,r){e&&"object"===Object(I.a)(e.style)&&(e.style[t]=r)},ne=r("bdgK"),ie=r("i8i4"),oe=r.n(ie),ae=r("wgJM"),se=r("l4aY"),le=r("m+aA"),ce=r("c+Xe"),ue=r("zT1h"),de=r("QC+M");function fe(e,t,r){return r?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}var he=r("MNnm");function pe(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit".concat(e)]="webkit".concat(t),r["Moz".concat(e)]="moz".concat(t),r["ms".concat(e)]="MS".concat(t),r["O".concat(e)]="o".concat(t.toLowerCase()),r}var me,ge,ve,be=(me=Object(he.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),ye={};if(Object(he.a)()){var xe=document.createElement("div");ye=xe.style}var we={};function Ee(e){if(we[e])return we[e];var t=be[e];if(t)for(var r=Object.keys(t),n=r.length,i=0;i<n;i+=1){var o=r[i];if(Object.prototype.hasOwnProperty.call(t,o)&&o in ye)return we[e]=t[o],we[e]}return""}var Se=Ee("animationend"),_e=Ee("transitionend"),Te=!(!Se||!_e),ke=Se||"animationend",Oe=_e||"transitionend";function Ce(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),r=Object(s.useState)(e),n=Object(i.a)(r,2),o=n[0],a=n[1];return Object(s.useEffect)((function(){return function(){t.current=!0}}),[]),[o,function(e){t.current||a(e)}]}var De=Object(he.a)()?s.useLayoutEffect:s.useEffect,Le=["prepare","start","active","end"];function Ie(e){return"active"===e||"end"===e}var je=function(e,t){var r=s.useState("none"),n=Object(i.a)(r,2),o=n[0],a=n[1],l=function(){var e=s.useRef(null);function t(){ae.a.cancel(e.current)}return s.useEffect((function(){return function(){t()}}),[]),[function r(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var o=Object(ae.a)((function(){i<=1?n({isCanceled:function(){return o!==e.current}}):r(n,i-1)}));e.current=o},t]}(),c=Object(i.a)(l,2),u=c[0],d=c[1];return De((function(){if("none"!==o&&"end"!==o){var e=Le.indexOf(o),r=Le[e+1],n=t(o);!1===n?a(r):u((function(e){function t(){e.isCanceled()||a(r)}!0===n?t():Promise.resolve(n).then(t)}))}}),[e,o]),s.useEffect((function(){return function(){d()}}),[]),[function(){a("prepare")},o]};function Re(e,t,r,o){var l=o.motionEnter,c=void 0===l||l,u=o.motionAppear,d=void 0===u||u,f=o.motionLeave,h=void 0===f||f,p=o.motionDeadline,m=o.motionLeaveImmediately,g=o.onAppearPrepare,v=o.onEnterPrepare,b=o.onLeavePrepare,y=o.onAppearStart,x=o.onEnterStart,w=o.onLeaveStart,E=o.onAppearActive,S=o.onEnterActive,_=o.onLeaveActive,T=o.onAppearEnd,k=o.onEnterEnd,O=o.onLeaveEnd,C=o.onVisibleChanged,A=Ae(),D=Object(i.a)(A,2),L=D[0],I=D[1],j=Ae("none"),R=Object(i.a)(j,2),M=R[0],N=R[1],P=Ae(null),F=Object(i.a)(P,2),B=F[0],U=F[1],H=Object(s.useRef)(!1),z=Object(s.useRef)(null),G=Object(s.useRef)(!1),K=Object(s.useRef)(null);function W(){return r()||K.current}var V=Object(s.useRef)(!1);function q(e){var t,r=W();e&&!e.deadline&&e.target!==r||("appear"===M&&V.current?t=null==T?void 0:T(r,e):"enter"===M&&V.current?t=null==k?void 0:k(r,e):"leave"===M&&V.current&&(t=null==O?void 0:O(r,e)),!1===t||G.current||(N("none"),U(null)))}var X=function(e){var t=Object(s.useRef)(),r=Object(s.useRef)(e);r.current=e;var n=s.useCallback((function(e){r.current(e)}),[]);function i(e){e&&(e.removeEventListener(Oe,n),e.removeEventListener(ke,n))}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(Oe,n),e.addEventListener(ke,n),t.current=e)},i]}(q),Y=Object(i.a)(X,1)[0],$=s.useMemo((function(){var e,t,r;switch(M){case"appear":return e={},Object(n.a)(e,"prepare",g),Object(n.a)(e,"start",y),Object(n.a)(e,"active",E),e;case"enter":return t={},Object(n.a)(t,"prepare",v),Object(n.a)(t,"start",x),Object(n.a)(t,"active",S),t;case"leave":return r={},Object(n.a)(r,"prepare",b),Object(n.a)(r,"start",w),Object(n.a)(r,"active",_),r;default:return{}}}),[M]),J=je(M,(function(e){if("prepare"===e){var t=$.prepare;return!!t&&t(W())}var r;ee in $&&U((null===(r=$[ee])||void 0===r?void 0:r.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);V.current=te,De((function(){I(t);var r,n=H.current;(H.current=!0,e)&&(!n&&t&&d&&(r="appear"),n&&t&&c&&(r="enter"),(n&&!t&&h||!n&&m&&!t&&h)&&(r="leave"),r&&(N(r),Q()))}),[t]),Object(s.useEffect)((function(){("appear"===M&&!d||"enter"===M&&!c||"leave"===M&&!h)&&N("none")}),[d,c,h]),Object(s.useEffect)((function(){return function(){clearTimeout(z.current),G.current=!0}}),[]),Object(s.useEffect)((function(){void 0!==L&&"none"===M&&(null==C||C(L))}),[L,M]);var re=B;return $.prepare&&"start"===ee&&(re=Object(a.a)({transition:"none"},re)),[M,ee,re,null!=L?L:t]}var Me=function(e){Object(T.a)(r,e);var t=Object(k.a)(r);function r(){return Object(E.a)(this,r),t.apply(this,arguments)}return Object(S.a)(r,[{key:"render",value:function(){return this.props.children}}]),r}(s.Component);var Ne=function(e){var t=e;function r(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,d=void 0===u||u,f=e.forceRender,h=e.children,p=e.motionName,m=e.leavedClassName,g=e.eventProps,v=r(e),b=Object(s.useRef)(),y=Object(s.useRef)();var x=Re(v,l,(function(){try{return Object(le.a)(b.current||y.current)}catch(e){return null}}),e),w=Object(i.a)(x,4),E=w[0],S=w[1],_=w[2],T=w[3],k=s.useRef(T);T&&(k.current=!0);var O=Object(s.useRef)(t);O.current=t;var C,A=s.useCallback((function(e){b.current=e,Object(ce.b)(O.current,e)}),[]),D=Object(a.a)(Object(a.a)({},g),{},{visible:l});if(h)if("none"!==E&&r(e)){var L,I;"prepare"===S?I="prepare":Ie(S)?I="active":"start"===S&&(I="start"),C=h(Object(a.a)(Object(a.a)({},D),{},{className:c()(Ce(p,E),(L={},Object(n.a)(L,Ce(p,"".concat(E,"-").concat(I)),I),Object(n.a)(L,p,"string"==typeof p),L)),style:_}),A)}else C=T?h(Object(a.a)({},D),A):!d&&k.current?h(Object(a.a)(Object(a.a)({},D),{},{className:m}),A):f?h(Object(a.a)(Object(a.a)({},D),{},{style:{display:"none"}}),A):null;else C=null;return s.createElement(Me,{ref:y},C)}));return o.displayName="CSSMotion",o}(Te);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 Fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(Pe)}function Be(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[],n=0,i=t.length,o=Fe(e),s=Fe(t);o.forEach((function(e){for(var t=!1,o=n;o<i;o+=1){var l=s[o];if(l.key===e.key){n<o&&(r=r.concat(s.slice(n,o).map((function(e){return Object(a.a)(Object(a.a)({},e),{},{status:"add"})}))),n=o),r.push(Object(a.a)(Object(a.a)({},l),{},{status:"keep"})),n+=1,t=!0;break}}t||r.push(Object(a.a)(Object(a.a)({},e),{},{status:"remove"}))})),n<i&&(r=r.concat(s.slice(n).map((function(e){return Object(a.a)(Object(a.a)({},e),{},{status:"add"})}))));var l={};r.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){(r=r.filter((function(t){var r=t.key,n=t.status;return r!==e||"remove"!==n}))).forEach((function(t){t.key===e&&(t.status="keep")}))})),r}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]:Ne,r=function(e){Object(T.a)(n,e);var r=Object(k.a)(n);function n(){var e;return Object(E.a)(this,n),(e=r.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)(n,[{key:"render",value:function(){var e=this,r=this.state.keyEntities,n=this.props,i=n.component,a=n.children,l=n.onVisibleChanged,c=Object(o.a)(n,["component","children","onVisibleChanged"]),u=i||s.Fragment,d={};return Ue.forEach((function(e){d[e]=c[e],delete c[e]})),delete c.keys,s.createElement(u,c,r.map((function(r){var n=r.status,i=Object(o.a)(r,["status"]),c="add"===n||"keep"===n;return s.createElement(t,Object(w.a)({},d,{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 r=e.keys,n=t.keyEntities,i=Fe(r);return{keyEntities:Be(n,i).filter((function(e){var t=n.find((function(t){var r=t.key;return e.key===r}));return!t||"removed"!==t.status||"remove"!==e.status}))}}}]),n}(s.Component);r.defaultProps={component:"div"}}(Te);var He=Ne;function ze(e){var t=e.prefixCls,r=e.motion,n=e.animation,i=e.transitionName;return r||(n?{motionName:"".concat(t,"-").concat(n)}:i?{motionName:i}:null)}function Ge(e){var t=e.prefixCls,r=e.visible,n=e.zIndex,i=e.mask,o=e.maskMotion,l=e.maskAnimation,u=e.maskTransitionName;if(!i)return null;var d={};return(o||u||l)&&(d=Object(a.a)({motionAppear:!0},ze({motion:o,prefixCls:t,transitionName:u,animation:l}))),s.createElement(He,Object(w.a)({},d,{visible:r,removeOnLeave:!0}),(function(e){var r=e.className;return s.createElement("div",{style:{zIndex:n},className:c()("".concat(t,"-mask"),r)})}))}var Ke=r("9mu1"),We=r("o0o1"),Ve=r.n(We),qe=r("HaE+"),Xe=["measure","align",null,"motion"],Ye=s.forwardRef((function(e,t){var r=e.visible,n=e.prefixCls,o=e.className,l=e.style,u=e.children,d=e.zIndex,f=e.stretch,h=e.destroyPopupOnHide,p=e.forceRender,m=e.align,g=e.point,v=e.getRootDomNode,b=e.getClassNameFromAlign,y=e.onAlign,x=e.onMouseEnter,E=e.onMouseLeave,S=e.onMouseDown,_=e.onTouchStart,T=Object(s.useRef)(),k=Object(s.useRef)(),O=Object(s.useState)(),C=Object(i.a)(O,2),A=C[0],D=C[1],L=function(e){var t=s.useState({width:0,height:0}),r=Object(i.a)(t,2),n=r[0],o=r[1];return[s.useMemo((function(){var t={};if(e){var r=n.width,i=n.height;-1!==e.indexOf("height")&&i?t.height=i:-1!==e.indexOf("minHeight")&&i&&(t.minHeight=i),-1!==e.indexOf("width")&&r?t.width=r:-1!==e.indexOf("minWidth")&&r&&(t.minWidth=r)}return t}),[e,n]),function(e){o({width:e.offsetWidth,height:e.offsetHeight})}]}(f),I=Object(i.a)(L,2),j=I[0],R=I[1];var M=function(e,t){var r=Object(s.useState)(null),n=Object(i.a)(r,2),o=n[0],a=n[1],l=Object(s.useRef)(),c=Object(s.useRef)(!1);function u(e){c.current||a(e)}function d(){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)(Ve.a.mark((function e(){var t,r;return Ve.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Xe.indexOf(o),(r=Xe[t+1])&&-1!==t&&u(r);case 3:case"end":return e.stop()}}),e)})))))}),[o]),Object(s.useEffect)((function(){return function(){c.current=!0,d()}}),[]),[o,function(e){d(),l.current=Object(ae.a)((function(){u((function(e){switch(o){case"align":return"motion";case"motion":return"stable"}return e})),null==e||e()}))}]}(r,(function(){f&&R(v())})),N=Object(i.a)(M,2),P=N[0],F=N[1],B=Object(s.useRef)();function U(){var e;null===(e=T.current)||void 0===e||e.forceAlign()}function H(e,t){var r=b(t);A!==r&&D(r),"align"===P&&(A!==r?Promise.resolve().then((function(){U()})):F((function(){var e;null===(e=B.current)||void 0===e||e.call(B)})),null==y||y(e,t))}var z=Object(a.a)({},ze(e));function G(){return new Promise((function(e){B.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=z[e];z[e]=function(e,r){return F(),null==t?void 0:t(e,r)}})),s.useEffect((function(){z.motionName||"motion"!==P||F()}),[z.motionName,P]),s.useImperativeHandle(t,(function(){return{forceAlign:U,getElement:function(){return k.current}}}));var K=Object(a.a)(Object(a.a)({},j),{},{zIndex:d,opacity:"motion"!==P&&"stable"!==P&&r?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 V=u;return s.Children.count(u)>1&&(V=s.createElement("div",{className:"".concat(n,"-content")},u)),s.createElement(He,Object(w.a)({visible:r,ref:k,leavedClassName:"".concat(n,"-hidden")},z,{onAppearPrepare:G,onEnterPrepare:G,removeOnLeave:h,forceRender:p}),(function(e,t){var r=e.className,i=e.style,l=c()(n,o,A,r);return s.createElement(Ke.a,{target:g||v,key:"popup",ref:T,monitorWindowResize:!0,disabled:W,align:m,onAlign:H},s.createElement("div",{ref:t,className:l,onMouseEnter:x,onMouseLeave:E,onMouseDownCapture:S,onTouchStartCapture:_,style:Object(a.a)(Object(a.a)({},i),K)},V))}))}));Ye.displayName="PopupInner";var $e=Ye,Je=s.forwardRef((function(e,t){var r=e.prefixCls,n=e.visible,i=e.zIndex,o=e.children,l=e.mobile,u=(l=void 0===l?{}:l).popupClassName,d=l.popupStyle,f=l.popupMotion,h=void 0===f?{}:f,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},d),v=o;return s.Children.count(o)>1&&(v=s.createElement("div",{className:"".concat(r,"-content")},o)),p&&(v=p(v)),s.createElement(He,Object(w.a)({visible:n,ref:m,removeOnLeave:!0},h),(function(e,t){var n=e.className,i=e.style,o=c()(r,u,n);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 r=e.visible,n=e.mobile,l=Object(o.a)(e,Qe),c=Object(s.useState)(r),u=Object(i.a)(c,2),d=u[0],f=u[1],h=Object(s.useState)(!1),p=Object(i.a)(h,2),m=p[0],g=p[1],v=Object(a.a)(Object(a.a)({},l),{},{visible:d});Object(s.useEffect)((function(){f(r),r&&n&&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)))}())}),[r,n]);var b=m?s.createElement(Ze,Object(w.a)({},v,{mobile:n,ref:t})):s.createElement($e,Object(w.a)({},v,{ref:t}));return s.createElement("div",null,s.createElement(Ge,v),b)}));et.displayName="Popup";var tt=et,rt=s.createContext(null);function nt(){}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=de.a,(lt=function(e){Object(T.a)(r,e);var t=Object(k.a)(r);function r(e){var n,i;return Object(E.a)(this,r),(n=t.call(this,e)).popupRef=s.createRef(),n.triggerRef=s.createRef(),n.attachId=void 0,n.clickOutsideHandler=void 0,n.touchOutsideHandler=void 0,n.contextMenuOutsideHandler1=void 0,n.contextMenuOutsideHandler2=void 0,n.mouseDownTimeout=void 0,n.focusTime=void 0,n.preClickTime=void 0,n.preTouchTime=void 0,n.delayTimer=void 0,n.hasPopupMouseDown=void 0,n.onMouseEnter=function(e){var t=n.props.mouseEnterDelay;n.fireEvents("onMouseEnter",e),n.delaySetPopupVisible(!0,t,t?null:e)},n.onMouseMove=function(e){n.fireEvents("onMouseMove",e),n.setPoint(e)},n.onMouseLeave=function(e){n.fireEvents("onMouseLeave",e),n.delaySetPopupVisible(!1,n.props.mouseLeaveDelay)},n.onPopupMouseEnter=function(){n.clearDelayTimer()},n.onPopupMouseLeave=function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&Object(se.a)(null===(t=n.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||n.delaySetPopupVisible(!1,n.props.mouseLeaveDelay)},n.onFocus=function(e){n.fireEvents("onFocus",e),n.clearDelayTimer(),n.isFocusToShow()&&(n.focusTime=Date.now(),n.delaySetPopupVisible(!0,n.props.focusDelay))},n.onMouseDown=function(e){n.fireEvents("onMouseDown",e),n.preClickTime=Date.now()},n.onTouchStart=function(e){n.fireEvents("onTouchStart",e),n.preTouchTime=Date.now()},n.onBlur=function(e){n.fireEvents("onBlur",e),n.clearDelayTimer(),n.isBlurToHide()&&n.delaySetPopupVisible(!1,n.props.blurDelay)},n.onContextMenu=function(e){e.preventDefault(),n.fireEvents("onContextMenu",e),n.setPopupVisible(!0,e)},n.onContextMenuClose=function(){n.isContextMenuToShow()&&n.close()},n.onClick=function(e){if(n.fireEvents("onClick",e),n.focusTime){var t;if(n.preClickTime&&n.preTouchTime?t=Math.min(n.preClickTime,n.preTouchTime):n.preClickTime?t=n.preClickTime:n.preTouchTime&&(t=n.preTouchTime),Math.abs(t-n.focusTime)<20)return;n.focusTime=0}n.preClickTime=0,n.preTouchTime=0,n.isClickToShow()&&(n.isClickToHide()||n.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var r=!n.state.popupVisible;(n.isClickToHide()&&!r||r&&n.isClickToShow())&&n.setPopupVisible(!n.state.popupVisible,e)},n.onPopupMouseDown=function(){var e;n.hasPopupMouseDown=!0,clearTimeout(n.mouseDownTimeout),n.mouseDownTimeout=window.setTimeout((function(){n.hasPopupMouseDown=!1}),0),n.context&&(e=n.context).onPopupMouseDown.apply(e,arguments)},n.onDocumentClick=function(e){if(!n.props.mask||n.props.maskClosable){var t=e.target,r=n.getRootDomNode(),i=n.getPopupDomNode();Object(se.a)(r,t)&&!n.isContextMenuOnly()||Object(se.a)(i,t)||n.hasPopupMouseDown||n.close()}},n.getRootDomNode=function(){var e=n.props.getTriggerDOMNode;if(e)return e(n.triggerRef.current);try{var t=Object(le.a)(n.triggerRef.current);if(t)return t}catch(e){}return oe.a.findDOMNode(Object(_.a)(n))},n.getPopupClassNameFromAlign=function(e){var t=[],r=n.props,i=r.popupPlacement,o=r.builtinPlacements,a=r.prefixCls,s=r.alignPoint,l=r.getPopupClassNameFromAlign;return i&&o&&t.push(function(e,t,r,n){for(var i=r.points,o=Object.keys(e),a=0;a<o.length;a+=1){var s=o[a];if(fe(e[s].points,i,n))return"".concat(t,"-placement-").concat(s)}return""}(o,a,e,s)),l&&t.push(l(e)),t.join(" ")},n.getComponent=function(){var e=n.props,t=e.prefixCls,r=e.destroyPopupOnHide,i=e.popupClassName,o=e.onPopupAlign,a=e.popupMotion,l=e.popupAnimation,c=e.popupTransitionName,u=e.popupStyle,d=e.mask,f=e.maskAnimation,h=e.maskTransitionName,p=e.maskMotion,m=e.zIndex,g=e.popup,v=e.stretch,b=e.alignPoint,y=e.mobile,x=e.forceRender,E=n.state,S=E.popupVisible,_=E.point,T=n.getPopupAlign(),k={};return n.isMouseEnterToShow()&&(k.onMouseEnter=n.onPopupMouseEnter),n.isMouseLeaveToHide()&&(k.onMouseLeave=n.onPopupMouseLeave),k.onMouseDown=n.onPopupMouseDown,k.onTouchStart=n.onPopupMouseDown,s.createElement(tt,Object(w.a)({prefixCls:t,destroyPopupOnHide:r,visible:S,point:b&&_,className:i,align:T,onAlign:o,animation:l,getClassNameFromAlign:n.getPopupClassNameFromAlign},k,{stretch:v,getRootDomNode:n.getRootDomNode,style:u,mask:d,zIndex:m,transitionName:c,maskAnimation:f,maskTransitionName:h,maskMotion:p,ref:n.popupRef,motion:a,mobile:y,forceRender:x}),"function"==typeof g?g():g)},n.attachParent=function(e){ae.a.cancel(n.attachId);var t,r=n.props,i=r.getPopupContainer,o=r.getDocument,a=n.getRootDomNode();i?(a||0===i.length)&&(t=i(a)):t=o(n.getRootDomNode()).body,t?t.appendChild(e):n.attachId=Object(ae.a)((function(){n.attachParent(e)}))},n.getContainer=function(){var e=(0,n.props.getDocument)(n.getRootDomNode()).createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",n.attachParent(e),e},n.setPoint=function(e){n.props.alignPoint&&e&&n.setState({point:{pageX:e.pageX,pageY:e.pageY}})},n.handlePortalUpdate=function(){n.state.prevPopupVisible!==n.state.popupVisible&&n.props.afterPopupVisibleChange(n.state.popupVisible)},n.triggerContextValue={onPopupMouseDown:n.onPopupMouseDown},i="popupVisible"in e?!!e.popupVisible:!!e.defaultPopupVisible,n.state={prevPopupVisible:i,popupVisible:i},at.forEach((function(e){n["fire".concat(e)]=function(t){n.fireEvents(e,t)}})),n}return Object(S.a)(r,[{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,r=e.popupAlign,n=e.builtinPlacements;return t&&n?function(e,t,r){var n=e[t]||{};return Object(a.a)(Object(a.a)({},n),r)}(n,t,r):r}},{key:"setPopupVisible",value:function(e,t){var r=this.props.alignPoint,n=this.state.popupVisible;this.clearDelayTimer(),n!==e&&("popupVisible"in this.props||this.setState({popupVisible:e,prevPopupVisible:n}),this.props.onPopupVisibleChange(e)),r&&t&&e&&this.setPoint(t)}},{key:"delaySetPopupVisible",value:function(e,t,r){var n=this,i=1e3*t;if(this.clearDelayTimer(),i){var o=r?{pageX:r.pageX,pageY:r.pageY}:null;this.delayTimer=window.setTimeout((function(){n.setPopupVisible(e,o),n.clearDelayTimer()}),i)}else this.setPopupVisible(e,r)}},{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,r=this.props;return t[e]&&r[e]?this["fire".concat(e)]:t[e]||r[e]}},{key:"isClickToShow",value:function(){var e=this.props,t=e.action,r=e.showAction;return-1!==t.indexOf("click")||-1!==r.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,r=e.showAction;return-1!==t.indexOf("contextMenu")||-1!==r.indexOf("contextMenu")}},{key:"isClickToHide",value:function(){var e=this.props,t=e.action,r=e.hideAction;return-1!==t.indexOf("click")||-1!==r.indexOf("click")}},{key:"isMouseEnterToShow",value:function(){var e=this.props,t=e.action,r=e.showAction;return-1!==t.indexOf("hover")||-1!==r.indexOf("mouseEnter")}},{key:"isMouseLeaveToHide",value:function(){var e=this.props,t=e.action,r=e.hideAction;return-1!==t.indexOf("hover")||-1!==r.indexOf("mouseLeave")}},{key:"isFocusToShow",value:function(){var e=this.props,t=e.action,r=e.showAction;return-1!==t.indexOf("focus")||-1!==r.indexOf("focus")}},{key:"isBlurToHide",value:function(){var e=this.props,t=e.action,r=e.hideAction;return-1!==t.indexOf("focus")||-1!==r.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 r=this.props.children.props[e];r&&r(t);var n=this.props[e];n&&n(t)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var e=this.state.popupVisible,t=this.props,r=t.children,n=t.forceRender,i=t.alignPoint,o=t.className,l=t.autoDestroy,u=s.Children.only(r),d={key:"trigger"};this.isContextMenuToShow()?d.onContextMenu=this.onContextMenu:d.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(d.onClick=this.onClick,d.onMouseDown=this.onMouseDown,d.onTouchStart=this.onTouchStart):(d.onClick=this.createTwoChains("onClick"),d.onMouseDown=this.createTwoChains("onMouseDown"),d.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(d.onMouseEnter=this.onMouseEnter,i&&(d.onMouseMove=this.onMouseMove)):d.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?d.onMouseLeave=this.onMouseLeave:d.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(d.onFocus=this.onFocus,d.onBlur=this.onBlur):(d.onFocus=this.createTwoChains("onFocus"),d.onBlur=this.createTwoChains("onBlur"));var f=c()(u&&u.props&&u.props.className,o);f&&(d.className=f);var h=Object(a.a)({},d);Object(ce.c)(u)&&(h.ref=Object(ce.a)(this.triggerRef,u.ref));var p,m=s.cloneElement(u,h);return(e||this.popupRef.current||n)&&(p=s.createElement(st,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!e&&l&&(p=null),s.createElement(rt.Provider,{value:this.triggerContextValue},m,p)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=e.popupVisible,n={};return void 0!==r&&t.popupVisible!==r&&(n.popupVisible=r,n.prevPopupVisible=t.popupVisible),n}}]),r}(s.Component)).contextType=rt,lt.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:it,getDocument:ot,onPopupVisibleChange:nt,afterPopupVisibleChange:nt,onPopupAlign:nt,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},dt={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]}},ft={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]}},ht=0,pt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},mt=function(e,t,r){var i=Z(t),o=e.getState();e.setState({defaultActiveFirst:Object(a.a)(Object(a.a)({},o.defaultActiveFirst),{},Object(n.a)({},i,r))})},gt=function(e){Object(T.a)(r,e);var t=Object(k.a)(r);function r(e){var n;Object(E.a)(this,r),(n=t.call(this,e)).onDestroy=function(e){n.props.onDestroy(e)},n.onKeyDown=function(e){var t=e.keyCode,r=n.menuInstance,i=n.props.store,o=n.getVisible();if(t===v.a.ENTER)return n.onTitleClick(e),mt(i,n.props.eventKey,!0),!0;if(t===v.a.RIGHT)return o?r.onKeyDown(e):(n.triggerOpenChange(!0),mt(i,n.props.eventKey,!0)),!0;if(t===v.a.LEFT){var a;if(!o)return;return(a=r.onKeyDown(e))||(n.triggerOpenChange(!1),a=!0),a}return!o||t!==v.a.UP&&t!==v.a.DOWN?void 0:r.onKeyDown(e)},n.onOpenChange=function(e){n.props.onOpenChange(e)},n.onPopupVisibleChange=function(e){n.triggerOpenChange(e,e?"mouseenter":"mouseleave")},n.onMouseEnter=function(e){var t=n.props,r=t.eventKey,i=t.onMouseEnter,o=t.store;mt(o,n.props.eventKey,!1),i({key:r,domEvent:e})},n.onMouseLeave=function(e){var t=n.props,r=t.parentMenu,i=t.eventKey,o=t.onMouseLeave;r.subMenuInstance=Object(_.a)(n),o({key:i,domEvent:e})},n.onTitleMouseEnter=function(e){var t=n.props,r=t.eventKey,i=t.onItemHover,o=t.onTitleMouseEnter;i({key:r,hover:!0}),o({key:r,domEvent:e})},n.onTitleMouseLeave=function(e){var t=n.props,r=t.parentMenu,i=t.eventKey,o=t.onItemHover,a=t.onTitleMouseLeave;r.subMenuInstance=Object(_.a)(n),o({key:i,hover:!1}),a({key:i,domEvent:e})},n.onTitleClick=function(e){var t=Object(_.a)(n).props;t.onTitleClick({key:t.eventKey,domEvent:e}),"hover"!==t.triggerSubMenuAction&&(n.triggerOpenChange(!n.getVisible(),"click"),mt(t.store,n.props.eventKey,!1))},n.onSubMenuClick=function(e){"function"==typeof n.props.onClick&&n.props.onClick(n.addKeyPath(e))},n.onSelect=function(e){n.props.onSelect(e)},n.onDeselect=function(e){n.props.onDeselect(e)},n.getPrefixCls=function(){return"".concat(n.props.rootPrefixCls,"-submenu")},n.getActiveClassName=function(){return"".concat(n.getPrefixCls(),"-active")},n.getDisabledClassName=function(){return"".concat(n.getPrefixCls(),"-disabled")},n.getSelectedClassName=function(){return"".concat(n.getPrefixCls(),"-selected")},n.getOpenClassName=function(){return"".concat(n.props.rootPrefixCls,"-submenu-open")},n.getVisible=function(){return n.state.isOpen},n.getMode=function(){return n.state.mode},n.saveMenuInstance=function(e){n.menuInstance=e},n.addKeyPath=function(e){return Object(a.a)(Object(a.a)({},e),{},{keyPath:(e.keyPath||[]).concat(n.props.eventKey)})},n.triggerOpenChange=function(e,t){var r=n.props.eventKey,i=function(){n.onOpenChange({key:r,item:Object(_.a)(n),trigger:t,open:e})};"mouseenter"===t?n.mouseenterTimeout=setTimeout((function(){i()}),0):i()},n.isChildrenSelected=function(){var e={find:!1};return function e(t,r,n){t&&!n.find&&s.Children.forEach(t,(function(t){if(t){var i=t.type;if(!i||!(i.isSubMenu||i.isMenuItem||i.isMenuItemGroup))return;-1!==r.indexOf(t.key)?n.find=!0:t.props.children&&e(t.props.children,r,n)}}))}(n.props.children,n.props.selectedKeys,e),e.find},n.isInlineMode=function(){return"inline"===n.getMode()},n.adjustWidth=function(){if(n.subMenuTitle&&n.menuInstance){var e=ie.findDOMNode(n.menuInstance);e.offsetWidth>=n.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(n.subMenuTitle.offsetWidth,"px"))}},n.saveSubMenuTitle=function(e){n.subMenuTitle=e},n.getBaseProps=function(){var e=Object(_.a)(n).props,t=n.getMode();return{mode:"horizontal"===t?"vertical":t,visible:n.getVisible(),level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:n.onSubMenuClick,onSelect:n.onSelect,onDeselect:n.onDeselect,onDestroy:n.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:n.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(_.a)(n),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:n.internalMenuId,manualRef:n.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},n.getMotion=function(e,t){var r=Object(_.a)(n).haveRendered,i=n.props,o=i.motion,s=i.rootPrefixCls;return Object(a.a)(Object(a.a)({},o),{},{leavedClassName:"".concat(s,"-hidden"),removeOnLeave:!1,motionAppear:r||!t||"inline"!==e})};var i=e.store,o=e.eventKey,l=i.getState().defaultActiveFirst;n.isRootMenu=!1;var c=!1;return l&&(c=l[o]),mt(i,o,c),n.state={mode:e.mode,isOpen:e.isOpen},n}return Object(S.a)(r,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,r=t.mode,n=t.parentMenu,i=t.manualRef,o=t.isOpen,a=function(){e.setState({mode:r,isOpen:o})},s=o!==this.state.isOpen,l=r!==this.state.mode;(l||s)&&(ae.a.cancel(this.updateStateRaf),l?this.updateStateRaf=Object(ae.a)(a):a()),i&&i(this),"horizontal"===r&&(null==n?void 0:n.isRootMenu)&&o&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,r=e.eventKey;t&&t(r),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),ae.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(e,t){var r=this.getBaseProps();return s.createElement(kt,Object(w.a)({},r,{id:this.internalMenuId,className:e,style:t}),this.props.children)}},{key:"renderChildren",value:function(){var e=this,t=this.getBaseProps(),r=t.mode,i=t.visible,o=t.forceSubMenuRender,a=t.direction,l=this.getMotion(r,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(n.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 r=t.className,n=t.style,i=c()(u,r);return e.renderPopupMenu(i,n)})):this.renderPopupMenu(u)}},{key:"render",value:function(){var e,t,r,i=Object(a.a)({},this.props),o=this.getVisible(),l=this.getPrefixCls(),u=this.isInlineMode(),d=this.getMode(),f=c()(l,"".concat(l,"-").concat(d),(e={},Object(n.a)(e,i.className,!!i.className),Object(n.a)(e,this.getOpenClassName(),o),Object(n.a)(e,this.getActiveClassName(),i.active||o&&!u),Object(n.a)(e,this.getDisabledClassName(),i.disabled),Object(n.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(i.eventKey?this.internalMenuId="".concat(i.eventKey,"$Menu"):(ht+=1,this.internalMenuId="$__$".concat(ht,"$Menu")));var h={},p={},m={};i.disabled||(h={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 b={};this.getVisible()&&(b={"aria-owns":this.internalMenuId});var y=null;"horizontal"!==d&&(y=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(y=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},b,{"aria-haspopup":"true",title:"string"==typeof i.title?i.title:void 0}),i.title,y||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},_=pt[d],T=i.popupOffset?{offset:i.popupOffset}:{},k=c()((r={},Object(n.a)(r,i.popupClassName,i.popupClassName&&!u),Object(n.a)(r,"".concat(l,"-rtl"),v),r)),O=i.disabled,C=i.triggerSubMenuAction,A=i.subMenuOpenDelay,D=i.forceSubMenuRender,L=i.subMenuCloseDelay,I=i.builtinPlacements;ee.forEach((function(e){return delete i[e]})),delete i.onClick;var j=v?Object(a.a)(Object(a.a)({},ft),I):Object(a.a)(Object(a.a)({},dt),I);delete i.direction;var R=this.getBaseProps(),M=u?null:this.getMotion(R.mode,R.visible);return s.createElement("li",Object(w.a)({},i,h,{className:f,role:"menuitem"}),s.createElement(ct,{prefixCls:l,popupClassName:c()("".concat(l,"-popup"),k),getPopupContainer:S,builtinPlacements:j,popupPlacement:_,popupVisible:!u&&o,popupAlign:T,popup:u?null:E,action:O||u?[]:[C],mouseEnterDelay:A,mouseLeaveDelay:L,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:D,popupMotion:M},x),u?E:null)}}]),r}(s.Component);gt.defaultProps={onMouseEnter:$,onMouseLeave:$,onTitleMouseEnter:$,onTitleMouseLeave:$,onTitleClick:$,manualRef:$,mode:"vertical",title:""};var vt=Object(O.b)((function(e,t){var r=e.openKeys,n=e.activeKey,i=e.selectedKeys,o=t.eventKey,a=t.subMenuKey;return{isOpen:r.indexOf(o)>-1,active:n[a]===o,selectedKeys:i}}))(gt);vt.isSubMenu=!0;var bt=vt,yt=function(e){Object(T.a)(r,e);var t=Object(k.a)(r);function r(){var e;return Object(E.a)(this,r),(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,r=e.childRef.current;return r?[].slice.call(r.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,r,n){var i=e.props,l=i.overflowedIndicator,c=i.level,u=i.mode,d=i.prefixCls,f=i.theme;if(1!==c||"horizontal"!==u)return null;var h=e.props.children[0].props,p=(h.children,h.title,h.style),m=Object(o.a)(h,["children","title","style"]),g=Object(a.a)({},p),v="".concat(t,"-overflowed-indicator"),b="".concat(t,"-overflowed-indicator");0===r.length&&!0!==n?g=Object(a.a)(Object(a.a)({},g),{},{display:"none"}):n&&(g=Object(a.a)(Object(a.a)({},g),{},{visibility:"hidden",position:"absolute"}),v="".concat(v,"-placeholder"),b="".concat(b,"-placeholder"));var y=f?"".concat(d,"-").concat(f):"",x={};return ee.forEach((function(e){void 0!==m[e]&&(x[e]=m[e])})),s.createElement(bt,Object(w.a)({title:l,className:"".concat(d,"-overflowed-submenu"),popupClassName:y},x,{key:v,eventKey:b,disabled:!1,style:g}),r)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var r=t.children;if(r&&0!==r.length){var n=t.children[r.length-1];re(n,"display","inline-block");var i=e.getMenuItemNodes(),o=i.filter((function(e){return e.className.split(" ").indexOf("menuitem-overflowed")>=0}));o.forEach((function(e){re(e,"display","inline-block")})),e.menuItemSizes=i.map((function(e){return te(e,!0)})),o.forEach((function(e){re(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(),re(n,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var r=te(t);e.overflowedItems=[];var n,i=0;e.originalTotalWidth>r+.5&&(n=-1,e.menuItemSizes.forEach((function(t){(i+=t)+e.overflowedIndicatorWidth<=r&&(n+=1)}))),e.setState({lastVisibleIndex:n})}}},e}return Object(S.a)(r,[{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 ne.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,r=this.state.lastVisibleIndex;return(e||[]).reduce((function(n,i,o){var a=i;if("horizontal"===t.props.mode){var l=t.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==r&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(o>r&&(a=s.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),o===r+1&&(t.overflowedItems=e.slice(r+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(f.a)(n),[l,a]);return o===e.length-1&&c.push(t.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),c}return[].concat(Object(f.a)(n),[a])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),r=e.children,n=(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},n),this.renderChildren(r))}}]),r}(s.Component);yt.defaultProps={tag:"div",className:""};var xt=yt;function wt(e,t,r){var i=e.getState();e.setState({activeKey:Object(a.a)(Object(a.a)({},i.activeKey),{},Object(n.a)({},t,r))})}function Et(e){return e.eventKey||"0-menu-"}function St(e,t){var r,n=t,i=e.children,o=e.eventKey;if(n&&(Q(i,(function(e,t){e&&e.props&&!e.props.disabled&&n===J(e,o,t)&&(r=!0)})),r))return n;return n=null,e.defaultActiveFirst?(Q(i,(function(e,t){n||!e||e.props.disabled||(n=J(e,o,t))})),n):n}function _t(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var Tt=function(e){Object(T.a)(r,e);var t=Object(k.a)(r);function r(e){var i;return Object(E.a)(this,r),(i=t.call(this,e)).onKeyDown=function(e,t){var r,n=e.keyCode;if(i.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(r=t.onKeyDown(e))})),r)return 1;var o=null;return n!==v.a.UP&&n!==v.a.DOWN||(o=i.step(n===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,r=e.hover;wt(i.props.store,Et(i.props),r?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(),r=i.props.store.getState().activeKey[Et(i.props)],n=t.length;if(!n)return null;e<0&&(t=t.concat().reverse());var o=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==r||(o=t,!1)})),i.props.defaultActiveFirst||-1===o||(a=t.slice(o,n-1)).length&&!a.every((function(e){return!!e.props.disabled}))){var a,s=(o+1)%n,l=s;do{var c=t[l];if(c&&!c.props.disabled)return c;l=(l+1)%n}while(l!==s);return null}},i.renderCommonMenuItem=function(e,t,r){var n=i.props.store.getState(),o=Object(_.a)(i).props,l=J(e,o.eventKey,t),c=e.props;if(!c||"string"==typeof e.type)return e;var u=l===n.activeKey,d=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,_t.bind(Object(_.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},r),{},{direction:o.direction});return("inline"===o.mode||Y.any)&&(d.triggerSubMenuAction="click"),s.cloneElement(e,Object(a.a)(Object(a.a)({},d),{},{key:l||t}))},i.renderMenuItem=function(e,t,r){if(!e)return null;var n=i.props.store.getState(),o={openKeys:n.openKeys,selectedKeys:n.selectedKeys,triggerSubMenuAction:i.props.triggerSubMenuAction,subMenuKey:r};return i.renderCommonMenuItem(e,t,o)},e.store.setState({activeKey:Object(a.a)(Object(a.a)({},e.store.getState().activeKey),{},Object(n.a)({},e.eventKey,St(e,e.activeKey)))}),i.instanceArray=[],i}return Object(S.a)(r,[{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||!L()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,r="activeKey"in t?t.activeKey:t.store.getState().activeKey[Et(t)],n=St(t,r);if(n!==r)wt(t.store,Et(t),n);else if("activeKey"in e){n!==St(e,e.activeKey)&&wt(t.store,Et(t),n)}}},{key:"render",value:function(){var e=this,t=Object(w.a)({},this.props);this.instanceArray=[];var r={className:c()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(r.id=t.id),t.focusable&&(r.tabIndex=0,r.onKeyDown=this.onKeyDown);var n=t.prefixCls,i=t.eventKey,o=t.visible,a=t.level,l=t.mode,d=t.overflowedIndicator,f=t.theme;return ee.forEach((function(e){return delete t[e]})),delete t.onClick,s.createElement(xt,Object(w.a)({},t,{prefixCls:n,mode:l,tag:"ul",level:a,theme:f,visible:o,overflowedIndicator:d},r),Object(u.a)(t.children).map((function(t,r){return e.renderMenuItem(t,r,i||"0-menu-")})))}}]),r}(s.Component);Tt.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:$};var kt=Object(O.b)()(Tt),Ot=r("Kwbf");function Ct(e,t,r){var n=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(Ot.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof s)return{motionName:"".concat(n,"-open-").concat(s)};if(l)return{motionName:l};var u=a[r];return u||(c?null:a.other)}var At=function(e){Object(T.a)(r,e);var t=Object(k.a)(r);function r(e){var n;Object(E.a)(this,r),(n=t.call(this,e)).onSelect=function(e){var t=Object(_.a)(n).props;if(t.selectable){var r=n.store.getState().selectedKeys,i=e.key;r=t.multiple?r.concat([i]):[i],"selectedKeys"in t||n.store.setState({selectedKeys:r}),t.onSelect(Object(a.a)(Object(a.a)({},e),{},{selectedKeys:r}))}},n.onClick=function(e){var t=n.getRealMenuMode(),r=Object(_.a)(n),i=r.store,o=r.props.onOpenChange;"inline"===t||"openKeys"in n.props||(i.setState({openKeys:[]}),o([])),n.props.onClick(e)},n.onKeyDown=function(e,t){n.innerMenu.getWrappedInstance().onKeyDown(e,t)},n.onOpenChange=function(e){var t=Object(_.a)(n).props,r=n.store.getState().openKeys.concat(),i=!1,o=function(e){var t=!1;if(e.open)(t=-1===r.indexOf(e.key))&&r.push(e.key);else{var n=r.indexOf(e.key);(t=-1!==n)&&r.splice(n,1)}i=i||t};Array.isArray(e)?e.forEach(o):o(e),i&&("openKeys"in n.props||n.store.setState({openKeys:r}),t.onOpenChange(r))},n.onDeselect=function(e){var t=Object(_.a)(n).props;if(t.selectable){var r=n.store.getState().selectedKeys.concat(),i=e.key,o=r.indexOf(i);-1!==o&&r.splice(o,1),"selectedKeys"in t||n.store.setState({selectedKeys:r}),t.onDeselect(Object(a.a)(Object(a.a)({},e),{},{selectedKeys:r}))}},n.onMouseEnter=function(e){n.restoreModeVerticalFromInline();var t=n.props.onMouseEnter;t&&t(e)},n.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,r=e.target.className,i="[object SVGAnimatedString]"===Object.prototype.toString.call(r)?r.animVal:r,o="font-size"===e.propertyName&&i.indexOf("anticon")>=0;(t||o)&&n.restoreModeVerticalFromInline()},n.setInnerMenu=function(e){n.innerMenu=e},n.isRootMenu=!0;var i=e.defaultSelectedKeys,o=e.defaultOpenKeys;return"selectedKeys"in e&&(i=e.selectedKeys||[]),"openKeys"in e&&(o=e.openKeys||[]),n.store=Object(O.c)({selectedKeys:i,openKeys:o,activeKey:{"0-menu-":St(e,e.activeKey)}}),n.state={switchingModeFromInline:!1,prevProps:e,inlineOpenKeys:[],store:n.store},n}return Object(S.a)(r,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.siderCollapsed,n=t.inlineCollapsed,i=t.onOpenChange;(!e.inlineCollapsed&&n||!e.siderCollapsed&&r)&&i([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,r=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):r&&(this.store.setState({openKeys:r}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,r=this.getInlineCollapsed();return t&&r?"inline":r?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,r=e.siderCollapsed;return void 0!==r?r: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(C.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:Ct(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,s.createElement(O.a,{store:this.store},s.createElement(kt,Object(w.a)({},e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=t.prevProps,n=t.store,i=n.getState(),o={},a={prevProps:e};return"inline"===r.mode&&"inline"!==e.mode&&(a.switchingModeFromInline=!0),"openKeys"in e?o.openKeys=e.openKeys||[]:((e.inlineCollapsed&&!r.inlineCollapsed||e.siderCollapsed&&!r.siderCollapsed)&&(a.switchingModeFromInline=!0,a.inlineOpenKeys=i.openKeys,o.openKeys=[]),(!e.inlineCollapsed&&r.inlineCollapsed||!e.siderCollapsed&&r.siderCollapsed)&&(o.openKeys=t.inlineOpenKeys,a.inlineOpenKeys=[])),Object.keys(o).length&&n.setState(o),a}}]),r}(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 Dt=At,Lt=function(e){Object(T.a)(r,e);var t=Object(k.a)(r);function r(){var e;return Object(E.a)(this,r),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===v.a.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var r=e.props,n=r.eventKey,i=r.onItemHover,o=r.onMouseLeave;i({key:n,hover:!1}),o({key:n,domEvent:t})},e.onMouseEnter=function(t){var r=e.props,n=r.eventKey,i=r.onItemHover,o=r.onMouseEnter;i({key:n,hover:!0}),o({key:n,domEvent:t})},e.onClick=function(t){var r=e.props,n=r.eventKey,i=r.multiple,o=r.onClick,a=r.onSelect,s=r.onDeselect,l=r.isSelected,c={key:n,keyPath:[n],item:Object(_.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)(r,[{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),r=c()(this.getPrefixCls(),t.className,(e={},Object(n.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(n.a)(e,this.getSelectedClassName(),t.isSelected),Object(n.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:r,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(C.a)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),i,o,{style:l,ref:this.saveNode}),t.children,u)}}]),r}(s.Component);Lt.isMenuItem=!0,Lt.defaultProps={onSelect:$,onMouseEnter:$,onMouseLeave:$,manualRef:$};var It=Object(O.b)((function(e,t){var r=e.activeKey,n=e.selectedKeys,i=t.eventKey;return{active:r[t.subMenuKey]===i,isSelected:Array.isArray(n)?-1!==n.indexOf(i):n===i}}))(Lt),jt=function(e){Object(T.a)(r,e);var t=Object(k.a)(r);function r(){var e;return Object(E.a)(this,r),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var r=e.props;return(0,r.renderMenuItem)(t,r.index,e.props.subMenuKey)},e}return Object(S.a)(r,[{key:"render",value:function(){var e=Object(w.a)({},this.props),t=e.className,r=void 0===t?"":t,n=e.rootPrefixCls,i="".concat(n,"-item-group-title"),o="".concat(n,"-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(r," ").concat(n,"-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)))}}]),r}(s.Component);jt.isMenuItemGroup=!0,jt.defaultProps={disabled:!0};var Rt=function(e){var t=e.className,r=e.rootPrefixCls,n=e.style;return s.createElement("li",{className:"".concat(t," ").concat(r,"-item-divider"),style:n})};Rt.defaultProps={disabled:!0,className:"",style:{}};var Mt=Dt,Nt=r("eDIo");var Pt=s.forwardRef((function(e,t){var r=e.prefixCls,n=e.editable,i=e.locale,o=e.style;return n&&!1!==n.showAdd?s.createElement("button",{ref:t,type:"button",className:"".concat(r,"-nav-add"),style:o,"aria-label":(null==i?void 0:i.addAriaLabel)||"Add tab",onClick:function(e){n.onEdit("add",{event:e})}},n.addIcon||"+"):null}));var Ft=s.forwardRef((function(e,t){var r=e.prefixCls,o=e.id,a=e.tabs,l=e.locale,u=e.mobile,d=e.moreIcon,f=void 0===d?"More":d,h=e.moreTransitionName,p=e.style,m=e.className,g=e.editable,b=e.tabBarGutter,y=e.rtl,x=e.onTabClick,w=Object(s.useState)(!1),E=Object(i.a)(w,2),S=E[0],_=E[1],T=Object(s.useState)(null),k=Object(i.a)(T,2),O=k[0],C=k[1],A="".concat(o,"-more-popup"),D="".concat(r,"-dropdown"),L=null!==O?"".concat(A,"-").concat(O):null,I=null==l?void 0:l.dropdownAriaLabel,j=s.createElement(Mt,{onClick:function(e){var t=e.key,r=e.domEvent;x(t,r),_(!1)},id:A,tabIndex:-1,role:"listbox","aria-activedescendant":L,selectedKeys:[O],"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 R(e){for(var t=a.filter((function(e){return!e.disabled})),r=t.findIndex((function(e){return e.key===O}))||0,n=t.length,i=0;i<n;i+=1){var o=t[r=(r+e+n)%n];if(!o.disabled)return void C(o.key)}}Object(s.useEffect)((function(){var e=document.getElementById(L);e&&e.scrollIntoView&&e.scrollIntoView(!1)}),[O]),Object(s.useEffect)((function(){S||C(null)}),[S]);var M=Object(n.a)({},y?"marginLeft":"marginRight",b);a.length||(M.visibility="hidden",M.order=1);var N=c()(Object(n.a)({},"".concat(D,"-rtl"),y)),P=u?null:s.createElement(Nt.a,{prefixCls:D,overlay:j,trigger:["hover"],visible:S,transitionName:h,onVisibleChange:_,overlayClassName:N,mouseEnterDelay:.1,mouseLeaveDelay:.1},s.createElement("button",{type:"button",className:"".concat(r,"-nav-more"),style:M,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:R(-1),e.preventDefault();break;case v.a.DOWN:R(1),e.preventDefault();break;case v.a.ESC:_(!1);break;case v.a.SPACE:case v.a.ENTER:null!==O&&x(O,e)}else[v.a.DOWN,v.a.SPACE,v.a.ENTER].includes(t)&&(_(!0),e.preventDefault())}},f));return s.createElement("div",{className:c()("".concat(r,"-nav-operations"),m),style:p,ref:t},P,s.createElement(Pt,{prefixCls:r,locale:l,editable:g}))})),Bt=Object(s.createContext)(null),Ut=Math.pow(.995,20);function Ht(e,t){var r=s.useRef(e),n=s.useState({}),o=Object(i.a)(n,2)[1];return[r.current,function(e){var n="function"==typeof e?e(r.current):e;n!==r.current&&t(n,r.current),r.current=n,o({})}]}var zt=function(e){var t,r=e.position,n=e.prefixCls,i=e.extra;if(!i)return null;var o=i;return"right"===r&&(t=o.right||!o.left&&o||null),"left"===r&&(t=o.left||null),t?s.createElement("div",{className:"".concat(n,"-extra-content")},t):null};var Gt=s.forwardRef((function(e,t){var r,o,l=s.useContext(Bt),u=l.prefixCls,d=l.tabs,h=e.className,v=e.style,w=e.id,E=e.animated,S=e.activeKey,_=e.rtl,T=e.extra,k=e.editable,O=e.locale,C=e.tabPosition,A=e.tabBarGutter,D=e.children,L=e.onTabClick,I=e.onTabScroll,j=Object(s.useRef)(),R=Object(s.useRef)(),M=Object(s.useRef)(),N=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)}]),F=Object(i.a)(P,2),B=F[0],U=F[1],H="top"===C||"bottom"===C,z=Ht(0,(function(e,t){H&&I&&I({direction:e>t?"left":"right"})})),G=Object(i.a)(z,2),K=G[0],W=G[1],V=Ht(0,(function(e,t){!H&&I&&I({direction:e>t?"top":"bottom"})})),q=Object(i.a)(V,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),re=te[0],ne=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],de=ce[1],fe=Object(s.useState)(null),he=Object(i.a)(fe,2),pe=he[0],me=he[1],ge=Object(s.useState)(null),ve=Object(i.a)(ge,2),be=ve[0],ye=ve[1],xe=Object(s.useState)(0),we=Object(i.a)(xe,2),Ee=we[0],Se=we[1],_e=Object(s.useState)(0),Te=Object(i.a)(_e,2),ke=Te[0],Oe=Te[1],Ce=function(e){var t=Object(s.useRef)([]),r=Object(s.useState)({}),n=Object(i.a)(r,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,n({})}));return[o.current,function(e){t.current.push(e),a()}]}(new Map),Ae=Object(i.a)(Ce,2),De=Ae[0],Le=Ae[1],Ie=function(e,t,r){return Object(s.useMemo)((function(){for(var r,n=new Map,i=t.get(null===(r=e[0])||void 0===r?void 0:r.key)||y,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)||y;var d=n.get(c)||Object(a.a)({},u);d.right=o-d.left-d.width,n.set(c,d)}return n}),[e.map((function(e){return e.key})).join("_"),t,r])}(d,De,Z),je="".concat(u,"-nav-operations-hidden"),Re=0,Me=0;function Ne(e){return e<Re?[Re,!1]:e>Me?[Me,!1]:[e,!0]}H?_?(Re=0,Me=Math.max(0,Z-pe)):(Re=Math.min(0,pe-Z),Me=0):(Re=Math.min(0,be-re),Me=0);var Pe=Object(s.useRef)(),Fe=Object(s.useState)(),Be=Object(i.a)(Fe,2),Ue=Be[0],He=Be[1];function ze(){He(Date.now())}function Ge(){window.clearTimeout(Pe.current)}function Ke(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,t=Ie.get(e);if(t)if(H){var r=K;_?t.right<K?r=t.right:t.right+t.width>K+pe&&(r=t.right+t.width-pe):t.left<-K?r=-t.left:t.left+t.width>-K+pe&&(r=-(t.left+t.width-pe)),Y(0),W(Ne(r)[0])}else{var n=X;t.top<-X?n=-t.top:t.top+t.height>-X+be&&(n=-(t.top+t.height-be)),W(0),Y(Ne(n)[0])}}!function(e,t){var r=Object(s.useState)(),n=Object(i.a)(r,2),o=n[0],a=n[1],l=Object(s.useState)(0),c=Object(i.a)(l,2),u=c[0],d=c[1],f=Object(s.useState)(0),h=Object(i.a)(f,2),p=h[0],m=h[1],g=Object(s.useState)(),v=Object(i.a)(g,2),b=v[0],y=v[1],x=Object(s.useRef)(),w=Object(s.useRef)(0),E=Object(s.useRef)(!1),S=Object(s.useRef)(),_=Object(s.useRef)(null);_.current={onTouchStart:function(e){var t=e.touches[0],r=t.screenX,n=t.screenY;a({x:r,y:n}),window.clearInterval(x.current)},onTouchMove:function(e){if(o){e.preventDefault();var r=e.touches[0],n=r.screenX,i=r.screenY;a({x:n,y:i});var s=n-o.x,l=i-o.y;t(s,l);var c=Date.now();d(c),m(c-u),y({x:s,y:l})}},onTouchEnd:function(){if(o&&(a(null),y(null),b)){var e=b.x/p,r=b.y/p,n=Math.abs(e),i=Math.abs(r);if(Math.max(n,i)<.1)return;var s=e,l=r;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 r=e.deltaX,n=e.deltaY,i=0,o=Math.abs(r),a=Math.abs(n);o===a?i="x"===S.current?r:n:o>a?(i=r,S.current="x"):(i=n,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){_.current.onTouchMove(e)}function r(e){_.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",r,{passive:!1}),e.current.addEventListener("touchstart",(function(e){_.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){_.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",r)}}),[])}(j,(function(e,t){var r=!1;function n(e,t){e((function(e){var n=Ne(e+t),o=Object(i.a)(n,2),a=o[0],s=o[1];return r=s,a}))}if(H){if(pe>=Z)return r;n(W,e)}else{if(be>=re)return r;n(Y,t)}return Ge(),ze(),r})),Object(s.useEffect)((function(){return Ge(),Ue&&(Pe.current=window.setTimeout((function(){He(0)}),100)),Ge}),[Ue]);var We=function(e,t,r,n,i){var o,a,l,c=i.tabs,u=i.tabPosition,d=i.rtl;["top","bottom"].includes(u)?(o="width",a=d?"right":"left",l=Math.abs(t.left)):(o="height",a="top",l=-t.top);var f=t[o],h=r[o],p=n[o],m=f;return h+p>f&&(m=f-p),Object(s.useMemo)((function(){if(!c.length)return[0,0];for(var t=c.length,r=t,n=0;n<t;n+=1){var i=e.get(c[n].key)||x;if(i[a]+i[o]>l+m){r=n-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,r]}),[e,l,m,u,c.map((function(e){return e.key})).join("_"),d])}(Ie,{width:pe,height:be,left:K,top:X},{width:ae,height:ue},{width:Ee,height:ke},Object(a.a)(Object(a.a)({},e),{},{tabs:d})),Ve=Object(i.a)(We,2),qe=Ve[0],Xe=Ve[1],Ye=d.map((function(e){var t=e.key;return s.createElement(b,{id:w,prefixCls:u,key:t,rtl:_,tab:e,closable:e.closable,editable:k,active:t===S,tabPosition:C,tabBarGutter:A,renderWrapper:D,removeAriaLabel:null==O?void 0:O.removeAriaLabel,ref:B(t),onClick:function(e){L(t,e)},onRemove:function(){U(t)},onFocus:function(){Ke(t),ze(),_||(j.current.scrollLeft=0),j.current.scrollTop=0}})})),$e=g((function(){var e,t,r,n,i,o,a,s,l,c=(null===(e=j.current)||void 0===e?void 0:e.offsetWidth)||0,u=(null===(t=j.current)||void 0===t?void 0:t.offsetHeight)||0,f=(null===(r=N.current)||void 0===r?void 0:r.offsetWidth)||0,h=(null===(n=N.current)||void 0===n?void 0:n.offsetHeight)||0,p=(null===(i=M.current)||void 0===i?void 0:i.offsetWidth)||0,m=(null===(o=M.current)||void 0===o?void 0:o.offsetHeight)||0;me(c),ye(u),Se(f),Oe(h);var g=((null===(a=R.current)||void 0===a?void 0:a.offsetWidth)||0)-f,v=((null===(s=R.current)||void 0===s?void 0:s.offsetHeight)||0)-h;Q(g),ne(v);var b=null===(l=M.current)||void 0===l?void 0:l.className.includes(je);se(g-(b?0:p)),de(v-(b?0:m)),Le((function(){var e=new Map;return d.forEach((function(t){var r=t.key,n=B(r).current;n&&e.set(r,{width:n.offsetWidth,height:n.offsetHeight,left:n.offsetLeft,top:n.offsetTop})})),e}))})),Je=d.slice(0,qe),Ze=d.slice(Xe+1),Qe=[].concat(Object(f.a)(Je),Object(f.a)(Ze)),et=Object(s.useState)(),tt=Object(i.a)(et,2),rt=tt[0],nt=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?(_?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(){nt(e)})),at}),[it,H,_]),Object(s.useEffect)((function(){Ke()}),[S,it,Ie,H]),Object(s.useEffect)((function(){$e()}),[_,A,S,d.map((function(e){return e.key})).join("_")]);var st,lt,ct,ut,dt=!!Qe.length,ft="".concat(u,"-nav-wrap");return H?_?(lt=K>0,st=K+pe<Z):(st=K<0,lt=-K+pe<Z):(ct=X<0,ut=-X+be<re),s.createElement("div",{ref:t,role:"tablist",className:c()("".concat(u,"-nav"),h),style:v,onKeyDown:function(){ze()}},s.createElement(zt,{position:"left",extra:T,prefixCls:u}),s.createElement(m.a,{onResize:$e},s.createElement("div",{className:c()(ft,(r={},Object(n.a)(r,"".concat(ft,"-ping-left"),st),Object(n.a)(r,"".concat(ft,"-ping-right"),lt),Object(n.a)(r,"".concat(ft,"-ping-top"),ct),Object(n.a)(r,"".concat(ft,"-ping-bottom"),ut),r)),ref:j},s.createElement(m.a,{onResize:$e},s.createElement("div",{ref:R,className:"".concat(u,"-nav-list"),style:{transform:"translate(".concat(K,"px, ").concat(X,"px)"),transition:Ue?"none":void 0}},Ye,s.createElement(Pt,{ref:N,prefixCls:u,locale:O,editable:k,style:{visibility:dt?"hidden":null}}),s.createElement("div",{className:c()("".concat(u,"-ink-bar"),Object(n.a)({},"".concat(u,"-ink-bar-animated"),E.inkBar)),style:rt}))))),s.createElement(Ft,Object.assign({},e,{ref:M,prefixCls:u,tabs:Qe,className:!dt&&je})),s.createElement(zt,{position:"right",extra:T,prefixCls:u}))}));function Kt(e){var t=e.id,r=e.activeKey,i=e.animated,o=e.tabPosition,a=e.rtl,l=e.destroyInactiveTabPane,u=s.useContext(Bt),d=u.prefixCls,f=u.tabs,h=i.tabPane,p=f.findIndex((function(e){return e.key===r}));return s.createElement("div",{className:c()("".concat(d,"-content-holder"))},s.createElement("div",{className:c()("".concat(d,"-content"),"".concat(d,"-content-").concat(o),Object(n.a)({},"".concat(d,"-content-animated"),h)),style:p&&h?Object(n.a)({},a?"marginRight":"marginLeft","-".concat(p,"00%")):null},f.map((function(e){return s.cloneElement(e.node,{key:e.key,prefixCls:d,tabKey:e.key,id:t,animated:h,active:e.key===r,destroyInactiveTabPane:l})}))))}function Wt(e){var t=e.prefixCls,r=e.forceRender,n=e.className,o=e.style,l=e.id,u=e.active,d=e.animated,f=e.destroyInactiveTabPane,h=e.tabKey,p=e.children,m=s.useState(r),g=Object(i.a)(m,2),v=g[0],b=g[1];s.useEffect((function(){u?b(!0):f&&b(!1)}),[u,f]);var y={};return u||(d?(y.visibility="hidden",y.height=0,y.overflowY="hidden"):y.display="none"),s.createElement("div",{id:l&&"".concat(l,"-panel-").concat(h),role:"tabpanel",tabIndex:u?0:-1,"aria-labelledby":l&&"".concat(l,"-tab-").concat(h),"aria-hidden":!u,style:Object(a.a)(Object(a.a)({},y),o),className:c()("".concat(t,"-tabpane"),u&&"".concat(t,"-tabpane-active"),n)},(u||v||r)&&p)}var Vt=0;var qt=s.forwardRef((function(e,t){var r,l,f=e.id,h=e.prefixCls,p=void 0===h?"rc-tabs":h,m=e.className,g=e.children,v=e.direction,b=e.activeKey,y=e.defaultActiveKey,x=e.editable,w=e.animated,E=e.tabPosition,S=void 0===E?"top":E,_=e.tabBarGutter,T=e.tabBarStyle,k=e.tabBarExtraContent,O=e.locale,C=e.moreIcon,A=e.moreTransitionName,D=e.destroyInactiveTabPane,L=e.renderTabBar,I=e.onChange,j=e.onTabClick,R=e.onTabScroll,M=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"]),N=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 F=Object(s.useState)(!1),B=Object(i.a)(F,2),U=B[0],H=B[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(d.a)((function(){var e;return null===(e=N[0])||void 0===e?void 0:e.key}),{value:b,defaultValue:y}),G=Object(i.a)(z,2),K=G[0],W=G[1],V=Object(s.useState)((function(){return N.findIndex((function(e){return e.key===K}))})),q=Object(i.a)(V,2),X=q[0],Y=q[1];Object(s.useEffect)((function(){var e,t=N.findIndex((function(e){return e.key===K}));-1===t&&(t=Math.max(0,Math.min(X,N.length-1)),W(null===(e=N[t])||void 0===e?void 0:e.key));Y(t)}),[N.map((function(e){return e.key})).join("_"),K,X]);var $=Object(d.a)(null,{value:f}),J=Object(i.a)($,2),Z=J[0],Q=J[1],ee=S;U&&!["left","right"].includes(S)&&(ee="top"),Object(s.useEffect)((function(){f||(Q("rc-tabs-".concat(Vt)),Vt+=1)}),[]);var te,re={id:Z,activeKey:K,animated:l,tabPosition:ee,rtl:P,mobile:U},ne=Object(a.a)(Object(a.a)({},re),{},{editable:x,locale:O,moreIcon:C,moreTransitionName:A,tabBarGutter:_,onTabClick:function(e,t){null==j||j(e,t),W(e),null==I||I(e)},onTabScroll:R,extra:k,style:T,panes:g});return te=L?L(ne,Gt):s.createElement(Gt,Object.assign({},ne)),s.createElement(Bt.Provider,{value:{tabs:N,prefixCls:p}},s.createElement("div",Object.assign({ref:t,id:f,className:c()(p,"".concat(p,"-").concat(ee),(r={},Object(n.a)(r,"".concat(p,"-mobile"),U),Object(n.a)(r,"".concat(p,"-editable"),x),Object(n.a)(r,"".concat(p,"-rtl"),P),r),m)},M),te,s.createElement(Kt,Object.assign({destroyInactiveTabPane:D},re,{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,r){},lOMy:
/*!****************************************************!*\
!*** ./src/components/tpi-code-setting/index.less ***!
\****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){},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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,a=t.algo,s=[],l=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),l[i]=r(e.pow(n,1/3)),i++),n++}();var c=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],u=r[5],d=r[6],f=r[7],h=0;h<64;h++){if(h<16)c[h]=0|e[t+h];else{var p=c[h-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=c[h-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[h]=m+c[h-7]+v+c[h-16]}var b=n&i^n&o^i&o,y=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),x=f+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&d)+l[h]+c[h];f=d,d=u,u=s,s=a+x|0,a=o,o=i,i=n,n=x+(y+b)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0,r[5]=r[5]+u|0,r[6]=r[6]+d|0,r[7]=r[7]+f|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.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),n.SHA256)},lZu9:
/*!***********************************************************!*\
!*** ./node_modules/codemirror/mode/markdown/markdown.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){!function(e){"use strict";e.defineMode("markdown",(function(t,r){var n=e.getMode(t,"text/html"),i="null"==n.name;void 0===r.highlightFormatting&&(r.highlightFormatting=!1),void 0===r.maxBlockquoteDepth&&(r.maxBlockquoteDepth=0),void 0===r.taskLists&&(r.taskLists=!1),void 0===r.strikethrough&&(r.strikethrough=!1),void 0===r.emoji&&(r.emoji=!1),void 0===r.fencedCodeBlockHighlighting&&(r.fencedCodeBlockHighlighting=!0),void 0===r.fencedCodeBlockDefaultMode&&(r.fencedCodeBlockDefaultMode="text/plain"),void 0===r.xml&&(r.xml=!0),void 0===r.tokenTypeOverrides&&(r.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)&&r.tokenTypeOverrides[a]&&(o[a]=r.tokenTypeOverrides[a]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,u=r.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,d=/^ {0,3}(?:\={1,}|-{2,})\s*$/,f=/^[^#!\[\]*_\\<>` "'(~:]+/,h=/^(~~~+|```+)[ \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,r){return t.f=t.inline=r,r(e,t)}function v(e,t,r){return t.f=t.block=r,r(e,t)}function b(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 r=i;if(!r){var o=e.innerMode(n,t.htmlState);r="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}r&&(t.f=_,t.block=y,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function y(n,i){var a,f=n.column()===i.indentation,m=!(a=i.prevLine.stream)||!/\S/.test(a.string),v=i.indentedCode,b=i.prevLine.hr,y=!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,y)){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 _=!(m||b||i.prevLine.header||y&&v||i.prevLine.fencedCodeEnd),T=(!1===i.list||b||m)&&i.indentation<=x&&n.match(s),k=null;if(i.indentationDiff>=4&&(v||i.prevLine.fencedCodeEnd||i.prevLine.header||m))return n.skipToEnd(),i.indentedCode=!0,o.code;if(n.eatSpace())return null;if(f&&i.indentation<=x&&(k=n.match(u))&&k[1].length<=6)return i.quote=0,i.header=k[1].length,i.thisLine.header=!0,r.highlightFormatting&&(i.formatting="header"),i.f=i.inline,E(i);if(i.indentation<=x&&n.eat(">"))return i.quote=f?1:i.quote+1,r.highlightFormatting&&(i.formatting="quote"),n.eatSpace(),E(i);if(!T&&!i.setext&&f&&i.indentation<=x&&(k=n.match(l))){var O=k[1]?"ol":"ul";return i.indentation=S+n.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,r.taskLists&&n.match(c,!1)&&(i.taskList=!0),i.f=i.inline,r.highlightFormatting&&(i.formatting=["list","list-"+O]),E(i)}return f&&i.indentation<=x&&(k=n.match(h,!0))?(i.quote=0,i.fencedEndRE=new RegExp(k[1]+"+ *$"),i.localMode=r.fencedCodeBlockHighlighting&&function(r){if(e.findModeByName){var n=e.findModeByName(r);n&&(r=n.mime||n.mimes[0])}var i=e.getMode(t,r);return"null"==i.name?null:i}(k[2]||r.fencedCodeBlockDefaultMode),i.localMode&&(i.localState=e.startState(i.localMode)),i.f=i.block=w,r.highlightFormatting&&(i.formatting="code-block"),i.code=-1,E(i)):i.setext||!(_&&y||i.quote||!1!==i.list||i.code||T||p.test(n.string))&&(k=n.lookAhead(1))&&(k=k.match(d))?(i.setext?(i.header=i.setext,i.setext=0,n.skipToEnd(),r.highlightFormatting&&(i.formatting="header")):(i.header="="==k[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,E(i)):T?(n.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,o.hr):"["===n.peek()?g(n,i,C):g(n,i,i.inline)}function x(t,r){var o=n.token(t,r.htmlState);if(!i){var a=e.innerMode(n,r.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||r.md_inside&&t.current().indexOf(">")>-1)&&(r.f=_,r.block=y,r.htmlState=null)}return o}function w(e,t){var n,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))?(r.highlightFormatting&&(t.formatting="code-block"),a||(n=E(t)),t.localMode=t.localState=null,t.block=y,t.f=_,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,a?v(e,t,t.block):n):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 n=0;n<e.formatting.length;n++)t.push(o.formatting+"-"+e.formatting[n]),"header"===e.formatting[n]&&t.push(o.formatting+"-"+e.formatting[n]+"-"+e.header),"quote"===e.formatting[n]&&(!r.maxBlockquoteDepth||r.maxBlockquoteDepth>=e.quote?t.push(o.formatting+"-"+e.formatting[n]+"-"+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),!r.maxBlockquoteDepth||r.maxBlockquoteDepth>=e.quote?t.push(o.quote+"-"+e.quote):t.push(o.quote+"-"+r.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(f,!0))return E(t)}function _(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,r.highlightFormatting&&(i.formatting="task"),i.taskList=!1,E(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return r.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 d=i.formatting;r.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var f=t.current().length;if(0!=i.code||i.quote&&1!=f){if(f==i.code){var h=E(i);return i.code=0,h}return i.formatting=d,E(i)}return i.code=f,E(i)}if(i.code)return E(i);if("\\"===s&&(t.next(),r.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,r.highlightFormatting&&(i.formatting="image"),E(i);if("["===s&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,r.highlightFormatting&&(i.formatting="image"),E(i);if("]"===s&&i.imageAltText){r.highlightFormatting&&(i.formatting="image");var p=E(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=k,p}if("["===s&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,r.highlightFormatting&&(i.formatting="link")),E(i);if("]"===s&&i.linkText){r.highlightFormatting&&(i.formatting="link");var p=E(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?k:_,p}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=T,r.highlightFormatting&&(i.formatting="link"),(p=E(i))?p+=" ":p="",p+o.linkInline;if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=T,r.highlightFormatting&&(i.formatting="link"),(p=E(i))?p+=" ":p="",p+o.linkEmail;if(r.xml&&"<"===s&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var b=t.string.indexOf(">",t.pos);if(-1!=b){var y=t.string.substring(t.start,b);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(n),v(t,i,x)}if(r.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 O=t.peek()||" ",C=!/\s/.test(O)&&(!m.test(O)||/\s/.test(S)||m.test(S)),A=!/\s/.test(S)&&(!m.test(S)||/\s/.test(O)||m.test(O)),D=null,L=null;if(w%2&&(i.em||!C||"*"!==s&&A&&!m.test(S)?i.em!=s||!A||"*"!==s&&C&&!m.test(O)||(D=!1):D=!0),w>1&&(i.strong||!C||"*"!==s&&A&&!m.test(S)?i.strong!=s||!A||"*"!==s&&C&&!m.test(O)||(L=!1):L=!0),null!=L||null!=D)return r.highlightFormatting&&(i.formatting=null==D?"strong":null==L?"em":"strong em"),!0===D&&(i.em=s),!0===L&&(i.strong=s),h=E(i),!1===D&&(i.em=!1),!1===L&&(i.strong=!1),h}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return E(i);t.backUp(1)}if(r.strikethrough)if("~"===s&&t.eatWhile(s)){if(i.strikethrough)return r.highlightFormatting&&(i.formatting="strikethrough"),h=E(i),i.strikethrough=!1,h;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,r.highlightFormatting&&(i.formatting="strikethrough"),E(i)}else if(" "===s&&t.match(/^~~/,!0)){if(" "===t.peek())return E(i);t.backUp(2)}if(r.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,r.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 T(e,t){if(">"===e.next()){t.f=t.inline=_,r.highlightFormatting&&(t.formatting="link");var n=E(t);return n?n+=" ":n="",n+o.linkInline}return e.match(/^[^>]+/,!0),o.linkInline}function k(e,t){if(e.eatSpace())return null;var n,i=e.next();return"("===i||"["===i?(t.f=t.inline=(n="("===i?")":"]",function(e,t){if(e.next()===n){t.f=t.inline=_,r.highlightFormatting&&(t.formatting="link-string");var i=E(t);return t.linkHref=!1,i}return e.match(O[n]),t.linkHref=!0,E(t)}),r.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,E(t)):"error"}var O={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function C(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=A,e.next(),r.highlightFormatting&&(t.formatting="link"),t.linkText=!0,E(t)):g(e,t,_)}function A(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=D,r.highlightFormatting&&(t.formatting="link");var n=E(t);return t.linkText=!1,n}return e.match(/^([^\]\\]|\\.)+/,!0),o.linkText}function D(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=_,o.linkHref+" url")}var L={startState:function(){return{f:y,prevLine:{stream:null},thisLine:{stream:null},block:y,htmlState:null,indentation:0,inline:_,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(n,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 b(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 r=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentation=r,t.indentationDiff=null,r>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==x?{state:e.htmlState,mode:n}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:L}},indent:function(t,r,i){return t.block==x&&n.indent?n.indent(t.htmlState,r,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,r,i):e.Pass},blankLine:b,getType:E,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return L}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(r(/*! ../../lib/codemirror */"VrN/"),r(/*! ../xml/xml */"1eCo"),r(/*! ../meta */"8EBN"))},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,r,n){function i(a,s){if(!r[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=r[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,r){"use strict";var n=e("./browser/client");n.Buffer=e("buffer").Buffer,n.urllib=e("../shims/xhr"),n.version=e("./browser/version").version,t.exports=n},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(e,t,r){(function(r,n){"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"),d=e("agentkeepalive"),f=e("merge-descriptors"),h=e("url"),p=e("is-type-of"),m=e("platform"),g=e("utility"),v=e("urllib"),b=e("./version"),y=e("bowser"),x=e("../common/signUtils"),w=e("../common/utils/isIP").isIP,E=e("../common/client/initOptions"),S=e("../common/utils/createRequest").createRequest,_=new d;function T(e,t){var r,n;if(r=m.name,n=m.version,r&&r.toLowerCase&&"ie"===r.toLowerCase()&&n.split(".")[0]<10&&console.warn("ali-oss does not support the current browser"),!(this instanceof T))return new T(e,t);e&&e.inited?this.options=e:this.options=T.initOptions(e),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=v,this.agent=this.options.agent||_),this.ctx=t,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}t.exports=T,T.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=T.prototype;k.debug=l,f(k,e("./object")),f(k,e("../common/bucket/getBucketWebsite")),f(k,e("../common/bucket/putBucketWebsite")),f(k,e("../common/bucket/deleteBucketWebsite")),f(k,e("../common/bucket/getBucketLifecycle")),f(k,e("../common/bucket/putBucketLifecycle")),f(k,e("../common/bucket/deleteBucketLifecycle")),f(k,e("../common/bucket/putBucketVersioning")),f(k,e("../common/bucket/getBucketVersioning")),f(k,e("./managed-upload")),f(k,e("../common/multipart")),f(k,e("../common/parallel")),k.signature=function(e){return this.debug("authorization stringToSign: %s",e,"info"),x.computeSignature(this.options.accessKeySecret,e)},k.authorization=function(e,t,r,n){var i=x.buildCanonicalString(e.toUpperCase(),t,{headers:n,parameters:r});return x.authorization(this.options.accessKeyId,this.options.accessKeySecret,i)},k.request=function(e){var t,r,n,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"),r=void 0,n=void 0,i=!!e.stream,l.prev=5,l.next=8,o.default.awrap(this.urllib.request(t.url,t.params));case 8:r=l.sent,this.debug("response %s %s, got %s, headers: %j",e.method,t.url,r.status,r.headers,"info"),l.next=15;break;case 12:l.prev=12,l.t0=l.catch(5),n=l.t0;case 15:if(a=void 0,!r||!e.successStatuses||-1!==e.successStatuses.indexOf(r.status)){l.next=28;break}return l.next=19,o.default.awrap(this.requestError(r));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(!n){l.next=32;break}return l.next=31,o.default.awrap(this.requestError(n));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(r.data));case 37:s=l.sent,r.data=s;case 39:return l.abrupt("return",r);case 40:case"end":return l.stop()}}),null,this,[[5,12]])},k._getResource=function(e){var t="/";return e.bucket&&(t+=e.bucket+"/"),e.object&&(t+=e.object),t},k._isIP=w,k._escape=function(e){return g.encodeURIComponent(e).replace(/%2F/g,"/")},k._getReqUrl=function(e){var t={};c(this.options.endpoint).to(t);var r=this._isIP(t.hostname),n=this.options.cname;!e.bucket||n||r||(t.host=e.bucket+"."+t.host);var i="/";e.bucket&&r&&(i+=e.bucket+"/"),e.object&&(i+=this._escape(e.object).replace(/\+/g,"%2B")),t.pathname=i;var o={};if(e.query&&f(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,f(o,a)}return t.query=o,h.format(t)},k._getUserAgent=function(){var e="aliyun-sdk-"+(n&&n.browser?"js":"nodejs")+"/"+b.version,t=m.description;return!t&&n&&(t="Node.js "+n.version.slice(1)+" on "+n.platform+" "+n.arch),this._checkUserAgent(e+" "+t)},k._checkUserAgent=function(e){return e.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},k.checkBrowserAndVersion=function(e,t){return y.name===e&&y.version.split(".")[0]===t},k.parseXML=function(e){return new i.default((function(t,n){r.isBuffer(e)&&(e=e.toString()),u.parseString(e,{explicitRoot:!1,explicitArray:!1},(function(e,r){e?n(e):t(r)}))}))},k.requestError=function(e){var t,r,n,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 r=String(e.data),this.debug("request response error data: %s",r,"error"),n=void 0,a.prev=8,a.next=11,o.default.awrap(this.parseXML(r));case 11:if(a.t0=a.sent,a.t0){a.next=14;break}a.t0={};case 14:n=a.t0,a.next=24;break;case 17:return a.prev=17,a.t1=a.catch(8),this.debug(r,"error"),a.t1.message+="\nraw xml: "+r,a.t1.status=e.status,a.t1.requestId=e.headers["x-oss-request-id"],a.abrupt("return",a.t1);case 24:i=n.Message||"unknow request error, status: "+e.status,n.Condition&&(i+=" (condition: "+n.Condition+")"),(t=new Error(i)).name=n.Code?n.Code+"Error":"UnknowError",t.status=e.status,t.code=n.Code,t.requestId=n.RequestId,t.hostId=n.HostId,t.serverTime=n.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,r){(function(t){"use strict";var n=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"),d=e("copy-to"),f=e("../common/utils/isBlob").isBlob,h=e("../common/utils/isFile").isFile,p=r;p.multipartUpload=function(e,t,r){var n,i,a,s,l,d,p,m,g;return o.default.async((function(v){for(;;)switch(v.prev=v.next){case 0:if(this.resetCancelFlag(),!(r=r||{}).checkpoint||!r.checkpoint.uploadId){v.next=6;break}return v.next=5,o.default.awrap(this._resumeMultipart(r.checkpoint,r));case 5:return v.abrupt("return",v.sent);case 6:return n=102400,r.mime||(h(t)?r.mime=u.getType(c.extname(t.name)):f(t)?r.mime=t.type:r.mime=u.getType(c.extname(t))),r.headers=r.headers||{},this._convertMetaToHeaders(r.meta,r.headers),v.next=12,o.default.awrap(this._getFileSize(t));case 12:if(!((i=v.sent)<n)){v.next=25;break}return a=this._createStream(t,0,i),r.contentLength=i,v.next=18,o.default.awrap(this.putStream(e,a,r));case 18:if(s=v.sent,!r||!r.progress){v.next=22;break}return v.next=22,o.default.awrap(r.progress(1));case 22:return l={res:s.res,bucket:this.options.bucket,name:e,etag:s.res.headers.etag},(r.headers&&r.headers["x-oss-callback"]||r.callback)&&(l.data=s.data),v.abrupt("return",l);case 25:if(!r.partSize||parseInt(r.partSize,10)===r.partSize){v.next=27;break}throw new Error("partSize must be int number");case 27:if(!(r.partSize&&r.partSize<n)){v.next=29;break}throw new Error("partSize must not be smaller than "+n);case 29:return v.next=31,o.default.awrap(this.initMultipartUpload(e,r));case 31:if(d=v.sent,p=d.uploadId,m=this._getPartSize(i,r.partSize),g={file:t,name:e,fileSize:i,partSize:m,uploadId:p,doneParts:[]},!r||!r.progress){v.next=38;break}return v.next=38,o.default.awrap(r.progress(0,g,d.res));case 38:return v.next=40,o.default.awrap(this._resumeMultipart(g,r));case 40:return v.abrupt("return",v.sent);case 41:case"end":return v.stop()}}),null,this)},p._resumeMultipart=function(e,t){var r,a,s,l,c,u,f,h,p,m,g,v,b,y,x,w,E;return o.default.async((function(S){for(;;)switch(S.prev=S.next){case 0:if(r=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,f=e.name,h=[],u.length>0&&d(u).to(h),p=this._divideParts(s,l),m=p.length,g=!1,v=function(r,n){var s=this;return new i.default((function(i,l){var h,v,b,y;return o.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:if(s.prev=0,r.isCancel()){s.next=18;break}return h=p[n-1],v={stream:r._createStream(a,h.start,h.end),size:h.end-h.start},s.next=6,o.default.awrap(r._uploadPart(f,c,n,v));case 6:if(b=s.sent,r.isCancel()||g){s.next=15;break}if(e.doneParts.push({number:n,etag:b.res.headers.etag}),!t.progress){s.next=12;break}return s.next=12,o.default.awrap(t.progress(u.length/m,e,b.res));case 12:i({number:n,etag:b.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),(y=new Error).name=s.t0.name,y.message=s.t0.message,y.stack=s.t0.stack,y.partNum=n,d(s.t0).to(y),l(y);case 30:case"end":return s.stop()}}),null,s,[[0,21]])}))},b=(0,n.default)(new Array(m),(function(e,t){return t+1})),y=h.map((function(e){return e.number})),x=b.filter((function(e){return y.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,n){v(r,e).then((function(e){e&&h.push(e),t()})).catch((function(e){n(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(f,c,h,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(!f(e)&&!h(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 r=this.start,n=r+e;n=n>this.fileBuffer.length?this.fileBuffer.length:n,this.start=n,t=this.push(this.fileBuffer.slice(r,n))}},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 r=this;this.reader.onload=function(n){r.fileBuffer=t.from(new Uint8Array(n.target.result)),r.file=null,r.readFileAndPush(e)},0===this.start?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(e)},p._createStream=function(e,t,r){if(f(e)||h(e))return new g(e.slice(t,r));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 r=Math.ceil(e/t),n=[],i=0;i<r;i++){var o=t*i,a=Math.min(o+t,e);n.push({start:o,end:a})}return n}}).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,r){"use strict";var n=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"),d=e("url"),f=e("copy-to"),h=e("path"),p=e("mime"),m=e("../common/callback"),g=e("../common/signUtils"),v=e("merge-descriptors"),b=e("../common/utils/isBlob").isBlob,y=e("../common/utils/isFile").isFile,x=r;x.append=function(e,t,r){var n;return a.default.async((function(i){for(;;)switch(i.prev=i.next){case 0:return void 0===(r=r||{}).position&&(r.position="0"),r.subres={append:"",position:r.position},r.method="POST",i.next=6,a.default.awrap(this.put(e,t,r));case 6:return(n=i.sent).nextAppendPosition=n.res.headers["x-oss-next-append-position"],i.abrupt("return",n);case 9:case"end":return i.stop()}}),null,this)},x.put=function(e,t,r){var n,i,o,s,l,c,d;return a.default.async((function(f){for(;;)switch(f.prev=f.next){case 0:if(n=void 0,r=r||{},e=this._objectName(e),!u.buffer(t)){f.next=7;break}n=t,f.next=33;break;case 7:if(!b(t)&&!y(t)){f.next=32;break}return r.mime||(y(t)?r.mime=p.getType(h.extname(t.name)):r.mime=t.type),i=this._createStream(t,0,t.size),f.next=12,a.default.awrap(this._getFileSize(t));case 12:return r.contentLength=f.sent,f.prev=13,f.next=16,a.default.awrap(this.putStream(e,i,r));case 16:return o=f.sent,f.abrupt("return",o);case 20:if(f.prev=20,f.t0=f.catch(13),"RequestTimeTooSkewed"!==f.t0.code){f.next=29;break}return this.options.amendTimeSkewed=+new Date(f.t0.serverTime)-new Date,f.next=26,a.default.awrap(this.put(e,t,r));case 26:return f.abrupt("return",f.sent);case 29:throw f.t0;case 30:f.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return r.headers=r.headers||{},this._convertMetaToHeaders(r.meta,r.headers),s=r.method||"PUT",l=this._objectRequestParams(s,e,r),m.encodeCallback(l,r),l.mime=r.mime,l.content=n,l.successStatuses=[200],f.next=43,a.default.awrap(this.request(l));case 43:return c=f.sent,d={name:e,url:this._objectUrl(e),res:c.res},l.headers&&l.headers["x-oss-callback"]&&(d.data=JSON.parse(c.data.toString())),f.abrupt("return",d);case 47:case"end":return f.stop()}}),null,this,[[13,20]])},x.putStream=function(e,t,r){var n,i,o,s;return a.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return(r=r||{}).headers=r.headers||{},e=this._objectName(e),r.contentLength?r.headers["Content-Length"]=r.contentLength:r.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(r.meta,r.headers),n=r.method||"PUT",i=this._objectRequestParams(n,e,r),m.encodeCallback(i,r),i.mime=r.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,r){var n;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:r&&r.timeout,ctx:r&&r.ctx}));case 2:return n=i.sent,i.abrupt("return",n);case 4:case"end":return i.stop()}}),null,this)},x.list=function(e,t){var r,n,i,o,s;return a.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return(r=this._objectRequestParams("GET","",t)).query=e,r.xmlResponse=!0,r.successStatuses=[200],l.next=6,a.default.awrap(this.request(r));case 6:return n=l.sent,i=n.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=n.data.CommonPrefixes||null)&&(Array.isArray(s)||(s=[s]),s=s.map((function(e){return e.Prefix}))),l.abrupt("return",{res:n.res,objects:i,prefixes:s,nextMarker:n.data.NextMarker||null,isTruncated:"true"===n.data.IsTruncated});case 13:case"end":return l.stop()}}),null,this)},x.restore=function(e,t){var r,n;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),(r=this._objectRequestParams("POST",e,t)).successStatuses=[202],i.next=7,a.default.awrap(this.request(r));case 7:return n=i.sent,i.abrupt("return",{res:n.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 r=l.timestamp()+(t.expires||1800),n={bucket:this.options.bucket,object:e},i=this._getResource(n);this.options.stsToken&&(t["security-token"]=this.options.stsToken);var o=g._signatureForURL(this.options.accessKeySecret,t,i,r),a=d.parse(this._getReqUrl(n));return a.query={OSSAccessKeyId:this.options.accessKeyId,Expires:r,Signature:o.Signature},f(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 r=d.parse(t),n=this.options.bucket;r.hostname=n+"."+r.hostname,r.host=n+"."+r.host,t=r.format()}return t+this._escape(this._objectName(e))},x._objectRequestParams=function(e,t,r){if(!this.options.bucket)throw new Error("Please create a bucket first");r=r||{};var n={object:t=this._objectName(t),bucket:this.options.bucket,method:e,subres:r&&r.subres,timeout:r&&r.timeout,ctx:r&&r.ctx};return r.headers&&(n.headers={},f(r.headers).to(n.headers)),n},x._objectName=function(e){return e.replace(/^\/+/,"")},x._convertMetaToHeaders=function(e,t){e&&(0,i.default)(e).forEach((function(r){t["x-oss-meta-"+r]=e[r]}))},x._deleteFileSafe=function(e){var t=this;return new n.default((function(r){c.exists(e,(function(n){n?c.unlink(e,(function(n){n&&t.debug("unlink %j error: %s",e,n,"error"),r()})):r()}))}))}},{"../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,r){"use strict";r.version="6.10.0"},{}],6:[function(e,t,r){"use strict";var n,i=e("babel-runtime/regenerator"),o=(n=i)&&n.__esModule?n:{default:n},a=e("../utils/checkBucketName").checkBucketName;r.deleteBucketLifecycle=function(e,t){var r,n;return o.default.async((function(i){for(;;)switch(i.prev=i.next){case 0:return a(e),(r=this._bucketRequestParams("DELETE",e,"lifecycle",t)).successStatuses=[204],i.next=5,o.default.awrap(this.request(r));case 5:return n=i.sent,i.abrupt("return",{res:n.res});case 7:case"end":return i.stop()}}),null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(e,t,r){"use strict";var n,i=e("babel-runtime/regenerator"),o=(n=i)&&n.__esModule?n:{default:n},a=e("../utils/checkBucketName").checkBucketName;r.deleteBucketWebsite=function(e,t){var r,n;return o.default.async((function(i){for(;;)switch(i.prev=i.next){case 0:return a(e),(r=this._bucketRequestParams("DELETE",e,"website",t)).successStatuses=[204],i.next=5,o.default.awrap(this.request(r));case 5:return n=i.sent,i.abrupt("return",{res:n.res});case 7:case"end":return i.stop()}}),null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(e,t,r){"use strict";var n,i=e("babel-runtime/regenerator"),o=(n=i)&&n.__esModule?n:{default:n},a=e("../utils/checkBucketName").checkBucketName,s=e("../utils/isArray").isArray,l=e("../utils/formatObjKey").formatObjKey;r.getBucketLifecycle=function(e,t){var r,n,i;return o.default.async((function(c){for(;;)switch(c.prev=c.next){case 0:return a(e),(r=this._bucketRequestParams("GET",e,"lifecycle",t)).successStatuses=[200],r.xmlResponse=!0,c.next=6,o.default.awrap(this.request(r));case 6:return n=c.sent,(i=n.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:n.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,r){"use strict";var n,i=e("babel-runtime/regenerator"),o=(n=i)&&n.__esModule?n:{default:n},a=e("../utils/checkBucketName").checkBucketName;r.getBucketVersioning=function(e,t){var r,n,i;return o.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return a(e),(r=this._bucketRequestParams("GET",e,"versioning",t)).xmlResponse=!0,r.successStatuses=[200],s.next=6,o.default.awrap(this.request(r));case 6:return n=s.sent,i=n.data.Status,s.abrupt("return",{status:n.status,versionStatus:i,res:n.res});case 9:case"end":return s.stop()}}),null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(e,t,r){"use strict";var n,i=e("babel-runtime/regenerator"),o=(n=i)&&n.__esModule?n:{default:n},a=e("../utils/checkBucketName").checkBucketName,s=e("../utils/isObject").isObject;r.getBucketWebsite=function(e,t){var r,n,i;return o.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return a(e),(r=this._bucketRequestParams("GET",e,"website",t)).successStatuses=[200],r.xmlResponse=!0,l.next=6,o.default.awrap(this.request(r));case 6:return n=l.sent,i=[],n.data.RoutingRules&&n.data.RoutingRules.RoutingRule&&(i=s(n.data.RoutingRules.RoutingRule)?[n.data.RoutingRules.RoutingRule]:n.data.RoutingRules.RoutingRule),l.abrupt("return",{index:n.data.IndexDocument&&n.data.IndexDocument.Suffix||"",supportSubDir:n.data.IndexDocument&&n.data.IndexDocument.SupportSubDir||"false",type:n.data.IndexDocument&&n.data.IndexDocument.Type,routingRules:i,error:n.data.ErrorDocument&&n.data.ErrorDocument.Key||null,res:n.res});case 10:case"end":return l.stop()}}),null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(e,t,r){"use strict";var n,i=e("babel-runtime/regenerator"),o=(n=i)&&n.__esModule?n:{default:n},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,d=e("../utils/checkObjectTag").checkObjectTag,f=e("../utils/getStrBytesCount").getStrBytesCount;function h(e){e.days&&(e.expiration={days:e.days}),e.date&&(e.expiration={createdBeforeDate:e.date})}function p(e,t){var r=e.days,n=e.createdBeforeDate;if(!r&&!n)throw new Error(t+" must includes days or createdBeforeDate");if(r&&!/^[1-9][0-9]*$/.test(r))throw new Error("days must be a positive integer");if(n&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(n))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function m(e){if(e.id&&f(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})),d(t)}(e.tag)}}r.putBucketLifecycle=function(e,t,r){var n,i,l,c,d;return o.default.async((function(f){for(;;)switch(f.prev=f.next){case 0:if(a(e),s(t)){f.next=3;break}throw new Error("rules must be Array");case 3:return n=this._bucketRequestParams("PUT",e,"lifecycle",r),l={LifecycleConfiguration:{Rule:i=[]}},t.forEach((function(e){h(e),m(e),e.id&&(e.ID=e.id,delete e.id),i.push(e)})),c=u(l,{headers:!0,firstUpperCase:!0}),n.content=c,n.mime="xml",n.successStatuses=[200],f.next=13,o.default.awrap(this.request(n));case 13:return d=f.sent,f.abrupt("return",{res:d.res});case 15:case"end":return f.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,r){"use strict";var n,i=e("babel-runtime/regenerator"),o=(n=i)&&n.__esModule?n:{default:n},a=e("../utils/checkBucketName").checkBucketName,s=e("../utils/obj2xml").obj2xml;r.putBucketVersioning=function(e,t){var r,n,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 r=this._bucketRequestParams("PUT",e,"versioning",l),n={VersioningConfiguration:{Status:t}},r.mime="xml",r.content=s(n,{headers:!0}),c.next=9,o.default.awrap(this.request(r));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,r){"use strict";var n,i=e("babel-runtime/regenerator"),o=(n=i)&&n.__esModule?n:{default:n},a=e("../utils/checkBucketName").checkBucketName,s=e("../utils/obj2xml").obj2xml,l=e("../utils/isArray").isArray;r.putBucketWebsite=function(e){var t,r,n,i,c,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=arguments[2];return o.default.async((function(f){for(;;)switch(f.prev=f.next){case 0:if(a(e),t=this._bucketRequestParams("PUT",e,"website",d),r={Suffix:u.index||"index.html"},i={WebsiteConfiguration:n={IndexDocument:r}},u.supportSubDir&&(r.SupportSubDir=u.supportSubDir),u.type&&(r.Type=u.type),u.error&&(n.ErrorDocument={Key:u.error}),void 0===u.routingRules){f.next=12;break}if(l(u.routingRules)){f.next=11;break}throw new Error("RoutingRules must be Array");case 11:n.RoutingRules={RoutingRule:u.routingRules};case 12:return i=s(i),t.content=i,t.mime="xml",t.successStatuses=[200],f.next=18,o.default.awrap(this.request(t));case 18:return c=f.sent,f.abrupt("return",{res:c.res});case 20:case"end":return f.stop()}}),null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(e,t,r){(function(t){"use strict";var n=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}}r.encodeCallback=function(e,r){if(e.headers=e.headers||{},!Object.prototype.hasOwnProperty.call(e.headers,"x-oss-callback")&&r.callback){var o={callbackUrl:encodeURI(r.callback.url),callbackBody:r.callback.body};r.callback.host&&(o.callbackHost=r.callback.host),r.callback.contentType&&(o.callbackBodyType=r.callback.contentType);var a=t.from((0,i.default)(o)).toString("base64");if(e.headers["x-oss-callback"]=a,r.callback.customValue){var s={};(0,n.default)(r.callback.customValue).forEach((function(e){s["x:"+e]=r.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,r){"use strict";var n,i=e("babel-runtime/core-js/object/assign"),o=(n=i)&&n.__esModule?n:{default:n},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,r,n,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 r=s.parse(e);if(r.protocol||(r=s.parse("http"+(t?"s":"")+"://"+e)),"http:"!==r.protocol&&"https:"!==r.protocol)throw new Error("Endpoint protocol must be http or https.");return r}(u.endpoint,u.secure);else{if(!u.region)throw new Error("require options.endpoint or options.region");u.endpoint=(t=u.region,r=u.internal,n=u.secure,i=n?"https://":"http://",c=r?"-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,r){"use strict";e("merge-descriptors")(r,e("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(e,t,r){"use strict";var n,i=e("babel-runtime/regenerator"),o=(n=i)&&n.__esModule?n:{default:n},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")}r.processObjectSave=function(e,t,r,n){var i,u,d,f;return o.default.async((function(h){for(;;)switch(h.prev=h.next){case 0:return c(e,"sourceObject"),c(t,"targetObject"),c(r,"process"),t=this._objectName(t),n&&a(n),i=this._objectRequestParams("POST",e,{subres:"x-oss-process"}),u=n?",b_"+l(n):"",t=l(t),d={"x-oss-process":r+"|sys/saveas,o_"+t+u},i.content=s.stringify(d),h.next=12,o.default.awrap(this.request(i));case 12:return f=h.sent,h.abrupt("return",{res:f.res,status:f.res.status});case 14:case"end":return h.stop()}}),null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(e,t,r){"use strict";var n,i=e("babel-runtime/regenerator"),o=(n=i)&&n.__esModule?n:{default:n},a=e("copy-to"),s=e("./callback"),l=e("./utils/deepCopy").deepCopy,c=r;c.listUploads=function(e,t){var r,n,i,s;return o.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return r={},a(t=t||{}).to(r),r.subres="uploads",(n=this._objectRequestParams("GET","",r)).query=e,n.xmlResponse=!0,n.successStatuses=[200],l.next=10,o.default.awrap(this.request(n));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,r,n){var i,s,l;return o.default.async((function(c){for(;;)switch(c.prev=c.next){case 0:return i={},a(n=n||{}).to(i),i.subres={uploadId:t},(s=this._objectRequestParams("GET",e,i)).query=r,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,r){var n,i,s;return o.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return this._stop(),n={},a(r=r||{}).to(n),n.subres={uploadId:t},(i=this._objectRequestParams("DELETE",e,n)).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 r,n,i;return o.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return r={},a(t=t||{}).to(r),r.headers=r.headers||{},this._convertMetaToHeaders(t.meta,r.headers),r.subres="uploads",(n=this._objectRequestParams("POST",e,r)).mime=t.mime,n.xmlResponse=!0,n.successStatuses=[200],s.next=12,o.default.awrap(this.request(n));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,r,n,i,a,s){var l;return o.default.async((function(c){for(;;)switch(c.prev=c.next){case 0:return l={stream:this._createStream(n,i,a),size:a-i},c.next=3,o.default.awrap(this._uploadPart(e,t,r,l,s));case 3:return c.abrupt("return",c.sent);case 4:case"end":return c.stop()}}),null,this)},c.completeMultipartUpload=function(e,t,r,n){var i,a,c,u,d,f,h,p;return o.default.async((function(m){for(;;)switch(m.prev=m.next){case 0:for(i=r.concat().sort((function(e,t){return e.number-t.number})).filter((function(e,t,r){return!t||e.number!==r[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>",d={},(d=l(n=n||{})).headers&&delete d.headers["x-oss-server-side-encryption"],d.subres={uploadId:t},f=this._objectRequestParams("POST",e,d),s.encodeCallback(f,d),f.mime="xml",f.content=a,f.headers&&f.headers["x-oss-callback"]||(f.xmlResponse=!0),f.successStatuses=[200],m.next=17,o.default.awrap(this.request(f));case 17:return h=m.sent,p={res:h.res,bucket:f.bucket,name:e,etag:h.res.headers.etag},f.headers&&f.headers["x-oss-callback"]&&(p.data=JSON.parse(h.data.toString())),m.abrupt("return",p);case 21:case"end":return m.stop()}}),null,this)},c._uploadPart=function(e,t,r,n,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":n.size},s.subres={partNumber:r,uploadId:t},(l=this._objectRequestParams("PUT",e,s)).mime=s.mime,l.stream=n.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 n.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,r){"use strict";var n=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=r;l.copy=function(e,t,r,a){var s,l,c;return n.default.async((function(u){for(;;)switch(u.prev=u.next){case 0:return"object"===(void 0===r?"undefined":(0,o.default)(r))&&(a=r),(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,r),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,n.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,r){"use strict";var n=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}r.delete=function(e){var t,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.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,n.default.awrap(this.request(t));case 6:return r=a.sent,a.abrupt("return",{res:r.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,r){"use strict";var n=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;r.deleteMulti=function(e){var t,r,o,l,c,u,d,f,h,p,m,g,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.default.async((function(b){for(;;)switch(b.prev=b.next){case 0:if(t=[],e&&e.length){b.next=3;break}throw new Error("names is required");case 3:for(r=0;r<e.length;r++)o={},"string"==typeof e[r]?o.Key=a.escape(this._objectName(e[r])):(l=e[r],c=l.key,u=l.versionId,o.Key=a.escape(this._objectName(c)),o.VersionId=u),t.push(o);return d={Delete:{Quiet:!!v.quiet,Object:t}},f=s(d,{headers:!0}),v.subres=(0,i.default)({delete:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),(h=this._objectRequestParams("POST","",v)).mime="xml",h.content=f,h.xmlResponse=!0,h.successStatuses=[200],b.next=15,n.default.awrap(this.request(h));case 15:return p=b.sent,m=p.data,(g=m&&m.Deleted||null)&&(Array.isArray(g)||(g=[g])),b.abrupt("return",{res:p.res,deleted:g||[]});case 20:case"end":return b.stop()}}),null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(e,t,r){"use strict";var n=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}r.deleteObjectTagging=function(e){var t,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.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,n.default.awrap(this.request(t));case 7:return r=a.sent,a.abrupt("return",{status:r.status,res:r.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,r){"use strict";var n=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");r.get=function(e,t){var r,o,l,c,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.default.async((function(d){for(;;)switch(d.prev=d.next){case 0:return r=null,o=!1,s.writableStream(t)?r=t:s.string(t)?(r=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,d.prev=8,(c=this._objectRequestParams("GET",e,u)).writeStream=r,c.successStatuses=[200,206,304],d.next=14,n.default.awrap(this.request(c));case 14:l=d.sent,o&&r.destroy(),d.next=25;break;case 18:if(d.prev=18,d.t0=d.catch(8),!o){d.next=24;break}return r.destroy(),d.next=24,n.default.awrap(this._deleteFileSafe(t));case 24:throw d.t0;case 25:return d.abrupt("return",{res:l.res,content:l.data});case 26:case"end":return d.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,r){"use strict";var n=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}r.getACL=function(e){var t,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.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,n.default.awrap(this.request(t));case 8:return r=a.sent,a.abrupt("return",{acl:r.data.AccessControlList.Grant,owner:{id:r.data.Owner.ID,displayName:r.data.Owner.DisplayName},res:r.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,r){"use strict";var n=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=r,l=e("../utils/isObject").isObject,c=e("../utils/isArray").isArray;function u(){var e,t,r,n,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(d){for(;;)switch(d.prev=d.next){case 0:if(!l.versionIdMarker||void 0!==l.keyMarker){d.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=f(l),d.next=10,i.default.awrap(this.request(e));case 10:return t=d.sent,r=t.data.Version||[],n=t.data.DeleteMarker||[],a=this,r&&(Array.isArray(r)||(r=[r]),r=r.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}}}))),n&&(c(n)||(n=[n]),n=n.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}))),d.abrupt("return",{res:t.res,objects:r,deleteMarker:n,prefixes:s,nextMarker:t.data.NextMarker||null,NextVersionIdMarker:t.data.NextVersionIdMarker||null,isTruncated:"true"===t.data.IsTruncated});case 19:case"end":return d.stop()}}),null,this)}function d(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return l(e)&&(0,n.default)(e).forEach((function(r){t[d(r)]=e[r]})),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,r){"use strict";var n=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}r.getObjectMeta=function(e,t){var r,o;return n.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),(r=this._objectRequestParams("HEAD",e,t)).successStatuses=[200],a.next=8,n.default.awrap(this.request(r));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,r){"use strict";var n=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=r,s=e("../utils/isObject").isObject;a.getObjectTagging=function(e){var t,r,o,a,l,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.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,n.default.awrap(this.request(t));case 7:return r=u.sent,u.next=10,n.default.awrap(this.parseXML(r.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:r.status,res:r.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,r){"use strict";var n=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}r.getSymlink=function(e){var t,r,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.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,n.default.awrap(this.request(t));case 7:return r=s.sent,o=r.res.headers["x-oss-symlink-target"],s.abrupt("return",{targetName:decodeURIComponent(o),res:r.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,r){"use strict";var n=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}}r.head=function(e){var t,r,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.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,n.default.awrap(this.request(t));case 6:return r=l.sent,a={meta:null,res:r.res,status:r.status},200===r.status&&(0,i.default)(r.headers).forEach((function(e){0===e.indexOf("x-oss-meta-")&&(a.meta||(a.meta={}),a.meta[e.substring(11)]=r.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,r){"use strict";var n=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}r.putACL=function(e,t,r){var o,a;return n.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return(r=r||{}).subres=(0,i.default)({acl:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),r.headers=r.headers||{},r.headers["x-oss-object-acl"]=t,e=this._objectName(e),(o=this._objectRequestParams("PUT",e,r)).successStatuses=[200],s.next=10,n.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,r){"use strict";var n=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;r.putObjectTagging=function(e,t){var r,a,c,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.default.async((function(d){for(;;)switch(d.prev=d.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),(r=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}}},r.mime="xml",r.content=s(a),d.next=12,n.default.awrap(this.request(r));case 12:return c=d.sent,d.abrupt("return",{res:c.res,status:c.status});case 14:case"end":return d.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,r){"use strict";var n=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}r.putSymlink=function(e,t,r){var o,a;return n.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return(r=r||{}).headers=r.headers||{},t=this._escape(this._objectName(t)),this._convertMetaToHeaders(r.meta,r.headers),r.headers["x-oss-symlink-target"]=t,r.subres=(0,i.default)({symlink:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),r.storageClass&&(r.headers["x-oss-storage-class"]=r.storageClass),e=this._objectName(e),(o=this._objectRequestParams("PUT",e,r)).successStatuses=[200],s.next=13,n.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,r){"use strict";var n=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=r;a._parallelNode=function(e,t,r,o){var a,s,l,c,u,d,f,h;return n.default.async((function(p){for(;;)switch(p.prev=p.next){case 0:a=this,s=[],l=[],c=e.length/t,u=e.length%t,d=0===u?c:(e.length-u)/t+1,f=1,h=0;case 8:if(!(h<e.length)){p.next=26;break}if(!a.isCancel()){p.next=11;break}return p.abrupt("break",26);case 11:if(o?l.push(r(a,e[h],o)):l.push(r(a,e[h])),l.length!==t&&(f!==d||h!==e.length-1)){p.next=23;break}return p.prev=13,f+=1,p.next=17,n.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:h++,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,r){var n=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&&!n.isCancel()?{value:a[s],key:s}:null}),u=!1,d=0,f=!1;g()}function h(e){return function(){if(null===e)throw new Error("Callback was already called.");var t=e;e=null;for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}function p(e,t){d-=1,e?(u=!0,o.push(e),i(o)):t==={}||u&&d<=0?(u=!0,i(o)):f||(n.isCancel()?i(o):g())}function m(e,t){r(e).then((function(e){t(null,e)})).catch((function(e){t(e)}))}function g(){for(f=!0;d<t&&!u&&!n.isCancel();){var e=c();if(null===e||o.length>0)return u=!0,void(d<=0&&i(o));d+=1,m(e.value,h(p))}f=!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,r){(function(t){"use strict";var n=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");r.buildCanonicalizedResource=function(e,t){var r=""+e,n="?";return s.string(t)&&""!==t.trim()?r+=n+t:s.array(t)?(t.sort(),r+=n+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){r+=n+e,t[e]&&(r+="="+t[e]),n="&"})),r},r.buildCanonicalString=function(e,t,r,n){var o=(r=r||{}).headers||{},a=[],s={},l=[e.toUpperCase(),o["Content-Md5"]||"",o["Content-Type"]||o["Content-Type".toLowerCase()],n||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,r.parameters)),l.join("\n")},r.computeSignature=function(e,r){return a.createHmac("sha1",e).update(t.from(r,"utf8")).digest("base64")},r.authorization=function(e,t,r){return"OSS "+e+":"+this.computeSignature(t,r)},r._signatureForURL=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments[2],a=arguments[3],s={},l=r.subResource,c=void 0===l?{}:l;if(r.process){var u="x-oss-process";c[u]=r.process}if(r.trafficLimit){var d="x-oss-traffic-limit";c[d]=r.trafficLimit}if(r.response&&(0,i.default)(r.response).forEach((function(e){var t="response-"+e.toLowerCase();c[t]=r.response[e]})),(0,i.default)(r).forEach((function(e){var t=e.toLowerCase(),n=r[e];0===t.indexOf("x-oss-")?s[t]=n:(0===t.indexOf("content-md5")||0===t.indexOf("content-type"))&&(s[e]=n)})),Object.prototype.hasOwnProperty.call(r,"security-token")&&(c["security-token"]=r["security-token"]),Object.prototype.hasOwnProperty.call(r,"callback")){var f={callbackUrl:encodeURI(r.callback.url),callbackBody:r.callback.body};if(r.callback.host&&(f.callbackHost=r.callback.host),r.callback.contentType&&(f.callbackBodyType=r.callback.contentType),c.callback=t.from((0,n.default)(f)).toString("base64"),r.callback.customValue){var h={};(0,i.default)(r.callback.customValue).forEach((function(e){h["x:"+e]=r.callback.customValue[e]})),c["callback-var"]=t.from((0,n.default)(h)).toString("base64")}}var p=this.buildCanonicalString(r.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,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.checkBucketName=void 0,r.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,r){"use strict";var n,i=e("babel-runtime/core-js/object/entries"),o=(n=i)&&n.__esModule?n:{default:n};Object.defineProperty(r,"__esModule",{value:!0}),r.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"}])};r.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 r=["key","value"];t.forEach((function(e){e.forEach((function(e,t){a(e,c[r[t]])}))}))}},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.checkValid=void 0,r.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,r){(function(t){"use strict";var n,i=e("babel-runtime/core-js/object/assign"),o=(n=i)&&n.__esModule?n:{default:n};Object.defineProperty(r,"__esModule",{value:!0}),r.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"),d=e("path");function f(e,t){return e[t]||e[t.toLowerCase()]}r.createRequest=function(e){var r=new Date;this.options.amendTimeSkewed&&(r=+new Date+this.options.amendTimeSkewed);var n={"x-oss-date":c(r,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(n["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,o.default)(n,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(n["x-oss-security-token"]=this.options.stsToken),u(e.headers).to(n),f(n,"Content-Type")||(e.mime&&e.mime.indexOf("/")>0?n["Content-Type"]=e.mime:n["Content-Type"]=l.getType(e.mime||d.extname(e.object||""))),f(n,"Content-Type")||function(e,t){delete e[t],delete e[t.toLowerCase()]}(n,"Content-Type"),e.content&&(n["Content-Md5"]=a.createHash("md5").update(t.from(e.content,"utf8")).digest("base64"),n["Content-Length"]||(n["Content-Length"]=e.content.length));var i=this._getResource(e);n.authorization=this.authorization(e.method,i,e.subres,n);var h=this._getReqUrl(e);s("request %s %s, with headers %j, !!stream: %s",e.method,h,n,!!e.stream);var p=e.timeout||this.options.timeout,m={method:e.method,content:e.content,stream:e.stream,headers:n,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:h,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,r){"use strict";var n=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(r,"__esModule",{value:!0}),r.deepCopy=void 0,r.deepCopy=function(e){if(null===e||"object"!==(void 0===e?"undefined":(0,i.default)(e)))return e;var t=Array.isArray(e)?[]:{};return(0,n.default)(e).forEach((function(n){t[n]=r.deepCopy(e[n])})),t}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(e,t,r){"use strict";var n=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(r,"__esModule",{value:!0}),r.formatObjKey=void 0,r.formatObjKey=function e(t,r){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],r))}else o={},(0,n.default)(t).forEach((function(n){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}(n,r)]=e(t[n],r)}));return o}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getStrBytesCount=void 0,r.getStrBytesCount=function(e){for(var t=0,r=0;r<e.length;r++){var n=e.charAt(r);/^[\u00-\uff]$/.test(n)?t+=1:t+=2}return t}},{}],42:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isArray=void 0,r.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],43:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isBlob=void 0,r.isBlob=function(e){return"undefined"!=typeof Blob&&e instanceof Blob}},{}],44:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isFile=void 0,r.isFile=function(e){return"undefined"!=typeof File&&e instanceof File}},{}],45:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isIP=void 0,r.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,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isObject=void 0,r.isObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)}},{}],47:[function(e,t,r){"use strict";var n,i=e("babel-runtime/core-js/object/keys"),o=(n=i)&&n.__esModule?n:{default:n};Object.defineProperty(r,"__esModule",{value:!0}),r.obj2xml=void 0;var a=e("./formatObjKey");function s(e){return Object.prototype.toString.call(e).replace(/(.*? |])/g,"").toLowerCase()}r.obj2xml=function e(t,r){var n="";return r&&r.headers&&(n='<?xml version="1.0" encoding="UTF-8"?>\n'),r&&r.firstUpperCase&&(t=a.formatObjKey(t,"firstUpperCase")),"object"===s(t)?(0,o.default)(t).forEach((function(r){"string"===s(t[r])||"number"===s(t[r])?n+="<"+r+">"+t[r]+"</"+r+">":"object"===s(t[r])?n+="<"+r+">"+e(t[r])+"</"+r+">":"array"===s(t[r])?n+=t[r].map((function(t){return"<"+r+">"+e(t)+"</"+r+">"})).join(""):n+="<"+r+">"+t[r].toString()+"</"+r+">"})):n+=t.toString(),n}},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(e,t,r){function n(){}t.exports=n,t.exports.HttpsAgent=n},{}],49:[function(e,t,r){t.exports=e("./register")().Promise},{"./register":51}],50:[function(e,t,r){"use strict";var n=null;t.exports=function(e,t){return function(r,i){r=r||null;var o=!1!==(i=i||{}).global;if(null===n&&o&&(n=e["@@any-promise/REGISTRATION"]||null),null!==n&&null!==r&&n.implementation!==r)throw new Error('any-promise already defined as "'+n.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return null===n&&(n=null!==r&&void 0!==i.Promise?{Promise:i.Promise,implementation:r}:t(r),o&&(e["@@any-promise/REGISTRATION"]=n)),n}}},{}],51:[function(e,t,r){"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,r){t.exports={default:e("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(e,t,r){t.exports={default:e("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(e,t,r){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,r){t.exports={default:e("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(e,t,r){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,r){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,r){t.exports={default:e("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(e,t,r){t.exports={default:e("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(e,t,r){t.exports={default:e("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(e,t,r){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,r){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(e,t,r){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,r){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(e,t,r){"use strict";r.__esModule=!0;var n=a(e("../core-js/symbol/iterator")),i=a(e("../core-js/symbol")),o="function"==typeof i.default&&"symbol"==typeof n.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}}r.default="function"==typeof i.default&&"symbol"===o(n.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,r){t.exports=e("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(e,t,r){"use strict";r.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n=c(e),a=n[0],s=n[1],l=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),u=0,d=s>0?a-4:a;for(r=0;r<d;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,l[u++]=255&t),1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=0,s=r-i;a<s;a+=16383)o.push(u(e,a,a+16383>s?s:a+16383));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s<l;++s)n[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 r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,r){for(var i,o,a=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],70:[function(e,t,r){var n,i;n=this,i=function(){var e=!0;function t(t){function r(e){var r=t.match(e);return r&&r.length>1&&r[1]||""}function n(e){var r=t.match(e);return r&&r.length>1&&r[2]||""}var i,a=r(/(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),d=/silk/i.test(t),f=/sailfish/i.test(t),h=/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&&!d&&/macintosh/i.test(t),b=!s&&!f&&!h&&!p&&/linux/i.test(t),y=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),x=r(/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||r(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(t)?i={name:"Opera",opera:e,version:r(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||x}:/SamsungBrowser/i.test(t)?i={name:"Samsung Internet for Android",samsungBrowser:e,version:x||r(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(t)?i={name:"NAVER Whale browser",whale:e,version:r(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(t)?i={name:"MZ Browser",mzbrowser:e,version:r(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(t)?i={name:"Opera Coast",coast:e,version:x||r(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(t)?i={name:"Focus",focus:e,version:r(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(t)?i={name:"Yandex Browser",yandexbrowser:e,version:x||r(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(t)?i={name:"UC Browser",ucbrowser:e,version:r(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(t)?i={name:"Maxthon",maxthon:e,version:r(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(t)?i={name:"Epiphany",epiphany:e,version:r(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(t)?i={name:"Puffin",puffin:e,version:r(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(t)?i={name:"Sleipnir",sleipnir:e,version:r(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(t)?i={name:"K-Meleon",kMeleon:e,version:r(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:m?(i={name:"Windows Phone",osname:"Windows Phone",windowsphone:e},y?(i.msedge=e,i.version=y):(i.msie=e,i.version=r(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?i={name:"Internet Explorer",msie:e,version:r(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:u?i={name:"Chrome",osname:"Chrome OS",chromeos:e,chromeBook:e,chrome:e,version:r(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(t)?i={name:"Microsoft Edge",msedge:e,version:y}:/vivaldi/i.test(t)?i={name:"Vivaldi",vivaldi:e,version:r(/vivaldi\/(\d+(\.\d+)?)/i)||x}:f?i={name:"Sailfish",osname:"Sailfish OS",sailfish:e,version:r(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?i={name:"SeaMonkey",seamonkey:e,version:r(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(t)?(i={name:"Firefox",firefox:e,version:r(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(i.firefoxos=e,i.osname="Firefox OS")):d?i={name:"Amazon Silk",silk:e,version:r(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(t)?i={name:"PhantomJS",phantom:e,version:r(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(t)?i={name:"SlimerJS",slimer:e,version:r(/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||r(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:p?(i={name:"WebOS",osname:"WebOS",webos:e,version:x||r(/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:r(/dolfin\/(\d+(\.\d+)?)/i)}:h?i={name:"Tizen",osname:"Tizen",tizen:e,version:r(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||x}:/qupzilla/i.test(t)?i={name:"QupZilla",qupzilla:e,version:r(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||x}:/chromium/i.test(t)?i={name:"Chromium",chromium:e,version:r(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||x}:/chrome|crios|crmo/i.test(t)?i={name:"Chrome",chrome:e,version:r(/(?: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:r(/googlebot\/(\d+(\.\d+))/i)||x}:{name:r(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!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||r(/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"):b&&(i.linux=e,i.osname="Linux"):(i.android=e,i.osname="Android");var _="";i.windows?_=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}}(r(/Windows ((NT|XP)( \d\d?.\d)?)/i)):i.windowsphone?_=r(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):i.mac?_=(_=r(/Mac OS X (\d+([_\.\s]\d+)*)/i)).replace(/[_\s]/g,"."):a?_=(_=r(/os (\d+([_\s]\d+)*) like mac os x/i)).replace(/[_\s]/g,"."):s?_=r(/android[ \/-](\d+(\.\d+)*)/i):i.webos?_=r(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):i.blackberry?_=r(/rim\stablet\sos\s(\d+(\.\d+)*)/i):i.bada?_=r(/bada\/(\d+(\.\d+)*)/i):i.tizen&&(_=r(/tizen[\/\s](\d+(\.\d+)*)/i)),_&&(i.osversion=_);var T=!i.windows&&_.split(".")[0];return w||c||"ipad"==a||s&&(3==T||T>=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 r=t("undefined"!=typeof navigator&&navigator.userAgent||"");function n(e){return e.split(".").length}function i(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r++)n.push(t(e[r]));return n}function o(e){for(var t=Math.max(n(e[0]),n(e[1])),r=i(e,(function(e){var r=t-n(e);return i((e+=new Array(r+1).join(".0")).split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));--t>=0;){if(r[0][t]>r[1][t])return 1;if(r[0][t]!==r[1][t])return-1;if(0===t)return 0}}function a(e,n,i){var a=r;"string"==typeof n&&(i=n,n=void 0),void 0===n&&(n=!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 n}return r.test=function(e){for(var t=0;t<e.length;++t){var n=e[t];if("string"==typeof n&&n in r)return!0}return!1},r.isUnsupportedBrowser=a,r.compareVersions=o,r.check=function(e,t,r){return!a(e,t,r)},r._detect=t,r.detect=t,r},void 0!==t&&t.exports?t.exports=i():"function"==typeof define&&define.amd?define("bowser",i):n.bowser=i()},{}],71:[function(e,t,r){},{}],72:[function(e,t,r){var n=e("buffer").Buffer,i=n.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=r.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 n(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 r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";if(e=e.slice(r,e.length),!((n=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n,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,(n=t.charCodeAt(i))>=55296&&n<=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 r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>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 r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},{buffer:73}],73:[function(e,t,r){(function(t,n){
/*!
* 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 n.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return n.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=n.prototype:(null===e&&(e=new n(t)),e.length=t),e}function n(e,t,r){if(!(n.TYPED_ARRAY_SUPPORT||this instanceof n))return new n(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,r)}function c(e,t,r,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,r,i){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,r):new Uint8Array(t,r,i),n.TYPED_ARRAY_SUPPORT?(e=t).__proto__=n.prototype:e=f(e,t),e}(e,t,r,i):"string"==typeof t?function(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!n.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var i=0|p(t,r),o=(e=l(e,i)).write(t,r);return o!==i&&(e=e.slice(0,o)),e}(e,t,r):function(e,t){if(n.isBuffer(t)){var r=0|h(t.length);return 0===(e=l(e,r)).length||t.copy(e,0,0,r),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):f(e,t);if("Buffer"===t.type&&a(t.data))return f(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 d(e,t){if(u(t),e=l(e,t<0?0:0|h(t)),!n.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function f(e,t){var r=t.length<0?0:0|h(t.length);e=l(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function h(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(n.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 r=e.length;if(0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(e).length;default:if(i)return B(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,i,o){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=n.from(t,i)),n.isBuffer(t))return 0===t.length?-1:b(e,t,r,i,o);if("number"==typeof t)return t&=255,n.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,i,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){var o,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=r;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(r+l>s&&(r=s-l),o=r;o>=0;o--){for(var d=!0,f=0;f<l;f++)if(c(e,o+f)!==c(t,f)){d=!1;break}if(d)return o}return-1}function y(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function x(e,t,r,n){return H(B(t,e.length-r),e,r,n)}function w(e,t,r,n){return H(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return w(e,t,r,n)}function S(e,t,r,n){return H(U(t),e,r,n)}function _(e,t,r,n){return H(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function T(e,t,r){return 0===t&&r===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,l,c=e[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=r)switch(d){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,d=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}function O(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function C(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function A(e,t,r){var n,i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);for(var o="",a=t;a<r;++a)o+=(n=e[a])<16?"0"+n.toString(16):n.toString(16);return o}function D(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function L(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,r,i,o,a){if(!n.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(r+i>e.length)throw new RangeError("Index out of range")}function j(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function R(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function M(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,i){return i||M(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function P(e,t,r,n,i){return i||M(e,0,r,8),o.write(e,t,r,n,52,8),r+8}r.Buffer=n,r.SlowBuffer=function(e){return+e!=e&&(e=0),n.alloc(+e)},r.INSPECT_MAX_BYTES=50,n.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}}(),r.kMaxLength=s(),n.poolSize=8192,n._augment=function(e){return e.__proto__=n.prototype,e},n.from=function(e,t,r){return c(null,e,t,r)},n.TYPED_ARRAY_SUPPORT&&(n.prototype.__proto__=Uint8Array.prototype,n.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&n[Symbol.species]===n&&Object.defineProperty(n,Symbol.species,{value:null,configurable:!0})),n.alloc=function(e,t,r){return function(e,t,r,n){return u(t),t<=0?l(e,t):void 0!==r?"string"==typeof n?l(e,t).fill(r,n):l(e,t).fill(r):l(e,t)}(null,e,t,r)},n.allocUnsafe=function(e){return d(null,e)},n.allocUnsafeSlow=function(e){return d(null,e)},n.isBuffer=function(e){return!(null==e||!e._isBuffer)},n.compare=function(e,t){if(!n.isBuffer(e)||!n.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,i=t.length,o=0,a=Math.min(r,i);o<a;++o)if(e[o]!==t[o]){r=e[o],i=t[o];break}return r<i?-1:i<r?1:0},n.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}},n.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return n.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var i=n.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var s=e[r];if(!n.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i},n.byteLength=p,n.prototype._isBuffer=!0,n.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},n.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},n.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},n.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?k(this,0,e):m.apply(this,arguments)},n.prototype.equals=function(e){if(!n.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===n.compare(this,e)},n.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},n.prototype.compare=function(e,t,r,i,o){if(!n.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),t<0||r>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=r)return 0;if(i>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(i>>>=0),s=(r>>>=0)-(t>>>=0),l=Math.min(a,s),c=this.slice(i,o),u=e.slice(t,r),d=0;d<l;++d)if(c[d]!==u[d]){a=c[d],s=u[d];break}return a<s?-1:s<a?1:0},n.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},n.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},n.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},n.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return x(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return E(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},n.prototype.slice=function(e,t){var r,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),n.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=n.prototype;else{var o=t-e;r=new n(o,void 0);for(var a=0;a<o;++a)r[a]=this[a+e]}return r},n.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},n.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},n.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},n.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},n.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},n.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},n.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},n.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},n.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},n.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},n.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},n.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},n.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),o.read(this,e,!0,23,4)},n.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),o.read(this,e,!1,23,4)},n.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),o.read(this,e,!0,52,8)},n.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),o.read(this,e,!1,52,8)},n.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||I(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},n.prototype.writeUIntBE=function(e,t,r,n){e=+e,t|=0,r|=0,n||I(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},n.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,255,0),n.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},n.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},n.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},n.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},n.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},n.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);I(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},n.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);I(this,e,t,r,i-1,-i)}var o=r-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+r},n.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,127,-128),n.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},n.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},n.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},n.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},n.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},n.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},n.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},n.prototype.writeDoubleLE=function(e,t,r){return P(this,e,t,!0,r)},n.prototype.writeDoubleBE=function(e,t,r){return P(this,e,t,!1,r)},n.prototype.copy=function(e,t,r,i){if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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-r&&(i=e.length-t+r);var o,a=i-r;if(this===e&&r<t&&t<i)for(o=a-1;o>=0;--o)e[o+t]=this[o+r];else if(a<1e3||!n.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+a),t);return a},n.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=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&&!n.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var s=n.isBuffer(e)?e:B(new n(e,i).toString()),l=s.length;for(a=0;a<r-t;++a)this[a+t]=s[a%l]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function B(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|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(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=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,r){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,r){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,r){
/*!
* copy-to - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/
"use strict";var n=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=n.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 r=0;r<t.length;r++)void 0===e[n=t[r]]&&(e[n]=this.src[n]);return e}for(r=0;r<t.length;r++){var n=t[r];if(o(e,n)){var i=this.src.__lookupGetter__(n),a=this.src.__lookupSetter__(n);i&&e.__defineGetter__(n,i),a&&e.__defineSetter__(n,a),i||a||(e[n]=this.src[n])}}return e},i.prototype.toCover=function(e){for(var t=this.keys||Object.keys(this.src),r=0;r<t.length;r++){var n=t[r];delete e[n];var i=this.src.__lookupGetter__(n),o=this.src.__lookupSetter__(n);i&&e.__defineGetter__(n,i),o&&e.__defineSetter__(n,o),i||o||(e[n]=this.src[n])}},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,r){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,r){var n=e("../../modules/_core"),i=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(e){return i.stringify.apply(i,arguments)}},{"../../modules/_core":99}],79:[function(e,t,r){e("../../modules/es6.object.assign"),t.exports=e("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(e,t,r){e("../../modules/es6.object.create");var n=e("../../modules/_core").Object;t.exports=function(e,t){return n.create(e,t)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(e,t,r){e("../../modules/es6.object.define-property");var n=e("../../modules/_core").Object;t.exports=function(e,t,r){return n.defineProperty(e,t,r)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(e,t,r){e("../../modules/es7.object.entries"),t.exports=e("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(e,t,r){e("../../modules/es6.object.get-own-property-names");var n=e("../../modules/_core").Object;t.exports=function(e){return n.getOwnPropertyNames(e)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(e,t,r){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,r){e("../../modules/es6.object.keys"),t.exports=e("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(e,t,r){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,r){e("../modules/web.immediate"),t.exports=e("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(e,t,r){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,r){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,r){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,r){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,r){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],93:[function(e,t,r){t.exports=function(){}},{}],94:[function(e,t,r){t.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},{}],95:[function(e,t,r){var n=e("./_is-object");t.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},{"./_is-object":119}],96:[function(e,t,r){var n=e("./_to-iobject"),i=e("./_to-length"),o=e("./_to-absolute-index");t.exports=function(e){return function(t,r,a){var s,l=n(t),c=i(l.length),u=o(a,c);if(e&&r!=r){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===r)return e||u||0;return!e&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(e,t,r){var n=e("./_cof"),i=e("./_wks")("toStringTag"),o="Arguments"==n(function(){return arguments}());t.exports=function(e){var t,r,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:o?n(t):"Object"==(a=n(t))&&"function"==typeof t.callee?"Arguments":a}},{"./_cof":98,"./_wks":166}],98:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],99:[function(e,t,r){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},{}],100:[function(e,t,r){"use strict";var n=e("./_object-dp"),i=e("./_property-desc");t.exports=function(e,t,r){t in e?n.f(e,t,i(0,r)):e[t]=r}},{"./_object-dp":132,"./_property-desc":146}],101:[function(e,t,r){var n=e("./_a-function");t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":92}],102:[function(e,t,r){t.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},{}],103:[function(e,t,r){t.exports=!e("./_fails")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},{"./_fails":108}],104:[function(e,t,r){var n=e("./_is-object"),i=e("./_global").document,o=n(i)&&n(i.createElement);t.exports=function(e){return o?i.createElement(e):{}}},{"./_global":110,"./_is-object":119}],105:[function(e,t,r){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(e,t,r){var n=e("./_object-keys"),i=e("./_object-gops"),o=e("./_object-pie");t.exports=function(e){var t=n(e),r=i.f;if(r)for(var a,s=r(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,r){var n=e("./_global"),i=e("./_core"),o=e("./_ctx"),a=e("./_hide"),s=e("./_has"),l=function(e,t,r){var c,u,d,f=e&l.F,h=e&l.G,p=e&l.S,m=e&l.P,g=e&l.B,v=e&l.W,b=h?i:i[t]||(i[t]={}),y=b.prototype,x=h?n:p?n[t]:(n[t]||{}).prototype;for(c in h&&(r=t),r)(u=!f&&x&&void 0!==x[c])&&s(b,c)||(d=u?x[c]:r[c],b[c]=h&&"function"!=typeof x[c]?r[c]:g&&u?o(d,n):v&&x[c]==d?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):m&&"function"==typeof d?o(Function.call,d):d,m&&((b.virtual||(b.virtual={}))[c]=d,e&l.R&&y&&!y[c]&&a(y,c,d)))};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,r){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],109:[function(e,t,r){var n=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={};(r=t.exports=function(e,t,r,d,f){var h,p,m,g,v=f?function(){return e}:l(e),b=n(r,d,t?2:1),y=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(o(v)){for(h=s(e.length);h>y;y++)if((g=t?b(a(p=e[y])[0],p[1]):b(e[y]))===c||g===u)return g}else for(m=v.call(e);!(p=m.next()).done;)if((g=i(m,b,p.value,t))===c||g===u)return g}).BREAK=c,r.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,r){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],111:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],112:[function(e,t,r){var n=e("./_object-dp"),i=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(e,t,r){var n=e("./_global").document;t.exports=n&&n.documentElement},{"./_global":110}],114:[function(e,t,r){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,r){t.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},{}],116:[function(e,t,r){var n=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./_cof":98}],117:[function(e,t,r){var n=e("./_iterators"),i=e("./_wks")("iterator"),o=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||o[i]===e)}},{"./_iterators":125,"./_wks":166}],118:[function(e,t,r){var n=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./_cof":98}],119:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],120:[function(e,t,r){var n=e("./_an-object");t.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){var o=e.return;throw void 0!==o&&n(o.call(e)),t}}},{"./_an-object":95}],121:[function(e,t,r){"use strict";var n=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,r){e.prototype=n(a,{next:i(1,r)}),o(e,t+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(e,t,r){"use strict";var n=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"),d=e("./_wks")("iterator"),f=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(e,t,r,p,m,g,v){l(r,t,p);var b,y,x,w=function(e){if(!f&&e in T)return T[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},E=t+" Iterator",S="values"==m,_=!1,T=e.prototype,k=T[d]||T["@@iterator"]||m&&T[m],O=k||w(m),C=m?S?w("entries"):O:void 0,A="Array"==t&&T.entries||k;if(A&&(x=u(A.call(new e)))!==Object.prototype&&x.next&&(c(x,E,!0),n||"function"==typeof x[d]||a(x,d,h)),S&&k&&"values"!==k.name&&(_=!0,O=function(){return k.call(this)}),n&&!v||!f&&!_&&T[d]||a(T,d,O),s[t]=O,s[E]=h,m)if(b={values:S?O:w("values"),keys:g?O:w("keys"),entries:C},v)for(y in b)y in T||o(T,y,b[y]);else i(i.P+i.F*(f||_),t,b);return b}},{"./_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,r){var n=e("./_wks")("iterator"),i=!1;try{var o=[7][n]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(e){}t.exports=function(e,t){if(!t&&!i)return!1;var r=!1;try{var o=[7],a=o[n]();a.next=function(){return{done:r=!0}},o[n]=function(){return a},e(o)}catch(e){}return r}},{"./_wks":166}],124:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],125:[function(e,t,r){t.exports={}},{}],126:[function(e,t,r){t.exports=!0},{}],127:[function(e,t,r){var n=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,n,{value:{i:"O"+ ++s,w:{}}})},d=t.exports={KEY:n,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,n)){if(!l(e))return"F";if(!t)return"E";u(e)}return e[n].i},getWeak:function(e,t){if(!o(e,n)){if(!l(e))return!0;if(!t)return!1;u(e)}return e[n].w},onFreeze:function(e){return c&&d.NEED&&l(e)&&!o(e,n)&&u(e),e}}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(e,t,r){var n=e("./_global"),i=e("./_task").set,o=n.MutationObserver||n.WebKitMutationObserver,a=n.process,s=n.Promise,l="process"==e("./_cof")(a);t.exports=function(){var e,t,r,c=function(){var n,i;for(l&&(n=a.domain)&&n.exit();e;){i=e.fn,e=e.next;try{i()}catch(n){throw e?r():t=void 0,n}}t=void 0,n&&n.enter()};if(l)r=function(){a.nextTick(c)};else if(!o||n.navigator&&n.navigator.standalone)if(s&&s.resolve){var u=s.resolve(void 0);r=function(){u.then(c)}}else r=function(){i.call(n,c)};else{var d=!0,f=document.createTextNode("");new o(c).observe(f,{characterData:!0}),r=function(){f.data=d=!d}}return function(n){var i={fn:n,next:void 0};t&&(t.next=i),e||(e=i,r()),t=i}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(e,t,r){"use strict";var n=e("./_a-function");function i(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)}t.exports.f=function(e){return new i(e)}},{"./_a-function":92}],130:[function(e,t,r){"use strict";var n=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={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=c({},e)[r]||Object.keys(c({},t)).join("")!=n}))?function(e,t){for(var r=s(e),c=arguments.length,u=1,d=o.f,f=a.f;c>u;)for(var h,p=l(arguments[u++]),m=d?i(p).concat(d(p)):i(p),g=m.length,v=0;g>v;)h=m[v++],n&&!f.call(p,h)||(r[h]=p[h]);return r}:c},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(e,t,r){var n=e("./_an-object"),i=e("./_object-dps"),o=e("./_enum-bug-keys"),a=e("./_shared-key")("IE_PROTO"),s=function(){},l=function(){var t,r=e("./_dom-create")("iframe"),n=o.length;for(r.style.display="none",e("./_html").appendChild(r),r.src="javascript:",(t=r.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),l=t.F;n--;)delete l.prototype[o[n]];return l()};t.exports=Object.create||function(e,t){var r;return null!==e?(s.prototype=n(e),r=new s,s.prototype=null,r[a]=e):r=l(),void 0===t?r:i(r,t)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(e,t,r){var n=e("./_an-object"),i=e("./_ie8-dom-define"),o=e("./_to-primitive"),a=Object.defineProperty;r.f=e("./_descriptors")?Object.defineProperty:function(e,t,r){if(n(e),t=o(t,!0),n(r),i)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(e,t,r){var n=e("./_object-dp"),i=e("./_an-object"),o=e("./_object-keys");t.exports=e("./_descriptors")?Object.defineProperties:function(e,t){i(e);for(var r,a=o(t),s=a.length,l=0;s>l;)n.f(e,r=a[l++],t[r]);return e}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(e,t,r){var n=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;r.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(!n.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,r){var n=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(n(e))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(e,t,r){var n=e("./_object-keys-internal"),i=e("./_enum-bug-keys").concat("length","prototype");r.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(e,t,r){r.f=Object.getOwnPropertySymbols},{}],138:[function(e,t,r){var n=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),n(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,r){var n=e("./_has"),i=e("./_to-iobject"),o=e("./_array-includes")(!1),a=e("./_shared-key")("IE_PROTO");t.exports=function(e,t){var r,s=i(e),l=0,c=[];for(r in s)r!=a&&n(s,r)&&c.push(r);for(;t.length>l;)n(s,r=t[l++])&&(~o(c,r)||c.push(r));return c}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(e,t,r){var n=e("./_object-keys-internal"),i=e("./_enum-bug-keys");t.exports=Object.keys||function(e){return n(e,i)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(e,t,r){r.f={}.propertyIsEnumerable},{}],142:[function(e,t,r){var n=e("./_export"),i=e("./_core"),o=e("./_fails");t.exports=function(e,t){var r=(i.Object||{})[e]||Object[e],a={};a[e]=t(r),n(n.S+n.F*o((function(){r(1)})),"Object",a)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(e,t,r){var n=e("./_descriptors"),i=e("./_object-keys"),o=e("./_to-iobject"),a=e("./_object-pie").f;t.exports=function(e){return function(t){for(var r,s=o(t),l=i(s),c=l.length,u=0,d=[];c>u;)r=l[u++],n&&!a.call(s,r)||d.push(e?[r,s[r]]:s[r]);return d}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(e,t,r){t.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},{}],145:[function(e,t,r){var n=e("./_an-object"),i=e("./_is-object"),o=e("./_new-promise-capability");t.exports=function(e,t){if(n(e),i(t)&&t.constructor===e)return t;var r=o.f(e);return(0,r.resolve)(t),r.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],147:[function(e,t,r){var n=e("./_hide");t.exports=function(e,t,r){for(var i in t)r&&e[i]?e[i]=t[i]:n(e,i,t[i]);return e}},{"./_hide":112}],148:[function(e,t,r){t.exports=e("./_hide")},{"./_hide":112}],149:[function(e,t,r){"use strict";var n=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]:n[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,r){var n=e("./_object-dp").f,i=e("./_has"),o=e("./_wks")("toStringTag");t.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(e,t,r){var n=e("./_shared")("keys"),i=e("./_uid");t.exports=function(e){return n[e]||(n[e]=i(e))}},{"./_shared":152,"./_uid":162}],152:[function(e,t,r){var n=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:n.version,mode:e("./_library")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(e,t,r){var n=e("./_an-object"),i=e("./_a-function"),o=e("./_wks")("species");t.exports=function(e,t){var r,a=n(e).constructor;return void 0===a||null==(r=n(a)[o])?t:i(r)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(e,t,r){var n=e("./_to-integer"),i=e("./_defined");t.exports=function(e){return function(t,r){var o,a,s=String(i(t)),l=n(r),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,r){var n,i,o,a=e("./_ctx"),s=e("./_invoke"),l=e("./_html"),c=e("./_dom-create"),u=e("./_global"),d=u.process,f=u.setImmediate,h=u.clearImmediate,p=u.MessageChannel,m=u.Dispatch,g=0,v={},b=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},y=function(e){b.call(e.data)};f&&h||(f=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return v[++g]=function(){s("function"==typeof e?e:Function(e),t)},n(g),g},h=function(e){delete v[e]},"process"==e("./_cof")(d)?n=function(e){d.nextTick(a(b,e,1))}:m&&m.now?n=function(e){m.now(a(b,e,1))}:p?(o=(i=new p).port2,i.port1.onmessage=y,n=a(o.postMessage,o,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(n=function(e){u.postMessage(e+"","*")},u.addEventListener("message",y,!1)):n="onreadystatechange"in c("script")?function(e){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),b.call(e)}}:function(e){setTimeout(a(b,e,1),0)}),t.exports={set:f,clear:h}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(e,t,r){var n=e("./_to-integer"),i=Math.max,o=Math.min;t.exports=function(e,t){return(e=n(e))<0?i(e+t,0):o(e,t)}},{"./_to-integer":157}],157:[function(e,t,r){var n=Math.ceil,i=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},{}],158:[function(e,t,r){var n=e("./_iobject"),i=e("./_defined");t.exports=function(e){return n(i(e))}},{"./_defined":102,"./_iobject":116}],159:[function(e,t,r){var n=e("./_to-integer"),i=Math.min;t.exports=function(e){return e>0?i(n(e),9007199254740991):0}},{"./_to-integer":157}],160:[function(e,t,r){var n=e("./_defined");t.exports=function(e){return Object(n(e))}},{"./_defined":102}],161:[function(e,t,r){var n=e("./_is-object");t.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(e,t,r){var n=0,i=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},{}],163:[function(e,t,r){var n=e("./_global").navigator;t.exports=n&&n.userAgent||""},{"./_global":110}],164:[function(e,t,r){var n=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?{}:n.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,r){r.f=e("./_wks")},{"./_wks":166}],166:[function(e,t,r){var n=e("./_shared")("wks"),i=e("./_uid"),o=e("./_global").Symbol,a="function"==typeof o;(t.exports=function(e){return n[e]||(n[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=n},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(e,t,r){var n=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[n(e)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(e,t,r){"use strict";var n=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,r,i,d,f=o(e),h="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m,v=0,b=u(f);if(g&&(m=n(m,p>2?arguments[2]:void 0,2)),null==b||h==Array&&s(b))for(r=new h(t=l(f.length));t>v;v++)c(r,v,g?m(f[v],v):f[v]);else for(d=b.call(f),r=new h;!(i=d.next()).done;v++)c(r,v,g?a(d,m,[i.value,v],!0):i.value);return r.length=v,r}})},{"./_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,r){"use strict";var n=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,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])}),"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(e,t,r){"use strict";var n=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||!n(e))return!1;if(!n(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,r){var n=e("./_export");n(n.S+n.F,"Object",{assign:e("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{create:e("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(e,t,r){var n=e("./_export");n(n.S+n.F*!e("./_descriptors"),"Object",{defineProperty:e("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(e,t,r){e("./_object-sap")("getOwnPropertyNames",(function(){return e("./_object-gopn-ext").f}))},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(e,t,r){var n=e("./_to-object"),i=e("./_object-gpo");e("./_object-sap")("getPrototypeOf",(function(){return function(e){return i(n(e))}}))},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(e,t,r){var n=e("./_to-object"),i=e("./_object-keys");e("./_object-sap")("keys",(function(){return function(e){return i(n(e))}}))},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(e,t,r){arguments[4][71][0].apply(r,arguments)},{dup:71}],178:[function(e,t,r){"use strict";var n,i,o,a,s=e("./_library"),l=e("./_global"),c=e("./_ctx"),u=e("./_classof"),d=e("./_export"),f=e("./_is-object"),h=e("./_a-function"),p=e("./_an-instance"),m=e("./_for-of"),g=e("./_species-constructor"),v=e("./_task").set,b=e("./_microtask")(),y=e("./_new-promise-capability"),x=e("./_perform"),w=e("./_user-agent"),E=e("./_promise-resolve"),S=l.TypeError,_=l.process,T=_&&_.versions,k=T&&T.v8||"",O=l.Promise,C="process"==u(_),A=function(){},D=i=y.f,L=!!function(){try{var t=O.resolve(1),r=(t.constructor={})[e("./_wks")("species")]=function(e){e(A,A)};return(C||"function"==typeof PromiseRejectionEvent)&&t.then(A)instanceof r&&0!==k.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(e){}}(),I=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},j=function(e,t){if(!e._n){e._n=!0;var r=e._c;b((function(){for(var n=e._v,i=1==e._s,o=0,a=function(t){var r,o,a,s=i?t.ok:t.fail,l=t.resolve,c=t.reject,u=t.domain;try{s?(i||(2==e._h&&N(e),e._h=1),!0===s?r=n:(u&&u.enter(),r=s(n),u&&(u.exit(),a=!0)),r===t.promise?c(S("Promise-chain cycle")):(o=I(r))?o.call(r,l,c):l(r)):c(n)}catch(e){u&&!a&&u.exit(),c(e)}};r.length>o;)a(r[o++]);e._c=[],e._n=!1,t&&!e._h&&R(e)}))}},R=function(e){v.call(l,(function(){var t,r,n,i=e._v,o=M(e);if(o&&(t=x((function(){C?_.emit("unhandledRejection",i,e):(r=l.onunhandledrejection)?r({promise:e,reason:i}):(n=l.console)&&n.error&&n.error("Unhandled promise rejection",i)})),e._h=C||M(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},M=function(e){return 1!==e._h&&0===(e._a||e._c).length},N=function(e){v.call(l,(function(){var t;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()),j(t,!0))},F=function(e){var t,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw S("Promise can't be resolved itself");(t=I(e))?b((function(){var n={_w:r,_d:!1};try{t.call(e,c(F,n,1),c(P,n,1))}catch(e){P.call(n,e)}})):(r._v=e,r._s=1,j(r,!1))}catch(e){P.call({_w:r,_d:!1},e)}}};L||(O=function(e){p(this,O,"Promise","_h"),h(e),n.call(this);try{e(c(F,this,1),c(P,this,1))}catch(e){P.call(this,e)}},(n=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")(O.prototype,{then:function(e,t){var r=D(g(this,O));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=C?_.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&j(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new n;this.promise=e,this.resolve=c(F,e,1),this.reject=c(P,e,1)},y.f=D=function(e){return e===O||e===a?new o(e):i(e)}),d(d.G+d.W+d.F*!L,{Promise:O}),e("./_set-to-string-tag")(O,"Promise"),e("./_set-species")("Promise"),a=e("./_core").Promise,d(d.S+d.F*!L,"Promise",{reject:function(e){var t=D(this);return(0,t.reject)(e),t.promise}}),d(d.S+d.F*(s||!L),"Promise",{resolve:function(e){return E(s&&this===a?O:this,e)}}),d(d.S+d.F*!(L&&e("./_iter-detect")((function(e){O.all(e).catch(A)}))),"Promise",{all:function(e){var t=this,r=D(t),n=r.resolve,i=r.reject,o=x((function(){var r=[],o=0,a=1;m(e,!1,(function(e){var s=o++,l=!1;r.push(void 0),a++,t.resolve(e).then((function(e){l||(l=!0,r[s]=e,--a||n(r))}),i)})),--a||n(r)}));return o.e&&i(o.v),r.promise},race:function(e){var t=this,r=D(t),n=r.reject,i=x((function(){m(e,!1,(function(e){t.resolve(e).then(r.resolve,n)}))}));return i.e&&n(i.v),r.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,r){var n=e("./_export"),i=e("./_to-absolute-index"),o=String.fromCharCode,a=String.fromCodePoint;n(n.S+n.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,a=0;n>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");r.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return r.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(e,t,r){"use strict";var n=e("./_string-at")(!0);e("./_iter-define")(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})}))},{"./_iter-define":122,"./_string-at":154}],181:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_has"),o=e("./_descriptors"),a=e("./_export"),s=e("./_redefine"),l=e("./_meta").KEY,c=e("./_fails"),u=e("./_shared"),d=e("./_set-to-string-tag"),f=e("./_uid"),h=e("./_wks"),p=e("./_wks-ext"),m=e("./_wks-define"),g=e("./_enum-keys"),v=e("./_is-array"),b=e("./_an-object"),y=e("./_is-object"),x=e("./_to-object"),w=e("./_to-iobject"),E=e("./_to-primitive"),S=e("./_property-desc"),_=e("./_object-create"),T=e("./_object-gopn-ext"),k=e("./_object-gopd"),O=e("./_object-gops"),C=e("./_object-dp"),A=e("./_object-keys"),D=k.f,L=C.f,I=T.f,j=n.Symbol,R=n.JSON,M=R&&R.stringify,N=h("_hidden"),P=h("toPrimitive"),F={}.propertyIsEnumerable,B=u("symbol-registry"),U=u("symbols"),H=u("op-symbols"),z=Object.prototype,G="function"==typeof j&&!!O.f,K=n.QObject,W=!K||!K.prototype||!K.prototype.findChild,V=o&&c((function(){return 7!=_(L({},"a",{get:function(){return L(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=D(z,t);n&&delete z[t],L(e,t,r),n&&e!==z&&L(z,t,n)}:L,q=function(e){var t=U[e]=_(j.prototype);return t._k=e,t},X=G&&"symbol"==typeof j.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof j},Y=function(e,t,r){return e===z&&Y(H,t,r),b(e),t=E(t,!0),b(r),i(U,t)?(r.enumerable?(i(e,N)&&e[N][t]&&(e[N][t]=!1),r=_(r,{enumerable:S(0,!1)})):(i(e,N)||L(e,N,S(1,{})),e[N][t]=!0),V(e,t,r)):L(e,t,r)},$=function(e,t){b(e);for(var r,n=g(t=w(t)),i=0,o=n.length;o>i;)Y(e,r=n[i++],t[r]);return e},J=function(e){var t=F.call(this,e=E(e,!0));return!(this===z&&i(U,e)&&!i(H,e))&&(!(t||!i(this,e)||!i(U,e)||i(this,N)&&this[N][e])||t)},Z=function(e,t){if(e=w(e),t=E(t,!0),e!==z||!i(U,t)||i(H,t)){var r=D(e,t);return!r||!i(U,t)||i(e,N)&&e[N][t]||(r.enumerable=!0),r}},Q=function(e){for(var t,r=I(w(e)),n=[],o=0;r.length>o;)i(U,t=r[o++])||t==N||t==l||n.push(t);return n},ee=function(e){for(var t,r=e===z,n=I(r?H:w(e)),o=[],a=0;n.length>a;)!i(U,t=n[a++])||r&&!i(z,t)||o.push(U[t]);return o};G||(s((j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(r){this===z&&t.call(H,r),i(this,N)&&i(this[N],e)&&(this[N][e]=!1),V(this,e,S(1,r))};return o&&W&&V(z,e,{configurable:!0,set:t}),q(e)}).prototype,"toString",(function(){return this._k})),k.f=Z,C.f=Y,e("./_object-gopn").f=T.f=Q,e("./_object-pie").f=J,O.f=ee,o&&!e("./_library")&&s(z,"propertyIsEnumerable",J,!0),p.f=function(e){return q(h(e))}),a(a.G+a.W+a.F*!G,{Symbol:j});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),re=0;te.length>re;)h(te[re++]);for(var ne=A(h.store),ie=0;ne.length>ie;)m(ne[ie++]);a(a.S+a.F*!G,"Symbol",{for:function(e){return i(B,e+="")?B[e]:B[e]=j(e)},keyFor:function(e){if(!X(e))throw TypeError(e+" is not a symbol!");for(var t in B)if(B[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?_(e):$(_(e),t)},defineProperty:Y,defineProperties:$,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:ee});var oe=c((function(){O.f(1)}));a(a.S+a.F*oe,"Object",{getOwnPropertySymbols:function(e){return O.f(x(e))}}),R&&a(a.S+a.F*(!G||c((function(){var e=j();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))}))),"JSON",{stringify:function(e){for(var t,r,n=[e],i=1;arguments.length>i;)n.push(arguments[i++]);if(r=t=n[1],(y(t)||void 0!==e)&&!X(e))return v(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!X(t))return t}),n[1]=t,M.apply(R,n)}}),j.prototype[P]||e("./_hide")(j.prototype,P,j.prototype.valueOf),d(j,"Symbol"),d(Math,"Math",!0),d(n.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,r){var n=e("./_export"),i=e("./_object-to-array")(!0);n(n.S,"Object",{entries:function(e){return i(e)}})},{"./_export":107,"./_object-to-array":143}],183:[function(e,t,r){"use strict";var n=e("./_export"),i=e("./_core"),o=e("./_global"),a=e("./_species-constructor"),s=e("./_promise-resolve");n(n.P+n.R,"Promise",{finally:function(e){var t=a(this,i.Promise||o.Promise),r="function"==typeof e;return this.then(r?function(r){return s(t,e()).then((function(){return r}))}:e,r?function(r){return s(t,e()).then((function(){throw r}))}:e)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(e,t,r){"use strict";var n=e("./_export"),i=e("./_new-promise-capability"),o=e("./_perform");n(n.S,"Promise",{try:function(e){var t=i.f(this),r=o(e);return(r.e?t.reject:t.resolve)(r.v),t.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(e,t,r){e("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(e,t,r){e("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(e,t,r){e("./es6.array.iterator");for(var n=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=n[c],d=u&&u.prototype;d&&!d[a]&&i(d,a,c),o[c]=o.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(e,t,r){var n=e("./_export"),i=e("./_task");n(n.G+n.B,{setImmediate:i.set,clearImmediate:i.clear})},{"./_export":107,"./_task":155}],189:[function(e,t,r){(function(t){"use strict";var n,i=e("babel-runtime/helpers/typeof"),o=(n=i)&&n.__esModule?n:{default:n};function a(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===a(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"===(void 0===e?"undefined":(0,o.default)(e))},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===a(e)},r.isObject=function(e){return"object"===(void 0===e?"undefined":(0,o.default)(e))&&null!==e},r.isDate=function(e){return"[object Date]"===a(e)},r.isError=function(e){return"[object Error]"===a(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.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},r.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,r){"use strict";var n,i=e("babel-runtime/helpers/typeof"),o=(n=i)&&n.__esModule?n:{default:n};!function(e){var n,i,a,s=(n=/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,r,o){if(1!==arguments.length||"string"!==d(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 f=(t=String(s.masks[t]||t||s.masks.default)).slice(0,4);"UTC:"!==f&&"GMT:"!==f||(t=t.slice(4),r=!0,"GMT:"===f&&(o=!0));var h=r?"getUTC":"get",p=e[h+"Date"](),m=e[h+"Day"](),g=e[h+"Month"](),v=e[h+"FullYear"](),b=e[h+"Hours"](),y=e[h+"Minutes"](),x=e[h+"Seconds"](),w=e[h+"Milliseconds"](),E=r?0:e.getTimezoneOffset(),S=c(e),_=u(e),T={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:b%12||12,hh:l(b%12||12),H:b,HH:l(b),M:y,MM:l(y),s:x,ss:l(x),l:l(w,3),L:l(Math.round(w/10)),t:b<12?"a":"p",tt:b<12?"am":"pm",T:b<12?"A":"P",TT:b<12?"AM":"PM",Z:o?"GMT":r?"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:_};return t.replace(n,(function(e){return e in T?T[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 r=new Date(t.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var n=t.getTimezoneOffset()-r.getTimezoneOffset();t.setHours(t.getHours()-n);var i=(t-r)/6048e5;return 1+Math.floor(i)}function u(e){var t=e.getDay();return 0===t&&(t=7),t}function d(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===r?"undefined":(0,o.default)(r))?t.exports=s:e.dateFormat=s}(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(e,t,r){
/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/
"use strict";var n=/["'&<>]/;t.exports=function(e){var t,r=""+e,i=n.exec(r);if(!i)return r;var o="",a=0,s=0;for(a=i.index;a<r.length;a++){switch(r.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+=r.substring(s,a)),s=a+1,o+=t}return s!==a?o+r.substring(s,a):o}},{}],192:[function(e,t,r){function n(){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=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.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},n.prototype.emit=function(e){var t,r,n,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(r=this._events[e]))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(o(r))for(s=Array.prototype.slice.call(arguments,1),n=(c=r.slice()).length,l=0;l<n;l++)c[l].apply(this,s);return!0},n.prototype.addListener=function(e,t){var r;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&&(r=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(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},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){if(!i(t))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var r,n,a,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(r=this._events[e]).length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(s=a;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;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(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],193:[function(e,t,r){var n=e("http"),i=t.exports;for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);i.request=function(e,t){return e||(e={}),e.scheme="https",e.protocol="https:",n.request.call(this,e,t)}},{http:231}],194:[function(e,t,r){
/*!
* humanize-ms - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/
"use strict";var n=e("util"),i=e("ms");t.exports=function(e){if("number"==typeof e)return e;var t=i(e);if(void 0===t){var r=new Error(n.format("humanize-ms(%j) result undefined",e));console.warn(r.stack)}return t}},{ms:204,util:243}],195:[function(e,t,r){r.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1<<s)-1,c=l>>1,u=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,d=u>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?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+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*m}},{}],196:[function(e,t,r){"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 r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},{}],197:[function(e,t,r){function n(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&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],198:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.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={},r=0,n=e.length;r<n;r++)t[e.charAt(r)]=r;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],r=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[b64chars.charAt(r>>>18),b64chars.charAt(r>>>12&63),t>=2?"=":b64chars.charAt(r>>>6&63),t>=1?"=":b64chars.charAt(63&r)].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,r=t%4,n=(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(n>>>16),fromCharCode(n>>>8&255),fromCharCode(255&n)];return i.length-=[0,0,2,1][r],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,r){
/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
"use strict";t.exports=function(e,t,r){if(!e)throw new TypeError("argument dest is required");if(!t)throw new TypeError("argument src is required");return void 0===r&&(r=!0),Object.getOwnPropertyNames(t).forEach((function(i){if(r||!n.call(e,i)){var o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,o)}})),e};var n=Object.prototype.hasOwnProperty},{}],201:[function(e,t,r){"use strict";function n(){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)}n.prototype.define=function(e,t){for(var r in e){var n=e[r].map((function(e){return e.toLowerCase()}));r=r.toLowerCase();for(var i=0;i<n.length;i++)if("*"!=(o=n[i])[0]){if(!t&&o in this._types)throw new Error('Attempt to change mapping for "'+o+'" extension from "'+this._types[o]+'" to "'+r+'". Pass `force=true` to allow this, otherwise remove "'+o+'" from the list of extensions for "'+r+'".');this._types[o]=r}if(t||!this._extensions[r]){var o=n[0];this._extensions[r]="*"!=o[0]?o:o.substr(1)}}},n.prototype.getType=function(e){var t=(e=String(e)).replace(/^.*[/\\]/,"").toLowerCase(),r=t.replace(/^.*\./,"").toLowerCase(),n=t.length<e.length;return(r.length<t.length-1||!n)&&this._types[r]||null},n.prototype.getExtension=function(e){return(e=/^\s*([^;\s]*)/.test(e)&&RegExp.$1)&&this._extensions[e.toLowerCase()]||null},t.exports=n},{}],202:[function(e,t,r){"use strict";var n=e("./Mime");t.exports=new n(e("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(e,t,r){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,r){var n=1e3,i=6e4,o=60*i,a=24*o;function s(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}t.exports=function(e,t){t=t||{};var r,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 r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return r*a;case"hours":case"hour":case"hrs":case"hr":case"h":return r*o;case"minutes":case"minute":case"mins":case"min":case"m":return r*i;case"seconds":case"second":case"secs":case"sec":case"s":return r*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}(e);if("number"===c&&isFinite(e))return t.long?(r=e,(l=Math.abs(r))>=a?s(r,l,a,"day"):l>=o?s(r,l,o,"hour"):l>=i?s(r,l,i,"minute"):l>=n?s(r,l,n,"second"):r+" 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>=n?Math.round(e/n)+"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,r){(function(e){function t(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}r.resolve=function(){for(var r="",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&&(r=a+"/"+r,i="/"===a.charAt(0))}return(i?"/":"")+(r=t(n(r.split("/"),(function(e){return!!e})),!i).join("/"))||"."},r.normalize=function(e){var o=r.isAbsolute(e),a="/"===i(e,-1);return(e=t(n(e.split("/"),(function(e){return!!e})),!o).join("/"))||o||(e="."),e&&a&&(e+="/"),(o?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(n(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},r.relative=function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var i=n(e.split("/")),o=n(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("/")},r.sep="/",r.delimiter=":",r.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,i=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){n=o;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"/":e.slice(0,n)},r.basename=function(e,t){var r=function(e){"string"!=typeof e&&(e+="");var t,r=0,n=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){r=t+1;break}}else-1===n&&(i=!1,n=t+1);return-1===n?"":e.slice(r,n)}(e);return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},r.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,r=0,n=-1,i=!0,o=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===n&&(i=!1,n=a+1),46===s?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){r=a+1;break}}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===r+1?"":e.slice(t,n)};var i="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,e("_process"))},{_process:208}],206:[function(e,t,r){(function(e){(function(){"use strict";var n={function:!0,object:!0},i=n[typeof window]&&window||this,o=n[typeof r]&&r,a=n[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,d=u.hasOwnProperty,f=u.toString;function h(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function p(e){return e=y(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:h(e)}function m(e,t){for(var r in e)d.call(e,r)&&t(e[r],r,e)}function g(e){return null==e?h(e):f.call(e).slice(8,-1)}function v(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function b(e,t){var r=null;return function(e,t){var r=-1,n=e?e.length:0;if("number"==typeof n&&n>-1&&n<=l)for(;++r<n;)t(e[r],r,e);else m(e,t)}(e,(function(n,i){r=t(r,n,i,e)})),r}function y(e){return String(e).replace(/^ +| +$/g,"")}var x=function e(t){var r=i,n=t&&"object"==typeof t&&"String"!=g(t);n&&(r=t,t=null);var o=r.navigator||{},a=o.userAgent||"";t||(t=a);var s,l,u,d,h,x=n?!!o.likeChrome:/\bChrome\b/.test(t)&&!/internal|\n/i.test(f.toString()),w=n?"Object":"ScriptBridgingProxyObject",E=n?"Object":"Environment",S=n&&r.java?"JavaPackage":g(r.java),_=n?"Object":"RuntimeObject",T=/\bJava/.test(S)&&r.java,k=T&&g(r.environment)==E,O=T?"a":"α",C=T?"b":"β",A=r.document||{},D=r.operamini||r.opera,L=c.test(L=n&&D?D["[[Class]]"]:g(D))?L:D=null,I=t,j=[],R=null,M=t==a,N=M&&D&&"function"==typeof D.version&&D.version(),P=b([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],(function(e,r){return e||RegExp("\\b"+(r.pattern||v(r))+"\\b","i").exec(t)&&(r.label||r)})),F=function(e){return b(e,(function(e,r){return e||RegExp("\\b"+(r.pattern||v(r))+"\\b","i").exec(t)&&(r.label||r)}))}(["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"]),B=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 b(e,(function(e,r,n){return e||(r[B]||r[/^[a-z]+(?: +[a-z]+\b)*/i.exec(B)]||RegExp("\\b"+v(n)+"(?:\\b|\\w*\\d)","i").exec(t))&&n}))}({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 b(e,(function(e,r){var n=r.pattern||v(r);return!e&&(e=RegExp("\\b"+n+"(?:/[\\d.]+|[ \\w.]*)","i").exec(t))&&(e=function(e,t,r){var n={"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&&r&&/^Win/i.test(e)&&!/^Windows Phone /i.test(e)&&(n=n[/[\d.]+$/.exec(e)])&&(e="Windows "+n),e=String(e),t&&r&&(e=e.replace(RegExp(t,"i"),r)),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,n,r.label||r)),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 b(e,(function(e,r){var n=r.pattern||v(r);return!e&&(e=RegExp("\\b"+n+" *\\d+[.\\w_]*","i").exec(t)||RegExp("\\b"+n+" *\\w+-[\\w]*","i").exec(t)||RegExp("\\b"+n+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(t))&&((e=String(r.label&&!RegExp(n,"i").test(r.label)?r.label:e).split("/"))[1]&&!/[\d.]+/.test(e[0])&&(e[0]+=" "+e[1]),r=r.label||r,e=p(e[0].replace(RegExp(n,"i"),r).replace(RegExp("; *(?:"+r+"[_-])?","i")," ").replace(RegExp("("+r+")[-_.]?(\\w)","i"),"$1 $2"))),e}))}if(P&&(P=[P]),U&&!B&&(B=z([U])),(s=/\bGoogle TV\b/.exec(B))&&(B=s[0]),/\bSimulator\b/i.test(t)&&(B=(B?B+" ":"")+"Simulator"),"Opera Mini"==F&&/\bOPiOS\b/.test(t)&&j.push("running in Turbo/Uncompressed mode"),"IE"==F&&/\blike iPhone OS\b/.test(t)?(U=(s=e(t.replace(/like iPhone OS/,""))).manufacturer,B=s.product):/^iP/.test(B)?(F||(F="Safari"),H="iOS"+((s=/ OS ([\d_]+)/i.exec(t))?" "+s[1].replace(/_/g,"."):"")):"Konqueror"!=F||/buntu/i.test(H)?U&&"Google"!=U&&(/Chrome/.test(F)&&!/\bMobile Safari\b/i.test(t)||/\bVita\b/.test(B))||/\bAndroid\b/.test(H)&&/^Chrome/.test(F)&&/\bVersion\//i.test(t)?(F="Android Browser",H=/\bAndroid\b/.test(H)?H:"Android"):"Silk"==F?(/\bMobi/i.test(t)||(H="Android",j.unshift("desktop mode")),/Accelerated *= *true/i.test(t)&&j.unshift("accelerated")):"PaleMoon"==F&&(s=/\bFirefox\/([\d.]+)\b/.exec(t))?j.push("identifying as Firefox "+s[1]):"Firefox"==F&&(s=/\b(Mobile|Tablet|TV)\b/i.exec(t))?(H||(H="Firefox OS"),B||(B=s[1])):!F||(s=!/\bMinefield\b/i.test(t)&&/\b(?:Firefox|Safari)\b/.exec(F))?(F&&!B&&/[\/,]|^[^(]+?\)/.test(t.slice(t.indexOf(s+"/")+8))&&(F=null),(s=B||U||H)&&(B||U||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(H))&&(F=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(H)?H:s)+" Browser")):"Electron"==F&&(s=(/\bChrome\/([\d.]+)\b/.exec(t)||0)[1])&&j.push("Chromium "+s):H="Kubuntu",N||(N=b(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",v(F),"(?:Firefox|Minefield|NetFront)"],(function(e,r){return e||(RegExp(r+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(t)||0)[1]||null}))),(s=("iCab"==P&&parseFloat(N)>3?"WebKit":/\bOpera\b/.test(F)&&(/\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(F)&&"NetFront")&&(P=[s]),"IE"==F&&(s=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(t)||0)[1])?(F+=" Mobile",H="Windows Phone "+(/\+$/.test(s)?s:s+".x"),j.unshift("desktop mode")):/\bWPDesktop\b/i.test(t)?(F="IE Mobile",H="Windows Phone 8.x",j.unshift("desktop mode"),N||(N=(/\brv:([\d.]+)/.exec(t)||0)[1])):"IE"!=F&&"Trident"==P&&(s=/\brv:([\d.]+)/.exec(t))&&(F&&j.push("identifying as "+F+(N?" "+N:"")),F="IE",N=s[1]),M){if(d="global",h=null!=(u=r)?typeof u[d]:"number",/^(?:boolean|number|string|undefined)$/.test(h)||"object"==h&&!u[d])g(s=r.runtime)==w?(F="Adobe AIR",H=s.flash.system.Capabilities.os):g(s=r.phantom)==_?(F="PhantomJS",N=(s=s.version||null)&&s.major+"."+s.minor+"."+s.patch):"number"==typeof A.documentMode&&(s=/\bTrident\/(\d+)/i.exec(t))?(N=[N,A.documentMode],(s=+s[1]+4)!=N[1]&&(j.push("IE "+N[1]+" mode"),P&&(P[1]=""),N[1]=s),N="IE"==F?String(N[1].toFixed(1)):N[0]):"number"==typeof A.documentMode&&/^(?:Chrome|Firefox)\b/.test(F)&&(j.push("masking as "+F+" "+N),F="IE",N="11.0",P=["Trident"],H="Windows");else if(T&&(I=(s=T.lang.System).getProperty("os.arch"),H=H||s.getProperty("os.name")+" "+s.getProperty("os.version")),k){try{N=r.require("ringo/engine").version.join("."),F="RingoJS"}catch(e){(s=r.system)&&s.global.system==r.system&&(F="Narwhal",H||(H=s[0].os||null))}F||(F="Rhino")}else"object"==typeof r.process&&!r.process.browser&&(s=r.process)&&("object"==typeof s.versions&&("string"==typeof s.versions.electron?(j.push("Node "+s.versions.node),F="Electron",N=s.versions.electron):"string"==typeof s.versions.nw&&(j.push("Chromium "+N,"Node "+s.versions.node),F="NW.js",N=s.versions.nw)),F||(F="Node.js",I=s.arch,H=s.platform,N=(N=/[\d.]+/.exec(s.version))?N[0]:null));H=H&&p(H)}if(N&&(s=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(N)||/(?:alpha|beta)(?: ?\d)?/i.exec(t+";"+(M&&o.appMinorVersion))||/\bMinefield\b/i.test(t)&&"a")&&(R=/b/i.test(s)?"beta":"alpha",N=N.replace(RegExp(s+"\\+?$"),"")+("beta"==R?C:O)+(/\d+\+?/.exec(s)||"")),"Fennec"==F||"Firefox"==F&&/\b(?:Android|Firefox OS)\b/.test(H))F="Firefox Mobile";else if("Maxthon"==F&&N)N=N.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(B))"Xbox 360"==B&&(H=null),"Xbox 360"==B&&/\bIEMobile\b/.test(t)&&j.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(F)&&(!F||B||/Browser|Mobi/.test(F))||"Windows CE"!=H&&!/Mobi/i.test(t))if("IE"==F&&M)try{null===r.external&&j.unshift("platform preview")}catch(e){j.unshift("embedded")}else(/\bBlackBerry\b/.test(B)||/\bBB10\b/.test(t))&&(s=(RegExp(B.replace(/ +/g," *")+"/([.\\d]+)","i").exec(t)||0)[1]||N)?(H=((s=[s,/BB10/.test(t)])[1]?(B=null,U="BlackBerry"):"Device Software")+" "+s[0],N=null):this!=m&&"Wii"!=B&&(M&&D||/Opera/.test(F)&&/\b(?:MSIE|Firefox)\b/i.test(t)||"Firefox"==F&&/\bOS X (?:\d+\.){2,}/.test(H)||"IE"==F&&(H&&!/^Win/.test(H)&&N>5.5||/\bWindows XP\b/.test(H)&&N>8||8==N&&!/\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(F)?(/\bIE\b/.test(s)&&"Mac OS"==H&&(H=null),s="identify"+s):(s="mask"+s,F=L?p(L.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(s)&&(H=null),M||(N=null)),P=["Presto"],j.push(s));else F+=" Mobile";(s=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(t)||0)[1])&&(s=[parseFloat(s.replace(/\.(\d)$/,".0$1")),s],"Safari"==F&&"+"==s[1].slice(-1)?(F="WebKit Nightly",R="alpha",N=s[1].slice(0,-1)):N!=s[1]&&N!=(s[2]=(/\bSafari\/([\d.]+\+?)/i.exec(t)||0)[1])||(N=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"]),M&&(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"==F&&(!N||parseInt(N)>45)&&(N=s)),"Opera"==F&&(s=/\bzbov|zvav$/.exec(H))?(F+=" ",j.unshift("desktop mode"),"zvav"==s?(F+="Mini",N=null):F+="Mobile",H=H.replace(RegExp(" *"+s+"$"),"")):"Safari"==F&&/\bChrome\b/.exec(P&&P[1])&&(j.unshift("desktop mode"),F="Chrome Mobile",N=null,/\bOS X\b/.test(H)?(U="Apple",H="iOS 4.3+"):H=null),N&&0==N.indexOf(s=/[\d.]+$/.exec(H))&&t.indexOf("/"+s+"-")>-1&&(H=y(H.replace(s,""))),P&&!/\b(?:Avant|Nook)\b/.test(F)&&(/Browser|Lunascape|Maxthon/.test(F)||"Safari"!=F&&/^iOS/.test(H)&&/\bSafari\b/.test(P[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(F)&&P[1])&&(s=P[P.length-1])&&j.push(s),j.length&&(j=["("+j.join("; ")+")"]),U&&B&&B.indexOf(U)<0&&j.push("on "+U),B&&j.push((/^on /.test(j[j.length-1])?"":"on ")+B),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),"")),F&&(/\bWOW64\b/i.test(t)||M&&/\w(?:86|32)$/.test(o.cpuClass||o.platform)&&!/\bWin64; x64\b/i.test(t))&&j.unshift("32-bit")):H&&/^OS X/.test(H.family)&&"Chrome"==F&&parseFloat(N)>=39&&(H.architecture=64),t||(t=null);var G={};return G.description=t,G.layout=P&&P[0],G.manufacturer=U,G.name=F,G.prerelease=R,G.product=B,G.ua=t,G.version=F&&N,G.os=H||{architecture:null,family:null,version:null,toString:function(){return"null"}},G.parse=e,G.toString=function(){return this.description||""},G.version&&j.unshift(N),G.name&&j.unshift(F),H&&F&&(H!=String(H).split(" ")[0]||H!=F.split(" ")[0]&&!B)&&j.push(B?"("+H+")":"on "+H),j.length&&(G.description=j.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,r){(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,r,n,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,r)}));case 3:return e.nextTick((function(){t.call(null,r,n)}));case 4:return e.nextTick((function(){t.call(null,r,n,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,r){var n,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(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,u=[],d=!1,f=-1;function h(){d&&c&&(d=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!d){var e=l(h);d=!0;for(var t=u.length;t;){for(c=u,u=[];++f<t;)c&&c[f].run();f=-1,t=u.length}c=null,d=!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 r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new m(e,t)),1!==u.length||d||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,r){(function(e){!function(n){var i="object"==typeof r&&r&&!r.nodeType&&r,o="object"==typeof t&&t&&!t.nodeType&&t,a="object"==typeof e&&e;a.global!==a&&a.window!==a&&a.self!==a||(n=a);var s,l,c=2147483647,u=/^xn--/,d=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,h={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(h[e])}function v(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function b(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+v((e=e.replace(f,".")).split("."),t).join(".")}function y(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}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,r){var n=0;for(e=r?p(e/700):e>>1,e+=p(e/t);e>455;n+=36)e=p(e/35);return p(n+36*e/(e+38))}function S(e){var t,r,n,i,o,a,s,l,u,d,f,h=[],m=e.length,v=0,b=128,y=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&g("not-basic"),h.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<m;){for(o=v,a=1,s=36;i>=m&&g("invalid-input"),((l=(f=e.charCodeAt(i++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||l>p((c-v)/a))&&g("overflow"),v+=l*a,!(l<(u=s<=y?1:s>=y+26?26:s-y));s+=36)a>p(c/(d=36-u))&&g("overflow"),a*=d;y=E(v-o,t=h.length+1,0==o),p(v/t)>c-b&&g("overflow"),b+=p(v/t),v%=t,h.splice(v++,0,b)}return x(h)}function _(e){var t,r,n,i,o,a,s,l,u,d,f,h,v,b,x,S=[];for(h=(e=y(e)).length,t=128,r=0,o=72,a=0;a<h;++a)(f=e[a])<128&&S.push(m(f));for(n=i=S.length,i&&S.push("-");n<h;){for(s=c,a=0;a<h;++a)(f=e[a])>=t&&f<s&&(s=f);for(s-t>p((c-r)/(v=n+1))&&g("overflow"),r+=(s-t)*v,t=s,a=0;a<h;++a)if((f=e[a])<t&&++r>c&&g("overflow"),f==t){for(l=r,u=36;!(l<(d=u<=o?1:u>=o+26?26:u-o));u+=36)x=l-d,b=36-d,S.push(m(w(d+x%b,0))),l=p(x/b);S.push(m(w(l,0))),o=E(r,v,n==i),r=0,++n}++r,++t}return S.join("")}if(s={version:"1.4.1",ucs2:{decode:y,encode:x},decode:S,encode:_,toASCII:function(e){return b(e,(function(e){return d.test(e)?"xn--"+_(e):e}))},toUnicode:function(e){return b(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 n.punycode=s}(this)}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],210:[function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,o){t=t||"&",r=r||"=";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 d,f,h,p,m=e[u].replace(s,"%20"),g=m.indexOf(r);g>=0?(d=m.substr(0,g),f=m.substr(g+1)):(d=m,f=""),h=decodeURIComponent(d),p=decodeURIComponent(f),n(a,h)?i(a[h])?a[h].push(p):a[h]=[a[h],p]:a[h]=p}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],211:[function(e,t,r){"use strict";var n=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,r,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?o(a(e),(function(a){var s=encodeURIComponent(n(a))+r;return i(e[a])?o(e[a],(function(e){return s+encodeURIComponent(n(e))})).join(t):s+encodeURIComponent(n(e[a]))})).join(t):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(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 r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var a=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],212:[function(e,t,r){"use strict";r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":210,"./encode":211}],213:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(e,t,r){"use strict";var n=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 r in e)t.push(r);return t};t.exports=p;var l=(0,n.default)(e("core-util-is"));l.inherits=e("inherits");var c=e("./_stream_readable"),u=e("./_stream_writable");l.inherits(p,c);for(var d=s(u.prototype),f=0;f<d.length;f++){var h=d[f];p.prototype[h]||(p.prototype[h]=u.prototype[h])}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,r){"use strict";var n,i=e("babel-runtime/core-js/object/create"),o=(n=i)&&n.__esModule?n:{default:n};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,r){r(null,e)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(e,t,r){(function(r,n){"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},d=e("./internal/streams/stream"),f=e("safe-buffer").Buffer,h=n.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,b=e("./internal/streams/BufferList"),y=e("./internal/streams/destroy");p.inherits(E,d);var x=["error","close","destroy","pause","resume"];function w(t,r){t=t||{};var n=r instanceof(l=l||e("./_stream_duplex"));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,o=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new b,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)),d.call(this)}function S(e,t,r,n,o){var a,s=e._readableState;return null===t?(s.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,k(e)}}(e,s)):(o||(a=function(e,t){var r,n;return n=t,f.isBuffer(n)||n instanceof h||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}(s,t)),a?e.emit("error",a):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||(0,i.default)(t)===f.prototype||(t=function(e){return f.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?_(e,s,t,!1):C(e,s)):_(e,s,t,!1))):n||(s.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(s)}function _(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),C(e,t)}function T(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 k(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?s.nextTick(O,e):O(e))}function O(e){g("emit readable"),e.emit("readable"),I(e)}function C(e,t){t.readingMore||(t.readingMore=!0,s.nextTick(A,e,t))}function A(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(g("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function D(e){g("readable nexttick read 0"),e.read(0)}function L(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 j(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;for(e-=i.length;r=r.next;){var o=r.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?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=f.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0==(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}(e,t),n}(e,t.buffer,t.decoder),r);var r}function R(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(M,t,e))}function M(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function N(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;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=y.destroy,E.prototype._undestroy=y.undestroy,E.prototype._destroy=function(e,t){this.push(null),t(e)},E.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=f.from(e,t),t=""),r=!0),S(this,e,t,!1,r)},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,r=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?R(this):k(this),null;if(0===(e=T(e,t))&&t.ended)return 0===t.length&&R(this),null;var n,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=T(r,t))),null===(n=e>0?j(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&R(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},E.prototype.pipe=function(e,t){var n=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===r.stdout||e===r.stderr?y:l;function a(t,r){g("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,g("cleanup"),e.removeListener("close",v),e.removeListener("finish",b),e.removeListener("drain",d),e.removeListener("error",m),e.removeListener("unpipe",a),n.removeListener("end",l),n.removeListener("end",y),n.removeListener("data",p),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function l(){g("onend"),e.end()}i.endEmitted?s.nextTick(o):n.once("end",o),e.on("unpipe",a);var d=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))}}(n);e.on("drain",d);var f=!1,h=!1;function p(t){g("ondata"),h=!1,!1!==e.write(t)||h||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==N(i.pipes,e))&&!f&&(g("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,h=!0),n.pause())}function m(t){g("onerror",t),y(),e.removeListener("error",m),0===u(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",b),y()}function b(){g("onfinish"),e.removeListener("close",v),y()}function y(){g("unpipe"),n.unpipe(e)}return n.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?c(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",v),e.once("finish",b),e.emit("pipe",n),i.flowing||(g("pipe resume"),n.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={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,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,r);return this}var a=N(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,r)),this},E.prototype.on=function(e,t){var r=d.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&k(this):s.nextTick(D,this))}return r},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(L,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,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(g("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){g("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!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),n&&(n=!1,e.resume())},this},Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),E._fromList=j}).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,r){"use strict";var n,i=e("babel-runtime/core-js/object/create"),o=(n=i)&&n.__esModule?n:{default:n};t.exports=c;var a=e("./_stream_duplex"),s=(0,o.default)(e("core-util-is"));function l(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(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,r){d(e,t,r)})):d(this,null,null)}function d(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),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,r){throw new Error("_transform() is not implemented")},c.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.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 r=this;a.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(e,t,r){(function(r,n){"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 d(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}t.exports=S;var f,h=!r.browser&&["v0.10","v0.9."].indexOf(r.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"),b=e("safe-buffer").Buffer,y=n.Uint8Array||function(){},x=e("./internal/streams/destroy");function w(){}function E(t,r){f=f||e("./_stream_duplex"),t=t||{};var n=r instanceof f;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,o=t.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(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 r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(u.nextTick(i,n),u.nextTick(A,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),A(e,t))}(e,r,n,t,i);else{var o=O(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||k(e,r),n?h(T,e,r,o,i):T(e,r,o,i)}}(r,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 d(this)}function S(t){if(f=f||e("./_stream_duplex"),!(m.call(S,this)||this instanceof f))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 _(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function T(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),A(e,t)}function k(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)i[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;i.allBuffers=s,_(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 d(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,c=r.encoding,u=r.callback;if(_(e,t,!1,t.objectMode?1:l.length,l,c,u),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function O(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),A(e,t)}))}function A(e,t){var r=O(t);return r&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,u.nextTick(C,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}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,r){var n,i=this._writableState,o=!1,a=!i.objectMode&&(n=e,b.isBuffer(n)||n instanceof y);return a&&!b.isBuffer(e)&&(e=function(e){return b.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=w),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),u.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),u.nextTick(n,o),i=!1),i}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=b.from(t,r)),t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.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:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else _(e,t,!1,s,n,i,o);return l}(this,i,a,e,t,r)),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||k(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,r){r(new Error("_write() is not implemented"))},S.prototype._writev=null,S.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,A(e,t),r&&(t.finished?u.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r)},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,r){"use strict";var n=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,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,i=s,t.copy(r,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,r){"use strict";var n=e("process-nextick-args");function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=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||n.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?(n.nextTick(i,r,e),r._writableState&&(r._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,r){"use strict";t.exports=e("events").EventEmitter},{events:192}],222:[function(e,t,r){t.exports=e("./readable").PassThrough},{"./readable":223}],223:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.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,r){t.exports=e("./readable").Transform},{"./readable":223}],225:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(e,t,r){var n=function(){return this}()||Function("return this")(),i=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,o=i&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=e("./runtime"),i)n.regeneratorRuntime=o;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(e,t,r){!function(e){"use strict";var r=Object.prototype,n=r.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={},d={};d[o]=function(){return this};var f=Object.getPrototypeOf,h=f&&f(f(k([])));h&&h!==r&&n.call(h,o)&&(d=h);var p=y.prototype=v.prototype=Object.create(d);b.prototype=p.constructor=y,y.constructor=b,y[s]=b.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,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,r,n){var i=new w(m(e,t,r,n));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 r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},c.values=k,T.prototype={constructor:T,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(_),!e)for(var t in this)"t"===t.charAt(0)&&n.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 r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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 r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;_(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}}}function m(e,t,r,n){var i=t&&t.prototype instanceof v?t:v,o=Object.create(i.prototype),a=new T(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=E(a,r);if(s){if(s===u)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=g(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,a),o}function g(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function v(){}function b(){}function y(){}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(r,i){function o(){return new Promise((function(t,o){!function t(r,i,o,a){var s=g(e[r],e,i);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"==typeof c&&n.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)}(r,i,t,o)}))}return t=t?t.then(o,o):o()}}function E(e,t){var r=e.iterator[t.method];if(void 0===r){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 n=g(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var i=n.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 _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function k(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 r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}}(function(){return this}()||Function("return this")())},{}],228:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=a),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},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 n.SlowBuffer(e)}},{buffer:73}],229:[function(e,t,r){(function(t){"use strict";var n=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(r){r.parser=function(e,t){return new d(e,t)},r.SAXParser=d,r.SAXStream=h,r.createStream=function(e,t){return new h(e,t)},r.MAX_BUFFER_LENGTH=65536;var c,u=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function d(e,t){if(!(this instanceof d))return new d(e,t);!function(e){for(var t=0,r=u.length;t<r;t++)e[u[t]]=""}(this),this.q=this.c="",this.bufferCheckPosition=r.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=C.BEGIN,this.strictEntities=this.opt.strictEntities,this.ENTITIES=this.strictEntities?(0,l.default)(r.XML_ENTITIES):(0,l.default)(r.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),D(this,"onready")}r.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 r in e)e.hasOwnProperty(r)&&t.push(r);return t}),d.prototype={end:function(){M(this)},write:function(e){if(this.error)throw this.error;if(this.closed)return R(this,"Cannot write after close. Assign an onready handler.");if(null===e)return M(this);"object"===(void 0===e?"undefined":(0,o.default)(e))&&(e=e.toString());for(var t=0,n="";n=K(e,t++),this.c=n,n;)switch(this.trackPosition&&(this.position++,"\n"===n?(this.line++,this.column=0):this.column++),this.state){case C.BEGIN:if(this.state=C.BEGIN_WHITESPACE,"\ufeff"===n)continue;G(this,n);continue;case C.BEGIN_WHITESPACE:G(this,n);continue;case C.TEXT:if(this.sawRoot&&!this.closedRoot){for(var i=t-1;n&&"<"!==n&&"&"!==n;)(n=K(e,t++))&&this.trackPosition&&(this.position++,"\n"===n?(this.line++,this.column=0):this.column++);this.textNode+=e.substring(i,t-1)}"<"!==n||this.sawRoot&&this.closedRoot&&!this.strict?(x(n)||this.sawRoot&&!this.closedRoot||N(this,"Text data outside of root node."),"&"===n?this.state=C.TEXT_ENTITY:this.textNode+=n):(this.state=C.OPEN_WAKA,this.startTagPosition=this.position);continue;case C.SCRIPT:"<"===n?this.state=C.SCRIPT_ENDING:this.script+=n;continue;case C.SCRIPT_ENDING:"/"===n?this.state=C.CLOSE_TAG:(this.script+="<"+n,this.state=C.SCRIPT);continue;case C.OPEN_WAKA:if("!"===n)this.state=C.SGML_DECL,this.sgmlDecl="";else if(x(n));else if(S(g,n))this.state=C.OPEN_TAG,this.tagName=n;else if("/"===n)this.state=C.CLOSE_TAG,this.tagName="";else if("?"===n)this.state=C.PROC_INST,this.procInstName=this.procInstBody="";else{if(N(this,"Unencoded <"),this.startTagPosition+1<this.position){var a=this.position-this.startTagPosition;n=new Array(a).join(" ")+n}this.textNode+="<"+n,this.state=C.TEXT}continue;case C.SGML_DECL:"[CDATA["===(this.sgmlDecl+n).toUpperCase()?(L(this,"onopencdata"),this.state=C.CDATA,this.sgmlDecl="",this.cdata=""):this.sgmlDecl+n==="--"?(this.state=C.COMMENT,this.comment="",this.sgmlDecl=""):"DOCTYPE"===(this.sgmlDecl+n).toUpperCase()?(this.state=C.DOCTYPE,(this.doctype||this.sawRoot)&&N(this,"Inappropriately located doctype declaration"),this.doctype="",this.sgmlDecl=""):">"===n?(L(this,"onsgmldeclaration",this.sgmlDecl),this.sgmlDecl="",this.state=C.TEXT):w(n)?(this.state=C.SGML_DECL_QUOTED,this.sgmlDecl+=n):this.sgmlDecl+=n;continue;case C.SGML_DECL_QUOTED:n===this.q&&(this.state=C.SGML_DECL,this.q=""),this.sgmlDecl+=n;continue;case C.DOCTYPE:">"===n?(this.state=C.TEXT,L(this,"ondoctype",this.doctype),this.doctype=!0):(this.doctype+=n,"["===n?this.state=C.DOCTYPE_DTD:w(n)&&(this.state=C.DOCTYPE_QUOTED,this.q=n));continue;case C.DOCTYPE_QUOTED:this.doctype+=n,n===this.q&&(this.q="",this.state=C.DOCTYPE);continue;case C.DOCTYPE_DTD:this.doctype+=n,"]"===n?this.state=C.DOCTYPE:w(n)&&(this.state=C.DOCTYPE_DTD_QUOTED,this.q=n);continue;case C.DOCTYPE_DTD_QUOTED:this.doctype+=n,n===this.q&&(this.state=C.DOCTYPE_DTD,this.q="");continue;case C.COMMENT:"-"===n?this.state=C.COMMENT_ENDING:this.comment+=n;continue;case C.COMMENT_ENDING:"-"===n?(this.state=C.COMMENT_ENDED,this.comment=j(this.opt,this.comment),this.comment&&L(this,"oncomment",this.comment),this.comment=""):(this.comment+="-"+n,this.state=C.COMMENT);continue;case C.COMMENT_ENDED:">"!==n?(N(this,"Malformed comment"),this.comment+="--"+n,this.state=C.COMMENT):this.state=C.TEXT;continue;case C.CDATA:"]"===n?this.state=C.CDATA_ENDING:this.cdata+=n;continue;case C.CDATA_ENDING:"]"===n?this.state=C.CDATA_ENDING_2:(this.cdata+="]"+n,this.state=C.CDATA);continue;case C.CDATA_ENDING_2:">"===n?(this.cdata&&L(this,"oncdata",this.cdata),L(this,"onclosecdata"),this.cdata="",this.state=C.TEXT):"]"===n?this.cdata+="]":(this.cdata+="]]"+n,this.state=C.CDATA);continue;case C.PROC_INST:"?"===n?this.state=C.PROC_INST_ENDING:x(n)?this.state=C.PROC_INST_BODY:this.procInstName+=n;continue;case C.PROC_INST_BODY:if(!this.procInstBody&&x(n))continue;"?"===n?this.state=C.PROC_INST_ENDING:this.procInstBody+=n;continue;case C.PROC_INST_ENDING:">"===n?(L(this,"onprocessinginstruction",{name:this.procInstName,body:this.procInstBody}),this.procInstName=this.procInstBody="",this.state=C.TEXT):(this.procInstBody+="?"+n,this.state=C.PROC_INST_BODY);continue;case C.OPEN_TAG:S(v,n)?this.tagName+=n:(P(this),">"===n?U(this):"/"===n?this.state=C.OPEN_TAG_SLASH:(x(n)||N(this,"Invalid character in tag name"),this.state=C.ATTRIB));continue;case C.OPEN_TAG_SLASH:">"===n?(U(this,!0),H(this)):(N(this,"Forward-slash in opening tag not followed by >"),this.state=C.ATTRIB);continue;case C.ATTRIB:if(x(n))continue;">"===n?U(this):"/"===n?this.state=C.OPEN_TAG_SLASH:S(g,n)?(this.attribName=n,this.attribValue="",this.state=C.ATTRIB_NAME):N(this,"Invalid attribute name");continue;case C.ATTRIB_NAME:"="===n?this.state=C.ATTRIB_VALUE:">"===n?(N(this,"Attribute without value"),this.attribValue=this.attribName,B(this),U(this)):x(n)?this.state=C.ATTRIB_NAME_SAW_WHITE:S(v,n)?this.attribName+=n:N(this,"Invalid attribute name");continue;case C.ATTRIB_NAME_SAW_WHITE:if("="===n)this.state=C.ATTRIB_VALUE;else{if(x(n))continue;N(this,"Attribute without value"),this.tag.attributes[this.attribName]="",this.attribValue="",L(this,"onattribute",{name:this.attribName,value:""}),this.attribName="",">"===n?U(this):S(g,n)?(this.attribName=n,this.state=C.ATTRIB_NAME):(N(this,"Invalid attribute name"),this.state=C.ATTRIB)}continue;case C.ATTRIB_VALUE:if(x(n))continue;w(n)?(this.q=n,this.state=C.ATTRIB_VALUE_QUOTED):(N(this,"Unquoted attribute value"),this.state=C.ATTRIB_VALUE_UNQUOTED,this.attribValue=n);continue;case C.ATTRIB_VALUE_QUOTED:if(n!==this.q){"&"===n?this.state=C.ATTRIB_VALUE_ENTITY_Q:this.attribValue+=n;continue}B(this),this.q="",this.state=C.ATTRIB_VALUE_CLOSED;continue;case C.ATTRIB_VALUE_CLOSED:x(n)?this.state=C.ATTRIB:">"===n?U(this):"/"===n?this.state=C.OPEN_TAG_SLASH:S(g,n)?(N(this,"No whitespace between attributes"),this.attribName=n,this.attribValue="",this.state=C.ATTRIB_NAME):N(this,"Invalid attribute name");continue;case C.ATTRIB_VALUE_UNQUOTED:if(!E(n)){"&"===n?this.state=C.ATTRIB_VALUE_ENTITY_U:this.attribValue+=n;continue}B(this),">"===n?U(this):this.state=C.ATTRIB;continue;case C.CLOSE_TAG:if(this.tagName)">"===n?H(this):S(v,n)?this.tagName+=n:this.script?(this.script+="</"+this.tagName,this.tagName="",this.state=C.SCRIPT):(x(n)||N(this,"Invalid tagname in closing tag"),this.state=C.CLOSE_TAG_SAW_WHITE);else{if(x(n))continue;_(g,n)?this.script?(this.script+="</"+n,this.state=C.SCRIPT):N(this,"Invalid tagname in closing tag."):this.tagName=n}continue;case C.CLOSE_TAG_SAW_WHITE:if(x(n))continue;">"===n?H(this):N(this,"Invalid characters in closing tag");continue;case C.TEXT_ENTITY:case C.ATTRIB_VALUE_ENTITY_Q:case C.ATTRIB_VALUE_ENTITY_U:var s,l;switch(this.state){case C.TEXT_ENTITY:s=C.TEXT,l="textNode";break;case C.ATTRIB_VALUE_ENTITY_Q:s=C.ATTRIB_VALUE_QUOTED,l="attribValue";break;case C.ATTRIB_VALUE_ENTITY_U:s=C.ATTRIB_VALUE_UNQUOTED,l="attribValue"}";"===n?(this[l]+=z(this),this.entity="",this.state=s):S(this.entity.length?y:b,n)?this.entity+=n:(N(this,"Invalid character in entity name"),this[l]+="&"+this.entity+n,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(r.MAX_BUFFER_LENGTH,10),n=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":L(e,"oncdata",e.cdata),e.cdata="";break;case"script":L(e,"onscript",e.script),e.script="";break;default:R(e,"Max buffer length exceeded: "+u[i])}n=Math.max(n,a)}var s=r.MAX_BUFFER_LENGTH-n;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&&(L(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(L(e,"onscript",e.script),e.script="")}};try{c=e("stream").Stream}catch(e){c=function(){}}var f=r.EVENTS.filter((function(e){return"error"!==e&&"end"!==e}));function h(e,t){if(!(this instanceof h))return new h(e,t);c.apply(this),this._parser=new d(e,t),this.writable=!0,this.readable=!0;var r=this;this._parser.onend=function(){r.emit("end")},this._parser.onerror=function(e){r.emit("error",e),r._parser.error=null},this._decoder=null,f.forEach((function(e){(0,a.default)(r,"on"+e,{get:function(){return r._parser["on"+e]},set:function(t){if(!t)return r.removeAllListeners(e),r._parser["on"+e]=t,t;r.on(e,t)},enumerable:!0,configurable:!1})}))}h.prototype=(0,l.default)(c.prototype,{constructor:{value:h}}),h.prototype.write=function(r){if("function"==typeof t&&"function"==typeof t.isBuffer&&t.isBuffer(r)){if(!this._decoder){var n=e("string_decoder").StringDecoder;this._decoder=new n("utf8")}r=this._decoder.write(r)}return this._parser.write(r.toString()),this.emit("data",r),!0},h.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},h.prototype.on=function(e,t){var r=this;return r._parser["on"+e]||-1===f.indexOf(e)||(r._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),r.emit.apply(r,t)}),c.prototype.on.call(r,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-]/,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]/,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\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 _(e,t){return!S(e,t)}var T,k,O,C=0;for(var A in r.STATE={BEGIN:C++,BEGIN_WHITESPACE:C++,TEXT:C++,TEXT_ENTITY:C++,OPEN_WAKA:C++,SGML_DECL:C++,SGML_DECL_QUOTED:C++,DOCTYPE:C++,DOCTYPE_QUOTED:C++,DOCTYPE_DTD:C++,DOCTYPE_DTD_QUOTED:C++,COMMENT_STARTING:C++,COMMENT:C++,COMMENT_ENDING:C++,COMMENT_ENDED:C++,CDATA:C++,CDATA_ENDING:C++,CDATA_ENDING_2:C++,PROC_INST:C++,PROC_INST_BODY:C++,PROC_INST_ENDING:C++,OPEN_TAG:C++,OPEN_TAG_SLASH:C++,ATTRIB:C++,ATTRIB_NAME:C++,ATTRIB_NAME_SAW_WHITE:C++,ATTRIB_VALUE:C++,ATTRIB_VALUE_QUOTED:C++,ATTRIB_VALUE_CLOSED:C++,ATTRIB_VALUE_UNQUOTED:C++,ATTRIB_VALUE_ENTITY_Q:C++,ATTRIB_VALUE_ENTITY_U:C++,CLOSE_TAG:C++,CLOSE_TAG_SAW_WHITE:C++,SCRIPT:C++,SCRIPT_ENDING:C++},r.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},r.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)(r.ENTITIES).forEach((function(e){var t=r.ENTITIES[e],n="number"==typeof t?String.fromCharCode(t):t;r.ENTITIES[e]=n})),r.STATE)r.STATE[r.STATE[A]]=A;function D(e,t,r){e[t]&&e[t](r)}function L(e,t,r){e.textNode&&I(e),D(e,t,r)}function I(e){e.textNode=j(e.opt,e.textNode),e.textNode&&D(e,"ontext",e.textNode),e.textNode=""}function j(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function R(e,t){return I(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,D(e,"onerror",t),e}function M(e){return e.sawRoot&&!e.closedRoot&&N(e,"Unclosed root tag"),e.state!==C.BEGIN&&e.state!==C.BEGIN_WHITESPACE&&e.state!==C.TEXT&&R(e,"Unexpected end"),I(e),e.c="",e.closed=!0,D(e,"onend"),d.call(e,e.strict,e.opt),e}function N(e,t){if("object"!==(void 0===e?"undefined":(0,o.default)(e))||!(e instanceof d))throw new Error("bad call to strictFail");e.strict&&R(e,t)}function P(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,r=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(r.ns=t.ns),e.attribList.length=0,L(e,"onopentagstart",r)}function F(e,t){var r=e.indexOf(":")<0?["",e]:e.split(":"),n=r[0],i=r[1];return t&&"xmlns"===e&&(n="xmlns",i=""),{prefix:n,local:i}}function B(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=F(e.attribName,!0),r=t.prefix,n=t.local;if("xmlns"===r)if("xml"===n&&e.attribValue!==p)N(e,"xml: prefix must be bound to "+p+"\nActual: "+e.attribValue);else if("xmlns"===n&&"http://www.w3.org/2000/xmlns/"!==e.attribValue)N(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[n]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,L(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function U(e,t){if(e.opt.xmlns){var r=e.tag,n=F(e.tagName);r.prefix=n.prefix,r.local=n.local,r.uri=r.ns[n.prefix]||"",r.prefix&&!r.uri&&(N(e,"Unbound namespace prefix: "+(0,i.default)(e.tagName)),r.uri=n.prefix);var o=e.tags[e.tags.length-1]||e;r.ns&&o.ns!==r.ns&&(0,s.default)(r.ns).forEach((function(t){L(e,"onopennamespace",{prefix:t,uri:r.ns[t]})}));for(var a=0,l=e.attribList.length;a<l;a++){var c=e.attribList[a],u=c[0],d=c[1],f=F(u,!0),h=f.prefix,p=f.local,m=""===h?"":r.ns[h]||"",g={name:u,value:d,prefix:h,local:p,uri:m};h&&"xmlns"!==h&&!m&&(N(e,"Unbound namespace prefix: "+(0,i.default)(h)),g.uri=h),e.tag.attributes[u]=g,L(e,"onattribute",g)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),L(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=C.TEXT:e.state=C.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function H(e){if(!e.tagName)return N(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=C.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=C.SCRIPT);L(e,"onscript",e.script),e.script=""}var t=e.tags.length,r=e.tagName;e.strict||(r=r[e.looseCase]());for(var n=r;t--&&e.tags[t].name!==n;)N(e,"Unexpected close tag");if(t<0)return N(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=C.TEXT);e.tagName=r;for(var i=e.tags.length;i-- >t;){var o=e.tag=e.tags.pop();e.tagName=e.tag.name,L(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 r=o.ns[t];L(e,"onclosenamespace",{prefix:t,uri:r})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=C.TEXT}function z(e){var t,r=e.entity,i=r.toLowerCase(),o="";return e.ENTITIES[r]?e.ENTITIES[r]:e.ENTITIES[i]?e.ENTITIES[i]:("#"===(r=i).charAt(0)&&("x"===r.charAt(1)?(r=r.slice(2),o=(t=parseInt(r,16)).toString(16)):(r=r.slice(1),o=(t=parseInt(r,10)).toString(10))),r=r.replace(/^0+/,""),isNaN(t)||o.toLowerCase()!==r?(N(e,"Invalid character entity"),"&"+e.entity+";"):(0,n.default)(t))}function G(e,t){"<"===t?(e.state=C.OPEN_WAKA,e.startTagPosition=e.position):x(t)||(N(e,"Non-whitespace before first tag."),e.textNode=t,e.state=C.TEXT)}function K(e,t){var r="";return t<e.length&&(r=e.charAt(t)),r}C=r.STATE,n.default||(T=String.fromCharCode,k=Math.floor,O=function(){var e,t,r=16384,n=[],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||k(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?n.push(s):(e=55296+((s-=65536)>>10),t=s%1024+56320,n.push(e,t)),(i+1===o||n.length>r)&&(a+=T.apply(null,n),n.length=0)}return a},a.default?Object.defineProperty(String,"fromCodePoint",{value:O,configurable:!0,writable:!0}):String.fromCodePoint=O)}(void 0===r?(void 0).sax={}:r)}).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,r){t.exports=i;var n=e("events").EventEmitter;function i(){n.call(this)}e("inherits")(i,n),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 r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.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===n.listenerCount(this,"error"))throw e}function u(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",l),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("error",c),e.on("error",c),r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),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,r){(function(t){var n=e("./lib/request"),i=e("./lib/response"),o=e("xtend"),a=e("builtin-status-codes"),s=e("url"),l=r;l.request=function(e,r){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 d=new n(e);return r&&d.on("response",r),d},l.get=function(e,t){var r=l.request(e,t);return r.end(),r},l.ClientRequest=n,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,r){(function(e){"use strict";r.fetch=s(e.fetch)&&s(e.ReadableStream),r.writableStream=s(e.WritableStream),r.abortController=s(e.AbortController),r.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),r.blobConstructor=!0}catch(e){}var t;function n(){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=n();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}r.arraybuffer=r.fetch||o&&i("arraybuffer"),r.msstream=!r.fetch&&a&&i("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&o&&i("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!n()&&s(n().overrideMimeType),r.vbArray=s(e.VBArray),t=null}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],233:[function(e,t,r){(function(r,n,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"),d=e("readable-stream"),f=e("to-arraybuffer"),h=u.IncomingMessage,p=u.readyStates,m=t.exports=function(e){var t,r=this;d.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+new i(e.auth).toString("base64")),(0,s.default)(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var n=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!l.abortController)n=!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}r._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,n),r._fetchTimer=null,r.on("finish",(function(){r._onFinish()}))};c(m,d.Writable),m.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===g.indexOf(r)&&(this._headers[r]={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?f(i.concat(e._body)):l.blobConstructor?new n.Blob(e._body.map((function(e){return f(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,r=o[e].value;Array.isArray(r)?r.forEach((function(e){c.push([t,e])})):c.push([t,r])})),"fetch"===e._mode){var u=null;if(l.abortController){var d=new AbortController;u=d.signal,e._fetchAbortController=d,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=n.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}n.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){n.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)}))}else{var h=e._xhr=new n.XMLHttpRequest;try{h.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}"responseType"in h&&(h.responseType=e._mode.split(":")[0]),"withCredentials"in h&&(h.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in h&&h.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(h.timeout=t.requestTimeout,h.ontimeout=function(){e.emit("requestTimeout")}),c.forEach((function(e){h.setRequestHeader(e[0],e[1])})),e._response=null,h.onreadystatechange=function(){switch(h.readyState){case p.LOADING:case p.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(h.onprogress=function(){e._onXHRProgress()}),h.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{h.send(a)}catch(t){return void r.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 h(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,r){this._body.push(e),r()},m.prototype.abort=m.prototype.destroy=function(){this._destroyed=!0,n.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,r){"function"==typeof e&&(r=e,e=void 0),d.Writable.prototype.end.call(this,e,t,r)},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,r){(function(t,n,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"),d=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},f=r.IncomingMessage=function(e,r,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=r,c.url=r.url,c.statusCode=r.status,c.statusMessage=r.statusText,r.headers.forEach((function(e,t){c.headers[t.toLowerCase()]=e,c.rawHeaders.push(t,e)})),l.writableStream){var d=new WritableStream({write:function(e){return new s.default((function(t,r){c._destroyed?r():c.push(new i(e))?t():c._resumeFetch=t}))},close:function(){n.clearTimeout(a),c._destroyed||c.push(null)},abort:function(e){c._destroyed||c.emit("error",e)}});try{return void r.body.pipeTo(d).catch((function(e){n.clearTimeout(a),c._destroyed||c.emit("error",e)}))}catch(e){}}var f=r.body.getReader();!function e(){f.read().then((function(t){if(!c._destroyed){if(t.done)return n.clearTimeout(a),void c.push(null);c.push(new i(t.value)),e()}})).catch((function(e){n.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 r=t[1].toLowerCase();"set-cookie"===r?(void 0===c.headers[r]&&(c.headers[r]=[]),c.headers[r].push(t[2])):void 0!==c.headers[r]?c.headers[r]+=", "+t[2]:c.headers[r]=t[2],c.rawHeaders.push(t[1],t[2])}})),c._charset="x-user-defined",!l.overrideMimeType){var h=c.rawHeaders["mime-type"];if(h){var p=h.match(/;\s*charset=([^;])(;|$)/);p&&(c._charset=p[1].toLowerCase())}c._charset||(c._charset="utf-8")}};c(f,u.Readable),f.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},f.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null;switch(e._mode){case"text:vbarray":if(t.readyState!==d.DONE)break;try{r=new n.VBArray(t.responseBody).toArray()}catch(e){}if(null!==r){e.push(new i(r));break}case"text":try{r=t.responseText}catch(t){e._mode="text:vbarray";break}if(r.length>e._pos){var o=r.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=r.length}break;case"arraybuffer":if(t.readyState!==d.DONE||!t.response)break;r=t.response,e.push(new i(new Uint8Array(r)));break;case"moz-chunked-arraybuffer":if(r=t.response,t.readyState!==d.LOADING||!r)break;e.push(new i(new Uint8Array(r)));break;case"ms-stream":if(r=t.response,t.readyState!==d.LOADING)break;var l=new n.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(r)}e._xhr.readyState===d.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,r){"use strict";var n=e("safe-buffer").Buffer,i=n.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&&(n.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=d,t=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.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,r=function(e,t,r){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!==r?r: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 r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}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 r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?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-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}r.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):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 r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=a(t[n]))>=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=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},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,r){(function(t,n){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}r.setTimeout=function(){return new c(o.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(o.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r.setImmediate="function"==typeof t?t:function(e){var t=l++,n=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,i((function(){s[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))})),t},r.clearImmediate="function"==typeof n?n:function(e){delete s[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(e,t,r){var n=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(n.isBuffer(e)){for(var t=new Uint8Array(e.length),r=e.length,i=0;i<r;i++)t[i]=e[i];return t.buffer}throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(e,t,r){"use strict";var n=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}r.parse=y,r.resolve=function(e,t){return y(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?y(e,!1,!0).resolveObject(t):t},r.format=function(e){return i.isString(e)&&(e=y(e)),e instanceof o?e.format():o.prototype.format.call(e)},r.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(c),d=["%","/","?",";","#"].concat(u),f=["/","?","#"],h=/^[+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},b=e("querystring");function y(e,t,r){if(e&&i.isObject(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){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 y=e=c.join(s);if(y=y.trim(),!r&&1===e.split("#").length){var x=l.exec(y);if(x)return this.path=y,this.href=y,this.pathname=x[1],x[2]?(this.search=x[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=a.exec(y);if(w){var E=(w=w[0]).toLowerCase();this.protocol=E,y=y.substr(w.length)}if(r||w||y.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===y.substr(0,2);!S||w&&g[w]||(y=y.substr(2),this.slashes=!0)}if(!g[w]&&(S||w&&!v[w])){for(var _,T,k=-1,O=0;O<f.length;O++)-1!==(C=y.indexOf(f[O]))&&(-1===k||C<k)&&(k=C);for(-1!==(T=-1===k?y.lastIndexOf("@"):y.lastIndexOf("@",k))&&(_=y.slice(0,T),y=y.slice(T+1),this.auth=decodeURIComponent(_)),k=-1,O=0;O<d.length;O++){var C;-1!==(C=y.indexOf(d[O]))&&(-1===k||C<k)&&(k=C)}-1===k&&(k=y.length),this.host=y.slice(0,k),y=y.slice(k),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var D=this.hostname.split(/\./),L=(O=0,D.length);O<L;O++){var I=D[O];if(I&&!I.match(h)){for(var j="",R=0,M=I.length;R<M;R++)I.charCodeAt(R)>127?j+="x":j+=I[R];if(!j.match(h)){var N=D.slice(0,O),P=D.slice(O+1),F=I.match(p);F&&(N.push(F[1]),P.unshift(F[2])),P.length&&(y="/"+P.join(".")+y),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=n.toASCII(this.hostname));var B=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+B,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!m[E])for(O=0,L=u.length;O<L;O++){var H=u[O];if(-1!==y.indexOf(H)){var z=encodeURIComponent(H);z===H&&(z=escape(H)),y=y.split(H).join(z)}}var G=y.indexOf("#");-1!==G&&(this.hash=y.substr(G),y=y.slice(0,G));var K=y.indexOf("?");if(-1!==K?(this.search=y.substr(K),this.query=y.substr(K+1),t&&(this.query=b.parse(this.query)),y=y.slice(0,K)):t&&(this.search="",this.query={}),y&&(this.pathname=y),v[E]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){B=this.pathname||"";var W=this.search||"";this.path=B+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||"",r=this.pathname||"",n=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=b.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||v[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+n},o.prototype.resolve=function(e){return this.resolveObject(y(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 r=new o,n=Object.keys(this),a=0;a<n.length;a++){var s=n[a];r[s]=this[s]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),c=0;c<l.length;c++){var u=l[c];"protocol"!==u&&(r[u]=e[u])}return v[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!v[e.protocol]){for(var d=Object.keys(e),f=0;f<d.length;f++){var h=d[f];r[h]=e[h]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.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(""),r.pathname=p.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var m=r.pathname||"",b=r.search||"";r.path=m+b}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var y=r.pathname&&"/"===r.pathname.charAt(0),x=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=x||y||r.host&&e.pathname,E=w,S=r.pathname&&r.pathname.split("/")||[],_=(p=e.pathname&&e.pathname.split("/")||[],r.protocol&&!v[r.protocol]);if(_&&(r.hostname="",r.port=null,r.host&&(""===S[0]?S[0]=r.host:S.unshift(r.host)),r.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)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,S=p;else if(p.length)S||(S=[]),S.pop(),S=S.concat(p),r.search=e.search,r.query=e.query;else if(!i.isNullOrUndefined(e.search))return _&&(r.hostname=r.host=S.shift(),(A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=A.shift(),r.host=r.hostname=A.shift())),r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!S.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var T=S.slice(-1)[0],k=(r.host||e.host||S.length>1)&&("."===T||".."===T)||""===T,O=0,C=S.length;C>=0;C--)"."===(T=S[C])?S.splice(C,1):".."===T?(S.splice(C,1),O++):O&&(S.splice(C,1),O--);if(!w&&!E)for(;O--;O)S.unshift("..");!w||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),k&&"/"!==S.join("/").substr(-1)&&S.push("");var A,D=""===S[0]||S[0]&&"/"===S[0].charAt(0);return _&&(r.hostname=r.host=D?"":S.length?S.shift():"",(A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=A.shift(),r.host=r.hostname=A.shift())),(w=w||r.host&&S.length)&&!D&&S.unshift(""),S.length?r.pathname=S.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},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,r){"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,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],241:[function(e,t,r){"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 r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],242:[function(e,t,r){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,r){(function(t,n){var i=/%[sdj%]/g;r.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(s(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,a=String(e).replace(i,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),l=n[r];r<o;l=n[++r])m(l)||!x(l)?a+=" "+l:a+=" "+s(l);return a},r.deprecate=function(e,i){if(b(n.process))return function(){return r.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 n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(t)?n.showHidden=t:t&&r._extend(n,t),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),u(n,e,n.depth)}function l(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function c(e,t){return e}function u(e,t,n){if(e.customInspect&&t&&S(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return v(i)||(i=u(e,i,n)),i}var o=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"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,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),E(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return d(t);if(0===a.length){if(S(t)){var l=t.name?": "+t.name:"";return e.stylize("[Function"+l+"]","special")}if(y(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 d(t)}var c,x="",_=!1,T=["{","}"];return h(t)&&(_=!0,T=["[","]"]),S(t)&&(x=" [Function"+(t.name?": "+t.name:"")+"]"),y(t)&&(x=" "+RegExp.prototype.toString.call(t)),w(t)&&(x=" "+Date.prototype.toUTCString.call(t)),E(t)&&(x=" "+d(t)),0!==a.length||_&&0!=t.length?n<0?y(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=_?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a<s;++a)C(t,String(a))?o.push(f(e,t,r,n,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(f(e,t,r,n,i,!0))})),o}(e,t,n,s,a):a.map((function(r){return f(e,t,n,s,r,_)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,x,T)):T[0]+x+T[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,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")),C(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=m(r)?u(e,l.value,null):u(e,l.value,r-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")),b(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 h(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 b(e){return void 0===e}function y(e){return x(e)&&"[object RegExp]"===_(e)}function x(e){return"object"==typeof e&&null!==e}function w(e){return x(e)&&"[object Date]"===_(e)}function E(e){return x(e)&&("[object Error]"===_(e)||e instanceof Error)}function S(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(b(o)&&(o=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var n=t.pid;a[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else a[e]=function(){};return a[e]},r.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"},r.isArray=h,r.isBoolean=p,r.isNull=m,r.isNullOrUndefined=function(e){return null==e},r.isNumber=g,r.isString=v,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=b,r.isRegExp=y,r.isObject=x,r.isDate=w,r.isError=E,r.isFunction=S,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var e=new Date,t=[T(e.getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":");return[e.getDate(),k[e.getMonth()],t].join(" ")}function C(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){console.log("%s - %s",O(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!x(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];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,r){"use strict";(function(){r.stripBOM=function(e){return"\ufeff"===e[0]?e.substring(1):e}}).call(void 0)},{}],245:[function(e,t,r){"use strict";var n=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[>")},r.Builder=function(){function e(e){var t,r,n;for(t in this.options={},r=o[.2])c.call(r,t)&&(n=r[t],this.options[t]=n);for(t in e)c.call(e,t)&&(n=e[t],this.options[t]=n)}return e.prototype.buildObject=function(e){var r,a,u,d,f,h;return r=this.options.attrkey,a=this.options.charkey,1===(0,i.default)(e).length&&this.options.rootName===o[.2].rootName?e=e[f=(0,i.default)(e)[0]]:f=this.options.rootName,h=this,u=function(e,t){var i,o,d,f,p,m;if("object"!==(void 0===t?"undefined":(0,n.default)(t)))h.options.cdata&&s(t)?e.raw(l(t)):e.txt(t);else if(Array.isArray(t)){for(f in t)if(c.call(t,f))for(p in o=t[f])d=o[p],e=u(e.ele(p),d).up()}else for(p in t)if(c.call(t,p))if(o=t[p],p===r){if("object"===(void 0===o?"undefined":(0,n.default)(o)))for(i in o)m=o[i],e=e.att(i,m)}else if(p===a)e=h.options.cdata&&s(o)?e.raw(l(o)):e.txt(o);else if(Array.isArray(o))for(f in o)c.call(o,f)&&(e="string"==typeof(d=o[f])?h.options.cdata&&s(d)?e.ele(p).raw(l(d)).up():e.ele(p,d).up():u(e.ele(p),d).up());else"object"===(void 0===o?"undefined":(0,n.default)(o))?e=u(e.ele(p),o).up():"string"==typeof o&&h.options.cdata&&s(o)?e=e.ele(p).raw(l(o)).up():(null==o&&(o=""),e=e.ele(p,o.toString()).up());return e},d=t.create(f,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),u(d,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,r){"use strict";(function(){r.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,r){"use strict";var n=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,d,f,h,p=function(e,t){return function(){return e.apply(t,arguments)}},m={}.hasOwnProperty;f=e("sax"),l=e("events"),t=e("./bom"),d=e("./processors"),h=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,r){var n,i;for(n=0,i=e.length;n<i;n++)t=(0,e[n])(t,r);return t},r.Parser=function(e){function l(e){var t,n,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 r.Parser))return new r.Parser(e);for(t in this.options={},n=s[.2])m.call(n,t)&&(i=n[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(d.normalize)),this.reset()}return function(e,t){for(var r in t)m.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,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),h(this.processAsync))}catch(e){if(t=e,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(t)}},l.prototype.assignOrPush=function(e,t,r){return t in e?(e[t]instanceof Array||(e[t]=[e[t]]),e[t].push(r)):this.options.explicitArray?e[t]=[r]:e[t]=r},l.prototype.reset=function(){var e,t,r,n,s;return this.removeAllListeners(),this.saxParser=f.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,n=[],e=this.options.attrkey,t=this.options.charkey,this.saxParser.onopentag=function(r){return function(i){var o,a,s,l,c;if((s={})[t]="",!r.options.ignoreAttrs)for(o in c=i.attributes)m.call(c,o)&&(e in s||r.options.mergeAttrs||(s[e]={}),a=r.options.attrValueProcessors?u(r.options.attrValueProcessors,i.attributes[o],o):i.attributes[o],l=r.options.attrNameProcessors?u(r.options.attrNameProcessors,o):o,r.options.mergeAttrs?r.assignOrPush(s,l,a):s[e][l]=a);return s["#name"]=r.options.tagNameProcessors?u(r.options.tagNameProcessors,i.name):i.name,r.options.xmlns&&(s[r.options.xmlnskey]={uri:i.uri,local:i.local}),n.push(s)}}(this),this.saxParser.onclosetag=function(e){return function(){var r,s,l,d,f,h,p,g,v,b;if(h=n.pop(),f=h["#name"],e.options.explicitChildren&&e.options.preserveChildrenOrder||delete h["#name"],!0===h.cdata&&(r=h.cdata,delete h.cdata),v=n[n.length-1],h[t].match(/^\s*$/)&&!r?(s=h[t],delete h[t]):(e.options.trim&&(h[t]=h[t].trim()),e.options.normalize&&(h[t]=h[t].replace(/\s{2,}/g," ").trim()),h[t]=e.options.valueProcessors?u(e.options.valueProcessors,h[t],f):h[t],1===(0,o.default)(h).length&&t in h&&!e.EXPLICIT_CHARKEY&&(h=h[t])),c(h)&&(h=""!==e.options.emptyTag?e.options.emptyTag:s),null!=e.options.validator&&(b="/"+function(){var e,t,r;for(r=[],e=0,t=n.length;e<t;e++)d=n[e],r.push(d["#name"]);return r}().concat(f).join("/"),function(){var t;try{h=e.options.validator(b,v&&v[f],h)}catch(r){return t=r,e.emit("error",t)}}()),e.options.explicitChildren&&!e.options.mergeAttrs&&"object"===(void 0===h?"undefined":(0,a.default)(h)))if(e.options.preserveChildrenOrder){if(v){for(l in v[e.options.childkey]=v[e.options.childkey]||[],p={},h)m.call(h,l)&&(p[l]=h[l]);v[e.options.childkey].push(p),delete h["#name"],1===(0,o.default)(h).length&&t in h&&!e.EXPLICIT_CHARKEY&&(h=h[t])}}else d={},e.options.attrkey in h&&(d[e.options.attrkey]=h[e.options.attrkey],delete h[e.options.attrkey]),!e.options.charsAsChildren&&e.options.charkey in h&&(d[e.options.charkey]=h[e.options.charkey],delete h[e.options.charkey]),(0,i.default)(h).length>0&&(d[e.options.childkey]=h),h=d;return n.length>0?e.assignOrPush(v,f,h):(e.options.explicitRoot&&(g=h,(h={})[f]=g),e.resultObject=h,e.saxParser.ended=!0,e.emit("end",e.resultObject))}}(this),r=function(e){return function(r){var i,o;if(o=n[n.length-1])return o[t]+=r,e.options.explicitChildren&&e.options.preserveChildrenOrder&&e.options.charsAsChildren&&(e.options.includeWhiteChars||""!==r.replace(/\\n/g,"").trim())&&(o[e.options.childkey]=o[e.options.childkey]||[],(i={"#name":"__text__"})[t]=r,e.options.normalize&&(i[t]=i[t].replace(/\s{2,}/g," ").trim()),o[e.options.childkey].push(i)),o}}(this),this.saxParser.ontext=r,this.saxParser.oncdata=function(e){var t;if(t=r(e))return t.cdata=!0}},l.prototype.parseString=function(e,r){var n;null!=r&&"function"==typeof r&&(this.on("end",(function(e){return this.reset(),r(null,e)})),this.on("error",(function(e){return this.reset(),r(e)})));try{return""===(e=e.toString()).trim()?(this.emit("end",null),!0):(e=t.stripBOM(e),this.options.async?(this.remaining=e,h(this.processAsync),this.saxParser):this.saxParser.write(e).close())}catch(e){if(n=e,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",n),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw n}},l.prototype.parseStringPromise=function(e){return new n.default((t=this,function(r,n){return t.parseString(e,(function(e,t){return e?n(e):r(t)}))}));var t},l}(l),r.parseString=function(e,t,n){var i,o;return null!=n?("function"==typeof n&&(i=n),"object"===(void 0===t?"undefined":(0,a.default)(t))&&(o=t)):("function"==typeof t&&(i=t),o={}),new r.Parser(o).parseString(e,i)},r.parseStringPromise=function(e,t){var n;return"object"===(void 0===t?"undefined":(0,a.default)(t))&&(n=t),new r.Parser(n).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,r){"use strict";(function(){var e;e=new RegExp(/(?!xmlns)^.*:/),r.normalize=function(e){return e.toLowerCase()},r.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},r.stripPrefix=function(t){return t.replace(e,"")},r.parseNumbers=function(e){return isNaN(e)||(e=e%1==0?parseInt(e,10):parseFloat(e)),e},r.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e="true"===e.toLowerCase()),e}}).call(void 0)},{}],249:[function(e,t,r){"use strict";(function(){var t,n,i,o,a={}.hasOwnProperty;n=e("./defaults"),t=e("./builder"),i=e("./parser"),o=e("./processors"),r.defaults=n.defaults,r.processors=o,r.ValidationError=function(e){function t(e){this.message=e}return function(e,t){for(var r in t)a.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,Error),t}(),r.Builder=t.Builder,r.Parser=i.Parser,r.parseString=i.parseString,r.parseStringPromise=i.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(e,t,r){"use strict";(function(){t.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(e,t,r){"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,r){"use strict";var n=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,r,a,s,l,c,u,d=[].slice,f={}.hasOwnProperty;e=function(){var e,t,r,n,i,a;if(a=arguments[0],i=2<=arguments.length?d.call(arguments,1):[],l(o.default))o.default.apply(null,arguments);else for(e=0,r=i.length;e<r;e++)if(null!=(n=i[e]))for(t in n)f.call(n,t)&&(a[t]=n[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(f.call(e,t))return!1;return!0},u=function(e){var t,r;return c(e)&&(r=(0,n.default)(e))&&(t=r.constructor)&&"function"==typeof t&&t instanceof t&&Function.prototype.toString.call(t)===Function.prototype.toString.call(Object)},r=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=r}).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,r){"use strict";(function(){t.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(e,t,r){"use strict";var n,i=e("babel-runtime/core-js/object/create"),o=(n=i)&&n.__esModule?n:{default:n};(function(){var r;r=e("./NodeType"),e("./XMLNode"),t.exports=function(){function e(e,t,n){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(n),this.type=r.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,r){"use strict";var n,i=e("babel-runtime/core-js/object/create"),o=(n=i)&&n.__esModule?n:{default:n};(function(){var r,n,i={}.hasOwnProperty;r=e("./NodeType"),n=e("./XMLCharacterData"),t.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=r.CData,this.value=this.stringify.cdata(n)}return function(e,t){for(var r in t)i.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,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}(n)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(e,t,r){"use strict";var n,i=e("babel-runtime/core-js/object/create"),o=(n=i)&&n.__esModule?n:{default:n};(function(){var r,n={}.hasOwnProperty;r=e("./XMLNode"),t.exports=function(e){function t(e){t.__super__.constructor.call(this,e),this.value=""}return function(e,t){for(var r in t)n.call(t,r)&&(e[r]=t[r]);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,r){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}(r)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(e,t,r){"use strict";var n,i=e("babel-runtime/core-js/object/create"),o=(n=i)&&n.__esModule?n:{default:n};(function(){var r,n,i={}.hasOwnProperty;r=e("./NodeType"),n=e("./XMLCharacterData"),t.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=r.Comment,this.value=this.stringify.comment(n)}return function(e,t){for(var r in t)i.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,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}(n)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(e,t,r){"use strict";var n=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 r,o;r=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 r,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,n.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,r){"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,r){"use strict";(function(){t.exports=function(){function e(){}return e.prototype.hasFeature=function(e,t){return!0},e.prototype.createDocumentType=function(e,t,r){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(e,t,r){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,r){"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,r){"use strict";(function(){var r,n,i={}.hasOwnProperty;n=e("./XMLNode"),r=e("./NodeType"),t.exports=function(e){function t(e,n,i,o,a,s){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing DTD element name. "+this.debugInfo());if(null==i)throw new Error("Missing DTD attribute name. "+this.debugInfo(n));if(!o)throw new Error("Missing DTD attribute type. "+this.debugInfo(n));if(!a)throw new Error("Missing DTD attribute default. "+this.debugInfo(n));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(n));if(s&&!a.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(n));this.elementName=this.stringify.name(n),this.type=r.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 r in t)i.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.toString=function(e){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(e))},t}(n)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(e,t,r){"use strict";(function(){var r,n,i={}.hasOwnProperty;n=e("./XMLNode"),r=e("./NodeType"),t.exports=function(e){function t(e,n,i){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing DTD element name. "+this.debugInfo());i||(i="(#PCDATA)"),Array.isArray(i)&&(i="("+i.join(",")+")"),this.name=this.stringify.name(n),this.type=r.ElementDeclaration,this.value=this.stringify.dtdElementValue(i)}return function(e,t){for(var r in t)i.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.toString=function(e){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(e))},t}(n)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(e,t,r){"use strict";(function(){var r,n,i,o={}.hasOwnProperty;i=e("./Utility").isObject,n=e("./XMLNode"),r=e("./NodeType"),t.exports=function(e){function t(e,n,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=!!n,this.name=this.stringify.name(o),this.type=r.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 r in t)o.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,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}(n)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(e,t,r){"use strict";(function(){var r,n,i={}.hasOwnProperty;n=e("./XMLNode"),r=e("./NodeType"),t.exports=function(e){function t(e,n,i){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing DTD notation name. "+this.debugInfo(n));if(!i.pubID&&!i.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(n));this.name=this.stringify.name(n),this.type=r.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 r in t)i.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,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}(n)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(e,t,r){"use strict";(function(){var r,n,i,o={}.hasOwnProperty;i=e("./Utility").isObject,n=e("./XMLNode"),r=e("./NodeType"),t.exports=function(e){function t(e,n,o,a){var s;t.__super__.constructor.call(this,e),i(n)&&(n=(s=n).version,o=s.encoding,a=s.standalone),n||(n="1.0"),this.type=r.Declaration,this.version=this.stringify.xmlVersion(n),null!=o&&(this.encoding=this.stringify.xmlEncoding(o)),null!=a&&(this.standalone=this.stringify.xmlStandalone(a))}return function(e,t){for(var r in t)o.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.toString=function(e){return this.options.writer.declaration(this,this.options.writer.filterOptions(e))},t}(n)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(e,t,r){"use strict";(function(){var r,n,i,o,a,s,l,c,u={}.hasOwnProperty;c=e("./Utility").isObject,l=e("./XMLNode"),r=e("./NodeType"),n=e("./XMLDTDAttList"),o=e("./XMLDTDEntity"),i=e("./XMLDTDElement"),a=e("./XMLDTDNotation"),s=e("./XMLNamedNodeMap"),t.exports=function(e){function t(e,n,i){var o,a,s,l,u,d;if(t.__super__.constructor.call(this,e),this.type=r.DocType,e.children)for(a=0,s=(l=e.children).length;a<s;a++)if((o=l[a]).type===r.Element){this.name=o.name;break}this.documentObject=e,c(n)&&(n=(u=n).pubID,i=u.sysID),null==i&&(i=(d=[n,i])[0],n=d[1]),null!=n&&(this.pubID=this.stringify.dtdPubID(n)),null!=i&&(this.sysID=this.stringify.dtdSysID(i))}return function(e,t){for(var r in t)u.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),Object.defineProperty(t.prototype,"entities",{get:function(){var e,t,n,i,o;for(i={},t=0,n=(o=this.children).length;t<n;t++)(e=o[t]).type!==r.EntityDeclaration||e.pe||(i[e.name]=e);return new s(i)}}),Object.defineProperty(t.prototype,"notations",{get:function(){var e,t,n,i,o;for(i={},t=0,n=(o=this.children).length;t<n;t++)(e=o[t]).type===r.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 r;return r=new i(this,e,t),this.children.push(r),this},t.prototype.attList=function(e,t,r,i,o){var a;return a=new n(this,e,t,r,i,o),this.children.push(a),this},t.prototype.entity=function(e,t){var r;return r=new o(this,!1,e,t),this.children.push(r),this},t.prototype.pEntity=function(e,t){var r;return r=new o(this,!0,e,t),this.children.push(r),this},t.prototype.notation=function(e,t){var r;return r=new a(this,e,t),this.children.push(r),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,r,n,i){return this.attList(e,t,r,n,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,r){"use strict";(function(){var r,n,i,o,a,s,l,c={}.hasOwnProperty;l=e("./Utility").isPlainObject,i=e("./XMLDOMImplementation"),n=e("./XMLDOMConfiguration"),o=e("./XMLNode"),r=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=r.Document,this.documentURI=null,this.domConfig=new n,e||(e={}),e.writer||(e.writer=new a),this.options=e,this.stringify=new s(e)}return function(e,t){for(var r in t)c.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),Object.defineProperty(t.prototype,"implementation",{value:new i}),Object.defineProperty(t.prototype,"doctype",{get:function(){var e,t,n,i;for(t=0,n=(i=this.children).length;t<n;t++)if((e=i[t]).type===r.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===r.Declaration?this.children[0].encoding:null}}),Object.defineProperty(t.prototype,"xmlStandalone",{get:function(){return 0!==this.children.length&&this.children[0].type===r.Declaration&&"yes"===this.children[0].standalone}}),Object.defineProperty(t.prototype,"xmlVersion",{get:function(){return 0!==this.children.length&&this.children[0].type===r.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,r){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,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.createTreeWalker=function(e,t,r){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,r){"use strict";(function(){var r,n,i,o,a,s,l,c,u,d,f,h,p,m,g,v,b,y,x,w,E,S,_,T={}.hasOwnProperty;_=e("./Utility"),E=_.isObject,w=_.isFunction,S=_.isPlainObject,x=_.getValue,r=e("./NodeType"),h=e("./XMLDocument"),p=e("./XMLElement"),o=e("./XMLCData"),a=e("./XMLComment"),g=e("./XMLRaw"),y=e("./XMLText"),m=e("./XMLProcessingInstruction"),d=e("./XMLDeclaration"),f=e("./XMLDocType"),s=e("./XMLDTDAttList"),c=e("./XMLDTDEntity"),l=e("./XMLDTDElement"),u=e("./XMLDTDNotation"),i=e("./XMLAttribute"),b=e("./XMLStringifier"),v=e("./XMLStringWriter"),n=e("./WriterState"),t.exports=function(){function e(e,t,n){var i;this.name="?xml",this.type=r.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 b(e),this.onDataCallback=t||function(){},this.onEndCallback=n||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,n,i,o,a,s,l,c;switch(e.type){case r.CData:this.cdata(e.value);break;case r.Comment:this.comment(e.value);break;case r.Element:for(n in i={},l=e.attribs)T.call(l,n)&&(t=l[n],i[n]=t.value);this.node(e.name,i);break;case r.Dummy:this.dummy();break;case r.Raw:this.raw(e.value);break;case r.Text:this.text(e.value);break;case r.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===r.Element&&this.up();return this},e.prototype.dummy=function(){return this},e.prototype.node=function(e,t,r){var n;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)||(r=(n=[t,r])[0],t=n[1]),this.currentNode=new p(this,e,t),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,null!=r&&this.text(r),this},e.prototype.element=function(e,t,n){var i,o,a,s,l,c;if(this.currentNode&&this.currentNode.type===r.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 h(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===r.Element&&this.up();else this.node(e,t,n);return this},e.prototype.attribute=function(e,t){var r,n;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(r in e)T.call(e,r)&&(n=e[r],this.attribute(r,n));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 y(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 r,n,i,o,a;if(this.openCurrent(),null!=e&&(e=x(e)),null!=t&&(t=x(t)),Array.isArray(e))for(r=0,o=e.length;r<o;r++)n=e[r],this.instruction(n);else if(E(e))for(n in e)T.call(e,n)&&(i=e[n],this.instruction(n,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,r){var n;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return n=new d(this,e,t,r),this.onData(this.writer.declaration(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.doctype=function(e,t,r){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 f(this,t,r),this.currentNode.rootNodeName=e,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},e.prototype.dtdElement=function(e,t){var r;return this.openCurrent(),r=new l(this,e,t),this.onData(this.writer.dtdElement(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.attList=function(e,t,r,n,i){var o;return this.openCurrent(),o=new s(this,e,t,r,n,i),this.onData(this.writer.dtdAttList(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.entity=function(e,t){var r;return this.openCurrent(),r=new c(this,!1,e,t),this.onData(this.writer.dtdEntity(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.pEntity=function(e,t){var r;return this.openCurrent(),r=new c(this,!0,e,t),this.onData(this.writer.dtdEntity(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},e.prototype.notation=function(e,t){var r;return this.openCurrent(),r=new u(this,e,t),this.onData(this.writer.dtdNotation(r,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!==r.Element||(this.root=e),i="",e.type===r.Element){for(o in this.writerOptions.state=n.OpenTag,i=this.writer.indent(e,this.writerOptions,this.currentLevel)+"<"+e.name,a=e.attribs)T.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=n.InsideTag}else this.writerOptions.state=n.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=n.InsideTag):(this.writerOptions.state=n.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=n.CloseTag,t=e.type===r.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=n.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,r){return this.node(e,t,r)},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,r){return this.declaration(e,t,r)},e.prototype.dtd=function(e,t,r){return this.doctype(e,t,r)},e.prototype.e=function(e,t,r){return this.element(e,t,r)},e.prototype.n=function(e,t,r){return this.node(e,t,r)},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===r.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.a=function(){return this.currentNode&&this.currentNode.type===r.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,r){"use strict";var n,i=e("babel-runtime/core-js/object/create"),o=(n=i)&&n.__esModule?n:{default:n};(function(){var r,n,i={}.hasOwnProperty;n=e("./XMLNode"),r=e("./NodeType"),t.exports=function(e){function t(e){t.__super__.constructor.call(this,e),this.type=r.Dummy}return function(e,t){for(var r in t)i.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){return(0,o.default)(this)},t.prototype.toString=function(e){return""},t}(n)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(e,t,r){"use strict";var n,i=e("babel-runtime/core-js/object/create"),o=(n=i)&&n.__esModule?n:{default:n};(function(){var r,n,i,a,s,l,c,u,d={}.hasOwnProperty;u=e("./Utility"),c=u.isObject,l=u.isFunction,s=u.getValue,a=e("./XMLNode"),r=e("./NodeType"),n=e("./XMLAttribute"),i=e("./XMLNamedNodeMap"),t.exports=function(e){function t(e,n,i){var o,a,s,l;if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(n),this.type=r.Element,this.attribs={},this.schemaTypeInfo=null,null!=i&&this.attribute(i),e.type===r.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===r.DocType){o.name=this.name;break}}return function(e,t){for(var r in t)d.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,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,r,n;for(t in(r=(0,o.default)(this)).isRoot&&(r.documentObject=null),r.attribs={},n=this.attribs)d.call(n,t)&&(e=n[t],r.attribs[t]=e.clone());return r.children=[],this.children.forEach((function(e){var t;return(t=e.clone()).parent=r,r.children.push(t)})),r},t.prototype.attribute=function(e,t){var r,i;if(null!=e&&(e=s(e)),c(e))for(r in e)d.call(e,r)&&(i=e[r],this.attribute(r,i));else l(t)&&(t=t.apply()),this.options.keepNullAttributes&&null==t?this.attribs[e]=new n(this,e,""):null!=t&&(this.attribs[e]=new n(this,e,t));return this},t.prototype.removeAttribute=function(e){var t,r,n;if(null==e)throw new Error("Missing attribute name. "+this.debugInfo());if(e=s(e),Array.isArray(e))for(r=0,n=e.length;r<n;r++)t=e[r],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,r){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,r){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 r,n,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(r=n=0,i=this.attribs.length-1;0<=i?n<=i:n>=i;r=0<=i?++n:--n)if(!this.attribs[r].isEqualNode(e.attribs[r]))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,r){"use strict";var n,i=e("babel-runtime/core-js/object/keys"),o=(n=i)&&n.__esModule?n:{default:n};(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,r){"use strict";(function(){var r,n,i,o,a,s,l,c,u,d,f,h,p,m,g,v,b,y={}.hasOwnProperty;b=e("./Utility"),v=b.isObject,g=b.isFunction,m=b.isEmpty,p=b.getValue,c=null,i=null,o=null,a=null,s=null,f=null,h=null,d=null,l=null,n=null,u=null,r=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"),f=e("./XMLRaw"),h=e("./XMLText"),d=e("./XMLProcessingInstruction"),l=e("./XMLDummy"),n=e("./NodeType"),u=e("./XMLNodeList"),e("./XMLNamedNodeMap"),r=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,r,i,o;if(this.nodeType===n.Element||this.nodeType===n.DocumentFragment){for(o="",t=0,r=(i=this.children).length;t<r;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,r,n,i,o;for(this.parent=e,e&&(this.options=e.options,this.stringify=e.stringify),o=[],r=0,n=(i=this.children).length;r<n;r++)t=i[r],o.push(t.setParent(this));return o},t.prototype.element=function(e,t,r){var n,i,o,a,s,l,c,u,d,f,h;if(l=null,null===t&&null==r&&(t=(d=[{},null])[0],r=d[1]),null==t&&(t={}),t=p(t),v(t)||(r=(f=[t,r])[0],t=f[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(y.call(e,s))if(h=e[s],g(h)&&(h=h.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===s.indexOf(this.stringify.convertAttKey))l=this.attribute(s.substr(this.stringify.convertAttKey.length),h);else if(!this.options.separateArrayItems&&Array.isArray(h)&&m(h))l=this.dummy();else if(v(h)&&m(h))l=this.element(s);else if(this.options.keepNullNodes||null!=h)if(!this.options.separateArrayItems&&Array.isArray(h))for(a=0,u=h.length;a<u;a++)i=h[a],(n={})[s]=i,l=this.element(n);else v(h)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===s.indexOf(this.stringify.convertTextKey)?l=this.element(h):(l=this.element(s)).element(h):l=this.element(s,h);else l=this.dummy()}else l=this.options.keepNullNodes||null!==r?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===e.indexOf(this.stringify.convertTextKey)?this.text(r):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===e.indexOf(this.stringify.convertCDataKey)?this.cdata(r):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===e.indexOf(this.stringify.convertCommentKey)?this.comment(r):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===e.indexOf(this.stringify.convertRawKey)?this.raw(r):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===e.indexOf(this.stringify.convertPIKey)?this.instruction(e.substr(this.stringify.convertPIKey.length),r):this.node(e,t,r):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,r){var n,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),n=this.parent.element(e,t,r),Array.prototype.push.apply(this.parent.children,s),n},t.prototype.insertAfter=function(e,t,r){var n,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),n=this.parent.element(e,t,r),Array.prototype.push.apply(this.parent.children,o),n},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,r){var n,i;return null!=e&&(e=p(e)),t||(t={}),t=p(t),v(t)||(r=(i=[t,r])[0],t=i[1]),n=new c(this,e,t),null!=r&&n.text(r),this.children.push(n),n},t.prototype.text=function(e){var t;return v(e)&&this.element(e),t=new h(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,r;return t=this.parent.children.indexOf(this),r=this.parent.children.splice(t),this.parent.comment(e),Array.prototype.push.apply(this.parent.children,r),this},t.prototype.commentAfter=function(e){var t,r;return t=this.parent.children.indexOf(this),r=this.parent.children.splice(t+1),this.parent.comment(e),Array.prototype.push.apply(this.parent.children,r),this},t.prototype.raw=function(e){var t;return t=new f(this,e),this.children.push(t),this},t.prototype.dummy=function(){return new l(this)},t.prototype.instruction=function(e,t){var r,n,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++)r=e[o],this.instruction(r);else if(v(e))for(r in e)y.call(e,r)&&(n=e[r],this.instruction(r,n));else g(t)&&(t=t.apply()),i=new d(this,e,t),this.children.push(i);return this},t.prototype.instructionBefore=function(e,t){var r,n;return r=this.parent.children.indexOf(this),n=this.parent.children.splice(r),this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,n),this},t.prototype.instructionAfter=function(e,t){var r,n;return r=this.parent.children.indexOf(this),n=this.parent.children.splice(r+1),this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,n),this},t.prototype.declaration=function(e,t,r){var i,o;return i=this.document(),o=new a(i,e,t,r),0===i.children.length?i.children.unshift(o):i.children[0].type===n.Declaration?i.children[0]=o:i.children.unshift(o),i.root()||i},t.prototype.dtd=function(e,t){var r,i,o,a,l,c,u,d,f;for(r=this.document(),i=new s(r,e,t),o=a=0,c=(d=r.children).length;a<c;o=++a)if(d[o].type===n.DocType)return r.children[o]=i,i;for(o=l=0,u=(f=r.children).length;l<u;o=++l)if(f[o].isRoot)return r.children.splice(o,0,i),i;return r.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===n.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===n.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,r;return null!=(e=e||this.name)||(null!=(t=this.parent)?t.name:void 0)?null==e?"parent: <"+this.parent.name+">":(null!=(r=this.parent)?r.name:void 0)?"node: <"+e+">, parent: <"+this.parent.name+">":"node: <"+e+">":""},t.prototype.ele=function(e,t,r){return this.element(e,t,r)},t.prototype.nod=function(e,t,r){return this.node(e,t,r)},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,r){return this.declaration(e,t,r)},t.prototype.e=function(e,t,r){return this.element(e,t,r)},t.prototype.n=function(e,t,r){return this.node(e,t,r)},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=r.Disconnected|r.ImplementationSpecific,Math.random()<.5?t|=r.Preceding:t|=r.Following,t):this.isAncestor(e)?r.Contains|r.Preceding:this.isDescendant(e)?r.Contains|r.Following:this.isPreceding(e)?r.Preceding:r.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,r,n;if(e.nodeType!==this.nodeType)return!1;if(e.children.length!==this.children.length)return!1;for(t=r=0,n=this.children.length-1;0<=n?r<=n:r>=n;t=0<=n?++r:--r)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,r){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,r,n,i;for(r=0,n=(i=this.children).length;r<n;r++){if(e===(t=i[r]))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,r;return t=this.treePosition(e),r=this.treePosition(this),-1!==t&&-1!==r&&t<r},t.prototype.isFollowing=function(e){var t,r;return t=this.treePosition(e),r=this.treePosition(this),-1!==t&&-1!==r&&t>r},t.prototype.treePosition=function(e){var t,r;return r=0,t=!1,this.foreachTreeNode(this.document(),(function(n){if(r++,!t&&n===e)return t=!0})),t?r:-1},t.prototype.foreachTreeNode=function(e,t){var r,n,i,o,a;for(e||(e=this.document()),n=0,i=(o=e.children).length;n<i;n++){if(a=t(r=o[n]))return a;if(a=this.foreachTreeNode(r,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,r){"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,r){"use strict";var n,i=e("babel-runtime/core-js/object/create"),o=(n=i)&&n.__esModule?n:{default:n};(function(){var r,n,i={}.hasOwnProperty;r=e("./NodeType"),n=e("./XMLCharacterData"),t.exports=function(e){function t(e,n,i){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing instruction target. "+this.debugInfo());this.type=r.ProcessingInstruction,this.target=this.stringify.insTarget(n),this.name=this.target,i&&(this.value=this.stringify.insValue(i))}return function(e,t){for(var r in t)i.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,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}(n)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(e,t,r){"use strict";var n,i=e("babel-runtime/core-js/object/create"),o=(n=i)&&n.__esModule?n:{default:n};(function(){var r,n,i={}.hasOwnProperty;r=e("./NodeType"),n=e("./XMLNode"),t.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing raw text. "+this.debugInfo());this.type=r.Raw,this.value=this.stringify.raw(n)}return function(e,t){for(var r in t)i.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,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}(n)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(e,t,r){"use strict";(function(){var r,n,i,o={}.hasOwnProperty;r=e("./NodeType"),i=e("./XMLWriterBase"),n=e("./WriterState"),t.exports=function(e){function t(e,r){this.stream=e,t.__super__.constructor.call(this,r)}return function(e,t){for(var r in t)o.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.endline=function(e,r,i){return e.isLastRootNode&&r.state===n.CloseTag?"":t.__super__.endline.call(this,e,r,i)},t.prototype.document=function(e,t){var r,n,i,o,a,s,l,c,u;for(n=i=0,a=(l=e.children).length;i<a;n=++i)(r=l[n]).isLastRootNode=n===e.children.length-1;for(t=this.filterOptions(t),u=[],o=0,s=(c=e.children).length;o<s;o++)r=c[o],u.push(this.writeChildNode(r,t,0));return u},t.prototype.attribute=function(e,r,n){return this.stream.write(t.__super__.attribute.call(this,e,r,n))},t.prototype.cdata=function(e,r,n){return this.stream.write(t.__super__.cdata.call(this,e,r,n))},t.prototype.comment=function(e,r,n){return this.stream.write(t.__super__.comment.call(this,e,r,n))},t.prototype.declaration=function(e,r,n){return this.stream.write(t.__super__.declaration.call(this,e,r,n))},t.prototype.docType=function(e,t,r){var i,o,a,s;if(r||(r=0),this.openNode(e,t,r),t.state=n.OpenTag,this.stream.write(this.indent(e,t,r)),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,r)),t.state=n.InsideTag,o=0,a=(s=e.children).length;o<a;o++)i=s[o],this.writeChildNode(i,t,r+1);t.state=n.CloseTag,this.stream.write("]")}return t.state=n.CloseTag,this.stream.write(t.spaceBeforeSlash+">"),this.stream.write(this.endline(e,t,r)),t.state=n.None,this.closeNode(e,t,r)},t.prototype.element=function(e,t,i){var a,s,l,c,u,d,f,h,p;for(f in i||(i=0),this.openNode(e,t,i),t.state=n.OpenTag,this.stream.write(this.indent(e,t,i)+"<"+e.name),h=e.attribs)o.call(h,f)&&(a=h[f],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===r.Text||e.type===r.Raw)&&""===e.value})))t.allowEmpty?(this.stream.write(">"),t.state=n.CloseTag,this.stream.write("</"+e.name+">")):(t.state=n.CloseTag,this.stream.write(t.spaceBeforeSlash+"/>"));else if(!t.pretty||1!==l||c.type!==r.Text&&c.type!==r.Raw||null==c.value){for(this.stream.write(">"+this.endline(e,t,i)),t.state=n.InsideTag,u=0,d=(p=e.children).length;u<d;u++)s=p[u],this.writeChildNode(s,t,i+1);t.state=n.CloseTag,this.stream.write(this.indent(e,t,i)+"</"+e.name+">")}else this.stream.write(">"),t.state=n.InsideTag,t.suppressPrettyCount++,this.writeChildNode(c,t,i+1),t.suppressPrettyCount--,t.state=n.CloseTag,this.stream.write("</"+e.name+">");return this.stream.write(this.endline(e,t,i)),t.state=n.None,this.closeNode(e,t,i)},t.prototype.processingInstruction=function(e,r,n){return this.stream.write(t.__super__.processingInstruction.call(this,e,r,n))},t.prototype.raw=function(e,r,n){return this.stream.write(t.__super__.raw.call(this,e,r,n))},t.prototype.text=function(e,r,n){return this.stream.write(t.__super__.text.call(this,e,r,n))},t.prototype.dtdAttList=function(e,r,n){return this.stream.write(t.__super__.dtdAttList.call(this,e,r,n))},t.prototype.dtdElement=function(e,r,n){return this.stream.write(t.__super__.dtdElement.call(this,e,r,n))},t.prototype.dtdEntity=function(e,r,n){return this.stream.write(t.__super__.dtdEntity.call(this,e,r,n))},t.prototype.dtdNotation=function(e,r,n){return this.stream.write(t.__super__.dtdNotation.call(this,e,r,n))},t}(i)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(e,t,r){"use strict";(function(){var r,n={}.hasOwnProperty;r=e("./XMLWriterBase"),t.exports=function(e){function t(e){t.__super__.constructor.call(this,e)}return function(e,t){for(var r in t)n.call(t,r)&&(e[r]=t[r]);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 r,n,i,o,a;for(t=this.filterOptions(t),o="",n=0,i=(a=e.children).length;n<i;n++)r=a[n],o+=this.writeChildNode(r,t,0);return t.pretty&&o.slice(-t.newline.length)===t.newline&&(o=o.slice(0,-t.newline.length)),o},t}(r)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(e,t,r){"use strict";(function(){var e=function(e,t){return function(){return e.apply(t,arguments)}},r={}.hasOwnProperty;t.exports=function(){function t(t){var n,i,o;for(n 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||{})r.call(i,n)&&(o=i[n],this[n]=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,r;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]/,r=e.match(t))throw new Error("Invalid character in string: "+e+" at index "+r.index)}else if("1.1"===this.options.version&&(t=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,r=e.match(t)))throw new Error("Invalid character in string: "+e+" at index "+r.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,r){"use strict";var n,i=e("babel-runtime/core-js/object/create"),o=(n=i)&&n.__esModule?n:{default:n};(function(){var r,n,i={}.hasOwnProperty;r=e("./NodeType"),n=e("./XMLCharacterData"),t.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=r.Text,this.value=this.stringify.text(n)}return function(e,t){for(var r in t)i.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,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,r;for(r="",t=this.previousSibling;t;)r=t.data+r,t=t.previousSibling;for(r+=this.data,e=this.nextSibling;e;)r+=e.data,e=e.nextSibling;return r}}),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}(n)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(e,t,r){"use strict";(function(){var r,n,i,o={}.hasOwnProperty;i=e("./Utility").assign,r=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"),n=e("./WriterState"),t.exports=function(){function e(e){var t,r,n;for(t in e||(e={}),this.options=e,r=e.writer||{})o.call(r,t)&&(n=r[t],this["_"+t]=this[t],this[t]=n)}return e.prototype.filterOptions=function(e){var t,r,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!=(r=e.indent)?r:" ",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=n.None,t},e.prototype.indent=function(e,t,r){var n;return!t.pretty||t.suppressPrettyCount?"":t.pretty&&(n=(r||0)+t.offset+1)>0?new Array(n).join(t.indent):""},e.prototype.endline=function(e,t,r){return!t.pretty||t.suppressPrettyCount?"":t.newline},e.prototype.attribute=function(e,t,r){var n;return this.openAttribute(e,t,r),n=" "+e.name+'="'+e.value+'"',this.closeAttribute(e,t,r),n},e.prototype.cdata=function(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r)+"<![CDATA[",t.state=n.InsideTag,i+=e.value,t.state=n.CloseTag,i+="]]>"+this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i},e.prototype.comment=function(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r)+"\x3c!-- ",t.state=n.InsideTag,i+=e.value,t.state=n.CloseTag,i+=" --\x3e"+this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i},e.prototype.declaration=function(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r)+"<?xml",t.state=n.InsideTag,i+=' version="'+e.version+'"',null!=e.encoding&&(i+=' encoding="'+e.encoding+'"'),null!=e.standalone&&(i+=' standalone="'+e.standalone+'"'),t.state=n.CloseTag,i+=t.spaceBeforeSlash+"?>",i+=this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i},e.prototype.docType=function(e,t,r){var i,o,a,s,l;if(r||(r=0),this.openNode(e,t,r),t.state=n.OpenTag,s=this.indent(e,t,r),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,r),t.state=n.InsideTag,o=0,a=(l=e.children).length;o<a;o++)i=l[o],s+=this.writeChildNode(i,t,r+1);t.state=n.CloseTag,s+="]"}return t.state=n.CloseTag,s+=t.spaceBeforeSlash+">",s+=this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),s},e.prototype.element=function(e,t,i){var a,s,l,c,u,d,f,h,p,m,g,v,b,y;for(p in i||(i=0),m=!1,g="",this.openNode(e,t,i),t.state=n.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===r.Text||e.type===r.Raw)&&""===e.value})))t.allowEmpty?(g+=">",t.state=n.CloseTag,g+="</"+e.name+">"+this.endline(e,t,i)):(t.state=n.CloseTag,g+=t.spaceBeforeSlash+"/>"+this.endline(e,t,i));else if(!t.pretty||1!==l||c.type!==r.Text&&c.type!==r.Raw||null==c.value){if(t.dontPrettyTextNodes)for(u=0,f=(b=e.children).length;u<f;u++)if(((s=b[u]).type===r.Text||s.type===r.Raw)&&null!=s.value){t.suppressPrettyCount++,m=!0;break}for(g+=">"+this.endline(e,t,i),t.state=n.InsideTag,d=0,h=(y=e.children).length;d<h;d++)s=y[d],g+=this.writeChildNode(s,t,i+1);t.state=n.CloseTag,g+=this.indent(e,t,i)+"</"+e.name+">",m&&t.suppressPrettyCount--,g+=this.endline(e,t,i),t.state=n.None}else g+=">",t.state=n.InsideTag,t.suppressPrettyCount++,m=!0,g+=this.writeChildNode(c,t,i+1),t.suppressPrettyCount--,m=!1,t.state=n.CloseTag,g+="</"+e.name+">"+this.endline(e,t,i);return this.closeNode(e,t,i),g},e.prototype.writeChildNode=function(e,t,n){switch(e.type){case r.CData:return this.cdata(e,t,n);case r.Comment:return this.comment(e,t,n);case r.Element:return this.element(e,t,n);case r.Raw:return this.raw(e,t,n);case r.Text:return this.text(e,t,n);case r.ProcessingInstruction:return this.processingInstruction(e,t,n);case r.Dummy:return"";case r.Declaration:return this.declaration(e,t,n);case r.DocType:return this.docType(e,t,n);case r.AttributeDeclaration:return this.dtdAttList(e,t,n);case r.ElementDeclaration:return this.dtdElement(e,t,n);case r.EntityDeclaration:return this.dtdEntity(e,t,n);case r.NotationDeclaration:return this.dtdNotation(e,t,n);default:throw new Error("Unknown XML node type: "+e.constructor.name)}},e.prototype.processingInstruction=function(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r)+"<?",t.state=n.InsideTag,i+=e.target,e.value&&(i+=" "+e.value),t.state=n.CloseTag,i+=t.spaceBeforeSlash+"?>",i+=this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i},e.prototype.raw=function(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r),t.state=n.InsideTag,i+=e.value,t.state=n.CloseTag,i+=this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i},e.prototype.text=function(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r),t.state=n.InsideTag,i+=e.value,t.state=n.CloseTag,i+=this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i},e.prototype.dtdAttList=function(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r)+"<!ATTLIST",t.state=n.InsideTag,i+=" "+e.elementName+" "+e.attributeName+" "+e.attributeType,"#DEFAULT"!==e.defaultValueType&&(i+=" "+e.defaultValueType),e.defaultValue&&(i+=' "'+e.defaultValue+'"'),t.state=n.CloseTag,i+=t.spaceBeforeSlash+">"+this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i},e.prototype.dtdElement=function(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r)+"<!ELEMENT",t.state=n.InsideTag,i+=" "+e.name+" "+e.value,t.state=n.CloseTag,i+=t.spaceBeforeSlash+">"+this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i},e.prototype.dtdEntity=function(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r)+"<!ENTITY",t.state=n.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=n.CloseTag,i+=t.spaceBeforeSlash+">"+this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i},e.prototype.dtdNotation=function(e,t,r){var i;return this.openNode(e,t,r),t.state=n.OpenTag,i=this.indent(e,t,r)+"<!NOTATION",t.state=n.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=n.CloseTag,i+=t.spaceBeforeSlash+">"+this.endline(e,t,r),t.state=n.None,this.closeNode(e,t,r),i},e.prototype.openNode=function(e,t,r){},e.prototype.closeNode=function(e,t,r){},e.prototype.openAttribute=function(e,t,r){},e.prototype.closeAttribute=function(e,t,r){},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,r){"use strict";(function(){var r,n,i,o,a,s,l,c,u,d;d=e("./Utility"),c=d.assign,u=d.isFunction,i=e("./XMLDOMImplementation"),o=e("./XMLDocument"),a=e("./XMLDocumentCB"),l=e("./XMLStringWriter"),s=e("./XMLStreamWriter"),r=e("./NodeType"),n=e("./WriterState"),t.exports.create=function(e,t,r,n){var i,a;if(null==e)throw new Error("Root element needs a name.");return n=c({},t,r,n),a=(i=new o(n)).element(e),n.headless||(i.declaration(n),null==n.pubID&&null==n.sysID||i.dtd(n)),a},t.exports.begin=function(e,t,r){var n;return u(e)&&(t=(n=[e,t])[0],r=n[1],e={}),t?new a(e,t,r):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=r,t.exports.writerState=n}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(e,t,r){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r)n.call(r,i)&&(e[i]=r[i])}return e};var n=Object.prototype.hasOwnProperty},{}],284:[function(e,t,r){"use strict";var n=e("buffer").Buffer,i={sha1:e("./sha"),md5:e("./md5")},o=n.alloc(64);function a(e,t){var r=i[e=e||"sha1"],a=[];return r||s("algorithm:",e,"is not yet supported"),{update:function(e){return n.isBuffer(e)||(e=n.from(e)),a.push(e),e.length,this},digest:function(e){var i=n.concat(a),s=t?function(e,t,r){n.isBuffer(t)||(t=n.from(t)),n.isBuffer(r)||(r=n.from(r)),t.length>64?t=e(t):t.length<64&&(t=n.concat([t,o],64));for(var i=n.alloc(64),a=n.alloc(64),s=0;s<64;s++)i[s]=54^t[s],a[s]=92^t[s];var l=e(n.concat([i,r]));return e(n.concat([a,l]))}(r,t,i):r(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),r.createHash=function(e){return a(e)},r.createHmac=function(e,t){return a(e,t)},r.createCredentials=function(){s("sorry,createCredentials is not implemented yet")},r.createCipher=function(){s("sorry,createCipher is not implemented yet")},r.createCipheriv=function(){s("sorry,createCipheriv is not implemented yet")},r.createDecipher=function(){s("sorry,createDecipher is not implemented yet")},r.createDecipheriv=function(){s("sorry,createDecipheriv is not implemented yet")},r.createSign=function(){s("sorry,createSign is not implemented yet")},r.createVerify=function(){s("sorry,createVerify is not implemented yet")},r.createDiffieHellman=function(){s("sorry,createDiffieHellman is not implemented yet")},r.pbkdf2=function(){s("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(e,t,r){"use strict";var n=e("buffer").Buffer,i=n.alloc(4);i.fill(0),t.exports={hash:function(e,t,r,o){return n.isBuffer(e)||(e=n.from(e)),function(e,t,r){for(var i=n.alloc(t),o=r?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 r=e.length+(4-e.length%4);e=n.concat([e,i],r)}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),r,o)}}},{buffer:73}],286:[function(e,t,r){"use strict";var n=e("./helpers");function i(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,d=0;d<e.length;d+=16){var f=r,h=n,p=i,m=o;r=a(r,n,i,o,e[d+0],7,-680876936),o=a(o,r,n,i,e[d+1],12,-389564586),i=a(i,o,r,n,e[d+2],17,606105819),n=a(n,i,o,r,e[d+3],22,-1044525330),r=a(r,n,i,o,e[d+4],7,-176418897),o=a(o,r,n,i,e[d+5],12,1200080426),i=a(i,o,r,n,e[d+6],17,-1473231341),n=a(n,i,o,r,e[d+7],22,-45705983),r=a(r,n,i,o,e[d+8],7,1770035416),o=a(o,r,n,i,e[d+9],12,-1958414417),i=a(i,o,r,n,e[d+10],17,-42063),n=a(n,i,o,r,e[d+11],22,-1990404162),r=a(r,n,i,o,e[d+12],7,1804603682),o=a(o,r,n,i,e[d+13],12,-40341101),i=a(i,o,r,n,e[d+14],17,-1502002290),r=s(r,n=a(n,i,o,r,e[d+15],22,1236535329),i,o,e[d+1],5,-165796510),o=s(o,r,n,i,e[d+6],9,-1069501632),i=s(i,o,r,n,e[d+11],14,643717713),n=s(n,i,o,r,e[d+0],20,-373897302),r=s(r,n,i,o,e[d+5],5,-701558691),o=s(o,r,n,i,e[d+10],9,38016083),i=s(i,o,r,n,e[d+15],14,-660478335),n=s(n,i,o,r,e[d+4],20,-405537848),r=s(r,n,i,o,e[d+9],5,568446438),o=s(o,r,n,i,e[d+14],9,-1019803690),i=s(i,o,r,n,e[d+3],14,-187363961),n=s(n,i,o,r,e[d+8],20,1163531501),r=s(r,n,i,o,e[d+13],5,-1444681467),o=s(o,r,n,i,e[d+2],9,-51403784),i=s(i,o,r,n,e[d+7],14,1735328473),r=l(r,n=s(n,i,o,r,e[d+12],20,-1926607734),i,o,e[d+5],4,-378558),o=l(o,r,n,i,e[d+8],11,-2022574463),i=l(i,o,r,n,e[d+11],16,1839030562),n=l(n,i,o,r,e[d+14],23,-35309556),r=l(r,n,i,o,e[d+1],4,-1530992060),o=l(o,r,n,i,e[d+4],11,1272893353),i=l(i,o,r,n,e[d+7],16,-155497632),n=l(n,i,o,r,e[d+10],23,-1094730640),r=l(r,n,i,o,e[d+13],4,681279174),o=l(o,r,n,i,e[d+0],11,-358537222),i=l(i,o,r,n,e[d+3],16,-722521979),n=l(n,i,o,r,e[d+6],23,76029189),r=l(r,n,i,o,e[d+9],4,-640364487),o=l(o,r,n,i,e[d+12],11,-421815835),i=l(i,o,r,n,e[d+15],16,530742520),r=c(r,n=l(n,i,o,r,e[d+2],23,-995338651),i,o,e[d+0],6,-198630844),o=c(o,r,n,i,e[d+7],10,1126891415),i=c(i,o,r,n,e[d+14],15,-1416354905),n=c(n,i,o,r,e[d+5],21,-57434055),r=c(r,n,i,o,e[d+12],6,1700485571),o=c(o,r,n,i,e[d+3],10,-1894986606),i=c(i,o,r,n,e[d+10],15,-1051523),n=c(n,i,o,r,e[d+1],21,-2054922799),r=c(r,n,i,o,e[d+8],6,1873313359),o=c(o,r,n,i,e[d+15],10,-30611744),i=c(i,o,r,n,e[d+6],15,-1560198380),n=c(n,i,o,r,e[d+13],21,1309151649),r=c(r,n,i,o,e[d+4],6,-145523070),o=c(o,r,n,i,e[d+11],10,-1120210379),i=c(i,o,r,n,e[d+2],15,718787259),n=c(n,i,o,r,e[d+9],21,-343485551),r=u(r,f),n=u(n,h),i=u(i,p),o=u(o,m)}return Array(r,n,i,o)}function o(e,t,r,n,i,o){return u((a=u(u(t,e),u(n,o)))<<(s=i)|a>>>32-s,r);var a,s}function a(e,t,r,n,i,a,s){return o(t&r|~t&n,e,t,i,a,s)}function s(e,t,r,n,i,a,s){return o(t&n|r&~n,e,t,i,a,s)}function l(e,t,r,n,i,a,s){return o(t^r^n,e,t,i,a,s)}function c(e,t,r,n,i,a,s){return o(r^(t|~n),e,t,i,a,s)}function u(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}t.exports=function(e){return n.hash(e,i,16)}},{"./helpers":285}],287:[function(e,t,r){"use strict";var n=e("./helpers");function i(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var r=Array(80),n=1732584193,i=-271733879,c=-1732584194,u=271733878,d=-1009589776,f=0;f<e.length;f+=16){for(var h=n,p=i,m=c,g=u,v=d,b=0;b<80;b++){r[b]=b<16?e[f+b]:l(r[b-3]^r[b-8]^r[b-14]^r[b-16],1);var y=s(s(l(n,5),o(b,i,c,u)),s(s(d,r[b]),a(b)));d=u,u=c,c=l(i,30),i=n,n=y}n=s(n,h),i=s(i,p),c=s(c,m),u=s(u,g),d=s(d,v)}return Array(n,i,c,u,d)}function o(e,t,r,n){return e<20?t&r|~t&n:e<40?t^r^n:e<60?t&r|t&n|r&n:t^r^n}function a(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function s(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function l(e,t){return e<<t|e>>>32-t}t.exports=function(e){return n.hash(e,i,20,!0)}},{"./helpers":285}],288:[function(e,t,r){"use strict";t.exports=function(){return function(){}}},{}],289:[function(e,t,r){(function(r){"use strict";var n,i=e("babel-runtime/helpers/typeof"),o=(n=i)&&n.__esModule?n:{default:n},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=r.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,r){"use strict";r.encodeURIComponent=function(e){try{return encodeURIComponent(e)}catch(t){return e}},r.escape=e("escape-html"),r.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,r){(function(t,n){"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"),d=e("https"),f=e("debug")("urllib"),h=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 b(e,t){return function(r,n,i){if(r)return t(r);e({data:n,status:i.statusCode,headers:i.headers,res:i})}}r.TIMEOUTS=[h("300s"),h("300s")];var y=["json","text"];r.request=function(t,n,i){return 2===arguments.length&&"function"==typeof n&&(i=n,n=null),"function"==typeof i?r.requestWithCallback(t,n,i):(s||(s=e("any-promise")),new s((function(e,i){r.requestWithCallback(t,n,b(e,i))})))},r.requestWithCallback=function(a,s,b){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&&(b=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||r.TIMEOUTS,s.maxRedirects=s.maxRedirects||10,s.streaming=s.streaming||s.customResponse;var S,_=Date.now();"string"==typeof a?(g.test(a)||(a="http://"+a),S=c.parse(a)):S=a;var T=(s.type||s.method||S.method||"GET").toUpperCase(),k=S.port||80,O=u,C=v(s.agent,r.agent),A=s.fixJSONCtlChars;"https:"===S.protocol&&(O=d,C=v(s.httpsAgent,r.httpsAgent),S.port||(k=443));var D={host:S.hostname||S.host||"localhost",path:S.path||"/",method:T,port:k,agent:C,headers:s.headers||{},lookup:s.lookup};Array.isArray(s.timeout)?D.requestTimeout=s.timeout[s.timeout.length-1]:void 0!==s.timeout&&(D.requestTimeout=s.timeout);for(var L=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],I=0;I<L.length;I++){var j=L[I];s.hasOwnProperty(j)&&(D[j]=s[j])}!1!==D.rejectUnauthorized||D.hasOwnProperty("secureOptions")||(D.secureOptions=e("constants").SSL_OP_NO_TLSv1_2);var R=s.auth||S.auth;R&&(D.auth=R);var M=s.content||s.data,N="GET"===T||"HEAD"===T||s.dataAsQueryString;if(!s.content&&M&&"string"!=typeof M&&!n.isBuffer(M))if(N)M=s.nestedQuerystring?qs.stringify(M):querystring.stringify(M);else{var P=D.headers["Content-Type"]||D.headers["content-type"];P||(P="json"===s.contentType?"application/json":"application/x-www-form-urlencoded",D.headers["Content-Type"]=P),M="application/json"===parseContentType(P).type?(0,i.default)(M):s.nestedQuerystring?qs.stringify(M):querystring.stringify(M)}N&&M&&(D.path+=(S.query?"&":"?")+M,M=null);var F=0;if(M){var B=M.length;n.isBuffer(M)||(B=n.byteLength(M)),F=D.headers["Content-Length"]=B}"json"===s.dataType&&(D.headers.Accept="application/json"),"function"==typeof s.beforeRequest&&s.beforeRequest(D);var U=null,H=null,z=null,G=!1,K=!1,W=0,V=-1,q=!1,X="",Y="",$=null;function J(){U&&(clearTimeout(U),U=null)}function Z(){H&&(clearTimeout(H),H=null)}function Q(e,n,o){if(Z(),!b)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),w,t.pid,D.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=b;b=null;var c={};if(o&&(V=o.statusCode,c=o.headers),401===V&&c["www-authenticate"]&&(!s.headers||!s.headers.Authorization)&&s.digestAuth){var u=c["www-authenticate"];if(u.indexOf("Digest ")>=0)return f("Request#%d %s: got digest auth header WWW-Authenticate: %s",w,a,u),s.headers=s.headers||{},s.headers.Authorization=digestAuthHeader(D.method,D.path,u,s.digestAuth),f("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(";")),r.requestWithCallback(a,s,l)}var d=Date.now()-_;$&&($.contentDownload=d),f("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",d,W,V,D.method,D.host,D.path,K,$);var h={status:V,statusCode:V,headers:c,size:W,aborted:q,rt:d,keepAliveSocket:K,data:n,requestUrls:s.requestUrls,timing:$,remoteAddress:X,remotePort:Y};if(e){var p="";C&&"function"==typeof C.getCurrentStatus&&(p=", agent status: "+(0,i.default)(C.getCurrentStatus())),e.message+=", "+D.method+" "+a+" "+V+" (connected: "+G+", keepalive socket: "+K+p+")\nheaders: "+(0,i.default)(c),e.data=n,e.path=D.path,e.status=V,e.headers=c,e.res=h}l(e,n,s.streaming?o:h),s.emitter&&(E.url=a,E.socket=ie&&ie.connection,E.options=D,E.size=F,s.emitter.emit("response",{requestId:w,error:e,ctx:s.ctx,req:E,res:h}))}function ee(e){var t=null;if(s.followRedirect&&statuses.redirect[e.statusCode]){s._followRedirectCount=(s._followRedirectCount||0)+1;var n=e.headers.location;if(n){if(!(s._followRedirectCount>s.maxRedirects)){var i=s.formatRedirectUrl?s.formatRedirectUrl(a,n):c.resolve(a,n);f("Request#%d %s: `redirected` from %s to %s",w,D.path,a,i),Z(),s.headers&&s.headers.Host&&g.test(n)&&(s.headers.Host=null);var o=b;return b=null,r.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,r){return r(null,t,e.headers["content-encoding"])}s.timing&&($={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),D.headers["User-Agent"]||D.headers["user-agent"]||(D.headers["User-Agent"]=navigator.userAgent),s.gzip&&(D.headers["Accept-Encoding"]||D.headers["accept-encoding"]||(D.headers["Accept-Encoding"]="gzip"));var re,ne,ie,oe=s.writeStream;function ae(e){var t;if($&&($.waiting=Date.now()-_),f("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(){f("Request#%d %s: `res close` event emit, total size %d",w,a,W)})),e.on("error",(function(){f("Request#%d %s: `res error` event emit, total size %d",w,a,W)})),e.on("aborted",(function(){q=!0,f("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,r,n){f("Request#%d %s: writeStream or res %s event emitted",w,a,n),Q(z||null,null,e)})):oe.on("close",(function(){f("Request#%d %s: writeStream close event emitted",w,a),Q(z||null,null,e)})),e.pipe(oe));var r=[];e.on("data",(function(e){f("Request#%d %s: `res data` event emit, size %d",w,a,e.length),W+=e.length,r.push(e)})),e.on("end",(function(){var t=n.concat(r,W);if(f("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(r,n,i){if(r)return Q(r,t,e);if(!i&&y.indexOf(s.dataType)>=0){try{n=decodeBodyByCharset(n,e)}catch(t){return f("decodeBodyByCharset error: %s",t),Q(null,n,e)}if("json"===s.dataType)if(0===W)n=null;else{var o=parseJSON(n,A);o.error?r=o.error:n=o.data}}q&&f("Request#%d %s: Remote socket was terminated before `response.end()` was called",w,a),Q(r,n,e)}))}))}function se(){f("Connect timer ticking, timeout: %d",re),U=setTimeout((function(){U=null,-1===V&&(V=-2);var e="Connect timeout for "+re+"ms",t="ConnectionTimeoutError";ie.socket||(t="SocketAssignTimeoutError",e+=", working sockets is full"),(z=new Error(e)).name=t,z.requestId=w,f("ConnectTimeout: Request#%d %s %s: %s, connected: %s",w,a,z.name,e,G),ce()}),re)}function le(){f("Response timer ticking, timeout: %d",ne),H=setTimeout((function(){H=null;var e="Response timeout for "+ne+"ms";(z=new Error(e)).name="ResponseTimeoutError",z.requestId=w,f("ResponseTimeout: Request#%d %s %s: %s, connected: %s",w,a,z.name,e,G),ce()}),ne)}f("Request#%d %s %s with headers %j, options.path: %s",w,T,a,D.headers,D.path),s.requestUrls.push(a),Array.isArray(s.timeout)?(re=h(s.timeout[0]),ne=h(s.timeout[1])):re=ne=h(s.timeout),f("ConnectTimeout: %d, ResponseTimeout: %d",re,ne),D.mode=s.mode?s.mode:"";try{ie=O.request(D,ae)}catch(e){return Q(e)}function ce(){f("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===V&&(V=-2),(z=new Error("Connect timeout for "+re+"ms")).name="ConnectionTimeoutError",z.requestId=w,ce()})),$&&ie.on("finish",(function(){$.requestSent=Date.now()-_})),ie.once("socket",(function(e){$&&($.queuing=Date.now()-_),isNode010&&e.socket&&(e=e.socket);var t=e.readyState;if("opening"===t)return e.once("lookup",(function(e,t,r){f("Request#%d %s lookup: %s, %s, %s",w,a,e,t,r),$&&($.dnslookup=Date.now()-_),t&&(X=t)})),void e.once("connect",(function(){$&&($.connected=Date.now()-_),J(),le(),f("Request#%d %s new socket connected",w,a),G=!0,X||(X=e.remoteAddress),Y=e.remotePort}));f("Request#%d %s reuse socket connected, readyState: %s",w,a,t),G=!0,K=!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")',f("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,f("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,f("Request#%d %s `readStream error` event emit, %s: %s",w,a,e.name,e.message),ce()}))):ie.end(M),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/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.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,r){"use strict";r.d(t,"a",(function(){return a}));var n=r("q1tI"),i=r("biw7"),o=r("fyJ8");t.b=function(e){var t=e.children,r=n.useContext(i.a).prefixCls;return n.createElement("tfoot",{className:"".concat(r,"-summary")},t)};var a={Cell:function(e){var t=e.className,r=e.index,a=e.children,s=e.colSpan,l=e.rowSpan,c=n.useContext(i.a),u=c.prefixCls,d=c.fixedInfoList[r];return n.createElement(o.a,Object.assign({className:t,index:r,component:"td",prefixCls:u,record:null,dataIndex:null,render:function(){return{children:a,props:{colSpan:s,rowSpan:l}}}},d))},Row:function(e){return n.createElement("tr",Object.assign({},e))}}},nj2k:
/*!***************************************************************************************!*\
!*** ./src/pages/Shixuns/Edit/body/Level/Challenges/components/UploadFile/nodata.svg ***!
\***************************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){e.exports=r.p+"static/nodata.c3b0b86c.svg"},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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),r(/*! ./cipher-core */"OLod"),n.pad.Iso10126={pad:function(e,t){var r=4*t,i=r-e.sigBytes%r;e.concat(n.lib.WordArray.random(i-1)).concat(n.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.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,r){!function(e){"use strict";var t=e.Pos;function r(e,t){return e.line-t.line||e.ch-t.ch}var n="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("<(/?)(["+n+"]["+n+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function o(e,t,r,n){this.line=t,this.ch=r,this.cm=e,this.text=e.getLine(t),this.min=n?Math.max(n.from,e.firstLine()):e.firstLine(),this.max=n?Math.min(n.to-1,e.lastLine()):e.lastLine()}function a(e,r){var n=e.cm.getTokenTypeAt(t(e.line,r));return n&&/\btag\b/.test(n)}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 r=e.text.lastIndexOf("/",t),n=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,n?"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 r=i.exec(e.text);if(r&&r.index==t)return r}else e.ch=t}}function d(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 f(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 r=e.text.lastIndexOf("/",t),n=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,n?"selfClose":"regular"}e.ch=t}}function h(e,r){for(var n=[];;){var i,o=d(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=n.length-1;l>=0;--l)if(n[l]==o[2]){n.length=l;break}if(l<0&&(!r||r==o[2]))return{tag:o[2],from:t(a,s),to:t(e.line,e.ch)}}else n.push(o[2])}}function p(e,r){for(var n=[];;){var i=f(e);if(!i)return;if("selfClose"!=i){var o=e.line,a=e.ch,s=u(e);if(!s)return;if(s[1])n.push(s[2]);else{for(var l=n.length-1;l>=0;--l)if(n[l]==s[2]){n.length=l;break}if(l<0&&(!r||r==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,n){for(var i=new o(e,n.line,0);;){var a=d(i);if(!a||i.line!=n.line)return;var s=c(i);if(!s)return;if(!a[1]&&"selfClose"!=s){var l=t(i.line,i.ch),u=h(i,a[2]);return u&&r(u.from,l)>0?{from:l,to:u.from}:null}}})),e.findMatchingTag=function(e,n,i){var a=new o(e,n.line,n.ch,i);if(-1!=a.text.indexOf(">")||-1!=a.text.indexOf("<")){var s=c(a),l=s&&t(a.line,a.ch),d=s&&u(a);if(s&&d&&!(r(a,n)>0)){var f={from:t(a.line,a.ch),to:l,tag:d[2]};return"selfClose"==s?{open:f,close:null,at:"open"}:d[1]?{open:p(a,d[2]),close:f,at:"close"}:{open:f,close:h(a=new o(e,l.line,l.ch,i),d[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,r,n){for(var i=new o(e,t.line,t.ch,r);;){var a=p(i,n);if(!a)break;var s=h(new o(e,t.line,t.ch,r),a.tag);if(s)return{open:a,close:s}}},e.scanForClosingTag=function(e,t,r,n){return h(new o(e,t.line,t.ch,n?{from:0,to:n}:null),r)}}(r(/*! ../../lib/codemirror */"VrN/"))},p5ED:
/*!*********************************************!*\
!*** ./src/components/PreviewAll/index.tsx ***!
\*********************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,r){"use strict";r(/*! antd/es/button/style */"+L6B");var n=r(/*! antd/es/button */"2/Rp"),i=(r(/*! antd/es/tooltip/style */"5Dmo"),r(/*! antd/es/tooltip */"3S7+")),o=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),a=r(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),s=r(/*! react */"q1tI"),l=r.n(s),c=r(/*! ./index.less?modules */"vHTk"),u=r.n(c),d=r(/*! @ant-design/icons */"yEEn"),f=r(/*! @/components/monaco-editor */"ZW9T"),h=r(/*! @/utils/util */"1vsH");t.a=function(e){var t=e.name,r=e.data,c=(e.theme,e.type),p=e.filename,m=e.monacoEditor,g=e.className,v=e.style,b=e.close,y=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)("")),_=Object(a.a)(S,2),T=(_[0],_[1]),k=Object(s.useRef)();p&&(m.filename=p),Object(s.useEffect)((function(){var e,t,r=null===(e=document.cookie)||void 0===e||null===(t=e.replace(/\s/g,""))||void 0===t?void 0:t.split(";");null==r||r.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&T(t[1])}))}),[]);var O=function(){r.startsWith("http")||r.startsWith("/")?C():Object(h.x)(p||"educoder",r,p)},C=function(){Object(h.v)(p||t,r)};return console.log("data:",r,"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")},b&&l.a.createElement("div",{className:u.a.close,ref:k},l.a.createElement(i.a,{title:"点击下载此文件",getPopupContainer:function(){return k.current}},l.a.createElement("span",{onClick:C},l.a.createElement("i",{className:"icon-quxiaozhiding"}))),l.a.createElement(i.a,{title:"关闭",getPopupContainer:function(){return k.current}},l.a.createElement("span",{className:"",onClick:y},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(f.b,m)),"audio"===c&&l.a.createElement("audio",{src:"".concat(null!=r&&r.startsWith("/")||(null==r?void 0:r.indexOf("https://"))>-1?r:"data:audio/mp3;base64,").concat(r),autoPlay:!0}),"video"===c&&l.a.createElement(l.a.Fragment,null,null!=r&&r.startsWith("/")?l.a.createElement("video",{controls:!0,src:"".concat(r),autoPlay:!0}):l.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(r),autoPlay:!0})),"pdf"===c&&l.a.createElement("embed",{className:u.a.embed,src:r}),"image"===c&&l.a.createElement(l.a.Fragment,null,l.a.createElement("img",{src:"".concat(null!=r&&r.startsWith("/")||(null==r?void 0:r.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(r)})),"other"===c&&l.a.createElement("div",null,l.a.createElement(n.a,{type:"primary",size:"large",onClick:O},l.a.createElement(d.a,null),"点击下载")),("download"===c||"office"===c)&&l.a.createElement(n.a,{type:"primary",size:"large",onClick:O},l.a.createElement(d.a,null),"点击下载"))}},"p77/":
/*!****************************************************!*\
!*** ./node_modules/codemirror/lib/codemirror.css ***!
\****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){},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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),r(/*! ./enc-base64 */"ETIr"),r(/*! ./md5 */"cv67"),r(/*! ./evpkdf */"K3mO"),r(/*! ./cipher-core */"OLod"),function(){var e=n,t=e.lib,r=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],d=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=a[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var c=i[o]=[],u=l[o];for(r=0;r<24;r++)c[r/6|0]|=t[(s[r]-1+u)%28]<<31-r%6,c[4+(r/6|0)]|=t[28+(s[r+24]-1+u)%28]<<31-r%6;for(c[0]=c[0]<<1|c[0]>>>31,r=1;r<7;r++)c[r]=c[r]>>>4*(r-1)+3;c[7]=c[7]<<5|c[7]>>>27}var d=this._invSubKeys=[];for(r=0;r<16;r++)d[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],f.call(this,4,252645135),f.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),f.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],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 d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,f.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<<e}function h(e,t){var r=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<<e}e.DES=i._createHelper(d);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),n=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=d.createEncryptor(r.create(t)),this._des2=d.createEncryptor(r.create(n)),this._des3=d.createEncryptor(r.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)}(),n.TripleDES)},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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),r(/*! ./cipher-core */"OLod"),n.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,i=n-r%n,o=r+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}},n.pad.Ansix923)},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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),function(){var e=n,t=e.lib.WordArray,r=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}r.Utf16=r.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i+=2){var o=t[i>>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var r=e.length,n=[],i=0;i<r;i++)n[i>>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(n,2*r)}},r.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o+=2){var a=i(t[o>>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var r=e.length,n=[],o=0;o<r;o++)n[o>>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(n,2*r)}}}(),n.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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),r(/*! ./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
*/
n.mode.CTRGladman=function(){var e=n.lib.BlockCipherMode.extend();function t(e){if(255==(e>>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}var r=e.Encryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.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);n.encryptBlock(s,0);for(var l=0;l<i;l++)e[r+l]^=s[l]}});return e.Decryptor=r,e}(),n.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,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */"Qw5x");function i(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Object(n.a)(e))||t&&e&&"number"==typeof e.length){r&&(e=r);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(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==r.return||r.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 r=/[&<>"']/,n=/[&<>"']/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 d=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const h={},p=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(e,t){h[" "+e]||(p.test(e)?h[" "+e]=e+"/":h[" "+e]=b(e,"/",!0));const r=-1===(e=h[" "+e]).indexOf(":");return"//"===t.substring(0,2)?r?t:e.replace(m,"$1")+t:"/"===t.charAt(0)?r?t:e.replace(g,"$1")+t:e+t}function b(e,t,r){const n=e.length;if(0===n)return"";let i=0;for(;i<n;){const o=e.charAt(n-i-1);if(o!==t||r){if(o===t||!r)break;i++}else i++}return e.substr(0,n-i)}e.exports={escape:function(e,t){if(t){if(r.test(e))return e.replace(n,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 r={replace:(t,n)=>(n=(n=n.source||n).replace(u,"$1"),e=e.replace(t,n),r),getRegex:()=>new RegExp(e,t)};return r},cleanUrl:function(e,t,r){if(e){let e;try{e=decodeURIComponent(c(r)).replace(d,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!f.test(r)&&(r=v(t,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch(e){return null}return r},resolveUrl:v,noopTest:{exec:function(){}},merge:function(e){let t,r,n=1;for(;n<arguments.length;n++)for(r in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},splitCells:function(e,t){const r=e.replace(/\|/g,(e,t,r)=>{let n=!1,i=t;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"}).split(/ \|/);let n=0;if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(/\\\|/g,"|");return r},rtrim:b,findClosingBracket:function(e,t){if(-1===e.indexOf(t[1]))return-1;const r=e.length;let n=0,i=0;for(;i<r;i++)if("\\"===e[i])i++;else if(e[i]===t[0])n++;else if(e[i]===t[1]&&(n--,n<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")}}},rWjI:
/*!************************************************************!*\
!*** ./src/pages/Question/AddOrEdit/index.tsx + 4 modules ***!
\************************************************************/
/*! exports provided: Types, default */
/*! all exports used */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CloseCircleOutlined.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/PoweroffOutlined.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/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/objectDestructuringEmpty.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/helpers/esm/toConsumableArray.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/Question/AddOrEdit/CodePanel/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/AddOrEdit/ManageModal/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/AddOrEdit/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/RenderHtml/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/SplitContainer/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/monaco-editor/index.jsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/tpi-code-setting/CodeSetting.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Shixuns/Edit/body/Level/Challenges/components/UploadFile/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/authority.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/urlTool.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/checkbox/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/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/collapse/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/collapse/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/drawer/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/drawer/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/popconfirm/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popconfirm/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/space/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/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/js-base64/base64.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/esm/react-router.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,r){"use strict";r.r(t),r.d(t,"Types",(function(){return ae}));r("P2fV");var n,i,o=r("NJEC"),a=r("CiB2"),s=(r("DYRE"),r("zeV3")),l=(r("sRBo"),r("kaz8")),c=(r("7Kak"),r("9yH6")),u=(r("giR+"),r("fyUT")),d=(r("OaEy"),r("2fM7")),f=r("oBTY"),h=r("rAM+"),p=(r("T2oS"),r("W9HT")),m=(r("g9YV"),r("wCAj")),g=(r("+L6B"),r("2/Rp")),v=(r("14J3"),r("BMrR")),b=(r("jCWc"),r("kPKH")),y=(r("miYZ"),r("tsqr")),x=r("9og8"),w=(r("y8nQ"),r("Vl3Y")),E=r("tJVT"),S=r("k1fw"),_=(r("fu2T"),r("gK9i")),T=(r("2qtc"),r("kLXV")),k=(r("5NDa"),r("5rEg")),O=r("WmNS"),C=r.n(O),A=r("q1tI"),D=r.n(A),L=r("eRFJ"),I=r.n(L),j=r("jrin"),R=d.a.Option;!function(e){e[e.language=0]="language",e[e.difficulty=1]="difficulty",e[e.category=2]="category",e[e.openOrNot=3]="openOrNot"}(i||(i={}));var M=(n={},Object(j.a)(n,i.language,[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"},{title:"JavaScript",key:"JavaScript"},{title:"Ruby",key:"Ruby"}]),Object(j.a)(n,i.difficulty,[{title:"简单",key:1},{title:"适中",key:2},{title:"困难",key:3}]),Object(j.a)(n,i.category,[{title:"程序设计",key:1},{title:"算法",key:2}]),Object(j.a)(n,i.openOrNot,[{title:"公开",key:1},{title:"私有",key:0}]),n);var N=r("Ty5D"),P=r("9kvl"),F=r("J66h"),B=r("GIiI"),U=r("2BaD"),H=r("Ot1p"),z=r("ErOA");function G(e){return Object(z.f)("practices.json",e)}function K(e){return Object(z.c)("practices/".concat(e,"/edit.json"))}function W(e,t){return Object(z.g)("practices/".concat(e),t)}var V,q=r("cDPC"),X=(r("bbsP"),r("/wGt")),Y=r("0Owb"),$=r("ZW9T"),J=r("ZD9Y"),Z=r("M8RZ"),Q=r("bCnd"),ee=r("1T2W"),te=r.n(ee),re={theme:Object(Q.a)("cmCodeMode","vs-dark"),fontSize:Object(Q.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(Q.a)("cmTabToSpace",!0)};function ne(e,t){switch(t.type){case V.set_show_editor_setting:return Object(S.a)(Object(S.a)({},e),{},{showEditorSetting:t.payload});case V.set_theme:return Object(S.a)(Object(S.a)({},e),{},{theme:t.payload});case V.set_font_size:return Object(S.a)(Object(S.a)({},e),{},{fontSize:t.payload});case V.on_tab_to_space:return Object(S.a)(Object(S.a)({},e),{},{tabToSpace:t.payload});default:throw new Error}}!function(e){e[e.set_font_size=0]="set_font_size",e[e.set_theme=1]="set_theme",e[e.on_tab_to_space=2]="on_tab_to_space",e[e.set_show_editor_setting=3]="set_show_editor_setting"}(V||(V={}));var ie=function(e){var t=e.value,r=e.onChange,n=e.language,i=e.onLanguage,o=e.languageItems,a=e.ActionBarRender,s=void 0===a?function(e){return D.a.createElement(oe,{languageItems:o,onLanguage:i,language:n,onShowCodeSetting:e})}:a,l=Object(A.useReducer)(ne,re),c=Object(E.a)(l,2),u=c[0],d=c[1],f=u.theme,h=u.fontSize,p=u.showEditorSetting,m=u.tabToSpace;console.log(t,n,"value");var g={onFontSizeChange:function(e){d({type:V.set_font_size,payload:e}),Object(Q.b)("cmFontSize",e)},tabToSpace:m,cmFontSize:h,className:"oj",cmCodeMode:f,onTabToSpace:function(e){d({type:V.on_tab_to_space,payload:e}),Object(Q.b)("cmTabToSpace",e)},onCodeModeChange:function(e){d({type:V.set_theme,payload:e}),Object(Q.b)("cmCodeMode",e)}};var v={value:t,language:n,onChange:r,theme:f,height:"calc(100% - 56px)",options:{fontSize:h,insertSpaces:m}};return D.a.createElement(A.Fragment,null,D.a.createElement("div",{className:te.a["code-panel-container"]},s((function(){d({type:V.set_show_editor_setting,payload:!0})})),D.a.createElement($.b,Object(Y.a)({key:n},v))),D.a.createElement(Z.a,null,D.a.createElement(X.a,{className:"oj",title:null,placement:"right",closable:!1,visible:p,onClose:function(){d({type:V.set_show_editor_setting,payload:!1})}},D.a.createElement(J.a,g))))};function oe(e){var t=e.languageItems,r=e.language,n=e.onShowCodeSetting,i=e.onLanguage;return D.a.createElement("div",{className:te.a["action-oj-bar"]},null==t?void 0:t.map((function(e){return D.a.createElement("div",{className:r===(null==e?void 0:e.language)?te.a.active:"",onClick:function(){return i(null==e?void 0:e.language)},key:null==e?void 0:e.language},null==e?void 0:e.language)})),D.a.createElement("a",{onClick:n},D.a.createElement("i",{className:"iconfont icon-shezhi"})))}r("Znn+");var ae,se=r("ZTPi"),le=r("L9qf"),ce=r.n(le),ue=function(e){var t=e.visible,r=e.onOK,n=e.onCancel,i=Object(A.useState)(!1),o=Object(E.a)(i,2),a=o[0],s=o[1],l=Object(A.useState)(!1),c=Object(E.a)(l,2),u=c[0],d=c[1],f=Object(A.useState)("1"),h=Object(E.a)(f,2),p=h[0],v=h[1],b=Object(A.useState)(""),w=Object(E.a)(b,2),S=w[0],_=w[1],O=Object(A.useState)([]),L=Object(E.a)(O,2),I=L[0],j=L[1],R=function(){var e=Object(x.a)(C.a.mark((function e(){var n;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(S){e.next=3;break}return y.b.warn("题目".concat(N,"不能为空")),e.abrupt("return");case 3:return d(!0),e.next=6,Object(z.a)("/api/tag_disciplines.json",{method:"post",body:{target:t,name:S}});case 6:if(0!==(null==(n=e.sent)?void 0:n.status)){e.next=10;break}return r(),e.abrupt("return");case 10:d(!1);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=function(){var e=Object(x.a)(C.a.mark((function e(){var r,n,i=arguments;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>0&&void 0!==i[0]?i[0]:"",s(!0),e.next=4,Object(z.a)("/api/tag_disciplines.json",{method:"get",params:{target:t,search:r}});case 4:n=e.sent,j(n.tag_disciplines||[]),s(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N="practice"===t?"知识点":"来源";return D.a.createElement(T.a,{afterClose:function(){d(!1),s(!1),_(""),v("1"),j([])},centered:!0,keyboard:!1,width:600,title:"".concat(N,"管理"),visible:!!t,className:ce.a.customModal,footer:null,onCancel:n},D.a.createElement("section",{className:ce.a.wrap},D.a.createElement(se.a,{activeKey:p,onChange:function(e){_(""),v(e),M()}},D.a.createElement(se.a.TabPane,{tab:"新增".concat(N),key:"1"},D.a.createElement(k.a,{value:S,onChange:function(e){return _(e.target.value)},className:ce.a.in,placeholder:"输入".concat(N,"名称不超过20个字"),maxLength:20}),D.a.createElement("div",{className:ce.a.btns},D.a.createElement(g.a,{onClick:n,className:"mr20"},"取消 "),D.a.createElement(g.a,{loading:u,onClick:R,type:"primary"},"确认新建"))),D.a.createElement(se.a.TabPane,{tab:"已有".concat(N),key:"2"},D.a.createElement(k.a.Search,{allowClear:!0,onSearch:function(e){M(e)},value:S,onChange:function(e){return _(e.target.value)},className:ce.a.in,placeholder:"输入".concat(N,"名称进行查询")}),D.a.createElement(m.a,{dataSource:I,bordered:!1,loading:a,scroll:I.length>7?{y:300}:{},style:{padding:"0 40px 20px 40px"},columns:[{title:"".concat(N,"名称"),dataIndex:"name",ellipsis:!0},{title:"操作",dataIndex:"action",width:120,render:function(e,r){return D.a.createElement("span",null,D.a.createElement("span",{onClick:function(){return function(e){var t,r=e.name;T.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"重命名",content:D.a.createElement("div",null,D.a.createElement(k.a,{defaultValue:r,placeholder:"请输入".concat(N,"名称不超过20个字"),maxLength:20,onChange:function(e){r=e.target.value}})),okText:"确认",cancelText:"取消",onOk:(t=Object(x.a)(C.a.mark((function t(){var n;return C.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=3;break}return y.b.warn("题目".concat(N,"不能为空")),t.abrupt("return",Promise.reject());case 3:return t.next=5,Object(z.a)("/api/tag_disciplines/".concat(e.id,"/rename.json"),{method:"post",body:{id:e.id,name:r}});case 5:0===(null==(n=t.sent)?void 0:n.status)&&M();case 7:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})}(r)},className:"current mr10 c-light-primary"},"重命名"),D.a.createElement("span",{onClick:function(){return function(e){var r;T.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"删除",content:"practice"===t?D.a.createElement("div",null,"确认将题目来源“",D.a.createElement("span",{className:"c-light-primary"},e.name),"”删除吗?",D.a.createElement("br",null),"删除后,会将相关题目中的来源进行清除。"):D.a.createElement("div",null,"确认将题目知识点“",D.a.createElement("span",{className:"c-light-primary"},e.name),"”删除吗?",D.a.createElement("br",null),"删除后,会将相关题目中的知识点进行清除。"),okText:"确认",cancelText:"取消",onOk:(r=Object(x.a)(C.a.mark((function t(){var r;return C.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(z.a)("/api/tag_disciplines/".concat(e.id,".json"),{method:"delete",body:{id:e.id}});case 2:0===(null==(r=t.sent)?void 0:r.status)&&M();case 4:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})})}(r)},className:"current c-grey-666"},"删除"))}}],pagination:!1})))))},de=r("m3rI"),fe=r("B7Ph"),he=r("wd/R"),pe=r.n(he),me=r("1vsH"),ge=r("9Bee"),ve=r("xKgJ"),be=k.a.TextArea,ye=(T.a.confirm,_.a.Panel),xe={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0};!function(e){e[e.SET_INITAL_DATA=0]="SET_INITAL_DATA",e[e.SET_LOADING=1]="SET_LOADING",e[e.SET_STATUS=2]="SET_STATUS"}(ae||(ae={}));function we(e,t){switch(t.type){case ae.SET_INITAL_DATA:return Object(S.a)(Object(S.a)({},e),t.payload);case ae.SET_LOADING:return Object(S.a)(Object(S.a)({},e),{},{loading:t.payload});case ae.SET_STATUS:return Object(S.a)(Object(S.a)({},e),{},{status:t.payload});default:throw new Error}}t.default=function(){Object(N.h)();var e,t,r,n=Object(N.g)(),i=Object(N.i)().id,o=w.a.useForm(),a=Object(E.a)(o,1)[0],s=Object(A.useState)(),l=Object(E.a)(s,2),c=l[0],u=l[1],d=Object(A.useState)(!1),f=Object(E.a)(d,2),_=f[0],k=f[1],O=Object(A.useState)([]),L=Object(E.a)(O,2),j=L[0],R=L[1],M=Object(A.useState)([]),U=Object(E.a)(M,2),V=U[0],X=U[1],Y=Object(A.useState)([]),$=Object(E.a)(Y,2),J=$[0],Z=$[1],Q=Object(A.useState)([]),ee=Object(E.a)(Q,2),te=ee[0],re=ee[1],ne=Object(A.useState)([]),oe=Object(E.a)(ne,2),se=oe[0],le=oe[1],ce=Object(A.useState)("C"),ue=Object(E.a)(ce,2),fe=ue[0],he=ue[1],ve=Object(A.useReducer)(we,xe),be=Object(E.a)(ve,2),ye=be[0],Se=be[1],_e=ye.loading,Te=ye.data,ke=ye.user,Oe=(ye.status,null==Te?void 0:Te.hack_sets),Ce=null==Te||null===(e=Te.hack)||void 0===e?void 0:e.test_set_average,Ae=Object(A.useState)(!1),De=Object(E.a)(Ae,2),Le=De[0],Ie=De[1],je=Object(A.useRef)([]),Re=Object(A.useState)(!1),Me=Object(E.a)(Re,2),Ne=Me[0],Pe=Me[1],Fe=Object(A.useState)(!1),Be=Object(E.a)(Fe,2),Ue=Be[0],He=Be[1],ze=Object(A.useRef)(!0),Ge=Object(A.useState)({}),Ke=Object(E.a)(Ge,2),We=Ke[0],Ve=Ke[1];Object(A.useEffect)((function(){return Object(P.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(P.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(P.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(P.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}}),[]),Object(A.useEffect)((function(){setTimeout((function(){document.title="在线刷题"}),400)}));var qe=function(){var e=Object(x.a)(C.a.mark((function e(){var t,r;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(z.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}});case 2:return t=e.sent,e.next=5,Object(z.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});case 5:r=e.sent,X(t.tag_disciplines||[]),Z(r.tag_disciplines||[]);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Xe=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}],Ye=Object(A.useCallback)(Object(x.a)(C.a.mark((function e(){var t,r,n,o,s,l,c,d,f,h,p,m,g,v,b,y,x,w,E,_,T,k,O,A;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Se({type:ae.SET_LOADING,payload:!0}),!i){e.next=19;break}return e.next=4,K(i);case 4:t=e.sent,r=t.user,t.language,n=t.practice_sets,o=t.practice_codes,s=t.description,l=t.difficulty,c=t.name,d=t.open_or_not,f=t.time_limit,h=t.test_set_average,p=t.test_set_score,m=t.status,g=t.tag_discipline_ids,v=t.source_discipline_ids,t.item_banks_group_id,b=t.is_file,y=void 0!==b&&b,x=t.hide_actual_output,w=t.review_privilege,E=t.review_description,Ve({review_privilege:w,status:m,review_description:E,name:c}),Ie(x),_=y?[{input:"",output:"",score:100,position:1}]:n,y?(R(n),a.setFieldsValue({hack_sets:_})):R([]),T={loading:!0,user:r,status:m,data:{hack:{difficulty:l,name:c,description:s,open_or_not:d,time_limit:f,test_set_average:h,test_set_score:p,tag_discipline_ids:g,source_discipline_ids:v,is_file:y},hack_sets:_}},Se({type:ae.SET_INITAL_DATA,payload:T}),u({hack:{difficulty:l,name:c,description:s,open_or_not:d,time_limit:f,test_set_average:h,test_set_score:p,tag_discipline_ids:g,source_discipline_ids:v,is_file:y}}),k=null==o?void 0:o.map((function(e){return Object(S.a)(Object(S.a)({},e),{},{code:F.Base64.decode(null==e?void 0:e.code)})})),le(k),je.current=k,e.next=27;break;case 19:return e.next=21,Object(z.c)("problems/new.json");case 21:O=e.sent,A=O.user,Se({type:ae.SET_INITAL_DATA,payload:{loading:!0,status:0,user:A,data:{hack:{difficulty:"",time_limit:3,description:"#### 题目描述\n现有一个整型数组 `nums`,请编写程序将数组 `nums` 中的所有 `$$0$$` 移动到数组的末尾,但不改变非零元素在数组中的相对位置。请在原数组 `nums` 上进行操作。\n#### 输入输出格式\n**输入格式**\n第一行有一个整数 `numsSize`,表示数组 `nums` 的大小;\n第二行有 `numsSize` 个整数,表示数组 `nums` 的所有元素,每个整数用一个空格隔开。\n**输出格式**\n一行输出数组 `nums` 的所有元素,有 `numsSize` 个整数,每个整数用一个空格隔开。\n#### 输入输出样例1\n**输入**\n`4`\n`0 1 2 3`\n**输出**\n`1 2 3 0`\n**解释(可选)**\nXXXXX\n#### 输入输出样例2\n**输入**\n`5`\n`1 1 0 1 0`\n**输出**\n`1 1 1 0 0`\n**解释(可选)**\nXXXXX\n#### 说明提示\n-`1≤n≤100`",test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),u({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),le(Xe),je.current=Xe;case 27:Se({type:ae.SET_LOADING,payload:!1});case 28:case"end":return e.stop()}}),e)}))),[i]);function $e(){return($e=Object(x.a)(C.a.mark((function e(t,r){var o,a,s,l,c,u,d,f,p,m,g,v,b,x,w,E,_,T;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=Object(S.a)({},t),s=a.hack_sets,(l=a.hack).hide_actual_output=Le,c=[],u=[],d=0,f=null!=l&&l.is_file?j.map((function(e,t){return Object(S.a)(Object(S.a)({},e),{},{position:t+1})})):s.map((function(e){return Object(S.a)(Object(S.a)({},e),{},{is_file:!1})})),p=Object(h.a)(f);try{for(p.s();!(m=p.n()).done;)g=m.value,d+=g.score,g.id&&g.id>=0?c.push(g):u.push(g)}catch(e){p.e(e)}finally{p.f()}if(null!=f&&f.length){e.next=11;break}return y.b.error("测试集不能为空"),e.abrupt("return");case 11:if(100===d||l.test_set_score){e.next=14;break}return y.b.error("测试集的评分占比之和必须等于100"),e.abrupt("return");case 14:if(null==f||!f.some((function(e){return!e.output}))){e.next=17;break}return y.b.error("测试集输出不能为空"),e.abrupt("return");case 17:if(ze.current?Pe(!0):He(!0),b=null==se?void 0:se.map((function(e){return Object(S.a)(Object(S.a)({},e),{},{code:F.Base64.encode(null==e?void 0:e.code)})})),!i){e.next=25;break}return e.next=22,W(i,{practice:l,practice_codes:b,practice_sets:u,update_practice_sets:c});case 22:v=e.sent,e.next=28;break;case 25:return e.next=27,G({practice:l,practice_codes:b,practice_sets:f,publish:!ze.current});case 27:v=e.sent;case 28:if(Pe(!1),He(!1),0!==(null===(o=v)||void 0===o?void 0:o.status)){e.next=46;break}if(null===(x=v)||void 0===x||null===(w=x.similar_practice)||void 0===w||!w.length){e.next=35;break}return k(!0),re(null===(E=v)||void 0===E?void 0:E.similar_practice),e.abrupt("return");case 35:if(!i){e.next=44;break}if(y.b.success("保存成功"),ze.current){e.next=42;break}return e.next=40,Object(z.a)("/api/practices/".concat(i,"/start"),{method:"get"});case 40:0===(null==(_=e.sent)?void 0:_.status)&&n.push("/problems/".concat(null==_?void 0:_.identifier,"/oj/").concat(i));case 42:e.next=46;break;case 44:y.b.success("新建成功"),n.replace("/problems/".concat(null===(T=v)||void 0===T?void 0:T.identifier,"/ojedit"));case 46:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Je(){n.replace("/problems")}Object(A.useEffect)((function(){try{Ye(),qe()}catch(e){console.log(e,"----")}}),[]);var Ze=function(e){var t=Math.floor(100/e.length),r=t+100%e.length;e=e.map((function(n,i){return i===e.length-1?Object(S.a)(Object(S.a)({},n),{},{score:r}):Object(S.a)(Object(S.a)({},n),{},{score:t})})),R(e)};Object(A.useEffect)((function(){if(Ce){var e=null==Oe?void 0:Oe.length,t=Math.floor(100/e),r=100%e;null==Oe||Oe.map((function(n,i){return n.score=t,n.position=i+1,i===e-1&&(n.score=t+r),n})),Se({type:ae.SET_INITAL_DATA,payload:{data:Object(S.a)(Object(S.a)({},Te),{},{hack_sets:Oe})}}),a.setFieldsValue({hack_sets:Oe})}}),[Ce]);var Qe=function(){var e=Object(x.a)(C.a.mark((function e(t){var r;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(z.a)("/api/practices/".concat(t,"/start"),{method:"get"});case 2:0===(null==(r=e.sent)?void 0:r.status)&&Object(me.Q)("/problems/".concat(null==r?void 0:r.identifier,"/oj/").concat(t));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),et=function(){var e=Object(x.a)(C.a.mark((function e(){var t,r,n,o,a;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,K(i);case 2:t=e.sent,r=t.name,n=t.status,o=t.review_privilege,a=t.review_description,Ve({review_privilege:o,status:n,review_description:a,name:r});case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),tt=function(){var e=Object(x.a)(C.a.mark((function e(){return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:T.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"提示",content:"确认将题目《".concat(null==We?void 0:We.name,"》的审核通过吗?"),okText:"确认",cancelText:"取消",onOk:function(){var e=Object(x.a)(C.a.mark((function e(){var t;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(z.a)("/api/practices/".concat(i,"/review.json"),{method:"post",body:{op:"pass"}});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(y.b.success("提交成功"),et());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return D.a.createElement(p.a,{spinning:_e,size:"large",className:I.a["oj-custom-large-spin"]},Te?D.a.createElement(A.Fragment,null,D.a.createElement("header",{className:I.a.header},D.a.createElement("div",null,D.a.createElement("img",{src:"".concat(de.a.IMG_SERVER,"/images/").concat(null==ke?void 0:ke.image_url),alt:"user",width:30}),D.a.createElement("span",null,null==ke?void 0:ke.name)),D.a.createElement("h2",null," ",null==Te||null===(t=Te.hack)||void 0===t?void 0:t.name," "),i?D.a.createElement("a",{className:I.a.btn_back,onClick:Je}," ",D.a.createElement(B.a,null),"退出"):null),D.a.createElement(w.a,{form:a,initialValues:Te,layout:"vertical",className:I.a["oj-form-container"],onValuesChange:function(e){u(Object(S.a)({},a.getFieldsValue()))},onFinish:function(e,t){return $e.apply(this,arguments)}},D.a.createElement(q.a,{hideResize:!0,className:I.a["oj-problems"],leftChild:D.a.createElement(Ee,{formValue:c,onRemoveTestCase:function(e){var t=a.getFieldValue("hack_sets"),r=(null==t?void 0:t.length)-1,n=Math.ceil(100/r),i=100%r;t.splice(e,1),null==t||t.map((function(e,t){return Ce&&(e.score=n,t===r-1&&(e.score=n+i)),e.position=t+1,e})),Se({type:ae.SET_INITAL_DATA,payload:{data:Object(S.a)(Object(S.a)({},Te),{},{hack_sets:t})}}),a.setFieldsValue({hack_sets:t})},onAddTestCase:function(){var e=a.getFieldValue("hack_sets"),t=e.length+1,r=Math.floor(100/t),n=100%t;e.map((function(e,t){return Ce&&(e.score=r),e.position=t+1,e})),e.push({input:"",output:"",position:t,score:Ce?r+n:0}),a.setFieldsValue({hack_sets:e}),Se({type:ae.SET_INITAL_DATA,payload:{data:Object(S.a)(Object(S.a)({},Te),{},{hack_sets:e})}})},hack:Te.hack,onChangeScore:function(e){e.target.value||Ze(j),Se({type:ae.SET_INITAL_DATA,payload:{data:Object(S.a)(Object(S.a)({},Te),{},{hack:Object(S.a)(Object(S.a)({},Te.hack),{},{test_set_score:e.target.value})})}})},onChangehide:function(e){Ie(e.target.checked)},onChangeAverage:function(e){var t=e.target.value;t&&Ze(j),Se({type:ae.SET_INITAL_DATA,payload:{data:Object(S.a)(Object(S.a)({},Te),{},{hack:Object(S.a)(Object(S.a)({},Te.hack),{},{test_set_average:t})})}})},onChangeFile:function(e){Se({type:ae.SET_INITAL_DATA,payload:{data:Object(S.a)(Object(S.a)({},Te),{},{hack:Object(S.a)(Object(S.a)({},Te.hack),{},{is_file:e.target.value})})}})},uploadData:j,setUploadData:R,handleUploadRatio:Ze,ischecked:Le,pointData:V,sourceData:J,getPointData:qe}),rightChild:D.a.createElement(ie,{value:null==se||null===(r=se.find((function(e){return e.language===fe})))||void 0===r?void 0:r.code,onChange:function(e){var t,r=null===(t=je.current)||void 0===t?void 0:t.findIndex((function(e){return e.language===fe}));je.current[r].code=e,le(je.current)},onLanguage:function(e){he(e)},languageItems:se,language:fe})}),D.a.createElement("div",{className:I.a.footer},!!i&&D.a.createElement("div",{className:I.a.result},D.a.createElement("span",null,"审核结果:"),null!=We&&We.review_privilege?D.a.createElement(D.a.Fragment,null,D.a.createElement("div",{onClick:tt,className:I.a.pass},"通过"),D.a.createElement("div",{onClick:function(){var e,t="";T.a.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"不通过原因",content:D.a.createElement("div",{className:"mt20"},D.a.createElement(H.a,{className:I.a.MdEditor,defaultValue:t,onChange:function(e){t=e}})),okText:"确认",cancelText:"取消",onOk:(e=Object(x.a)(C.a.mark((function e(){var r;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return y.b.warn("不通过原因不能为空"),e.abrupt("return",Promise.reject());case 3:return e.next=5,Object(z.a)("/api/practices/".concat(i,"/review.json"),{method:"post",body:{op:"fail",description:t}});case 5:0===(null==(r=e.sent)?void 0:r.status)&&(y.b.success("提交成功"),et());case 7:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},className:I.a.noPass},"不通过")):D.a.createElement(D.a.Fragment,null,0===(null==We?void 0:We.status)&&D.a.createElement("div",{className:I.a.passText},D.a.createElement("i",{className:"iconfont icon-tongguo"}),"未发布"),1===(null==We?void 0:We.status)&&D.a.createElement("div",{className:I.a.passText},D.a.createElement("i",{className:"iconfont icon-tongguo"}),"已公开"),2===(null==We?void 0:We.status)&&D.a.createElement("div",{className:I.a.passText},D.a.createElement("i",{className:"iconfont icon-tongguo"}),"未审批"),3===(null==We?void 0:We.status)&&D.a.createElement("div",{className:I.a.passText},D.a.createElement("i",{className:"iconfont icon-tongguo"}),"审核中"),4===(null==We?void 0:We.status)&&D.a.createElement("div",{className:I.a.passText},D.a.createElement("i",{className:"iconfont icon-tongguo"}),"审核完成待公开"),5===(null==We?void 0:We.status)&&D.a.createElement("div",{className:I.a.noPassText},D.a.createElement("i",{className:"iconfont icon-weitongguo1"}),"审核不通过",D.a.createElement("span",{onClick:function(){var e=T.a.confirm({icon:null,width:700,className:"".concat(I.a.cusModal," custom-modal-divider"),centered:!0,title:D.a.createElement(v.a,null,D.a.createElement(b.a,{flex:"1"},"不通过原因"),D.a.createElement(b.a,null,D.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return e.destroy()}}))),content:D.a.createElement("div",null,D.a.createElement(ge.a,{className:"mt20",value:(null==We?void 0:We.review_description)||""}))})}},"查看原因")))),D.a.createElement(g.a,{type:"primary",ghost:!0,onClick:Je},"退出编辑"),D.a.createElement(g.a,{disabled:Ue,loading:Ne,type:"primary",onClick:function(){ze.current=!0,a.submit()}},"保存 "),i?D.a.createElement(g.a,{disabled:Ne,loading:Ue,style:{background:"#2FC25B",border:0},type:"primary",onClick:function(){ze.current=!1,a.submit()}},"立即体验"):D.a.createElement(g.a,{disabled:Ne,loading:Ue,type:"primary",onClick:function(){ze.current=!1,a.submit()}},"保存并发布审核")))):null,D.a.createElement(T.a,{centered:!0,destroyOnClose:!0,footer:null,visible:_,onCancel:function(){return k(!1)},title:"相似性检测",width:"600px"},D.a.createElement("div",null,D.a.createElement("p",{className:"font14"},"经系统检测发现,本题目与系统中已创建的题目高度雷同,请调整题目后再进行保存"),D.a.createElement(m.a,{dataSource:te,bordered:!1,scroll:te.length>7?{y:300}:{},columns:[{title:"相似题题目",dataIndex:"name",ellipsis:!0,render:function(e,t){return D.a.createElement("span",{onClick:function(){return Qe(null==t?void 0:t.identifier)},style:{textDecorationLine:"underline"},className:"current c-light-primary"},e)}},{title:"创建时间",dataIndex:"create_time",width:170,render:function(e){var t;return null===(t=pe()(e))||void 0===t?void 0:t.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function Ee(e){var t,r,n,h=e.ischecked,p=e.formValue,m=e.hack,v=e.onChangeAverage,b=e.onChangeScore,y=e.onChangehide,O=e.onChangeFile,L=e.onAddTestCase,j=e.onRemoveTestCase,N=e.uploadData,P=e.setUploadData,F=e.handleUploadRatio,B=e.pointData,G=e.sourceData,K=e.getPointData,W=m.test_set_average,V=m.test_set_score,q=Object(A.useState)(!1),X=Object(E.a)(q,2),Y=X[0],$=X[1],J=Object(A.useState)(!1),Z=Object(E.a)(J,2),Q=Z[0],ee=Z[1];function te(e){e.stopPropagation()}return D.a.createElement("div",{className:I.a["oj-left-panel"]},D.a.createElement("div",{className:I.a["oj-form-info"]},D.a.createElement(w.a.Item,{label:"题目名称",name:["hack","name"],rules:[{required:!0,message:"请输入题目名称"}],className:I.a.inputOne},D.a.createElement(k.a,{bordered:!1,maxLength:60,placeholder:"请输入题目名称",suffix:D.a.createElement("span",null,(null==p||null===(t=p.hack)||void 0===t||null===(r=t.name)||void 0===r?void 0:r.length)||0,"/",D.a.createElement("span",{className:"c-grey-999"},"60"))})),D.a.createElement(w.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"请输入描述内容"}]},D.a.createElement(H.a,{placeholder:"请输入题目描述…",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),D.a.createElement("div",{className:I.a.row},D.a.createElement("div",{className:I.a.a},D.a.createElement(w.a.Item,{label:"难易度",name:["hack","difficulty"],rules:[{required:!0,message:"请选择难易度"}]},D.a.createElement(d.a,null,(n=i.difficulty,M[n].map((function(e){return D.a.createElement(R,{key:e.title,value:e.key}," ",e.title," ")})))))),D.a.createElement("div",{className:I.a.b},D.a.createElement(w.a.Item,{label:"题目来源",name:["hack","source_discipline_ids"]},D.a.createElement(d.a,{placeholder:"选择题目来源",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(e){return e.parentNode}},G.map((function(e){return D.a.createElement(d.a.Option,{key:e.id,value:e.id},e.name)})))),D.a.createElement(g.a,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:function(){return function(){if(Object(ve.v)())ee("practice_source");else{var e,t="";T.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"新建来源",content:D.a.createElement("div",null,D.a.createElement(k.a,{placeholder:"请输入来源名称不超过20个字",maxLength:20,onChange:function(e){t=e.target.value}})),okText:"确认",cancelText:"取消",onOk:(e=Object(x.a)(C.a.mark((function e(){var r;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(z.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:t}});case 2:0===(null==(r=e.sent)?void 0:r.status)&&K();case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})}}()}},Object(ve.v)()?"来源管理":"新建来源"))),D.a.createElement("div",{className:I.a.row},D.a.createElement("div",{className:I.a.b,style:{width:"100%",marginLeft:0}},D.a.createElement(w.a.Item,{label:"知识点",rules:[{required:!0,message:"请选择知识点"}],name:["hack","tag_discipline_ids"]},D.a.createElement(d.a,{placeholder:"选择知识点",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(e){return e.parentNode}},B.map((function(e){return D.a.createElement(d.a.Option,{key:e.id,value:e.id},e.name)})))),D.a.createElement(g.a,{type:"primary",ghost:!0,onClick:function(){return function(){if(Object(ve.v)())ee("practice");else{var e,t="";T.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"新建知识点",content:D.a.createElement("div",null,D.a.createElement(k.a,{placeholder:"请输入知识点名称不超过20个字",maxLength:20,onChange:function(e){t=e.target.value}})),okText:"确认",cancelText:"取消",onOk:(e=Object(x.a)(C.a.mark((function e(){var r;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(z.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:t}});case 2:0===(null==(r=e.sent)?void 0:r.status)&&K();case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})}}()}},Object(ve.v)()?"知识点管理":"新建知识点"))),D.a.createElement("div",{className:I.a.field},D.a.createElement(w.a.Item,{label:"评测时长限制",name:["hack","time_limit"],rules:[{required:!0,message:"请输入评测时长限制"},{type:"number",min:3,message:"最小限制时间是3秒"}],className:I.a.inputTwo,extra:D.a.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"秒",D.a.createElement("span",{className:"ml5 c-grey-999"},"(代码执行所允许的最大时长)"))},D.a.createElement(u.a,{style:{width:185},min:3}))),D.a.createElement("div",{className:"tst-case-info"},D.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","测试用例与系统评分规则",!m.is_file&&D.a.createElement(g.a,{style:{height:40},type:"primary",ghost:!0,onClick:L},"添加测试用例")),D.a.createElement(w.a.Item,{name:["hack","test_set_score"]},D.a.createElement(c.a.Group,{onChange:b},D.a.createElement(c.a,{value:!0},"通过全部测试集",D.a.createElement("span",{className:"tip"}," ","(学员评测,仅当所有测试集都正确时,才获得一次性奖励)")),D.a.createElement(c.a,{value:!1},"通过部分测试集",D.a.createElement("span",{className:"tip"}," ","(学员评测,通过测试集即可获得对应奖励)")))),D.a.createElement(l.a,{style:{marginBottom:"5px"},checked:h,onChange:y},"隐藏实际输出 (选中,则在学生做题过程中无法看到实际输出结果,仅展示是否评测是否通过)"),D.a.createElement(w.a.Item,{className:I.a.testJi,name:["hack","is_file"],label:"用例类型:"},D.a.createElement(c.a.Group,{onChange:O},D.a.createElement(s.a,{direction:"horizontal"},D.a.createElement(c.a,{value:!1},"文本"),D.a.createElement(c.a,{value:!0},"文件")))),!m.test_set_score&&D.a.createElement(w.a.Item,{name:["hack","test_set_average"],label:"系统评分占比"},D.a.createElement(c.a.Group,{onChange:v},D.a.createElement(c.a,{value:!0},"均分比例"),D.a.createElement(c.a,{value:!1},"自定义比例"))),m.is_file&&D.a.createElement("div",{className:I.a.upBtn},D.a.createElement(g.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return $(!0)}},"批量上传测试用例"),D.a.createElement(fe.a,{disabled:null==m?void 0:m.test_set_average,inputChange:function(e,t){console.log(e,t);var r=N.map((function(r,n){return n===t?Object(S.a)(Object(S.a)({},r),{},{score:e.target.value?Number(e.target.value):0}):r}));P(r)},showScore:!m.test_set_score,data:N,onRemove:function(e,t){var r=Object(f.a)(N);r.splice(t,1),W?F(r):P(r)}})),!m.is_file&&D.a.createElement(w.a.List,{name:"hack_sets"},(function(e,t){return Object(a.a)(t),D.a.createElement(_.a,{accordion:!0},e.map((function(e,t){return D.a.createElement(ye,{key:"".concat(e.key,"--").concat(t),header:D.a.createElement("a",{className:I.a["test-case-name"]},D.a.createElement("span",null,"测试用例",t+1),V?null:D.a.createElement(D.a.Fragment,null,D.a.createElement(w.a.Item,{name:[e.name,"score"],fieldKey:[e.fieldKey,"score"],rules:[{required:!0,message:"请输入测试集".concat(t+1,"评分")}]},D.a.createElement(u.a,{onClick:te,min:0,max:100,disabled:W})),D.a.createElement("span",null,"%"))),extra:t>0?D.a.createElement("div",{onClick:te},D.a.createElement(o.a,{okText:"确定",cancelText:"取消",title:"确定删除测试集\b"+(t+1),onConfirm:function(){j(t)}},D.a.createElement(U.a,{className:I.a["btn-remove-case"]}))):null},D.a.createElement(w.a.Item,{label:"输入",name:[e.name,"input"],fieldKey:[e.fieldKey,"input"]},D.a.createElement(be,null)),D.a.createElement(w.a.Item,{label:"输出",name:[e.name,"output"],fieldKey:[e.fieldKey,"output"],rules:[{required:!0,message:"请输入输出内容"}]},D.a.createElement(be,null)))})))})))),D.a.createElement(fe.b,{rootIdentifier:null,visible:Y,onClose:function(){return $(!1)},onOK:function(e){var t=N.concat(e);m.test_set_average?F(t):P(t)}}),D.a.createElement(ue,{visible:Q,onCancel:function(){ee(!1),K()},onOK:function(){ee(!1),K()}}))}},rdUC:
/*!*****************************************************!*\
!*** ./node_modules/store/storages/localStorage.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){var n=r(/*! ../src/util */"MFOe").Global;function i(){return n.localStorage}function o(e){return i().getItem(e)}e.exports={name:"localStorage",read:o,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var r=i().key(t);e(o(r),r)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},sR1s:
/*!*****************************************************!*\
!*** ./node_modules/rc-table/es/utils/valueUtil.js ***!
\*****************************************************/
/*! exports provided: getPathValue, getColumnsKey, mergeObject, validateValue */
/*! exports used: getColumnsKey, getPathValue, mergeObject, validateValue */function(e,t,r){"use strict";r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return l}));var n=r(/*! @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 r=i(t),n=e,o=0;o<r.length;o+=1){if(!n)return null;n=n[r[o]]}return n}function a(e){var t=[],r={};return e.forEach((function(e){for(var n=e||{},o=n.key,a=n.dataIndex,s=o||i(a).join("-")||"RC_TABLE_KEY";r[s];)s="".concat(s,"_next");r[s]=!0,t.push(s)})),t}function s(){var e={};function t(e,r){r&&Object.keys(r).forEach((function(i){var o=r[i];o&&"object"===Object(n.a)(o)?(e[i]=e[i]||{},t(e[i],o)):e[i]=o}))}for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.forEach((function(r){t(e,r)})),e}function l(e){return null!=e}},sboe:
/*!*************************************************!*\
!*** ./node_modules/rc-tree/es/contextTypes.js ***!
\*************************************************/
/*! exports provided: TreeContext */
/*! exports used: TreeContext */function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(/*! react */"q1tI"),i=n.createContext(null)},t23M:
/*!*****************************************************!*\
!*** ./node_modules/rc-resize-observer/es/index.js ***!
\*****************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,r){"use strict";var n=r(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),i=r(/*! @babel/runtime/helpers/esm/classCallCheck */"1OyB"),o=r(/*! @babel/runtime/helpers/esm/createClass */"vuIU"),a=r(/*! @babel/runtime/helpers/esm/inherits */"Ji7U"),s=r(/*! @babel/runtime/helpers/esm/createSuper */"LK+K"),l=r(/*! react */"q1tI"),c=r(/*! rc-util/es/Dom/findDOMNode */"m+aA"),u=r(/*! rc-util/es/Children/toArray */"Zm9Q"),d=r(/*! rc-util/es/warning */"Kwbf"),f=r(/*! rc-util/es/ref */"c+Xe"),h=r(/*! resize-observer-polyfill */"bdgK"),p=function(e){Object(a.a)(r,e);var t=Object(s.a)(r);function r(){var e;return Object(i.a)(this,r),(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 r=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),d=Math.floor(s);if(e.state.width!==u||e.state.height!==d||e.state.offsetWidth!==l||e.state.offsetHeight!==c){var f={width:u,height:d,offsetWidth:l,offsetHeight:c};e.setState(f),r&&Promise.resolve().then((function(){r(Object(n.a)(Object(n.a)({},f),{},{offsetWidth:l,offsetHeight:c}))}))}},e.setChildNode=function(t){e.childNode=t},e}return Object(o.a)(r,[{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 h.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(d.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(0===t.length)return Object(d.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var r=t[0];if(l.isValidElement(r)&&Object(f.c)(r)){var n=r.ref;t[0]=l.cloneElement(r,{ref:Object(f.a)(n,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)})}))}}]),r}(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,r){var n,i,o,a,s,l,c,u;e.exports=(u=r(/*! ./core */"Ib8C"),r(/*! ./x64-core */"MlIO"),r(/*! ./sha512 */"1uat"),i=(n=u).x64,o=i.Word,a=i.WordArray,s=n.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}}),n.SHA384=l._createHelper(c),n.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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),r(/*! ./cipher-core */"OLod"),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},uQRt:
/*!*********************************************!*\
!*** ./node_modules/store/plugins/json2.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){e.exports=function(){return r(/*! ./lib/json2 */"gaXo"),{}}},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,r){var n;"undefined"!=typeof window&&(n=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/dist/",r(r.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":
/*!*********************************************!*\
!*** ./node_modules/eventemitter3/index.js ***!
\*********************************************/
/*! no static exports found */function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,i="~";function o(){}function a(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function s(e,t,r,n,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new a(r,n||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,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)n.call(e,t)&&r.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},c.prototype.listeners=function(e){var t=i?i+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,a=new Array(o);n<o;n++)a[n]=r[n].fn;return a},c.prototype.listenerCount=function(e){var t=i?i+e:e,r=this._events[t];return r?r.fn?1:r.length:0},c.prototype.emit=function(e,t,r,n,o,a){var s=i?i+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){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,r),!0;case 4:return u.fn.call(u.context,t,r,n),!0;case 5:return u.fn.call(u.context,t,r,n,o),!0;case 6:return u.fn.call(u.context,t,r,n,o,a),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,h=u.length;for(c=0;c<h;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){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,r);break;case 4:u[c].fn.call(u[c].context,t,r,n);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},c.prototype.on=function(e,t,r){return s(this,e,t,r,!1)},c.prototype.once=function(e,t,r){return s(this,e,t,r,!0)},c.prototype.removeListener=function(e,t,r,n){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||n&&!a.once||r&&a.context!==r||l(this,o);else{for(var s=0,c=[],u=a.length;s<u;s++)(a[s].fn!==t||n&&!a[s].once||r&&a[s].context!==r)&&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,r){var n,i,o,a,s;n=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,i=/^([^\/?#]*)([^]*)$/,o=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,r){if(r=r||{},e=e.trim(),!(t=t.trim())){if(!r.alwaysNormalize)return e;var n=s.parseURL(e);if(!n)throw new Error("Error trying to parse base URL.");return n.path=s.normalizePath(n.path),s.buildURLFromParts(n)}var o=s.parseURL(t);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return r.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,d=u.substring(0,u.lastIndexOf("/")+1)+o.path;c.path=s.normalizePath(d)}else c.path=a.path,o.params||(c.params=a.params,o.query||(c.query=a.query));return null===c.path&&(c.path=r.alwaysNormalize?s.normalizePath(o.path):o.path),s.buildURLFromParts(c)},parseURL:function(e){var t=n.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,r){function n(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r.oe=function(e){throw console.error(e),e};var n=r(r.s=ENTRY_MODULE);return n.default||n}function i(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function o(e,t,n){var o={};o[n]=[];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[n].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[n].push(l[1]),e[l[2]]=r(l[1]).m),o[l[2]]=o[l[2]]||[],o[l[2]].push(l[4]);for(var d,f=Object.keys(o),h=0;h<f.length;h++)for(var p=0;p<o[f[h]].length;p++)d=o[f[h]][p],isNaN(1*d)||(o[f[h]][p]=1*o[f[h]][p]);return o}function a(e){return Object.keys(e).reduce((function(t,r){return t||e[r].length>0}),!1)}e.exports=function(e,t){t=t||{};var i={main:r.m},s=t.all?{main:Object.keys(i.main)}:function(e,t){for(var r={main:[t]},n={main:[]},i={main:{}};a(r);)for(var s=Object.keys(r),l=0;l<s.length;l++){var c=s[l],u=r[c].pop();if(i[c]=i[c]||{},!i[c][u]&&e[c][u]){i[c][u]=!0,n[c]=n[c]||[],n[c].push(u);for(var d=o(e,e[c][u],c),f=Object.keys(d),h=0;h<f.length;h++)r[f[h]]=r[f[h]]||[],r[f[h]]=r[f[h]].concat(d[f[h]])}}return n}(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+" = ("+n.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 (("+n.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),d=new window.Worker(u);return d.objectURL=u,d}},"./src/config.ts":
/*!***********************!*\
!*** ./src/config.ts ***!
\***********************/
/*! exports provided: hlsDefaultConfig, mergeConfig, enableStreamingMode */function(e,t,r){"use strict";r.r(t),r.d(t,"hlsDefaultConfig",(function(){return S})),r.d(t,"mergeConfig",(function(){return _})),r.d(t,"enableStreamingMode",(function(){return T}));var n=r(/*! ./controller/abr-controller */"./src/controller/abr-controller.ts"),i=r(/*! ./controller/audio-stream-controller */"./src/controller/audio-stream-controller.ts"),o=r(/*! ./controller/audio-track-controller */"./src/controller/audio-track-controller.ts"),a=r(/*! ./controller/subtitle-stream-controller */"./src/controller/subtitle-stream-controller.ts"),s=r(/*! ./controller/subtitle-track-controller */"./src/controller/subtitle-track-controller.ts"),l=r(/*! ./controller/buffer-controller */"./src/controller/buffer-controller.ts"),c=r(/*! ./controller/timeline-controller */"./src/controller/timeline-controller.ts"),u=r(/*! ./controller/cap-level-controller */"./src/controller/cap-level-controller.ts"),d=r(/*! ./controller/fps-controller */"./src/controller/fps-controller.ts"),f=r(/*! ./controller/eme-controller */"./src/controller/eme-controller.ts"),h=r(/*! ./controller/cmcd-controller */"./src/controller/cmcd-controller.ts"),p=r(/*! ./utils/xhr-loader */"./src/utils/xhr-loader.ts"),m=r(/*! ./utils/fetch-loader */"./src/utils/fetch-loader.ts"),g=r(/*! ./utils/cues */"./src/utils/cues.ts"),v=r(/*! ./utils/mediakeys-helper */"./src/utils/mediakeys-helper.ts"),b=r(/*! ./utils/logger */"./src/utils/logger.ts");function y(){return(y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,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:n.default,bufferController:l.default,capLevelController:u.default,fpsController:d.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:f.default,cmcdController:h.default});function _(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 y({},e,t)}function T(e){var t=e.loader;t!==m.default&&t!==p.default?(b.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,b.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}},"./src/controller/abr-controller.ts":
/*!******************************************!*\
!*** ./src/controller/abr-controller.ts ***!
\******************************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t);var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! ../utils/ewma-bandwidth-estimator */"./src/utils/ewma-bandwidth-estimator.ts"),o=r(/*! ../events */"./src/events.ts"),a=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=r(/*! ../errors */"./src/errors.ts"),l=r(/*! ../types/loader */"./src/types/loader.ts"),c=r(/*! ../utils/logger */"./src/utils/logger.ts");function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var d=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,r,d,f=e.prototype;return f.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)},f.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)},f.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},f.onFragLoading=function(e,t){var r,n=t.frag;n.type===l.PlaylistLevelType.MAIN&&(this.timer||(this.fragCurrent=n,this.partCurrent=null!=(r=t.part)?r:null,this.timer=self.setInterval(this.onCheck,100)))},f.onLevelLoaded=function(e,t){var r=this.hls.config;t.details.live?this.bwEstimator.update(r.abrEwmaSlowLive,r.abrEwmaFastLive):this.bwEstimator.update(r.abrEwmaSlowVoD,r.abrEwmaFastVoD)},f._abandonRulesCheck=function(){var e=this.fragCurrent,t=this.partCurrent,r=this.hls,i=r.autoLevelEnabled,s=r.config,l=r.media;if(e&&l){var u=t?t.stats:e.stats,d=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 f=performance.now()-u.loading.start,h=Math.abs(l.playbackRate);if(!(f<=500*d/h)){var p=r.levels,m=r.minAutoLevel,g=p[e.level],v=u.total||Math.max(u.loaded,Math.round(d*g.maxBitrate/8)),b=Math.max(1,u.bwEstimate?u.bwEstimate/8:1e3*u.loaded/f),y=(v-u.loaded)/b,x=l.currentTime,w=(a.BufferHelper.bufferInfo(l,x,s.maxBufferHole).end-x)/h;if(!(w>=2*d/h||y<=w)){var E,S=Number.POSITIVE_INFINITY;for(E=e.level-1;E>m&&!((S=d*p[E].maxBitrate/(6.4*b))<w);E--);if(!(S>=y)){var _=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(n.isFiniteNumber)(_)?(_/1024).toFixed(3):"Unknown")+" Kb/s\n Estimated load time for current fragment: "+y.toFixed(3)+" s\n Estimated load time for the next fragment: "+S.toFixed(3)+" s\n Time to underbuffer: "+w.toFixed(3)+" s"),r.nextLoadLevel=E,this.bwEstimator.sample(f,u.loaded),this.clearTimer(),e.loader&&(this.fragCurrent=this.partCurrent=null,e.loader.abort()),r.trigger(o.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:u})}}}}}},f.onFragLoaded=function(e,t){var r=t.frag,i=t.part;if(r.type===l.PlaylistLevelType.MAIN&&Object(n.isFiniteNumber)(r.sn)){var a=i?i.stats:r.stats,s=i?i.duration:r.duration;if(this.clearTimer(),this.lastLoadedFragLevel=r.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var c=this.hls.levels[r.level],u=(c.loaded?c.loaded.bytes:0)+a.loaded,d=(c.loaded?c.loaded.duration:0)+s;c.loaded={bytes:u,duration:d},c.realBitrate=Math.round(8*u/d)}if(r.bitrateTest){var f={stats:a,frag:r,part:i,id:r.type};this.onFragBuffered(o.Events.FRAG_BUFFERED,f),r.bitrateTest=!1}}},f.onFragBuffered=function(e,t){var r=t.frag,n=t.part,i=n?n.stats:r.stats;if(!i.aborted&&r.type===l.PlaylistLevelType.MAIN&&"initSegment"!==r.sn){var o=i.parsing.end-i.loading.start;this.bwEstimator.sample(o,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),r.bitrateTest?this.bitrateTestDelay=o/1e3:this.bitrateTestDelay=0}},f.onError=function(e,t){switch(t.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},f.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},f.getNextABRAutoLevel=function(){var e=this.fragCurrent,t=this.partCurrent,r=this.hls,n=r.maxAutoLevel,i=r.config,o=r.minAutoLevel,s=r.media,l=t?t.duration:e?e.duration:0,u=s?s.currentTime:0,d=s&&0!==s.playbackRate?Math.abs(s.playbackRate):1,f=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,h=(a.BufferHelper.bufferInfo(s,u,i.maxBufferHole).end-u)/d,p=this.findBestLevel(f,o,n,h,i.abrBandWidthFactor,i.abrBandWidthUpFactor);if(p>=0)return p;c.logger.trace((h?"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(!h){var b=this.bitrateTestDelay;b&&(m=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-b,c.logger.trace("bitrate test took "+Math.round(1e3*b)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*m)+" ms"),g=v=1)}return p=this.findBestLevel(f,o,n,h+m,g,v),Math.max(p,0)},f.findBestLevel=function(e,t,r,n,i,o){for(var a,s=this.fragCurrent,l=this.partCurrent,u=this.lastLoadedFragLevel,d=this.hls.levels,f=d[u],h=!(null==f||null===(a=f.details)||void 0===a||!a.live),p=null==f?void 0:f.codecSet,m=l?l.duration:s?s.duration:0,g=r;g>=t;g--){var v=d[g];if(v&&(!p||v.codecSet===p)){var b=v.details,y=(l?null==b?void 0:b.partTarget:null==b?void 0:b.averagetargetduration)||m,x=void 0;x=g<=u?i*e:o*e;var w=d[g].maxBitrate,E=w*y/x;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+g+"/"+Math.round(x)+"/"+w+"/"+y+"/"+n+"/"+E),x>w&&(!E||h&&!this.bitrateTestDelay||E<n))return g}}return-1},t=e,(r=[{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this.bwEstimator;if(!(-1===e||t&&t.canEstimate()))return e;var r=this.getNextABRAutoLevel();return-1!==e&&(r=Math.min(e,r)),r},set:function(e){this._nextAutoLevel=e}}])&&u(t.prototype,r),d&&u(t,d),e}();t.default=d},"./src/controller/audio-stream-controller.ts":
/*!***************************************************!*\
!*** ./src/controller/audio-stream-controller.ts ***!
\***************************************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t);var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),o=r(/*! ../events */"./src/events.ts"),a=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=r(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),l=r(/*! ../types/level */"./src/types/level.ts"),c=r(/*! ../types/loader */"./src/types/loader.ts"),u=r(/*! ../loader/fragment */"./src/loader/fragment.ts"),d=r(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts"),f=r(/*! ../demux/transmuxer-interface */"./src/demux/transmuxer-interface.ts"),h=r(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),p=r(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),m=r(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),g=r(/*! ../errors */"./src/errors.ts"),v=r(/*! ../utils/logger */"./src/utils/logger.ts");function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var x=function(e){var t,r;function x(t,r){var n;return(n=e.call(this,t,r,"[audio-stream-controller]")||this).videoBuffer=null,n.videoTrackCC=-1,n.waitingVideoCC=-1,n.audioSwitch=!1,n.trackId=-1,n.waitingData=null,n.mainDetails=null,n.bufferFlushed=!1,n._registerListeners(),n}r=e,(t=x).prototype=Object.create(r.prototype),t.prototype.constructor=t,y(t,r);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 r=t.frag,n=t.id,o=t.initPTS;if("main"===n){var a=r.cc;this.initPTS[r.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,r=this.levels,n=this.trackId,o=null==r||null===(t=r[n])||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 d=u.frag,f=u.part,h=u.cache,m=u.complete;if(void 0!==this.initPTS[d.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.FRAG_LOADING;var g={frag:d,part:f,payload:h.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 ("+d.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var b=this.getLoadPosition(),y=a.BufferHelper.bufferInfo(this.mediaBuffer,b,this.config.maxBufferHole);Object(p.fragmentWithinToleranceTest)(y.end,this.config.maxFragLookUpTolerance,d)<0&&(v.logger.log("Waiting fragment cc ("+d.cc+") @ "+d.start+" cancelled because another fragment at "+y.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,r=this.hls,n=this.levels,a=this.media,s=this.trackId,l=r.config;if(n&&n[s]&&(a||!this.startFragRequested&&l.startFragPrefetch)){var d=n[s].details;if(!d||d.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(d))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 f=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,c.PlaylistLevelType.AUDIO);if(null!==f){var h=f.len,p=this.getMaxBufferLength(),m=this.audioSwitch;if(!(h>=p)||m){if(!m&&this._streamEnded(f,d))return r.trigger(o.Events.BUFFER_EOS,{type:"audio"}),void(this.state=i.State.ENDED);var g=d.fragments[0].start,v=f.end;if(m){var b=this.getLoadPosition();v=b,d.PTSKnown&&b<g&&(f.end>g||f.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),a.currentTime=g+.05)}var y=this.getNextFragment(v,d);y?"identity"!==(null===(e=y.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=y.decryptdata)&&void 0!==t&&t.key?this.loadFragment(y,d,v):this.loadKey(y,d):this.bufferFlushed=!0}}}}},w.getMaxBufferLength=function(){var t=e.prototype.getMaxBufferLength.call(this),r=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,c.PlaylistLevelType.MAIN);return null===r?t:Math.max(t,r.len)},w.onMediaDetaching=function(){this.videoBuffer=null,e.prototype.onMediaDetaching.call(this)},w.onAudioTracksUpdated=function(e,t){var r=t.audioTracks;this.resetTransmuxer(),this.levels=r.map((function(e){return new l.Level(e)}))},w.onAudioTrackSwitching=function(e,t){var r=!!t.url;this.trackId=t.id;var n=this.fragCurrent;null!=n&&n.loader&&n.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),r?this.setInterval(100):this.resetTransmuxer(),r?(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 r,n=this.levels,o=t.details,a=t.id;if(n){this.log("Track "+a+" loaded ["+o.startSN+","+o.endSN+"],duration:"+o.totalduration);var s=n[a],l=0;if(o.live||null!==(r=s.details)&&void 0!==r&&r.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,r=e.frag,n=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 f.default(this.hls,c.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var b=this.initPTS[r.cc],y=null===(t=r.initSegment)||void 0===t?void 0:t.data;if(void 0!==b){var x=n?n.index:-1,w=-1!==x,E=new h.ChunkMetadata(r.level,r.sn,r.stats.chunkCount,o.byteLength,x,w);g.push(o,y,m,"",r,n,p.totalduration,!1,E,b)}else v.logger.log("Unknown video PTS for cc "+r.cc+", waiting for video PTS before demuxing audio frag "+r.sn+" of ["+p.startSN+" ,"+p.endSN+"],track "+s),(this.waitingData=this.waitingData||{frag:r,part:n,cache:new d.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 "+r.sn+" of level "+r.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 r=t.tracks.audio;r&&(this.mediaBuffer=r.buffer),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},w.onFragBuffered=function(e,t){var r=t.frag,n=t.part;r.type===c.PlaylistLevelType.AUDIO&&(this.fragContextChanged(r)?this.warn("Fragment "+r.sn+(n?" p: "+n.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==r.sn&&(this.fragPrevious=r,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(r,n)))},w.onError=function(t,r){switch(r.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,r);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=r.fatal?i.State.ERROR:i.State.IDLE,this.warn(r.details+" while loading frag, switching to "+this.state+" state"));break;case g.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===r.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var n=!0,o=this.getFwdBufferInfo(this.mediaBuffer,c.PlaylistLevelType.AUDIO);o&&o.len>.5&&(n=!this.reduceMaxBufferLength(o.len)),n&&(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,r="audio",n=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,d=l.part,f=a.audio,h=a.text,p=a.id3,m=a.initSegment;if(!this.fragContextChanged(c)){if(this.state=i.State.PARSING,this.audioSwitch&&f&&this.completeAudioSwitch(),null!=m&&m.tracks&&(this._bufferInitSegment(m.tracks,c,s),n.trigger(o.Events.FRAG_PARSING_INIT_SEGMENT,{frag:c,id:r,tracks:m.tracks})),f){var g=f.startPTS,v=f.endPTS,y=f.startDTS,x=f.endDTS;d&&(d.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:g,endPTS:v,startDTS:y,endDTS:x}),c.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,g,v,y,x),this.bufferFragmentData(f,c,d,s)}if(null!=p&&null!==(t=p.samples)&&void 0!==t&&t.length){var w=b({frag:c,id:r},p);n.trigger(o.Events.FRAG_PARSING_METADATA,w)}if(h){var E=b({frag:c,id:r},h);n.trigger(o.Events.FRAG_PARSING_USERDATA,E)}}},w._bufferInitSegment=function(e,t,r){if(this.state===i.State.PARSING){e.video&&delete e.video;var n=e.audio;if(n){n.levelCodec=n.codec,n.id="audio",this.log("Init audio buffer, container:"+n.container+", codecs[parsed]=["+n.codec+"]"),this.hls.trigger(o.Events.BUFFER_CODECS,e);var a=n.initSegment;if(null!=a&&a.byteLength){var s={type:"audio",frag:t,part:null,chunkMeta:r,parent:t.type,data:a};this.hls.trigger(o.Events.BUFFER_APPENDING,s)}this.tick()}}},w.loadFragment=function(t,r,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):r.live&&!Object(n.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,r,o)))},w.completeAudioSwitch=function(){var t=this.hls,r=this.media,n=this.trackId;r&&(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:n})},x}(i.default);t.default=x},"./src/controller/audio-track-controller.ts":
/*!**************************************************!*\
!*** ./src/controller/audio-track-controller.ts ***!
\**************************************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t);var n=r(/*! ../events */"./src/events.ts"),i=r(/*! ../errors */"./src/errors.ts"),o=r(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),a=r(/*! ../types/loader */"./src/types/loader.ts");function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){var t,r;function o(t){var r;return(r=e.call(this,t,"[audio-track-controller]")||this).tracks=[],r.groupId=null,r.tracksInGroup=[],r.trackId=-1,r.trackName="",r.selectDefaultTrack=!0,r.registerListeners(),r}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,l(t,r);var c,u,d,f=o.prototype;return f.registerListeners=function(){var e=this.hls;e.on(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(n.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(n.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(n.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(n.Events.ERROR,this.onError,this)},f.unregisterListeners=function(){var e=this.hls;e.off(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(n.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(n.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(n.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(n.Events.ERROR,this.onError,this)},f.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,e.prototype.destroy.call(this)},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},f.onManifestParsed=function(e,t){this.tracks=t.audioTracks||[]},f.onAudioTrackLoaded=function(e,t){var r=t.id,n=t.details,i=this.tracksInGroup[r];if(i){var o=i.details;i.details=t.details,this.log("audioTrack "+r+" loaded ["+n.startSN+"-"+n.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,t,o))}else this.warn("Invalid audio track id "+r)},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.audioGroupIds){var r=t.audioGroupIds[t.urlId];if(this.groupId!==r){this.groupId=r;var i=this.tracks.filter((function(e){return!r||e.groupId===r}));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 "'+r+'" group-id'),this.hls.trigger(n.Events.AUDIO_TRACKS_UPDATED,o),this.selectInitialTrack()}}},f.onError=function(t,r){e.prototype.onError.call(this,t,r),!r.fatal&&r.context&&r.context.type===a.PlaylistContextType.AUDIO_TRACK&&r.context.id===this.trackId&&r.context.groupId===this.groupId&&this.retryLoadingOrFail(r)},f.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 r=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(n.Events.AUDIO_TRACK_SWITCHING,{id:o,groupId:s,name:l,type:c,url:u}),!i.details||i.details.live){var d=this.switchParams(i.url,null==r?void 0:r.details);this.loadPlaylist(d)}}},f.selectInitialTrack=function(){var e=this.tracksInGroup;console.assert(e.length,"Initial audio track should be selected when tracks are known");var t=this.trackName,r=this.findTrackId(t)||this.findTrackId();-1!==r?this.setAudioTrack(r):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(n.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},f.findTrackId=function(e){for(var t=this.tracksInGroup,r=0;r<t.length;r++){var n=t[r];if((!this.selectDefaultTrack||n.default)&&(!e||e===n.name))return n.id}return-1},f.loadPlaylist=function(e){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var r=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: "+r),this.clearTimer(),this.hls.trigger(n.Events.AUDIO_TRACK_LOADING,{url:o,id:r,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),d&&s(c,d),o}(o.default);t.default=c},"./src/controller/base-playlist-controller.ts":
/*!****************************************************!*\
!*** ./src/controller/base-playlist-controller.ts ***!
\****************************************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return l}));var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! ../types/level */"./src/types/level.ts"),o=r(/*! ./level-helper */"./src/controller/level-helper.ts"),a=r(/*! ../utils/logger */"./src/utils/logger.ts"),s=r(/*! ../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 r=null==t?void 0:t.renditionReports;if(r)for(var o=0;o<r.length;o++){var a=r[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(n.isFiniteNumber)(l))return new i.HlsUrlParameters(l,Object(n.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,r){var n=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!=r&&r.live){if(i.reloaded(r),r&&this.log("live playlist "+e+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),r&&i.fragments.length>0&&Object(o.mergeDetails)(r,i),!this.canLoad||!i.live)return;var l,c=void 0,u=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var d=this.hls.config.lowLatencyMode,f=i.lastPartSn,h=i.endSN,p=i.lastPartIndex,m=f===h;-1!==p?(c=m?h+1:f,u=m?d?0:p:p+1):c=h+1;var g=i.age,v=g+i.ageHeader,b=Math.min(v-i.partTarget,1.5*i.targetduration);if(b>0){if(r&&b>r.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+r.tuneInGoal+" to: "+b+" with playlist age: "+i.age),b=0;else{var y=Math.floor(b/i.targetduration);c+=y,void 0!==u&&(u+=Math.round(b%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+g.toFixed(2)+"s goal: "+b+" skip sn "+y+" to part "+u)}i.tuneInGoal=b}if(l=this.getDeliveryDirectives(i,t.deliveryDirectives,c,u),d||!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 n.loadPlaylist(l)}),x)}else this.clearTimer()},t.getDeliveryDirectives=function(e,t,r,n){var o=Object(i.getSkipValue)(e,r);return null!=t&&t.skip&&e.deltaUpdateFailed&&(r=t.msn,n=t.part,o=i.HlsSkip.No),new i.HlsUrlParameters(r,n,o)},t.retryLoadingOrFail=function(e){var t,r=this,n=this.hls.config,i=this.retryCount<n.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)*n.levelLoadingRetryDelay,n.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return r.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,r){"use strict";r.r(t),r.d(t,"State",(function(){return w})),r.d(t,"default",(function(){return E}));var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! ../task-loop */"./src/task-loop.ts"),o=r(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),a=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=r(/*! ../utils/logger */"./src/utils/logger.ts"),l=r(/*! ../events */"./src/events.ts"),c=r(/*! ../errors */"./src/errors.ts"),u=r(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),d=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),f=r(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),h=r(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),p=r(/*! ./level-helper */"./src/controller/level-helper.ts"),m=r(/*! ../loader/fragment-loader */"./src/loader/fragment-loader.ts"),g=r(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),v=r(/*! ../utils/time-ranges */"./src/utils/time-ranges.ts"),b=r(/*! ../types/loader */"./src/types/loader.ts");function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}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,r;function i(t,r,n){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=n,i.log=s.logger.log.bind(s.logger,n+":"),i.warn=s.logger.warn.bind(s.logger,n+":"),i.hls=t,i.fragmentLoader=new m.default(t.config),i.fragmentTracker=r,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}r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,x(t,r);var E,S,_,T=i.prototype;return T.doTick=function(){this.onTickEnd()},T.onTickEnd=function(){},T.startLoad=function(e){},T.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},T._streamEnded=function(e,t){var r=this.fragCurrent,n=this.fragmentTracker;if(!t.live&&r&&r.sn===t.endSN&&!e.nextStart){var i=n.getState(r);return i===o.FragmentState.PARTIAL||i===o.FragmentState.OK}return!1},T.onMediaAttached=function(e,t){var r=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),r.addEventListener("seeking",this.onvseeking),r.addEventListener("ended",this.onvended);var n=this.config;this.levels&&n.autoStartLoad&&this.state===w.STOPPED&&this.startLoad(n.startPosition)},T.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()},T.onMediaSeeking=function(){var e=this.config,t=this.fragCurrent,r=this.media,i=this.mediaBuffer,o=this.state,s=r?r.currentTime:0,l=a.BufferHelper.bufferInfo(i||r,s,e.maxBufferHole);if(this.log("media seeking to "+(Object(n.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,d=s>t.start+t.duration+c;(s<u||d)&&(d&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.loader.abort()),this.resetLoadingState())}r&&(this.lastCurrentTime=s),this.loadedmetadata||l.len||(this.nextLoadPosition=this.startPosition=s),this.tickImmediate()},T.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},T.onKeyLoaded=function(e,t){if(this.state===w.KEY_LOADING&&t.frag===this.fragCurrent&&this.levels){this.state=w.IDLE;var r=this.levels[t.frag.level].details;r&&this.loadFragment(t.frag,r,t.frag.start)}},T.onHandlerDestroying=function(){this.stopLoad(),e.prototype.onHandlerDestroying.call(this)},T.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)},T.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})},T.loadFragment=function(e,t,r){this._loadFragForPlayback(e,t,r)},T._loadFragForPlayback=function(e,t,r){var n=this;this._doFragLoad(e,t,r,(function(t){if(n.fragContextChanged(e))return n.warn("Fragment "+e.sn+(t.part?" p: "+t.part.index:"")+" of level "+e.level+" was dropped during download."),void n.fragmentTracker.removeFragment(e);e.stats.chunkCount++,n._handleFragmentLoadProgress(t)})).then((function(t){if(t){n.fragLoadError=0;var r=n.state;if(!n.fragContextChanged(e))return"payload"in t&&(n.log("Loaded fragment "+e.sn+" of level "+e.level),n.hls.trigger(l.Events.FRAG_LOADED,t),n.state===w.BACKTRACKING)?(n.fragmentTracker.backtrack(e,t),void n.resetFragmentLoading(e)):void n._handleFragmentLoadComplete(t);(r===w.FRAG_LOADING||r===w.BACKTRACKING||!n.fragCurrent&&r===w.PARSING)&&(n.fragmentTracker.removeFragment(e),n.state=w.IDLE)}})).catch((function(t){n.warn(t),n.resetFragmentLoading(e)}))},T.flushMainBuffer=function(e,t,r){if(void 0===r&&(r=null),e-t){var n={startOffset:e,endOffset:t,type:r};this.fragLoadError=0,this.hls.trigger(l.Events.BUFFER_FLUSHING,n)}},T._loadInitSegment=function(e){var t=this;this._doFragLoad(e).then((function(r){if(!r||t.fragContextChanged(e)||!t.levels)throw new Error("init load aborted");return r})).then((function(r){var n=t.hls,i=r.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 n.trigger(l.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:a,tdecrypt:i}}),r.payload=t,r}))}return r})).then((function(r){var n=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(r.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),r.frag===n&&i.trigger(l.Events.FRAG_BUFFERED,{stats:s,frag:n,part:null,id:e.type}),t.tick()})).catch((function(r){t.warn(r),t.resetFragmentLoading(e)}))},T.fragContextChanged=function(e){var t=this.fragCurrent;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId},T.fragBufferedComplete=function(e,t){var r=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(r))),this.state=w.IDLE,this.tick()},T._handleFragmentLoadComplete=function(e){var t=this.transmuxer;if(t){var r=e.frag,n=e.part,i=e.partsLoaded,o=!i||0===i.length||i.some((function(e){return!e})),a=new u.ChunkMetadata(r.level,r.sn,r.stats.chunkCount+1,0,n?n.index:-1,!o);t.flush(a)}},T._handleFragmentLoadProgress=function(e){},T._doFragLoad=function(e,t,r,i){var o=this;if(void 0===r&&(r=null),!this.levels)throw new Error("frag load aborted, missing levels");if(r=Math.max(e.start,r||0),this.config.lowLatencyMode&&t){var a=t.partList;if(a&&i){r>e.end&&t.fragmentHint&&(e=t.fragmentHint);var s=this.getNextPart(a,e,r);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(r.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:r}),this.doFragPartsLoad(e,a,s,i).catch((function(e){return o.handleFragLoadError(e)}))}if(!e.url||this.loadedEndOfParts(a,r))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(r.toFixed(3))),Object(n.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:r}),this.fragmentLoader.load(e,i).catch((function(e){return o.handleFragLoadError(e)}))},T.doFragPartsLoad=function(e,t,r,n){var i=this;return new Promise((function(o,a){var s=[];!function r(c){var u=t[c];i.fragmentLoader.loadPart(e,u,n).then((function(n){s[u.index]=n;var a=n.part;i.hls.trigger(l.Events.FRAG_LOADED,n);var d=t[c+1];if(!d||d.fragment!==e)return o({frag:e,part:a,partsLoaded:s});r(c+1)})).catch(a)}(r)}))},T.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},T._handleTransmuxerFlush=function(e){var t=this.getCurrentContext(e);if(t&&this.state===w.PARSING){var r=t.frag,n=t.part,i=t.level,o=self.performance.now();r.stats.parsing.end=o,n&&(n.stats.parsing.end=o),this.updateLevelTiming(r,n,i,e.partial)}else this.fragCurrent||(this.state=w.IDLE)},T.getCurrentContext=function(e){var t=this.levels,r=e.level,n=e.sn,i=e.part;if(!t||!t[r])return this.warn("Levels object was unset while buffering fragment "+n+" of level "+r+". The current chunk will not be buffered."),null;var o=t[r],a=i>-1?Object(p.getPartWith)(o,n,i):null,s=a?a.fragment:Object(p.getFragmentWithSN)(o,n,this.fragCurrent);return s?{frag:s,part:a,level:o}:null},T.bufferFragmentData=function(e,t,r,n){if(e&&this.state===w.PARSING){var i=e.data1,o=e.data2,a=i;if(i&&o&&(a=Object(d.appendUint8Array)(i,o)),a&&a.length){var s={type:e.type,frag:t,part:r,chunkMeta:n,parent:t.type,data:a};this.hls.trigger(l.Events.BUFFER_APPENDING,s),e.dropped&&e.independent&&!r&&this.flushBufferGap(t)}}},T.flushBufferGap=function(e){var t=this.media;if(t)if(a.BufferHelper.isBuffered(t,t.currentTime)){var r=t.currentTime,n=a.BufferHelper.bufferInfo(t,r,0),i=e.duration,o=Math.min(2*this.config.maxFragLookUpTolerance,.25*i),s=Math.max(Math.min(e.start-o,n.end-o),r+o);e.start-s>o&&this.flushMainBuffer(s,e.start)}else this.flushMainBuffer(0,e.start)},T.getFwdBufferInfo=function(e,t){var r=this.config,i=this.getLoadPosition();if(!Object(n.isFiniteNumber)(i))return null;var o=a.BufferHelper.bufferInfo(e,i,r.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,r.maxBufferHole))}return o},T.getMaxBufferLength=function(e){var t,r=this.config;return t=e?Math.max(8*r.maxBufferSize/e,r.maxBufferLength):r.maxBufferLength,Math.min(t,r.maxMaxBufferLength)},T.reduceMaxBufferLength=function(e){var t=this.config,r=e||t.maxBufferLength;return t.maxMaxBufferLength>=r&&(t.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},T.getNextFragment=function(e,t){var r,n,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===(r=a)||void 0===r||!r.initSegment||null!==(n=a)&&void 0!==n&&n.initSegment.data||this.bitrateTest||(a=a.initSegment),a},T.getNextPart=function(e,t,r){for(var n=-1,i=!1,o=!0,a=0,s=e.length;a<s;a++){var l=e[a];if(o=o&&!l.independent,n>-1&&r<l.start)break;var c=l.loaded;!c&&(i||l.independent||o)&&l.fragment===t&&(n=a),i=c}return n},T.loadedEndOfParts=function(e,t){var r=e[e.length-1];return r&&t>r.start&&r.loaded},T.getInitialLiveFragment=function(e,t){var r=this.fragPrevious,n=null;if(r){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+r.programDateTime),n=Object(h.findFragmentByPDT)(t,r.endProgramDateTime,this.config.maxFragLookUpTolerance)),!n){var i=r.sn+1;if(i>=e.startSN&&i<=e.endSN){var o=t[i-e.startSN];r.cc===o.cc&&(n=o,this.log("Live playlist, switching playlist, load frag with next SN: "+n.sn))}n||(n=Object(h.findFragWithCC)(t,r.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+n.sn)}}else{var a=this.hls.liveSyncPosition;null!==a&&(n=this.getFragmentAtPosition(a,this.bitrateTest?e.fragmentEnd:e.edge,e))}return n},T.getFragmentAtPosition=function(e,t,r){var n,i=this.config,a=this.fragPrevious,s=r.fragments,l=r.endSN,c=r.fragmentHint,u=i.maxFragLookUpTolerance,d=!!(i.lowLatencyMode&&r.partList&&c);if(d&&c&&!this.bitrateTest&&(s=s.concat(c),l=c.sn),e<t){var f=e>t-u?0:u;n=Object(h.findFragmentByPTS)(a,s,e,f)}else n=s[s.length-1];if(n){var p=n.sn-r.startSN,m=a&&n.level===a.level,g=s[p+1];if(this.fragmentTracker.getState(n)===o.FragmentState.BACKTRACKED){n=null;for(var v=p;s[v]&&this.fragmentTracker.getState(s[v])===o.FragmentState.BACKTRACKED;)n=a?s[v--]:s[--v];n||(n=g)}else a&&n.sn===a.sn&&!d&&m&&(n.sn<l&&this.fragmentTracker.getState(g)!==o.FragmentState.OK?(this.log("SN "+n.sn+" just loaded, load next one: "+g.sn),n=g):n=null)}return n},T.synchronizeToLiveEdge=function(e){var t=this.config,r=this.media;if(r){var n=this.hls.liveSyncPosition,i=r.currentTime,o=e.fragments[0].start,a=e.edge,s=i>=o-t.maxFragLookUpTolerance&&i<=a;if(null!==n&&r.duration>n&&(i<n||!s)){var l=void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!s&&r.readyState<4||i<a-l)&&(this.loadedmetadata||(this.nextLoadPosition=n),r.readyState&&(this.warn("Playback: "+i.toFixed(3)+" is located too far from the end of live sliding playlist: "+a+", reset currentTime to : "+n.toFixed(3)),r.currentTime=n))}}},T.alignPlaylists=function(e,t){var r=this.levels,i=this.levelLastLoaded,o=this.fragPrevious,a=null!==i?r[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(n.isFiniteNumber)(l);if(c||!u&&!l){Object(f.alignStream)(o,a,e);var d=e.fragments[0].start;return this.log("Live playlist sliding: "+d.toFixed(2)+" start-sn: "+(t?t.startSN:"na")+"->"+e.startSN+" prev-sn: "+(o?o.sn:"na")+" fragments: "+s),d}return l},T.waitForCdnTuneIn=function(e){return e.live&&e.canBlockReload&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)},T.setStartPosition=function(e,t){var r=this.startPosition;if(r<t&&(r=-1),-1===r||-1===this.lastCurrentTime){var i=e.startTimeOffset;Object(n.isFiniteNumber)(i)?(r=t+i,i<0&&(r+=e.totalduration),r=Math.min(Math.max(t,r),t+e.totalduration),this.log("Start time offset "+i+" found in playlist, adjust startPosition to "+r),this.startPosition=r):e.live?r=this.hls.liveSyncPosition||t:this.startPosition=r=0,this.lastCurrentTime=r}this.nextLoadPosition=r},T.getLoadPosition=function(){var e=this.media,t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t},T.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))},T.resetFragmentLoading=function(e){this.fragCurrent&&this.fragContextChanged(e)||(this.state=w.IDLE)},T.onFragmentOrKeyLoadError=function(e,t){if(!t.fatal){var r=t.frag;if(r&&r.type===e){var n=this.fragCurrent;console.assert(n&&r.sn===n.sn&&r.level===n.level&&r.urlId===n.urlId,"Frag load error must match current frag to retry");var i=this.config;if(this.fragLoadError+1<=i.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(r.level))return;var o=Math.min(Math.pow(2,this.fragLoadError)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);this.warn("Fragment "+r.sn+" of "+e+" "+r.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===b.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)}}},T.afterBufferFlushed=function(e,t,r){if(e){var n=a.BufferHelper.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,n,r),this.state===w.ENDED&&this.resetLoadingState()}},T.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=w.IDLE},T.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},T.updateLevelTiming=function(e,t,r,n){var i=this,o=r.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=n?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:r,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()},T.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))}}])&&y(E.prototype,S),_&&y(E,_),i}(i.default)},"./src/controller/buffer-controller.ts":
/*!*********************************************!*\
!*** ./src/controller/buffer-controller.ts ***!
\*********************************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return h}));var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! ../events */"./src/events.ts"),o=r(/*! ../utils/logger */"./src/utils/logger.ts"),a=r(/*! ../errors */"./src/errors.ts"),s=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=r(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=r(/*! ../loader/fragment */"./src/loader/fragment.ts"),u=r(/*! ./buffer-operation-queue */"./src/controller/buffer-operation-queue.ts"),d=Object(l.getMediaSource)(),f=/([ha]vc.)(?:\.[^.,]+)+/,h=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,r=t.media,n=t.mediaSource;o.logger.log("[buffer-controller]: Media source opened"),r&&(t.updateMediaElementDuration(),e.trigger(i.Events.MEDIA_ATTACHED,{media:r})),n&&n.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 r=2;(t.audio&&!t.video||!t.altAudio)&&(r=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=r,this.details=null,o.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},t.onMediaAttaching=function(e,t){var r=this.media=t.media;if(r&&d){var n=this.mediaSource=new d;n.addEventListener("sourceopen",this._onMediaSourceOpen),n.addEventListener("sourceended",this._onMediaSourceEnded),n.addEventListener("sourceclose",this._onMediaSourceClose),r.src=self.URL.createObjectURL(n),this._objectUrl=r.src}},t.onMediaDetaching=function(){var e=this.media,t=this.mediaSource,r=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&&(r&&self.URL.revokeObjectURL(r),e.src===r?(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 r=e.sourceBuffer[t];try{r&&(e.removeBufferListeners(t),e.mediaSource&&e.mediaSource.removeSourceBuffer(r),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 r=this,n=this.getSourceBufferTypes().length;Object.keys(t).forEach((function(e){if(n){var i=r.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(f,"$1")!==(s||a).replace(f,"$1")){var c=l+";codecs="+(s||a);r.appendChangeType(e,c)}}}else r.pendingTracks[e]=t[e]})),n||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},t.appendChangeType=function(e,t){var r=this,n=this.operationQueue,i={execute:function(){var i=r.sourceBuffer[e];i&&(o.logger.log("[buffer-controller]: changing "+e+" sourceBuffer type to "+t),i.changeType(t)),n.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(t){o.logger.warn("[buffer-controller]: Failed to change "+e+" SourceBuffer type",t)}};n.append(i,e)},t.onBufferAppending=function(e,t){var r=this,n=this.hls,l=this.operationQueue,c=this.tracks,u=t.data,d=t.type,f=t.frag,h=t.part,p=t.chunkMeta,m=p.buffering[d],g=self.performance.now();m.start=g;var v=f.stats.buffering,b=h?h.stats.buffering:null;0===v.start&&(v.start=g),b&&0===b.start&&(b.start=g);var y=c.audio,x="audio"===d&&1===p.id&&"audio/mpeg"===(null==y?void 0:y.container),w={execute:function(){if(m.executeStart=self.performance.now(),x){var e=r.sourceBuffer[d];if(e){var t=f.start-e.timestampOffset;Math.abs(t)>=.1&&(o.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+f.start+" (delta: "+t+") sn: "+f.sn+")"),e.timestampOffset=f.start)}}r.appendExecutor(u,d)},onStart:function(){},onComplete:function(){var e=self.performance.now();m.executeEnd=m.end=e,0===v.first&&(v.first=e),b&&0===b.first&&(b.first=e);var t=r.sourceBuffer,n={};for(var o in t)n[o]=s.BufferHelper.getBuffered(t[o]);r.appendError=0,r.hls.trigger(i.Events.BUFFER_APPENDED,{type:d,frag:f,part:h,chunkMeta:p,parent:f.type,timeRanges:n})},onError:function(e){o.logger.error("[buffer-controller]: Error encountered while trying to append to the "+d+" SourceBuffer",e);var t={type:a.ErrorTypes.MEDIA_ERROR,parent:f.type,details:a.ErrorDetails.BUFFER_APPEND_ERROR,err:e,fatal:!1};e.code===DOMException.QUOTA_EXCEEDED_ERR?t.details=a.ErrorDetails.BUFFER_FULL_ERROR:(r.appendError++,t.details=a.ErrorDetails.BUFFER_APPEND_ERROR,r.appendError>n.config.appendErrorMaxRetry&&(o.logger.error("[buffer-controller]: Failed "+n.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),t.fatal=!0)),n.trigger(i.Events.ERROR,t)}};l.append(w,d)},t.onBufferFlushing=function(e,t){var r=this,n=this.operationQueue,a=function(e){return{execute:r.removeExecutor.bind(r,e,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){r.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?n.append(a(t.type),t.type):this.getSourceBufferTypes().forEach((function(e){n.append(a(e),e)}))},t.onFragParsed=function(e,t){var r=this,n=t.frag,a=t.part,s=[],l=a?a.elementaryStreams:n.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: "+n.type+" level: "+n.level+" sn: "+n.sn),this.blockBuffers((function(){var e=self.performance.now();n.stats.buffering.end=e,a&&(a.stats.buffering.end=e);var t=a?a.stats:n.stats;r.hls.trigger(i.Events.FRAG_BUFFERED,{frag:n,part:a,stats:t,id:n.type})}),s)},t.onFragChanged=function(e,t){this.flushBackBuffer()},t.onBufferEos=function(e,t){var r=this;this.getSourceBufferTypes().reduce((function(e,n){var i=r.sourceBuffer[n];return t.type&&t.type!==n||i&&!i.ended&&(i.ended=!0,o.logger.log("[buffer-controller]: "+n+" sourceBuffer now EOS")),e&&!(i&&!i.ended)}),!0)&&this.blockBuffers((function(){var e=r.mediaSource;e&&"open"===e.readyState&&e.endOfStream()}))},t.onLevelUpdated=function(e,t){var r=t.details;r.fragments.length&&(this.details=r,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},t.flushBackBuffer=function(){var e=this.hls,t=this.details,r=this.media,o=this.sourceBuffer;if(r&&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(n.isFiniteNumber)(l)&&!(l<0)){var c=r.currentTime,u=t.levelTargetDuration,d=Math.max(l,u),f=Math.floor(c/u)*u-d;a.forEach((function(r){var n=o[r];if(n){var a=s.BufferHelper.getBuffered(n);a.length>0&&f>a.start(0)&&(e.trigger(i.Events.BACK_BUFFER_REACHED,{bufferEnd:f}),t.live&&e.trigger(i.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:f}),e.trigger(i.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:f,type:r}))}}))}}}},t.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var e=this.details,t=this.hls,r=this.media,i=this.mediaSource,a=e.fragments[0].start+e.totalduration,s=r.duration,l=Object(n.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(n.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,r=e.fragments;if(r.length&&e.live&&null!=t&&t.setLiveSeekableRange){var n=Math.max(0,r[0].start),i=Math.max(n,n+e.totalduration);t.setLiveSeekableRange(n,i)}},t.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.operationQueue,r=this.pendingTracks,n=Object.keys(r).length;if(n&&!e||2===n){this.createSourceBuffers(r),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,r=this.mediaSource;if(!r)throw Error("createSourceBuffers called when mediaSource was null");var n=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 d=t[s]=r.addSourceBuffer(u),f=s;this.addBufferListener(f,"updatestart",this._onSBUpdateStart),this.addBufferListener(f,"updateend",this._onSBUpdateEnd),this.addBufferListener(f,"error",this._onSBUpdateError),this.tracks[s]={buffer:d,codec:c,container:l.container,levelCodec:l.levelCodec,id:l.id},n++}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})}}n&&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 r=this.operationQueue.current(e);r&&r.onError(t)},t.removeExecutor=function(e,t,r){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(n.isFiniteNumber)(i.duration)?i.duration:1/0,u=Object(n.isFiniteNumber)(a.duration)?a.duration:1/0,d=Math.max(0,t),f=Math.min(r,c,u);f>d?(o.logger.log("[buffer-controller]: Removing ["+d+","+f+"] from the "+e+" SourceBuffer"),console.assert(!l.updating,e+" sourceBuffer must not be updating"),l.remove(d,f)):s.shiftAndExecuteNext(e)},t.appendExecutor=function(e,t){var r=this.operationQueue,n=this.sourceBuffer[t];if(!n)return o.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),void r.shiftAndExecuteNext(t);n.ended=!1,console.assert(!n.updating,t+" sourceBuffer must not be updating"),n.appendBuffer(e)},t.blockBuffers=function(e,t){var r=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 n=this.operationQueue,i=t.map((function(e){return n.appendBlocker(e)}));Promise.all(i).then((function(){e(),t.forEach((function(e){var t=r.sourceBuffer[e];t&&t.updating||n.shiftAndExecuteNext(e)}))}))},t.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},t.addBufferListener=function(e,t,r){var n=this.sourceBuffer[e];if(n){var i=r.bind(this,e);this.listeners[e].push({event:t,listener:i}),n.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,r){"use strict";r.r(t),r.d(t,"default",(function(){return i}));var n=r(/*! ../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 r=this.queues[t];r.push(e),1===r.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,r=new Promise((function(e){t=e})),n={execute:t,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(n,e),r},t.executeNext=function(e){var t=this.buffers,r=this.queues,i=t[e],o=r[e];if(o.length){var a=o[0];try{a.execute()}catch(t){n.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,r){"use strict";r.r(t);var n=r(/*! ../events */"./src/events.ts");function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}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,r,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(n.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(n.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(n.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},a.unregisterListener=function(){var e=this.hls;e.off(n.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(n.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(n.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},a.onFpsDropLevelCapping=function(t,r){e.isLevelAllowed(r.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(r.droppedLevel)},a.onMediaAttaching=function(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null},a.onManifestParsed=function(e,t){var r=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,r.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 r=this,n=this.hls.levels;if(!n.length)return-1;var i=n.filter((function(n,i){return e.isLevelAllowed(i,r.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 r=e.getBoundingClientRect();t.width=r.width,t.height=r.height,t.width||t.height||(t.width=r.right-r.left||e.width||0,t.height=r.bottom-r.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,r){if(!e||!e.length)return-1;for(var n,i,o=e.length-1,a=0;a<e.length;a+=1){var s=e[a];if((s.width>=t||s.height>=r)&&(n=s,!(i=e[a+1])||n.width!==i.width||n.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}}],(r=[{key:"mediaWidth",get:function(){return this.getDimensions().width*e.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*e.contentScaleFactor}}])&&i(t.prototype,r),o&&i(t,o),e}();t.default=o},"./src/controller/cmcd-controller.ts":
/*!*******************************************!*\
!*** ./src/controller/cmcd-controller.ts ***!
\*******************************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return f}));var n=r(/*! ../events */"./src/events.ts"),i=r(/*! ../types/cmcd */"./src/types/cmcd.ts"),o=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),a=r(/*! ../utils/logger */"./src/utils/logger.ts");function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return u(e,t);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)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var f=function(){function e(t){var r=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(){r.initialized&&(r.starved=!0),r.buffering=!0},this.onPlaying=function(){r.initialized||(r.initialized=!0),r.buffering=!1},this.applyPlaylistData=function(e){try{r.apply(e,{ot:i.CMCDObjectType.MANIFEST,su:!r.initialized})}catch(e){a.logger.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=function(e){try{var t=e.frag,n=r.hls.levels[t.level],o=r.getObjectType(t),s={d:1e3*t.duration,ot:o};o!==i.CMCDObjectType.VIDEO&&o!==i.CMCDObjectType.AUDIO&&o!=i.CMCDObjectType.MUXED||(s.br=n.bitrate/1e3,s.tb=r.getTopBandwidth(o),s.bl=r.getBufferLength(o)),r.apply(e,s)}catch(e){a.logger.warn("Could not generate segment CMCD data.",e)}},this.hls=t;var n=this.config=t.config,o=n.cmcd;null!=o&&(n.pLoader=this.createPlaylistLoader(),n.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(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(n.Events.MEDIA_DETACHED,this.onMediaDetached,this),e.on(n.Events.BUFFER_CREATED,this.onBufferCreated,this)},t.unregisterListeners=function(){var e=this.hls;e.off(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(n.Events.MEDIA_DETACHED,this.onMediaDetached,this),e.off(n.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 r,n;this.audioBuffer=null===(r=t.tracks.audio)||void 0===r?void 0:r.buffer,this.videoBuffer=null===(n=t.tracks.video)||void 0===n?void 0:n.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,r){void 0===r&&(r={}),d(r,this.createData());var n=r.ot===i.CMCDObjectType.INIT||r.ot===i.CMCDObjectType.VIDEO||r.ot===i.CMCDObjectType.MUXED;if(this.starved&&n&&(r.bs=!0,r.su=!0,this.starved=!1),null==r.su&&(r.su=this.buffering),this.useHeaders){var o=e.toHeaders(r);if(!Object.keys(o).length)return;t.headers||(t.headers={}),d(t.headers,o)}else{var a=e.toQuery(r);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,r=0,n=c(e===i.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels);!(t=n()).done;){var o=t.value;o.bitrate>r&&(r=o.bitrate)}return r>0?r:NaN},t.getBufferLength=function(e){var t=this.hls.media,r=e===i.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;return r&&t?1e3*o.BufferHelper.bufferInfo(r,t.currentTime,this.config.maxBufferHole).len:NaN},t.createPlaylistLoader=function(){var e=this.config.pLoader,t=this.applyPlaylistData,r=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new r(e)}var n=e.prototype;return n.destroy=function(){this.loader.destroy()},n.abort=function(){this.loader.abort()},n.load=function(e,r,n){t(e),this.loader.load(e,r,n)},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,r=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new r(e)}var n=e.prototype;return n.destroy=function(){this.loader.destroy()},n.abort=function(){this.loader.abort()},n.load=function(e,r,n){t(e),this.loader.load(e,r,n)},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,r=[],n=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(n(u)&&!("v"===l&&1===u||"pr"==l&&1===u)){var d=a[l];d&&(u=d(u));var f=typeof u,h=void 0;h="ot"===l||"sf"===l||"st"===l?l+"="+u:"boolean"===f?l:"number"===f?l+"="+u:l+"="+JSON.stringify(u),r.push(h)}}return r.join(",")},e.toHeaders=function(t){for(var r={},n=["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&&(r["CMCD-"+n[c]]=u)}return r},e.toQuery=function(t){return"CMCD="+encodeURIComponent(e.serialize(t))},e.appendQueryToUri=function(e,t){if(!t)return e;var r=e.includes("?")?"&":"?";return""+e+r+t},e}()},"./src/controller/eme-controller.ts":
/*!******************************************!*\
!*** ./src/controller/eme-controller.ts ***!
\******************************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t);var n=r(/*! ../events */"./src/events.ts"),i=r(/*! ../errors */"./src/errors.ts"),o=r(/*! ../utils/logger */"./src/utils/logger.ts"),a=r(/*! ../utils/mediakeys-helper */"./src/utils/mediakeys-helper.ts");function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}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,r,l,c=e.prototype;return c.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},c._registerListeners=function(){this.hls.on(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(n.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(n.Events.MANIFEST_PARSED,this.onManifestParsed,this)},c._unregisterListeners=function(){this.hls.off(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(n.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(n.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,r){var n=this,i=function(e,t,r,n){switch(e){case a.KeySystems.WIDEVINE:return function(e,t,r){var n={audioCapabilities:[],videoCapabilities:[]};return e.forEach((function(e){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+e+'"',robustness:r.audioRobustness||""})})),t.forEach((function(e){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+e+'"',robustness:r.videoRobustness||""})})),[n]}(t,r,n);default:throw new Error("Unknown key-system: "+e)}}(e,t,r,this._drmSystemOptions);o.logger.log("Requesting encrypted media key-system access");var s=this.requestMediaKeySystemAccess(e,i);this.mediaKeysPromise=s.then((function(t){return n._onMediaKeySystemAccessObtained(e,t)})),s.catch((function(t){o.logger.error('Failed to obtain key-system "'+e+'" access:',t)}))},c._onMediaKeySystemAccessObtained=function(e,t){var r=this;o.logger.log('Access for key-system "'+e+'" obtained');var n={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:e};this._mediaKeysList.push(n);var i=Promise.resolve().then((function(){return t.createMediaKeys()})).then((function(t){return n.mediaKeys=t,o.logger.log('Media-keys created for key-system "'+e+'"'),r._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(r){t._onKeySessionMessage(e,r.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(n.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});var r=function(r){t._media&&(t._attemptSetMediaKeys(r),t._generateRequestWithPreferredKeySession(e.initDataType,e.initData))};this.mediaKeysPromise.then(r).catch(r)},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(n.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 r=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(n.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(n.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(n.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),r.hls.trigger(n.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})}))}},c._createLicenseXhr=function(e,t,r){var n=new XMLHttpRequest;n.responseType="arraybuffer",n.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,n,e,t,r);var i=this._licenseXhrSetup;if(i)try{i.call(this.hls,n,e),i=void 0}catch(e){o.logger.error(e)}try{n.readyState||n.open("POST",e,!0),i&&i.call(this.hls,n,e)}catch(e){throw new Error("issue setting up KeySystem license XHR "+e)}return n},c._onLicenseRequestReadyStageChange=function(e,t,r,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(n.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(r,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 r=this._mediaKeysList[0];if(!r)return o.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(n.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var a=this.getLicenseServerUrl(r.mediaKeySystemDomain),s=this._createLicenseXhr(a,e,t);o.logger.log("Sending license request to URL: "+a);var l=this._generateLicenseRequestChallenge(r,e);s.send(l)}catch(e){o.logger.error("Failure requesting DRM license: "+e),this.hls.trigger(n.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 r=t.media;this._media=r,r.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 r=t.levels.map((function(e){return e.audioCodec})).filter((function(e){return!!e})),n=t.levels.map((function(e){return e.videoCodec})).filter((function(e){return!!e}));this._attemptKeySystemAccess(a.KeySystems.WIDEVINE,r,n)}},t=e,(r=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&s(t.prototype,r),l&&s(t,l),e}();t.default=l},"./src/controller/fps-controller.ts":
/*!******************************************!*\
!*** ./src/controller/fps-controller.ts ***!
\******************************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t);var n=r(/*! ../events */"./src/events.ts"),i=r(/*! ../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(n.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},t.unregisterListeners=function(){this.hls.off(n.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 r=this.hls.config;if(r.capLevelOnFPSDrop){var n=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=n,n&&"function"==typeof n.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),r.fpsDroppedMonitoringPeriod)}},t.checkFPS=function(e,t,r){var o=performance.now();if(t){if(this.lastTime){var a=o-this.lastTime,s=r-this.lastDroppedFrames,l=t-this.lastDecodedFrames,c=1e3*s/a,u=this.hls;if(u.trigger(n.Events.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:r}),c>0&&s>u.config.fpsDroppedMonitoringThreshold*l){var d=u.currentLevel;i.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+d),d>0&&(-1===u.autoLevelCapping||u.autoLevelCapping>=d)&&(d-=1,u.trigger(n.Events.FPS_DROP_LEVEL_CAPPING,{level:d,droppedLevel:u.currentLevel}),u.autoLevelCapping=d,this.streamController.nextLevelSwitch())}}this.lastTime=o,this.lastDroppedFrames=r,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,r){"use strict";r.r(t),r.d(t,"findFragmentByPDT",(function(){return o})),r.d(t,"findFragmentByPTS",(function(){return a})),r.d(t,"fragmentWithinToleranceTest",(function(){return s})),r.d(t,"pdtWithinToleranceTest",(function(){return l})),r.d(t,"findFragWithCC",(function(){return c}));var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! ../utils/binary-search */"./src/utils/binary-search.ts");function o(e,t,r){if(null===t||!Array.isArray(e)||!e.length||!Object(n.isFiniteNumber)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;r=r||0;for(var i=0;i<e.length;++i){var o=e[i];if(l(t,r,o))return o}return null}function a(e,t,r,n){void 0===r&&(r=0),void 0===n&&(n=0);var o=null;if(e?o=t[e.sn-t[0].sn+1]||null:0===r&&0===t[0].start&&(o=t[0]),o&&0===s(r,n,o))return o;var a=i.default.search(t,s.bind(null,r,n));return a||o}function s(e,t,r){void 0===e&&(e=0),void 0===t&&(t=0);var n=Math.min(t,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.start+r.duration-n<=e?1:r.start-n>e&&r.start?-1:0}function l(e,t,r){var n=1e3*Math.min(t,r.duration+(r.deltaPTS?r.deltaPTS:0));return(r.endProgramDateTime||0)-n>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,r){"use strict";r.r(t),r.d(t,"FragmentState",(function(){return n})),r.d(t,"FragmentTracker",(function(){return a}));var n,i=r(/*! ../events */"./src/events.ts"),o=r(/*! ../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"}(n||(n={}));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 r=this.activeFragment,n=this.activeParts;if(!r)return null;if(n)for(var i=n.length;i--;){var a=n[i],s=a?a.end:r.appendedPTS;if(a.start<=e&&void 0!==s&&e<=s)return i>9&&(this.activeParts=n.slice(i-9)),a}else if(r.start<=e&&void 0!==r.appendedPTS&&e<=r.appendedPTS)return r}return this.getBufferedFrag(e,t)},t.getBufferedFrag=function(e,t){for(var r=this.fragments,n=Object.keys(r),i=n.length;i--;){var o=r[n[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,r){var n=this;Object.keys(this.fragments).forEach((function(i){var o=n.fragments[i];if(o)if(o.buffered){var a=o.range[e];a&&a.time.some((function(e){var r=!n.isTimeBuffered(e.startPTS,e.endPTS,t);return r&&n.removeFragment(o.body),r}))}else o.body.type===r&&n.removeFragment(o.body)}))},t.detectPartialFragments=function(e){var t=this,r=this.timeRanges,n=e.frag,i=e.part;if(r&&"initSegment"!==n.sn){var o=l(n),a=this.fragments[o];a&&(Object.keys(r).forEach((function(e){var o=n.elementaryStreams[e];if(o){var s=r[e],l=null!==i||!0===o.partial;a.range[e]=t.getBufferedTimes(n,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),r=this.fragments[t];r&&(r.backtrack=r.loaded=null,r.buffered=!0)},t.getBufferedTimes=function(e,t,r,n){for(var i={time:[],partial:r},o=t?t.start:e.start,a=t?t.end:e.end,s=e.minEndPTS||a,l=e.maxStartPTS||o,c=0;c<n.length;c++){var u=n.start(c)-this.bufferPadding,d=n.end(c)+this.bufferPadding;if(l>=u&&s<=d){i.time.push({startPTS:Math.max(o,n.start(c)),endPTS:Math.min(a,n.end(c))});break}if(o<d&&a>u)i.partial=!0,i.time.push({startPTS:Math.max(o,n.start(c)),endPTS:Math.min(a,n.end(c))});else if(a<=u)break}return i},t.getPartialFragment=function(e){var t,r,n,i=null,o=0,a=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach((function(c){var u=l[c];u&&s(u)&&(r=u.body.start-a,n=u.body.end+a,e>=r&&e<=n&&(t=Math.min(e-r,n-e),o<=t&&(i=u.body,o=t)))})),i},t.getState=function(e){var t=l(e),r=this.fragments[t];return r?r.buffered?s(r)?n.PARTIAL:n.OK:r.backtrack?n.BACKTRACKED:n.APPENDING:n.NOT_LOADED},t.backtrack=function(e,t){var r=l(e),n=this.fragments[r];if(!n||n.backtrack)return null;var i=n.backtrack=t||n.loaded;return n.loaded=null,i},t.getBacktrackData=function(e){var t=l(e),r=this.fragments[t];if(r){var n,i=r.backtrack;if(null!=i&&null!==(n=i.payload)&&void 0!==n&&n.byteLength)return i;this.removeFragment(e)}return null},t.isTimeBuffered=function(e,t,r){for(var n,i,o=0;o<r.length;o++){if(n=r.start(o)-this.bufferPadding,i=r.end(o)+this.bufferPadding,e>=n&&t<=i)return!0;if(t<=n)return!1}return!1},t.onFragLoaded=function(e,t){var r=t.frag,n=t.part;if("initSegment"!==r.sn&&!r.bitrateTest&&!n){var i=l(r);this.fragments[i]={body:r,loaded:t,backtrack:null,buffered:!1,range:Object.create(null)}}},t.onBufferAppended=function(e,t){var r=this,n=t.frag,i=t.part,a=t.timeRanges;if(n.type===o.PlaylistLevelType.MAIN)if(this.activeFragment=n,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(r.detectEvictedFragments(e,t),!i)for(var o=0;o<t.length;o++)n.appendedPTS=Math.max(t.end(o),n.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,r){var n=this;Object.keys(this.fragments).forEach((function(i){var o=n.fragments[i];if(o&&o.buffered){var a=o.body;a.type===r&&a.start<t&&a.end>e&&n.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,r;return e.buffered&&((null===(t=e.range.video)||void 0===t?void 0:t.partial)||(null===(r=e.range.audio)||void 0===r?void 0:r.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,r){"use strict";r.r(t),r.d(t,"STALL_MINIMUM_DURATION_MS",(function(){return s})),r.d(t,"MAX_START_GAP_JUMP",(function(){return l})),r.d(t,"SKIP_BUFFER_HOLE_STEP_SECONDS",(function(){return c})),r.d(t,"SKIP_BUFFER_RANGE_START",(function(){return u})),r.d(t,"default",(function(){return d}));var n=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),i=r(/*! ../errors */"./src/errors.ts"),o=r(/*! ../events */"./src/events.ts"),a=r(/*! ../utils/logger */"./src/utils/logger.ts"),s=250,l=2,c=.1,u=.05,d=function(){function e(e,t,r,n){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=r,this.hls=n}var t=e.prototype;return t.destroy=function(){this.hls=this.fragmentTracker=this.media=null},t.poll=function(e){var t=this.config,r=this.media,i=this.stalled,o=r.currentTime,c=r.seeking,u=this.seeking&&!c,d=!this.seeking&&c;if(this.seeking=c,o===e){if((d||u)&&(this.stalled=null),!r.paused&&!r.ended&&0!==r.playbackRate&&n.BufferHelper.getBuffered(r).length){var f=n.BufferHelper.bufferInfo(r,o,0),h=f.len>0,p=f.nextStart||0;if(h||p){if(c){var m=f.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,b=Math.max(p,f.start||0)-o,y=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,x=(null==y||null===(v=y.details)||void 0===v?void 0:v.live)?2*y.details.targetduration:l;if(b>0&&b<=x)return void this._trySkipBufferHole(null)}var w=self.performance.now();if(null!==i){var E=w-i;!c&&E>=s&&this._reportStall(f.len);var S=n.BufferHelper.bufferInfo(r,o,t.maxBufferHole);this._tryFixBufferStall(S,E)}else this.stalled=w}}}else if(this.moved=!0,null!==i){if(this.stallReported){var _=self.performance.now()-i;a.logger.warn("playback not stuck anymore @"+o+", after "+Math.round(_)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},t._tryFixBufferStall=function(e,t){var r=this.config,n=this.fragmentTracker,i=this.media.currentTime,o=n.getPartialFragment(i);o&&this._trySkipBufferHole(o)||e.len>r.maxBufferHole&&t>1e3*r.highBufferWatchdogPeriod&&(a.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},t._reportStall=function(e){var t=this.hls,r=this.media;this.stallReported||(this.stallReported=!0,a.logger.warn("Playback stalling at @"+r.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,r=this.hls,s=this.media,l=s.currentTime,d=0,f=n.BufferHelper.getBuffered(s),h=0;h<f.length;h++){var p=f.start(h);if(l+t.maxBufferHole>=d&&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&&r.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}d=f.end(h)}return 0},t._tryNudgeBuffer=function(){var e=this.config,t=this.hls,r=this.media,n=r.currentTime,s=(this.nudgeRetry||0)+1;if(this.nudgeRetry=s,s<e.nudgeMaxRetry){var l=n+s*e.nudgeOffset;a.logger.warn("Nudging 'currentTime' from "+n+" to "+l),r.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 @"+n+" 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,r){"use strict";r.r(t);var n=r(/*! ../events */"./src/events.ts"),i=r(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.ts"),o=r(/*! ../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(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(n.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(n.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},t._unregisterListeners=function(){var e=this.hls;e.off(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(n.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(n.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 r=e[t];if("metadata"===r.kind&&"id3"===r.label)return Object(i.sendAddTrackEvent)(r,this.media),r}return this.media.addTextTrack("metadata","id3")}},t.onFragParsingMetadata=function(e,t){if(this.media){var r=t.frag,n=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<n.length;a++){var s=o.getID3Frames(n[a].data);if(s){var l=n[a].pts,c=a<n.length-1?n[a+1].pts:r.end;c-l<=0&&(c=l+.25);for(var u=0;u<s.length;u++){var d=s[u];if(!o.isTimeStampFrame(d)){var f=new i(l,c,"");f.value=d,this.id3Track.addCue(f)}}}}}},t.onBufferFlushing=function(e,t){var r=t.startOffset,n=t.endOffset,o=t.type;if(!o||"audio"===o){var a=this.id3Track;a&&Object(i.removeCuesInRange)(a,r,n)}},e}();t.default=a},"./src/controller/latency-controller.ts":
/*!**********************************************!*\
!*** ./src/controller/latency-controller.ts ***!
\**********************************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return s}));var n=r(/*! ../errors */"./src/errors.ts"),i=r(/*! ../events */"./src/events.ts"),o=r(/*! ../utils/logger */"./src/utils/logger.ts");function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}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,r,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 r=t.details;this.levelDetails=r,r.advanced&&this.timeupdate(),!r.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},l.onError=function(e,t){t.details===n.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 r=this.computeLatency();if(null!==r){this._latency=r;var n=this.config,i=n.lowLatencyMode,o=n.maxLiveSyncPlaybackRate;if(i&&1!==o){var a=this.targetLatency;if(null!==a){var s=r-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,(r=[{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,r=e.partHoldBack,n=e.targetduration,i=this.config,o=i.liveSyncDuration,a=i.liveSyncDurationCount,s=i.lowLatencyMode,l=this.hls.userConfig,c=s&&r||t;(l.liveSyncDuration||l.liveSyncDurationCount||0===c)&&(c=void 0!==o?o:a*n);var u=n;return c+Math.min(1*this.stallCount,u)}},{key:"liveSyncPosition",get:function(){var e=this.estimateLiveEdge(),t=this.targetLatency,r=this.levelDetails;if(null===e||null===t||null===r)return null;var n=r.edge,i=e-t-this.edgeStalled,o=n-r.totalduration,a=n-(this.config.lowLatencyMode&&r.partTarget||r.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 r=e.buffered.length;return r?e.buffered.end(r-1):t.edge-this.currentTime}}])&&a(t.prototype,r),s&&a(t,s),e}()},"./src/controller/level-controller.ts":
/*!********************************************!*\
!*** ./src/controller/level-controller.ts ***!
\********************************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return p}));var n=r(/*! ../types/level */"./src/types/level.ts"),i=r(/*! ../events */"./src/events.ts"),o=r(/*! ../errors */"./src/errors.ts"),a=r(/*! ../utils/codecs */"./src/utils/codecs.ts"),s=r(/*! ./level-helper */"./src/controller/level-helper.ts"),l=r(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),c=r(/*! ../types/loader */"./src/types/loader.ts");function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),p=function(e){var t,r;function l(t){var r;return(r=e.call(this,t,"[level-controller]")||this)._levels=[],r._firstLevel=-1,r._startLevel=void 0,r.currentLevelIndex=-1,r.manualLevelIndex=-1,r.onParsedComplete=void 0,r._registerListeners(),r}r=e,(t=l).prototype=Object.create(r.prototype),t.prototype.constructor=t,f(t,r);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 r,l,c=[],u=[],d=[],f={},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,h&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec=void 0);var r=e.bitrate+"-"+e.attrs.RESOLUTION+"-"+e.attrs.CODECS;(l=f[r])?l.url.push(e.url):(l=new n.Level(e),f[r]=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,r=e.width,n=e.height;return!!t||!(!r||!n)}))),c=c.filter((function(e){var t=e.audioCodec,r=e.videoCodec;return(!t||Object(a.isCodecSupportedInMp4)(t,"audio"))&&(!r||Object(a.isCodecSupportedInMp4)(r,"video"))})),t.audioTracks&&(u=t.audioTracks.filter((function(e){return!e.audioCodec||Object(a.isCodecSupportedInMp4)(e.audioCodec,"audio")})),Object(s.assignTrackIdsByGroup)(u)),t.subtitles&&(d=t.subtitles,Object(s.assignTrackIdsByGroup)(d)),c.length>0){r=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===r){this._firstLevel=v,this.log("manifest loaded, "+c.length+" level(s) found, first bitrate: "+r);break}var b=g&&!m,y={levels:c,audioTracks:u,subtitleTracks:d,firstLevel:this._firstLevel,stats:t.stats,audio:g,video:m,altAudio:!b&&u.some((function(e){return!!e.url}))};this.hls.trigger(i.Events.MANIFEST_PARSED,y),(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,r){if(e.prototype.onError.call(this,t,r),!r.fatal){var n=r.context,i=this._levels[this.currentLevelIndex];if(n&&(n.type===c.PlaylistContextType.AUDIO_TRACK&&i.audioGroupIds&&n.groupId===i.audioGroupIds[i.urlId]||n.type===c.PlaylistContextType.SUBTITLE_TRACK&&i.textGroupIds&&n.groupId===i.textGroupIds[i.urlId]))this.redundantFailover(this.currentLevelIndex);else{var a,s=!1,l=!0;switch(r.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(r.frag){var u=this._levels[r.frag.level];u?(u.fragmentError++,u.fragmentError>this.hls.config.fragLoadingMaxRetry&&(a=r.frag.level)):a=r.frag.level}break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:n&&(n.deliveryDirectives&&(l=!1),a=n.level),s=!0;break;case o.ErrorDetails.REMUX_ALLOC_ERROR:a=r.level,s=!0}void 0!==a&&this.recoverLevel(r,a,s,l)}}},v.recoverLevel=function(e,t,r,n){var i=e.details,o=this._levels[t];if(o.loadError++,r){if(!this.retryLoadingOrFail(e))return void(this.currentLevelIndex=-1);e.levelRetry=!0}if(n){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],r=t.url.length;if(r>1){var n=(t.urlId+1)%r;this.warn("Switching to redundant URL-id "+n),this._levels.forEach((function(e){e.urlId=n})),this.level=e}},v.onFragLoaded=function(e,t){var r=t.frag;if(void 0!==r&&r.type===c.PlaylistLevelType.MAIN){var n=this._levels[r.level];void 0!==n&&(n.fragmentError=0,n.loadError=0)}},v.onLevelLoaded=function(e,t){var r,n,i=t.level,o=t.details,a=this._levels[i];if(!a)return this.warn("Invalid level index "+i),void(null!==(n=t.deliveryDirectives)&&void 0!==n&&n.skip&&(o.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===a.fragmentError&&(a.loadError=0,this.retryCount=0),this.playlistLoaded(i,t,a.details)):null!==(r=t.deliveryDirectives)&&void 0!==r&&r.skip&&(o.deltaUpdateFailed=!0)},v.onAudioTrackSwitched=function(e,t){var r=this.hls.levels[this.currentLevelIndex];if(r&&r.audioGroupIds){for(var n=-1,i=this.hls.audioTracks[t.id].groupId,o=0;o<r.audioGroupIds.length;o++)if(r.audioGroupIds[o]===i){n=o;break}n!==r.urlId&&(r.urlId=n,this.startLoad())}},v.loadPlaylist=function(e){var t=this.currentLevelIndex,r=this._levels[t];if(this.canLoad&&r&&r.url.length>0){var n=r.urlId,o=r.url[n];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 "+n+" "+o),this.clearTimer(),this.hls.trigger(i.Events.LEVEL_LOADING,{url:o,level:t,id:n,deliveryDirectives:e||null})}},v.removeLevel=function(e,t){var r=function(e,r){return r!==t},n=this._levels.filter((function(n,i){return i!==e||n.url.length>1&&void 0!==t&&(n.url=n.url.filter(r),n.audioGroupIds&&(n.audioGroupIds=n.audioGroupIds.filter(r)),n.textGroupIds&&(n.textGroupIds=n.textGroupIds.filter(r)),n.urlId=0,!0)})).map((function(e,t){var r=e.details;return null!=r&&r.fragments&&r.fragments.forEach((function(e){e.level=t})),e}));this._levels=n,this.hls.trigger(i.Events.LEVELS_UPDATED,{levels:n})},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,r=this._levels;if(0!==r.length&&(this.currentLevelIndex!==e||null===(t=r[e])||void 0===t||!t.details)){if(e<0||e>=r.length){var n=e<0;if(this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:n,reason:"invalid level idx"}),n)return;e=Math.min(e,r.length-1)}this.clearTimer();var a=this.currentLevelIndex,s=r[a],l=r[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 d=l.details;if(!d||d.live){var f=this.switchParams(l.uri,null==s?void 0:s.details);this.loadPlaylist(f)}}}},{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)}}])&&d(p.prototype,m),g&&d(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,r){"use strict";r.r(t),r.d(t,"addGroupId",(function(){return o})),r.d(t,"assignTrackIdsByGroup",(function(){return a})),r.d(t,"updatePTS",(function(){return s})),r.d(t,"updateFragPTSDTS",(function(){return c})),r.d(t,"mergeDetails",(function(){return u})),r.d(t,"mapPartIntersection",(function(){return d})),r.d(t,"mapFragmentIntersection",(function(){return f})),r.d(t,"adjustSliding",(function(){return h})),r.d(t,"addSliding",(function(){return p})),r.d(t,"computeReloadInterval",(function(){return m})),r.d(t,"getFragmentWithSN",(function(){return g})),r.d(t,"getPartWith",(function(){return v}));var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! ../utils/logger */"./src/utils/logger.ts");function o(e,t,r){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(r);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(r)}}function a(e){var t={};e.forEach((function(e){var r=e.groupId||"";e.id=t[r]=t[r]||0,t[r]++}))}function s(e,t,r){l(e[t],e[r])}function l(e,t){var r=t.startPTS;if(Object(n.isFiniteNumber)(r)){var i,o=0;t.sn>e.sn?(o=r-e.start,i=e):(o=e.start-r,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,r,o,a,s){o-r<=0&&(i.logger.warn("Fragment should have a positive duration",t),o=r+t.duration,s=a+t.duration);var c=r,u=o,d=t.startPTS,f=t.endPTS;if(Object(n.isFiniteNumber)(d)){var h=Math.abs(d-r);Object(n.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(h,t.deltaPTS):t.deltaPTS=h,c=Math.max(r,d),r=Math.min(r,d),a=Math.min(a,t.startDTS),u=Math.min(o,f),o=Math.max(o,f),s=Math.max(s,t.endDTS)}t.duration=o-r;var p=r-t.start;t.appendedPTS=o,t.start=t.startPTS=r,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,b=e.fragments;for(b[v]=t,m=v;m>0;m--)l(b[m],b[m-1]);for(m=v;m<b.length-1;m++)l(b[m],b[m+1]);return e.fragmentHint&&l(b[b.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,p}function u(e,t){for(var r=null,o=e.fragments,a=o.length-1;a>=0;a--){var s=o[a].initSegment;if(s){r=s;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;var l,u=0;if(f(e,t,(function(e,i){e.relurl&&(u=e.cc-i.cc),Object(n.isFiniteNumber)(e.startPTS)&&Object(n.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,r=e.initSegment)})),r&&(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((function(e){var t;e.initSegment&&e.initSegment.relurl!==(null===(t=r)||void 0===t?void 0:t.relurl)||(e.initSegment=r)})),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),d(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):h(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 b=t.edge;t.driftStart||(t.driftStartTime=v,t.driftStart=b),t.driftEndTime=v,t.driftEnd=b}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime}function d(e,t,r){if(e&&t)for(var n=0,i=0,o=e.length;i<=o;i++){var a=e[i],s=t[i+n];a&&s&&a.index===s.index&&a.fragment.sn===s.fragment.sn?r(a,s):n--}}function f(e,t,r){for(var n=t.skippedSegments,i=Math.max(e.startSN,t.startSN)-t.startSN,o=(e.fragmentHint?1:0)+(n?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],d=s[c];n&&!d&&c<n&&(d=t.fragments[c]=u),u&&d&&r(u,d)}}function h(e,t){var r=t.startSN+t.skippedSegments-e.startSN,n=e.fragments;r<0||r>=n.length||p(t,n[r].start)}function p(e,t){if(t){for(var r=e.fragments,n=e.skippedSegments;n<r.length;n++)r[n].start+=t;e.fragmentHint&&(e.fragmentHint.start+=t)}}function m(e,t){var r,n=1e3*e.levelTargetDuration,i=n/2,o=e.age,a=o>0&&o<3*n,s=t.loading.end-t.loading.start,l=e.availabilityDelay;if(!1===e.updated)if(a){var c=333*e.misses;r=Math.max(Math.min(i,2*s),c),e.availabilityDelay=(e.availabilityDelay||0)+r}else r=i;else a?(l=Math.min(l||n/2,o),e.availabilityDelay=l,r=l+n-o):r=n-s;return Math.round(r)}function g(e,t,r){if(!e||!e.details)return null;var n=e.details,i=n.fragments[t-n.startSN];return i||((i=n.fragmentHint)&&i.sn===t?i:t<n.startSN&&r&&r.sn===t?r:null)}function v(e,t,r){if(!e||!e.details)return null;var n=e.details.partList;if(n)for(var i=n.length;i--;){var o=n[i];if(o.index===r&&o.fragment.sn===t)return o}return null}},"./src/controller/stream-controller.ts":
/*!*********************************************!*\
!*** ./src/controller/stream-controller.ts ***!
\*********************************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return b}));var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),o=r(/*! ../is-supported */"./src/is-supported.ts"),a=r(/*! ../events */"./src/events.ts"),s=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=r(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),c=r(/*! ../types/loader */"./src/types/loader.ts"),u=r(/*! ../loader/fragment */"./src/loader/fragment.ts"),d=r(/*! ../demux/transmuxer-interface */"./src/demux/transmuxer-interface.ts"),f=r(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),h=r(/*! ./gap-controller */"./src/controller/gap-controller.ts"),p=r(/*! ../errors */"./src/errors.ts"),m=r(/*! ../utils/logger */"./src/utils/logger.ts");function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var b=function(e){var t,r;function b(t,r){var n;return(n=e.call(this,t,r,"[stream-controller]")||this).audioCodecSwap=!1,n.gapController=null,n.level=-1,n._forceStartLoad=!1,n.altAudio=!1,n.audioOnly=!1,n.fragPlaying=null,n.onvplaying=null,n.onvseeked=null,n.fragLastKbps=0,n.stalled=!1,n.couldBacktrack=!1,n.audioCodecSwitch=!1,n.videoBuffer=null,n._registerListeners(),n}r=e,(t=b).prototype=Object.create(r.prototype),t.prototype.constructor=t,v(t,r);var y,x,w,E=b.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,r=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var n=r.startLevel;-1===n&&(r.config.testBandwidth?(n=0,this.bitrateTest=!0):n=r.nextAutoLevel),this.level=r.nextLoadLevel=n,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,r=this.level,n=null==t||null===(e=t[r])||void 0===e?void 0:e.details;if(n&&(!n.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(n))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,r=this.hls,n=this.levelLastLoaded,o=this.levels,s=this.media,d=r.config,f=r.nextLoadLevel;if(null!==n&&(s||!this.startFragRequested&&d.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&o&&o[f]){var h=o[f];this.level=r.nextLoadLevel=f;var p=h.details;if(!p||this.state===i.State.WAITING_LEVEL||p.live&&this.levelLastLoaded!==f)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(h.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,b=this.getNextFragment(v,p);if(this.couldBacktrack&&!this.fragPrevious&&b&&"initSegment"!==b.sn){var y=b.sn-p.startSN;y>1&&(b=p.fragments[y-1],this.fragmentTracker.removeFragment(b))}if(b&&this.fragmentTracker.getState(b)===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),b=this.getNextFragment(this.nextLoadPosition,p)}b&&(!b.initSegment||b.initSegment.data||this.bitrateTest||(b=b.initSegment),"identity"!==(null===(e=b.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=b.decryptdata)&&void 0!==t&&t.key?this.loadFragment(b,p,v):this.loadKey(b,p))}}}},E.loadFragment=function(t,r,n){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,r,n)):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 r,n=this.getAppendedFrag(t.currentTime);if(n&&n.start>1&&this.flushMainBuffer(0,n.start-1),!t.paused&&e){var i=e[this.hls.nextLoadLevel],o=this.fragLastKbps;r=o&&this.fragCurrent?this.fragCurrent.duration*i.maxBitrate/(1e3*o)+1:0}else r=0;var a=this.getBufferedFrag(t.currentTime+r);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,r){e.prototype.flushMainBuffer.call(this,t,r,this.altAudio?"video":null)},E.onMediaAttached=function(t,r){e.prototype.onMediaAttached.call(this,t,r);var n=r.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),n.addEventListener("playing",this.onvplaying),n.addEventListener("seeked",this.onvseeked),this.gapController=new h.default(this.config,n,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(n.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 r,n=!1,i=!1;t.levels.forEach((function(e){(r=e.audioCodec)&&(-1!==r.indexOf("mp4a.40.2")&&(n=!0),-1!==r.indexOf("mp4a.40.5")&&(i=!0))})),this.audioCodecSwitch=n&&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 r=this.levels;if(r&&this.state===i.State.IDLE){var n=r[t.level];(!n.details||n.details.live&&this.levelLastLoaded!==t.level||this.waitForCdnTuneIn(n.details))&&(this.state=i.State.WAITING_LEVEL)}},E.onLevelLoaded=function(e,t){var r,n=this.levels,o=t.level,s=t.details,l=s.totalduration;if(n){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=n[o],d=0;if(s.live||null!==(r=u.details)&&void 0!==r&&r.live){if(s.fragments[0]||(s.deltaUpdateFailed=!0),s.deltaUpdateFailed)return;d=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,d),this.tick()}else this.warn("Levels were reset while loading level "+o)},E._handleFragmentLoadProgress=function(e){var t,r=e.frag,n=e.part,i=e.payload,o=this.levels;if(o){var a=o[r.level],s=a.details;if(s){var l=a.videoCodec,u=s.PTSKnown||!s.live,h=null===(t=r.initSegment)||void 0===t?void 0:t.data,p=this._getAudioCodec(a),m=this.transmuxer=this.transmuxer||new d.default(this.hls,c.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),g=n?n.index:-1,v=-1!==g,b=new f.ChunkMetadata(r.level,r.sn,r.stats.chunkCount,i.byteLength,g,v),y=this.initPTS[r.cc];m.push(i,h,p,l,r,n,s.totalduration,u,b,y)}else this.warn("Dropping fragment "+r.sn+" of level "+r.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+r.sn+" of level "+r.level+" will not be buffered")},E.onAudioTrackSwitching=function(e,t){var r=this.altAudio,n=!!t.url,i=t.id;if(!n){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;r&&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 r=t.id,n=!!this.hls.audioTracks[r].url;if(n){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=n,this.tick()},E.onBufferCreated=function(e,t){var r,n,i=t.tracks,o=!1;for(var a in i){var s=i[a];if("main"===s.id){if(n=a,r=s,"video"===a){var l=i[a];l&&(this.videoBuffer=l.buffer)}}else o=!0}o&&r?(this.log("Alternate track found, use "+n+".buffered to schedule main fragment loading"),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media},E.onFragBuffered=function(e,t){var r=t.frag,n=t.part;if(!r||r.type===c.PlaylistLevelType.MAIN){if(this.fragContextChanged(r))return this.warn("Fragment "+r.sn+(n?" p: "+n.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===i.State.PARSED&&(this.state=i.State.IDLE));var o=n?n.stats:r.stats;this.fragLastKbps=Math.round(8*o.total/(o.buffering.end-o.loading.first)),"initSegment"!==r.sn&&(this.fragPrevious=r),this.fragBufferedComplete(r,n)}},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 r=!0,n=this.getFwdBufferInfo(this.media,c.PlaylistLevelType.MAIN);n&&n.len>.5&&(r=!this.reduceMaxBufferLength(n.len)),r&&(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 r=s.BufferHelper.getBuffered(e);!this.loadedmetadata&&r.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 r=t.type;if(r!==u.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var n=(r===u.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(n,r,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,r=this.startPosition;if(r>=0&&t<r){if(e.seeking)return void m.logger.log("could not seek to "+r+", already seeking at "+t);var n=s.BufferHelper.getBuffered(e),i=(n.length?n.start(0):0)-r;i>0&&(i<this.config.maxBufferHole||i<this.config.maxFragLookUpTolerance)&&(m.logger.log("adjusting start position by "+i+" to match buffer start"),r+=i,this.startPosition=r),this.log("seek to target start position "+r+" from current time "+t),e.currentTime=r}},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(r){var n=t.hls;if(r&&!n.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(),n.trigger(a.Events.FRAG_LOADED,r)}}))},E._handleTransmuxComplete=function(e){var t,r="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 d=c.frag,f=c.part,h=c.level,p=s.video,m=s.text,g=s.id3,v=s.initSegment,b=this.altAudio?void 0:s.audio;if(!this.fragContextChanged(d)){if(this.state=i.State.PARSING,v){v.tracks&&(this._bufferInitSegment(h,v.tracks,d,l),o.trigger(a.Events.FRAG_PARSING_INIT_SEGMENT,{frag:d,id:r,tracks:v.tracks}));var y=v.initPTS,x=v.timescale;Object(n.isFiniteNumber)(y)&&(this.initPTS[d.cc]=y,o.trigger(a.Events.INIT_PTS_FOUND,{frag:d,id:r,initPTS:y,timescale:x}))}if(p&&!1!==s.independent){if(h.details){var w=p.startPTS,E=p.endPTS,S=p.startDTS,_=p.endDTS;if(f)f.elementaryStreams[p.type]={startPTS:w,endPTS:E,startDTS:S,endDTS:_};else if(p.firstKeyFrame&&p.independent&&(this.couldBacktrack=!0),p.dropped&&p.independent){if(this.getLoadPosition()+this.config.maxBufferHole<w)return void this.backtrack(d);d.setElementaryStreamInfo(p.type,d.start,E,d.start,_,!0)}d.setElementaryStreamInfo(p.type,w,E,S,_),this.bufferFragmentData(p,d,f,l)}}else if(!1===s.independent)return void this.backtrack(d);if(b){var T=b.startPTS,k=b.endPTS,O=b.startDTS,C=b.endDTS;f&&(f.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:T,endPTS:k,startDTS:O,endDTS:C}),d.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,T,k,O,C),this.bufferFragmentData(b,d,f,l)}if(null!=g&&null!==(t=g.samples)&&void 0!==t&&t.length){var A={frag:d,id:r,samples:g.samples};o.trigger(a.Events.FRAG_PARSING_METADATA,A)}if(m){var D={frag:d,id:r,samples:m.samples};o.trigger(a.Events.FRAG_PARSING_USERDATA,D)}}},E._bufferInitSegment=function(e,t,r,n){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,d=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(u&&(u=-1!==u.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),1!==s.metadata.channelCount&&-1===d.indexOf("firefox")&&(u="mp4a.40.5")),-1!==d.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:r,part:null,chunkMeta:n,parent:r.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 r=e.currentTime;if(s.BufferHelper.isBuffered(e,r)?t=this.getAppendedFrag(r):s.BufferHelper.isBuffered(e,r+.1)&&(t=this.getAppendedFrag(r+.1)),t){var n=this.fragPlaying,i=t.level;n&&t.sn===n.sn&&n.level===i&&t.urlId===n.urlId||(this.hls.trigger(a.Events.FRAG_CHANGED,{frag:t}),n&&n.level===i||this.hls.trigger(a.Events.LEVEL_SWITCHED,{level:i}),this.fragPlaying=t)}}},y=b,(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(y.prototype,x),w&&g(y,w),b}(i.default)},"./src/controller/subtitle-stream-controller.ts":
/*!******************************************************!*\
!*** ./src/controller/subtitle-stream-controller.ts ***!
\******************************************************/
/*! exports provided: SubtitleStreamController */function(e,t,r){"use strict";r.r(t),r.d(t,"SubtitleStreamController",(function(){return m}));var n=r(/*! ../events */"./src/events.ts"),i=r(/*! ../utils/logger */"./src/utils/logger.ts"),o=r(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),a=r(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),s=r(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),l=r(/*! ./level-helper */"./src/controller/level-helper.ts"),c=r(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),u=r(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),d=r(/*! ../types/loader */"./src/types/loader.ts"),f=r(/*! ../types/level */"./src/types/level.ts");function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=function(e){var t,r;function m(t,r){var n;return(n=e.call(this,t,r,"[subtitle-stream-controller]")||this).levels=[],n.currentTrackId=-1,n.tracksBuffered=[],n.mainDetails=null,n._registerListeners(),n}r=e,(t=m).prototype=Object.create(r.prototype),t.prototype.constructor=t,p(t,r);var g,v,b,y=m.prototype;return y.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},y._registerListeners=function(){var e=this.hls;e.on(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(n.Events.ERROR,this.onError,this),e.on(n.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(n.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(n.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(n.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(n.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y._unregisterListeners=function(){var e=this.hls;e.off(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(n.Events.ERROR,this.onError,this),e.off(n.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(n.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(n.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(n.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(n.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y.startLoad=function(){this.stopLoad(),this.state=u.State.IDLE,this.setInterval(500),this.tick()},y.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},y.onLevelLoaded=function(e,t){this.mainDetails=t.details},y.onSubtitleFragProcessed=function(e,t){var r=t.frag,n=t.success;if(this.fragPrevious=r,this.state=u.State.IDLE,n){var i=this.tracksBuffered[this.currentTrackId];if(i){for(var o,a=r.start,s=0;s<i.length;s++)if(a>=i[s].start&&a<=i[s].end){o=i[s];break}var l=r.start+r.duration;o?o.end=l:(o={start:a,end:l},i.push(o)),this.fragmentTracker.fragBuffered(r)}}},y.onBufferFlushing=function(e,t){var r=t.startOffset,n=t.endOffset;if(0===r&&n!==Number.POSITIVE_INFINITY){var i=this.currentTrackId,o=this.levels;if(!o.length||!o[i]||!o[i].details)return;var a=n-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(r,a,d.PlaylistLevelType.SUBTITLE)}},y.onError=function(e,t){var r,n=t.frag;n&&n.type===d.PlaylistLevelType.SUBTITLE&&(null!==(r=this.fragCurrent)&&void 0!==r&&r.loader&&this.fragCurrent.loader.abort(),this.state=u.State.IDLE)},y.onSubtitleTracksUpdated=function(e,t){var r=this,n=t.subtitleTracks;this.tracksBuffered=[],this.levels=n.map((function(e){return new f.Level(e)})),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach((function(e){r.tracksBuffered[e.id]=[]})),this.mediaBuffer=null},y.onSubtitleTrackSwitch=function(e,t){if(this.currentTrackId=t.id,this.levels.length&&-1!==this.currentTrackId){var r=this.levels[this.currentTrackId];null!=r&&r.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,r&&this.setInterval(500)}else this.clearInterval()},y.onSubtitleTrackLoaded=function(e,t){var r,n=t.details,i=t.id,o=this.currentTrackId,c=this.levels;if(c.length){var d=c[o];if(!(i>=c.length||i!==o)&&d){if(this.mediaBuffer=this.mediaBufferTimeRanges,n.live||null!==(r=d.details)&&void 0!==r&&r.live){var f=this.mainDetails;if(n.deltaUpdateFailed||!f)return;var h=f.fragments[0];d.details?0===this.alignPlaylists(n,d.details)&&h&&Object(l.addSliding)(n,h.start):n.hasProgramDateTime&&f.hasProgramDateTime?Object(s.alignMediaPlaylistByPDT)(n,f):h&&Object(l.addSliding)(n,h.start)}d.details=n,this.levelLastLoaded=i,this.tick(),n.live&&!this.fragCurrent&&this.media&&this.state===u.State.IDLE&&(Object(a.findFragmentByPTS)(null,n.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),d.details=void 0))}}},y._handleFragmentLoadComplete=function(e){var t=e.frag,r=e.payload,i=t.decryptdata,o=this.hls;if(!this.fragContextChanged(t)&&r&&r.byteLength>0&&i&&i.key&&i.iv&&"AES-128"===i.method){var a=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(r),i.key.buffer,i.iv.buffer).then((function(e){var r=performance.now();o.trigger(n.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:a,tdecrypt:r}})}))}},y.doTick=function(){if(this.media){if(this.state===u.State.IDLE){var e,t=this.currentTrackId,r=this.levels;if(!r.length||!r[t]||!r[t].details)return;var s=r[t].details,l=s.targetduration,d=this.config,f=this.media,h=o.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,f.currentTime-l,d.maxBufferHole),p=h.end;if(h.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,b=s.edge,y=this.fragPrevious;if(p<b){var x=d.maxFragLookUpTolerance;y&&s.hasProgramDateTime&&(m=Object(a.findFragmentByPDT)(g,y.endProgramDateTime,x)),m||!(m=Object(a.findFragmentByPTS)(y,g,p,x))&&y&&y.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(n.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},y.loadFragment=function(t,r,n){this.fragCurrent=t,e.prototype.loadFragment.call(this,t,r,n)},g=m,(v=[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}])&&h(g.prototype,v),b&&h(g,b),m}(u.default)},"./src/controller/subtitle-track-controller.ts":
/*!*****************************************************!*\
!*** ./src/controller/subtitle-track-controller.ts ***!
\*****************************************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t);var n=r(/*! ../events */"./src/events.ts"),i=r(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.ts"),o=r(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),a=r(/*! ../types/loader */"./src/types/loader.ts");function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){var t,r;function o(t){var r;return(r=e.call(this,t,"[subtitle-track-controller]")||this).media=null,r.tracks=[],r.groupId=null,r.tracksInGroup=[],r.trackId=-1,r.selectDefaultTrack=!0,r.queuedDefaultTrack=-1,r.trackChangeListener=function(){return r.onTextTracksChanged()},r.asyncPollTrackChange=function(){return r.pollTrackChange(0)},r.useTextTrackPolling=!1,r.subtitlePollingInterval=-1,r.subtitleDisplay=!0,r.registerListeners(),r}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,l(t,r);var c,d,f,h=o.prototype;return h.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,e.prototype.destroy.call(this)},h.registerListeners=function(){var e=this.hls;e.on(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(n.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(n.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(n.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(n.Events.ERROR,this.onError,this)},h.unregisterListeners=function(){var e=this.hls;e.off(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(n.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(n.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(n.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(n.Events.ERROR,this.onError,this)},h.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))},h.pollTrackChange=function(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)},h.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)},h.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},h.onManifestParsed=function(e,t){this.tracks=t.subtitleTracks},h.onSubtitleTrackLoaded=function(e,t){var r=t.id,n=t.details,i=this.trackId,o=this.tracksInGroup[i];if(o){var a=o.details;o.details=t.details,this.log("subtitle track "+r+" loaded ["+n.startSN+"-"+n.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,t,a))}else this.warn("Invalid subtitle track id "+r)},h.onLevelLoading=function(e,t){this.switchLevel(t.level)},h.onLevelSwitching=function(e,t){this.switchLevel(t.level)},h.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.textGroupIds){var r=t.textGroupIds[t.urlId];if(this.groupId!==r){var i=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,o=this.tracks.filter((function(e){return!r||e.groupId===r}));this.tracksInGroup=o;var a=this.findTrackId(null==i?void 0:i.name)||this.findTrackId();this.groupId=r;var s={subtitleTracks:o};this.log("Updating subtitle tracks, "+o.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(n.Events.SUBTITLE_TRACKS_UPDATED,s),-1!==a&&this.setSubtitleTrack(a,i)}}},h.findTrackId=function(e){for(var t=this.tracksInGroup,r=0;r<t.length;r++){var n=t[r];if((!this.selectDefaultTrack||n.default)&&(!e||e===n.name))return n.id}return-1},h.onError=function(t,r){e.prototype.onError.call(this,t,r),!r.fatal&&r.context&&r.context.type===a.PlaylistContextType.SUBTITLE_TRACK&&r.context.id===this.trackId&&r.context.groupId===this.groupId&&this.retryLoadingOrFail(r)},h.loadPlaylist=function(e){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var r=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 "+r),this.hls.trigger(n.Events.SUBTITLE_TRACK_LOADING,{url:o,id:r,groupId:i,deliveryDirectives:e||null})}},h.toggleTrackModes=function(e){var t=this,r=this.media,n=this.subtitleDisplay,i=this.trackId;if(r){var o=u(r.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=n?"showing":"hidden")}},h.setSubtitleTrack=function(e,t){var r,i=this.tracksInGroup;if(this.media){if(this.trackId!==e&&this.toggleTrackModes(e),!(this.trackId===e&&(-1===e||null!==(r=i[e])&&void 0!==r&&r.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,d=o.url;this.hls.trigger(n.Events.SUBTITLE_TRACK_SWITCH,{id:a,groupId:l,name:c,type:u,url:d});var f=this.switchParams(o.url,null==t?void 0:t.details);this.loadPlaylist(f)}else this.hls.trigger(n.Events.SUBTITLE_TRACK_SWITCH,{id:e})}}else this.queuedDefaultTrack=e},h.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var e=-1,t=u(this.media.textTracks),r=0;r<t.length;r++)if("hidden"===t[r].mode)e=r;else if("showing"===t[r].mode){e=r;break}this.subtitleTrack!==e&&(this.subtitleTrack=e)}},c=o,(d=[{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,d),f&&s(c,f),o}(o.default);function u(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];"subtitles"===n.kind&&n.label&&t.push(e[r])}return t}t.default=c},"./src/controller/timeline-controller.ts":
/*!***********************************************!*\
!*** ./src/controller/timeline-controller.ts ***!
\***********************************************/
/*! exports provided: TimelineController */function(e,t,r){"use strict";r.r(t),r.d(t,"TimelineController",(function(){return f}));var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! ../events */"./src/events.ts"),o=r(/*! ../utils/cea-608-parser */"./src/utils/cea-608-parser.ts"),a=r(/*! ../utils/output-filter */"./src/utils/output-filter.ts"),s=r(/*! ../utils/webvtt-parser */"./src/utils/webvtt-parser.ts"),l=r(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.ts"),c=r(/*! ../utils/imsc1-ttml-parser */"./src/utils/imsc1-ttml-parser.ts"),u=r(/*! ../types/loader */"./src/types/loader.ts"),d=r(/*! ../utils/logger */"./src/utils/logger.ts"),f=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"),r=new a.default(this,"textTrack2"),n=new a.default(this,"textTrack3"),s=new a.default(this,"textTrack4");this.cea608Parser1=new o.default(1,t,r),this.cea608Parser2=new o.default(3,n,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,r,n,o){for(var a,s,l,c,u=!1,d=o.length;d--;){var f=o[d],h=(a=f[0],s=f[1],l=t,c=r,Math.min(s,c)-Math.max(a,l));if(h>=0&&(f[0]=Math.min(f[0],t),f[1]=Math.max(f[1],r),u=!0,h/(r-t)>.5))return}if(u||o.push([t,r]),this.config.renderTextTracksNatively){var p=this.captionsTracks[e];this.Cues.newCue(p,t,r,n)}else{var m=this.Cues.newCue(null,t,r,n);this.hls.trigger(i.Events.CUES_PARSED,{type:"captions",cues:m,track:e})}},t.onInitPtsFound=function(e,t){var r=this,n=t.frag,o=t.id,a=t.initPTS,s=t.timescale,l=this.unparsedVttFrags;"main"===o&&(this.initPTS[n.cc]=a,this.timescale[n.cc]=s),l.length&&(this.unparsedVttFrags=[],l.forEach((function(e){r.onFragLoaded(i.Events.FRAG_LOADED,e)})))},t.getExistingTrack=function(e){var t=this.media;if(t)for(var r=0;r<t.textTracks.length;r++){var n=t.textTracks[r];if(n[e])return n}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,r=this.captionsTracks,n=this.media,i=t[e],o=i.label,a=i.languageCode,s=this.getExistingTrack(e);if(s)r[e]=s,Object(l.clearCurrentCues)(r[e]),Object(l.sendAddTrackEvent)(r[e],n);else{var c=this.createTextTrack("captions",o,a);c&&(c[e]=!0,r[e]=c)}}},t.createNonNativeTrack=function(e){if(!this.nonNativeCaptionsTracks[e]){var t=this.captionsProperties[e];if(t){var r={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=r,this.hls.trigger(i.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[r]})}}},t.createTextTrack=function(e,t,r){var n=this.media;if(n)return n.addTextTrack(e,t,r)},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 r=0;r<t.length;r++)Object(l.clearCurrentCues)(t[r])}},t.onSubtitleTracksUpdated=function(e,t){var r=this;this.textTracks=[];var n=t.subtitleTracks||[],o=n.some((function(e){return e.textCodec===c.IMSC1_CODEC}));if(this.config.enableWebVTT||o&&this.config.enableIMSC1){var a=this.tracks&&n&&this.tracks.length===n.length;if(this.tracks=n||[],this.config.renderTextTracksNatively){var s=this.media?this.media.textTracks:[];this.tracks.forEach((function(e,t){var n;if(t<s.length){for(var i=null,o=0;o<s.length;o++)if(h(s[o],e)){i=s[o];break}i&&(n=i)}n?Object(l.clearCurrentCues)(n):(n=r.createTextTrack("subtitles",e.name,e.lang))&&(n.mode="disabled"),n&&(n.groupId=e.groupId,r.textTracks.push(n))}))}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 r=this;this.config.enableCEA708Captions&&t.captions&&t.captions.forEach((function(e){var t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(t){var n="textTrack"+t[1],i=r.captionsProperties[n];i&&(i.label=e.name,e.lang&&(i.languageCode=e.lang),i.media=e)}}))},t.onFragLoading=function(e,t){var r=this.cea608Parser1,n=this.cea608Parser2,i=this.lastSn,o=this.lastPartIndex;if(this.enabled&&r&&n&&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||(r.reset(),n.reset()),this.lastSn=l,this.lastPartIndex=c}},t.onFragLoaded=function(e,t){var r=t.frag,o=t.payload,a=this.initPTS,s=this.unparsedVttFrags;if(r.type===u.PlaylistLevelType.SUBTITLE)if(o.byteLength){if(!Object(n.isFiniteNumber)(a[r.cc]))return s.push(t),void(a.length&&this.hls.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Missing initial subtitle PTS")}));var l=r.decryptdata;if(null==l||null==l.key||"AES-128"!==l.method){var d=this.tracks[r.level],f=this.vttCCs;f[r.cc]||(f[r.cc]={start:r.start,prevCC:this.prevCC,new:!0},this.prevCC=r.cc),d&&d.textCodec===c.IMSC1_CODEC?this._parseIMSC1(r,o):this._parseVTTs(r,o,f)}}else this.hls.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Empty subtitle payload")})},t._parseIMSC1=function(e,t){var r=this,n=this.hls;Object(c.parseIMSC1)(t,this.initPTS[e.cc],this.timescale[e.cc],(function(t){r._appendCues(t,e.level),n.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(t){d.logger.log("Failed to parse IMSC1: "+t),n.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))},t._parseVTTs=function(e,t,r){var n=this,o=this.hls;Object(s.parseWebVTT)(t,this.initPTS[e.cc],this.timescale[e.cc],r,e.cc,e.start,(function(t){n._appendCues(t,e.level),o.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(r){n._fallbackToIMSC1(e,t),d.logger.log("Failed to parse VTT cue: "+r),o.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:r})}))},t._fallbackToIMSC1=function(e,t){var r=this,n=this.tracks[e.level];n.textCodec||Object(c.parseIMSC1)(t,this.initPTS[e.cc],this.timescale[e.cc],(function(){n.textCodec=c.IMSC1_CODEC,r._parseIMSC1(e,t)}),(function(){n.textCodec="wvtt"}))},t._appendCues=function(e,t){var r=this.hls;if(this.config.renderTextTracksNatively){var n=this.textTracks[t];if("disabled"===n.mode)return;e.forEach((function(e){return Object(l.addCueToTrack)(n,e)}))}else{var o=this.tracks[t].default?"default":"subtitles"+t;r.trigger(i.Events.CUES_PARSED,{type:"subtitles",cues:e,track:o})}},t.onFragDecrypted=function(e,t){var r=t.frag;if(r.type===u.PlaylistLevelType.SUBTITLE){if(!Object(n.isFiniteNumber)(this.initPTS[r.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 r=this.cea608Parser1,n=this.cea608Parser2;if(this.enabled&&r&&n)for(var i=0;i<t.samples.length;i++){var o=t.samples[i].bytes;if(o){var a=this.extractCea608Data(o);r.addData(t.samples[i].pts,a[0]),n.addData(t.samples[i].pts,a[1])}}},t.onBufferFlushing=function(e,t){var r=t.startOffset,n=t.endOffset,i=t.endOffsetSubtitles,o=t.type,a=this.media;if(a&&!(a.currentTime<n)){if(!o||"video"===o){var s=this.captionsTracks;Object.keys(s).forEach((function(e){return Object(l.removeCuesInRange)(s[e],r,n)}))}if(this.config.renderTextTracksNatively&&0===r&&void 0!==i){var c=this.textTracks;Object.keys(c).forEach((function(e){return Object(l.removeCuesInRange)(c[e],r,i)}))}}},t.extractCea608Data=function(e){for(var t=31&e[0],r=2,n=[[],[]],i=0;i<t;i++){var o=e[r++],a=127&e[r++],s=127&e[r++],l=3&o;0===a&&0===s||0!=(4&o)&&(0!==l&&1!==l||(n[l].push(a),n[l].push(s)))}return n},e}();function h(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,r){"use strict";r.r(t),r.d(t,"default",(function(){return n}));var n=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,r){"use strict";r.r(t),r.d(t,"removePadding",(function(){return i})),r.d(t,"default",(function(){return o}));var n=r(/*! ../utils/typed-array */"./src/utils/typed-array.ts");function i(e){var t=e.byteLength,r=t&&new DataView(e.buffer).getUint8(t-1);return r?Object(n.sliceUint8)(e,0,t-r):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),r=new Uint32Array(4),n=0;n<4;n++)r[n]=t.getUint32(4*n);return r},t.initTable=function(){var e=this.sBox,t=this.invSBox,r=this.subMix,n=r[0],i=r[1],o=r[2],a=r[3],s=this.invSubMix,l=s[0],c=s[1],u=s[2],d=s[3],f=new Uint32Array(256),h=0,p=0,m=0;for(m=0;m<256;m++)f[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[h]=g,t[g]=h;var v=f[h],b=f[v],y=f[b],x=257*f[g]^16843008*g;n[h]=x<<24|x>>>8,i[h]=x<<16|x>>>16,o[h]=x<<8|x>>>24,a[h]=x,x=16843009*y^65537*b^257*v^16843008*h,l[g]=x<<24|x>>>8,c[g]=x<<16|x>>>16,u[g]=x<<8|x>>>24,d[g]=x,h?(h=v^f[f[f[y^v]]],p^=f[f[p]]):h=p=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),r=!0,n=0;n<t.length&&r;)r=t[n]===this.key[n],n++;if(!r){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),d=this.invKeySchedule=new Uint32Array(c),f=this.sBox,h=this.rcon,p=this.invSubMix,m=p[0],g=p[1],v=p[2],b=p[3];for(o=0;o<c;o++)o<i?s=u[o]=t[o]:(l=s,o%i==0?(l=f[(l=l<<8|l>>>24)>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l],l^=h[o/i|0]<<24):i>6&&o%i==4&&(l=f[l>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[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],d[a]=a<4||o<=4?l:m[f[l>>>24]]^g[f[l>>>16&255]]^v[f[l>>>8&255]]^b[f[255&l]],d[a]=d[a]>>>0}},t.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},t.decrypt=function(e,t,r){for(var n,i,o,a,s,l,c,u,d,f,h,p,m,g,v=this.keySize+6,b=this.invKeySchedule,y=this.invSBox,x=this.invSubMix,w=x[0],E=x[1],S=x[2],_=x[3],T=this.uint8ArrayToUint32Array_(r),k=T[0],O=T[1],C=T[2],A=T[3],D=new Int32Array(e),L=new Int32Array(D.length),I=this.networkToHostOrderSwap;t<D.length;){for(d=I(D[t]),f=I(D[t+1]),h=I(D[t+2]),p=I(D[t+3]),s=d^b[0],l=p^b[1],c=h^b[2],u=f^b[3],m=4,g=1;g<v;g++)n=w[s>>>24]^E[l>>16&255]^S[c>>8&255]^_[255&u]^b[m],i=w[l>>>24]^E[c>>16&255]^S[u>>8&255]^_[255&s]^b[m+1],o=w[c>>>24]^E[u>>16&255]^S[s>>8&255]^_[255&l]^b[m+2],a=w[u>>>24]^E[s>>16&255]^S[l>>8&255]^_[255&c]^b[m+3],s=n,l=i,c=o,u=a,m+=4;n=y[s>>>24]<<24^y[l>>16&255]<<16^y[c>>8&255]<<8^y[255&u]^b[m],i=y[l>>>24]<<24^y[c>>16&255]<<16^y[u>>8&255]<<8^y[255&s]^b[m+1],o=y[c>>>24]<<24^y[u>>16&255]<<16^y[s>>8&255]<<8^y[255&l]^b[m+2],a=y[u>>>24]<<24^y[s>>16&255]<<16^y[l>>8&255]<<8^y[255&c]^b[m+3],L[t]=I(n^k),L[t+1]=I(a^O),L[t+2]=I(o^C),L[t+3]=I(i^A),k=d,O=f,C=h,A=p,t+=4}return L.buffer},e}()},"./src/crypt/decrypter.ts":
/*!********************************!*\
!*** ./src/crypt/decrypter.ts ***!
\********************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return c}));var n=r(/*! ./aes-crypto */"./src/crypt/aes-crypto.ts"),i=r(/*! ./fast-aes-key */"./src/crypt/fast-aes-key.ts"),o=r(/*! ./aes-decryptor */"./src/crypt/aes-decryptor.ts"),a=r(/*! ../utils/logger */"./src/utils/logger.ts"),s=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=r(/*! ../utils/typed-array */"./src/utils/typed-array.ts"),c=function(){function e(e,t,r){var n=(void 0===r?{}:r).removePKCS7Padding,i=void 0===n||n;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,r,n){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(e),t,r);var i=this.flush();i&&n(i.buffer)}else this.webCryptoDecrypt(new Uint8Array(e),t,r).then(n)},t.softwareDecrypt=function(e,t,r){var n=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;n&&(r=n);var u=this.softwareDecrypter;u||(u=this.softwareDecrypter=new o.default),u.expandKey(t);var d=i;return this.currentResult=u.decrypt(c.buffer,0,r),this.currentIV=Object(l.sliceUint8)(c,-16).buffer,d||null},t.webCryptoDecrypt=function(e,t,r){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 n.default(a,r).decrypt(e.buffer,t):Promise.reject(new Error("web crypto not initialized"))})).catch((function(n){return o.onWebCryptoError(n,e,t,r)}))},t.onWebCryptoError=function(e,t,r,n){return a.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",e),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(t,r,n)},t.getValidChunk=function(e){var t=e,r=e.length-e.length%16;return r!==e.length&&(t=Object(l.sliceUint8)(e,0,r),this.remainderData=Object(l.sliceUint8)(e,r)),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,r){"use strict";r.r(t),r.d(t,"default",(function(){return n}));var n=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,r){"use strict";r.r(t);var n=r(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),i=r(/*! ./adts */"./src/demux/adts.ts"),o=r(/*! ../utils/logger */"./src/utils/logger.ts"),a=r(/*! ../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,r;function n(t,r){var n;return(n=e.call(this)||this).observer=void 0,n.config=void 0,n.observer=t,n.config=r,n}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,s(t,r);var l=n.prototype;return l.resetInitSegment=function(t,r,n){e.prototype.resetInitSegment.call(this,t,r,n),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}},n.probe=function(e){if(!e)return!1;for(var t=(a.getID3Data(e,0)||[]).length,r=e.length;t<r;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,r){i.initTrackConfig(e,this.observer,t,r,e.manifestCodec);var n=i.appendFrame(e,t,r,this.initPTS,this.frameIndex);if(n&&0===n.missing)return n},n}(n.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,r){"use strict";r.r(t),r.d(t,"getAudioConfig",(function(){return a})),r.d(t,"isHeaderPattern",(function(){return s})),r.d(t,"getHeaderLength",(function(){return l})),r.d(t,"getFullFrameLength",(function(){return c})),r.d(t,"canGetFrameLength",(function(){return u})),r.d(t,"isHeader",(function(){return d})),r.d(t,"canParse",(function(){return f})),r.d(t,"probe",(function(){return h})),r.d(t,"initTrackConfig",(function(){return p})),r.d(t,"getFrameDuration",(function(){return m})),r.d(t,"parseFrameHeader",(function(){return g})),r.d(t,"appendFrame",(function(){return v}));var n=r(/*! ../utils/logger */"./src/utils/logger.ts"),i=r(/*! ../errors */"./src/errors.ts"),o=r(/*! ../events */"./src/events.ts");function a(e,t,r,a){var s,l,c,u,d=navigator.userAgent.toLowerCase(),f=a,h=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];s=1+((192&t[r+2])>>>6);var p=(60&t[r+2])>>>2;if(!(p>h.length-1))return c=(1&t[r+2])<<2,c|=(192&t[r+3])>>>6,n.logger.log("manifest codec:"+a+", ADTS type:"+s+", samplingIndex:"+p),/firefox/i.test(d)?p>=6?(s=5,u=new Array(4),l=p-3):(s=2,u=new Array(2),l=p):-1!==d.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(d))||!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:h[p],channelCount:c,codec:"mp4a.40."+s,manifestCodec:f};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 d(e,t){return t+1<e.length&&s(e,t)}function f(e,t){return u(e,t)&&s(e,t)&&c(e,t)<=e.length-t}function h(e,t){if(d(e,t)){var r=l(e,t);if(t+r>=e.length)return!1;var n=c(e,t);if(n<=r)return!1;var i=t+n;return i===e.length||d(e,i)}return!1}function p(e,t,r,i,o){if(!e.samplerate){var s=a(t,r,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,n.logger.log("parsed codec:"+e.codec+", rate:"+s.samplerate+", channels:"+s.channelCount)}}function m(e){return 9216e4/e}function g(e,t,r,n,i){var o=l(e,t),a=c(e,t);if((a-=o)>0)return{headerLength:o,frameLength:a,stamp:r+n*i}}function v(e,t,r,n,i){var o=g(t,r,n,i,m(e.samplerate));if(o){var a,s=o.frameLength,l=o.headerLength,c=o.stamp,u=l+s,d=Math.max(0,r+u-t.length);d?(a=new Uint8Array(u-l)).set(t.subarray(r+l,t.length),0):a=t.subarray(r+l,r+u);var f={unit:a,pts:c};return d||e.samples.push(f),{sample:f,length:u,missing:d}}}},"./src/demux/base-audio-demuxer.ts":
/*!*****************************************!*\
!*** ./src/demux/base-audio-demuxer.ts ***!
\*****************************************/
/*! exports provided: initPTSFn, default */function(e,t,r){"use strict";r.r(t),r.d(t,"initPTSFn",(function(){return c}));var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! ../demux/id3 */"./src/demux/id3.ts"),o=r(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),a=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),s=r(/*! ../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,r){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,r){},t.demux=function(e,t){this.cachedData&&(e=Object(a.appendUint8Array)(this.cachedData,e),this.cachedData=null);var r,n,l=i.getID3Data(e,0),u=l?l.length:0,d=this._audioTrack,f=this._id3Track,h=l?i.getTimeStamp(l):void 0,p=e.length;for(0!==this.frameIndex&&null!==this.initPTS||(this.initPTS=c(h,t)),l&&l.length>0&&f.samples.push({pts:this.initPTS,dts:this.initPTS,data:l}),n=this.initPTS;u<p;){if(this.canParse(e,u)){var m=this.appendFrame(d,e,u);m?(this.frameIndex++,n=m.sample.pts,r=u+=m.length):u=p}else i.canParse(e,u)?(l=i.getID3Data(e,u),f.samples.push({pts:n,dts:n,data:l}),r=u+=l.length):u++;if(u===p&&r!==p){var g=Object(s.sliceUint8)(e,r);this.cachedData?this.cachedData=Object(a.appendUint8Array)(this.cachedData,g):this.cachedData=g}}return{audioTrack:d,avcTrack:Object(o.dummyTrack)(),id3Track:f,textTrack:Object(o.dummyTrack)()}},t.demuxSampleAes=function(e,t,r){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(n.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,r){"use strict";r.r(t),r.d(t,"default",(function(){return n}));var n=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,r=this.dataLength;return t.length?(e=1===t.length?t[0]:function(e,t){for(var r=new Uint8Array(t),n=0,i=0;i<e.length;i++){var o=e[i];r.set(o,n),n+=o.length}return r}(t,r),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,r){"use strict";function n(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}r.r(t),r.d(t,"dummyTrack",(function(){return n}))},"./src/demux/exp-golomb.ts":
/*!*********************************!*\
!*** ./src/demux/exp-golomb.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t);var n=r(/*! ../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,r=e.byteLength-t,n=new Uint8Array(4),i=Math.min(4,t);if(0===i)throw new Error("no bytes available");n.set(e.subarray(r,r+i)),this.word=new DataView(n.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),r=this.word>>>32-t;return e>32&&n.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?r<<t|this.readBits(t):r},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,r=8,n=0;n<e;n++)0!==r&&(r=(t+this.readEG()+256)%256),t=0===r?t:r},t.readSPS=function(){var e,t,r,n=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),d=this.skipBits.bind(this),f=this.skipEG.bind(this),h=this.skipUEG.bind(this),p=this.skipScalingList.bind(this);s();var m=s();if(l(5),d(3),s(),h(),100===m||110===m||122===m||244===m||44===m||83===m||86===m||118===m||128===m){var g=c();if(3===g&&d(1),h(),h(),d(1),u())for(t=3!==g?8:12,r=0;r<t;r++)u()&&p(r<6?16:64)}h();var v=c();if(0===v)c();else if(1===v)for(d(1),f(),f(),e=c(),r=0;r<e;r++)f();h(),d(1);var b=c(),y=c(),x=l(1);0===x&&d(1),d(1),u()&&(n=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*(b+1)-2*n-2*i),height:(2-x)*(y+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,r){"use strict";r.r(t),r.d(t,"isHeader",(function(){return i})),r.d(t,"isFooter",(function(){return o})),r.d(t,"getID3Data",(function(){return a})),r.d(t,"canParse",(function(){return l})),r.d(t,"getTimeStamp",(function(){return c})),r.d(t,"isTimeStampFrame",(function(){return u})),r.d(t,"getID3Frames",(function(){return f})),r.d(t,"decodeFrame",(function(){return h})),r.d(t,"utf8ArrayToStr",(function(){return b})),r.d(t,"testables",(function(){return y}));var n,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 r=t,n=0;i(e,t);)n+=10,n+=s(e,t+6),o(e,t+10)&&(n+=10),t+=n;if(n>0)return e.subarray(r,r+n)},s=function(e,t){var r=0;return r=(127&e[t])<<21,r|=(127&e[t+1])<<14,r|=(127&e[t+2])<<7,r|=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=f(e),r=0;r<t.length;r++){var n=t[r];if(u(n))return v(n)}},u=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},d=function(e){var t=String.fromCharCode(e[0],e[1],e[2],e[3]),r=s(e,4);return{type:t,size:r,data:e.subarray(10,10+r)}},f=function(e){for(var t=0,r=[];i(e,t);){for(var n=s(e,t+6),a=(t+=10)+n;t+8<a;){var l=d(e.subarray(t)),c=h(l);c&&r.push(c),t+=l.size+10}o(e,t)&&(t+=10)}return r},h=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=b(e.data,!0),r=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:r.buffer}}},m=function(e){if(!(e.size<2)){if("TXXX"===e.type){var t=1,r=b(e.data.subarray(t),!0);t+=r.length+1;var n=b(e.data.subarray(t));return{key:e.type,info:r,data:n}}var i=b(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,r=b(e.data.subarray(t),!0);t+=r.length+1;var n=b(e.data.subarray(t));return{key:e.type,info:r,data:n}}var i=b(e.data);return{key:e.type,data:i}},v=function(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),r=1&t[3],n=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return n/=45,r&&(n+=47721858.84),Math.round(n)}},b=function(e,t){void 0===t&&(t=!1);var r=x();if(r){var n=r.decode(e);if(t){var i=n.indexOf("\0");return-1!==i?n.substring(0,i):n}return n.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},y={decodeTextFrame:m};function x(){return n||void 0===self.TextDecoder||(n=new self.TextDecoder("utf-8")),n}},"./src/demux/mp3demuxer.ts":
/*!*********************************!*\
!*** ./src/demux/mp3demuxer.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t);var n=r(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),i=r(/*! ../demux/id3 */"./src/demux/id3.ts"),o=r(/*! ../utils/logger */"./src/utils/logger.ts"),a=r(/*! ./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,r;function n(){return e.apply(this,arguments)||this}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,s(t,r);var l=n.prototype;return l.resetInitSegment=function(t,r,n){e.prototype.resetInitSegment.call(this,t,r,n),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}},n.probe=function(e){if(!e)return!1;for(var t=(i.getID3Data(e,0)||[]).length,r=e.length;t<r;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,r){if(null!==this.initPTS)return a.appendFrame(e,t,r,this.initPTS,this.frameIndex)},n}(n.default);l.minProbeByteLength=4,t.default=l},"./src/demux/mp4demuxer.ts":
/*!*********************************!*\
!*** ./src/demux/mp4demuxer.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t);var n=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),i=r(/*! ./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(n.findBox)({data:e,start:0,end:Math.min(e.length,16384)},["moof"]).length>0},t.demux=function(e){var t=e,r=Object(i.dummyTrack)();if(this.config.progressive){this.remainderData&&(t=Object(n.appendUint8Array)(this.remainderData,e));var o=Object(n.segmentValidRange)(t);this.remainderData=o.remainder,r.samples=o.valid||new Uint8Array}else r.samples=t;return{audioTrack:Object(i.dummyTrack)(),avcTrack:r,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,r){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,r){"use strict";r.r(t),r.d(t,"appendFrame",(function(){return l})),r.d(t,"parseHeader",(function(){return c})),r.d(t,"isHeaderPattern",(function(){return u})),r.d(t,"isHeader",(function(){return d})),r.d(t,"canParse",(function(){return f})),r.d(t,"probe",(function(){return h}));var n=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,r,n,i){if(!(r+24>t.length)){var o=c(t,r);if(o&&r+o.frameLength<=t.length){var a=n+i*(9e4*o.samplesPerFrame/o.sampleRate),s={unit:t.subarray(r,r+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 r=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!==r&&0!==c&&15!==c&&3!==u){var d=e[t+2]>>1&1,f=e[t+3]>>6,h=1e3*i[14*(3===r?3-l:3===l?3:4)+c-1],p=o[3*(3===r?0:2===r?1:2)+u],m=3===f?1:2,g=a[r][l],v=s[l],b=8*g*v,y=Math.floor(g*h/p+d)*v;if(null===n){var x=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);n=x?parseInt(x[1]):0}return!!n&&n<=87&&2===l&&h>=224e3&&0===f&&(e[t+3]=128|e[t+3]),{sampleRate:p,channelCount:m,frameLength:y,samplesPerFrame:b}}}function u(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function d(e,t){return t+1<e.length&&u(e,t)}function f(e,t){return u(e,t)&&4<=e.length-t}function h(e,t){if(t+1<e.length&&u(e,t)){var r=c(e,t),n=4;null!=r&&r.frameLength&&(n=r.frameLength);var i=t+n;return i===e.length||d(e,i)}return!1}},"./src/demux/sample-aes.ts":
/*!*********************************!*\
!*** ./src/demux/sample-aes.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t);var n=r(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),i=r(/*! ./tsdemuxer */"./src/demux/tsdemuxer.ts"),o=function(){function e(e,t,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new n.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,r,n){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),n||s.decryptAacSamples(e,t+1,r)}))},t.decryptAacSamples=function(e,t,r){for(;;t++){if(t>=e.length)return void r();if(!(e[t].unit.length<32)){var n=this.decrypter.isSync();if(this.decryptAacSample(e,t,r,n),!n)return}}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,r=new Int8Array(t),n=0,i=32;i<=e.length-16;i+=160,n+=16)r.set(e.subarray(i,i+16),n);return r},t.getAvcDecryptedUnit=function(e,t){for(var r=new Uint8Array(t),n=0,i=32;i<=e.length-16;i+=160,n+=16)e.set(r.subarray(n,n+16),i);return e},t.decryptAvcSample=function(e,t,r,n,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,r+1,n)}))},t.decryptAvcSamples=function(e,t,r,n){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,r=0){if(t>=e.length)return void n();for(var i=e[t].units;!(r>=i.length);r++){var o=i[r];if(!(o.data.length<=48||1!==o.type&&5!==o.type)){var a=this.decrypter.isSync();if(this.decryptAvcSample(e,t,r,n,o,a),!a)return}}}},e}();t.default=o},"./src/demux/transmuxer-interface.ts":
/*!*******************************************!*\
!*** ./src/demux/transmuxer-interface.ts ***!
\*******************************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return d}));var n=r(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),i=r(/*! ../events */"./src/events.ts"),o=r(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),a=r(/*! ../utils/logger */"./src/utils/logger.ts"),s=r(/*! ../errors */"./src/errors.ts"),l=r(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=r(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),u=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},d=function(){function e(e,t,r,l){var d=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=r,this.onFlush=l;var f=e.config,h=function(t,r){(r=r||{}).frag=d.frag,r.id=d.id,e.trigger(t,r)};this.observer=new c.EventEmitter,this.observer.on(i.Events.FRAG_DECRYPTED,h),this.observer.on(i.Events.ERROR,h);var p={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},m=navigator.vendor;if(f.enableWorker&&"undefined"!=typeof Worker){var g;a.logger.log("demuxing in webworker");try{g=this.worker=n(/*! ../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(f)})}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,f,m,t),this.worker=null}}else this.transmuxer=new o.default(this.observer,p,f,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 r=this.observer;r&&r.removeAllListeners(),this.observer=null},t.push=function(e,t,r,n,i,s,l,c,u,d){var f=this;u.transmuxing.start=self.performance.now();var h=this.transmuxer,p=this.worker,m=s?s.start:i.start,g=i.decryptdata,v=this.frag,b=!(v&&i.cc===v.cc),y=!(v&&u.level===v.level),x=v?u.sn-v.sn:-1,w=this.part?u.part-this.part.index:1,E=!y&&(1===x||0===x&&1===w),S=self.performance.now();(y||x||0===i.stats.parsing.start)&&(i.stats.parsing.start=S),!s||!w&&E||(s.stats.parsing.start=S);var _=new o.TransmuxState(b,E,c,y,m);if(!E||b){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: "+b+"\n trackSwitch: "+y+"\n contiguous: "+E+"\n accurateTimeOffset: "+c+"\n timeOffset: "+m);var T=new o.TransmuxConfig(r,n,t,l,d);this.configureTransmuxer(T)}if(this.frag=i,this.part=s,p)p.postMessage({cmd:"demux",data:e,decryptdata:g,chunkMeta:u,state:_},e instanceof ArrayBuffer?[e]:[]);else if(h){var k=h.push(e,g,u,_);Object(o.isPromise)(k)?k.then((function(e){f.handleTransmuxComplete(e)})):this.handleTransmuxComplete(k)}},t.flush=function(e){var t=this;e.transmuxing.start=self.performance.now();var r=this.transmuxer,n=this.worker;if(n)n.postMessage({cmd:"flush",chunkMeta:e});else if(r){var i=r.flush(e);Object(o.isPromise)(i)?i.then((function(r){t.handleFlushResult(r,e)})):this.handleFlushResult(i,e)}},t.handleFlushResult=function(e,t){var r=this;e.forEach((function(e){r.handleTransmuxComplete(e)})),this.onFlush(t)},t.onWorkerMessage=function(e){var t=e.data,r=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,r.trigger(t.event,t.data)}},t.configureTransmuxer=function(e){var t=this.worker,r=this.transmuxer;t?t.postMessage({cmd:"configure",config:e}):r&&r.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,r){"use strict";r.r(t),r.d(t,"default",(function(){return s}));var n=r(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),i=r(/*! ../events */"./src/events.ts"),o=r(/*! ../utils/logger */"./src/utils/logger.ts"),a=r(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");function s(e){var t=new a.EventEmitter,r=function(t,r){e.postMessage({event:t,data:r})};t.on(i.Events.FRAG_DECRYPTED,r),t.on(i.Events.ERROR,r),e.addEventListener("message",(function(i){var a=i.data;switch(a.cmd){case"init":var s=JSON.parse(a.config);e.transmuxer=new n.default(t,a.typeSupported,s,a.vendor,a.id),Object(o.enableLogs)(s.debug),r("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(n.isPromise)(c)?c.then((function(t){l(e,t)})):l(e,c);break;case"flush":var d=a.chunkMeta,f=e.transmuxer.flush(d);Object(n.isPromise)(f)?f.then((function(t){u(e,t,d)})):u(e,f,d)}}))}function l(e,t){if((r=t.remuxResult).audio||r.video||r.text||r.id3||r.initSegment){var r,n=[],i=t.remuxResult,o=i.audio,a=i.video;o&&c(n,o),a&&c(n,a),e.postMessage({event:"transmuxComplete",data:t},n)}}function c(e,t){t.data1&&e.push(t.data1.buffer),t.data2&&e.push(t.data2.buffer)}function u(e,t,r){t.forEach((function(t){l(e,t)})),e.postMessage({event:"flush",data:r})}},"./src/demux/transmuxer.ts":
/*!*********************************!*\
!*** ./src/demux/transmuxer.ts ***!
\*********************************/
/*! exports provided: default, isPromise, TransmuxConfig, TransmuxState */function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return b})),r.d(t,"isPromise",(function(){return x})),r.d(t,"TransmuxConfig",(function(){return w})),r.d(t,"TransmuxState",(function(){return E}));var n,i=r(/*! ../events */"./src/events.ts"),o=r(/*! ../errors */"./src/errors.ts"),a=r(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),s=r(/*! ../demux/aacdemuxer */"./src/demux/aacdemuxer.ts"),l=r(/*! ../demux/mp4demuxer */"./src/demux/mp4demuxer.ts"),c=r(/*! ../demux/tsdemuxer */"./src/demux/tsdemuxer.ts"),u=r(/*! ../demux/mp3demuxer */"./src/demux/mp3demuxer.ts"),d=r(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),f=r(/*! ../remux/passthrough-remuxer */"./src/remux/passthrough-remuxer.ts"),h=r(/*! ./chunk-cache */"./src/demux/chunk-cache.ts"),p=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),m=r(/*! ../utils/logger */"./src/utils/logger.ts");try{n=self.performance.now.bind(self.performance)}catch(e){m.logger.debug("Unable to use Performance API on this environment"),n=self.Date.now}var g=[{demux:c.default,remux:d.default},{demux:l.default,remux:f.default},{demux:s.default,remux:d.default},{demux:u.default,remux:d.default}],v=1024;g.forEach((function(e){var t=e.demux;v=Math.max(v,t.minProbeByteLength)}));var b=function(){function e(e,t,r,n,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 h.default,this.observer=e,this.typeSupported=t,this.config=r,this.vendor=n,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,r,i){var o=this,a=r.transmuxing;a.executeStart=n();var s=new Uint8Array(e),l=this.cache,c=this.config,u=this.currentTransmuxState,d=this.transmuxConfig;i&&(this.currentTransmuxState=i);var f=function(e,t){var r=null;return e.byteLength>0&&null!=t&&null!=t.key&&null!==t.iv&&null!=t.method&&(r=t),r}(s,t);if(f&&"AES-128"===f.method){var h=this.getDecrypter();if(!c.enableSoftwareAES)return this.decryptionPromise=h.webCryptoDecrypt(s,f.key.buffer,f.iv.buffer).then((function(e){var t=o.push(e,null,r);return o.decryptionPromise=null,t})),this.decryptionPromise;var m=h.softwareDecrypt(s,f.key.buffer,f.iv.buffer);if(!m)return a.executeEnd=n(),y(r);s=new Uint8Array(m)}var g=i||u,v=g.contiguous,b=g.discontinuity,x=g.trackSwitch,w=g.accurateTimeOffset,E=g.timeOffset,S=d.audioCodec,_=d.videoCodec,T=d.defaultInitPts,k=d.duration,O=d.initSegmentData;if((b||x)&&this.resetInitSegment(O,S,_,k),b&&this.resetInitialTimestamp(T),v||this.resetContiguity(),this.needsProbing(s,b,x)){if(l.dataLength){var C=l.flush();s=Object(p.appendUint8Array)(C,s)}this.configureTransmuxer(s,d)}var A=this.transmux(s,f,E,w,r),D=this.currentTransmuxState;return D.contiguous=!0,D.discontinuity=!1,D.trackSwitch=!1,a.executeEnd=n(),A},t.flush=function(e){var t=this,r=e.transmuxing;r.executeStart=n();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=[],d=l.timeOffset;if(a){var f=a.flush();f&&u.push(this.push(f,null,e))}var h=s.dataLength;s.reset();var p=this.demuxer,m=this.remuxer;if(!p||!m)return h>=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"}),r.executeEnd=n(),[y(e)];var g=p.flush(d);return x(g)?g.then((function(r){return t.flushRemux(u,r,e),u})):(this.flushRemux(u,g,e),u)},t.flushRemux=function(e,t,r){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 "+r.sn+(r.part>-1?" p: "+r.part:"")+" of level "+r.level);var d=this.remuxer.remux(i,o,a,s,u,c,!0,this.id);e.push({remuxResult:d,chunkMeta:r}),r.transmuxing.executeEnd=n()},t.resetInitialTimestamp=function(e){var t=this.demuxer,r=this.remuxer;t&&r&&(t.resetTimeStamp(e),r.resetTimeStamp(e))},t.resetContiguity=function(){var e=this.demuxer,t=this.remuxer;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())},t.resetInitSegment=function(e,t,r,n){var i=this.demuxer,o=this.remuxer;i&&o&&(i.resetInitSegment(t,r,n),o.resetInitSegment(e,t,r))},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,r,n,i){return t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,r,n,i):this.transmuxUnencrypted(e,r,n,i)},t.transmuxUnencrypted=function(e,t,r,n){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,r,!1,this.id),chunkMeta:n}},t.transmuxSampleAes=function(e,t,r,n,i){var o=this;return this.demuxer.demuxSampleAes(e,t,r).then((function(e){return{remuxResult:o.remuxer.remux(e.audioTrack,e.avcTrack,e.id3Track,e.textTrack,r,n,!1,o.id),chunkMeta:i}}))},t.configureTransmuxer=function(e,t){for(var r,n=this.config,i=this.observer,o=this.typeSupported,a=this.vendor,s=t.audioCodec,c=t.defaultInitPts,u=t.duration,d=t.initSegmentData,h=t.videoCodec,p=0,v=g.length;p<v;p++)if(g[p].demux.probe(e)){r=g[p];break}r||(m.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),r={demux:l.default,remux:f.default});var b=this.demuxer,y=this.remuxer,x=r.remux,w=r.demux;y&&y instanceof x||(this.remuxer=new x(i,n,o,a)),b&&b instanceof w||(this.demuxer=new w(i,n,o),this.probe=w.probe),this.resetInitSegment(d,s,h,u),this.resetInitialTimestamp(c)},t.needsProbing=function(e,t,r){return!this.demuxer||!this.remuxer||t||r},t.getDecrypter=function(){var e=this.decrypter;return e||(e=this.decrypter=new a.default(this.observer,this.config)),e},e}(),y=function(e){return{remuxResult:{},chunkMeta:e}};function x(e){return"then"in e&&e.then instanceof Function}var w=function(e,t,r,n,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=r,this.duration=n,this.defaultInitPts=i},E=function(e,t,r,n,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=r,this.trackSwitch=n,this.timeOffset=i}},"./src/demux/tsdemuxer.ts":
/*!********************************!*\
!*** ./src/demux/tsdemuxer.ts ***!
\********************************/
/*! exports provided: discardEPB, default */function(e,t,r){"use strict";r.r(t),r.d(t,"discardEPB",(function(){return x}));var n=r(/*! ./adts */"./src/demux/adts.ts"),i=r(/*! ./mpegaudio */"./src/demux/mpegaudio.ts"),o=r(/*! ./exp-golomb */"./src/demux/exp-golomb.ts"),a=r(/*! ./id3 */"./src/demux/id3.ts"),s=r(/*! ./sample-aes */"./src/demux/sample-aes.ts"),l=r(/*! ../events */"./src/events.ts"),c=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),u=r(/*! ../utils/logger */"./src/utils/logger.ts"),d=r(/*! ../errors */"./src/errors.ts"),f={video:1,audio:2,id3:3,text:4},h=function(){function e(e,t,r){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=r}e.probe=function(t){var r=e.syncOffset(t);return!(r<0||(r&&u.logger.warn("MPEG2-TS detected but first sync word found @ offset "+r+", junk ahead ?"),0))},e.syncOffset=function(e){for(var t=Math.min(1e3,e.length-564),r=0;r<t;){if(71===e[r]&&71===e[r+188]&&71===e[r+376])return r;r++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:f[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,r,n){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=e.createTrack("video",n),this._audioTrack=e.createTrack("audio",n),this._id3Track=e.createTrack("id3",n),this._txtTrack=e.createTrack("text",n),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=t,this.videoCodec=r,this._duration=n},t.resetTimeStamp=function(){},t.resetContiguity=function(){var e=this._audioTrack,t=this._avcTrack,r=this._id3Track;e&&(e.pesData=null),t&&(t.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},t.demux=function(t,r,n,i){var o;void 0===n&&(n=!1),void 0===i&&(i=!1),n||(this.sampleAes=null);var a=this._avcTrack,s=this._audioTrack,f=this._id3Track,h=a.pid,p=a.pesData,b=s.pid,y=f.pid,x=s.pesData,w=f.pesData,E=!1,S=this.pmtParsed,_=this._pmtId,T=t.length;if(this.remainderData&&(T=(t=Object(c.appendUint8Array)(this.remainderData,t)).length,this.remainderData=null),T<188&&!i)return this.remainderData=t,{audioTrack:s,avcTrack:a,id3Track:f,textTrack:this._txtTrack};var k=Math.max(0,e.syncOffset(t));(T-=(T+k)%188)<t.byteLength&&!i&&(this.remainderData=new Uint8Array(t.buffer,T,t.buffer.byteLength-T));for(var O=k;O<T;O+=188)if(71===t[O]){var C=!!(64&t[O+1]),A=((31&t[O+1])<<8)+t[O+2],D=void 0;if((48&t[O+3])>>4>1){if((D=O+5+t[O+4])===O+188)continue}else D=O+4;switch(A){case h:C&&(p&&(o=v(p))&&this.parseAVCPES(o,!1),p={data:[],size:0}),p&&(p.data.push(t.subarray(D,O+188)),p.size+=O+188-D);break;case b:C&&(x&&(o=v(x))&&(s.isAAC?this.parseAACPES(o):this.parseMPEGPES(o)),x={data:[],size:0}),x&&(x.data.push(t.subarray(D,O+188)),x.size+=O+188-D);break;case y:C&&(w&&(o=v(w))&&this.parseID3PES(o),w={data:[],size:0}),w&&(w.data.push(t.subarray(D,O+188)),w.size+=O+188-D);break;case 0:C&&(D+=t[D]+1),_=this._pmtId=m(t,D);break;case _:C&&(D+=t[D]+1);var L=g(t,D,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,n);(h=L.avc)>0&&(a.pid=h),(b=L.audio)>0&&(s.pid=b,s.isAAC=L.isAAC),(y=L.id3)>0&&(f.pid=y),E&&!S&&(u.logger.log("reparse from beginning"),E=!1,O=k-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:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});a.pesData=p,s.pesData=x,f.pesData=w;var I={audioTrack:s,avcTrack:a,id3Track:f,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,r=e.audioTrack,n=e.avcTrack,i=e.id3Track,o=n.pesData,a=r.pesData,s=i.pesData;o&&(t=v(o))?(this.parseAVCPES(t,!0),n.pesData=null):n.pesData=o,a&&(t=v(a))?(r.isAAC?this.parseAACPES(t):this.parseMPEGPES(t),r.pesData=null):(null!=a&&a.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),r.pesData=a),s&&(t=v(s))?(this.parseID3PES(t),i.pesData=null):i.pesData=s},t.demuxSampleAes=function(e,t,r){var n=this.demux(e,r,!0,!this.config.progressive),i=this.sampleAes=new s.default(this.observer,this.config,t);return this.decrypt(n,i)},t.decrypt=function(e,t){return new Promise((function(r){var n=e.audioTrack,i=e.avcTrack;n.samples&&n.isAAC?t.decryptAacSamples(n.samples,0,(function(){i.samples?t.decryptAvcSamples(i.samples,0,0,(function(){r(e)})):r(e)})):i.samples&&t.decryptAvcSamples(i.samples,0,0,(function(){r(e)}))}))},t.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},t.parseAVCPES=function(e,t){var r,n=this,i=this._avcTrack,s=this.parseAVCNALu(e.data),l=this.avcSample,c=!1;e.data=null,l&&s.length&&!i.audFound&&(b(l,i),l=this.avcSample=p(!1,e.pts,e.dts,"")),s.forEach((function(t){switch(t.type){case 1:r=!0,l||(l=n.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:r=!0,l||(l=n.avcSample=p(!0,e.pts,e.dts,"")),l.key=!0,l.frame=!0;break;case 6:r=!0;var d=new o.default(x(t.data));d.readUByte();for(var f=0,h=0,m=!1,g=0;!m&&d.bytesAvailable>1;){f=0;do{f+=g=d.readUByte()}while(255===g);h=0;do{h+=g=d.readUByte()}while(255===g);if(4===f&&0!==d.bytesAvailable){if(m=!0,181===d.readUByte()&&49===d.readUShort()&&1195456820===d.readUInt()&&3===d.readUByte()){for(var v=d.readUByte(),w=31&v,E=[v,d.readUByte()],S=0;S<w;S++)E.push(d.readUByte()),E.push(d.readUByte()),E.push(d.readUByte());y(n._txtTrack.samples,{type:3,pts:e.pts,bytes:E})}}else if(5===f&&0!==d.bytesAvailable){if(m=!0,h>16){for(var _=[],T=0;T<16;T++)_.push(d.readUByte().toString(16)),3!==T&&5!==T&&7!==T&&9!==T||_.push("-");for(var k=h-16,O=new Uint8Array(k),C=0;C<k;C++)O[C]=d.readUByte();y(n._txtTrack.samples,{pts:e.pts,payloadType:f,uuid:_.join(""),userData:Object(a.utf8ArrayToStr)(O),userDataBytes:O})}}else if(h<d.bytesAvailable)for(var A=0;A<h;A++)d.readUByte()}break;case 7:if(r=!0,c=!0,!i.sps){var D=new o.default(t.data).readSPS();i.width=D.width,i.height=D.height,i.pixelRatio=D.pixelRatio,i.sps=[t.data],i.duration=n._duration;for(var L=t.data.subarray(1,4),I="avc1.",j=0;j<3;j++){var R=L[j].toString(16);R.length<2&&(R="0"+R),I+=R}i.codec=I}break;case 8:r=!0,i.pps||(i.pps=[t.data]);break;case 9:r=!1,i.audFound=!0,l&&b(l,i),l=n.avcSample=p(!1,e.pts,e.dts,"");break;case 12:r=!1;break;default:r=!1,l&&(l.debug+="unknown NAL "+t.type+" ")}l&&r&&l.units.push(t)})),t&&l&&(b(l,i),this.avcSample=null)},t.getLastNalUnit=function(){var e,t,r=this.avcSample;if(!r||0===r.units.length){var n=this._avcTrack.samples;r=n[n.length-1]}if(null!==(e=r)&&void 0!==e&&e.units){var i=r.units;t=i[i.length-1]}return t},t.parseAVCNALu=function(e){var t,r,n=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<n;)if(t=e[l++],o)if(1!==o)if(t)if(1===t){if(c>=0){var d={data:e.subarray(c,l-o-1),type:u};s.push(d)}else{var f=this.getLastNalUnit();if(f&&(a&&l<=4-a&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-a)),(r=l-o-1)>0)){var h=new Uint8Array(f.data.byteLength+r);h.set(f.data,0),h.set(e.subarray(0,r),f.data.byteLength),f.data=h,f.state=0}}l<n?(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,n),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,r,i,o,a,s=0,c=this._audioTrack,f=this.aacOverFlow,h=e.data;if(f){this.aacOverFlow=null;var p=f.sample.unit.byteLength,m=Math.min(f.missing,p),g=p-m;f.sample.unit.set(h.subarray(0,m),g),c.samples.push(f.sample),s=f.missing}for(t=s,r=h.length;t<r-1&&!n.isHeader(h,t);t++);if(t===s||(t<r-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:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.FRAG_PARSING_ERROR,fatal:o,reason:i}),!o)){if(n.initTrackConfig(c,this.observer,h,t,this.audioCodec),void 0!==e.pts)a=e.pts;else{if(!f)return void u.logger.warn("[tsdemuxer]: AAC PES unknown PTS");var v=n.getFrameDuration(c.samplerate);a=f.sample.pts+v}for(var b=0;t<r;){if(n.isHeader(h,t)){if(t+5<r){var y=n.appendFrame(c,h,t,a,b);if(y){if(!y.missing){t+=y.length,b++;continue}this.aacOverFlow=y}}break}t++}}},t.parseMPEGPES=function(e){var t=e.data,r=t.length,n=0,o=0,a=e.pts;if(void 0!==a)for(;o<r;)if(i.isHeader(t,o)){var s=i.appendFrame(this._audioTrack,t,o,a,n);if(!s)break;o+=s.length,n++}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,r,n){return{key:e,frame:!1,pts:t,dts:r,units:[],debug:n,length:0}}function m(e,t){return(31&e[t+10])<<8|e[t+11]}function g(e,t,r,n){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(!n){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(!n){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:r?-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,r,n,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((r=(t[4]<<8)+t[5])&&r>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 d=(n=t[8])+9;if(e.size<=d)return null;e.size-=d;for(var f=new Uint8Array(e.size),h=0,p=s.length;h<p;h++){var m=(t=s[h]).byteLength;if(d){if(d>m){d-=m;continue}t=t.subarray(d),m-=d,d=0}f.set(t,a),a+=m}return r&&(r-=n+3),{data:f,pts:i,dts:o,len:r}}return null}function b(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){var r=t.samples,n=r.length;if(!n)return void t.dropped++;var i=r[n-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 y(e,t){var r=e.length;if(r>0){if(t.pts>=e[r-1].pts)e.push(t);else for(var n=r-1;n>=0;n--)if(t.pts<e[n].pts){e.splice(n,0,t);break}}else e.push(t)}function x(e){for(var t=e.byteLength,r=[],n=1;n<t-2;)0===e[n]&&0===e[n+1]&&3===e[n+2]?(r.push(n+2),n+=2):n++;if(0===r.length)return e;var i=t-r.length,o=new Uint8Array(i),a=0;for(n=0;n<i;a++,n++)a===r[0]&&(a++,r.shift()),o[n]=e[a];return o}h.minProbeByteLength=188,t.default=h},"./src/errors.ts":
/*!***********************!*\
!*** ./src/errors.ts ***!
\***********************/
/*! exports provided: ErrorTypes, ErrorDetails */function(e,t,r){"use strict";var n,i;r.r(t),r.d(t,"ErrorTypes",(function(){return n})),r.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"}(n||(n={})),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,r){"use strict";var n;r.r(t),r.d(t,"Events",(function(){return n})),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"}(n||(n={}))},"./src/hls.ts":
/*!********************!*\
!*** ./src/hls.ts ***!
\********************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return b}));var n=r(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),i=r(/*! ./loader/playlist-loader */"./src/loader/playlist-loader.ts"),o=r(/*! ./loader/key-loader */"./src/loader/key-loader.ts"),a=r(/*! ./controller/id3-track-controller */"./src/controller/id3-track-controller.ts"),s=r(/*! ./controller/latency-controller */"./src/controller/latency-controller.ts"),l=r(/*! ./controller/level-controller */"./src/controller/level-controller.ts"),c=r(/*! ./controller/fragment-tracker */"./src/controller/fragment-tracker.ts"),u=r(/*! ./controller/stream-controller */"./src/controller/stream-controller.ts"),d=r(/*! ./is-supported */"./src/is-supported.ts"),f=r(/*! ./utils/logger */"./src/utils/logger.ts"),h=r(/*! ./config */"./src/config.ts"),p=r(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),m=r(/*! ./events */"./src/events.ts"),g=r(/*! ./errors */"./src/errors.ts");function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var b=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 r=this.config=Object(h.mergeConfig)(e.DefaultConfig,t);this.userConfig=t,Object(f.enableLogs)(r.debug),this._autoLevelCapping=-1,r.progressive&&Object(h.enableStreamingMode)(r);var n=r.abrController,d=r.bufferController,m=r.capLevelController,g=r.fpsController,v=this.abrController=new n(this),b=this.bufferController=new d(this),y=this.capLevelController=new m(this),x=new g(this),w=new i.default(this),E=new o.default(this),S=new a.default(this),_=this.levelController=new l.default(this),T=new c.FragmentTracker(this),k=this.streamController=new u.default(this,T);y.setStreamController(k),x.setStreamController(k);var O=[_,k];this.networkControllers=O;var C=[w,E,v,b,y,x,S,T];this.audioTrackController=this.createController(r.audioTrackController,null,O),this.createController(r.audioStreamController,T,O),this.subtitleTrackController=this.createController(r.subtitleTrackController,null,O),this.createController(r.subtitleStreamController,T,O),this.createController(r.timelineController,null,C),this.emeController=this.createController(r.emeController,null,C),this.cmcdController=this.createController(r.cmcdController,null,C),this.latencyController=this.createController(s.default,null,C),this.coreComponents=C}e.isSupported=function(){return Object(d.isSupported)()};var t,r,b,y=e.prototype;return y.createController=function(e,t,r){if(e){var n=t?new e(this,t):new e(this);return r&&r.push(n),n}return null},y.on=function(e,t,r){void 0===r&&(r=this),this._emitter.on(e,t,r)},y.once=function(e,t,r){void 0===r&&(r=this),this._emitter.once(e,t,r)},y.removeAllListeners=function(e){this._emitter.removeAllListeners(e)},y.off=function(e,t,r,n){void 0===r&&(r=this),this._emitter.off(e,t,r,n)},y.listeners=function(e){return this._emitter.listeners(e)},y.emit=function(e,t,r){return this._emitter.emit(e,t,r)},y.trigger=function(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){f.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},y.listenerCount=function(e){return this._emitter.listenerCount(e)},y.destroy=function(){f.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},y.attachMedia=function(e){f.logger.log("attachMedia"),this._media=e,this.trigger(m.Events.MEDIA_ATTACHING,{media:e})},y.detachMedia=function(){f.logger.log("detachMedia"),this.trigger(m.Events.MEDIA_DETACHING,void 0),this._media=null},y.loadSource=function(e){this.stopLoad();var t=this.media,r=this.url,i=this.url=n.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});f.logger.log("loadSource:"+i),t&&r&&r!==i&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(t)),this.trigger(m.Events.MANIFEST_LOADING,{url:e})},y.startLoad=function(e){void 0===e&&(e=-1),f.logger.log("startLoad("+e+")"),this.networkControllers.forEach((function(t){t.startLoad(e)}))},y.stopLoad=function(){f.logger.log("stopLoad"),this.networkControllers.forEach((function(e){e.stopLoad()}))},y.swapAudioCodec=function(){f.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},y.recoverMediaError=function(){f.logger.log("recoverMediaError");var e=this._media;this.detachMedia(),e&&this.attachMedia(e)},y.removeLevel=function(e,t){void 0===t&&(t=0),this.levelController.removeLevel(e,t)},t=e,b=[{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:h.hlsDefaultConfig},set:function(t){e.defaultConfig=t}}],(r=[{key:"levels",get:function(){var e=this.levelController.levels;return e||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){f.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){f.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){f.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){f.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){f.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&&(f.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 r=e.length,n=0;n<r;n++)if(e[n].maxBitrate>t)return n;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,r),b&&v(t,b),e}();b.defaultConfig=void 0},"./src/is-supported.ts":
/*!*****************************!*\
!*** ./src/is-supported.ts ***!
\*****************************/
/*! exports provided: isSupported, changeTypeSupported */function(e,t,r){"use strict";r.r(t),r.d(t,"isSupported",(function(){return o})),r.d(t,"changeTypeSupported",(function(){return a}));var n=r(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.ts");function i(){return self.SourceBuffer||self.WebKitSourceBuffer}function o(){var e=Object(n.getMediaSource)();if(!e)return!1;var t=i(),r=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!!r&&!!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,r){"use strict";r.r(t),r.d(t,"default",(function(){return d})),r.d(t,"LoadError",(function(){return h}));var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! ../errors */"./src/errors.ts");function o(e){var t="function"==typeof Map?new Map:void 0;return(o=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;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,n)}function n(){return a(e,arguments,c(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),l(n,e)})(e)}function a(e,t,r){return(a=s()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&l(i,r.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),d=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 r=this,n=e.url;if(!n)return Promise.reject(new h({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,networkDetails:null},"Fragment does not have a "+(n?"part list":"url")));this.abort();var o=this.config,a=o.fLoader,s=o.loader;return new Promise((function(n,l){r.loader&&r.loader.destroy();var c=r.loader=e.loader=a?new a(o):new s(o),d=f(e),p={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:o.fragLoadingMaxRetryTimeout,highWaterMark:u};e.stats=c.stats,c.load(d,p,{onSuccess:function(t,i,o,a){r.resetLoader(e,c),n({frag:e,part:null,payload:t.data,networkDetails:a})},onError:function(t,n,o){r.resetLoader(e,c),l(new h({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:t,networkDetails:o}))},onAbort:function(t,n,o){r.resetLoader(e,c),l(new h({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,networkDetails:o}))},onTimeout:function(t,n,o){r.resetLoader(e,c),l(new h({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,networkDetails:o}))},onProgress:function(r,n,i,o){t&&t({frag:e,part:null,payload:i,networkDetails:o})}})}))},t.loadPart=function(e,t,r){var n=this;this.abort();var o=this.config,a=o.fLoader,s=o.loader;return new Promise((function(l,c){n.loader&&n.loader.destroy();var d=n.loader=e.loader=a?new a(o):new s(o),p=f(e,t),m={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:o.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=d.stats,d.load(p,m,{onSuccess:function(i,o,a,s){n.resetLoader(e,d),n.updateStatsFromPart(e,t);var c={frag:e,part:t,payload:i.data,networkDetails:s};r(c),l(c)},onError:function(r,o,a){n.resetLoader(e,d),c(new h({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:r,networkDetails:a}))},onAbort:function(r,o,a){e.stats.aborted=t.stats.aborted,n.resetLoader(e,d),c(new h({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,networkDetails:a}))},onTimeout:function(r,o,a){n.resetLoader(e,d),c(new h({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 r=e.stats,n=t.stats,i=n.total;if(r.loaded+=n.loaded,i){var o=Math.round(e.duration/t.duration),a=Math.min(Math.round(r.loaded/i),o),s=(o-a)*Math.round(r.loaded/a);r.total=r.loaded+s}else r.total=Math.max(r.loaded,r.total);var l=r.loading,c=n.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 f(e,t){void 0===t&&(t=null);var r=t||e,i={frag:e,part:t,responseType:"arraybuffer",url:r.url,headers:{},rangeStart:0,rangeEnd:0},o=r.byteRangeStartOffset,a=r.byteRangeEndOffset;return Object(n.isFiniteNumber)(o)&&Object(n.isFiniteNumber)(a)&&(i.rangeStart=o,i.rangeEnd=a),i}var h=function(e){var t,r;function n(t){for(var r,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return(r=e.call.apply(e,[this].concat(i))||this).data=void 0,r.data=t,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,l(t,r),n}(o(Error))},"./src/loader/fragment.ts":
/*!********************************!*\
!*** ./src/loader/fragment.ts ***!
\********************************/
/*! exports provided: ElementaryStreamTypes, BaseSegment, Fragment, Part */function(e,t,r){"use strict";r.r(t),r.d(t,"ElementaryStreamTypes",(function(){return n})),r.d(t,"BaseSegment",(function(){return h})),r.d(t,"Fragment",(function(){return p})),r.d(t,"Part",(function(){return m}));var n,i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),o=r(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),a=r(/*! ../utils/logger */"./src/utils/logger.ts"),s=r(/*! ./level-key */"./src/loader/level-key.ts"),l=r(/*! ./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 d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),e}!function(e){e.AUDIO="audio",e.VIDEO="video",e.AUDIOVIDEO="audiovideo"}(n||(n={}));var h=function(){function e(e){var t;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=((t={})[n.AUDIO]=null,t[n.VIDEO]=null,t[n.AUDIOVIDEO]=null,t),this.baseurl=e}return e.prototype.setByteRange=function(e,t){var r=e.split("@",2),n=[];1===r.length?n[0]=t?t.byteRangeEndOffset:0:n[0]=parseInt(r[1]),n[1]=parseInt(r[0])+n[0],this._byteRange=n},f(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,r){var n;return(n=e.call(this,r)||this)._decryptdata=null,n.rawProgramDateTime=null,n.programDateTime=null,n.tagList=[],n.duration=0,n.sn=0,n.levelkey=void 0,n.type=void 0,n.loader=null,n.level=-1,n.cc=0,n.startPTS=void 0,n.endPTS=void 0,n.appendedPTS=void 0,n.startDTS=void 0,n.endDTS=void 0,n.start=0,n.deltaPTS=void 0,n.maxStartPTS=void 0,n.minEndPTS=void 0,n.stats=new l.LoadStats,n.urlId=0,n.data=void 0,n.bitrateTest=!1,n.title=null,n.initSegment=null,n.type=t,n}c(t,e);var r=t.prototype;return r.createInitializationVector=function(e){for(var t=new Uint8Array(16),r=12;r<16;r++)t[r]=e>>8*(15-r)&255;return t},r.setDecryptDataFromLevelKey=function(e,t){var r=e;return"AES-128"===(null==e?void 0:e.method)&&e.uri&&!e.iv&&((r=s.LevelKey.fromURI(e.uri)).method=e.method,r.iv=this.createInitializationVector(t),r.keyFormat="identity"),r},r.setElementaryStreamInfo=function(e,t,r,n,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,r),s.startDTS=Math.min(s.startDTS,n),s.endDTS=Math.max(s.endDTS,i)):a[e]={startPTS:t,endPTS:r,startDTS:n,endDTS:i,partial:o}},r.clearElementaryStreamInfo=function(){var e=this.elementaryStreams;e[n.AUDIO]=null,e[n.VIDEO]=null,e[n.AUDIOVIDEO]=null},f(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}(h),m=function(e){function t(t,r,n,i,o){var a;(a=e.call(this,n)||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=r,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),f(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}(h)},"./src/loader/key-loader.ts":
/*!**********************************!*\
!*** ./src/loader/key-loader.ts ***!
\**********************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return a}));var n=r(/*! ../events */"./src/events.ts"),i=r(/*! ../errors */"./src/errors.ts"),o=r(/*! ../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(n.Events.KEY_LOADING,this.onKeyLoading,this)},t._unregisterListeners=function(){this.hls.off(n.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 r=t.frag,i=r.type,a=this.loaders[i];if(r.decryptdata){var s=r.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=r.loader=this.loaders[i]=new c(l);this.decrypturl=s,this.decryptkey=null;var d={url:s,frag:r,responseType:"arraybuffer"},f={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},h={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(d,f,h)}else this.decryptkey&&(r.decryptdata.key=this.decryptkey,this.hls.trigger(n.Events.KEY_LOADED,{frag:r}))}else o.logger.warn("Missing decryption data on fragment in onKeyLoading")},t.loadsuccess=function(e,t,r){var i=r.frag;i.decryptdata?(this.decryptkey=i.decryptdata.key=new Uint8Array(e.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(n.Events.KEY_LOADED,{frag:i})):o.logger.error("after key load, decryptdata unset")},t.loaderror=function(e,t){var r=t.frag,o=r.loader;o&&o.abort(),delete this.loaders[r.type],this.hls.trigger(n.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:r,response:e})},t.loadtimeout=function(e,t){var r=t.frag,o=r.loader;o&&o.abort(),delete this.loaders[r.type],this.hls.trigger(n.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},e}()},"./src/loader/level-details.ts":
/*!*************************************!*\
!*** ./src/loader/level-details.ts ***!
\*************************************/
/*! exports provided: LevelDetails */function(e,t,r){"use strict";r.r(t),r.d(t,"LevelDetails",(function(){return o}));var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts");function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}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,r,o;return e.prototype.reloaded=function(e){if(!e)return this.advanced=!0,void(this.updated=!0);var t=this.lastPartSn-e.lastPartSn,r=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!r||!!t,this.advanced=this.endSN>e.endSN||t>0||0===t&&r>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay},t=e,(r=[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&Object(n.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,r),o&&i(t,o),e}()},"./src/loader/level-key.ts":
/*!*********************************!*\
!*** ./src/loader/level-key.ts ***!
\*********************************/
/*! exports provided: LevelKey */function(e,t,r){"use strict";r.r(t),r.d(t,"LevelKey",(function(){return o}));var n=r(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js");function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}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(n.buildAbsoluteURL)(e,t,{alwaysNormalize:!0}):e}var t,r,o;return e.fromURL=function(t,r){return new e(t,r)},e.fromURI=function(t){return new e(t)},t=e,(r=[{key:"uri",get:function(){return this._uri}}])&&i(t.prototype,r),o&&i(t,o),e}()},"./src/loader/load-stats.ts":
/*!**********************************!*\
!*** ./src/loader/load-stats.ts ***!
\**********************************/
/*! exports provided: LoadStats */function(e,t,r){"use strict";r.r(t),r.d(t,"LoadStats",(function(){return n}));var n=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,r){"use strict";r.r(t),r.d(t,"default",(function(){return g}));var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),o=r(/*! ./fragment */"./src/loader/fragment.ts"),a=r(/*! ./level-details */"./src/loader/level-details.ts"),s=r(/*! ./level-key */"./src/loader/level-key.ts"),l=r(/*! ../utils/attr-list */"./src/utils/attr-list.ts"),c=r(/*! ../utils/logger */"./src/utils/logger.ts"),u=r(/*! ../utils/codecs */"./src/utils/codecs.ts"),d=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,f=/#EXT-X-MEDIA:(.*)/g,h=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 r=0;r<e.length;r++){var n=e[r];if(n.id===t)return n}},e.convertAVC1ToAVCOTI=function(e){var t=e.split(".");if(t.length>2){var r=t.shift()+".";return r+=parseInt(t.shift()).toString(16),r+=("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,r){var n,i=[],o={},a=!1;for(d.lastIndex=0;null!=(n=d.exec(t));)if(n[1]){var s=new l.AttrList(n[1]),c={attrs:s,bitrate:s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),name:s.NAME,url:e.resolve(n[2],r)},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(n[3]){var f=new l.AttrList(n[3]);f["DATA-ID"]&&(a=!0,o[f["DATA-ID"]]=f)}return{levels:i,sessionData:a?o:null}},e.parseMasterPlaylistMedia=function(t,r,n,i){var o;void 0===i&&(i=[]);var a=[],s=0;for(f.lastIndex=0;null!==(o=f.exec(t));){var c=new l.AttrList(o[1]);if(c.TYPE===n){var u={attrs:c,bitrate:0,id:s++,groupId:c["GROUP-ID"],instreamId:c["INSTREAM-ID"],name:c.NAME||c.LANGUAGE||"",type:n,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:c.LANGUAGE,url:c.URI?e.resolve(c.URI,r):""};if(i.length){var d=e.findGroup(i,u.groupId)||i[0];b(u,d,"audioCodec"),b(u,d,"textCodec")}a.push(u)}}return a},e.parseLevelPlaylist=function(e,t,r,u,d){var f,g,v,b=new a.LevelDetails(t),x=b.fragments,w=null,E=0,S=0,_=0,T=0,k=null,O=new o.Fragment(u,t),C=-1,A=!1;for(h.lastIndex=0,b.m3u8=e;null!==(f=h.exec(e));){A&&(A=!1,(O=new o.Fragment(u,t)).start=_,O.sn=E,O.cc=T,O.level=r,w&&(O.initSegment=w,O.rawProgramDateTime=w.rawProgramDateTime));var D=f[1];if(D){O.duration=parseFloat(D);var L=(" "+f[2]).slice(1);O.title=L||null,O.tagList.push(L?["INF",D,L]:["INF",D])}else if(f[3])Object(n.isFiniteNumber)(O.duration)&&(O.start=_,v&&(O.levelkey=v),O.sn=E,O.level=r,O.cc=T,O.urlId=d,x.push(O),O.relurl=(" "+f[3]).slice(1),y(O,k),k=O,_+=O.duration,E++,S=0,A=!0);else if(f[4]){var I=(" "+f[4]).slice(1);k?O.setByteRange(I,k):O.setByteRange(I)}else if(f[5])O.rawProgramDateTime=(" "+f[5]).slice(1),O.tagList.push(["PROGRAM-DATE-TIME",O.rawProgramDateTime]),-1===C&&(C=x.length);else{if(!(f=f[0].match(p))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(g=1;g<f.length&&void 0===f[g];g++);var j=(" "+f[g]).slice(1),R=(" "+f[g+1]).slice(1),M=f[g+2]?(" "+f[g+2]).slice(1):"";switch(j){case"PLAYLIST-TYPE":b.type=R.toUpperCase();break;case"MEDIA-SEQUENCE":E=b.startSN=parseInt(R);break;case"SKIP":var N=new l.AttrList(R),P=N.decimalInteger("SKIPPED-SEGMENTS");if(Object(n.isFiniteNumber)(P)){b.skippedSegments=P;for(var F=P;F--;)x.unshift(null);E+=P}var B=N.enumeratedString("RECENTLY-REMOVED-DATERANGES");B&&(b.recentlyRemovedDateranges=B.split("\t"));break;case"TARGETDURATION":b.targetduration=parseFloat(R);break;case"VERSION":b.version=parseInt(R);break;case"EXTM3U":break;case"ENDLIST":b.live=!1;break;case"#":(R||M)&&O.tagList.push(M?[R,M]:[R]);break;case"DIS":T++;case"GAP":O.tagList.push([j]);break;case"BITRATE":O.tagList.push([j,R]);break;case"DISCONTINUITY-SEQ":T=parseInt(R);break;case"KEY":var U,H=new l.AttrList(R),z=H.enumeratedString("METHOD"),G=H.URI,K=H.hexadecimalInteger("IV"),W=H.enumeratedString("KEYFORMATVERSIONS"),V=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,V&&(v.keyID=V),W&&(v.keyFormatVersions=W),v.iv=K));break;case"START":var X=new l.AttrList(R).decimalFloatingPoint("TIME-OFFSET");Object(n.isFiniteNumber)(X)&&(b.startTimeOffset=X);break;case"MAP":var Y=new l.AttrList(R);O.relurl=Y.URI,Y.BYTERANGE&&O.setByteRange(Y.BYTERANGE),O.level=r,O.sn="initSegment",v&&(O.levelkey=v),O.initSegment=null,w=O,A=!0;break;case"SERVER-CONTROL":var $=new l.AttrList(R);b.canBlockReload=$.bool("CAN-BLOCK-RELOAD"),b.canSkipUntil=$.optionalFloat("CAN-SKIP-UNTIL",0),b.canSkipDateRanges=b.canSkipUntil>0&&$.bool("CAN-SKIP-DATERANGES"),b.partHoldBack=$.optionalFloat("PART-HOLD-BACK",0),b.holdBack=$.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var J=new l.AttrList(R);b.partTarget=J.decimalFloatingPoint("PART-TARGET");break;case"PART":var Z=b.partList;Z||(Z=b.partList=[]);var Q=S>0?Z[Z.length-1]:void 0,ee=S++,te=new o.Part(new l.AttrList(R),O,t,ee,Q);Z.push(te),O.duration+=te.duration;break;case"PRELOAD-HINT":var re=new l.AttrList(R);b.preloadHint=re;break;case"RENDITION-REPORT":var ne=new l.AttrList(R);b.renditionReports=b.renditionReports||[],b.renditionReports.push(ne);break;default:c.logger.warn("line parsed but not handled: "+f)}}}k&&!k.relurl?(x.pop(),_-=k.duration,b.partList&&(b.fragmentHint=k)):b.partList&&(y(O,k),O.cc=T,b.fragmentHint=O);var ie=x.length,oe=x[0],ae=x[ie-1];if((_+=b.skippedSegments*b.targetduration)>0&&ie&&ae){b.averagetargetduration=_/ie;var se=ae.sn;b.endSN="initSegment"!==se?se:0,oe&&(b.startCC=oe.cc,oe.initSegment||b.fragments.every((function(e){return e.relurl&&(t=e.relurl,m.test(null!=(r=null===(n=i.parseURL(t))||void 0===n?void 0:n.path)?r:""));var t,r,n}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(O=new o.Fragment(u,t)).relurl=ae.relurl,O.level=r,O.sn="initSegment",oe.initSegment=O,b.needSidxRanges=!0))}else b.endSN=0,b.startCC=0;return b.fragmentHint&&(_+=b.fragmentHint.duration),b.totalduration=_,b.endCC=T,C>0&&function(e,t){for(var r=e[t],n=t;n--;){var i=e[n];if(!i)return;i.programDateTime=r.programDateTime-1e3*i.duration,r=i}}(x,C),b},e}();function v(e,t){["video","audio","text"].forEach((function(r){var n=e.filter((function(e){return Object(u.isCodecType)(e,r)}));if(n.length){var i=n.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[r+"Codec"]=i.length>0?i[0]:n[0],e=e.filter((function(e){return-1===n.indexOf(e)}))}})),t.unknownCodecs=e}function b(e,t,r){var n=t[r];n&&(e[r]=n)}function y(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),Object(n.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,r){"use strict";r.r(t);var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! ../events */"./src/events.ts"),o=r(/*! ../errors */"./src/errors.ts"),a=r(/*! ../utils/logger */"./src/utils/logger.ts"),s=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=r(/*! ./m3u8-parser */"./src/loader/m3u8-parser.ts"),c=r(/*! ../types/loader */"./src/types/loader.ts"),u=r(/*! ../utils/attr-list */"./src/utils/attr-list.ts");function d(e,t){var r=e.url;return void 0!==r&&0!==r.indexOf("data:")||(r=t.url),r}var f=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,r=t.pLoader,n=t.loader,i=new(r||n)(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 r=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:c.PlaylistContextType.MANIFEST,url:r,deliveryDirectives:null})},t.onLevelLoading=function(e,t){var r=t.id,n=t.level,i=t.url,o=t.deliveryDirectives;this.load({id:r,groupId:null,level:n,responseType:"text",type:c.PlaylistContextType.LEVEL,url:i,deliveryDirectives:o})},t.onAudioTrackLoading=function(e,t){var r=t.id,n=t.groupId,i=t.url,o=t.deliveryDirectives;this.load({id:r,groupId:n,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:i,deliveryDirectives:o})},t.onSubtitleTrackLoading=function(e,t){var r=t.id,n=t.groupId,i=t.url,o=t.deliveryDirectives;this.load({id:r,groupId:n,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:i,deliveryDirectives:o})},t.load=function(e){var t,r,n,i,o,s,l=this.hls.config,u=this.getInternalLoader(e);if(u){var d=u.context;if(d&&d.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:r=l.manifestLoadingMaxRetry,n=l.manifestLoadingTimeOut,i=l.manifestLoadingRetryDelay,o=l.manifestLoadingMaxRetryTimeout;break;case c.PlaylistContextType.LEVEL:case c.PlaylistContextType.AUDIO_TRACK:case c.PlaylistContextType.SUBTITLE_TRACK:r=0,n=l.levelLoadingTimeOut;break;default:r=l.levelLoadingMaxRetry,n=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 f=s.partTarget,h=s.targetduration;f&&h&&(n=Math.min(1e3*Math.max(3*f,.8*h),n))}var p={timeout:n,maxRetry:r,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,r,n){if(void 0===n&&(n=null),r.isSidxRequest)return this.handleSidxRequest(e,r),void this.handlePlaylistLoaded(e,t,r,n);this.resetInternalLoader(r.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,r,n):this.handleMasterPlaylist(e,t,r,n)):this.handleManifestParsingError(e,r,"no EXTM3U delimiter",n)},t.loaderror=function(e,t,r){void 0===r&&(r=null),this.handleNetworkError(t,r,!1,e)},t.loadtimeout=function(e,t,r){void 0===r&&(r=null),this.handleNetworkError(t,r,!0)},t.handleMasterPlaylist=function(e,t,r,n){var o=this.hls,s=e.data,c=d(e,r),f=l.default.parseMasterPlaylist(s,c),h=f.levels,p=f.sessionData;if(h.length){var m=h.map((function(e){return{id:e.attrs.AUDIO,audioCodec:e.audioCodec}})),g=h.map((function(e){return{id:e.attrs.SUBTITLES,textCodec:e.textCodec}})),v=l.default.parseMasterPlaylistMedia(s,c,"AUDIO",m),b=l.default.parseMasterPlaylistMedia(s,c,"SUBTITLES",g),y=l.default.parseMasterPlaylistMedia(s,c,"CLOSED-CAPTIONS");v.length&&(v.some((function(e){return!e.url}))||!h[0].audioCodec||h[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:h,audioTracks:v,subtitles:b,captions:y,url:c,stats:t,networkDetails:n,sessionData:p})}else this.handleManifestParsingError(e,r,"no level found in manifest",n)},t.handleTrackOrLevelPlaylist=function(e,t,r,a){var s=this.hls,f=r.id,h=r.level,p=r.type,m=d(e,r),g=Object(n.isFiniteNumber)(f)?f:0,v=Object(n.isFiniteNumber)(h)?h:g,b=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}}(r),y=l.default.parseLevelPlaylist(e.data,m,v,b,g);if(y.fragments.length){if(p===c.PlaylistContextType.MANIFEST){var x={attrs:new u.AttrList({}),bitrate:0,details:y,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(),y.needSidxRanges){var w,E=null===(w=y.fragments[0].initSegment)||void 0===w?void 0:w.url;this.load({url:E,isSidxRequest:!0,type:p,level:h,levelDetails:y,id:f,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null})}else r.levelDetails=y,this.handlePlaylistLoaded(e,t,r,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 r.level?r.level:void 0})},t.handleSidxRequest=function(e,t){var r=Object(s.parseSegmentIndex)(new Uint8Array(e.data));if(r){var n=r.references,i=t.levelDetails;n.forEach((function(e,t){var n=e.info,o=i.fragments[t];0===o.byteRange.length&&o.setByteRange(String(1+n.end-n.start)+"@"+String(n.start)),o.initSegment&&o.initSegment.setByteRange(String(r.moovEndOffset)+"@0")}))}},t.handleManifestParsingError=function(e,t,r,n){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:r,response:e,context:t,networkDetails:n})},t.handleNetworkError=function(e,t,r,n){void 0===r&&(r=!1),a.logger.warn("[playlist-loader]: A network "+(r?"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=r?o.ErrorDetails.MANIFEST_LOAD_TIMEOUT:o.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case c.PlaylistContextType.LEVEL:s=r?o.ErrorDetails.LEVEL_LOAD_TIMEOUT:o.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.AUDIO_TRACK:s=r?o.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:s=r?o.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:o.ErrorDetails.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(e.type);var d={type:o.ErrorTypes.NETWORK_ERROR,details:s,fatal:l,url:e.url,loader:u,context:e,networkDetails:t};n&&(d.response=n),this.hls.trigger(i.Events.ERROR,d)},t.handlePlaylistLoaded=function(e,t,r,n){var o=r.type,a=r.level,s=r.id,l=r.groupId,u=r.loader,d=r.levelDetails,f=r.deliveryDirectives;if(null!=d&&d.targetduration){if(u)switch(d.live&&(u.getCacheAge&&(d.ageHeader=u.getCacheAge()||0),u.getCacheAge&&!isNaN(d.ageHeader)||(d.ageHeader=0)),o){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(i.Events.LEVEL_LOADED,{details:d,level:a||0,id:s||0,stats:t,networkDetails:n,deliveryDirectives:f});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(i.Events.AUDIO_TRACK_LOADED,{details:d,id:s||0,groupId:l||"",stats:t,networkDetails:n,deliveryDirectives:f});break;case c.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(i.Events.SUBTITLE_TRACK_LOADED,{details:d,id:s||0,groupId:l||"",stats:t,networkDetails:n,deliveryDirectives:f})}}else this.handleManifestParsingError(e,r,"invalid target duration",n)},e}();t.default=f},"./src/polyfills/number.ts":
/*!*********************************!*\
!*** ./src/polyfills/number.ts ***!
\*********************************/
/*! exports provided: isFiniteNumber, MAX_SAFE_INTEGER */function(e,t,r){"use strict";r.r(t),r.d(t,"isFiniteNumber",(function(){return n})),r.d(t,"MAX_SAFE_INTEGER",(function(){return i}));var n=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,r){"use strict";r.r(t);var n=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=n},"./src/remux/mp4-generator.ts":
/*!************************************!*\
!*** ./src/remux/mp4-generator.ts ***!
\************************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t);var n=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 r=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]),n=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:r,audio:n};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,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];for(var o=n.length,a=o;o--;)t+=n[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(n[o],t),t+=n[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,r){r*=t;var i=Math.floor(r/(n+1)),o=Math.floor(r%(n+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,r,n){return e.box(e.types.moof,e.mfhd(t),e.traf(n,r))},e.moov=function(t){for(var r=t.length,n=[];r--;)n[r]=e.trak(t[r]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(n).concat(e.mvex(t)))},e.mvex=function(t){for(var r=t.length,n=[];r--;)n[r]=e.trex(t[r]);return e.box.apply(null,[e.types.mvex].concat(n))},e.mvhd=function(t,r){r*=t;var i=Math.floor(r/(n+1)),o=Math.floor(r%(n+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 r,n,i=t.samples||[],o=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,o[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.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 r,n,i,o=[],a=[];for(r=0;r<t.sps.length;r++)i=(n=t.sps[r]).byteLength,o.push(i>>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(n));for(r=0;r<t.pps.length;r++)i=(n=t.pps[r]).byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(n));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],d=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,d>>24,d>>16&255,d>>8&255,255&d])))},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 r=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,r>>8&255,255&r,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var r=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,r>>8&255,255&r,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 r=t.id,i=t.duration*t.timescale,o=t.width,a=t.height,s=Math.floor(i/(n+1)),l=Math.floor(i%(n+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,r>>24&255,r>>16&255,r>>8&255,255&r,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,r){var i=e.sdtp(t),o=t.id,a=Math.floor(r/(n+1)),s=Math.floor(r%(n+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 r=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,r){var n,i,o,a,s,l,c=t.samples||[],u=c.length,d=12+16*u,f=new Uint8Array(d);for(r+=8+d,f.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,255&u,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),n=0;n<u;n++)o=(i=c[n]).duration,a=i.size,s=i.flags,l=i.cts,f.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*n);return e.box(e.types.trun,f)},e.initSegment=function(t){e.types||e.init();var r=e.moov(t),n=new Uint8Array(e.FTYP.byteLength+r.byteLength);return n.set(e.FTYP),n.set(r,e.FTYP.byteLength),n},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,r){"use strict";r.r(t),r.d(t,"default",(function(){return m})),r.d(t,"normalizePts",(function(){return g}));var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! ./aac-helper */"./src/remux/aac-helper.ts"),o=r(/*! ./mp4-generator */"./src/remux/mp4-generator.ts"),a=r(/*! ../events */"./src/events.ts"),s=r(/*! ../errors */"./src/errors.ts"),l=r(/*! ../utils/logger */"./src/utils/logger.ts"),c=r(/*! ../types/loader */"./src/types/loader.ts"),u=r(/*! ../utils/timescale-conversion */"./src/utils/timescale-conversion.ts");function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var f=null,h=null,p=!1,m=function(){function e(e,t,r,n){if(void 0===n&&(n=""),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=r,this.ISGenerated=!1,null===f){var i=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);f=i?parseInt(i[1]):0}if(null===h){var o=navigator.userAgent.match(/Safari\/(\d+)/i);h=o?parseInt(o[1]):0}p=!!f&&f<75||!!h&&h<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,r=e.reduce((function(e,r){var n=r.pts-e;return n<-4294967296?(t=!0,g(e,r.pts)):n>0?e:r.pts}),e[0].pts);return t&&l.logger.debug("PTS rollover detected"),r},t.remux=function(e,t,r,n,i,o,a,s){var u,d,f,h,p,m,v=i,b=i,y=e.pid>-1,x=t.pid>-1,w=t.samples.length,E=e.samples.length>0,S=w>1;if((!y||E)&&(!x||S)||this.ISGenerated||a){this.ISGenerated||(f=this.generateIS(e,t,i));var _=this.isVideoContiguous,T=-1;if(S&&(T=function(e){for(var t=0;t<e.length;t++)if(e[t].key)return t;return-1}(t.samples),!_&&this.config.forceKeyFrameOnDiscontinuity))if(m=!0,T>0){l.logger.warn("[mp4-remuxer]: Dropped "+T+" out of "+w+" video samples due to a missing keyframe");var k=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(T),t.dropped+=T,b+=(t.samples[0].pts-k)/(t.timescale||9e4)}else-1===T&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+w+" video samples"),m=!1);if(this.ISGenerated){if(E&&S){var O=this.getVideoStartPts(t.samples),C=(g(e.samples[0].pts,O)-O)/t.inputTimeScale;v+=Math.max(0,C),b+=Math.max(0,-C)}if(E){if(e.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),f=this.generateIS(e,t,i)),d=this.remuxAudio(e,v,this.isAudioContiguous,o,x||S||s===c.PlaylistLevelType.AUDIO?b:void 0),S){var A=d?d.endPTS-d.startPTS:0;t.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),f=this.generateIS(e,t,i)),u=this.remuxVideo(t,b,_,A)}}else S&&(u=this.remuxVideo(t,b,_,0));u&&(u.firstKeyFrame=T,u.independent=-1!==T)}}return this.ISGenerated&&(r.samples.length&&(p=this.remuxID3(r,i)),n.samples.length&&(h=this.remuxText(n,i))),{audio:d,video:u,initSegment:f,independent:m,text:h,id3:p}},t.generateIS=function(e,t,r){var i,a,s,l=e.samples,c=t.samples,u=this.typeSupported,d={},f=!Object(n.isFiniteNumber)(this._initPTS),h="audio/mp4";if(f&&(i=a=1/0),e.config&&l.length&&(e.timescale=e.samplerate,e.isAAC||(u.mpeg?(h="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3")),d.audio={id:"audio",container:h,codec:e.codec,initSegment:!e.isAAC&&u.mpeg?new Uint8Array(0):o.default.initSegment([e]),metadata:{channelCount:e.channelCount}},f&&(s=e.inputTimeScale,i=a=l[0].pts-Math.round(s*r))),t.sps&&t.pps&&c.length&&(t.timescale=t.inputTimeScale,d.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:o.default.initSegment([t]),metadata:{width:t.width,height:t.height}},f)){s=t.inputTimeScale;var p=this.getVideoStartPts(c),m=Math.round(s*r);a=Math.min(a,g(c[0].dts,p)-m),i=Math.min(i,p-m)}if(Object.keys(d).length)return this.ISGenerated=!0,f&&(this._initPTS=i,this._initDTS=a),{tracks:d,initPTS:i,timescale:s}},t.remuxVideo=function(e,t,r,n){var i,c,h,m=e.inputTimeScale,b=e.samples,y=[],x=b.length,w=this._initPTS,E=this.nextAvcDts,S=8,_=Number.POSITIVE_INFINITY,T=Number.NEGATIVE_INFINITY,k=0,O=!1;r&&null!==E||(E=t*m-(b[0].pts-g(b[0].dts,b[0].pts)));for(var C=0;C<x;C++){var A=b[C];A.pts=g(A.pts-w,E),A.dts=g(A.dts-w,E),A.dts>A.pts&&(k=Math.max(Math.min(k,A.pts-A.dts),-18e3)),A.dts<b[C>0?C-1:C].dts&&(O=!0)}O&&b.sort((function(e,t){var r=e.dts-t.dts,n=e.pts-t.pts;return r||n})),c=b[0].dts,h=b[b.length-1].dts;var D=Math.round((h-c)/(x-1));if(k<0){if(k<-2*D){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(u.toMsFromMpegTsClock)(-D,!0)+" ms");for(var L=k,I=0;I<x;I++)b[I].dts=L=Math.max(L,b[I].pts-D),b[I].pts=Math.max(L,b[I].pts)}else{l.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(u.toMsFromMpegTsClock)(k,!0)+" ms to overcome this issue");for(var j=0;j<x;j++)b[j].dts=b[j].dts+k}c=b[0].dts}if(r){var R=c-E,M=R>D;if(M||R<-1){M?l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(R,!0)+" ms ("+R+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(-R,!0)+" ms ("+R+"dts) overlapping between fragments detected"),c=E;var N=b[0].pts-R;b[0].dts=c,b[0].pts=N,l.logger.log("Video: First PTS/DTS adjusted: "+Object(u.toMsFromMpegTsClock)(N,!0)+"/"+Object(u.toMsFromMpegTsClock)(c,!0)+", delta: "+Object(u.toMsFromMpegTsClock)(R,!0)+" ms")}}p&&(c=Math.max(0,c));for(var P=0,F=0,B=0;B<x;B++){for(var U=b[B],H=U.units,z=H.length,G=0,K=0;K<z;K++)G+=H[K].data.length;F+=G,P+=z,U.length=G,U.dts=Math.max(U.dts,c),U.pts=Math.max(U.pts,U.dts,0),_=Math.min(U.pts,_),T=Math.max(U.pts,T)}h=b[x-1].dts;var W,V=F+4*P+8;try{W=new Uint8Array(V)}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:V,reason:"fail allocating video mdat "+V})}var q=new DataView(W.buffer);q.setUint32(0,V),W.set(o.default.types.mdat,4);for(var X=0;X<x;X++){for(var Y=b[X],$=Y.units,J=0,Z=0,Q=$.length;Z<Q;Z++){var ee=$[Z],te=ee.data,re=ee.data.byteLength;q.setUint32(S,re),S+=4,W.set(te,S),S+=re,J+=4+re}if(X<x-1)i=b[X+1].dts-Y.dts;else{var ne=this.config,ie=Y.dts-b[X>0?X-1:X].dts;if(ne.stretchShortVideoTrack&&null!==this.nextAudioPts){var oe=Math.floor(ne.maxBufferHole*m),ae=(n?_+n*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);y.push(new v(Y.key,i,J,se))}if(y.length&&f&&f<70){var le=y[0].flags;le.dependsOn=2,le.isNonSync=0}console.assert(void 0!==i,"mp4SampleDuration must be computed"),this.nextAvcDts=E=h+i,this.isVideoContiguous=!0;var ce={data1:o.default.moof(e.sequenceNumber++,c,d({},e,{samples:y})),data2:W,startPTS:_/m,endPTS:(T+i)/m,startDTS:c/m,endDTS:E/m,type:"video",hasAudio:!1,hasVideo:!0,nb:y.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,r,n,c){var u=e.inputTimeScale,f=u/(e.samplerate?e.samplerate:u),h=e.isAAC?1024:1152,p=h*f,m=this._initPTS,b=!e.isAAC&&this.typeSupported.mpeg,y=[],x=e.samples,w=b?0:8,E=this.nextAudioPts||-1,S=t*u;if(this.isAudioContiguous=r=r||x.length&&E>0&&(n&&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)})),!r||E<0){if(!(x=x.filter((function(e){return e.pts>=0}))).length)return;E=0===c?0:n?Math.max(0,S):x[0].pts}if(e.isAAC)for(var _=void 0!==c,T=this.config.maxAudioFramesDrift,k=0,O=E;k<x.length;k++){var C=x[k],A=C.pts,D=A-O,L=Math.abs(1e3*D/u);if(D<=-T*p&&_)0===k&&(l.logger.warn("Audio frame @ "+(A/u).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*D/u)+" ms."),this.nextAudioPts=E=O=A);else if(D>=T*p&&L<1e4&&_){var I=Math.round(D/p);(O=A-I*p)<0&&(I--,O+=p),0===k&&(this.nextAudioPts=E=O),l.logger.warn("[mp4-remuxer]: Injecting "+I+" audio frame @ "+(O/u).toFixed(3)+"s due to "+Math.round(1e3*D/u)+" ms gap.");for(var j=0;j<I;j++){var R=Math.max(O,0),M=i.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);M||(l.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),M=C.unit.subarray()),x.splice(k,0,{unit:M,pts:R}),O+=p,k++}}C.pts=O,O+=p}for(var N,P=null,F=null,B=0,U=x.length;U--;)B+=x[U].unit.byteLength;for(var H=0,z=x.length;H<z;H++){var G=x[H],K=G.unit,W=G.pts;if(null!==F)y[H-1].duration=Math.round((W-F)/f);else{if(r&&e.isAAC&&(W=E),P=W,!(B>0))return;B+=w;try{N=new Uint8Array(B)}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:B,reason:"fail allocating audio mdat "+B})}b||(new DataView(N.buffer).setUint32(0,B),N.set(o.default.types.mdat,4))}N.set(K,w);var V=K.byteLength;w+=V,y.push(new v(!0,h,V,0)),F=W}var q=y.length;if(q){var X=y[y.length-1];this.nextAudioPts=E=F+f*X.duration;var Y=b?new Uint8Array(0):o.default.moof(e.sequenceNumber++,P/f,d({},e,{samples:y}));e.samples=[];var $=P/u,J=E/u,Z={data1:Y,data2:N,startPTS:$,endPTS:J,startDTS:$,endDTS:J,type:"audio",hasAudio:!0,hasVideo:!1,nb:q};return this.isAudioContiguous=!0,console.assert(N.length,"MDAT length must not be zero"),Z}},t.remuxEmptyAudio=function(e,t,r,n){var o=e.inputTimeScale,a=o/(e.samplerate?e.samplerate:o),s=this.nextAudioPts,c=(null!==s?s:n.startDTS*o)+this._initDTS,u=n.endDTS*o+this._initDTS,d=1024*a,f=Math.ceil((u-c)/d),h=i.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),h){for(var p=[],m=0;m<f;m++){var g=c+m*d;p.push({unit:h,pts:g,dts:g})}return e.samples=p,this.remuxAudio(e,t,r,!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 r=e.samples.length;if(r){for(var n=e.inputTimeScale,i=this._initPTS,o=this._initDTS,a=0;a<r;a++){var s=e.samples[a];s.pts=g(s.pts-i,t*n)/n,s.dts=g(s.dts-o,t*n)/n}var l=e.samples;return e.samples=[],{samples:l}}},t.remuxText=function(e,t){var r=e.samples.length;if(r){for(var n=e.inputTimeScale,i=this._initPTS,o=0;o<r;o++){var a=e.samples[o];a.pts=g(a.pts-i,t*n)/n}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 r;if(null===t)return e;for(r=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=r;return e}var v=function(e,t,r,n){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=r,this.cts=n,this.flags=new b(e)},b=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,r){"use strict";r.r(t);var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),o=r(/*! ../loader/fragment */"./src/loader/fragment.ts"),a=r(/*! ../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,r){this.audioCodec=t,this.videoCodec=r,this.generateInitSegment(e),this.emitInitSegment=!0},t.generateInitSegment=function(e){var t=this.audioCodec,r=this.videoCodec;if(!e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var n=this.initData=Object(i.parseInitSegment)(e);t||(t=c(n.audio,o.ElementaryStreamTypes.AUDIO)),r||(r=c(n.video,o.ElementaryStreamTypes.VIDEO));var s={};n.audio&&n.video?s.audiovideo={container:"video/mp4",codec:t+","+r,initSegment:e,id:"main"}:n.audio?s.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:n.video?s.video={container:"video/mp4",codec:r,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,r,o,s){var c=this.initPTS,u=this.lastEndDTS,d={audio:void 0,video:void 0,text:o,id3:r,initSegment:void 0};Object(n.isFiniteNumber)(u)||(u=this.lastEndDTS=s||0);var f=t.samples;if(!f||!f.length)return d;var h={initPTS:void 0,timescale:1},p=this.initData;if(p&&p.length||(this.generateInitSegment(f),p=this.initData),!p||!p.length)return a.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),d;this.emitInitSegment&&(h.tracks=this.initTracks,this.emitInitSegment=!1),Object(n.isFiniteNumber)(c)||(this.initPTS=h.initPTS=c=l(p,f,u));var m=Object(i.getDuration)(f,p),g=u,v=m+g;Object(i.offsetStartDTS)(p,f,c),m>0?this.lastEndDTS=v:(a.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var b=!!p.audio,y=!!p.video,x="";b&&(x+="audio"),y&&(x+="video");var w={data1:f,startPTS:g,startDTS:g,endPTS:v,endDTS:v,type:x,hasAudio:b,hasVideo:y,nb:1,dropped:0};return d.audio="audio"===w.type?w:void 0,d.video="audio"!==w.type?w:void 0,d.text=o,d.id3=r,d.initSegment=h,d},e}(),l=function(e,t,r){return Object(i.getStartDTS)(e,t)-r};function c(e,t){var r=null==e?void 0:e.codec;return r&&r.length>4?r:"hvc1"===r?"hvc1.1.c.L120.90":"av01"===r?"av01.0.04M.08":"avc1"===r||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,r){"use strict";r.r(t),r.d(t,"default",(function(){return n}));var n=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,r){"use strict";r.r(t),r.d(t,"CMCDVersion",(function(){return a})),r.d(t,"CMCDObjectType",(function(){return n})),r.d(t,"CMCDStreamingFormat",(function(){return i})),r.d(t,"CMCDStreamType",(function(){return o}));var n,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"}(n||(n={})),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,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i;function o(e,t){var r=e.canSkipUntil,n=e.canSkipDateRanges,o=e.endSN;return r&&(void 0!==t?t-o:0)<r?n?i.v2:i.Yes:i.No}r.r(t),r.d(t,"HlsSkip",(function(){return i})),r.d(t,"getSkipValue",(function(){return o})),r.d(t,"HlsUrlParameters",(function(){return a})),r.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,r){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=r}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,r,i;return t=e,(r=[{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)}}])&&n(t.prototype,r),i&&n(t,i),e}()},"./src/types/loader.ts":
/*!*****************************!*\
!*** ./src/types/loader.ts ***!
\*****************************/
/*! exports provided: PlaylistContextType, PlaylistLevelType */function(e,t,r){"use strict";var n,i;r.r(t),r.d(t,"PlaylistContextType",(function(){return n})),r.d(t,"PlaylistLevelType",(function(){return i})),function(e){e.MANIFEST="manifest",e.LEVEL="level",e.AUDIO_TRACK="audioTrack",e.SUBTITLE_TRACK="subtitleTrack"}(n||(n={})),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,r){"use strict";r.r(t),r.d(t,"ChunkMetadata",(function(){return n}));var n=function(e,t,r,n,i,o){void 0===n&&(n=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=r,this.size=n,this.part=i,this.partial=o}},"./src/utils/attr-list.ts":
/*!********************************!*\
!*** ./src/utils/attr-list.ts ***!
\********************************/
/*! exports provided: AttrList */function(e,t,r){"use strict";r.r(t),r.d(t,"AttrList",(function(){return o}));var n=/^(\d+)x(\d+)$/,i=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,o=function(){function e(t){for(var r in"string"==typeof t&&(t=e.parseAttrList(t)),t)t.hasOwnProperty(r)&&(this[r]=t[r])}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 r=new Uint8Array(t.length/2),n=0;n<t.length/2;n++)r[n]=parseInt(t.slice(2*n,2*n+2),16);return r}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 r=this[e];return r?parseFloat(r):t},t.enumeratedString=function(e){return this[e]},t.bool=function(e){return"YES"===this[e]},t.decimalResolution=function(e){var t=n.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,r={};for(i.lastIndex=0;null!==(t=i.exec(e));){var n=t[2];0===n.indexOf('"')&&n.lastIndexOf('"')===n.length-1&&(n=n.slice(1,-1)),r[t[1]]=n}return r},e}()},"./src/utils/binary-search.ts":
/*!************************************!*\
!*** ./src/utils/binary-search.ts ***!
\************************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t),t.default={search:function(e,t){for(var r=0,n=e.length-1,i=null,o=null;r<=n;){var a=t(o=e[i=(r+n)/2|0]);if(a>0)r=i+1;else{if(!(a<0))return o;n=i-1}}return null}}},"./src/utils/buffer-helper.ts":
/*!************************************!*\
!*** ./src/utils/buffer-helper.ts ***!
\************************************/
/*! exports provided: BufferHelper */function(e,t,r){"use strict";r.r(t),r.d(t,"BufferHelper",(function(){return o}));var n=r(/*! ./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,r){try{if(t)for(var n=e.getBuffered(t),i=0;i<n.length;i++)if(r>=n.start(i)&&r<=n.end(i))return!0}catch(e){}return!1},e.bufferInfo=function(t,r,n){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,r,n)}}catch(e){}return{len:0,start:r,end:r,nextStart:void 0}},e.bufferedInfo=function(e,t,r){t=Math.max(0,t),e.sort((function(e,t){var r=e.start-t.start;return r||t.end-e.end}));var n=[];if(r)for(var i=0;i<e.length;i++){var o=n.length;if(o){var a=n[o-1].end;e[i].start-a<r?e[i].end>a&&(n[o-1].end=e[i].end):n.push(e[i])}else n.push(e[i])}else n=e;for(var s,l=0,c=t,u=t,d=0;d<n.length;d++){var f=n[d].start,h=n[d].end;if(t+r>=f&&t<h)c=f,l=(u=h)-t;else if(t+r<f){s=f;break}}return{len:l,start:c||0,end:u||0,nextStart:s}},e.getBuffered=function(e){try{return e.buffered}catch(e){return n.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,r){"use strict";r.r(t),r.d(t,"Row",(function(){return g})),r.d(t,"CaptionScreen",(function(){return v}));var n,i=r(/*! ../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},d=["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"}(n||(n={}));var f=function(){function e(){this.time=null,this.verboseLevel=n.ERROR}return e.prototype.log=function(e,t){this.verboseLevel>=e&&i.logger.log(this.time+" ["+e+"] "+t)},e}(),h=function(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].toString(16));return t},p=function(){function e(e,t,r,n,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=r||!1,this.background=n||"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"],r=0;r<t.length;r++){var n=t[r];e.hasOwnProperty(n)&&(this[n]=e[n])}},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,r,n,i,o){this.uchar=void 0,this.penState=void 0,this.uchar=e||" ",this.penState=new p(t,r,n,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,r=0;r<100;r++)if(!this.chars[r].equals(e.chars[r])){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(n.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>100&&(this.logger.log(n.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var r=this.pos+1;r<t+1;r++)this.chars[r].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(n.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,r=0;r<100;r++){var n=this.chars[r].uchar;" "!==n&&(t=!1),e.push(n)}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,r=0;r<15;r++)if(!this.rows[r].equals(e.rows[r])){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(n.INFO,"setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){this.logger.log(n.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 r=0;r<15;r++)this.rows[r].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,d=Math.max(u-1,0);c.setCursor(e.indent),e.color=c.chars[d].penState.foreground}var f={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(f)},t.setBkgData=function(e){this.logger.log(n.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(n.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(n.INFO,"Rolling up")}else this.logger.log(n.DEBUG,"roll_up but nrRollUpRows not set yet")},t.getDisplayText=function(e){e=e||!1;for(var t=[],r="",n=-1,i=0;i<15;i++){var o=this.rows[i].getTextString();o&&(n=i+1,e?t.push("Row "+n+": '"+o+"'"):t.push(o.trim()))}return t.length>0&&(r=e?"["+t.join(" | ")+"]":t.join("\n")),r},t.getTextAndFormat=function(){return this.rows},e}(),b=function(){function e(e,t,r){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(r),this.nonDisplayedMemory=new v(r),this.lastOutputScreen=new v(r),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=r}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(n.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 r=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(n.INFO,r+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(n.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},t.ccRCL=function(){this.logger.log(n.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.ccBS=function(){this.logger.log(n.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(n.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.ccRU=function(e){this.logger.log(n.INFO,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},t.ccFON=function(){this.logger.log(n.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.ccRDC=function(){this.logger.log(n.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.ccTR=function(){this.logger.log(n.INFO,"TR"),this.setMode("MODE_TEXT")},t.ccRTD=function(){this.logger.log(n.INFO,"RTD"),this.setMode("MODE_TEXT")},t.ccEDM=function(){this.logger.log(n.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.ccCR=function(){this.logger.log(n.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.ccENM=function(){this.logger.log(n.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.ccEOC=function(){if(this.logger.log(n.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(n.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},t.ccTO=function(e){this.logger.log(n.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 r=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][r]}this.logger.log(n.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}(),y=function(){function e(e,t,r){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var n=new f;this.channels=[null,new b(e,t,n),new b(e+1,r,n)],this.cmdHistory={a:null,b:null},this.logger=n}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 r,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(n.DATA,"["+h([t[s],t[s+1]])+"] -> ("+h([i,o])+")"),(r=this.parseCmd(i,o))||(r=this.parseMidrow(i,o)),r||(r=this.parsePAC(i,o)),r||(r=this.parseBackgroundAttributes(i,o)),!r&&(a=this.parseChars(i,o))){var l=this.currentChannel;l&&l>0?this.channels[l].insertChars(a):this.logger.log(n.WARNING,"No channel found yet. TEXT-MODE?")}r||a||this.logger.log(n.WARNING,"Couldn't parse cleaned data "+h([i,o])+" orig: "+h([t[s],t[s+1]]))}},t.parseCmd=function(e,t){var r=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,r))return x(null,null,r),this.logger.log(n.DEBUG,"Repeated command ("+h([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,r),this.currentChannel=i,!0},t.parseMidrow=function(e,t){var r=0;if((17===e||25===e)&&t>=32&&t<=47){if((r=17===e?1:2)!==this.currentChannel)return this.logger.log(n.ERROR,"Mismatch channel in midrow parsing"),!1;var i=this.channels[r];return!!i&&(i.ccMIDROW(t),this.logger.log(n.DEBUG,"MIDROW ("+h([e,t])+")"),!0)}return!1},t.parsePAC=function(e,t){var r,n=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,n))return x(null,null,n),!0;var i=e<=23?1:2;r=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(r,t)),x(e,t,n),this.currentChannel=i,!0)},t.interpretPAC=function(e,t){var r,n={color:null,italics:!1,indent:null,underline:!1,row:e};return r=t>95?t-96:t-64,n.underline=1==(1&r),r<=13?n.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(n.italics=!0,n.color="white"):n.indent=4*Math.floor((r-16)/2),n},t.parseChars=function(e,t){var r,i,o=null,s=null;if(e>=25?(r=2,s=e-8):(r=1,s=e),s>=17&&s<=19?(i=17===s?t+80:18===s?t+112:t+144,this.logger.log(n.INFO,"Special char '"+a(i)+"' in channel "+r),o=[i]):e>=32&&e<=127&&(o=0===t?[e]:[e,t]),o){var l=h(o);this.logger.log(n.DEBUG,"Char codes = "+l.join(",")),x(e,t,this.cmdHistory)}return o},t.parseBackgroundAttributes=function(e,t){var r;if(!((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47))return!1;var n={};16===e||24===e?(r=Math.floor((t-32)/2),n.background=d[r],t%2==1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0));var i=e<=23?1:2;return this.channels[i].setBkgData(n),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 r=this.channels[t];r&&r.cueSplitAtTime(e)}},e}();function x(e,t,r){r.a=e,r.b=t}function w(e,t,r){return r.a===e&&r.b===t}t.default=y},"./src/utils/codecs.ts":
/*!*****************************!*\
!*** ./src/utils/codecs.ts ***!
\*****************************/
/*! exports provided: isCodecType, isCodecSupportedInMp4 */function(e,t,r){"use strict";r.r(t),r.d(t,"isCodecType",(function(){return i})),r.d(t,"isCodecSupportedInMp4",(function(){return o}));var n={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 r=n[t];return!!r&&!0===r[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,r){"use strict";r.r(t);var n=r(/*! ./vttparser */"./src/utils/vttparser.ts"),i=r(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts"),o=r(/*! ./texttrack-utils */"./src/utils/texttrack-utils.ts"),a=/\s/,s={newCue:function(e,t,r,s){for(var l,c,u,d,f,h=[],p=self.VTTCue||self.TextTrackCue,m=0;m<s.rows.length;m++)if(u=!0,d=0,f="",!(l=s.rows[m]).isEmpty()){for(var g=0;g<l.chars.length;g++)a.test(l.chars[g].uchar)&&u?d++:(f+=l.chars[g].uchar,u=!1);l.cueStartTime=t,t===r&&(r+=1e-4),d>=16?d--:d++;var v=Object(n.fixLineBreaks)(f.trim()),b=Object(i.generateCueId)(t,r,v);e&&e.cues&&e.cues.getCueById(b)||((c=new p(t,r,v)).id=b,c.line=m+1,c.align="left",c.position=10+Math.min(80,10*Math.floor(8*d/32)),h.push(c))}return e&&h.length&&(h.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})),h.forEach((function(t){return Object(o.addCueToTrack)(e,t)}))),h}};t.default=s},"./src/utils/discontinuities.ts":
/*!**************************************!*\
!*** ./src/utils/discontinuities.ts ***!
\**************************************/
/*! exports provided: findFirstFragWithCC, shouldAlignOnDiscontinuities, findDiscontinuousReferenceFrag, adjustSlidingStart, alignStream, alignPDT, alignFragmentByPDTDelta, alignMediaPlaylistByPDT */function(e,t,r){"use strict";r.r(t),r.d(t,"findFirstFragWithCC",(function(){return a})),r.d(t,"shouldAlignOnDiscontinuities",(function(){return s})),r.d(t,"findDiscontinuousReferenceFrag",(function(){return l})),r.d(t,"adjustSlidingStart",(function(){return u})),r.d(t,"alignStream",(function(){return d})),r.d(t,"alignPDT",(function(){return f})),r.d(t,"alignFragmentByPDTDelta",(function(){return h})),r.d(t,"alignMediaPlaylistByPDT",(function(){return p}));var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! ./logger */"./src/utils/logger.ts"),o=r(/*! ../controller/level-helper */"./src/controller/level-helper.ts");function a(e,t){for(var r=null,n=0,i=e.length;n<i;n++){var o=e[n];if(o&&o.cc===t){r=o;break}}return r}function s(e,t,r){return!(!t.details||!(r.endCC>r.startCC||e&&e.cc<r.startCC))}function l(e,t){var r=e.fragments,n=t.fragments;if(n.length&&r.length){var o=a(r,n[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 r=e.start+t;e.start=e.startPTS=r,e.endPTS=r+e.duration}}function u(e,t){for(var r=t.fragments,n=0,i=r.length;n<i;n++)c(r[n],e);t.fragmentHint&&c(t.fragmentHint,e),t.alignedSliding=!0}function d(e,t,r){t&&(function(e,t,r){if(s(e,r,t)){var o=l(r.details,t);o&&Object(n.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,r,t),!r.alignedSliding&&t.details&&f(r,t.details),r.alignedSliding||!t.details||r.skippedSegments||Object(o.adjustSliding)(t.details,r))}function f(e,t){if(t.fragments.length&&e.hasProgramDateTime&&t.hasProgramDateTime){var r=t.fragments[0].programDateTime,o=e.fragments[0].programDateTime,a=(o-r)/1e3+t.fragments[0].start;a&&Object(n.isFiniteNumber)(a)&&(i.logger.log("Adjusting PTS using programDateTime delta "+(o-r)+"ms, sliding:"+a.toFixed(3)+" "+e.url+" "),u(a,e))}}function h(e,t){var r=e.programDateTime;if(r){var n=(r-t)/1e3;e.start=e.startPTS=n,e.endPTS=n+e.duration}}function p(e,t){if(t.fragments.length&&e.hasProgramDateTime&&t.hasProgramDateTime){var r=t.fragments[0].programDateTime-1e3*t.fragments[0].start;e.fragments.forEach((function(e){h(e,r)})),e.fragmentHint&&h(e.fragmentHint,r),e.alignedSliding=!0}}},"./src/utils/ewma-bandwidth-estimator.ts":
/*!***********************************************!*\
!*** ./src/utils/ewma-bandwidth-estimator.ts ***!
\***********************************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t);var n=r(/*! ../utils/ewma */"./src/utils/ewma.ts"),i=function(){function e(e,t,r){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new n.default(e),this.fast_=new n.default(t)}var t=e.prototype;return t.update=function(e,t){var r=this.slow_,i=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new n.default(e,r.getEstimate(),r.getTotalWeight())),this.fast_.halfLife!==t&&(this.fast_=new n.default(t,i.getEstimate(),i.getTotalWeight()))},t.sample=function(e,t){var r=(e=Math.max(e,this.minDelayMs_))/1e3,n=8*t/r;this.fast_.sample(r,n),this.slow_.sample(r,n)},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,r){"use strict";r.r(t);var n=function(){function e(e,t,r){void 0===t&&(t=0),void 0===r&&(r=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_=r}var t=e.prototype;return t.sample=function(e,t){var r=Math.pow(this.alpha_,e);this.estimate_=t*(1-r)+r*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=n},"./src/utils/fetch-loader.ts":
/*!***********************************!*\
!*** ./src/utils/fetch-loader.ts ***!
\***********************************/
/*! exports provided: fetchSupported, default */function(e,t,r){"use strict";r.r(t),r.d(t,"fetchSupported",(function(){return f}));var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),o=r(/*! ../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||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;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,n)}function n(){return s(e,arguments,u(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,e)})(e)}function s(e,t,r){return(s=l()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&c(i,r.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 d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function f(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1}var h=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,r){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 r={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(d({},e.headers))};return e.rangeEnd&&r.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1)),r}(e,this.controller.signal),s=r.onProgress,l="arraybuffer"===e.responseType,c=l?"byteLength":"length";this.context=e,this.config=t,this.callbacks=r,this.request=this.fetchSetup(e,a),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout((function(){i.abortInternal(),r.onTimeout(o,e,i.response)}),t.timeout),self.fetch(this.request).then((function(r){if(i.response=i.loader=r,!r.ok){var a=r.status,c=r.statusText;throw new m(c||"fetch, bad network response",a,r)}return o.loading.first=Math.max(self.performance.now(),o.loading.start),o.total=parseInt(r.headers.get("Content-Length")||"0"),s&&Object(n.isFiniteNumber)(t.highWaterMark)?i.loadProgressively(r,o,e,t.highWaterMark,s):l?r.arrayBuffer():r.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(n.isFiniteNumber)(t.highWaterMark)&&s(o,e,a,l),r.onSuccess(u,o,e,l)})).catch((function(t){if(self.clearTimeout(i.requestTimeout),!o.aborted){var n=t.code||0;r.onError({code:n,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,r,n,i){void 0===n&&(n=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,r,a.flush(),e),Promise.resolve(new ArrayBuffer(0));var l=s.value,c=l.length;return t.loaded+=c,c<n||a.dataLength?(a.push(l),a.dataLength>=n&&i(t,r,a.flush(),e)):i(t,r,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,r;function n(t,r,n){var i;return(i=e.call(this,t)||this).code=void 0,i.details=void 0,i.code=r,i.details=n,i}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,c(t,r),n}(a(Error));t.default=h},"./src/utils/imsc1-ttml-parser.ts":
/*!****************************************!*\
!*** ./src/utils/imsc1-ttml-parser.ts ***!
\****************************************/
/*! exports provided: IMSC1_CODEC, parseIMSC1 */function(e,t,r){"use strict";r.r(t),r.d(t,"IMSC1_CODEC",(function(){return u})),r.d(t,"parseIMSC1",(function(){return p}));var n=r(/*! ./mp4-tools */"./src/utils/mp4-tools.ts"),i=r(/*! ./vttparser */"./src/utils/vttparser.ts"),o=r(/*! ./vttcue */"./src/utils/vttcue.ts"),a=r(/*! ../demux/id3 */"./src/demux/id3.ts"),s=r(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),l=r(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts");function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var u="stpp.ttml.im1t",d=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,f=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,h={left:"start",center:"center",right:"end",start:"start",end:"end"};function p(e,t,r,i,u){var d=Object(n.findBox)(new Uint8Array(e),["mdat"]);if(0!==d.length){var f=d[0],p=Object(a.utf8ArrayToStr)(new Uint8Array(e,f.start,f.end-f.start)),x=Object(s.toTimescaleFromScale)(t,1,r);try{i(function(e,t){var r=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("tt")[0];if(!r)throw new Error("Invalid ttml");var n={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},i=Object.keys(n).reduce((function(e,t){return e[t]=r.getAttribute("ttp:"+t)||n[t],e}),{}),a="preserve"!==r.getAttribute("xml:space"),s=g(m(r,"styling","style")),u=g(m(r,"layout","region")),d=m(r,"body","[begin]");return[].map.call(d,(function(e){var r=function e(t,r){return[].slice.call(t.childNodes).reduce((function(t,n,i){var o;return"br"===n.nodeName&&i?t+"\n":null!==(o=n.childNodes)&&void 0!==o&&o.length?e(n,r):r?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent}),"")}(e,a);if(!r||!e.hasAttribute("begin"))return null;var n=y(e.getAttribute("begin"),i),d=y(e.getAttribute("dur"),i),f=y(e.getAttribute("end"),i);if(null===n)throw b(e);if(null===f){if(null===d)throw b(e);f=n+d}var p=new o.default(n-t,f-t,r);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 r="http://www.w3.org/ns/ttml#styling";return["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"].reduce((function(n,i){var o=v(t,r,i)||v(e,r,i);return o&&(n[i]=o),n}),{})}(m,g),w=x.textAlign;if(w){var E=h[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,r){var n=e.getElementsByTagName(t)[0];return n?[].slice.call(n.querySelectorAll(r)):[]}function g(e){return e.reduce((function(e,t){var r=t.getAttribute("xml:id");return r&&(e[r]=t),e}),{})}function v(e,t,r){return e.hasAttributeNS(t,r)?e.getAttributeNS(t,r):null}function b(e){return new Error("Could not parse ttml timestamp "+e)}function y(e,t){if(!e)return null;var r=Object(i.parseTimeStamp)(e);return null===r&&(d.test(e)?r=function(e,t){var r=d.exec(e),n=(0|r[4])+(0|r[5])/t.subFrameRate;return 3600*(0|r[1])+60*(0|r[2])+(0|r[3])+n/t.frameRate}(e,t):f.test(e)&&(r=function(e,t){var r=f.exec(e),n=Number(r[1]);switch(r[2]){case"h":return 3600*n;case"m":return 60*n;case"ms":return 1e3*n;case"f":return n/t.frameRate;case"t":return n/t.tickRate}return n}(e,t))),r}},"./src/utils/logger.ts":
/*!*****************************!*\
!*** ./src/utils/logger.ts ***!
\*****************************/
/*! exports provided: enableLogs, logger */function(e,t,r){"use strict";r.r(t),r.d(t,"enableLogs",(function(){return s})),r.d(t,"logger",(function(){return l}));var n=function(){},i={trace:n,debug:n,log:n,warn:n,info:n,error:n},o=i;function a(e){var t=self.console[e];return t?t.bind(self.console,"["+e+"] >"):n}function s(e){if(self.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];r.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,r){"use strict";var n;r.r(t),r.d(t,"KeySystems",(function(){return n})),r.d(t,"requestMediaKeySystemAccess",(function(){return i})),function(e){e.WIDEVINE="com.widevine.alpha",e.PLAYREADY="com.microsoft.playready"}(n||(n={}));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,r){"use strict";function n(){return self.MediaSource||self.WebKitMediaSource}r.r(t),r.d(t,"getMediaSource",(function(){return n}))},"./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,r){"use strict";r.r(t),r.d(t,"bin2str",(function(){return s})),r.d(t,"readUint16",(function(){return l})),r.d(t,"readUint32",(function(){return c})),r.d(t,"writeUint32",(function(){return u})),r.d(t,"findBox",(function(){return d})),r.d(t,"parseSegmentIndex",(function(){return f})),r.d(t,"parseInitSegment",(function(){return h})),r.d(t,"getStartDTS",(function(){return p})),r.d(t,"getDuration",(function(){return m})),r.d(t,"computeRawDurationFromSamples",(function(){return g})),r.d(t,"offsetStartDTS",(function(){return v})),r.d(t,"segmentValidRange",(function(){return b})),r.d(t,"appendUint8Array",(function(){return y}));var n=r(/*! ./typed-array */"./src/utils/typed-array.ts"),i=r(/*! ../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 r=e[t]<<8|e[t+1];return r<0?65536+r:r}function c(e,t){"data"in e&&(t+=e.start,e=e.data);var r=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return r<0?4294967296+r:r}function u(e,t,r){"data"in e&&(t+=e.start,e=e.data),e[t]=r>>24,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}function d(e,t){var r,n,i,o=[];if(!t.length)return o;"data"in e?(r=e.data,n=e.start,i=e.end):(n=0,i=(r=e).byteLength);for(var l=n;l<i;){var u=c(r,l),f=u>1?l+u:i;if(s(r.subarray(l+4,l+8))===t[0])if(1===t.length)o.push({data:r,start:l+8,end:f});else{var h=d({data:r,start:l+8,end:f},t.slice(1));h.length&&a.apply(o,h)}l=f}return o}function f(e){var t=d(e,["moov"])[0],r=t?t.end:null,n=d(e,["sidx"]);if(!n||!n[0])return null;var i=[],o=n[0],a=o.data[0],s=0===a?8:16,u=c(o,s);s+=4,s+=0===a?8:16,s+=2;var f=o.end+0,h=l(o,s);s+=2;for(var p=0;p<h;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 b=c(o,m);m+=4,i.push({referenceSize:v,subsegmentDuration:b,info:{duration:b/u,start:f,end:f+v-1}}),f+=v,s=m+=4}return{earliestPresentationTime:0,timescale:u,version:a,referencesCount:h,references:i,moovEndOffset:r}}function h(e){for(var t=[],r=d(e,["moov","trak"]),n=0;n<r.length;n++){var o=r[n],a=d(o,["tkhd"])[0];if(a){var l=a.data[a.start],u=0===l?12:20,f=c(a,u),h=d(o,["mdia","mdhd"])[0];if(h){var p=c(h,u=0===(l=h.data[h.start])?12:20),m=d(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 b=d(o,["mdia","minf","stbl","stsd"])[0],y=void 0;b&&(y=s(b.data.subarray(b.start+12,b.start+16))),t[f]={timescale:p,type:v},t[v]={timescale:p,id:f,codec:y}}}}}}return d(e,["moov","mvex","trex"]).forEach((function(e){var r=c(e,4),n=t[r];n&&(n.default={duration:c(e,12),flags:c(e,20)})})),t}function p(e,t){return d(t,["moof","traf"]).reduce((function(t,r){var n=d(r,["tfdt"])[0],i=n.data[n.start],o=d(r,["tfhd"]).reduce((function(t,r){var o=c(r,4),a=e[o];if(a){var s=c(n,4);1===i&&(s*=Math.pow(2,32),s+=c(n,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 r=0,n=0,o=0,a=d(e,["moof","traf"]),s=0;s<a.length;s++){var l=a[s],u=d(l,["tfhd"])[0],h=t[c(u,4)];if(h){var p=h.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 b=h.timescale||9e4,y=d(l,["trun"]),x=0;x<y.length;x++)r=v?v*c(y[x],4):g(y[x]),h.type===i.ElementaryStreamTypes.VIDEO?n+=r/b:h.type===i.ElementaryStreamTypes.AUDIO&&(o+=r/b)}}if(0===n&&0===o){var w=f(e);if(null!=w&&w.references)return w.references.reduce((function(e,t){return e+t.info.duration||0}),0)}return n||o}function g(e){var t=c(e,0),r=8;1&t&&(r+=4),4&t&&(r+=4);for(var n=0,i=c(e,4),o=0;o<i;o++)256&t&&(n+=c(e,r),r+=4),512&t&&(r+=4),1024&t&&(r+=4),2048&t&&(r+=4);return n}function v(e,t,r){d(t,["moof","traf"]).forEach((function(t){d(t,["tfhd"]).forEach((function(n){var i=c(n,4),a=e[i];if(a){var s=a.timescale||9e4;d(t,["tfdt"]).forEach((function(e){var t=e.data[e.start],n=c(e,4);if(0===t)u(e,4,n-r*s);else{n*=Math.pow(2,32),n+=c(e,8),n-=r*s,n=Math.max(n,0);var i=Math.floor(n/(o+1)),a=Math.floor(n%(o+1));u(e,4,i),u(e,8,a)}}))}}))}))}function b(e){var t={valid:null,remainder:null},r=d(e,["moof"]);if(!r)return t;if(r.length<2)return t.remainder=e,t;var i=r[r.length-1];return t.valid=Object(n.sliceUint8)(e,0,i.start-8),t.remainder=Object(n.sliceUint8)(e,i.start-8),t}function y(e,t){var r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}},"./src/utils/output-filter.ts":
/*!************************************!*\
!*** ./src/utils/output-filter.ts ***!
\************************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return n}));var n=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,r){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=r,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,r){"use strict";r.r(t),r.d(t,"sendAddTrackEvent",(function(){return i})),r.d(t,"addCueToTrack",(function(){return o})),r.d(t,"clearCurrentCues",(function(){return a})),r.d(t,"removeCuesInRange",(function(){return s})),r.d(t,"getCuesInRange",(function(){return l}));var n=r(/*! ./logger */"./src/utils/logger.ts");function i(e,t){var r;try{r=new Event("addtrack")}catch(e){(r=document.createEvent("Event")).initEvent("addtrack",!1,!1)}r.track=e,t.dispatchEvent(r)}function o(e,t){var r=e.mode;if("disabled"===r&&(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(r){n.logger.debug("[texttrack-utils]: "+r);var i=new self.TextTrackCue(t.startTime,t.endTime,t.text);i.id=t.id,e.addCue(i)}"disabled"===r&&(e.mode=r)}function a(e){var t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(var r=e.cues.length;r--;)e.removeCue(e.cues[r]);"disabled"===t&&(e.mode=t)}function s(e,t,r){var n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues&&e.cues.length>0)for(var i=l(e.cues,t,r),o=0;o<i.length;o++)e.removeCue(i[o]);"disabled"===n&&(e.mode=n)}function l(e,t,r){var n=[],i=function(e,t){if(t<e[0].startTime)return 0;var r=e.length-1;if(t>e[r].endTime)return-1;for(var n=0,i=r;n<=i;){var o=Math.floor((i+n)/2);if(t<e[o].startTime)i=o-1;else{if(!(t>e[o].startTime&&n<r))return o;n=o+1}}return e[n].startTime-t<t-e[i].startTime?n: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<=r)n.push(s);else if(s.startTime>r)return n}return n}},"./src/utils/time-ranges.ts":
/*!**********************************!*\
!*** ./src/utils/time-ranges.ts ***!
\**********************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t),t.default={toString:function(e){for(var t="",r=e.length,n=0;n<r;n++)t+="["+e.start(n).toFixed(3)+","+e.end(n).toFixed(3)+"]";return t}}},"./src/utils/timescale-conversion.ts":
/*!*******************************************!*\
!*** ./src/utils/timescale-conversion.ts ***!
\*******************************************/
/*! exports provided: toTimescaleFromBase, toTimescaleFromScale, toMsFromMpegTsClock, toMpegTsClockFromTimescale */function(e,t,r){"use strict";function n(e,t,r,n){void 0===r&&(r=1),void 0===n&&(n=!1);var i=e*t*r;return n?Math.round(i):i}function i(e,t,r,i){return void 0===r&&(r=1),void 0===i&&(i=!1),n(e,t,1/r,i)}function o(e,t){return void 0===t&&(t=!1),n(e,1e3,1/9e4,t)}function a(e,t){return void 0===t&&(t=1),n(e,9e4,1/t)}r.r(t),r.d(t,"toTimescaleFromBase",(function(){return n})),r.d(t,"toTimescaleFromScale",(function(){return i})),r.d(t,"toMsFromMpegTsClock",(function(){return o})),r.d(t,"toMpegTsClockFromTimescale",(function(){return a}))},"./src/utils/typed-array.ts":
/*!**********************************!*\
!*** ./src/utils/typed-array.ts ***!
\**********************************/
/*! exports provided: sliceUint8 */function(e,t,r){"use strict";function n(e,t,r){return Uint8Array.prototype.slice?e.slice(t,r):new Uint8Array(Array.prototype.slice.call(e,t,r))}r.r(t),r.d(t,"sliceUint8",(function(){return n}))},"./src/utils/vttcue.ts":
/*!*****************************!*\
!*** ./src/utils/vttcue.ts ***!
\*****************************/
/*! exports provided: default */function(e,t,r){"use strict";r.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 r(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;var r=t.toLowerCase();return!!~e.indexOf(r)&&r}function n(e){return r(t,e)}function i(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];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,d=t,f=o,h=a,p=null,m="",g=!0,v="auto",b="start",y=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 d},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",i({},l,{get:function(){return f},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");f=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",i({},l,{get:function(){return h},set:function(e){h=""+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 n=function(t){return r(e,t)}(t);if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");m=n,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 b},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",i({},l,{get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},l,{get:function(){return x},set:function(e){var t=n(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=n(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,r){"use strict";r.r(t),r.d(t,"parseTimeStamp",(function(){return o})),r.d(t,"fixLineBreaks",(function(){return d})),r.d(t,"VTTParser",(function(){return f}));var n=r(/*! ./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,r,n){return 3600*(0|e)+60*(0|t)+(0|r)+parseFloat(n||0)}var r=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return r?parseFloat(r[2])>59?t(r[2],r[3],0,r[4]):t(r[1],r[2],r[3],r[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,r){return r?this.has(e)?this.values[e]:t[r]:this.has(e)?this.values[e]:t},t.has=function(e){return e in this.values},t.alt=function(e,t,r){for(var n=0;n<r.length;++n)if(t===r[n]){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 r=parseFloat(t);if(r>=0&&r<=100)return this.set(e,r),!0}return!1},e}();function s(e,t,r,n){var i=n?e.split(n):[e];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(r);2===a.length&&t(a[0],a[1])}}var l=new n.default(0,0,""),c="middle"===l.align?"middle":"center";function u(e,t,r){var n=e;function i(){var t=o(e);if(null===t)throw new Error("Malformed timestamp: "+n);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'): "+n);e=e.substr(3),u(),t.endTime=i(),u(),function(e,t){var n=new a;s(e,(function(e,t){var i;switch(e){case"region":for(var o=r.length-1;o>=0;o--)if(r[o].id===t){n.set(e,r[o].region);break}break;case"vertical":n.alt(e,t,["rl","lr"]);break;case"line":i=t.split(","),n.integer(e,i[0]),n.percent(e,i[0])&&n.set("snapToLines",!1),n.alt(e,i[0],["auto"]),2===i.length&&n.alt("lineAlign",i[1],["start",c,"end"]);break;case"position":i=t.split(","),n.percent(e,i[0]),2===i.length&&n.alt("positionAlign",i[1],["start",c,"end","line-left","line-right","auto"]);break;case"size":n.percent(e,t);break;case"align":n.alt(e,t,["start",c,"end","left","right"])}}),/:/,/\s/),t.region=n.get("region",null),t.vertical=n.get("vertical","");var i=n.get("line","auto");"auto"===i&&-1===l.line&&(i=-1),t.line=i,t.lineAlign=n.get("lineAlign","start"),t.snapToLines=n.get("snapToLines",!0),t.size=n.get("size",100),t.align=n.get("align",c);var o=n.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 d(e){return e.replace(/<br(?: \/)?>/gi,"\n")}var f=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 r(){var e=t.buffer,r=0;for(e=d(e);r<e.length&&"\r"!==e[r]&&"\n"!==e[r];)++r;var n=e.substr(0,r);return"\r"===e[r]&&++r,"\n"===e[r]&&++r,t.buffer=e.substr(r),n}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=r()).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=r(),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 n.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,r){"use strict";r.r(t),r.d(t,"generateCueId",(function(){return d})),r.d(t,"parseWebVTT",(function(){return f}));var n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=r(/*! ./vttparser */"./src/utils/vttparser.ts"),o=r(/*! ../demux/id3 */"./src/demux/id3.ts"),a=r(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),s=r(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),l=/\r\n|\n\r|\n|\r/g,c=function(e,t,r){return void 0===r&&(r=0),e.substr(r,t.length)===t},u=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return(t>>>0).toString()};function d(e,t,r){return u(e.toString())+u(t.toString())+u(r)}function f(e,t,r,u,f,h,p,m){var g,v=new i.VTTParser,b=Object(o.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(l,"\n").split("\n"),y=[],x=Object(a.toMpegTsClockFromTimescale)(t,r),w="00:00.000",E=0,S=0,_=!0,T=!1;v.oncue=function(e){var t=u[f],r=u.ccOffset,n=(E-x)/9e4;if(null!=t&&t.new&&(void 0!==S?r=u.ccOffset=t.start:function(e,t,r){var n=e[t],i=e[n.prevCC];if(!i||!i.new&&n.new)return e.ccOffset=e.presentationOffset=n.start,void(n.new=!1);for(;null!==(o=i)&&void 0!==o&&o.new;){var o;e.ccOffset+=n.start-i.start,n.new=!1,i=e[(n=i).prevCC]}e.presentationOffset=r}(u,f,n)),n&&(r=n-u.presentationOffset),T){var i=e.endTime-e.startTime,o=Object(s.normalizePts)(9e4*(e.startTime+r-S),9e4*h)/9e4;e.startTime=o,e.endTime=o+i}var a=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(a)),e.id||(e.id=d(e.startTime,e.endTime,a)),e.endTime>0&&y.push(e)},v.onparsingerror=function(e){g=e},v.onflush=function(){g?m(g):p(y)},b.forEach((function(e){if(_){if(c(e,"X-TIMESTAMP-MAP=")){_=!1,T=!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)),r=parseInt(e.substr(-6,2)),i=parseInt(e.substr(-9,2)),o=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;if(!(Object(n.isFiniteNumber)(t)&&Object(n.isFiniteNumber)(r)&&Object(n.isFiniteNumber)(i)&&Object(n.isFiniteNumber)(o)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*r,t+=6e4*i,t+=36e5*o}(w)/1e3}catch(e){T=!1,g=e}return}""===e&&(_=!1)}v.parse(e+"\n")})),v.flush()}},"./src/utils/xhr-loader.ts":
/*!*********************************!*\
!*** ./src/utils/xhr-loader.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,r){"use strict";r.r(t);var n=r(/*! ../utils/logger */"./src/utils/logger.ts"),i=r(/*! ../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,r){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=r,this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e=this.config,t=this.context;if(e){var r=this.loader=new self.XMLHttpRequest,n=this.stats;n.loading.first=0,n.loaded=0;var i=this.xhrSetup;try{if(i)try{i(r,t.url)}catch(e){r.open("GET",t.url,!0),i(r,t.url)}r.readyState||r.open("GET",t.url,!0);var o=this.context.headers;if(o)for(var a in o)r.setRequestHeader(a,o[a])}catch(e){return void this.callbacks.onError({code:r.status,text:e.message},t,r)}t.rangeEnd&&r.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),r.onreadystatechange=this.readystatechange.bind(this),r.onprogress=this.loadprogress.bind(this),r.responseType=t.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),e.timeout),r.send()}},t.readystatechange=function(){var e=this.context,t=this.loader,r=this.stats;if(e&&t){var i=t.readyState,o=this.config;if(!r.aborted&&i>=2)if(self.clearTimeout(this.requestTimeout),0===r.loading.first&&(r.loading.first=Math.max(self.performance.now(),r.loading.start)),4===i){t.onreadystatechange=null,t.onprogress=null;var a=t.status;if(a>=200&&a<300){var s,l;if(r.loading.end=Math.max(self.performance.now(),r.loading.first),l="arraybuffer"===e.responseType?(s=t.response).byteLength:(s=t.responseText).length,r.loaded=r.total=l,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(r,e,s,t),!this.callbacks)return;var u={url:t.responseURL,data:s};this.callbacks.onSuccess(u,r,e,t)}else r.retry>=o.maxRetry||a>=400&&a<499?(n.logger.error(a+" while loading "+e.url),this.callbacks.onError({code:a,text:t.statusText},e,t)):(n.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),r.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.timeout)}},t.loadtimeout=function(){n.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=n())},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,r){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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),r(/*! ./enc-base64 */"ETIr"),r(/*! ./md5 */"cv67"),r(/*! ./evpkdf */"K3mO"),r(/*! ./cipher-core */"OLod"),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=r.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var a=i%r,s=t[a>>>2]>>>24-a%4*8&255;o=(o+n[i]+s)%256;var l=n[i];n[i]=n[o],n[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,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[r],e[r]=o,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}e.RC4=t._createHelper(i);var a=r.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)}(),n.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/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.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/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.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,r){"use strict";r.d(t,"a",(function(){return Z}));var n=r("rePB"),i=r("VTBJ"),o=r("KQm4"),a=r("U8pU"),s=r("ODXe"),l=r("q1tI"),c=r("TSYQ"),u=r.n(c),d=r("Gytx"),f=r.n(d),h=r("Kwbf"),p=r("t23M"),m=r("qx4F"),g=r("6eGT"),v=r("IBYe"),b=r("Ff2n"),y=r("c+Xe"),x=r("fyJ8"),w=r("biw7");function E(e,t,r,n,i){var o,a,s=r[e]||{},l=r[t]||{};"left"===s.fixed?o=n.left[e]:"right"===l.fixed&&(a=n.right[t]);var c=!1,u=!1,d=!1,f=!1,h=r[t+1],p=r[e-1];if("rtl"===i){if(void 0!==o)f=!(p&&"left"===p.fixed);else if(void 0!==a){d=!(h&&"right"===h.fixed)}}else if(void 0!==o){c=!(h&&"left"===h.fixed)}else if(void 0!==a){u=!(p&&"right"===p.fixed)}return{fixLeft:o,fixRight:a,lastFixLeft:c,firstFixRight:u,lastFixRight:d,firstFixLeft:f,isSticky:n.isSticky}}var S=r("sR1s");function _(e){var t,r=e.cells,n=e.stickyOffsets,i=e.flattenColumns,o=e.rowComponent,a=e.cellComponent,s=e.onHeaderRow,c=e.index,u=l.useContext(w.a),d=u.prefixCls,f=u.direction;s&&(t=s(r.map((function(e){return e.column})),c));var h=Object(S.a)(r.map((function(e){return e.column})));return l.createElement(o,Object.assign({},t),r.map((function(e,t){var r,o=e.column,s=E(e.colStart,e.colEnd,i,n,f);return o&&o.onHeaderCell&&(r=e.column.onHeaderCell(o)),l.createElement(x.a,Object.assign({},e,{ellipsis:o.ellipsis,align:o.align,component:a,prefixCls:d,key:h[t]},s,{additionalProps:r,rowType:"header"}))})))}_.displayName="HeaderRow";var T=_;var k=function(e){var t=e.stickyOffsets,r=e.columns,n=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(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t[i]=t[i]||[];var o=n,a=r.filter(Boolean).map((function(r){var n={key:r.key,className:r.className||"",children:r.title,column:r,colStart:o},a=1,s=r.children;return s&&s.length>0&&(a=e(s,o,i+1).reduce((function(e,t){return e+t}),0),n.hasSubColumns=!0),"colSpan"in r&&(a=r.colSpan),"rowSpan"in r&&(n.rowSpan=r.rowSpan),n.colSpan=a,n.colEnd=n.colStart+a-1,t[i].push(n),o+=a,a}));return a}(e,0);for(var r=t.length,n=function(e){t[e].forEach((function(t){"rowSpan"in t||t.hasSubColumns||(t.rowSpan=r-e)}))},i=0;i<r;i+=1)n(i);return t}(r)}),[r]),u=s(["header","wrapper"],"thead"),d=s(["header","row"],"tr"),f=s(["header","cell"],"th");return l.createElement(u,{className:"".concat(a,"-thead")},c.map((function(e,r){return l.createElement(T,{key:r,flattenColumns:n,cells:e,stickyOffsets:t,rowComponent:d,cellComponent:f,onHeaderRow:i,index:r})})))},O=r("hW8S");var C=function(e){for(var t=e.colWidths,r=e.columns,n=[],i=!1,o=(e.columCount||r.length)-1;o>=0;o-=1){var a=t[o],s=r&&r[o],c=s&&s[O.a];(a||c||i)&&(n.unshift(l.createElement("col",Object.assign({key:o,style:{width:a,minWidth:a}},c))),i=!0)}return l.createElement("colgroup",null,n)};var A=l.forwardRef((function(e,t){var r=e.noData,a=e.columns,s=e.flattenColumns,c=e.colWidths,d=e.columCount,f=e.stickyOffsets,h=e.direction,p=e.fixHeader,m=e.offsetHeader,g=e.stickyClassName,v=e.onScroll,x=Object(b.a)(e,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),E=l.useContext(w.a),S=E.prefixCls,_=E.scrollbarSize,T=E.isSticky,O=T&&!p?0:_,A=l.useRef(null),D=l.useCallback((function(e){Object(y.b)(t,e),Object(y.b)(A,e)}),[]);l.useEffect((function(){var e;function t(e){var t=e.currentTarget,r=e.deltaX;r&&(v({currentTarget:t,scrollLeft:t.scrollLeft+r}),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 L=s[s.length-1],I={fixed:L?L.fixed:null,onHeaderCell:function(){return{className:"".concat(S,"-cell-scrollbar")}}},j=Object(l.useMemo)((function(){return O?[].concat(Object(o.a)(a),[I]):a}),[O,a]),R=Object(l.useMemo)((function(){return O?[].concat(Object(o.a)(s),[I]):s}),[O,s]),M=Object(l.useMemo)((function(){var e=f.right,t=f.left;return Object(i.a)(Object(i.a)({},f),{},{left:"rtl"===h?[].concat(Object(o.a)(t.map((function(e){return e+O}))),[0]):t,right:"rtl"===h?e:[].concat(Object(o.a)(e.map((function(e){return e+O}))),[0]),isSticky:T})}),[O,f,T]),N=function(e,t){return Object(l.useMemo)((function(){for(var r=[],n=0;n<t;n+=1){var i=e[n];if(void 0===i)return null;r[n]=i}return r}),[e.join("_"),t])}(c,d);return l.createElement("div",{style:Object(i.a)({overflow:"hidden"},T?{top:m}:{}),ref:D,className:u()("".concat(S,"-header"),Object(n.a)({},g,!!g))},l.createElement("table",{style:{tableLayout:"fixed",visibility:r||N?null:"hidden"}},l.createElement(C,{colWidths:N?[].concat(Object(o.a)(N),[O]):[],columCount:d+1,columns:R}),l.createElement(k,Object.assign({},x,{stickyOffsets:M,columns:j,flattenColumns:R}))))}));A.displayName="FixedHeader";var D=A,L=l.createContext(null);var I=function(e){var t=e.prefixCls,r=e.children,n=e.component,i=e.cellComponent,o=e.fixHeader,a=e.fixColumn,s=e.horizonScroll,c=e.className,u=e.expanded,d=e.componentWidth,f=e.colSpan,h=l.useContext(w.a).scrollbarSize;return l.useMemo((function(){var e=r;return a&&(e=l.createElement("div",{style:{width:d-(o?h:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},e)),l.createElement(n,{className:c,style:{display:u?null:"none"}},l.createElement(x.a,{component:i,prefixCls:t,colSpan:f},e))}),[r,n,o,s,c,u,d,f,h])};function j(e){var t=e.className,r=e.style,n=e.record,o=e.index,a=e.rowKey,c=e.getRowKey,d=e.rowExpandable,f=e.expandedKeys,h=e.onRow,p=e.indent,m=void 0===p?0:p,g=e.rowComponent,v=e.cellComponent,b=e.childrenColumnName,y=l.useContext(w.a),E=y.prefixCls,_=y.fixedInfoList,T=l.useContext(L),k=T.fixHeader,O=T.fixColumn,C=T.horizonScroll,A=T.componentWidth,D=T.flattenColumns,R=T.expandableType,M=T.expandRowByClick,N=T.onTriggerExpand,P=T.rowClassName,F=T.expandedRowClassName,B=T.indentSize,U=T.expandIcon,H=T.expandedRowRender,z=T.expandIconColumnIndex,G=l.useState(!1),K=Object(s.a)(G,2),W=K[0],V=K[1],q=f&&f.has(e.recordKey);l.useEffect((function(){q&&V(!0)}),[q]);var X,Y="row"===R&&(!d||d(n)),$="nest"===R,J=b&&n&&n[b],Z=Y||$;h&&(X=h(n,o));var Q;"string"==typeof P?Q=P:"function"==typeof P&&(Q=P(n,o,m));var ee,te,re=Object(S.a)(D),ne=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)({},r),X?X.style:null),onClick:function(e){if(M&&Z&&N(n,e),X&&X.onClick){for(var t,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];(t=X).onClick.apply(t,[e].concat(i))}}}),D.map((function(e,t){var r,i,a=e.render,s=e.dataIndex,c=e.className,u=re[t],d=_[t];return t===(z||0)&&$&&(r=l.createElement(l.Fragment,null,l.createElement("span",{style:{paddingLeft:"".concat(B*m,"px")},className:"".concat(E,"-row-indent indent-level-").concat(m)}),U({prefixCls:E,expanded:q,expandable:J,record:n,onExpand:N}))),e.onCell&&(i=e.onCell(n,o)),l.createElement(x.a,Object.assign({className:c,ellipsis:e.ellipsis,align:e.align,component:v,prefixCls:E,key:u,record:n,index:o,dataIndex:s,render:a,shouldCellUpdate:e.shouldCellUpdate},d,{appendNode:r,additionalProps:i}))})));if(Y&&(W||q)){var ie=H(n,o,m+1,q),oe=F&&F(n,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:k,fixColumn:O,horizonScroll:C,component:g,componentWidth:A,cellComponent:v,colSpan:D.length},ie)}return J&&q&&(te=(n[b]||[]).map((function(t,r){var n=c(t,r);return l.createElement(j,Object.assign({},e,{key:n,rowKey:n,record:t,recordKey:n,index:r,indent:m+1}))}))),l.createElement(l.Fragment,null,ne,ee,te)}j.displayName="BodyRow";var R=j,M=l.createContext(null);function N(e){var t=e.columnKey,r=e.onColumnResize,n=l.useRef();return l.useEffect((function(){n.current&&r(t,n.current.offsetWidth)}),[]),l.createElement(p.a,{onResize:function(e){var n=e.offsetWidth;r(t,n)}},l.createElement("td",{ref:n,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,r=e.getRowKey,n=e.measureColumnWidth,i=e.expandedKeys,o=e.onRow,a=e.rowExpandable,s=e.emptyNode,c=e.childrenColumnName,u=l.useContext(M).onColumnResize,d=l.useContext(w.a),f=d.prefixCls,h=d.getComponent,p=l.useContext(L),m=p.fixHeader,g=p.horizonScroll,v=p.flattenColumns,b=p.componentWidth;return l.useMemo((function(){var e,d=h(["body","wrapper"],"tbody"),p=h(["body","row"],"tr"),y=h(["body","cell"],"td");e=t.length?t.map((function(e,t){var n=r(e,t);return l.createElement(R,{key:n,rowKey:n,record:e,recordKey:n,index:t,rowComponent:p,cellComponent:y,expandedKeys:i,onRow:o,getRowKey:r,rowExpandable:a,childrenColumnName:c})})):l.createElement(I,{expanded:!0,className:"".concat(f,"-placeholder"),prefixCls:f,fixHeader:m,fixColumn:g,horizonScroll:g,component:p,componentWidth:b,cellComponent:y,colSpan:v.length},s);var x=Object(S.a)(v);return l.createElement(d,{className:"".concat(f,"-tbody")},n&&l.createElement("tr",{"aria-hidden":"true",className:"".concat(f,"-measure-row"),style:{height:0}},x.map((function(e){return l.createElement(N,{key:e,columnKey:e,onColumnResize:u})}))),e)}),[t,f,o,n,i,r,h,b,s,v])}));P.displayName="Body";var F=P,B=r("wRmb"),U=r("xEkU"),H=r.n(U);function z(e){var t=Object(l.useRef)(e),r=Object(l.useState)({}),n=Object(s.a)(r,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,n({})}))),o.current.push(e)}]}var G=function(e,t,r){return Object(l.useMemo)((function(){for(var n=[],i=[],o=0,a=0,s=0;s<t;s+=1)if("rtl"===r){i[s]=a,a+=e[s]||0;var l=t-s-1;n[l]=o,o+=e[l]||0}else{n[s]=o,o+=e[s]||0;var c=t-s-1;i[c]=a,a+=e[c]||0}return{left:n,right:i}}),[e,t,r])};var K=function(e){var t=e.className,r=e.children;return l.createElement("div",{className:t},r)},W=r("n6Qo");function V(e){var t,r=e.prefixCls,i=e.record,o=e.onExpand,a=e.expanded,s=e.expandable,c="".concat(r,"-row-expand-icon");if(!s)return l.createElement("span",{className:u()(c,"".concat(r,"-row-spaced"))});return l.createElement("span",{className:u()(c,(t={},Object(n.a)(t,"".concat(r,"-row-expanded"),a),Object(n.a)(t,"".concat(r,"-row-collapsed"),!a),t)),onClick:function(e){o(i,e),e.stopPropagation()}})}var q=r("zT1h"),X=r("y0+3"),Y=l.forwardRef((function(e,t){var r,o,a=e.scrollBodyRef,c=e.onScroll,d=e.offsetScroll,f=l.useContext(w.a).prefixCls,h=(null===(r=a.current)||void 0===r?void 0:r.scrollWidth)||0,p=(null===(o=a.current)||void 0===o?void 0:o.clientWidth)||0,g=h&&p*(p/h),v=l.useRef(),b=z({scrollLeft:0,isHiddenScrollBar:!1}),y=Object(s.a)(b,2),x=y[0],E=y[1],S=l.useRef({delta:0,x:0}),_=l.useState(!1),T=Object(s.a)(_,2),k=T[0],O=T[1],C=function(){O(!1)},A=function(e){var t,r=(e||(null===(t=window)||void 0===t?void 0:t.event)).buttons;if(k&&0!==r){var n=S.current.x+e.pageX-S.current.x-S.current.delta;n<=0&&(n=0),n+g>=p&&(n=p-g),c({scrollLeft:n/p*(h+2)}),S.current.x=e.pageX}else k&&O(!1)},D=function(){var e=Object(X.b)(a.current).top,t=e+a.current.offsetHeight,r=document.documentElement.scrollTop+window.innerHeight;t-Object(m.a)()<=r||e>=r-d?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})}))},L=function(e){E((function(t){return Object(i.a)(Object(i.a)({},t),{},{scrollLeft:e/h*p||0})}))};return l.useImperativeHandle(t,(function(){return{setScrollLeft:L}})),l.useEffect((function(){var e=Object(q.a)(document.body,"mouseup",C,!1),t=Object(q.a)(document.body,"mousemove",A,!1);return D(),function(){e.remove(),t.remove()}}),[g,k]),l.useEffect((function(){var e=Object(q.a)(window,"scroll",D,!1),t=Object(q.a)(window,"resize",D,!1);return function(){e.remove(),t.remove()}}),[]),l.useEffect((function(){x.isHiddenScrollBar||E((function(e){var t,r;return Object(i.a)(Object(i.a)({},e),{},{scrollLeft:a.current.scrollLeft/(null===(t=a.current)||void 0===t?void 0:t.scrollWidth)*(null===(r=a.current)||void 0===r?void 0:r.clientWidth)})}))}),[x.isHiddenScrollBar]),h<=p||!g||x.isHiddenScrollBar?null:l.createElement("div",{style:{height:Object(m.a)(),width:p,bottom:d},className:"".concat(f,"-sticky-scroll")},l.createElement("div",{onMouseDown:function(e){e.persist(),S.current.delta=e.pageX-x.scrollLeft,S.current.x=0,O(!0),e.preventDefault()},ref:v,className:u()("".concat(f,"-sticky-scroll-bar"),Object(n.a)({},"".concat(f,"-sticky-scroll-bar-active"),k)),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!!f()(e.props,t.props)&&(e.pingLeft!==t.pingLeft||e.pingRight!==t.pingRight)}));function ee(e){var t,r=e.prefixCls,c=e.className,d=e.rowClassName,f=e.style,g=e.data,v=e.rowKey,b=e.scroll,y=e.tableLayout,x=e.direction,_=e.title,T=e.footer,A=e.summary,I=e.id,j=e.showHeader,R=e.components,N=e.emptyText,P=e.onRow,U=e.onHeaderRow,H=e.internalHooks,q=e.transformColumns,X=e.internalRefs,ee=e.sticky,te=g||$,re=!!te.length,ne=l.useState(0),ie=Object(s.a)(ne,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)(R,{})}),[R]),de=l.useCallback((function(e,t){return Object(S.b)(ue,e)||t}),[ue]),fe=l.useMemo((function(){return"function"==typeof v?v:function(e){return e&&e[v]}}),[v]),he=Object(O.c)(e),pe=he.expandIcon,me=he.expandedRowKeys,ge=he.defaultExpandedRowKeys,ve=he.defaultExpandAllRows,be=he.expandedRowRender,ye=he.onExpand,xe=he.onExpandedRowsChange,we=he.expandRowByClick,Ee=he.rowExpandable,Se=he.expandIconColumnIndex,_e=he.expandedRowClassName,Te=he.childrenColumnName,ke=he.indentSize,Oe=pe||V,Ce=Te||"children",Ae=l.useMemo((function(){return be?"row":!!(e.expandable&&H===Z&&e.expandable.__PARENT_RENDER_ICON__||te.some((function(e){return e&&"object"===Object(a.a)(e)&&e[Ce]})))&&"nest"}),[!!be,te]),De=l.useState((function(){return ge||(ve?function(e,t,r){var n=[];return function e(i){(i||[]).forEach((function(i,o){n.push(t(i,o)),e(i[r])}))}(e),n}(te,fe,Ce):[])})),Le=Object(s.a)(De,2),Ie=Le[0],je=Le[1],Re=l.useMemo((function(){return new Set(me||Ie||[])}),[me,Ie]),Me=l.useCallback((function(e){var t,r=fe(e,te.indexOf(e)),n=Re.has(r);n?(Re.delete(r),t=Object(o.a)(Re)):t=[].concat(Object(o.a)(Re),[r]),je(t),ye&&ye(!n,e),xe&&xe(t)}),[fe,Re,te,ye,xe]),Ne=l.useState(0),Pe=Object(s.a)(Ne,2),Fe=Pe[0],Be=Pe[1],Ue=Object(B.b)(Object(i.a)(Object(i.a)(Object(i.a)({},e),he),{},{expandable:!!be,expandedKeys:Re,getRowKey:fe,onTriggerExpand:Me,expandIcon:Oe,expandIconColumnIndex:Se,direction:x}),H===Z?q:null),He=Object(s.a)(Ue,2),ze=He[0],Ge=He[1],Ke=l.useMemo((function(){return{columns:ze,flattenColumns:Ge}}),[ze,Ge]),We=l.useRef(),Ve=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],rt=z(new Map),nt=Object(s.a)(rt,2),it=nt[0],ot=nt[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=b&&Object(S.d)(b.y),ut=b&&Object(S.d)(b.x),dt=ut&&Ge.some((function(e){return e.fixed})),ft=l.useRef(),ht=function(e,t){return l.useMemo((function(){var r=!!e;return{isSticky:r,stickyClassName:r?"".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,r),pt=ht.isSticky,mt=ht.offsetHeader,gt=ht.offsetScroll,vt=ht.stickyClassName;ct&&(le={overflowY:"scroll",maxHeight:b.y}),ut&&(se={overflowX:"auto"},ct||(le={overflowY:"hidden"}),ce={width:!0===b.x?"auto":b.x,minWidth:"100%"});var bt=l.useCallback((function(e,t){ot((function(r){var n=new Map(r);return n.set(e,t),n}))}),[]),yt=function(e){var t=Object(l.useRef)(e),r=Object(l.useRef)(null);function n(){window.clearTimeout(r.current)}return Object(l.useEffect)((function(){return n}),[]),[function(e){t.current=e,n(),r.current=window.setTimeout((function(){t.current=null,r.current=null}),100)},function(){return t.current}]}(null),xt=Object(s.a)(yt,2),wt=xt[0],Et=xt[1];function St(e,t){t&&("function"==typeof t?t(e):t.scrollLeft!==e&&(t.scrollLeft=e))}var _t=function(e){var t,r=e.currentTarget,n=e.scrollLeft,i="number"==typeof n?n:r.scrollLeft,o=r||J;Et()&&Et()!==o||(wt(o),St(i,Ve.current),St(i,qe.current),St(i,null===(t=ft.current)||void 0===t?void 0:t.setScrollLeft));if(r){var a=r.scrollWidth,s=r.clientWidth;Je(i>0),tt(i<a-s)}},Tt=function(){qe.current&&_t({currentTarget:qe.current})};l.useEffect((function(){return Tt}),[]),l.useEffect((function(){ut&&Tt()}),[ut]),l.useEffect((function(){H===Z&&X&&(X.body.current=qe.current)}));var kt,Ot,Ct=de(["table"],"table"),At=l.useMemo((function(){return y||(dt?"max-content"===b.x?"auto":"fixed":ct||Ge.some((function(e){return e.ellipsis}))?"fixed":"auto")}),[ct,dt,Ge,y]),Dt={colWidths:st,columCount:Ge.length,stickyOffsets:lt,onHeaderRow:U,fixHeader:ct},Lt=l.useMemo((function(){return re?null:"function"==typeof N?N():N}),[re,N]),It=l.createElement(F,{data:te,measureColumnWidth:ct||ut||pt,expandedKeys:Re,rowExpandable:Ee,getRowKey:fe,onRow:P,emptyNode:Lt,childrenColumnName:Ce}),jt=l.createElement(C,{colWidths:Ge.map((function(e){return e.width})),columns:Ge}),Rt=A&&l.createElement(W.b,null,A(te)),Mt=de(["body"]);ct||pt?("function"==typeof Mt?(Ot=Mt(te,{scrollbarSize:oe,ref:qe,onScroll:_t}),Dt.colWidths=Ge.map((function(e,t){var r=e.width,n=t===ze.length-1?r-oe:r;return"number"!=typeof n||Number.isNaN(n)?(Object(h.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0):n}))):Ot=l.createElement("div",{style:Object(i.a)(Object(i.a)({},se),le),onScroll:_t,ref:qe,className:u()("".concat(r,"-body"))},l.createElement(Ct,{style:Object(i.a)(Object(i.a)({},ce),{},{tableLayout:At})},jt,It,Rt),pt&&l.createElement(Y,{ref:ft,offsetScroll:gt,scrollBodyRef:qe,onScroll:_t})),kt=l.createElement(l.Fragment,null,!1!==j&&l.createElement(D,Object.assign({noData:!te.length},Dt,Ke,{direction:x,offsetHeader:mt,stickyClassName:vt,ref:Ve,onScroll:_t})),Ot)):kt=l.createElement("div",{style:Object(i.a)(Object(i.a)({},se),le),className:u()("".concat(r,"-content")),onScroll:_t,ref:qe},l.createElement(Ct,{style:Object(i.a)(Object(i.a)({},ce),{},{tableLayout:At})},jt,!1!==j&&l.createElement(k,Object.assign({},Dt,Ke)),It,Rt));var Nt=Object(O.b)(e),Pt=l.createElement("div",Object.assign({className:u()(r,c,(t={},Object(n.a)(t,"".concat(r,"-rtl"),"rtl"===x),Object(n.a)(t,"".concat(r,"-ping-left"),$e),Object(n.a)(t,"".concat(r,"-ping-right"),et),Object(n.a)(t,"".concat(r,"-layout-fixed"),"fixed"===y),Object(n.a)(t,"".concat(r,"-fixed-header"),ct),Object(n.a)(t,"".concat(r,"-fixed-column"),dt),Object(n.a)(t,"".concat(r,"-scroll-horizontal"),ut),Object(n.a)(t,"".concat(r,"-has-fix-left"),Ge[0]&&Ge[0].fixed),Object(n.a)(t,"".concat(r,"-has-fix-right"),Ge[Ge.length-1]&&"right"===Ge[Ge.length-1].fixed),t)),style:f,id:I,ref:We},Nt),l.createElement(Q,{pingLeft:$e,pingRight:et,props:Object(i.a)(Object(i.a)({},e),{},{stickyOffsets:lt,mergedExpandedKeys:Re})},_&&l.createElement(K,{className:"".concat(r,"-title")},_(te)),l.createElement("div",{className:"".concat(r,"-container")},kt),T&&l.createElement(K,{className:"".concat(r,"-footer")},T(te))));ut&&(Pt=l.createElement(p.a,{onResize:function(e){var t=e.width;Tt(),Be(We.current?We.current.offsetWidth:t)}},Pt));var Ft=l.useMemo((function(){return{prefixCls:r,getComponent:de,scrollbarSize:oe,direction:x,fixedInfoList:Ge.map((function(e,t){return E(t,t,Ge,lt,x)})),isSticky:pt}}),[r,de,oe,x,Ge,lt,x,pt]),Bt=l.useMemo((function(){return Object(i.a)(Object(i.a)({},Ke),{},{tableLayout:At,rowClassName:d,expandedRowClassName:_e,componentWidth:Fe,fixHeader:ct,fixColumn:dt,horizonScroll:ut,expandIcon:Oe,expandableType:Ae,expandRowByClick:we,expandedRowRender:be,onTriggerExpand:Me,expandIconColumnIndex:Se,indentSize:ke})}),[Ke,At,d,_e,Fe,ct,dt,ut,Oe,Ae,we,be,Me,Se,ke]),Ut=l.useMemo((function(){return{onColumnResize:bt}}),[bt]);return l.createElement(w.a.Provider,{value:Ft},l.createElement(L.Provider,{value:Bt},l.createElement(M.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,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=r(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),o=r(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),a=r(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),s=r(/*! react */"q1tI"),l=(r(/*! rc-util/es/warning */"Kwbf"),r(/*! rc-util/es/Children/toArray */"Zm9Q")),c=r(/*! ../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,r=e.props,n=r.children,i=Object(a.a)(r,["children"]),s=Object(o.a)({key:t},i);return n&&(s.children=u(n)),s}))}function d(e){return e.reduce((function(e,t){var r=t.fixed,n=!0===r?"left":r,a=t.children;return a&&a.length>0?[].concat(Object(i.a)(e),Object(i.a)(d(a).map((function(e){return Object(o.a)({fixed:n},e)})))):[].concat(Object(i.a)(e),[Object(o.a)(Object(o.a)({},t),{},{fixed:n})])}),[])}t.b=function(e,t){var r=e.prefixCls,i=e.columns,l=e.children,f=e.expandable,h=e.expandedKeys,p=e.getRowKey,m=e.onTriggerExpand,g=e.expandIcon,v=e.rowExpandable,b=e.expandIconColumnIndex,y=e.direction,x=e.expandRowByClick,w=s.useMemo((function(){return i||u(l)}),[i,l]),E=s.useMemo((function(){if(f){var e,t=b||0,i=w[t],o=(e={},Object(n.a)(e,c.a,{className:"".concat(r,"-expand-icon-col")}),Object(n.a)(e,"title",""),Object(n.a)(e,"fixed",i?i.fixed:null),Object(n.a)(e,"className","".concat(r,"-row-expand-icon-cell")),Object(n.a)(e,"render",(function(e,t,n){var i=p(t,n),o=h.has(i),a=!v||v(t),l=g({prefixCls:r,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}),[f,w,p,h,g,y]),S=s.useMemo((function(){var e=E;return t&&(e=t(e)),e.length||(e=[{render:function(){return null}}]),e}),[t,E,y]),_=s.useMemo((function(){return"rtl"===y?function(e){return e.map((function(e){var t=e.fixed,r=Object(a.a)(e,["fixed"]),n=t;return"left"===t?n="right":"right"===t&&(n="left"),Object(o.a)({fixed:n},r)}))}(d(S)):d(S)}),[S,y]);return[S,_]}},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,r){var n;e.exports=(n=r(/*! ./core */"Ib8C"),r(/*! ./enc-base64 */"ETIr"),r(/*! ./md5 */"cv67"),r(/*! ./evpkdf */"K3mO"),r(/*! ./cipher-core */"OLod"),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],o=[],a=[],s=[],l=[],c=[],u=[],d=[],f=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,o[p]=r;var m=e[r],g=e[m],v=e[g],b=257*e[p]^16843008*p;a[r]=b<<24|b>>>8,s[r]=b<<16|b>>>16,l[r]=b<<8|b>>>24,c[r]=b,b=16843009*v^65537*g^257*m^16843008*r,u[p]=b<<24|b>>>8,d[p]=b<<16|b>>>16,f[p]=b<<8|b>>>24,h[p]=b,r?(r=m^e[e[e[v^m]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a<n;a++)a<r?o[a]=t[a]:(c=o[a-1],a%r?r>6&&a%r==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/r|0]<<24),o[a]=o[a-r]^c);for(var s=this._invKeySchedule=[],l=0;l<n;l++){if(a=n-l,l%4)var c=o[a];else c=o[a-4];s[l]=l<4||a<=4?c:u[i[c>>>24]]^d[i[c>>>16&255]]^f[i[c>>>8&255]]^h[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,l,c,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,d,f,h,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var l=this._nRounds,c=e[t]^r[0],u=e[t+1]^r[1],d=e[t+2]^r[2],f=e[t+3]^r[3],h=4,p=1;p<l;p++){var m=n[c>>>24]^i[u>>>16&255]^o[d>>>8&255]^a[255&f]^r[h++],g=n[u>>>24]^i[d>>>16&255]^o[f>>>8&255]^a[255&c]^r[h++],v=n[d>>>24]^i[f>>>16&255]^o[c>>>8&255]^a[255&u]^r[h++],b=n[f>>>24]^i[c>>>16&255]^o[u>>>8&255]^a[255&d]^r[h++];c=m,u=g,d=v,f=b}m=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^r[h++],g=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&c])^r[h++],v=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^r[h++],b=(s[f>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^r[h++],e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=b},keySize:8});e.AES=t._createHelper(m)}(),n.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,r){var n,i,o;e.exports=(o=r(/*! ./core */"Ib8C"),i=(n=o).lib.WordArray,n.enc.Base64url={stringify:function(e,t=!0){var r=e.words,n=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],a=0;a<n;a+=3)for(var s=(r[a>>>2]>>>24-a%4*8&255)<<16|(r[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|r[a+2>>>2]>>>24-(a+2)%4*8&255,l=0;l<4&&a+.75*l<n;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 r=e.length,n=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var a=0;a<n.length;a++)o[n.charCodeAt(a)]=a}var s=n.charAt(64);if(s){var l=e.indexOf(s);-1!==l&&(r=l)}return function(e,t,r){for(var n=[],o=0,a=0;a<t;a++)if(a%4){var s=r[e.charCodeAt(a-1)]<<a%4*2,l=r[e.charCodeAt(a)]>>>6-a%4*2,c=s|l;n[o>>>2]|=c<<24-o%4*8,o++}return i.create(n,o)}(e,r,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,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i}));function n(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}function i(e){var t=e.getBoundingClientRect(),r=document.documentElement;return{left:t.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||document.body.clientTop||0)}}},ynwM:
/*!************************************************************!*\
!*** ./node_modules/store/storages/oldFF-globalStorage.js ***!
\************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,r){var n=r(/*! ../src/util */"MFOe").Global;e.exports={name:"oldFF-globalStorage",read:function(e){return i[e]},write:function(e,t){i[e]=t},each:o,remove:function(e){return i.removeItem(e)},clearAll:function(){o((function(e,t){delete i[e]}))}};var i=n.globalStorage;function o(e){for(var t=i.length-1;t>=0;t--){var r=i.key(t);e(i[r],r)}}}}]);