|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[210,4,5,6,7,8,9,10],{"+E2i":function(W,ee,L){"use strict";L.d(ee,"a",function(){return K}),L.d(ee,"b",function(){return N});var B=L("6ASS"),M=L("fNpE"),G=L("B/uU"),X=["expandable"],K="RC_TABLE_INTERNAL_COL_DEFINE";function N(i){var T=i.expandable,e=Object(M.a)(i,X),E;return"expandable"in i?E=Object(B.a)(Object(B.a)({},e),T):E=e,E.showExpandColumn===!1&&(E.expandIconColumnIndex=-1),E}},"+NIl":function(W,ee,L){(function(B){B(L("VrN/"))})(function(B){"use strict";B.defineMode("stex",function(M,G){"use strict";function X(n,o){n.cmdState.push(o)}function K(n){return n.cmdState.length>0?n.cmdState[n.cmdState.length-1]:null}function N(n){var o=n.cmdState.pop();o&&o.closeBracket()}function i(n){for(var o=n.cmdState,c=o.length-1;c>=0;c--){var v=o[c];if(v.name=="DEFAULT")continue;return v}return{styleIdentifier:function(){return null}}}function T(n,o,c){return function(){this.name=n,this.bracketNo=0,this.style=o,this.styles=c,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var e={};e.importmodule=T("importmodule","tag",["string","builtin"]),e.documentclass=T("documentclass","tag",["","atom"]),e.usepackage=T("usepackage","tag",["atom"]),e.begin=T("begin","tag",["atom"]),e.end=T("end","tag",["atom"]),e.label=T("label","tag",["atom"]),e.ref=T("ref","tag",["atom"]),e.eqref=T("eqref","tag",["atom"]),e.cite=T("cite","tag",["atom"]),e.bibitem=T("bibitem","tag",["atom"]),e.Bibitem=T("Bibitem","tag",["atom"]),e.RBibitem=T("RBibitem","tag",["atom"]),e.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function E(n,o){n.f=o}function l(n,o){var c;if(n.match(/^\\[a-zA-Z@]+/)){var v=n.current().slice(1);return c=e.hasOwnProperty(v)?e[v]:e.DEFAULT,c=new c,X(o,c),E(o,r),c.style}if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/\\]/))return"tag";if(n.match("\\["))return E(o,function(y,h){return _(y,h,"\\]")}),"keyword";if(n.match("\\("))return E(o,function(y,h){return _(y,h,"\\)")}),"keyword";if(n.match("$$"))return E(o,function(y,h){return _(y,h,"$$")}),"keyword";if(n.match("$"))return E(o,function(y,h){return _(y,h,"$")}),"keyword";var f=n.next();if(f=="%")return n.skipToEnd(),"comment";if(f=="}"||f=="]"){if(c=K(o),c)c.closeBracket(f),E(o,r);else return"error";return"bracket"}else return f=="{"||f=="["?(c=e.DEFAULT,c=new c,X(o,c),"bracket"):/\d/.test(f)?(n.eatWhile(/[\w.%]/),"atom"):(n.eatWhile(/[\w\-_]/),c=i(o),c.name=="begin"&&(c.argument=n.current()),c.styleIdentifier())}function _(n,o,c){if(n.eatSpace())return null;if(c&&n.match(c))return E(o,l),"keyword";if(n.match(/^\\[a-zA-Z@]+/))return"tag";if(n.match(/^[a-zA-Z]+/))return"variable-2";if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/]/))return"tag";if(n.match(/^[\^_&]/))return"tag";if(n.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(n.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var v=n.next();return v=="{"||v=="}"||v=="["||v=="]"||v=="("||v==")"?"bracket":v=="%"?(n.skipToEnd(),"comment"):"error"}function r(n,o){var c=n.peek(),v;return c=="{"||c=="["?(v=K(o),v.openBracket(c),n.eat(c),E(o,l),"bracket"):/[ \t\r]/.test(c)?(n.eat(c),null):(E(o,l),N(o),l(n,o))}return{startState:function(){var n=G.inMathMode?function(o,c){return _(o,c)}:l;return{cmdState:[],f:n}},copyState:function(n){return{cmdState:n.cmdState.slice(),f:n.f}},token:function(n,o){return o.f(n,o)},blankLine:function(n){n.f=l,n.cmdState.length=0},lineComment:"%"}}),B.defineMIME("text/x-stex","stex"),B.defineMIME("text/x-latex","stex")})},"+ua5":function(W,ee,L){},"/cxE":function(W,ee,L){"use strict";L.d(ee,"f",function(){return G}),L.d(ee,"g",function(){return X}),L.d(ee,"h",function(){return K}),L.d(ee,"e",function(){return i}),L.d(ee,"b",function(){return T}),L.d(ee,"c",function(){return e}),L.d(ee,"d",function(){return E}),L.d(ee,"a",function(){return l});class B{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(_){setTimeout(()=>{throw _.stack?new Error(_.message+`
|
|
|
|
|
|
`+_.stack):_},0)}}emit(_){this.listeners.forEach(r=>{r(_)})}onUnexpectedError(_){this.unexpectedErrorHandler(_),this.emit(_)}onUnexpectedExternalError(_){this.unexpectedErrorHandler(_)}}const M=new B;function G(_){i(_)||M.onUnexpectedError(_);return}function X(_){i(_)||M.onUnexpectedExternalError(_);return}function K(_){if(_ instanceof Error){let{name:r,message:n}=_;const o=_.stacktrace||_.stack;return{$isError:!0,name:r,message:n,stack:o}}return _}const N="Canceled";function i(_){return _ instanceof Error&&_.name===N&&_.message===N}function T(){const _=new Error(N);return _.name=_.message,_}function e(_){return _?new Error(`Illegal argument: ${_}`):new Error("Illegal argument")}function E(_){return _?new Error(`Illegal state: ${_}`):new Error("Illegal state")}class l extends Error{constructor(_){super("NotSupported");_&&(this.message=_)}}},"0lMV":function(W,ee,L){"use strict";var B=L("T/Jt"),M=L.n(B),G=B.createContext({});ee.a=G},"0pdE":function(W,ee,L){"use strict";var B=L("yuO0"),M=L("XjgL"),G=L("fNpE"),X=L("6ASS"),K=L("eA01"),N=L("fXDJ"),i=L("fhFH"),T=L("BPTR"),e=L("udol"),E=L("27eb"),l=L.n(E),_=L("E0BR"),r=L("T/Jt"),n=L("c27x"),o=function(w){for(var D=w.prefixCls,A=w.level,P=w.isStart,I=w.isEnd,u="".concat(D,"-indent-unit"),k=[],g=0;g<A;g+=1){var a;k.push(r.createElement("span",{key:g,className:l()(u,(a={},Object(M.a)(a,"".concat(u,"-start"),P[g]),Object(M.a)(a,"".concat(u,"-end"),I[g]),a))}))}return r.createElement("span",{"aria-hidden":"true",className:"".concat(D,"-indent")},k)},c=r.memo(o),v=L("El5i"),f=L("rgEC"),y=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],h="open",b="close",m="---",d=function(O){Object(T.a)(D,O);var w=Object(e.a)(D);function D(){var A;Object(K.a)(this,D);for(var P=arguments.length,I=new Array(P),u=0;u<P;u++)I[u]=arguments[u];return A=w.call.apply(w,[this].concat(I)),A.state={dragNodeHighlight:!1},A.selectHandle=void 0,A.cacheIndent=void 0,A.onSelectorClick=function(k){var g=A.props.context.onNodeClick;g(k,Object(f.b)(A.props)),A.isSelectable()?A.onSelect(k):A.onCheck(k)},A.onSelectorDoubleClick=function(k){var g=A.props.context.onNodeDoubleClick;g(k,Object(f.b)(A.props))},A.onSelect=function(k){if(A.isDisabled())return;var g=A.props.context.onNodeSelect;g(k,Object(f.b)(A.props))},A.onCheck=function(k){if(A.isDisabled())return;var g=A.props,a=g.disableCheckbox,C=g.checked,S=A.props.context.onNodeCheck;if(!A.isCheckable()||a)return;var p=!C;S(k,Object(f.b)(A.props),p)},A.onMouseEnter=function(k){var g=A.props.context.onNodeMouseEnter;g(k,Object(f.b)(A.props))},A.onMouseLeave=function(k){var g=A.props.context.onNodeMouseLeave;g(k,Object(f.b)(A.props))},A.onContextMenu=function(k){var g=A.props.context.onNodeContextMenu;g(k,Object(f.b)(A.props))},A.onDragStart=function(k){var g=A.props.context.onNodeDragStart;k.stopPropagation(),A.setState({dragNodeHighlight:!0}),g(k,Object(i.a)(A));try{k.dataTransfer.setData("text/plain","")}catch(a){}},A.onDragEnter=function(k){var g=A.props.context.onNodeDragEnter;k.preventDefault(),k.stopPropagation(),g(k,Object(i.a)(A))},A.onDragOver=function(k){var g=A.props.context.onNodeDragOver;k.preventDefault(),k.stopPropagation(),g(k,Object(i.a)(A))},A.onDragLeave=function(k){var g=A.props.context.onNodeDragLeave;k.stopPropagation(),g(k,Object(i.a)(A))},A.onDragEnd=function(k){var g=A.props.context.onNodeDragEnd;k.stopPropagation(),A.setState({dragNodeHighlight:!1}),g(k,Object(i.a)(A))},A.onDrop=function(k){var g=A.props.context.onNodeDrop;k.preventDefault(),k.stopPropagation(),A.setState({dragNodeHighlight:!1}),g(k,Object(i.a)(A))},A.onExpand=function(k){var g=A.props,a=g.loading,C=g.context.onNodeExpand;if(a)return;C(k,Object(f.b)(A.props))},A.setSelectHandle=function(k){A.selectHandle=k},A.getNodeState=function(){var k=A.props.expanded;return A.isLeaf()?null:k?h:b},A.hasChildren=function(){var k=A.props.eventKey,g=A.props.context.keyEntities,a=Object(v.a)(g,k)||{},C=a.children;return!!(C||[]).length},A.isLeaf=function(){var k=A.props,g=k.isLeaf,a=k.loaded,C=A.props.context.loadData,S=A.hasChildren();return g===!1?!1:g||!C&&!S||C&&a&&!S},A.isDisabled=function(){var k=A.props.disabled,g=A.props.context.disabled;return!!(g||k)},A.isCheckable=function(){var k=A.props.checkable,g=A.props.context.checkable;return!g||k===!1?!1:g},A.syncLoadData=function(k){var g=k.expanded,a=k.loading,C=k.loaded,S=A.props.context,p=S.loadData,U=S.onNodeLoad;if(a)return;p&&g&&!A.isLeaf()&&(!A.hasChildren()&&!C&&U(Object(f.b)(A.props)))},A.isDraggable=function(){var k=A.props,g=k.data,a=k.context.draggable;return!!(a&&(!a.nodeDraggable||a.nodeDraggable(g)))},A.renderDragHandler=function(){var k=A.props.context,g=k.draggable,a=k.prefixCls;return(g==null?void 0:g.icon)?r.createElement("span",{className:"".concat(a,"-draggable-icon")},g.icon):null},A.renderSwitcherIconDom=function(k){var g=A.props.switcherIcon,a=A.props.context.switcherIcon,C=g||a;return typeof C=="function"?C(Object(X.a)(Object(X.a)({},A.props),{},{isLeaf:k})):C},A.renderSwitcher=function(){var k=A.props.expanded,g=A.props.context.prefixCls;if(A.isLeaf()){var a=A.renderSwitcherIconDom(!0);return a!==!1?r.createElement("span",{className:l()("".concat(g,"-switcher"),"".concat(g,"-switcher-noop"))},a):null}var C=l()("".concat(g,"-switcher"),"".concat(g,"-switcher_").concat(k?h:b)),S=A.renderSwitcherIconDom(!1);return S!==!1?r.createElement("span",{onClick:A.onExpand,className:C},S):null},A.renderCheckbox=function(){var k=A.props,g=k.checked,a=k.halfChecked,C=k.disableCheckbox,S=A.props.context.prefixCls,p=A.isDisabled(),U=A.isCheckable();if(!U)return null;var z=typeof U!="boolean"?U:null;return r.createElement("span",{className:l()("".concat(S,"-checkbox"),g&&"".concat(S,"-checkbox-checked"),!g&&a&&"".concat(S,"-checkbox-indeterminate"),(p||C)&&"".concat(S,"-checkbox-disabled")),onClick:A.onCheck},z)},A.renderIcon=function(){var k=A.props.loading,g=A.props.context.prefixCls;return r.createElement("span",{className:l()("".concat(g,"-iconEle"),"".concat(g,"-icon__").concat(A.getNodeState()||"docu"),k&&"".concat(g,"-icon_loading"))})},A.renderSelector=function(){var k=A.state.dragNodeHighlight,g=A.props,a=g.title,C=a===void 0?m:a,S=g.selected,p=g.icon,U=g.loading,z=g.data,q=A.props.context,$=q.prefixCls,re=q.showIcon,ce=q.icon,ne=q.loadData,me=q.titleRender,be=A.isDisabled(),he="".concat($,"-node-content-wrapper"),se;if(re){var _e=p||ce;se=_e?r.createElement("span",{className:l()("".concat($,"-iconEle"),"".concat($,"-icon__customize"))},typeof _e=="function"?_e(A.props):_e):A.renderIcon()}else ne&&U&&(se=A.renderIcon());var De;typeof C=="function"?De=C(z):me?De=me(z):De=C;var ge=r.createElement("span",{className:"".concat($,"-title")},De);return r.createElement("span",{ref:A.setSelectHandle,title:typeof C=="string"?C:"",className:l()("".concat(he),"".concat(he,"-").concat(A.getNodeState()||"normal"),!be&&(S||k)&&"".concat($,"-node-selected")),onMouseEnter:A.onMouseEnter,onMouseLeave:A.onMouseLeave,onContextMenu:A.onContextMenu,onClick:A.onSelectorClick,onDoubleClick:A.onSelectorDoubleClick},se,ge,A.renderDropIndicator())},A.renderDropIndicator=function(){var k=A.props,g=k.disabled,a=k.eventKey,C=A.props.context,S=C.draggable,p=C.dropLevelOffset,U=C.dropPosition,z=C.prefixCls,q=C.indent,$=C.dropIndicatorRender,re=C.dragOverNodeKey,ce=C.direction,ne=!!S,me=!g&&ne&&re===a,be=q!=null?q:A.cacheIndent;return A.cacheIndent=q,me?$({dropPosition:U,dropLevelOffset:p,indent:be,prefixCls:z,direction:ce}):null},A}return Object(N.a)(D,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var P=this.props.selectable,I=this.props.context.selectable;return typeof P=="boolean"?P:I}},{key:"render",value:function(){var P,I=this.props,u=I.eventKey,k=I.className,g=I.style,a=I.dragOver,C=I.dragOverGapTop,S=I.dragOverGapBottom,p=I.isLeaf,U=I.isStart,z=I.isEnd,q=I.expanded,$=I.selected,re=I.checked,ce=I.halfChecked,ne=I.loading,me=I.domRef,be=I.active,he=I.data,se=I.onMouseMove,_e=I.selectable,De=Object(G.a)(I,y),ge=this.props.context,fe=ge.prefixCls,Ce=ge.filterTreeNode,ae=ge.keyEntities,Q=ge.dropContainerKey,J=ge.dropTargetKey,Z=ge.draggingNodeKey,pe=this.isDisabled(),le=Object(_.a)(De,{aria:!0,data:!0}),ye=Object(v.a)(ae,u)||{},Te=ye.level,Pe=z[z.length-1],He=this.isDraggable(),Oe=!pe&&He,Ue=Z===u,je=_e!==void 0?{"aria-selected":!!_e}:void 0;return r.createElement("div",Object(B.a)({ref:me,className:l()(k,"".concat(fe,"-treenode"),(P={},Object(M.a)(P,"".concat(fe,"-treenode-disabled"),pe),Object(M.a)(P,"".concat(fe,"-treenode-switcher-").concat(q?"open":"close"),!p),Object(M.a)(P,"".concat(fe,"-treenode-checkbox-checked"),re),Object(M.a)(P,"".concat(fe,"-treenode-checkbox-indeterminate"),ce),Object(M.a)(P,"".concat(fe,"-treenode-selected"),$),Object(M.a)(P,"".concat(fe,"-treenode-loading"),ne),Object(M.a)(P,"".concat(fe,"-treenode-active"),be),Object(M.a)(P,"".concat(fe,"-treenode-leaf-last"),Pe),Object(M.a)(P,"".concat(fe,"-treenode-draggable"),He),Object(M.a)(P,"dragging",Ue),Object(M.a)(P,"drop-target",J===u),Object(M.a)(P,"drop-container",Q===u),Object(M.a)(P,"drag-over",!pe&&a),Object(M.a)(P,"drag-over-gap-top",!pe&&C),Object(M.a)(P,"drag-over-gap-bottom",!pe&&S),Object(M.a)(P,"filter-node",Ce&&Ce(Object(f.b)(this.props))),P)),style:g,draggable:Oe,"aria-grabbed":Ue,onDragStart:Oe?this.onDragStart:void 0,onDragEnter:He?this.onDragEnter:void 0,onDragOver:He?this.onDragOver:void 0,onDragLeave:He?this.onDragLeave:void 0,onDrop:He?this.onDrop:void 0,onDragEnd:He?this.onDragEnd:void 0,onMouseMove:se},je,le),r.createElement(c,{prefixCls:fe,level:Te,isStart:U,isEnd:z}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),D}(r.Component),x=function(w){return r.createElement(n.a.Consumer,null,function(D){return r.createElement(d,Object(B.a)({},w,{context:D}))})};x.displayName="TreeNode",x.isTreeNode=1;var R=ee.a=x},"19Vz":function(W,ee,L){(function(B){B(L("VrN/"))})(function(B){B.defineOption("placeholder","",function(T,e,E){var l=E&&E!=B.Init;if(e&&!l)T.on("blur",K),T.on("change",N),T.on("swapDoc",N),B.on(T.getInputField(),"compositionupdate",T.state.placeholderCompose=function(){X(T)}),N(T);else if(!e&&l){T.off("blur",K),T.off("change",N),T.off("swapDoc",N),B.off(T.getInputField(),"compositionupdate",T.state.placeholderCompose),M(T);var _=T.getWrapperElement();_.className=_.className.replace(" CodeMirror-empty","")}e&&!T.hasFocus()&&K(T)});function M(T){T.state.placeholder&&(T.state.placeholder.parentNode.removeChild(T.state.placeholder),T.state.placeholder=null)}function G(T){M(T);var e=T.state.placeholder=document.createElement("pre");e.style.cssText="height: 0; overflow: visible",e.style.direction=T.getOption("direction"),e.className="CodeMirror-placeholder CodeMirror-line-like";var E=T.getOption("placeholder");typeof E=="string"&&(E=document.createTextNode(E)),e.appendChild(E),T.display.lineSpace.insertBefore(e,T.display.lineSpace.firstChild)}function X(T){setTimeout(function(){var e=!1,E=T.getInputField();E.nodeName=="TEXTAREA"?e=!E.value:T.lineCount()==1&&(e=!/[^\u200b]/.test(E.querySelector(".CodeMirror-line").textContent)),e?G(T):M(T)},20)}function K(T){i(T)&&G(T)}function N(T){var e=T.getWrapperElement(),E=i(T);e.className=e.className.replace(" CodeMirror-empty","")+(E?" CodeMirror-empty":""),E?G(T):M(T)}function i(T){return T.lineCount()===1&&T.getLine(0)===""}})},"1HCi":function(W,ee){W.exports=function(B,M,G,X){var K=G?G.call(X,B,M):void 0;if(K!==void 0)return!!K;if(B===M)return!0;if(typeof B!="object"||!B||typeof M!="object"||!M)return!1;var N=Object.keys(B),i=Object.keys(M);if(N.length!==i.length)return!1;for(var T=Object.prototype.hasOwnProperty.bind(M),e=0;e<N.length;e++){var E=N[e];if(!T(E))return!1;var l=B[E],_=M[E];if(K=G?G.call(X,l,_,E):void 0,K===!1||K===void 0&&l!==_)return!1}return!0}},"1T2W":function(W,ee,L){W.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"1eCo":function(W,ee,L){(function(B){B(L("VrN/"))})(function(B){"use strict";var M={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},G={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};B.defineMode("xml",function(X,K){var N=X.indentUnit,i={},T=K.htmlMode?M:G;for(var e in T)i[e]=T[e];for(var e in K)i[e]=K[e];var E,l;function _(A,P){function I(g){return P.tokenize=g,g(A,P)}var u=A.next();if(u=="<")return A.eat("!")?A.eat("[")?A.match("CDATA[")?I(o("atom","]]>")):null:A.match("--")?I(o("comment","-->")):A.match("DOCTYPE",!0,!0)?(A.eatWhile(/[\w\._\-]/),I(c(1))):null:A.eat("?")?(A.eatWhile(/[\w\._\-]/),P.tokenize=o("meta","?>"),"meta"):(E=A.eat("/")?"closeTag":"openTag",P.tokenize=r,"tag bracket");if(u=="&"){var k;return A.eat("#")?A.eat("x")?k=A.eatWhile(/[a-fA-F\d]/)&&A.eat(";"):k=A.eatWhile(/[\d]/)&&A.eat(";"):k=A.eatWhile(/[\w\.\-:]/)&&A.eat(";"),k?"atom":"error"}else return A.eatWhile(/[^&<]/),null}_.isInText=!0;function r(A,P){var I=A.next();if(I==">"||I=="/"&&A.eat(">"))return P.tokenize=_,E=I==">"?"endTag":"selfcloseTag","tag bracket";if(I=="=")return E="equals",null;if(I=="<"){P.tokenize=_,P.state=h,P.tagName=P.tagStart=null;var u=P.tokenize(A,P);return u?u+" tag error":"tag error"}else return/[\'\"]/.test(I)?(P.tokenize=n(I),P.stringStartCol=A.column(),P.tokenize(A,P)):(A.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function n(A){var P=function(I,u){for(;!I.eol();)if(I.next()==A){u.tokenize=r;break}return"string"};return P.isInAttribute=!0,P}function o(A,P){return function(I,u){for(;!I.eol();){if(I.match(P)){u.tokenize=_;break}I.next()}return A}}function c(A){return function(P,I){for(var u;(u=P.next())!=null;){if(u=="<")return I.tokenize=c(A+1),I.tokenize(P,I);if(u==">")if(A==1){I.tokenize=_;break}else return I.tokenize=c(A-1),I.tokenize(P,I)}return"meta"}}function v(A,P,I){this.prev=A.context,this.tagName=P,this.indent=A.indented,this.startOfLine=I,(i.doNotIndent.hasOwnProperty(P)||A.context&&A.context.noIndent)&&(this.noIndent=!0)}function f(A){A.context&&(A.context=A.context.prev)}function y(A,P){for(var I;;){if(!A.context)return;if(I=A.context.tagName,!i.contextGrabbers.hasOwnProperty(I)||!i.contextGrabbers[I].hasOwnProperty(P))return;f(A)}}function h(A,P,I){return A=="openTag"?(I.tagStart=P.column(),b):A=="closeTag"?m:h}function b(A,P,I){return A=="word"?(I.tagName=P.current(),l="tag",R):i.allowMissingTagName&&A=="endTag"?(l="tag bracket",R(A,P,I)):(l="error",b)}function m(A,P,I){if(A=="word"){var u=P.current();return I.context&&I.context.tagName!=u&&i.implicitlyClosed.hasOwnProperty(I.context.tagName)&&f(I),I.context&&I.context.tagName==u||i.matchClosing===!1?(l="tag",d):(l="tag error",x)}else return i.allowMissingTagName&&A=="endTag"?(l="tag bracket",d(A,P,I)):(l="error",x)}function d(A,P,I){return A!="endTag"?(l="error",d):(f(I),h)}function x(A,P,I){return l="error",d(A,P,I)}function R(A,P,I){if(A=="word")return l="attribute",O;if(A=="endTag"||A=="selfcloseTag"){var u=I.tagName,k=I.tagStart;return I.tagName=I.tagStart=null,A=="selfcloseTag"||i.autoSelfClosers.hasOwnProperty(u)?y(I,u):(y(I,u),I.context=new v(I,u,k==I.indented)),h}return l="error",R}function O(A,P,I){return A=="equals"?w:(i.allowMissing||(l="error"),R(A,P,I))}function w(A,P,I){return A=="string"?D:A=="word"&&i.allowUnquoted?(l="string",R):(l="error",R(A,P,I))}function D(A,P,I){return A=="string"?D:R(A,P,I)}return{startState:function(A){var P={tokenize:_,state:h,indented:A||0,tagName:null,tagStart:null,context:null};return A!=null&&(P.baseIndent=A),P},token:function(A,P){if(!P.tagName&&A.sol()&&(P.indented=A.indentation()),A.eatSpace())return null;E=null;var I=P.tokenize(A,P);return(I||E)&&I!="comment"&&(l=null,P.state=P.state(E||I,A,P),l&&(I=l=="error"?I+" error":l)),I},indent:function(A,P,I){var u=A.context;if(A.tokenize.isInAttribute)return A.tagStart==A.indented?A.stringStartCol+1:A.indented+N;if(u&&u.noIndent)return B.Pass;if(A.tokenize!=r&&A.tokenize!=_)return I?I.match(/^(\s*)/)[0].length:0;if(A.tagName)return i.multilineTagIndentPastTag!==!1?A.tagStart+A.tagName.length+2:A.tagStart+N*(i.multilineTagIndentFactor||1);if(i.alignCDATA&&/<!\[CDATA\[/.test(P))return 0;var k=P&&/^<(\/)?([\w_:\.-]*)/.exec(P);if(k&&k[1])for(;u;)if(u.tagName==k[2]){u=u.prev;break}else if(i.implicitlyClosed.hasOwnProperty(u.tagName))u=u.prev;else break;else if(k)for(;u;){var g=i.contextGrabbers[u.tagName];if(g&&g.hasOwnProperty(k[2]))u=u.prev;else break}for(;u&&u.prev&&!u.startOfLine;)u=u.prev;return u?u.indent+N:A.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:i.htmlMode?"html":"xml",helperType:i.htmlMode?"html":"xml",skipAttribute:function(A){A.state==w&&(A.state=R)},xmlCurrentTag:function(A){return A.tagName?{name:A.tagName,close:A.type=="closeTag"}:null},xmlCurrentContext:function(A){for(var P=[],I=A.context;I;I=I.prev)I.tagName&&P.push(I.tagName);return P.reverse()}}}),B.defineMIME("text/xml","xml"),B.defineMIME("application/xml","xml"),B.mimeModes.hasOwnProperty("text/html")||B.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("MlIO"))})(this,function(B){return function(){var M=B,G=M.lib,X=G.Hasher,K=M.x64,N=K.Word,i=K.WordArray,T=M.algo;function e(){return N.create.apply(N,arguments)}var E=[e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591)],l=[];(function(){for(var r=0;r<80;r++)l[r]=e()})();var _=T.SHA512=X.extend({_doReset:function(){this._hash=new i.init([new N.init(1779033703,4089235720),new N.init(3144134277,2227873595),new N.init(1013904242,4271175723),new N.init(2773480762,1595750129),new N.init(1359893119,2917565137),new N.init(2600822924,725511199),new N.init(528734635,4215389547),new N.init(1541459225,327033209)])},_doProcessBlock:function(r,n){for(var o=this._hash.words,c=o[0],v=o[1],f=o[2],y=o[3],h=o[4],b=o[5],m=o[6],d=o[7],x=c.high,R=c.low,O=v.high,w=v.low,D=f.high,A=f.low,P=y.high,I=y.low,u=h.high,k=h.low,g=b.high,a=b.low,C=m.high,S=m.low,p=d.high,U=d.low,z=x,q=R,$=O,re=w,ce=D,ne=A,me=P,be=I,he=u,se=k,_e=g,De=a,ge=C,fe=S,Ce=p,ae=U,Q=0;Q<80;Q++){var J,Z,pe=l[Q];if(Q<16)Z=pe.high=r[n+Q*2]|0,J=pe.low=r[n+Q*2+1]|0;else{var le=l[Q-15],ye=le.high,Te=le.low,Pe=(ye>>>1|Te<<31)^(ye>>>8|Te<<24)^ye>>>7,He=(Te>>>1|ye<<31)^(Te>>>8|ye<<24)^(Te>>>7|ye<<25),Oe=l[Q-2],Ue=Oe.high,je=Oe.low,Ve=(Ue>>>19|je<<13)^(Ue<<3|je>>>29)^Ue>>>6,Re=(je>>>19|Ue<<13)^(je<<3|Ue>>>29)^(je>>>6|Ue<<26),Xe=l[Q-7],Qe=Xe.high,We=Xe.low,ze=l[Q-16],Me=ze.high,Ie=ze.low;J=He+We,Z=Pe+Qe+(J>>>0<He>>>0?1:0),J=J+Re,Z=Z+Ve+(J>>>0<Re>>>0?1:0),J=J+Ie,Z=Z+Me+(J>>>0<Ie>>>0?1:0),pe.high=Z,pe.low=J}var Be=he&_e^~he&ge,we=se&De^~se&fe,Ae=z&$^z&ce^$&ce,ke=q&re^q&ne^re&ne,Le=(z>>>28|q<<4)^(z<<30|q>>>2)^(z<<25|q>>>7),Ke=(q>>>28|z<<4)^(q<<30|z>>>2)^(q<<25|z>>>7),Ze=(he>>>14|se<<18)^(he>>>18|se<<14)^(he<<23|se>>>9),Ne=(se>>>14|he<<18)^(se>>>18|he<<14)^(se<<23|he>>>9),$e=E[Q],Je=$e.high,qe=$e.low,ot=ae+Ne,at=Ce+Ze+(ot>>>0<ae>>>0?1:0),ot=ot+we,at=at+Be+(ot>>>0<we>>>0?1:0),ot=ot+qe,at=at+Je+(ot>>>0<qe>>>0?1:0),ot=ot+J,at=at+Z+(ot>>>0<J>>>0?1:0),rt=Ke+ke,dt=Le+Ae+(rt>>>0<Ke>>>0?1:0);Ce=ge,ae=fe,ge=_e,fe=De,_e=he,De=se,se=be+ot|0,he=me+at+(se>>>0<be>>>0?1:0)|0,me=ce,be=ne,ce=$,ne=re,$=z,re=q,q=ot+rt|0,z=at+dt+(q>>>0<ot>>>0?1:0)|0}R=c.low=R+q,c.high=x+z+(R>>>0<q>>>0?1:0),w=v.low=w+re,v.high=O+$+(w>>>0<re>>>0?1:0),A=f.low=A+ne,f.high=D+ce+(A>>>0<ne>>>0?1:0),I=y.low=I+be,y.high=P+me+(I>>>0<be>>>0?1:0),k=h.low=k+se,h.high=u+he+(k>>>0<se>>>0?1:0),a=b.low=a+De,b.high=g+_e+(a>>>0<De>>>0?1:0),S=m.low=S+fe,m.high=C+ge+(S>>>0<fe>>>0?1:0),U=d.low=U+ae,d.high=p+Ce+(U>>>0<ae>>>0?1:0)},_doFinalize:function(){var r=this._data,n=r.words,o=this._nDataBytes*8,c=r.sigBytes*8;n[c>>>5]|=128<<24-c%32,n[(c+128>>>10<<5)+30]=Math.floor(o/4294967296),n[(c+128>>>10<<5)+31]=o,r.sigBytes=n.length*4,this._process();var v=this._hash.toX32();return v},clone:function(){var r=X.clone.call(this);return r._hash=this._hash.clone(),r},blockSize:1024/32});M.SHA512=X._createHelper(_),M.HmacSHA512=X._createHmacHelper(_)}(),B.SHA512})},"24hK":function(W,ee,L){"use strict";L.d(ee,"a",function(){return M});class B{constructor(G){this.element=G,this.next=B.Undefined,this.prev=B.Undefined}}B.Undefined=new B(void 0);class M{constructor(){this._first=B.Undefined,this._last=B.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===B.Undefined}clear(){let G=this._first;for(;G!==B.Undefined;){const X=G.next;G.prev=B.Undefined,G.next=B.Undefined,G=X}this._first=B.Undefined,this._last=B.Undefined,this._size=0}unshift(G){return this._insert(G,!1)}push(G){return this._insert(G,!0)}_insert(G,X){const K=new B(G);if(this._first===B.Undefined)this._first=K,this._last=K;else if(X){const i=this._last;this._last=K,K.prev=i,i.next=K}else{const i=this._first;this._first=K,K.next=i,i.prev=K}this._size+=1;let N=!1;return()=>{N||(N=!0,this._remove(K))}}shift(){if(this._first===B.Undefined)return;{const G=this._first.element;return this._remove(this._first),G}}pop(){if(this._last===B.Undefined)return;{const G=this._last.element;return this._remove(this._last),G}}_remove(G){if(G.prev!==B.Undefined&&G.next!==B.Undefined){const X=G.prev;X.next=G.next,G.next.prev=X}else G.prev===B.Undefined&&G.next===B.Undefined?(this._first=B.Undefined,this._last=B.Undefined):G.next===B.Undefined?(this._last=this._last.prev,this._last.next=B.Undefined):G.prev===B.Undefined&&(this._first=this._first.next,this._first.prev=B.Undefined);this._size-=1}*[Symbol.iterator](){let G=this._first;for(;G!==B.Undefined;)yield G.element,G=G.next}}},"3/fG":function(W,ee,L){"use strict";L.d(ee,"a",function(){return M});function B(G,X){let K;return X.length===0?K=G:K=G.replace(/\{(\d+)\}/g,function(N,i){const T=i[0];return typeof X[T]!="undefined"?X[T]:N}),K}function M(G,X,...K){return B(X,K)}},"3GYr":function(W,ee,L){"use strict";var B=L("yuO0"),M=L("T/Jt"),G=L("0lMV"),X=L("x/L2"),K=L("Dpym"),N=L("TqI3");function i(r){var n=r.className,o=r.index,c=r.children,v=r.colSpan,f=v===void 0?1:v,y=r.rowSpan,h=r.align,b=M.useContext(K.a),m=b.prefixCls,d=b.direction,x=M.useContext(G.a),R=x.scrollColumnIndex,O=x.stickyOffsets,w=x.flattenColumns,D=o+f-1,A=D+1===R?f+1:f,P=Object(N.a)(o,o+A-1,w,O,d);return M.createElement(X.a,Object(B.a)({className:n,index:o,component:"td",prefixCls:m,record:null,dataIndex:null,align:h,colSpan:A,rowSpan:y,render:function(){return c}},P))}var T=L("fNpE"),e=["children"];function E(r){var n=r.children,o=Object(T.a)(r,e);return M.createElement("tr",o,n)}function l(r){var n=r.children;return n}l.Row=E,l.Cell=i;var _=ee.a=l},"3y9D":function(W,ee,L){(function(B,M){W.exports=ee=M(L("Ib8C"))})(this,function(B){return function(){var M=B,G=M.lib,X=G.WordArray,K=G.Hasher,N=M.algo,i=[],T=N.SHA1=K.extend({_doReset:function(){this._hash=new X.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,E){for(var l=this._hash.words,_=l[0],r=l[1],n=l[2],o=l[3],c=l[4],v=0;v<80;v++){if(v<16)i[v]=e[E+v]|0;else{var f=i[v-3]^i[v-8]^i[v-14]^i[v-16];i[v]=f<<1|f>>>31}var y=(_<<5|_>>>27)+c+i[v];v<20?y+=(r&n|~r&o)+1518500249:v<40?y+=(r^n^o)+1859775393:v<60?y+=(r&n|r&o|n&o)-1894007588:y+=(r^n^o)-899497514,c=o,o=n,n=r<<30|r>>>2,r=_,_=y}l[0]=l[0]+_|0,l[1]=l[1]+r|0,l[2]=l[2]+n|0,l[3]=l[3]+o|0,l[4]=l[4]+c|0},_doFinalize:function(){var e=this._data,E=e.words,l=this._nDataBytes*8,_=e.sigBytes*8;return E[_>>>5]|=128<<24-_%32,E[(_+64>>>9<<4)+14]=Math.floor(l/4294967296),E[(_+64>>>9<<4)+15]=l,e.sigBytes=E.length*4,this._process(),this._hash},clone:function(){var e=K.clone.call(this);return e._hash=this._hash.clone(),e}});M.SHA1=K._createHelper(T),M.HmacSHA1=K._createHmacHelper(T)}(),B.SHA1})},4:function(W,ee){},"5Und":function(W,ee,L){"use strict";L.d(ee,"b",function(){return G}),L.d(ee,"a",function(){return X}),L.d(ee,"c",function(){return K});var B="RC_TABLE_KEY";function M(N){return N==null?[]:Array.isArray(N)?N:[N]}function G(N,i){if(!i&&typeof i!="number")return N;for(var T=M(i),e=N,E=0;E<T.length;E+=1){if(!e)return null;var l=T[E];e=e[l]}return e}function X(N){var i=[],T={};return N.forEach(function(e){for(var E=e||{},l=E.key,_=E.dataIndex,r=l||M(_).join("-")||B;T[r];)r="".concat(r,"_next");T[r]=!0,i.push(r)}),i}function K(N){return N!=null}},"5VLF":function(W,ee,L){"use strict";var B,M;function G(X,K,N){var i=function(T,e){return X.js_beautify(T,e)};return i.js=X.js_beautify,i.css=K.css_beautify,i.html=N.html_beautify,i.js_beautify=X.js_beautify,i.css_beautify=K.css_beautify,i.html_beautify=N.html_beautify,i}!(B=[L("6UM0"),L("TXwP"),L("psGv")],M=function(X,K,N){return G(X,K,N)}.apply(ee,B),M!==void 0&&(W.exports=M))},"5Y4S":function(W,ee,L){"use strict";L.d(ee,"a",function(){return G});var B=L("MNsG");const M=B.b.performance&&typeof B.b.performance.now=="function";class G{constructor(X){this._highResolution=M&&X,this._startTime=this._now(),this._stopTime=-1}static create(X=!0){return new G(X)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?B.b.performance.now():Date.now()}}},"5hvy":function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("MlIO"))})(this,function(B){return function(M){var G=B,X=G.lib,K=X.WordArray,N=X.Hasher,i=G.x64,T=i.Word,e=G.algo,E=[],l=[],_=[];(function(){for(var o=1,c=0,v=0;v<24;v++){E[o+5*c]=(v+1)*(v+2)/2%64;var f=c%5,y=(2*o+3*c)%5;o=f,c=y}for(var o=0;o<5;o++)for(var c=0;c<5;c++)l[o+5*c]=c+(2*o+3*c)%5*5;for(var h=1,b=0;b<24;b++){for(var m=0,d=0,x=0;x<7;x++){if(h&1){var R=(1<<x)-1;R<32?d^=1<<R:m^=1<<R-32}h&128?h=h<<1^113:h<<=1}_[b]=T.create(m,d)}})();var r=[];(function(){for(var o=0;o<25;o++)r[o]=T.create()})();var n=e.SHA3=N.extend({cfg:N.cfg.extend({outputLength:512}),_doReset:function(){for(var o=this._state=[],c=0;c<25;c++)o[c]=new T.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(o,c){for(var v=this._state,f=this.blockSize/2,y=0;y<f;y++){var h=o[c+2*y],b=o[c+2*y+1];h=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;var m=v[y];m.high^=b,m.low^=h}for(var d=0;d<24;d++){for(var x=0;x<5;x++){for(var R=0,O=0,w=0;w<5;w++){var m=v[x+5*w];R^=m.high,O^=m.low}var D=r[x];D.high=R,D.low=O}for(var x=0;x<5;x++)for(var A=r[(x+4)%5],P=r[(x+1)%5],I=P.high,u=P.low,R=A.high^(I<<1|u>>>31),O=A.low^(u<<1|I>>>31),w=0;w<5;w++){var m=v[x+5*w];m.high^=R,m.low^=O}for(var k=1;k<25;k++){var R,O,m=v[k],g=m.high,a=m.low,C=E[k];C<32?(R=g<<C|a>>>32-C,O=a<<C|g>>>32-C):(R=a<<C-32|g>>>64-C,O=g<<C-32|a>>>64-C);var S=r[l[k]];S.high=R,S.low=O}var p=r[0],U=v[0];p.high=U.high,p.low=U.low;for(var x=0;x<5;x++)for(var w=0;w<5;w++){var k=x+5*w,m=v[k],z=r[k],q=r[(x+1)%5+5*w],$=r[(x+2)%5+5*w];m.high=z.high^~q.high&$.high,m.low=z.low^~q.low&$.low}var m=v[0],re=_[d];m.high^=re.high,m.low^=re.low}},_doFinalize:function(){var o=this._data,c=o.words,v=this._nDataBytes*8,f=o.sigBytes*8,y=this.blockSize*32;c[f>>>5]|=1<<24-f%32,c[(M.ceil((f+1)/y)*y>>>5)-1]|=128,o.sigBytes=c.length*4,this._process();for(var h=this._state,b=this.cfg.outputLength/8,m=b/8,d=[],x=0;x<m;x++){var R=h[x],O=R.high,w=R.low;O=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,d.push(w),d.push(O)}return new K.init(d,b)},clone:function(){for(var o=N.clone.call(this),c=o._state=this._state.slice(0),v=0;v<25;v++)c[v]=c[v].clone();return o}});G.SHA3=N._createHelper(n),G.HmacSHA3=N._createHmacHelper(n)}(Math),B.SHA3})},"5nXd":function(W,ee,L){var B=L("MFOe"),M=B.slice,G=B.pluck,X=B.each,K=B.bind,N=B.create,i=B.isList,T=B.isFunction,e=B.isObject;W.exports={createStore:_};var E={version:"2.0.12",enabled:!1,get:function(r,n){var o=this.storage.read(this._namespacePrefix+r);return this._deserialize(o,n)},set:function(r,n){return n===void 0?this.remove(r):(this.storage.write(this._namespacePrefix+r,this._serialize(n)),n)},remove:function(r){this.storage.remove(this._namespacePrefix+r)},each:function(r){var n=this;this.storage.each(function(o,c){r.call(n,n._deserialize(o),(c||"").replace(n._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(r){return this._namespacePrefix=="__storejs_"+r+"_"},createStore:function(){return _.apply(this,arguments)},addPlugin:function(r){this._addPlugin(r)},namespace:function(r){return _(this.storage,this.plugins,r)}};function l(){var r=typeof console=="undefined"?null:console;if(!r)return;var n=r.warn?r.warn:r.log;n.apply(r,arguments)}function _(r,n,o){o||(o=""),r&&!i(r)&&(r=[r]),n&&!i(n)&&(n=[n]);var c=o?"__storejs_"+o+"_":"",v=o?new RegExp("^"+c):null,f=/^[a-zA-Z0-9_\-]*$/;if(!f.test(o))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var y={_namespacePrefix:c,_namespaceRegexp:v,_testStorage:function(b){try{var m="__storejs__test__";b.write(m,m);var d=b.read(m)===m;return b.remove(m),d}catch(x){return!1}},_assignPluginFnProp:function(b,m){var d=this[m];this[m]=function(){var R=M(arguments,0),O=this;function w(){return d?(X(arguments,function(A,P){R[P]=A}),d.apply(O,R)):void 0}var D=[w].concat(R);return b.apply(O,D)}},_serialize:function(b){return JSON.stringify(b)},_deserialize:function(b,m){if(!b)return m;var d="";try{d=JSON.parse(b)}catch(x){d=b}return d!==void 0?d:m},_addStorage:function(b){if(this.enabled)return;this._testStorage(b)&&(this.storage=b,this.enabled=!0)},_addPlugin:function(b){var m=this;if(i(b)){X(b,function(R){m._addPlugin(R)});return}var d=G(this.plugins,function(R){return b===R});if(d)return;if(this.plugins.push(b),!T(b))throw new Error("Plugins must be function values that return objects");var x=b.call(this);if(!e(x))throw new Error("Plugins must return an object of function properties");X(x,function(R,O){if(!T(R))throw new Error("Bad plugin property: "+O+" from plugin "+b.name+". Plugins should only return functions.");m._assignPluginFnProp(R,O)})},addStorage:function(b){l("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(b)}},h=N(y,E,{plugins:[]});return h.raw={},X(h,function(b,m){T(b)&&(h.raw[m]=K(h,b))}),X(r,function(b){h._addStorage(b)}),X(n,function(b){h._addPlugin(b)}),h}},"6UM0":function(W,ee,L){var B,M;(function(){var G;(function(){"use strict";var K=[function(e,E,l){var _=l(1).Beautifier,r=l(5).Options;function n(o,c){var v=new _(o,c);return v.beautify()}e.exports=n,e.exports.defaultOptions=function(){return new r}},function(e,E,l){var _=l(2).Output,r=l(3).Token,n=l(4),o=l(5).Options,c=l(7).Tokenizer,v=l(7).line_starters,f=l(7).positionable_operators,y=l(7).TOKEN;function h(p,U){return U.indexOf(p)!==-1}function b(p){return p.replace(/^\s+/g,"")}function m(p){for(var U={},z=0;z<p.length;z++)U[p[z].replace(/-/g,"_")]=p[z];return U}function d(p,U){return p&&p.type===y.RESERVED&&p.text===U}function x(p,U){return p&&p.type===y.RESERVED&&h(p.text,U)}var R=["case","return","do","if","throw","else","await","break","continue","async"],O=["before-newline","after-newline","preserve-newline"],w=m(O),D=[w.before_newline,w.preserve_newline],A={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function P(p,U){if(U.multiline_frame||U.mode===A.ForInitializer||U.mode===A.Conditional)return;p.remove_indent(U.start_line_index)}function I(p){p=p.replace(n.allLineBreaks,`
|
|
|
`);for(var U=[],z=p.indexOf(`
|
|
|
`);z!==-1;)U.push(p.substring(0,z)),p=p.substring(z+1),z=p.indexOf(`
|
|
|
`);return p.length&&U.push(p),U}function u(p){return p===A.ArrayLiteral}function k(p){return h(p,[A.Expression,A.ForInitializer,A.Conditional])}function g(p,U){for(var z=0;z<p.length;z++){var q=p[z].trim();if(q.charAt(0)!==U)return!1}return!0}function a(p,U){for(var z=0,q=p.length,$;z<q;z++)if($=p[z],$&&$.indexOf(U)!==0)return!1;return!0}function C(p,U){U=U||{},this._source_text=p||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new o(U)}C.prototype.create_flags=function(p,U){var z=0;p&&(z=p.indentation_level,!this._output.just_added_newline()&&p.line_indent_level>z&&(z=p.line_indent_level));var q={mode:U,parent:p,last_token:p?p.last_token:new r(y.START_BLOCK,""),last_word:p?p.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:z,alignment:0,line_indent_level:p?p.line_indent_level:z,start_line_index:this._output.get_line_number(),ternary_depth:0};return q},C.prototype._reset=function(p){var U=p.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new _(this._options,U),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(A.BlockStatement);var z=new c(p,this._options);return this._tokens=z.tokenize(),p},C.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var p,U=this._reset(this._source_text),z=this._options.eol;this._options.eol==="auto"&&(z=`
|
|
|
`,U&&n.lineBreak.test(U||"")&&(z=U.match(n.lineBreak)[0]));for(var q=this._tokens.next();q;)this.handle_token(q),this._last_last_text=this._flags.last_token.text,this._flags.last_token=q,q=this._tokens.next();return p=this._output.get_code(z),p},C.prototype.handle_token=function(p,U){p.type===y.START_EXPR?this.handle_start_expr(p):p.type===y.END_EXPR?this.handle_end_expr(p):p.type===y.START_BLOCK?this.handle_start_block(p):p.type===y.END_BLOCK?this.handle_end_block(p):p.type===y.WORD?this.handle_word(p):p.type===y.RESERVED?this.handle_word(p):p.type===y.SEMICOLON?this.handle_semicolon(p):p.type===y.STRING?this.handle_string(p):p.type===y.EQUALS?this.handle_equals(p):p.type===y.OPERATOR?this.handle_operator(p):p.type===y.COMMA?this.handle_comma(p):p.type===y.BLOCK_COMMENT?this.handle_block_comment(p,U):p.type===y.COMMENT?this.handle_comment(p,U):p.type===y.DOT?this.handle_dot(p):p.type===y.EOF?this.handle_eof(p):p.type===y.UNKNOWN?this.handle_unknown(p,U):this.handle_unknown(p,U)},C.prototype.handle_whitespace_and_comments=function(p,U){var z=p.newlines,q=this._options.keep_array_indentation&&u(this._flags.mode);if(p.comments_before)for(var $=p.comments_before.next();$;)this.handle_whitespace_and_comments($,U),this.handle_token($,U),$=p.comments_before.next();if(q)for(var re=0;re<z;re+=1)this.print_newline(re>0,U);else if(this._options.max_preserve_newlines&&z>this._options.max_preserve_newlines&&(z=this._options.max_preserve_newlines),this._options.preserve_newlines&&z>1){this.print_newline(!1,U);for(var ce=1;ce<z;ce+=1)this.print_newline(!0,U)}};var S=["async","break","continue","return","throw","yield"];C.prototype.allow_wrap_or_preserved_newline=function(p,U){if(U=U===void 0?!1:U,this._output.just_added_newline())return;var z=this._options.preserve_newlines&&p.newlines||U,q=h(this._flags.last_token.text,f)||h(p.text,f);if(q){var $=h(this._flags.last_token.text,f)&&h(this._options.operator_position,D)||h(p.text,f);z=z&&$}if(z)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(x(this._flags.last_token,S))return;this._output.set_wrap_point()}},C.prototype.print_newline=function(p,U){if(!U&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==y.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var z=this._tokens.peek();this._flags.mode===A.Statement&&!(this._flags.if_block&&d(z,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(p)&&(this._flags.multiline_frame=!0)},C.prototype.print_token_line_indentation=function(p){this._output.just_added_newline()&&(this._options.keep_array_indentation&&p.newlines&&(p.text==="["||u(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(p.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},C.prototype.print_token=function(p){if(this._output.raw){this._output.add_raw_token(p);return}if(this._options.comma_first&&p.previous&&p.previous.type===y.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var U=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(U),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(p),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(p),this._output.non_breaking_space=!0,this._output.add_token(p.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},C.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},C.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},C.prototype.set_mode=function(p){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,p),this._flags=this.create_flags(this._previous_flags,p),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},C.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===A.Statement&&P(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},C.prototype.start_of_object_property=function(){return this._flags.parent.mode===A.ObjectLiteral&&this._flags.mode===A.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"]))},C.prototype.start_of_statement=function(p){var U=!1;return U=U||x(this._flags.last_token,["var","let","const"])&&p.type===y.WORD,U=U||d(this._flags.last_token,"do"),U=U||!(this._flags.parent.mode===A.ObjectLiteral&&this._flags.mode===A.Statement)&&x(this._flags.last_token,S)&&!p.newlines,U=U||d(this._flags.last_token,"else")&&!(d(p,"if")&&!p.comments_before),U=U||this._flags.last_token.type===y.END_EXPR&&(this._previous_flags.mode===A.ForInitializer||this._previous_flags.mode===A.Conditional),U=U||this._flags.last_token.type===y.WORD&&this._flags.mode===A.BlockStatement&&!this._flags.in_case&&!(p.text==="--"||p.text==="++")&&this._last_last_text!=="function"&&p.type!==y.WORD&&p.type!==y.RESERVED,U=U||this._flags.mode===A.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"])),U?(this.set_mode(A.Statement),this.indent(),this.handle_whitespace_and_comments(p,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(p,x(p,["do","for","if","while"])),!0):!1},C.prototype.handle_start_expr=function(p){this.start_of_statement(p)||this.handle_whitespace_and_comments(p);var U=A.Expression;if(p.text==="["){if(this._flags.last_token.type===y.WORD||this._flags.last_token.text===")"){x(this._flags.last_token,v)&&(this._output.space_before_token=!0),this.print_token(p),this.set_mode(U),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}U=A.ArrayLiteral,u(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),h(this._flags.last_token.type,[y.START_EXPR,y.END_EXPR,y.WORD,y.OPERATOR,y.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===y.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,U=A.ForInitializer):h(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,U=A.Conditional):h(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&p.whitespace_before===""?this._output.space_before_token=!1:(h(this._flags.last_token.text,v)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===y.EQUALS||this._flags.last_token.type===y.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(p);else if(this._flags.last_token.type===y.WORD){this._output.space_before_token=!1;var z=this._tokens.peek(-3);if(this._options.space_after_named_function&&z){var q=this._tokens.peek(-4);x(z,["async","function"])||z.text==="*"&&x(q,["async","function"])?this._output.space_before_token=!0:this._flags.mode===A.ObjectLiteral?(z.text==="{"||z.text===","||z.text==="*"&&(q.text==="{"||q.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(p);(this._flags.last_token.type===y.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(h(this._last_last_text,["function","yield"])||this._flags.mode===A.ObjectLiteral&&h(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===y.START_BLOCK?this.print_newline():(this._flags.last_token.type===y.END_EXPR||this._flags.last_token.type===y.START_EXPR||this._flags.last_token.type===y.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===y.COMMA)&&this.allow_wrap_or_preserved_newline(p,p.newlines),this.print_token(p),this.set_mode(U),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},C.prototype.handle_end_expr=function(p){for(;this._flags.mode===A.Statement;)this.restore_mode();this.handle_whitespace_and_comments(p),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(p,p.text==="]"&&u(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===y.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(p),this.restore_mode(),P(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===A.Conditional&&(this._previous_flags.mode=A.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},C.prototype.handle_start_block=function(p){this.handle_whitespace_and_comments(p);var U=this._tokens.peek(),z=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===y.END_EXPR?(this.set_mode(A.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(A.BlockStatement):z&&(h(z.text,[":",","])&&h(U.type,[y.STRING,y.WORD,y.RESERVED])||h(U.text,["get","set","..."])&&h(z.type,[y.WORD,y.RESERVED]))?h(this._last_last_text,["class","interface"])&&!h(z.text,[":",","])?this.set_mode(A.BlockStatement):this.set_mode(A.ObjectLiteral):this._flags.last_token.type===y.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(A.BlockStatement):h(this._flags.last_token.type,[y.EQUALS,y.START_EXPR,y.COMMA,y.OPERATOR])||x(this._flags.last_token,["return","throw","import","default"])?this.set_mode(A.ObjectLiteral):this.set_mode(A.BlockStatement),this._flags.last_token&&(x(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var q=!U.comments_before&&U.text==="}",$=q&&this._flags.last_word==="function"&&this._flags.last_token.type===y.END_EXPR;if(this._options.brace_preserve_inline){var re=0,ce=null;this._flags.inline_frame=!0;do if(re+=1,ce=this._tokens.peek(re-1),ce.newlines){this._flags.inline_frame=!1;break}while(ce.type!==y.EOF&&!(ce.type===y.END_BLOCK&&ce.opened===p))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&p.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==y.OPERATOR&&($||this._flags.last_token.type===y.EQUALS||x(this._flags.last_token,R)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(u(this._previous_flags.mode)&&(this._flags.last_token.type===y.START_EXPR||this._flags.last_token.type===y.COMMA)&&((this._flags.last_token.type===y.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===y.COMMA||this._flags.last_token.type===y.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(p),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==y.OPERATOR&&this._flags.last_token.type!==y.START_EXPR&&(this._flags.last_token.type===y.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(p),this.indent(),!q&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},C.prototype.handle_end_block=function(p){for(this.handle_whitespace_and_comments(p);this._flags.mode===A.Statement;)this.restore_mode();var U=this._flags.last_token.type===y.START_BLOCK;this._flags.inline_frame&&!U?this._output.space_before_token=!0:this._options.brace_style==="expand"?U||this.print_newline():U||(u(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(p)},C.prototype.handle_word=function(p){if(p.type===y.RESERVED){if(h(p.text,["set","get"])&&this._flags.mode!==A.ObjectLiteral)p.type=y.WORD;else if(p.text==="import"&&h(this._tokens.peek().text,["(","."]))p.type=y.WORD;else if(h(p.text,["as","from"])&&!this._flags.import_block)p.type=y.WORD;else if(this._flags.mode===A.ObjectLiteral){var U=this._tokens.peek();U.text===":"&&(p.type=y.WORD)}}if(this.start_of_statement(p)?x(this._flags.last_token,["var","let","const"])&&p.type===y.WORD&&(this._flags.declaration_statement=!0):p.newlines&&!k(this._flags.mode)&&(this._flags.last_token.type!==y.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==y.EQUALS&&(this._options.preserve_newlines||!x(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(p),this.print_newline()):this.handle_whitespace_and_comments(p),this._flags.do_block&&!this._flags.do_while)if(d(p,"while")){this._output.space_before_token=!0,this.print_token(p),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&d(p,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===A.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&x(p,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(p),this._flags.in_case=!0;return}if((this._flags.last_token.type===y.COMMA||this._flags.last_token.type===y.START_EXPR||this._flags.last_token.type===y.EQUALS||this._flags.last_token.type===y.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(p)),d(p,"function")){(h(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(h(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===y.OPERATOR))&&(!this._output.just_added_blankline()&&!p.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===y.RESERVED||this._flags.last_token.type===y.WORD?x(this._flags.last_token,["get","set","new","export"])||x(this._flags.last_token,S)?this._output.space_before_token=!0:d(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===y.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(k(this._flags.mode)||u(this._flags.mode))||this.print_newline(),this.print_token(p),this._flags.last_word=p.text;return}var z="NONE";if(this._flags.last_token.type===y.END_BLOCK?this._previous_flags.inline_frame?z="SPACE":x(p,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&p.newlines?z="NEWLINE":(z="SPACE",this._output.space_before_token=!0):z="NEWLINE":this._flags.last_token.type===y.SEMICOLON&&this._flags.mode===A.BlockStatement?z="NEWLINE":this._flags.last_token.type===y.SEMICOLON&&k(this._flags.mode)?z="SPACE":this._flags.last_token.type===y.STRING?z="NEWLINE":this._flags.last_token.type===y.RESERVED||this._flags.last_token.type===y.WORD||this._flags.last_token.text==="*"&&(h(this._last_last_text,["function","yield"])||this._flags.mode===A.ObjectLiteral&&h(this._last_last_text,["{",","]))?z="SPACE":this._flags.last_token.type===y.START_BLOCK?this._flags.inline_frame?z="SPACE":z="NEWLINE":this._flags.last_token.type===y.END_EXPR&&(this._output.space_before_token=!0,z="NEWLINE"),x(p,v)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?z="SPACE":z="NEWLINE"),x(p,["else","catch","finally"]))if((!(this._flags.last_token.type===y.END_BLOCK&&this._previous_flags.mode===A.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&p.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var q=this._output.current_line;q.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else z==="NEWLINE"?x(this._flags.last_token,R)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&x(p,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==y.END_EXPR?(this._flags.last_token.type!==y.START_EXPR||!x(p,["var","let","const"]))&&this._flags.last_token.text!==":"&&(d(p,"if")&&d(p.previous,"else")?this._output.space_before_token=!0:this.print_newline()):x(p,v)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&u(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():z==="SPACE"&&(this._output.space_before_token=!0);p.previous&&(p.previous.type===y.WORD||p.previous.type===y.RESERVED)&&(this._output.space_before_token=!0),this.print_token(p),this._flags.last_word=p.text,p.type===y.RESERVED&&(p.text==="do"?this._flags.do_block=!0:p.text==="if"?this._flags.if_block=!0:p.text==="import"?this._flags.import_block=!0:this._flags.import_block&&d(p,"from")&&(this._flags.import_block=!1))},C.prototype.handle_semicolon=function(p){this.start_of_statement(p)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(p);for(var U=this._tokens.peek();this._flags.mode===A.Statement&&!(this._flags.if_block&&d(U,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(p)},C.prototype.handle_string=function(p){p.text.startsWith("`")&&p.newlines===0&&p.whitespace_before===""&&(p.previous.text===")"||this._flags.last_token.type===y.WORD)||(this.start_of_statement(p)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(p),this._flags.last_token.type===y.RESERVED||this._flags.last_token.type===y.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===y.COMMA||this._flags.last_token.type===y.START_EXPR||this._flags.last_token.type===y.EQUALS||this._flags.last_token.type===y.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(p):p.text.startsWith("`")&&this._flags.last_token.type===y.END_EXPR&&(p.previous.text==="]"||p.previous.text===")")&&p.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(p)},C.prototype.handle_equals=function(p){this.start_of_statement(p)||this.handle_whitespace_and_comments(p),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(p),this._output.space_before_token=!0},C.prototype.handle_comma=function(p){this.handle_whitespace_and_comments(p,!0),this.print_token(p),this._output.space_before_token=!0,this._flags.declaration_statement?(k(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(p)):this._flags.mode===A.ObjectLiteral||this._flags.mode===A.Statement&&this._flags.parent.mode===A.ObjectLiteral?(this._flags.mode===A.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(p)},C.prototype.handle_operator=function(p){var U=p.text==="*"&&(x(this._flags.last_token,["function","yield"])||h(this._flags.last_token.type,[y.START_BLOCK,y.COMMA,y.END_BLOCK,y.SEMICOLON])),z=h(p.text,["-","+"])&&(h(this._flags.last_token.type,[y.START_BLOCK,y.START_EXPR,y.EQUALS,y.OPERATOR])||h(this._flags.last_token.text,v)||this._flags.last_token.text===",");if(!this.start_of_statement(p)){var q=!U;this.handle_whitespace_and_comments(p,q)}if(p.text==="*"&&this._flags.last_token.type===y.DOT){this.print_token(p);return}if(p.text==="::"){this.print_token(p);return}if(this._flags.last_token.type===y.OPERATOR&&h(this._options.operator_position,D)&&this.allow_wrap_or_preserved_newline(p),p.text===":"&&this._flags.in_case){this.print_token(p),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==y.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var $=!0,re=!0,ce=!1;if(p.text===":"?this._flags.ternary_depth===0?$=!1:(this._flags.ternary_depth-=1,ce=!0):p.text==="?"&&(this._flags.ternary_depth+=1),!z&&!U&&this._options.preserve_newlines&&h(p.text,f)){var ne=p.text===":",me=ne&&ce,be=ne&&!ce;switch(this._options.operator_position){case w.before_newline:this._output.space_before_token=!be,this.print_token(p),(!ne||me)&&this.allow_wrap_or_preserved_newline(p),this._output.space_before_token=!0;return;case w.after_newline:this._output.space_before_token=!0,!ne||me?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(p):this._output.space_before_token=!1,this.print_token(p),this._output.space_before_token=!0;return;case w.preserve_newline:be||this.allow_wrap_or_preserved_newline(p),$=!(this._output.just_added_newline()||be),this._output.space_before_token=$,this.print_token(p),this._output.space_before_token=!0;return}}if(U){this.allow_wrap_or_preserved_newline(p),$=!1;var he=this._tokens.peek();re=he&&h(he.type,[y.WORD,y.RESERVED])}else if(p.text==="...")this.allow_wrap_or_preserved_newline(p),$=this._flags.last_token.type===y.START_BLOCK,re=!1;else if(h(p.text,["--","++","!","~"])||z){if((this._flags.last_token.type===y.COMMA||this._flags.last_token.type===y.START_EXPR)&&this.allow_wrap_or_preserved_newline(p),$=!1,re=!1,p.newlines&&(p.text==="--"||p.text==="++"||p.text==="~")){var se=x(this._flags.last_token,R)&&p.newlines;se&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(se,!0)}this._flags.last_token.text===";"&&k(this._flags.mode)&&($=!0),this._flags.last_token.type===y.RESERVED?$=!0:this._flags.last_token.type===y.END_EXPR?$=!(this._flags.last_token.text==="]"&&(p.text==="--"||p.text==="++")):this._flags.last_token.type===y.OPERATOR&&($=h(p.text,["--","-","++","+"])&&h(this._flags.last_token.text,["--","-","++","+"]),h(p.text,["+","-"])&&h(this._flags.last_token.text,["--","++"])&&(re=!0)),(this._flags.mode===A.BlockStatement&&!this._flags.inline_frame||this._flags.mode===A.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||$,this.print_token(p),this._output.space_before_token=re},C.prototype.handle_block_comment=function(p,U){if(this._output.raw){this._output.add_raw_token(p),p.directives&&p.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(p.directives){this.print_newline(!1,U),this.print_token(p),p.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!n.newline.test(p.text)&&!p.newlines){this._output.space_before_token=!0,this.print_token(p),this._output.space_before_token=!0;return}else this.print_block_commment(p,U)},C.prototype.print_block_commment=function(p,U){var z=I(p.text),q,$=!1,re=!1,ce=p.whitespace_before,ne=ce.length;if(this.print_newline(!1,U),this.print_token_line_indentation(p),this._output.add_token(z[0]),this.print_newline(!1,U),z.length>1){for(z=z.slice(1),$=g(z,"*"),re=a(z,ce),$&&(this._flags.alignment=1),q=0;q<z.length;q++)$?(this.print_token_line_indentation(p),this._output.add_token(b(z[q]))):re&&z[q]?(this.print_token_line_indentation(p),this._output.add_token(z[q].substring(ne))):(this._output.current_line.set_indent(-1),this._output.add_token(z[q])),this.print_newline(!1,U);this._flags.alignment=0}},C.prototype.handle_comment=function(p,U){p.newlines?this.print_newline(!1,U):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(p),this.print_newline(!1,U)},C.prototype.handle_dot=function(p){this.start_of_statement(p)||this.handle_whitespace_and_comments(p,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),x(this._flags.last_token,R)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(p,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(p)},C.prototype.handle_unknown=function(p,U){this.print_token(p),p.text[p.text.length-1]===`
|
|
|
`&&this.print_newline(!1,U)},C.prototype.handle_eof=function(p){for(;this._flags.mode===A.Statement;)this.restore_mode();this.handle_whitespace_and_comments(p)},e.exports.Beautifier=C},function(e){function E(r){this.__parent=r,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}E.prototype.clone_empty=function(){var r=new E(this.__parent);return r.set_indent(this.__indent_count,this.__alignment_count),r},E.prototype.item=function(r){return r<0?this.__items[this.__items.length+r]:this.__items[r]},E.prototype.has_match=function(r){for(var n=this.__items.length-1;n>=0;n--)if(this.__items[n].match(r))return!0;return!1},E.prototype.set_indent=function(r,n){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=n||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},E.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},E.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},E.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__character_count-=1),!0}return!1},E.prototype.is_empty=function(){return this.__items.length===0},E.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},E.prototype.push=function(r){this.__items.push(r);var n=r.lastIndexOf(`
|
|
|
`);n!==-1?this.__character_count=r.length-n:this.__character_count+=r.length},E.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},E.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},E.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},E.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},E.prototype.toString=function(){var r="";return this.is_empty()?this.__parent.indent_empty_lines&&(r=this.__parent.get_indent_string(this.__indent_count)):(r=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),r+=this.__items.join("")),r};function l(r,n){this.__cache=[""],this.__indent_size=r.indent_size,this.__indent_string=r.indent_char,r.indent_with_tabs||(this.__indent_string=new Array(r.indent_size+1).join(r.indent_char)),n=n||"",r.indent_level>0&&(n=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}l.prototype.get_indent_size=function(r,n){var o=this.__base_string_length;return n=n||0,r<0&&(o=0),o+=r*this.__indent_size,o+=n,o},l.prototype.get_indent_string=function(r,n){var o=this.__base_string;return n=n||0,r<0&&(r=0,o=""),n+=r*this.__indent_size,this.__ensure_cache(n),o+=this.__cache[n],o},l.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},l.prototype.__add_column=function(){var r=this.__cache.length,n=0,o="";this.__indent_size&&r>=this.__indent_size&&(n=Math.floor(r/this.__indent_size),r-=n*this.__indent_size,o=new Array(n+1).join(this.__indent_string)),r&&(o+=new Array(r+1).join(" ")),this.__cache.push(o)};function _(r,n){this.__indent_cache=new l(r,n),this.raw=!1,this._end_with_newline=r.end_with_newline,this.indent_size=r.indent_size,this.wrap_line_length=r.wrap_line_length,this.indent_empty_lines=r.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new E(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}_.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},_.prototype.get_line_number=function(){return this.__lines.length},_.prototype.get_indent_string=function(r,n){return this.__indent_cache.get_indent_string(r,n)},_.prototype.get_indent_size=function(r,n){return this.__indent_cache.get_indent_size(r,n)},_.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},_.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},_.prototype.get_code=function(r){this.trim(!0);var n=this.current_line.pop();n&&(n[n.length-1]===`
|
|
|
`&&(n=n.replace(/\n+$/g,"")),this.current_line.push(n)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
|
|
|
`);return r!==`
|
|
|
`&&(o=o.replace(/[\n]/g,r)),o},_.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},_.prototype.set_indent=function(r,n){return r=r||0,n=n||0,this.next_line.set_indent(r,n),this.__lines.length>1?(this.current_line.set_indent(r,n),!0):(this.current_line.set_indent(),!1)},_.prototype.add_raw_token=function(r){for(var n=0;n<r.newlines;n++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(r.whitespace_before),this.current_line.push(r.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},_.prototype.add_token=function(r){this.__add_space_before_token(),this.current_line.push(r),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},_.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},_.prototype.remove_indent=function(r){for(var n=this.__lines.length;r<n;)this.__lines[r]._remove_indent(),r++;this.current_line._remove_wrap_indent()},_.prototype.trim=function(r){for(r=r===void 0?!1:r,this.current_line.trim();r&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},_.prototype.just_added_newline=function(){return this.current_line.is_empty()},_.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},_.prototype.ensure_empty_line_above=function(r,n){for(var o=this.__lines.length-2;o>=0;){var c=this.__lines[o];if(c.is_empty())break;if(c.item(0).indexOf(r)!==0&&c.item(-1)!==n){this.__lines.splice(o+1,0,new E(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},e.exports.Output=_},function(e){function E(l,_,r,n){this.type=l,this.text=_,this.comments_before=null,this.newlines=r||0,this.whitespace_before=n||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=E},function(e,E){var l="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",_="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",r="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",n="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",o="(?:\\\\u[0-9a-fA-F]{4}|["+l+r+"])",c="(?:\\\\u[0-9a-fA-F]{4}|["+_+r+n+"])*";E.identifier=new RegExp(o+c,"g"),E.identifierStart=new RegExp(o),E.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+_+r+n+"])+");var v=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;E.newline=/[\n\r\u2028\u2029]/,E.lineBreak=new RegExp(`\r
|
|
|
|`+E.newline.source),E.allLineBreaks=new RegExp(E.lineBreak.source,"g")},function(e,E,l){var _=l(6).Options,r=["before-newline","after-newline","preserve-newline"];function n(o){_.call(this,o,"js");var c=this.raw_options.brace_style||null;c==="expand-strict"?this.raw_options.brace_style="expand":c==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var v=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var f=0;f<v.length;f++)v[f]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=v[f];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",r),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}n.prototype=new _,e.exports.Options=n},function(e){function E(r,n){this.raw_options=l(r,n),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}E.prototype._get_array=function(r,n){var o=this.raw_options[r],c=n||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(c=o.concat()):typeof o=="string"&&(c=o.split(/[^a-zA-Z0-9_\/\-]+/)),c},E.prototype._get_boolean=function(r,n){var o=this.raw_options[r],c=o===void 0?!!n:!!o;return c},E.prototype._get_characters=function(r,n){var o=this.raw_options[r],c=n||"";return typeof o=="string"&&(c=o.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),c},E.prototype._get_number=function(r,n){var o=this.raw_options[r];n=parseInt(n,10),isNaN(n)&&(n=0);var c=parseInt(o,10);return isNaN(c)&&(c=n),c},E.prototype._get_selection=function(r,n,o){var c=this._get_selection_list(r,n,o);if(c.length!==1)throw new Error("Invalid Option Value: The option '"+r+`' can only be one of the following values:
|
|
|
`+n+`
|
|
|
You passed in: '`+this.raw_options[r]+"'");return c[0]},E.prototype._get_selection_list=function(r,n,o){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[n[0]],!this._is_valid_selection(o,n))throw new Error("Invalid Default Value!");var c=this._get_array(r,o);if(!this._is_valid_selection(c,n))throw new Error("Invalid Option Value: The option '"+r+`' can contain only the following values:
|
|
|
`+n+`
|
|
|
You passed in: '`+this.raw_options[r]+"'");return c},E.prototype._is_valid_selection=function(r,n){return r.length&&n.length&&!r.some(function(o){return n.indexOf(o)===-1})};function l(r,n){var o={};r=_(r);var c;for(c in r)c!==n&&(o[c]=r[c]);if(n&&r[n])for(c in r[n])o[c]=r[n][c];return o}function _(r){var n={},o;for(o in r){var c=o.replace(/-/g,"_");n[c]=r[o]}return n}e.exports.Options=E,e.exports.normalizeOpts=_,e.exports.mergeOpts=l},function(e,E,l){var _=l(8).InputScanner,r=l(9).Tokenizer,n=l(9).TOKEN,o=l(13).Directives,c=l(4),v=l(12).Pattern,f=l(14).TemplatablePattern;function y(g,a){return a.indexOf(g)!==-1}var h={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:n.START,RAW:n.RAW,EOF:n.EOF},b=new o(/\/\*/,/\*\//),m=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,d=/[0-9]/,x=/[^\d\.]/,R=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),O=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";O=O.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),O="\\?\\.(?!\\d) "+O,O=O.replace(/ /g,"|");var w=new RegExp(O),D="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),A=D.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),P=new RegExp("^(?:"+A.join("|")+")$"),I,u=function(g,a){r.call(this,g,a),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var C=new v(this._input),S=new f(this._input).read_options(this._options);this.__patterns={template:S,identifier:S.starting_with(c.identifier).matching(c.identifierMatch),number:C.matching(m),punct:C.matching(w),comment:C.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:C.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:C.matching(/<!--/),html_comment_end:C.matching(/-->/),include:C.starting_with(/#include/).until_after(c.lineBreak),shebang:C.starting_with(/#!/).until_after(c.lineBreak),xml:C.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:S.until(/['\\\n\r\u2028\u2029]/),double_quote:S.until(/["\\\n\r\u2028\u2029]/),template_text:S.until(/[`\\$]/),template_expression:S.until(/[`}\\]/)}};u.prototype=new r,u.prototype._is_comment=function(g){return g.type===h.COMMENT||g.type===h.BLOCK_COMMENT||g.type===h.UNKNOWN},u.prototype._is_opening=function(g){return g.type===h.START_BLOCK||g.type===h.START_EXPR},u.prototype._is_closing=function(g,a){return(g.type===h.END_BLOCK||g.type===h.END_EXPR)&&a&&(g.text==="]"&&a.text==="["||g.text===")"&&a.text==="("||g.text==="}"&&a.text==="{")},u.prototype._reset=function(){I=!1},u.prototype._get_next_token=function(g,a){var C=null;this._readWhitespace();var S=this._input.peek();return S===null?this._create_token(h.EOF,""):(C=C||this._read_non_javascript(S),C=C||this._read_string(S),C=C||this._read_word(g),C=C||this._read_singles(S),C=C||this._read_comment(S),C=C||this._read_regexp(S,g),C=C||this._read_xml(S,g),C=C||this._read_punctuation(),C=C||this._create_token(h.UNKNOWN,this._input.next()),C)},u.prototype._read_word=function(g){var a;if(a=this.__patterns.identifier.read(),a!=="")return a=a.replace(c.allLineBreaks,`
|
|
|
`),!(g.type===h.DOT||g.type===h.RESERVED&&(g.text==="set"||g.text==="get"))&&P.test(a)?(a==="in"||a==="of")&&(g.type===h.WORD||g.type===h.STRING)?this._create_token(h.OPERATOR,a):this._create_token(h.RESERVED,a):this._create_token(h.WORD,a);if(a=this.__patterns.number.read(),a!=="")return this._create_token(h.WORD,a)},u.prototype._read_singles=function(g){var a=null;return g==="("||g==="["?a=this._create_token(h.START_EXPR,g):g===")"||g==="]"?a=this._create_token(h.END_EXPR,g):g==="{"?a=this._create_token(h.START_BLOCK,g):g==="}"?a=this._create_token(h.END_BLOCK,g):g===";"?a=this._create_token(h.SEMICOLON,g):g==="."&&x.test(this._input.peek(1))?a=this._create_token(h.DOT,g):g===","&&(a=this._create_token(h.COMMA,g)),a&&this._input.next(),a},u.prototype._read_punctuation=function(){var g=this.__patterns.punct.read();if(g!=="")return g==="="?this._create_token(h.EQUALS,g):g==="?."?this._create_token(h.DOT,g):this._create_token(h.OPERATOR,g)},u.prototype._read_non_javascript=function(g){var a="";if(g==="#"){if(this._is_first_token()&&(a=this.__patterns.shebang.read(),a))return this._create_token(h.UNKNOWN,a.trim()+`
|
|
|
`);if(a=this.__patterns.include.read(),a)return this._create_token(h.UNKNOWN,a.trim()+`
|
|
|
`);g=this._input.next();var C="#";if(this._input.hasNext()&&this._input.testChar(d)){do g=this._input.next(),C+=g;while(this._input.hasNext()&&g!=="#"&&g!=="=");return g==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(C+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(C+="{}",this._input.next(),this._input.next())),this._create_token(h.WORD,C)}this._input.back()}else if(g==="<"&&this._is_first_token()){if(a=this.__patterns.html_comment_start.read(),a){for(;this._input.hasNext()&&!this._input.testChar(c.newline);)a+=this._input.next();return I=!0,this._create_token(h.COMMENT,a)}}else if(I&&g==="-"&&(a=this.__patterns.html_comment_end.read(),a))return I=!1,this._create_token(h.COMMENT,a);return null},u.prototype._read_comment=function(g){var a=null;if(g==="/"){var C="";if(this._input.peek(1)==="*"){C=this.__patterns.block_comment.read();var S=b.get_directives(C);S&&S.ignore==="start"&&(C+=b.readIgnored(this._input)),C=C.replace(c.allLineBreaks,`
|
|
|
`),a=this._create_token(h.BLOCK_COMMENT,C),a.directives=S}else this._input.peek(1)==="/"&&(C=this.__patterns.comment.read(),a=this._create_token(h.COMMENT,C))}return a},u.prototype._read_string=function(g){if(g==="`"||g==="'"||g==='"'){var a=this._input.next();return this.has_char_escapes=!1,g==="`"?a+=this._read_string_recursive("`",!0,"${"):a+=this._read_string_recursive(g),this.has_char_escapes&&this._options.unescape_strings&&(a=k(a)),this._input.peek()===g&&(a+=this._input.next()),a=a.replace(c.allLineBreaks,`
|
|
|
`),this._create_token(h.STRING,a)}return null},u.prototype._allow_regexp_or_xml=function(g){return g.type===h.RESERVED&&y(g.text,["return","case","throw","else","do","typeof","yield"])||g.type===h.END_EXPR&&g.text===")"&&g.opened.previous.type===h.RESERVED&&y(g.opened.previous.text,["if","while","for"])||y(g.type,[h.COMMENT,h.START_EXPR,h.START_BLOCK,h.START,h.END_BLOCK,h.OPERATOR,h.EQUALS,h.EOF,h.SEMICOLON,h.COMMA])},u.prototype._read_regexp=function(g,a){if(g==="/"&&this._allow_regexp_or_xml(a)){for(var C=this._input.next(),S=!1,p=!1;this._input.hasNext()&&(S||p||this._input.peek()!==g)&&!this._input.testChar(c.newline);)C+=this._input.peek(),S?S=!1:(S=this._input.peek()==="\\",this._input.peek()==="["?p=!0:this._input.peek()==="]"&&(p=!1)),this._input.next();return this._input.peek()===g&&(C+=this._input.next(),C+=this._input.read(c.identifier)),this._create_token(h.STRING,C)}return null},u.prototype._read_xml=function(g,a){if(this._options.e4x&&g==="<"&&this._allow_regexp_or_xml(a)){var C="",S=this.__patterns.xml.read_match();if(S){for(var p=S[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),U=p.indexOf("{")===0,z=0;S;){var q=!!S[1],$=S[2],re=!!S[S.length-1]||$.slice(0,8)==="![CDATA[";if(!re&&($===p||U&&$.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(q?--z:++z),C+=S[0],z<=0)break;S=this.__patterns.xml.read_match()}return S||(C+=this._input.match(/[\s\S]*/g)[0]),C=C.replace(c.allLineBreaks,`
|
|
|
`),this._create_token(h.STRING,C)}}return null};function k(g){for(var a="",C=0,S=new _(g),p=null;S.hasNext();)if(p=S.match(/([\s]|[^\\]|\\\\)+/g),p&&(a+=p[0]),S.peek()==="\\"){if(S.next(),S.peek()==="x")p=S.match(/x([0-9A-Fa-f]{2})/g);else if(S.peek()==="u")p=S.match(/u([0-9A-Fa-f]{4})/g);else{a+="\\",S.hasNext()&&(a+=S.next());continue}if(!p)return g;if(C=parseInt(p[1],16),C>126&&C<=255&&p[0].indexOf("x")===0)return g;if(C>=0&&C<32){a+="\\"+p[0];continue}else C===34||C===39||C===92?a+="\\"+String.fromCharCode(C):a+=String.fromCharCode(C)}return a}u.prototype._read_string_recursive=function(g,a,C){var S,p;g==="'"?p=this.__patterns.single_quote:g==='"'?p=this.__patterns.double_quote:g==="`"?p=this.__patterns.template_text:g==="}"&&(p=this.__patterns.template_expression);for(var U=p.read(),z="";this._input.hasNext();){if(z=this._input.next(),z===g||!a&&c.newline.test(z)){this._input.back();break}else z==="\\"&&this._input.hasNext()?(S=this._input.peek(),S==="x"||S==="u"?this.has_char_escapes=!0:S==="\r"&&this._input.peek(1)===`
|
|
|
`&&this._input.next(),z+=this._input.next()):C&&(C==="${"&&z==="$"&&this._input.peek()==="{"&&(z+=this._input.next()),C===z&&(g==="`"?z+=this._read_string_recursive("}",a,"`"):z+=this._read_string_recursive("`",a,"${"),this._input.hasNext()&&(z+=this._input.next())));z+=p.read(),U+=z}return U},e.exports.Tokenizer=u,e.exports.TOKEN=h,e.exports.positionable_operators=R.slice(),e.exports.line_starters=D.slice()},function(e){var E=RegExp.prototype.hasOwnProperty("sticky");function l(_){this.__input=_||"",this.__input_length=this.__input.length,this.__position=0}l.prototype.restart=function(){this.__position=0},l.prototype.back=function(){this.__position>0&&(this.__position-=1)},l.prototype.hasNext=function(){return this.__position<this.__input_length},l.prototype.next=function(){var _=null;return this.hasNext()&&(_=this.__input.charAt(this.__position),this.__position+=1),_},l.prototype.peek=function(_){var r=null;return _=_||0,_+=this.__position,_>=0&&_<this.__input_length&&(r=this.__input.charAt(_)),r},l.prototype.__match=function(_,r){_.lastIndex=r;var n=_.exec(this.__input);return n&&!(E&&_.sticky)&&(n.index!==r&&(n=null)),n},l.prototype.test=function(_,r){return r=r||0,r+=this.__position,r>=0&&r<this.__input_length?!!this.__match(_,r):!1},l.prototype.testChar=function(_,r){var n=this.peek(r);return _.lastIndex=0,n!==null&&_.test(n)},l.prototype.match=function(_){var r=this.__match(_,this.__position);return r?this.__position+=r[0].length:r=null,r},l.prototype.read=function(_,r,n){var o="",c;return _&&(c=this.match(_),c&&(o+=c[0])),r&&(c||!_)&&(o+=this.readUntil(r,n)),o},l.prototype.readUntil=function(_,r){var n="",o=this.__position;_.lastIndex=this.__position;var c=_.exec(this.__input);return c?(o=c.index,r&&(o+=c[0].length)):o=this.__input_length,n=this.__input.substring(this.__position,o),this.__position=o,n},l.prototype.readUntilAfter=function(_){return this.readUntil(_,!0)},l.prototype.get_regexp=function(_,r){var n=null,o="g";return r&&E&&(o="y"),typeof _=="string"&&_!==""?n=new RegExp(_,o):_&&(n=new RegExp(_.source,o)),n},l.prototype.get_literal_regexp=function(_){return RegExp(_.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},l.prototype.peekUntilAfter=function(_){var r=this.__position,n=this.readUntilAfter(_);return this.__position=r,n},l.prototype.lookBack=function(_){var r=this.__position-1;return r>=_.length&&this.__input.substring(r-_.length,r).toLowerCase()===_},e.exports.InputScanner=l},function(e,E,l){var _=l(8).InputScanner,r=l(3).Token,n=l(10).TokenStream,o=l(11).WhitespacePattern,c={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},v=function(f,y){this._input=new _(f),this._options=y||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};v.prototype.tokenize=function(){this._input.restart(),this.__tokens=new n,this._reset();for(var f,y=new r(c.START,""),h=null,b=[],m=new n;y.type!==c.EOF;){for(f=this._get_next_token(y,h);this._is_comment(f);)m.add(f),f=this._get_next_token(y,h);m.isEmpty()||(f.comments_before=m,m=new n),f.parent=h,this._is_opening(f)?(b.push(h),h=f):h&&this._is_closing(f,h)&&(f.opened=h,h.closed=f,h=b.pop(),f.parent=h),f.previous=y,y.next=f,this.__tokens.add(f),y=f}return this.__tokens},v.prototype._is_first_token=function(){return this.__tokens.isEmpty()},v.prototype._reset=function(){},v.prototype._get_next_token=function(f,y){this._readWhitespace();var h=this._input.read(/.+/g);return h?this._create_token(c.RAW,h):this._create_token(c.EOF,"")},v.prototype._is_comment=function(f){return!1},v.prototype._is_opening=function(f){return!1},v.prototype._is_closing=function(f,y){return!1},v.prototype._create_token=function(f,y){var h=new r(f,y,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return h},v.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=v,e.exports.TOKEN=c},function(e){function E(l){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=l}E.prototype.restart=function(){this.__position=0},E.prototype.isEmpty=function(){return this.__tokens_length===0},E.prototype.hasNext=function(){return this.__position<this.__tokens_length},E.prototype.next=function(){var l=null;return this.hasNext()&&(l=this.__tokens[this.__position],this.__position+=1),l},E.prototype.peek=function(l){var _=null;return l=l||0,l+=this.__position,l>=0&&l<this.__tokens_length&&(_=this.__tokens[l]),_},E.prototype.add=function(l){this.__parent_token&&(l.parent=this.__parent_token),this.__tokens.push(l),this.__tokens_length+=1},e.exports.TokenStream=E},function(e,E,l){var _=l(12).Pattern;function r(n,o){_.call(this,n,o),o?this._line_regexp=this._input.get_regexp(o._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}r.prototype=new _,r.prototype.__set_whitespace_patterns=function(n,o){n+="\\t ",o+="\\n\\r",this._match_pattern=this._input.get_regexp("["+n+o+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+o+"]")},r.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var n=this._input.read(this._match_pattern);if(n===" ")this.whitespace_before_token=" ";else if(n){var o=this.__split(this._newline_regexp,n);this.newline_count=o.length-1,this.whitespace_before_token=o[this.newline_count]}return n},r.prototype.matching=function(n,o){var c=this._create();return c.__set_whitespace_patterns(n,o),c._update(),c},r.prototype._create=function(){return new r(this._input,this)},r.prototype.__split=function(n,o){n.lastIndex=0;for(var c=0,v=[],f=n.exec(o);f;)v.push(o.substring(c,f.index)),c=f.index+f[0].length,f=n.exec(o);return c<o.length?v.push(o.substring(c,o.length)):v.push(""),v},e.exports.WhitespacePattern=r},function(e){function E(l,_){this._input=l,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,_&&(this._starting_pattern=this._input.get_regexp(_._starting_pattern,!0),this._match_pattern=this._input.get_regexp(_._match_pattern,!0),this._until_pattern=this._input.get_regexp(_._until_pattern),this._until_after=_._until_after)}E.prototype.read=function(){var l=this._input.read(this._starting_pattern);return(!this._starting_pattern||l)&&(l+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),l},E.prototype.read_match=function(){return this._input.match(this._match_pattern)},E.prototype.until_after=function(l){var _=this._create();return _._until_after=!0,_._until_pattern=this._input.get_regexp(l),_._update(),_},E.prototype.until=function(l){var _=this._create();return _._until_after=!1,_._until_pattern=this._input.get_regexp(l),_._update(),_},E.prototype.starting_with=function(l){var _=this._create();return _._starting_pattern=this._input.get_regexp(l,!0),_._update(),_},E.prototype.matching=function(l){var _=this._create();return _._match_pattern=this._input.get_regexp(l,!0),_._update(),_},E.prototype._create=function(){return new E(this._input,this)},E.prototype._update=function(){},e.exports.Pattern=E},function(e){function E(l,_){l=typeof l=="string"?l:l.source,_=typeof _=="string"?_:_.source,this.__directives_block_pattern=new RegExp(l+/ beautify( \w+[:]\w+)+ /.source+_,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(l+/\sbeautify\signore:end\s/.source+_,"g")}E.prototype.get_directives=function(l){if(!l.match(this.__directives_block_pattern))return null;var _={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(l);r;)_[r[1]]=r[2],r=this.__directive_pattern.exec(l);return _},E.prototype.readIgnored=function(l){return l.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=E},function(e,E,l){var _=l(12).Pattern,r={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function n(o,c){_.call(this,o,c),this.__template_pattern=null,this._disabled=Object.assign({},r),this._excluded=Object.assign({},r),c&&(this.__template_pattern=this._input.get_regexp(c.__template_pattern),this._excluded=Object.assign(this._excluded,c._excluded),this._disabled=Object.assign(this._disabled,c._disabled));var v=new _(o);this.__patterns={handlebars_comment:v.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:v.starting_with(/{{{/).until_after(/}}}/),handlebars:v.starting_with(/{{/).until_after(/}}/),php:v.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:v.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:v.starting_with(/{%/).until_after(/%}/),django_value:v.starting_with(/{{/).until_after(/}}/),django_comment:v.starting_with(/{#/).until_after(/#}/),smarty:v.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:v.starting_with(/{\*/).until_after(/\*}/),smarty_literal:v.starting_with(/{literal}/).until_after(/{\/literal}/)}}n.prototype=new _,n.prototype._create=function(){return new n(this._input,this)},n.prototype._update=function(){this.__set_templated_pattern()},n.prototype.disable=function(o){var c=this._create();return c._disabled[o]=!0,c._update(),c},n.prototype.read_options=function(o){var c=this._create();for(var v in r)c._disabled[v]=o.templating.indexOf(v)===-1;return c._update(),c},n.prototype.exclude=function(o){var c=this._create();return c._excluded[o]=!0,c._update(),c},n.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var c=this._read_template();c;)this._match_pattern?c+=this._input.read(this._match_pattern):c+=this._input.readUntil(this.__template_pattern),o+=c,c=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},n.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},n.prototype._read_template=function(){var o="",c=this._input.peek();if(c==="<"){var v=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&v==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&v==="%"&&(o=o||this.__patterns.erb.read())}else c==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},e.exports.TemplatablePattern=n}],N={};function i(e){var E=N[e];if(E!==void 0)return E.exports;var l=N[e]={exports:{}};return K[e](l,l.exports,i),l.exports}var T=i(0);G=T})();var X=G;!(B=[],M=function(){return{js_beautify:X}}.apply(ee,B),M!==void 0&&(W.exports=M))})()},"746U":function(W,ee,L){"use strict";L.d(ee,"f",function(){return B}),L.d(ee,"l",function(){return M}),L.d(ee,"k",function(){return G}),L.d(ee,"j",function(){return X}),L.d(ee,"g",function(){return K}),L.d(ee,"m",function(){return N}),L.d(ee,"h",function(){return i}),L.d(ee,"n",function(){return T}),L.d(ee,"c",function(){return e}),L.d(ee,"a",function(){return E}),L.d(ee,"i",function(){return l}),L.d(ee,"o",function(){return _}),L.d(ee,"e",function(){return o}),L.d(ee,"d",function(){return c}),L.d(ee,"p",function(){return v}),L.d(ee,"b",function(){return f});function B(y){return Array.isArray(y)}function M(y){return typeof y=="string"}function G(y){return typeof y=="object"&&y!==null&&!Array.isArray(y)&&!(y instanceof RegExp)&&!(y instanceof Date)}function X(y){return typeof y=="number"&&!isNaN(y)}function K(y){return y===!0||y===!1}function N(y){return typeof y=="undefined"}function i(y){return!T(y)}function T(y){return N(y)||y===null}function e(y,h){if(!y)throw new Error(h?`Unexpected type, expected '${h}'`:"Unexpected type")}function E(y){if(T(y))throw new Error("Assertion Failed: argument is undefined or null");return y}function l(y){return typeof y=="function"}function _(y,h){const b=Math.min(y.length,h.length);for(let m=0;m<b;m++)r(y[m],h[m])}function r(y,h){if(M(h)){if(typeof y!==h)throw new Error(`argument does not match constraint: typeof ${h}`)}else if(l(h)){try{if(y instanceof h)return}catch(b){}if(!T(y)&&y.constructor===h)return;if(h.length===1&&h.call(void 0,y)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function n(y){let h=[],b=Object.getPrototypeOf(y);for(;Object.prototype!==b;)h=h.concat(Object.getOwnPropertyNames(b)),b=Object.getPrototypeOf(b);return h}function o(y){const h=[];for(const b of n(y))typeof y[b]=="function"&&h.push(b);return h}function c(y,h){const b=d=>function(){const x=Array.prototype.slice.call(arguments,0);return h(d,x)};let m={};for(const d of y)m[d]=b(d);return m}function v(y){return y===null?void 0:y}function f(y,h="Unreachable"){throw new Error(h)}},"7Cbv":function(W,ee,L){"use strict";var B=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),M=new Uint8Array(16);function G(){if(!B)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return B(M)}var X=/^(?:[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;function K(r){return typeof r=="string"&&X.test(r)}for(var N=K,i=[],T=0;T<256;++T)i.push((T+256).toString(16).substr(1));function e(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(i[r[n+0]]+i[r[n+1]]+i[r[n+2]]+i[r[n+3]]+"-"+i[r[n+4]]+i[r[n+5]]+"-"+i[r[n+6]]+i[r[n+7]]+"-"+i[r[n+8]]+i[r[n+9]]+"-"+i[r[n+10]]+i[r[n+11]]+i[r[n+12]]+i[r[n+13]]+i[r[n+14]]+i[r[n+15]]).toLowerCase();if(!N(o))throw TypeError("Stringified UUID is invalid");return o}var E=e;function l(r,n,o){r=r||{};var c=r.random||(r.rng||G)();if(c[6]=c[6]&15|64,c[8]=c[8]&63|128,n){o=o||0;for(var v=0;v<16;++v)n[o+v]=c[v];return n}return E(c)}var _=ee.a=l},"7J2G":function(W,ee,L){"use strict";L.d(ee,"a",function(){return d});var B=L("yuO0"),M=L("XjgL"),G=L("6ASS"),X=L("eA01"),K=L("fXDJ"),N=L("BPTR"),i=L("udol"),T=L("T/Jt"),e=L.n(T),E=L("27eb"),l=L.n(E),_=function(R){var O,w="".concat(R.rootPrefixCls,"-item"),D=l()(w,"".concat(w,"-").concat(R.page),(O={},Object(M.a)(O,"".concat(w,"-active"),R.active),Object(M.a)(O,"".concat(w,"-disabled"),!R.page),Object(M.a)(O,R.className,!!R.className),O)),A=function(){R.onClick(R.page)},P=function(u){R.onKeyPress(u,R.onClick,R.page)};return e.a.createElement("li",{title:R.showTitle?R.page:null,className:D,onClick:A,onKeyPress:P,tabIndex:"0"},R.itemRender(R.page,"page",e.a.createElement("a",{rel:"nofollow"},R.page)))},r=_,n={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},o=function(x){Object(N.a)(O,x);var R=Object(i.a)(O);function O(){var w;Object(X.a)(this,O);for(var D=arguments.length,A=new Array(D),P=0;P<D;P++)A[P]=arguments[P];return w=R.call.apply(R,[this].concat(A)),w.state={goInputText:""},w.buildOptionText=function(I){return"".concat(I," ").concat(w.props.locale.items_per_page)},w.changeSize=function(I){w.props.changeSize(Number(I))},w.handleChange=function(I){w.setState({goInputText:I.target.value})},w.handleBlur=function(I){var u=w.props,k=u.goButton,g=u.quickGo,a=u.rootPrefixCls,C=w.state.goInputText;if(k||C==="")return;if(w.setState({goInputText:""}),I.relatedTarget&&(I.relatedTarget.className.indexOf("".concat(a,"-item-link"))>=0||I.relatedTarget.className.indexOf("".concat(a,"-item"))>=0))return;g(w.getValidValue())},w.go=function(I){var u=w.state.goInputText;if(u==="")return;(I.keyCode===n.ENTER||I.type==="click")&&(w.setState({goInputText:""}),w.props.quickGo(w.getValidValue()))},w}return Object(K.a)(O,[{key:"getValidValue",value:function(){var D=this.state.goInputText;return!D||isNaN(D)?void 0:Number(D)}},{key:"getPageSizeOptions",value:function(){var D=this.props,A=D.pageSize,P=D.pageSizeOptions;return P.some(function(I){return I.toString()===A.toString()})?P:P.concat([A.toString()]).sort(function(I,u){var k=isNaN(Number(I))?0:Number(I),g=isNaN(Number(u))?0:Number(u);return k-g})}},{key:"render",value:function(){var D=this,A=this.props,P=A.pageSize,I=A.locale,u=A.rootPrefixCls,k=A.changeSize,g=A.quickGo,a=A.goButton,C=A.selectComponentClass,S=A.buildOptionText,p=A.selectPrefixCls,U=A.disabled,z=this.state.goInputText,q="".concat(u,"-options"),$=C,re=null,ce=null,ne=null;if(!k&&!g)return null;var me=this.getPageSizeOptions();if(k&&$){var be=me.map(function(he,se){return e.a.createElement($.Option,{key:se,value:he.toString()},(S||D.buildOptionText)(he))});re=e.a.createElement($,{disabled:U,prefixCls:p,showSearch:!1,className:"".concat(q,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(P||me[0]).toString(),onChange:this.changeSize,getPopupContainer:function(se){return se.parentNode},"aria-label":I.page_size,defaultOpen:!1},be)}return g&&(a&&(ne=typeof a=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:U,className:"".concat(q,"-quick-jumper-button")},I.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},a)),ce=e.a.createElement("div",{className:"".concat(q,"-quick-jumper")},I.jump_to,e.a.createElement("input",{disabled:U,type:"text",value:z,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":I.page}),I.page,ne)),e.a.createElement("li",{className:"".concat(q)},re,ce)}}]),O}(e.a.Component);o.defaultProps={pageSizeOptions:["10","20","50","100"]};var c=o,v=L("MbTZ");function f(){}function y(x){var R=Number(x);return typeof R=="number"&&!isNaN(R)&&isFinite(R)&&Math.floor(R)===R}function h(x,R,O){return O}function b(x,R,O){var w=typeof x=="undefined"?R.pageSize:x;return Math.floor((O.total-1)/w)+1}var m=function(x){Object(N.a)(O,x);var R=Object(i.a)(O);function O(w){var D;Object(X.a)(this,O),D=R.call(this,w),D.getJumpPrevPage=function(){return Math.max(1,D.state.current-(D.props.showLessItems?3:5))},D.getJumpNextPage=function(){return Math.min(b(void 0,D.state,D.props),D.state.current+(D.props.showLessItems?3:5))},D.getItemIcon=function(k,g){var a=D.props.prefixCls,C=k||e.a.createElement("button",{type:"button","aria-label":g,className:"".concat(a,"-item-link")});return typeof k=="function"&&(C=e.a.createElement(k,Object(G.a)({},D.props))),C},D.savePaginationNode=function(k){D.paginationNode=k},D.isValid=function(k){var g=D.props.total;return y(k)&&k!==D.state.current&&y(g)&&g>0},D.shouldDisplayQuickJumper=function(){var k=D.props,g=k.showQuickJumper,a=k.total,C=D.state.pageSize;return a<=C?!1:g},D.handleKeyDown=function(k){(k.keyCode===n.ARROW_UP||k.keyCode===n.ARROW_DOWN)&&k.preventDefault()},D.handleKeyUp=function(k){var g=D.getValidValue(k),a=D.state.currentInputValue;g!==a&&D.setState({currentInputValue:g}),k.keyCode===n.ENTER?D.handleChange(g):k.keyCode===n.ARROW_UP?D.handleChange(g-1):k.keyCode===n.ARROW_DOWN&&D.handleChange(g+1)},D.handleBlur=function(k){var g=D.getValidValue(k);D.handleChange(g)},D.changePageSize=function(k){var g=D.state.current,a=b(k,D.state,D.props);g=g>a?a:g,a===0&&(g=D.state.current),typeof k=="number"&&("pageSize"in D.props||D.setState({pageSize:k}),"current"in D.props||D.setState({current:g,currentInputValue:g})),D.props.onShowSizeChange(g,k),"onChange"in D.props&&D.props.onChange&&D.props.onChange(g,k)},D.handleChange=function(k){var g=D.props,a=g.disabled,C=g.onChange,S=D.state,p=S.pageSize,U=S.current,z=S.currentInputValue;if(D.isValid(k)&&!a){var q=b(void 0,D.state,D.props),$=k;return k>q?$=q:k<1&&($=1),"current"in D.props||D.setState({current:$}),$!==z&&D.setState({currentInputValue:$}),C($,p),$}return U},D.prev=function(){D.hasPrev()&&D.handleChange(D.state.current-1)},D.next=function(){D.hasNext()&&D.handleChange(D.state.current+1)},D.jumpPrev=function(){D.handleChange(D.getJumpPrevPage())},D.jumpNext=function(){D.handleChange(D.getJumpNextPage())},D.hasPrev=function(){return D.state.current>1},D.hasNext=function(){return D.state.current<b(void 0,D.state,D.props)},D.runIfEnter=function(k,g){if(k.key==="Enter"||k.charCode===13){for(var a=arguments.length,C=new Array(a>2?a-2:0),S=2;S<a;S++)C[S-2]=arguments[S];g.apply(void 0,C)}},D.runIfEnterPrev=function(k){D.runIfEnter(k,D.prev)},D.runIfEnterNext=function(k){D.runIfEnter(k,D.next)},D.runIfEnterJumpPrev=function(k){D.runIfEnter(k,D.jumpPrev)},D.runIfEnterJumpNext=function(k){D.runIfEnter(k,D.jumpNext)},D.handleGoTO=function(k){(k.keyCode===n.ENTER||k.type==="click")&&D.handleChange(D.state.currentInputValue)};var A=w.onChange!==f,P="current"in w;P&&!A&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var I=w.defaultCurrent;"current"in w&&(I=w.current);var u=w.defaultPageSize;return"pageSize"in w&&(u=w.pageSize),I=Math.min(I,b(u,void 0,w)),D.state={current:I,currentInputValue:I,pageSize:u},D}return Object(K.a)(O,[{key:"componentDidUpdate",value:function(D,A){var P=this.props.prefixCls;if(A.current!==this.state.current&&this.paginationNode){var I=this.paginationNode.querySelector(".".concat(P,"-item-").concat(A.current));I&&document.activeElement===I&&I.blur()}}},{key:"getValidValue",value:function(D){var A=D.target.value,P=b(void 0,this.state,this.props),I=this.state.currentInputValue,u;return A===""?u=A:isNaN(Number(A))?u=I:A>=P?u=P:u=Number(A),u}},{key:"getShowSizeChanger",value:function(){var D=this.props,A=D.showSizeChanger,P=D.total,I=D.totalBoundaryShowSizeChanger;return typeof A!="undefined"?A:P>I}},{key:"renderPrev",value:function(D){var A=this.props,P=A.prevIcon,I=A.itemRender,u=I(D,"prev",this.getItemIcon(P,"prev page")),k=!this.hasPrev();return Object(T.isValidElement)(u)?Object(T.cloneElement)(u,{disabled:k}):u}},{key:"renderNext",value:function(D){var A=this.props,P=A.nextIcon,I=A.itemRender,u=I(D,"next",this.getItemIcon(P,"next page")),k=!this.hasNext();return Object(T.isValidElement)(u)?Object(T.cloneElement)(u,{disabled:k}):u}},{key:"render",value:function(){var D=this,A=this.props,P=A.prefixCls,I=A.className,u=A.style,k=A.disabled,g=A.hideOnSinglePage,a=A.total,C=A.locale,S=A.showQuickJumper,p=A.showLessItems,U=A.showTitle,z=A.showTotal,q=A.simple,$=A.itemRender,re=A.showPrevNextJumpers,ce=A.jumpPrevIcon,ne=A.jumpNextIcon,me=A.selectComponentClass,be=A.selectPrefixCls,he=A.pageSizeOptions,se=this.state,_e=se.current,De=se.pageSize,ge=se.currentInputValue;if(g===!0&&a<=De)return null;var fe=b(void 0,this.state,this.props),Ce=[],ae=null,Q=null,J=null,Z=null,pe=null,le=S&&S.goButton,ye=p?1:2,Te=_e-1>0?_e-1:0,Pe=_e+1<fe?_e+1:fe,He=Object.keys(this.props).reduce(function(we,Ae){return(Ae.substr(0,5)==="data-"||Ae.substr(0,5)==="aria-"||Ae==="role")&&(we[Ae]=D.props[Ae]),we},{}),Oe=z&&e.a.createElement("li",{className:"".concat(P,"-total-text")},z(a,[a===0?0:(_e-1)*De+1,_e*De>a?a:_e*De]));if(q)return le&&(typeof le=="boolean"?pe=e.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},C.jump_to_confirm):pe=e.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},le),pe=e.a.createElement("li",{title:U?"".concat(C.jump_to).concat(_e,"/").concat(fe):null,className:"".concat(P,"-simple-pager")},pe)),e.a.createElement("ul",Object(B.a)({className:l()(P,"".concat(P,"-simple"),Object(M.a)({},"".concat(P,"-disabled"),k),I),style:u,ref:this.savePaginationNode},He),Oe,e.a.createElement("li",{title:U?C.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:l()("".concat(P,"-prev"),Object(M.a)({},"".concat(P,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Te)),e.a.createElement("li",{title:U?"".concat(_e,"/").concat(fe):null,className:"".concat(P,"-simple-pager")},e.a.createElement("input",{type:"text",value:ge,disabled:k,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:"3"}),e.a.createElement("span",{className:"".concat(P,"-slash")},"/"),fe),e.a.createElement("li",{title:U?C.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:l()("".concat(P,"-next"),Object(M.a)({},"".concat(P,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Pe)),pe);if(fe<=3+ye*2){var Ue={locale:C,rootPrefixCls:P,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:U,itemRender:$};fe||Ce.push(e.a.createElement(r,Object(B.a)({},Ue,{key:"noPager",page:1,className:"".concat(P,"-item-disabled")})));for(var je=1;je<=fe;je+=1){var Ve=_e===je;Ce.push(e.a.createElement(r,Object(B.a)({},Ue,{key:je,page:je,active:Ve})))}}else{var Re=p?C.prev_3:C.prev_5,Xe=p?C.next_3:C.next_5;re&&(ae=e.a.createElement("li",{title:U?Re:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:l()("".concat(P,"-jump-prev"),Object(M.a)({},"".concat(P,"-jump-prev-custom-icon"),!!ce))},$(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(ce,"prev page"))),Q=e.a.createElement("li",{title:U?Xe:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:l()("".concat(P,"-jump-next"),Object(M.a)({},"".concat(P,"-jump-next-custom-icon"),!!ne))},$(this.getJumpNextPage(),"jump-next",this.getItemIcon(ne,"next page")))),Z=e.a.createElement(r,{locale:C,last:!0,rootPrefixCls:P,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:fe,page:fe,active:!1,showTitle:U,itemRender:$}),J=e.a.createElement(r,{locale:C,rootPrefixCls:P,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:U,itemRender:$});var Qe=Math.max(1,_e-ye),We=Math.min(_e+ye,fe);_e-1<=ye&&(We=1+ye*2),fe-_e<=ye&&(Qe=fe-ye*2);for(var ze=Qe;ze<=We;ze+=1){var Me=_e===ze;Ce.push(e.a.createElement(r,{locale:C,rootPrefixCls:P,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ze,page:ze,active:Me,showTitle:U,itemRender:$}))}_e-1>=ye*2&&_e!==1+2&&(Ce[0]=Object(T.cloneElement)(Ce[0],{className:"".concat(P,"-item-after-jump-prev")}),Ce.unshift(ae)),fe-_e>=ye*2&&_e!==fe-2&&(Ce[Ce.length-1]=Object(T.cloneElement)(Ce[Ce.length-1],{className:"".concat(P,"-item-before-jump-next")}),Ce.push(Q)),Qe!==1&&Ce.unshift(J),We!==fe&&Ce.push(Z)}var Ie=!this.hasPrev()||!fe,Be=!this.hasNext()||!fe;return e.a.createElement("ul",Object(B.a)({className:l()(P,I,Object(M.a)({},"".concat(P,"-disabled"),k)),style:u,ref:this.savePaginationNode},He),Oe,e.a.createElement("li",{title:U?C.prev_page:null,onClick:this.prev,tabIndex:Ie?null:0,onKeyPress:this.runIfEnterPrev,className:l()("".concat(P,"-prev"),Object(M.a)({},"".concat(P,"-disabled"),Ie)),"aria-disabled":Ie},this.renderPrev(Te)),Ce,e.a.createElement("li",{title:U?C.next_page:null,onClick:this.next,tabIndex:Be?null:0,onKeyPress:this.runIfEnterNext,className:l()("".concat(P,"-next"),Object(M.a)({},"".concat(P,"-disabled"),Be)),"aria-disabled":Be},this.renderNext(Pe)),e.a.createElement(c,{disabled:k,locale:C,rootPrefixCls:P,selectComponentClass:me,selectPrefixCls:be,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:_e,pageSize:De,pageSizeOptions:he,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:le}))}}],[{key:"getDerivedStateFromProps",value:function(D,A){var P={};if("current"in D&&(P.current=D.current,D.current!==A.current&&(P.currentInputValue=P.current)),"pageSize"in D&&D.pageSize!==A.pageSize){var I=A.current,u=b(D.pageSize,A,D);I=I>u?u:I,"current"in D||(P.current=I,P.currentInputValue=I),P.pageSize=D.pageSize}return P}}]),O}(e.a.Component);m.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:f,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:f,locale:v.a,style:{},itemRender:h,totalBoundaryShowSizeChanger:50};var d=m},"7O0G":function(W,ee,L){(function(B,M){W.exports=M()})(this,function(){"use strict";function B(Me,Ie){for(var Be=0;Be<Ie.length;Be++){var we=Ie[Be];we.enumerable=we.enumerable||!1,we.configurable=!0,"value"in we&&(we.writable=!0),Object.defineProperty(Me,we.key,we)}}function M(Me,Ie,Be){return Ie&&B(Me.prototype,Ie),Be&&B(Me,Be),Me}function G(Me,Ie){if(!Me)return;if(typeof Me=="string")return X(Me,Ie);var Be=Object.prototype.toString.call(Me).slice(8,-1);if(Be==="Object"&&Me.constructor&&(Be=Me.constructor.name),Be==="Map"||Be==="Set")return Array.from(Me);if(Be==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Be))return X(Me,Ie)}function X(Me,Ie){(Ie==null||Ie>Me.length)&&(Ie=Me.length);for(var Be=0,we=new Array(Ie);Be<Ie;Be++)we[Be]=Me[Be];return we}function K(Me,Ie){var Be;if(typeof Symbol=="undefined"||Me[Symbol.iterator]==null){if(Array.isArray(Me)||(Be=G(Me))||Ie&&Me&&typeof Me.length=="number"){Be&&(Me=Be);var we=0;return function(){return we>=Me.length?{done:!0}:{done:!1,value:Me[we++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return Be=Me[Symbol.iterator](),Be.next.bind(Be)}function N(Me,Ie){return Ie={exports:{}},Me(Ie,Ie.exports),Ie.exports}var i=N(function(Me){function Ie(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function Be(we){Me.exports.defaults=we}Me.exports={defaults:Ie(),getDefaults:Ie,changeDefaults:Be}}),T=i.defaults,e=i.getDefaults,E=i.changeDefaults,l=/[&<>"']/,_=/[&<>"']/g,r=/[<>"']|&(?!#?\w+;)/,n=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(Ie){return o[Ie]};function v(Me,Ie){if(Ie){if(l.test(Me))return Me.replace(_,c)}else if(r.test(Me))return Me.replace(n,c);return Me}var f=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function y(Me){return Me.replace(f,function(Ie,Be){return Be=Be.toLowerCase(),Be==="colon"?":":Be.charAt(0)==="#"?Be.charAt(1)==="x"?String.fromCharCode(parseInt(Be.substring(2),16)):String.fromCharCode(+Be.substring(1)):""})}var h=/(^|[^\[])\^/g;function b(Me,Ie){Me=Me.source||Me,Ie=Ie||"";var Be={replace:function(Ae,ke){return ke=ke.source||ke,ke=ke.replace(h,"$1"),Me=Me.replace(Ae,ke),Be},getRegex:function(){return new RegExp(Me,Ie)}};return Be}var m=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function x(Me,Ie,Be){if(Me){var we;try{we=decodeURIComponent(y(Be)).replace(m,"").toLowerCase()}catch(Ae){return null}if(we.indexOf("javascript:")===0||we.indexOf("vbscript:")===0||we.indexOf("data:")===0)return null}Ie&&!d.test(Be)&&(Be=A(Ie,Be));try{Be=encodeURI(Be).replace(/%25/g,"%")}catch(Ae){return null}return Be}var R={},O=/^[^:]+:\/*[^/]*$/,w=/^([^:]+:)[\s\S]*$/,D=/^([^:]+:\/*[^/]*)[\s\S]*$/;function A(Me,Ie){R[" "+Me]||(O.test(Me)?R[" "+Me]=Me+"/":R[" "+Me]=k(Me,"/",!0)),Me=R[" "+Me];var Be=Me.indexOf(":")===-1;return Ie.substring(0,2)==="//"?Be?Ie:Me.replace(w,"$1")+Ie:Ie.charAt(0)==="/"?Be?Ie:Me.replace(D,"$1")+Ie:Me+Ie}var P={exec:function(){}};function I(Me){for(var Ie=1,Be,we;Ie<arguments.length;Ie++){Be=arguments[Ie];for(we in Be)Object.prototype.hasOwnProperty.call(Be,we)&&(Me[we]=Be[we])}return Me}function u(Me,Ie){var Be=Me.replace(/\|/g,function(ke,Le,Ke){for(var Ze=!1,Ne=Le;--Ne>=0&&Ke[Ne]==="\\";)Ze=!Ze;return Ze?"|":" |"}),we=Be.split(/ \|/),Ae=0;if(we.length>Ie)we.splice(Ie);else for(;we.length<Ie;)we.push("");for(;Ae<we.length;Ae++)we[Ae]=we[Ae].trim().replace(/\\\|/g,"|");return we}function k(Me,Ie,Be){var we=Me.length;if(we===0)return"";for(var Ae=0;Ae<we;){var ke=Me.charAt(we-Ae-1);if(ke===Ie&&!Be)Ae++;else if(ke!==Ie&&Be)Ae++;else break}return Me.substr(0,we-Ae)}function g(Me,Ie){if(Me.indexOf(Ie[1])===-1)return-1;for(var Be=Me.length,we=0,Ae=0;Ae<Be;Ae++)if(Me[Ae]==="\\")Ae++;else if(Me[Ae]===Ie[0])we++;else if(Me[Ae]===Ie[1]&&(we--,we<0))return Ae;return-1}function a(Me){Me&&Me.sanitize&&!Me.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var C={escape:v,unescape:y,edit:b,cleanUrl:x,resolveUrl:A,noopTest:P,merge:I,splitCells:u,rtrim:k,findClosingBracket:g,checkSanitizeDeprecation:a},S=i.defaults,p=C.rtrim,U=C.splitCells,z=C.escape,q=C.findClosingBracket;function $(Me,Ie,Be){var we=Ie.href,Ae=Ie.title?z(Ie.title):null,ke=Me[1].replace(/\\([\[\]])/g,"$1");return Me[0].charAt(0)!=="!"?{type:"link",raw:Be,href:we,title:Ae,text:ke}:{type:"image",raw:Be,href:we,title:Ae,text:z(ke)}}function re(Me,Ie){var Be=Me.match(/^(\s+)(?:```)/);if(Be===null)return Ie;var we=Be[1];return Ie.split(`
|
|
|
`).map(function(Ae){var ke=Ae.match(/^\s+/);if(ke===null)return Ae;var Le=ke[0];return Le.length>=we.length?Ae.slice(we.length):Ae}).join(`
|
|
|
`)}var ce=function(){function Me(Be){this.options=Be||S}var Ie=Me.prototype;return Ie.space=function(we){var Ae=this.rules.block.newline.exec(we);if(Ae)return Ae[0].length>1?{type:"space",raw:Ae[0]}:{raw:`
|
|
|
`}},Ie.code=function(we,Ae){var ke=this.rules.block.code.exec(we);if(ke){var Le=Ae[Ae.length-1];if(Le&&Le.type==="paragraph")return{raw:ke[0],text:ke[0].trimRight()};var Ke=ke[0].replace(/^ {4}/gm,"");return{type:"code",raw:ke[0],codeBlockStyle:"indented",text:this.options.pedantic?Ke:p(Ke,`
|
|
|
`)}}},Ie.fences=function(we){var Ae=this.rules.block.fences.exec(we);if(Ae){var ke=Ae[0],Le=re(ke,Ae[3]||"");return{type:"code",raw:ke,lang:Ae[2]?Ae[2].trim():Ae[2],text:Le}}},Ie.heading=function(we){var Ae=this.rules.block.heading.exec(we);if(Ae)return{type:"heading",raw:Ae[0],depth:Ae[1].length,text:Ae[2]}},Ie.nptable=function(we){var Ae=this.rules.block.nptable.exec(we);if(Ae){var ke={type:"table",header:U(Ae[1].replace(/^ *| *\| *$/g,"")),align:Ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ae[3]?Ae[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:Ae[0]};if(ke.header.length===ke.align.length){var Le=ke.align.length,Ke;for(Ke=0;Ke<Le;Ke++)/^ *-+: *$/.test(ke.align[Ke])?ke.align[Ke]="right":/^ *:-+: *$/.test(ke.align[Ke])?ke.align[Ke]="center":/^ *:-+ *$/.test(ke.align[Ke])?ke.align[Ke]="left":ke.align[Ke]=null;for(Le=ke.cells.length,Ke=0;Ke<Le;Ke++)ke.cells[Ke]=U(ke.cells[Ke],ke.header.length);return ke}}},Ie.hr=function(we){var Ae=this.rules.block.hr.exec(we);if(Ae)return{type:"hr",raw:Ae[0]}},Ie.blockquote=function(we){var Ae=this.rules.block.blockquote.exec(we);if(Ae){var ke=Ae[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Ae[0],text:ke}}},Ie.list=function(we){var Ae=this.rules.block.list.exec(we);if(Ae){for(var ke=Ae[0],Le=Ae[2],Ke=Le.length>1,Ze=Le[Le.length-1]===")",Ne={type:"list",raw:ke,ordered:Ke,start:Ke?+Le.slice(0,-1):"",loose:!1,items:[]},$e=Ae[0].match(this.rules.block.item),Je=!1,qe,ot,at,rt,dt,nt,mt,yt=$e.length,ft=0;ft<yt;ft++)qe=$e[ft],ke=qe,ot=qe.length,qe=qe.replace(/^ *([*+-]|\d+[.)]) */,""),~qe.indexOf(`
|
|
|
`)&&(ot-=qe.length,qe=this.options.pedantic?qe.replace(/^ {1,4}/gm,""):qe.replace(new RegExp("^ {1,"+ot+"}","gm"),"")),ft!==yt-1&&(at=this.rules.block.bullet.exec($e[ft+1])[0],(Ke?at.length===1||!Ze&&at[at.length-1]===")":at.length>1||this.options.smartLists&&at!==Le)&&(rt=$e.slice(ft+1).join(`
|
|
|
`),Ne.raw=Ne.raw.substring(0,Ne.raw.length-rt.length),ft=yt-1)),dt=Je||/\n\n(?!\s*$)/.test(qe),ft!==yt-1&&(Je=qe.charAt(qe.length-1)===`
|
|
|
`,dt||(dt=Je)),dt&&(Ne.loose=!0),nt=/^\[[ xX]\] /.test(qe),mt=void 0,nt&&(mt=qe[1]!==" ",qe=qe.replace(/^\[[ xX]\] +/,"")),Ne.items.push({type:"list_item",raw:ke,task:nt,checked:mt,loose:dt,text:qe});return Ne}},Ie.html=function(we){var Ae=this.rules.block.html.exec(we);if(Ae)return{type:this.options.sanitize?"paragraph":"html",raw:Ae[0],pre:!this.options.sanitizer&&(Ae[1]==="pre"||Ae[1]==="script"||Ae[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ae[0]):z(Ae[0]):Ae[0]}},Ie.def=function(we){var Ae=this.rules.block.def.exec(we);if(Ae){Ae[3]&&(Ae[3]=Ae[3].substring(1,Ae[3].length-1));var ke=Ae[1].toLowerCase().replace(/\s+/g," ");return{tag:ke,raw:Ae[0],href:Ae[2],title:Ae[3]}}},Ie.table=function(we){var Ae=this.rules.block.table.exec(we);if(Ae){var ke={type:"table",header:U(Ae[1].replace(/^ *| *\| *$/g,"")),align:Ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ae[3]?Ae[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(ke.header.length===ke.align.length){ke.raw=Ae[0];var Le=ke.align.length,Ke;for(Ke=0;Ke<Le;Ke++)/^ *-+: *$/.test(ke.align[Ke])?ke.align[Ke]="right":/^ *:-+: *$/.test(ke.align[Ke])?ke.align[Ke]="center":/^ *:-+ *$/.test(ke.align[Ke])?ke.align[Ke]="left":ke.align[Ke]=null;for(Le=ke.cells.length,Ke=0;Ke<Le;Ke++)ke.cells[Ke]=U(ke.cells[Ke].replace(/^ *\| *| *\| *$/g,""),ke.header.length);return ke}}},Ie.lheading=function(we){var Ae=this.rules.block.lheading.exec(we);if(Ae)return{type:"heading",raw:Ae[0],depth:Ae[2].charAt(0)==="="?1:2,text:Ae[1]}},Ie.paragraph=function(we){var Ae=this.rules.block.paragraph.exec(we);if(Ae)return{type:"paragraph",raw:Ae[0],text:Ae[1].charAt(Ae[1].length-1)===`
|
|
|
`?Ae[1].slice(0,-1):Ae[1]}},Ie.text=function(we,Ae){var ke=this.rules.block.text.exec(we);if(ke){var Le=Ae[Ae.length-1];return Le&&Le.type==="text"?{raw:ke[0],text:ke[0]}:{type:"text",raw:ke[0],text:ke[0]}}},Ie.escape=function(we){var Ae=this.rules.inline.escape.exec(we);if(Ae)return{type:"escape",raw:Ae[0],text:z(Ae[1])}},Ie.tag=function(we,Ae,ke){var Le=this.rules.inline.tag.exec(we);if(Le)return!Ae&&/^<a /i.test(Le[0])?Ae=!0:Ae&&/^<\/a>/i.test(Le[0])&&(Ae=!1),!ke&&/^<(pre|code|kbd|script)(\s|>)/i.test(Le[0])?ke=!0:ke&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Le[0])&&(ke=!1),{type:this.options.sanitize?"text":"html",raw:Le[0],inLink:Ae,inRawBlock:ke,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):z(Le[0]):Le[0]}},Ie.link=function(we){var Ae=this.rules.inline.link.exec(we);if(Ae){var ke=q(Ae[2],"()");if(ke>-1){var Le=Ae[0].indexOf("!")===0?5:4,Ke=Le+Ae[1].length+ke;Ae[2]=Ae[2].substring(0,ke),Ae[0]=Ae[0].substring(0,Ke).trim(),Ae[3]=""}var Ze=Ae[2],Ne="";if(this.options.pedantic){var $e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ze);$e?(Ze=$e[1],Ne=$e[3]):Ne=""}else Ne=Ae[3]?Ae[3].slice(1,-1):"";Ze=Ze.trim().replace(/^<([\s\S]*)>$/,"$1");var Je=$(Ae,{href:Ze&&Ze.replace(this.rules.inline._escapes,"$1"),title:Ne&&Ne.replace(this.rules.inline._escapes,"$1")},Ae[0]);return Je}},Ie.reflink=function(we,Ae){var ke;if((ke=this.rules.inline.reflink.exec(we))||(ke=this.rules.inline.nolink.exec(we))){var Le=(ke[2]||ke[1]).replace(/\s+/g," ");if(Le=Ae[Le.toLowerCase()],!Le||!Le.href){var Ke=ke[0].charAt(0);return{type:"text",raw:Ke,text:Ke}}var Ze=$(ke,Le,ke[0]);return Ze}},Ie.strong=function(we,Ae,ke){ke===void 0&&(ke="");var Le=this.rules.inline.strong.start.exec(we);if(Le&&(!Le[1]||Le[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Ae=Ae.slice(-1*we.length);var Ke=Le[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ke.lastIndex=0;for(var Ze;(Le=Ke.exec(Ae))!=null;)if(Ze=this.rules.inline.strong.middle.exec(Ae.slice(0,Le.index+3)),Ze)return{type:"strong",raw:we.slice(0,Ze[0].length),text:we.slice(2,Ze[0].length-2)}}},Ie.em=function(we,Ae,ke){ke===void 0&&(ke="");var Le=this.rules.inline.em.start.exec(we);if(Le&&(!Le[1]||Le[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Ae=Ae.slice(-1*we.length);var Ke=Le[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ke.lastIndex=0;for(var Ze;(Le=Ke.exec(Ae))!=null;)if(Ze=this.rules.inline.em.middle.exec(Ae.slice(0,Le.index+2)),Ze)return{type:"em",raw:we.slice(0,Ze[0].length),text:we.slice(1,Ze[0].length-1)}}},Ie.codespan=function(we){var Ae=this.rules.inline.code.exec(we);if(Ae){var ke=Ae[2].replace(/\n/g," "),Le=/[^ ]/.test(ke),Ke=ke.startsWith(" ")&&ke.endsWith(" ");return Le&&Ke&&(ke=ke.substring(1,ke.length-1)),ke=z(ke,!0),{type:"codespan",raw:Ae[0],text:ke}}},Ie.br=function(we){var Ae=this.rules.inline.br.exec(we);if(Ae)return{type:"br",raw:Ae[0]}},Ie.del=function(we){var Ae=this.rules.inline.del.exec(we);if(Ae)return{type:"del",raw:Ae[0],text:Ae[1]}},Ie.autolink=function(we,Ae){var ke=this.rules.inline.autolink.exec(we);if(ke){var Le,Ke;return ke[2]==="@"?(Le=z(this.options.mangle?Ae(ke[1]):ke[1]),Ke="mailto:"+Le):(Le=z(ke[1]),Ke=Le),{type:"link",raw:ke[0],text:Le,href:Ke,tokens:[{type:"text",raw:Le,text:Le}]}}},Ie.url=function(we,Ae){var ke;if(ke=this.rules.inline.url.exec(we)){var Le,Ke;if(ke[2]==="@")Le=z(this.options.mangle?Ae(ke[0]):ke[0]),Ke="mailto:"+Le;else{var Ze;do Ze=ke[0],ke[0]=this.rules.inline._backpedal.exec(ke[0])[0];while(Ze!==ke[0]);Le=z(ke[0]),ke[1]==="www."?Ke="http://"+Le:Ke=Le}return{type:"link",raw:ke[0],text:Le,href:Ke,tokens:[{type:"text",raw:Le,text:Le}]}}},Ie.inlineText=function(we,Ae,ke){var Le=this.rules.inline.text.exec(we);if(Le){var Ke;return Ae?Ke=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):z(Le[0]):Le[0]:Ke=z(this.options.smartypants?ke(Le[0]):Le[0]),{type:"text",raw:Le[0],text:Ke}}},Me}(),ne=C.noopTest,me=C.edit,be=C.merge,he={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:ne,table:ne,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};he._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,he._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,he.def=me(he.def).replace("label",he._label).replace("title",he._title).getRegex(),he.bullet=/(?:[*+-]|\d{1,9}[.)])/,he.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,he.item=me(he.item,"gm").replace(/bull/g,he.bullet).getRegex(),he.list=me(he.list).replace(/bull/g,he.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+he.def.source+")").getRegex(),he._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",he._comment=/<!--(?!-?>)[\s\S]*?-->/,he.html=me(he.html,"i").replace("comment",he._comment).replace("tag",he._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),he.paragraph=me(he._paragraph).replace("hr",he.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",he._tag).getRegex(),he.blockquote=me(he.blockquote).replace("paragraph",he.paragraph).getRegex(),he.normal=be({},he),he.gfm=be({},he.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*|$)"}),he.gfm.nptable=me(he.gfm.nptable).replace("hr",he.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",he._tag).getRegex(),he.gfm.table=me(he.gfm.table).replace("hr",he.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",he._tag).getRegex(),he.pedantic=be({},he.normal,{html:me(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",he._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:ne,paragraph:me(he.normal._paragraph).replace("hr",he.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",he.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var se={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ne,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:ne,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};se._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",se.punctuation=me(se.punctuation).replace(/punctuation/g,se._punctuation).getRegex(),se._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",se._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",se.em.start=me(se.em.start).replace(/punctuation/g,se._punctuation).getRegex(),se.em.middle=me(se.em.middle).replace(/punctuation/g,se._punctuation).replace(/overlapSkip/g,se._overlapSkip).getRegex(),se.em.endAst=me(se.em.endAst,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.em.endUnd=me(se.em.endUnd,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.strong.start=me(se.strong.start).replace(/punctuation/g,se._punctuation).getRegex(),se.strong.middle=me(se.strong.middle).replace(/punctuation/g,se._punctuation).replace(/blockSkip/g,se._blockSkip).getRegex(),se.strong.endAst=me(se.strong.endAst,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.strong.endUnd=me(se.strong.endUnd,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.blockSkip=me(se._blockSkip,"g").getRegex(),se.overlapSkip=me(se._overlapSkip,"g").getRegex(),se._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,se._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,se._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])?)+(?![-_])/,se.autolink=me(se.autolink).replace("scheme",se._scheme).replace("email",se._email).getRegex(),se._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,se.tag=me(se.tag).replace("comment",he._comment).replace("attribute",se._attribute).getRegex(),se._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,se._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,se._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,se.link=me(se.link).replace("label",se._label).replace("href",se._href).replace("title",se._title).getRegex(),se.reflink=me(se.reflink).replace("label",se._label).getRegex(),se.reflinkSearch=me(se.reflinkSearch,"g").replace("reflink",se.reflink).replace("nolink",se.nolink).getRegex(),se.normal=be({},se),se.pedantic=be({},se.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:me(/^!?\[(label)\]\((.*?)\)/).replace("label",se._label).getRegex(),reflink:me(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",se._label).getRegex()}),se.gfm=be({},se.normal,{escape:me(se.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),se.gfm.url=me(se.gfm.url,"i").replace("email",se.gfm._extended_email).getRegex(),se.breaks=be({},se.gfm,{br:me(se.br).replace("{2,}","*").getRegex(),text:me(se.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var _e={block:he,inline:se},De=i.defaults,ge=_e.block,fe=_e.inline;function Ce(Me){return Me.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function ae(Me){var Ie="",Be,we,Ae=Me.length;for(Be=0;Be<Ae;Be++)we=Me.charCodeAt(Be),Math.random()>.5&&(we="x"+we.toString(16)),Ie+="&#"+we+";";return Ie}var Q=function(){function Me(Be){this.tokens=[],this.tokens.links=Object.create(null),this.options=Be||De,this.options.tokenizer=this.options.tokenizer||new ce,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var we={block:ge.normal,inline:fe.normal};this.options.pedantic?(we.block=ge.pedantic,we.inline=fe.pedantic):this.options.gfm&&(we.block=ge.gfm,this.options.breaks?we.inline=fe.breaks:we.inline=fe.gfm),this.tokenizer.rules=we}Me.lex=function(we,Ae){var ke=new Me(Ae);return ke.lex(we)};var Ie=Me.prototype;return Ie.lex=function(we){return we=we.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(we,this.tokens,!0),this.inline(this.tokens),this.tokens},Ie.blockTokens=function(we,Ae,ke){Ae===void 0&&(Ae=[]),ke===void 0&&(ke=!0),we=we.replace(/^ +$/gm,"");for(var Le,Ke,Ze,Ne;we;){if(Le=this.tokenizer.space(we)){we=we.substring(Le.raw.length),Le.type&&Ae.push(Le);continue}if(Le=this.tokenizer.code(we,Ae)){we=we.substring(Le.raw.length),Le.type?Ae.push(Le):(Ne=Ae[Ae.length-1],Ne.raw+=`
|
|
|
`+Le.raw,Ne.text+=`
|
|
|
`+Le.text);continue}if(Le=this.tokenizer.fences(we)){we=we.substring(Le.raw.length),Ae.push(Le);continue}if(Le=this.tokenizer.heading(we)){we=we.substring(Le.raw.length),Ae.push(Le);continue}if(Le=this.tokenizer.nptable(we)){we=we.substring(Le.raw.length),Ae.push(Le);continue}if(Le=this.tokenizer.hr(we)){we=we.substring(Le.raw.length),Ae.push(Le);continue}if(Le=this.tokenizer.blockquote(we)){we=we.substring(Le.raw.length),Le.tokens=this.blockTokens(Le.text,[],ke),Ae.push(Le);continue}if(Le=this.tokenizer.list(we)){for(we=we.substring(Le.raw.length),Ze=Le.items.length,Ke=0;Ke<Ze;Ke++)Le.items[Ke].tokens=this.blockTokens(Le.items[Ke].text,[],!1);Ae.push(Le);continue}if(Le=this.tokenizer.html(we)){we=we.substring(Le.raw.length),Ae.push(Le);continue}if(ke&&(Le=this.tokenizer.def(we))){we=we.substring(Le.raw.length),this.tokens.links[Le.tag]||(this.tokens.links[Le.tag]={href:Le.href,title:Le.title});continue}if(Le=this.tokenizer.table(we)){we=we.substring(Le.raw.length),Ae.push(Le);continue}if(Le=this.tokenizer.lheading(we)){we=we.substring(Le.raw.length),Ae.push(Le);continue}if(ke&&(Le=this.tokenizer.paragraph(we))){we=we.substring(Le.raw.length),Ae.push(Le);continue}if(Le=this.tokenizer.text(we,Ae)){we=we.substring(Le.raw.length),Le.type?Ae.push(Le):(Ne=Ae[Ae.length-1],Ne.raw+=`
|
|
|
`+Le.raw,Ne.text+=`
|
|
|
`+Le.text);continue}if(we){var $e="Infinite loop on byte: "+we.charCodeAt(0);if(this.options.silent){console.error($e);break}else throw new Error($e)}}return Ae},Ie.inline=function(we){var Ae,ke,Le,Ke,Ze,Ne,$e=we.length;for(Ae=0;Ae<$e;Ae++){Ne=we[Ae];switch(Ne.type){case"paragraph":case"text":case"heading":{Ne.tokens=[],this.inlineTokens(Ne.text,Ne.tokens);break}case"table":{for(Ne.tokens={header:[],cells:[]},Ke=Ne.header.length,ke=0;ke<Ke;ke++)Ne.tokens.header[ke]=[],this.inlineTokens(Ne.header[ke],Ne.tokens.header[ke]);for(Ke=Ne.cells.length,ke=0;ke<Ke;ke++)for(Ze=Ne.cells[ke],Ne.tokens.cells[ke]=[],Le=0;Le<Ze.length;Le++)Ne.tokens.cells[ke][Le]=[],this.inlineTokens(Ze[Le],Ne.tokens.cells[ke][Le]);break}case"blockquote":{this.inline(Ne.tokens);break}case"list":{for(Ke=Ne.items.length,ke=0;ke<Ke;ke++)this.inline(Ne.items[ke].tokens);break}}}return we},Ie.inlineTokens=function(we,Ae,ke,Le,Ke){Ae===void 0&&(Ae=[]),ke===void 0&&(ke=!1),Le===void 0&&(Le=!1),Ke===void 0&&(Ke="");var Ze,Ne=we,$e;if(this.tokens.links){var Je=Object.keys(this.tokens.links);if(Je.length>0)for(;($e=this.tokenizer.rules.inline.reflinkSearch.exec(Ne))!=null;)Je.includes($e[0].slice($e[0].lastIndexOf("[")+1,-1))&&(Ne=Ne.slice(0,$e.index)+"["+"a".repeat($e[0].length-2)+"]"+Ne.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;($e=this.tokenizer.rules.inline.blockSkip.exec(Ne))!=null;)Ne=Ne.slice(0,$e.index)+"["+"a".repeat($e[0].length-2)+"]"+Ne.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;we;){if(Ze=this.tokenizer.escape(we)){we=we.substring(Ze.raw.length),Ae.push(Ze);continue}if(Ze=this.tokenizer.tag(we,ke,Le)){we=we.substring(Ze.raw.length),ke=Ze.inLink,Le=Ze.inRawBlock,Ae.push(Ze);continue}if(Ze=this.tokenizer.link(we)){we=we.substring(Ze.raw.length),Ze.type==="link"&&(Ze.tokens=this.inlineTokens(Ze.text,[],!0,Le)),Ae.push(Ze);continue}if(Ze=this.tokenizer.reflink(we,this.tokens.links)){we=we.substring(Ze.raw.length),Ze.type==="link"&&(Ze.tokens=this.inlineTokens(Ze.text,[],!0,Le)),Ae.push(Ze);continue}if(Ze=this.tokenizer.strong(we,Ne,Ke)){we=we.substring(Ze.raw.length),Ze.tokens=this.inlineTokens(Ze.text,[],ke,Le),Ae.push(Ze);continue}if(Ze=this.tokenizer.em(we,Ne,Ke)){we=we.substring(Ze.raw.length),Ze.tokens=this.inlineTokens(Ze.text,[],ke,Le),Ae.push(Ze);continue}if(Ze=this.tokenizer.codespan(we)){we=we.substring(Ze.raw.length),Ae.push(Ze);continue}if(Ze=this.tokenizer.br(we)){we=we.substring(Ze.raw.length),Ae.push(Ze);continue}if(Ze=this.tokenizer.del(we)){we=we.substring(Ze.raw.length),Ze.tokens=this.inlineTokens(Ze.text,[],ke,Le),Ae.push(Ze);continue}if(Ze=this.tokenizer.autolink(we,ae)){we=we.substring(Ze.raw.length),Ae.push(Ze);continue}if(!ke&&(Ze=this.tokenizer.url(we,ae))){we=we.substring(Ze.raw.length),Ae.push(Ze);continue}if(Ze=this.tokenizer.inlineText(we,Le,Ce)){we=we.substring(Ze.raw.length),Ke=Ze.raw.slice(-1),Ae.push(Ze);continue}if(we){var qe="Infinite loop on byte: "+we.charCodeAt(0);if(this.options.silent){console.error(qe);break}else throw new Error(qe)}}return Ae},M(Me,null,[{key:"rules",get:function(){return{block:ge,inline:fe}}}]),Me}(),J=i.defaults,Z=C.cleanUrl,pe=C.escape,le=function(){function Me(Be){this.options=Be||J}var Ie=Me.prototype;return Ie.code=function(we,Ae,ke){var Le=(Ae||"").match(/\S*/)[0];if(this.options.highlight){var Ke=this.options.highlight(we,Le);Ke!=null&&Ke!==we&&(ke=!0,we=Ke)}return Le?'<pre><code class="'+this.options.langPrefix+pe(Le,!0)+'">'+(ke?we:pe(we,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(ke?we:pe(we,!0))+`</code></pre>
|
|
|
`},Ie.blockquote=function(we){return`<blockquote>
|
|
|
`+we+`</blockquote>
|
|
|
`},Ie.html=function(we){return we},Ie.heading=function(we,Ae,ke,Le){return this.options.headerIds?"<h"+Ae+' id="'+this.options.headerPrefix+Le.slug(ke)+'">'+we+"</h"+Ae+`>
|
|
|
`:"<h"+Ae+">"+we+"</h"+Ae+`>
|
|
|
`},Ie.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},Ie.list=function(we,Ae,ke){var Le=Ae?"ol":"ul",Ke=Ae&&ke!==1?' start="'+ke+'"':"";return"<"+Le+Ke+`>
|
|
|
`+we+"</"+Le+`>
|
|
|
`},Ie.listitem=function(we){return"<li>"+we+`</li>
|
|
|
`},Ie.checkbox=function(we){return"<input "+(we?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Ie.paragraph=function(we){return"<p>"+we+`</p>
|
|
|
`},Ie.table=function(we,Ae){return Ae&&(Ae="<tbody>"+Ae+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+we+`</thead>
|
|
|
`+Ae+`</table>
|
|
|
`},Ie.tablerow=function(we){return`<tr>
|
|
|
`+we+`</tr>
|
|
|
`},Ie.tablecell=function(we,Ae){var ke=Ae.header?"th":"td",Le=Ae.align?"<"+ke+' align="'+Ae.align+'">':"<"+ke+">";return Le+we+"</"+ke+`>
|
|
|
`},Ie.strong=function(we){return"<strong>"+we+"</strong>"},Ie.em=function(we){return"<em>"+we+"</em>"},Ie.codespan=function(we){return"<code>"+we+"</code>"},Ie.br=function(){return this.options.xhtml?"<br/>":"<br>"},Ie.del=function(we){return"<del>"+we+"</del>"},Ie.link=function(we,Ae,ke){if(we=Z(this.options.sanitize,this.options.baseUrl,we),we===null)return ke;var Le='<a href="'+pe(we)+'"';return Ae&&(Le+=' title="'+Ae+'"'),Le+=">"+ke+"</a>",Le},Ie.image=function(we,Ae,ke){if(we=Z(this.options.sanitize,this.options.baseUrl,we),we===null)return ke;var Le='<img src="'+we+'" alt="'+ke+'"';return Ae&&(Le+=' title="'+Ae+'"'),Le+=this.options.xhtml?"/>":">",Le},Ie.text=function(we){return we},Me}(),ye=function(){function Me(){}var Ie=Me.prototype;return Ie.strong=function(we){return we},Ie.em=function(we){return we},Ie.codespan=function(we){return we},Ie.del=function(we){return we},Ie.html=function(we){return we},Ie.text=function(we){return we},Ie.link=function(we,Ae,ke){return""+ke},Ie.image=function(we,Ae,ke){return""+ke},Ie.br=function(){return""},Me}(),Te=function(){function Me(){this.seen={}}var Ie=Me.prototype;return Ie.slug=function(we){var Ae=we.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Ae)){var ke=Ae;do this.seen[ke]++,Ae=ke+"-"+this.seen[ke];while(this.seen.hasOwnProperty(Ae))}return this.seen[Ae]=0,Ae},Me}(),Pe=i.defaults,He=C.unescape,Oe=function(){function Me(Be){this.options=Be||Pe,this.options.renderer=this.options.renderer||new le,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ye,this.slugger=new Te}Me.parse=function(we,Ae){var ke=new Me(Ae);return ke.parse(we)};var Ie=Me.prototype;return Ie.parse=function(we,Ae){Ae===void 0&&(Ae=!0);var ke="",Le,Ke,Ze,Ne,$e,Je,qe,ot,at,rt,dt,nt,mt,yt,ft,ht,Rt,Wt,wt=we.length;for(Le=0;Le<wt;Le++){rt=we[Le];switch(rt.type){case"space":continue;case"hr":{ke+=this.renderer.hr();continue}case"heading":{ke+=this.renderer.heading(this.parseInline(rt.tokens),rt.depth,He(this.parseInline(rt.tokens,this.textRenderer)),this.slugger);continue}case"code":{ke+=this.renderer.code(rt.text,rt.lang,rt.escaped);continue}case"table":{for(ot="",qe="",Ne=rt.header.length,Ke=0;Ke<Ne;Ke++)qe+=this.renderer.tablecell(this.parseInline(rt.tokens.header[Ke]),{header:!0,align:rt.align[Ke]});for(ot+=this.renderer.tablerow(qe),at="",Ne=rt.cells.length,Ke=0;Ke<Ne;Ke++){for(Je=rt.tokens.cells[Ke],qe="",$e=Je.length,Ze=0;Ze<$e;Ze++)qe+=this.renderer.tablecell(this.parseInline(Je[Ze]),{header:!1,align:rt.align[Ze]});at+=this.renderer.tablerow(qe)}ke+=this.renderer.table(ot,at);continue}case"blockquote":{at=this.parse(rt.tokens),ke+=this.renderer.blockquote(at);continue}case"list":{for(dt=rt.ordered,nt=rt.start,mt=rt.loose,Ne=rt.items.length,at="",Ke=0;Ke<Ne;Ke++)ft=rt.items[Ke],ht=ft.checked,Rt=ft.task,yt="",ft.task&&(Wt=this.renderer.checkbox(ht),mt?ft.tokens.length>0&&ft.tokens[0].type==="text"?(ft.tokens[0].text=Wt+" "+ft.tokens[0].text,ft.tokens[0].tokens&&ft.tokens[0].tokens.length>0&&ft.tokens[0].tokens[0].type==="text"&&(ft.tokens[0].tokens[0].text=Wt+" "+ft.tokens[0].tokens[0].text)):ft.tokens.unshift({type:"text",text:Wt}):yt+=Wt),yt+=this.parse(ft.tokens,mt),at+=this.renderer.listitem(yt,Rt,ht);ke+=this.renderer.list(at,dt,nt);continue}case"html":{ke+=this.renderer.html(rt.text);continue}case"paragraph":{ke+=this.renderer.paragraph(this.parseInline(rt.tokens));continue}case"text":{for(at=rt.tokens?this.parseInline(rt.tokens):rt.text;Le+1<wt&&we[Le+1].type==="text";)rt=we[++Le],at+=`
|
|
|
`+(rt.tokens?this.parseInline(rt.tokens):rt.text);ke+=Ae?this.renderer.paragraph(at):at;continue}default:{var lt='Token with "'+rt.type+'" type was not found.';if(this.options.silent){console.error(lt);return}else throw new Error(lt)}}}return ke},Ie.parseInline=function(we,Ae){Ae=Ae||this.renderer;var ke="",Le,Ke,Ze=we.length;for(Le=0;Le<Ze;Le++){Ke=we[Le];switch(Ke.type){case"escape":{ke+=Ae.text(Ke.text);break}case"html":{ke+=Ae.html(Ke.text);break}case"link":{ke+=Ae.link(Ke.href,Ke.title,this.parseInline(Ke.tokens,Ae));break}case"image":{ke+=Ae.image(Ke.href,Ke.title,Ke.text);break}case"strong":{ke+=Ae.strong(this.parseInline(Ke.tokens,Ae));break}case"em":{ke+=Ae.em(this.parseInline(Ke.tokens,Ae));break}case"codespan":{ke+=Ae.codespan(Ke.text);break}case"br":{ke+=Ae.br();break}case"del":{ke+=Ae.del(this.parseInline(Ke.tokens,Ae));break}case"text":{ke+=Ae.text(Ke.text);break}default:{var Ne='Token with "'+Ke.type+'" type was not found.';if(this.options.silent){console.error(Ne);return}else throw new Error(Ne)}}}return ke},Me}(),Ue=C.merge,je=C.checkSanitizeDeprecation,Ve=C.escape,Re=i.getDefaults,Xe=i.changeDefaults,Qe=i.defaults;function We(Me,Ie,Be){if(typeof Me=="undefined"||Me===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Me!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Me)+", string expected");if(typeof Ie=="function"&&(Be=Ie,Ie=null),Ie=Ue({},We.defaults,Ie||{}),je(Ie),Be){var we=Ie.highlight,Ae;try{Ae=Q.lex(Me,Ie)}catch(Ze){return Be(Ze)}var ke=function(Ne){var $e;if(!Ne)try{$e=Oe.parse(Ae,Ie)}catch(Je){Ne=Je}return Ie.highlight=we,Ne?Be(Ne):Be(null,$e)};if(!we||we.length<3)return ke();if(delete Ie.highlight,!Ae.length)return ke();var Le=0;We.walkTokens(Ae,function(Ze){Ze.type==="code"&&(Le++,setTimeout(function(){we(Ze.text,Ze.lang,function(Ne,$e){if(Ne)return ke(Ne);$e!=null&&$e!==Ze.text&&(Ze.text=$e,Ze.escaped=!0),Le--,Le===0&&ke()})},0))}),Le===0&&ke();return}try{var Ke=Q.lex(Me,Ie);return Ie.walkTokens&&We.walkTokens(Ke,Ie.walkTokens),Oe.parse(Ke,Ie)}catch(Ze){if(Ze.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Ie.silent)return"<p>An error occurred:</p><pre>"+Ve(Ze.message+"",!0)+"</pre>";throw Ze}}We.options=We.setOptions=function(Me){return Ue(We.defaults,Me),Xe(We.defaults),We},We.getDefaults=Re,We.defaults=Qe,We.use=function(Me){var Ie=Ue({},Me);if(Me.renderer&&function(){var we=We.defaults.renderer||new le,Ae=function(Ke){var Ze=we[Ke];we[Ke]=function(){for(var Ne=arguments.length,$e=new Array(Ne),Je=0;Je<Ne;Je++)$e[Je]=arguments[Je];var qe=Me.renderer[Ke].apply(we,$e);return qe===!1&&(qe=Ze.apply(we,$e)),qe}};for(var ke in Me.renderer)Ae(ke);Ie.renderer=we}(),Me.tokenizer&&function(){var we=We.defaults.tokenizer||new ce,Ae=function(Ke){var Ze=we[Ke];we[Ke]=function(){for(var Ne=arguments.length,$e=new Array(Ne),Je=0;Je<Ne;Je++)$e[Je]=arguments[Je];var qe=Me.tokenizer[Ke].apply(we,$e);return qe===!1&&(qe=Ze.apply(we,$e)),qe}};for(var ke in Me.tokenizer)Ae(ke);Ie.tokenizer=we}(),Me.walkTokens){var Be=We.defaults.walkTokens;Ie.walkTokens=function(we){Me.walkTokens(we),Be&&Be(we)}}We.setOptions(Ie)},We.walkTokens=function(Me,Ie){for(var Be=K(Me),we;!(we=Be()).done;){var Ae=we.value;Ie(Ae);switch(Ae.type){case"table":{for(var ke=K(Ae.tokens.header),Le;!(Le=ke()).done;){var Ke=Le.value;We.walkTokens(Ke,Ie)}for(var Ze=K(Ae.tokens.cells),Ne;!(Ne=Ze()).done;)for(var $e=Ne.value,Je=K($e),qe;!(qe=Je()).done;){var ot=qe.value;We.walkTokens(ot,Ie)}break}case"list":{We.walkTokens(Ae.items,Ie);break}default:Ae.tokens&&We.walkTokens(Ae.tokens,Ie)}}},We.Parser=Oe,We.parser=Oe.parse,We.Renderer=le,We.TextRenderer=ye,We.Lexer=Q,We.lexer=Q.lex,We.Tokenizer=ce,We.Slugger=Te,We.parse=We;var ze=We;return ze})},"7Se7":function(W,ee,L){"use strict";var B=L("yuO0"),M=L("eA01"),G=L("fXDJ"),X=L("BPTR"),K=L("udol"),N=L("T/Jt"),i=L.n(N),T=L("XjgL"),e=L("fNpE"),E=L("MZ8U"),l=L("kxoy"),_=L("83jQ"),r=L("aVTQ"),n=L("27eb"),o=L.n(n),c=L("E0BR");function v(a,C){var S="cannot ".concat(a.method," ").concat(a.action," ").concat(C.status,"'"),p=new Error(S);return p.status=C.status,p.method=a.method,p.url=a.action,p}function f(a){var C=a.responseText||a.response;if(!C)return C;try{return JSON.parse(C)}catch(S){return C}}function y(a){var C=new XMLHttpRequest;a.onProgress&&C.upload&&(C.upload.onprogress=function(z){z.total>0&&(z.percent=z.loaded/z.total*100),a.onProgress(z)});var S=new FormData;a.data&&Object.keys(a.data).forEach(function(U){var z=a.data[U];if(Array.isArray(z)){z.forEach(function(q){S.append("".concat(U,"[]"),q)});return}S.append(U,z)}),a.file instanceof Blob?S.append(a.filename,a.file,a.file.name):S.append(a.filename,a.file),C.onerror=function(z){a.onError(z)},C.onload=function(){return C.status<200||C.status>=300?a.onError(v(a,C),f(C)):a.onSuccess(f(C),C)},C.open(a.method,a.action,!0),a.withCredentials&&"withCredentials"in C&&(C.withCredentials=!0);var p=a.headers||{};return p["X-Requested-With"]!==null&&C.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(p).forEach(function(U){p[U]!==null&&C.setRequestHeader(U,p[U])}),C.send(S),{abort:function(){C.abort()}}}var h=+new Date,b=0;function m(){return"rc-upload-".concat(h,"-").concat(++b)}var d=L("B/uU"),x=function(a,C){if(a&&C){var S=Array.isArray(C)?C:C.split(","),p=a.name||"",U=a.type||"",z=U.replace(/\/.*$/,"");return S.some(function(q){var $=q.trim();if(/^\*(\/\*)?$/.test(q))return!0;if($.charAt(0)==="."){var re=p.toLowerCase(),ce=$.toLowerCase(),ne=[ce];return(ce===".jpg"||ce===".jpeg")&&(ne=[".jpg",".jpeg"]),ne.some(function(me){return re.endsWith(me)})}return/\/\*$/.test($)?z===$.replace(/\/.*$/,""):U===$?!0:/^\w+$/.test($)?(Object(d.a)(!1,"Upload takes an invalidate 'accept' type '".concat($,"'.Skip for check.")),!0):!1})}return!0};function R(a,C){var S=a.createReader(),p=[];function U(){S.readEntries(function(z){var q=Array.prototype.slice.apply(z);p=p.concat(q);var $=!q.length;$?C(p):U()})}U()}var O=function(C,S,p){var U=function z(q,$){if(!q)return;q.path=$||"",q.isFile?q.file(function(re){p(re)&&(q.fullPath&&!re.webkitRelativePath&&(Object.defineProperties(re,{webkitRelativePath:{writable:!0}}),re.webkitRelativePath=q.fullPath.replace(/^\//,""),Object.defineProperties(re,{webkitRelativePath:{writable:!1}})),S([re]))}):q.isDirectory&&R(q,function(re){re.forEach(function(ce){z(ce,"".concat($).concat(q.name,"/"))})})};C.forEach(function(z){U(z.webkitGetAsEntry())})},w=O,D=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],A=function(a){Object(X.a)(S,a);var C=Object(K.a)(S);function S(){var p;Object(M.a)(this,S);for(var U=arguments.length,z=new Array(U),q=0;q<U;q++)z[q]=arguments[q];return p=C.call.apply(C,[this].concat(z)),p.state={uid:m()},p.reqs={},p.fileInput=void 0,p._isMounted=void 0,p.onChange=function($){var re=p.props,ce=re.accept,ne=re.directory,me=$.target.files,be=Object(r.a)(me).filter(function(he){return!ne||x(he,ce)});p.uploadFiles(be),p.reset()},p.onClick=function($){var re=p.fileInput;if(!re)return;var ce=$.target,ne=p.props.onClick;if(ce&&ce.tagName==="BUTTON"){var me=re.parentNode;me.focus(),ce.blur()}re.click(),ne&&ne($)},p.onKeyDown=function($){$.key==="Enter"&&p.onClick($)},p.onFileDrop=function($){var re=p.props.multiple;if($.preventDefault(),$.type==="dragover")return;if(p.props.directory)w(Array.prototype.slice.call($.dataTransfer.items),p.uploadFiles,function(ne){return x(ne,p.props.accept)});else{var ce=Object(r.a)($.dataTransfer.files).filter(function(ne){return x(ne,p.props.accept)});re===!1&&(ce=ce.slice(0,1)),p.uploadFiles(ce)}},p.uploadFiles=function($){var re=Object(r.a)($),ce=re.map(function(ne){return ne.uid=m(),p.processFile(ne,re)});Promise.all(ce).then(function(ne){var me=p.props.onBatchStart;me==null||me(ne.map(function(be){var he=be.origin,se=be.parsedFile;return{file:he,parsedFile:se}})),ne.filter(function(be){return be.parsedFile!==null}).forEach(function(be){p.post(be)})})},p.processFile=function(){var $=Object(_.a)(Object(E.a)().mark(function re(ce,ne){var me,be,he,se,_e,De,ge,fe,Ce;return Object(E.a)().wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:if(me=p.props.beforeUpload,be=ce,!me){Q.next=14;break}return Q.prev=3,Q.next=6,me(ce,ne);case 6:be=Q.sent,Q.next=12;break;case 9:Q.prev=9,Q.t0=Q.catch(3),be=!1;case 12:if(!(be===!1)){Q.next=14;break}return Q.abrupt("return",{origin:ce,parsedFile:null,action:null,data:null});case 14:if(he=p.props.action,!(typeof he=="function")){Q.next=21;break}return Q.next=18,he(ce);case 18:se=Q.sent,Q.next=22;break;case 21:se=he;case 22:if(_e=p.props.data,!(typeof _e=="function")){Q.next=29;break}return Q.next=26,_e(ce);case 26:De=Q.sent,Q.next=30;break;case 29:De=_e;case 30:return ge=(Object(l.a)(be)==="object"||typeof be=="string")&&be?be:ce,ge instanceof File?fe=ge:fe=new File([ge],ce.name,{type:ce.type}),Ce=fe,Ce.uid=ce.uid,Q.abrupt("return",{origin:ce,data:De,parsedFile:Ce,action:se});case 35:case"end":return Q.stop()}},re,null,[[3,9]])}));return function(re,ce){return $.apply(this,arguments)}}(),p.saveFileInput=function($){p.fileInput=$},p}return Object(G.a)(S,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(U){var z=this,q=U.data,$=U.origin,re=U.action,ce=U.parsedFile;if(!this._isMounted)return;var ne=this.props,me=ne.onStart,be=ne.customRequest,he=ne.name,se=ne.headers,_e=ne.withCredentials,De=ne.method,ge=$.uid,fe=be||y,Ce={action:re,filename:he,data:q,file:ce,headers:se,withCredentials:_e,method:De||"post",onProgress:function(Q){var J=z.props.onProgress;J==null||J(Q,ce)},onSuccess:function(Q,J){var Z=z.props.onSuccess;Z==null||Z(Q,ce,J),delete z.reqs[ge]},onError:function(Q,J){var Z=z.props.onError;Z==null||Z(Q,J,ce),delete z.reqs[ge]}};me($),this.reqs[ge]=fe(Ce)}},{key:"reset",value:function(){this.setState({uid:m()})}},{key:"abort",value:function(U){var z=this.reqs;if(U){var q=U.uid?U.uid:U;z[q]&&z[q].abort&&z[q].abort(),delete z[q]}else Object.keys(z).forEach(function($){z[$]&&z[$].abort&&z[$].abort(),delete z[$]})}},{key:"render",value:function(){var U=this.props,z=U.component,q=U.prefixCls,$=U.className,re=U.disabled,ce=U.id,ne=U.style,me=U.multiple,be=U.accept,he=U.capture,se=U.children,_e=U.directory,De=U.openFileDialogOnClick,ge=U.onMouseEnter,fe=U.onMouseLeave,Ce=Object(e.a)(U,D),ae=o()(Object(T.a)(Object(T.a)(Object(T.a)({},q,!0),"".concat(q,"-disabled"),re),$,$)),Q=_e?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},J=re?{}:{onClick:De?this.onClick:function(){},onKeyDown:De?this.onKeyDown:function(){},onMouseEnter:ge,onMouseLeave:fe,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return i.a.createElement(z,Object(B.a)({},J,{className:ae,role:"button",style:ne}),i.a.createElement("input",Object(B.a)({},Object(c.a)(Ce,{aria:!0,data:!0}),{id:ce,disabled:re,type:"file",ref:this.saveFileInput,onClick:function(pe){return pe.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:be},Q,{multiple:me,onChange:this.onChange},he!=null?{capture:he}:{})),se)}}]),S}(N.Component),P=A;function I(){}var u=function(a){Object(X.a)(S,a);var C=Object(K.a)(S);function S(){var p;Object(M.a)(this,S);for(var U=arguments.length,z=new Array(U),q=0;q<U;q++)z[q]=arguments[q];return p=C.call.apply(C,[this].concat(z)),p.uploader=void 0,p.saveUploader=function($){p.uploader=$},p}return Object(G.a)(S,[{key:"abort",value:function(U){this.uploader.abort(U)}},{key:"render",value:function(){return i.a.createElement(P,Object(B.a)({},this.props,{ref:this.saveUploader}))}}]),S}(N.Component);u.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:I,onError:I,onSuccess:I,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var k=u,g=ee.a=k},"7ahc":function(W,ee,L){"use strict";L.d(ee,"a",function(){return b});var B=L("YaWb"),M=L("HPgX"),G=L("dLI4"),X=L("4d5L"),K=L("y6Ii"),N=L("Wuip"),i=L("Hqw+"),T=L("FrBR"),e=L("SCzF"),E=L("T/Jt"),l=L.n(E),_=L("VrN/"),r=L.n(_),n=L("p77/"),o=L.n(n),c=L("c5Ni"),v=L.n(c),f=e.a.Option,y={labelCol:{span:4},wrapperCol:{span:20}},h={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"]};ee.b=function(m){var d=m.callback,x=m.onCancel,R=Object(E.useState)("python"),O=Object(i.a)(R,2),w=O[0],D=O[1];function A(I){D(h[I][1])}function P(I){d(I)}return l.a.createElement(N.a,Object(M.a)({},y,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:P}),l.a.createElement(N.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},l.a.createElement(e.a,{onChange:A},Object.keys(h).map(function(I){return l.a.createElement(f,{key:I,value:I},h[I][0])}))),l.a.createElement(N.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},l.a.createElement(b,{mode:w})),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(X.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(X.a,{type:"ghost",onClick:x},"\u53D6\u6D88")))};function b(m){var d=m.value,x=m.onChange,R=m.mode,O=m.options,w=O===void 0?{}:O,D=Object(E.useRef)(),A=Object(E.useState)(),P=Object(i.a)(A,2),I=P[0],u=P[1];return Object(E.useEffect)(function(){if(I){function k(g){var a=g.getValue();x&&x(a)}return I.on("change",k),function(){I.off("change",k)}}},[I,x]),Object(E.useEffect)(function(){I&&I.setOption("mode",R)},[I,R]),Object(E.useEffect)(function(){I&&((d!==I.getValue()||d==="")&&setTimeout(function(){I.setValue(d||" ")},300))},[I,d]),Object(E.useEffect)(function(){if(D.current&&!I){var k=r.a.fromTextArea(D.current,Object(B.a)({mode:R,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},w));u(k)}},[D.current,I]),l.a.createElement("div",{className:"my-codemirror-container"},l.a.createElement("textarea",{ref:D}))}},"7oQw":function(W,ee,L){"use strict";L.d(ee,"a",function(){return R});var B=L("yuO0"),M=L("6ASS"),G=L("fNpE"),X=L("T/Jt"),K=L("27eb"),N=L.n(K),i={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},T=function(){var D=Object(X.useRef)([]),A=Object(X.useRef)(null);return Object(X.useEffect)(function(){var P=Date.now(),I=!1;D.current.forEach(function(u){if(!u)return;I=!0;var k=u.style;k.transitionDuration=".3s, .3s, .3s, .06s",A.current&&P-A.current<100&&(k.transitionDuration="0s, 0s")}),I&&(A.current=Date.now())}),D.current},e=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],E=function(D){var A=Object(M.a)(Object(M.a)({},i),D),P=A.className,I=A.percent,u=A.prefixCls,k=A.strokeColor,g=A.strokeLinecap,a=A.strokeWidth,C=A.style,S=A.trailColor,p=A.trailWidth,U=A.transition,z=Object(G.a)(A,e);delete z.gapPosition;var q=Array.isArray(I)?I:[I],$=Array.isArray(k)?k:[k],re=T(),ce=a/2,ne=100-a/2,me="M ".concat(g==="round"?ce:0,",").concat(ce,`
|
|
|
L `).concat(g==="round"?ne:100,",").concat(ce),be="0 0 100 ".concat(a),he=0;return X.createElement("svg",Object(B.a)({className:N()("".concat(u,"-line"),P),viewBox:be,preserveAspectRatio:"none",style:C},z),X.createElement("path",{className:"".concat(u,"-line-trail"),d:me,strokeLinecap:g,stroke:S,strokeWidth:p||a,fillOpacity:"0"}),q.map(function(se,_e){var De=1;switch(g){case"round":De=1-a/100;break;case"square":De=1-a/2/100;break;default:De=1;break}var ge={strokeDasharray:"".concat(se*De,"px, 100px"),strokeDashoffset:"-".concat(he,"px"),transition:U||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},fe=$[_e]||$[$.length-1];return he+=se,X.createElement("path",{key:_e,className:"".concat(u,"-line-path"),d:me,strokeLinecap:g,stroke:fe,strokeWidth:a,fillOpacity:"0",ref:function(ae){re[_e]=ae},style:ge})}))},l=E,_=L("kxoy"),r=L("36hc"),n=L("Zfln"),o=0,c=Object(n.a)();function v(){var w;return c?(w=o,o+=1):w="TEST_OR_SSR",w}var f=function(w){var D=X.useState(),A=Object(r.a)(D,2),P=A[0],I=A[1];return X.useEffect(function(){I("rc_progress_".concat(v()))},[]),w||P},y=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function h(w){return+w.replace("%","")}function b(w){var D=w!=null?w:[];return Array.isArray(D)?D:[D]}var m=100,d=function(D,A,P,I,u,k,g,a,C,S){var p=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,U=P/100*360*((360-k)/360),z=k===0?0:{bottom:0,top:180,left:90,right:-90}[g],q=(100-I)/100*A;return C==="round"&&I!==100&&(q+=S/2,q>=A&&(q=A-.01)),{stroke:typeof a=="string"?a:void 0,strokeDasharray:"".concat(A,"px ").concat(D),strokeDashoffset:q+p,transform:"rotate(".concat(u+U+z,"deg)"),transformOrigin:"0 0",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},x=function(D){var A=Object(M.a)(Object(M.a)({},i),D),P=A.id,I=A.prefixCls,u=A.steps,k=A.strokeWidth,g=A.trailWidth,a=A.gapDegree,C=a===void 0?0:a,S=A.gapPosition,p=A.trailColor,U=A.strokeLinecap,z=A.style,q=A.className,$=A.strokeColor,re=A.percent,ce=Object(G.a)(A,y),ne=f(P),me="".concat(ne,"-gradient"),be=m/2-k/2,he=Math.PI*2*be,se=C>0?90+C/2:-90,_e=he*((360-C)/360),De=Object(_.a)(u)==="object"?u:{count:u,space:2},ge=De.count,fe=De.space,Ce=d(he,_e,0,100,se,C,S,p,U,k),ae=b(re),Q=b($),J=Q.find(function(ye){return ye&&Object(_.a)(ye)==="object"}),Z=T(),pe=function(){var Te=0;return ae.map(function(Pe,He){var Oe=Q[He]||Q[Q.length-1],Ue=Oe&&Object(_.a)(Oe)==="object"?"url(#".concat(me,")"):void 0,je=d(he,_e,Te,Pe,se,C,S,Oe,U,k);return Te+=Pe,X.createElement("circle",{key:He,className:"".concat(I,"-circle-path"),r:be,cx:0,cy:0,stroke:Ue,strokeLinecap:U,strokeWidth:k,opacity:Pe===0?0:1,style:je,ref:function(Re){Z[He]=Re}})}).reverse()},le=function(){var Te=Math.round(ge*(ae[0]/100)),Pe=100/ge,He=0;return new Array(ge).fill(null).map(function(Oe,Ue){var je=Ue<=Te-1?Q[0]:p,Ve=je&&Object(_.a)(je)==="object"?"url(#".concat(me,")"):void 0,Re=d(he,_e,He,Pe,se,C,S,je,"butt",k,fe);return He+=(_e-Re.strokeDashoffset+fe)*100/_e,X.createElement("circle",{key:Ue,className:"".concat(I,"-circle-path"),r:be,cx:0,cy:0,stroke:Ve,strokeWidth:k,opacity:1,style:Re,ref:function(Qe){Z[Ue]=Qe}})})};return X.createElement("svg",Object(B.a)({className:N()("".concat(I,"-circle"),q),viewBox:"".concat(-m/2," ").concat(-m/2," ").concat(m," ").concat(m),style:z,id:P,role:"presentation"},ce),J&&X.createElement("defs",null,X.createElement("linearGradient",{id:me,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(J).sort(function(ye,Te){return h(ye)-h(Te)}).map(function(ye,Te){return X.createElement("stop",{key:Te,offset:ye,stopColor:J[ye]})}))),!ge&&X.createElement("circle",{className:"".concat(I,"-circle-trail"),r:be,cx:0,cy:0,stroke:p,strokeLinecap:U,strokeWidth:g||k,style:Ce}),ge?le():pe())},R=x,O={Line:l,Circle:R}},"8EBN":function(W,ee,L){(function(B){B(L("VrN/"))})(function(B){"use strict";B.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 M=0;M<B.modeInfo.length;M++){var G=B.modeInfo[M];G.mimes&&(G.mime=G.mimes[0])}B.findModeByMIME=function(X){X=X.toLowerCase();for(var K=0;K<B.modeInfo.length;K++){var N=B.modeInfo[K];if(N.mime==X)return N;if(N.mimes){for(var i=0;i<N.mimes.length;i++)if(N.mimes[i]==X)return N}}if(/\+xml$/.test(X))return B.findModeByMIME("application/xml");if(/\+json$/.test(X))return B.findModeByMIME("application/json")},B.findModeByExtension=function(X){X=X.toLowerCase();for(var K=0;K<B.modeInfo.length;K++){var N=B.modeInfo[K];if(N.ext){for(var i=0;i<N.ext.length;i++)if(N.ext[i]==X)return N}}},B.findModeByFileName=function(X){for(var K=0;K<B.modeInfo.length;K++){var N=B.modeInfo[K];if(N.file&&N.file.test(X))return N}var i=X.lastIndexOf("."),T=i>-1&&X.substring(i+1,X.length);if(T)return B.findModeByExtension(T)},B.findModeByName=function(X){X=X.toLowerCase();for(var K=0;K<B.modeInfo.length;K++){var N=B.modeInfo[K];if(N.name.toLowerCase()==X)return N;if(N.alias){for(var i=0;i<N.alias.length;i++)if(N.alias[i].toLowerCase()==X)return N}}}})},"8HAY":function(W,ee,L){"use strict";L.d(ee,"a",function(){return K}),L.d(ee,"b",function(){return N}),L.d(ee,"d",function(){return i}),L.d(ee,"e",function(){return T}),L.d(ee,"c",function(){return e});var B=L("MI8n"),M=L("pmY6"),G=L("3/fG"),X=function(E,l,_,r){function n(o){return o instanceof _?o:new _(function(c){c(o)})}return new(_||(_=Promise))(function(o,c){function v(h){try{y(r.next(h))}catch(b){c(b)}}function f(h){try{y(r.throw(h))}catch(b){c(b)}}function y(h){h.done?o(h.value):n(h.value).then(v,f)}y((r=r.apply(E,l||[])).next())})};class K extends M.a{constructor(E,l="",_="",r=!0,n){super();this._onDidChange=this._register(new B.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=E,this._label=l,this._cssClass=_,this._enabled=r,this._actionCallback=n}get id(){return this._id}get label(){return this._label}set label(E){this._setLabel(E)}_setLabel(E){this._label!==E&&(this._label=E,this._onDidChange.fire({label:E}))}get tooltip(){return this._tooltip||""}set tooltip(E){this._setTooltip(E)}_setTooltip(E){this._tooltip!==E&&(this._tooltip=E,this._onDidChange.fire({tooltip:E}))}get class(){return this._cssClass}set class(E){this._setClass(E)}_setClass(E){this._cssClass!==E&&(this._cssClass=E,this._onDidChange.fire({class:E}))}get enabled(){return this._enabled}set enabled(E){this._setEnabled(E)}_setEnabled(E){this._enabled!==E&&(this._enabled=E,this._onDidChange.fire({enabled:E}))}get checked(){return this._checked}set checked(E){this._setChecked(E)}_setChecked(E){this._checked!==E&&(this._checked=E,this._onDidChange.fire({checked:E}))}run(E,l){return X(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(E))})}}class N extends M.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new B.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new B.b),this.onDidRun=this._onDidRun.event}run(E,l){return X(this,void 0,void 0,function*(){if(!E.enabled)return;this._onBeforeRun.fire({action:E});let _;try{yield this.runAction(E,l)}catch(r){_=r}this._onDidRun.fire({action:E,error:_})})}runAction(E,l){return X(this,void 0,void 0,function*(){yield E.run(l)})}}class i extends K{constructor(E){super(i.ID,E,E?"separator text":"separator");this.checked=!1,this.enabled=!1}}i.ID="vs.actions.separator";class T{constructor(E,l,_,r){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=E,this.label=l,this.class=r,this._actions=_}get actions(){return this._actions}dispose(){}run(){return X(this,void 0,void 0,function*(){})}}class e extends K{constructor(){super(e.ID,G.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8hTe":function(W,ee,L){W.exports={button:"button___1wy9m"}},"9Bee":function(W,ee,L){"use strict";var B=L("CDKA"),M=L("d7ih"),G=L("dLI4"),X=L("4d5L"),K=L("YaWb"),N=L("IYef"),i=L("Hqw+"),T=L("XXmO"),e=L.n(T),E=L("T/Jt"),l=L.n(E),_=L("vg9a"),r=L("7O0G"),n=L.n(r),o=L("GcTH");function c(ue,V){var Y=ue.match(/^(\s+)(?:```)/);if(Y===null)return V;var ie=Y[1];return V.split(`
|
|
|
`).map(function(Ee){var oe=Ee.match(/^\s+/);if(oe===null)return Ee;var Fe=Object(i.a)(oe,1),tt=Fe[0];return tt.length>=ie.length?Ee.slice(ie.length):Ee}).join(`
|
|
|
`)}var v=[],f=["<ul>"],y=new n.a.Renderer,h=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){v.length=0,f=["<ul>"]}var m={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function d(ue,V,Y,ie){if(V>=ue.length||ue[V].level<=Y)return V;var Ee=ue[V];ie.push("<li><a href='#"+Ee.anchor+"'>"+Ee.text+"</a>"),V++;var oe=[];return V=d(ue,V,Ee.level,oe),oe.length>0&&(ie.push("<ul>"),oe.forEach(function(Fe){ie.push(Fe)}),ie.push("</ul>")),ie.push("</li>"),V=d(ue,V,Y,ie),V}function x(){return d(v,0,0,f),f.push("</ul>"),f.join("")}var R={heading:function(V){var Y=h.exec(V);if(Y)return{type:"heading",raw:Y[0],depth:Y[1].length,text:Y[2]}},fences:function(V){var Y=this.rules.block.fences.exec(V);if(Y){var ie=Y[0],Ee=c(ie,Y[3]||""),oe=Y[2]?Y[2].trim():Y[2];if(["latex","katex","math"].indexOf(oe)>=0){var Fe=D(),tt=Ee;Ee=Fe,A[Fe]={type:"block",expression:tt}}return{type:"code",raw:ie,lang:oe,text:Ee}}}},O=/(?:\${2})([^\n`]+?)(?:\${2})/gi,w=0,D=function(){return"__special_katext_id_".concat(w++,"__")},A={};function P(){return A}function I(){w=0,A={}}function u(ue){return ue=ue.replace(O,function(V,Y){var ie=D();return A[ie]={type:"inline",expression:Y},ie}),ue}var k=y.listitem;y.listitem=function(ue){return k(u(ue))};var g=y.paragraph;y.paragraph=function(ue){return g(u(ue))};var a=y.tablecell;y.tablecell=function(ue,V){return a(u(ue),V)},y.code=function(ue,V,Y){var ie=(V||"").match(/\S*/)[0];return ie?["latex","katex","math"].indexOf(ie)>=0?"<p class='editormd-tex'>".concat(ue,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(V,'">').concat(Y?ue:Object(o.escape)(ue,!0),`</code></pre>
|
|
|
`):'<pre class="prettyprint linenums"><code>'+(Y?ue:Object(o.escape)(ue,!0))+"</code></pre>"},y.heading=function(ue,V,Y){var ie=this.options.headerPrefix+Y.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return v.push({anchor:ie,level:V,text:ue}),"<h"+V+' id="'+ie+'">'+ue+"</h"+V+">"},n.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),n.a.use({tokenizer:R,renderer:y});var C=n.a,S=L("SJMd"),p=L("ulZh"),U=L.n(p),z=L("m3rI"),q=L("Oy/b"),$=L("p5ED"),re=L("ErOA");/*! *****************************************************************************
|
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
purpose with or without fee is hereby granted.
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
|
***************************************************************************** */var ce=function(ue,V){return(ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,ie){Y.__proto__=ie}||function(Y,ie){for(var Ee in ie)Object.prototype.hasOwnProperty.call(ie,Ee)&&(Y[Ee]=ie[Ee])})(ue,V)};function ne(ue,V){function Y(){this.constructor=ue}ce(ue,V),ue.prototype=V===null?Object.create(V):(Y.prototype=V.prototype,new Y)}function me(ue,V,Y,ie){return new(Y||(Y=Promise))(function(Ee,oe){function Fe(Ot){try{xt(ie.next(Ot))}catch(ut){oe(ut)}}function tt(Ot){try{xt(ie.throw(Ot))}catch(ut){oe(ut)}}function xt(Ot){var ut;Ot.done?Ee(Ot.value):(ut=Ot.value,ut instanceof Y?ut:new Y(function(Ft){Ft(ut)})).then(Fe,tt)}xt((ie=ie.apply(ue,V||[])).next())})}function be(ue,V){var Y,ie,Ee,oe,Fe={label:0,sent:function(){if(1&Ee[0])throw Ee[1];return Ee[1]},trys:[],ops:[]};return oe={next:tt(0),throw:tt(1),return:tt(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function tt(xt){return function(Ot){return function(ut){if(Y)throw new TypeError("Generator is already executing.");for(;Fe;)try{if(Y=1,ie&&(Ee=2&ut[0]?ie.return:ut[0]?ie.throw||((Ee=ie.return)&&Ee.call(ie),0):ie.next)&&!(Ee=Ee.call(ie,ut[1])).done)return Ee;switch(ie=0,Ee&&(ut=[2&ut[0],Ee.value]),ut[0]){case 0:case 1:Ee=ut;break;case 4:return Fe.label++,{value:ut[1],done:!1};case 5:Fe.label++,ie=ut[1],ut=[0];continue;case 7:ut=Fe.ops.pop(),Fe.trys.pop();continue;default:if(!(Ee=Fe.trys,(Ee=Ee.length>0&&Ee[Ee.length-1])||ut[0]!==6&&ut[0]!==2)){Fe=0;continue}if(ut[0]===3&&(!Ee||ut[1]>Ee[0]&&ut[1]<Ee[3])){Fe.label=ut[1];break}if(ut[0]===6&&Fe.label<Ee[1]){Fe.label=Ee[1],Ee=ut;break}if(Ee&&Fe.label<Ee[2]){Fe.label=Ee[2],Fe.ops.push(ut);break}Ee[2]&&Fe.ops.pop(),Fe.trys.pop();continue}ut=V.call(ue,Fe)}catch(Ft){ut=[6,Ft],ie=0}finally{Y=Ee=0}if(5&ut[0])throw ut[1];return{value:ut[0]?ut[1]:void 0,done:!0}}([xt,Ot])}}}function he(){for(var ue=0,V=0,Y=arguments.length;V<Y;V++)ue+=arguments[V].length;var ie=Array(ue),Ee=0;for(V=0;V<Y;V++)for(var oe=arguments[V],Fe=0,tt=oe.length;Fe<tt;Fe++,Ee++)ie[Ee]=oe[Fe];return ie}var se=function(){function ue(){}return ue.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ue.setAttributes=function(V,Y){for(var ie=0,Ee=Y;ie<Ee.length;ie++){var oe=Ee[ie],Fe=oe[0],tt=oe[1];V.setAttribute(Fe,tt)}},ue.createRect=function(V,Y,ie){var Ee=document.createElementNS("http://www.w3.org/2000/svg","rect");return Ee.setAttribute("width",V.toString()),Ee.setAttribute("height",Y.toString()),ie&&ue.setAttributes(Ee,ie),Ee},ue.createLine=function(V,Y,ie,Ee,oe){var Fe=document.createElementNS("http://www.w3.org/2000/svg","line");return Fe.setAttribute("x1",V.toString()),Fe.setAttribute("y1",Y.toString()),Fe.setAttribute("x2",ie.toString()),Fe.setAttribute("y2",Ee.toString()),oe&&ue.setAttributes(Fe,oe),Fe},ue.createPolygon=function(V,Y){var ie=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ie.setAttribute("points",V),Y&&ue.setAttributes(ie,Y),ie},ue.createCircle=function(V,Y){var ie=document.createElementNS("http://www.w3.org/2000/svg","circle");return ie.setAttribute("cx",(V/2).toString()),ie.setAttribute("cy",(V/2).toString()),ie.setAttribute("r",V.toString()),Y&&ue.setAttributes(ie,Y),ie},ue.createEllipse=function(V,Y,ie){var Ee=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Ee.setAttribute("cx",(V/2).toString()),Ee.setAttribute("cy",(Y/2).toString()),Ee.setAttribute("rx",(V/2).toString()),Ee.setAttribute("ry",(Y/2).toString()),ie&&ue.setAttributes(Ee,ie),Ee},ue.createGroup=function(V){var Y=document.createElementNS("http://www.w3.org/2000/svg","g");return V&&ue.setAttributes(Y,V),Y},ue.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ue.createMarker=function(V,Y,ie,Ee,oe,Fe,tt){var xt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ue.setAttributes(xt,[["id",V],["orient",Y],["markerWidth",ie.toString()],["markerHeight",Ee.toString()],["refX",oe.toString()],["refY",Fe.toString()]]),xt.appendChild(tt),xt},ue.createText=function(V){var Y=document.createElementNS("http://www.w3.org/2000/svg","text");return Y.setAttribute("x","0"),Y.setAttribute("y","0"),V&&ue.setAttributes(Y,V),Y},ue.createTSpan=function(V,Y){var ie=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ie.textContent=V,Y&&ue.setAttributes(ie,Y),ie},ue.createImage=function(V){var Y=document.createElementNS("http://www.w3.org/2000/svg","image");return V&&ue.setAttributes(Y,V),Y},ue.createPoint=function(V,Y){var ie=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ie.x=V,ie.y=Y,ie},ue.createPath=function(V,Y){var ie=document.createElementNS("http://www.w3.org/2000/svg","path");return ie.setAttribute("d",V),Y&&ue.setAttributes(ie,Y),ie},ue}(),_e=function(){function ue(){}return ue.addKey=function(V){ue.key=V},Object.defineProperty(ue,"isLicensed",{get:function(){return!!ue.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ue.key)},enumerable:!1,configurable:!0}),ue}(),De=function(){function ue(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ue.prototype.rasterize=function(V,Y,ie){var Ee=this;return new Promise(function(oe){var Fe=ie!==void 0?ie:document.createElement("canvas");V===null&&(Ee.markersOnly=!0,Ee.naturalSize=!1);var tt=document.createElementNS("http://www.w3.org/2000/svg","svg");tt.setAttribute("xmlns","http://www.w3.org/2000/svg"),tt.setAttribute("width",Y.width.baseVal.valueAsString),tt.setAttribute("height",Y.height.baseVal.valueAsString),tt.setAttribute("viewBox","0 0 "+Y.viewBox.baseVal.width.toString()+" "+Y.viewBox.baseVal.height.toString()),tt.innerHTML=Y.innerHTML,Ee.naturalSize===!0?(tt.width.baseVal.value=V.naturalWidth,tt.height.baseVal.value=V.naturalHeight):Ee.width!==void 0&&Ee.height!==void 0&&(tt.width.baseVal.value=Ee.width,tt.height.baseVal.value=Ee.height),Fe.width=tt.width.baseVal.value,Fe.height=tt.height.baseVal.value;var xt=tt.outerHTML,Ot=Fe.getContext("2d");Ee.markersOnly!==!0&&Ot.drawImage(V,0,0,Fe.width,Fe.height);var ut=window.URL,Ft=new Image(Fe.width,Fe.height);Ft.setAttribute("crossOrigin","anonymous");var Xt=new Blob([xt],{type:"image/svg+xml"}),er=ut.createObjectURL(Xt);Ft.onload=function(){Ot.drawImage(Ft,0,0),ut.revokeObjectURL(er);var nr=Fe.toDataURL(Ee.imageType,Ee.imageQuality);oe(nr)},Ft.src=er})},ue}(),ge=function(){},fe=function(){function ue(V){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+V+"_"}return Object.defineProperty(ue.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ue.prototype.addClass=function(V){return this.styleSheet===void 0&&this.addStyleSheet(),V.name=""+this.classNamePrefix+V.localName,this.classes.push(V),this.styleSheet.sheet.insertRule("."+V.name+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length),V},ue.prototype.addRule=function(V){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(V),this.styleSheet.sheet.insertRule(V.selector+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length)},ue.prototype.addStyleSheet=function(){var V;this.styleSheet=document.createElement("style"),((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).appendChild(this.styleSheet),this.addRule(new Ce("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ce("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new Ce("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new ae("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new ae("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},ue.prototype.removeStyleSheet=function(){var V;this.styleSheet&&(((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ue}(),Ce=function(ue,V){this.selector=ue,this.style=V},ae=function(ue,V){this.localName=ue,this.style=V},Q=function(){function ue(V,Y,ie,Ee,oe){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=V,this.displayMode=Y,this.markerItems=ie,this.uiStyleSettings=Ee,this.styles=oe,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ue.prototype.show=function(V){var Y=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=V,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var ie=document.createElement("div");ie.className=this.toolbarBlockStyleClass.name,ie.style.whiteSpace="nowrap",this.uiContainer.appendChild(ie),this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select","Select mode"),this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete","Delete marker"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear","Delete all markers"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo","Undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo","Redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom","Zoom in"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out","Zoom out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes","Notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(oe){var Fe=document.createElement("div");Fe.className=""+Y.toolbarButtonStyleClass.name,Fe.setAttribute("data-type-name",oe.typeName),Fe.setAttribute("aria-label",oe.title),Fe.setAttribute("title",oe.title),Fe.innerHTML=oe.icon,Fe.addEventListener("click",function(){Y.markerToolbarButtonClicked(Fe,oe)}),Y.buttons.push(Fe),Y.markerButtons.push(Fe)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var Ee=document.createElement("div");Ee.className=this.toolbarBlockStyleClass.name,Ee.style.whiteSpace="nowrap",Ee.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Ee),this.addActionButton(Ee,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render","Save and close"),this.addActionButton(Ee,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close","Close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},ue.prototype.addButtonClickListener=function(V){this.buttonClickListeners.push(V)},ue.prototype.removeButtonClickListener=function(V){this.buttonClickListeners.indexOf(V)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(V),1)},ue.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ue.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var V=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Y=0;Y<this.markerButtons.length;Y++)Y<V||Y===V&&this.markerButtons.length-1===V?this.markerButtonBlock.appendChild(this.markerButtons[Y]):(Y===V&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Y]))}},ue.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},ue.prototype.resetButtonStyles=function(){var V=this;this.buttons.forEach(function(Y){Y.className=Y.className.replace(V.uiStyleSettings.toolbarButtonStyleColorsClassName?V.uiStyleSettings.toolbarButtonStyleColorsClassName:V.toolbarButtonStyleColorsClass.name,"").trim(),Y.className=Y.className.replace(V.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?V.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:V.toolbarActiveButtonStyleColorsClass.name,"").trim(),Y.className+=" "+(V.uiStyleSettings.toolbarButtonStyleColorsClassName?V.uiStyleSettings.toolbarButtonStyleColorsClassName:V.toolbarButtonStyleColorsClass.name)})},ue.prototype.addActionButton=function(V,Y,ie,Ee){var oe=this,Fe=document.createElement("div");switch(Fe.className=""+this.toolbarButtonStyleClass.name,Fe.innerHTML=Y,Fe.setAttribute("role","button"),Fe.setAttribute("data-action",ie),Fe.title=Ee,Fe.setAttribute("aria-label",Ee),Fe.addEventListener("click",function(){oe.actionToolbarButtonClicked(Fe,ie)}),ie){case"select":Fe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Fe.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Fe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Fe.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Fe.style.fill=this.uiStyleSettings.closeButtonColor}V.appendChild(Fe),this.buttons.push(Fe)},ue.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ae("toolbar",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new ae("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ae("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ae("toolbar-overflow-block",`
|
|
|
position: absolute;
|
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
z-index: 10;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new ae("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var V=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ae("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*V)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*V)+`px;
|
|
|
padding: `+V+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ae("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ae("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Ce("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new Ce("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},ue.prototype.markerToolbarButtonClicked=function(V,Y){this.setActiveButton(V),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("marker",Y)}),this.markerButtonOverflowBlock.style.display="none"},ue.prototype.actionToolbarButtonClicked=function(V,Y){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("action",Y)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ue.prototype.setActiveButton=function(V){this.resetButtonStyles(),V.className=V.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),V.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ue.prototype.setActiveMarkerButton=function(V){var Y=this.markerButtons.find(function(ie){return ie.getAttribute("data-type-name")===V});Y&&this.setActiveButton(Y)},ue.prototype.setCurrentMarker=function(V){var Y=this;this.currentMarker=V,this.buttons.filter(function(ie){return/delete|notes/.test(ie.getAttribute("data-action"))}).forEach(function(ie){Y.currentMarker===void 0?(ie.style.fillOpacity="0.4",ie.style.pointerEvents="none"):(ie.style.fillOpacity="1",ie.style.pointerEvents="all")})},ue}(),J=function(){function ue(V,Y,ie,Ee){this.panels=[],this.panelButtons=[],this.markerjsContainer=V,this.displayMode=Y,this.uiStyleSettings=ie,this.styles=Ee,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ue.prototype.addStyles=function(){var V;this.toolboxStyleClass=this.styles.addClass(new ae("toolbox",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
font-family: sans-serif;
|
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new ae("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var Y=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ae("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ae("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ae("toolbox-panel-row",`
|
|
|
display: flex;
|
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
cursor: default;
|
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new ae("toolbox-panel-row_colors",`
|
|
|
background-color: `+((V=this.uiStyleSettings.toolboxBackgroundColor)!==null&&V!==void 0?V:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ae("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Y)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Y)+`px;
|
|
|
padding: `+Y+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ae("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ae("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new Ce("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Ce("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new Ce("."+this.toolboxPanelRowStyleClass.name+" > div",`
|
|
|
scrollbar-width: thin;
|
|
|
`)),this.styles.addRule(new Ce("."+this.toolboxPanelRowStyleClass.name+" > div::-webkit-scrollbar",`
|
|
|
height: 10px;
|
|
|
width: 10px;
|
|
|
`)),this.styles.addRule(new Ce("."+this.toolboxPanelRowStyleClass.name+" > div::-webkit-scrollbar-track",`
|
|
|
background-color: transparent;
|
|
|
`)),this.styles.addRule(new Ce("."+this.toolboxPanelRowStyleClass.name+" > div::-webkit-scrollbar-thumb",`
|
|
|
background-color: #444;
|
|
|
border-radius: 20px;
|
|
|
border: 2px solid #aaa;
|
|
|
`))},ue.prototype.show=function(V){var Y;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=V,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Y=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Y!==void 0?Y:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ue.prototype.setPanelButtons=function(V){var Y,ie,Ee=this;this.panels=V,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Y=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Y!==void 0?Y:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ie=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ie!==void 0?ie:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(oe){var Fe;oe.uiStyleSettings=Ee.uiStyleSettings;var tt=document.createElement("div");tt.className=Ee.toolboxButtonStyleClass.name+" "+((Fe=Ee.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Fe!==void 0?Fe:Ee.toolboxButtonStyleColorsClass.name),tt.innerHTML=oe.icon,tt.title=oe.title,tt.setAttribute("role","button"),tt.setAttribute("aria-label",oe.title),oe.id&&tt.setAttribute("data-action",oe.id),tt.addEventListener("click",function(){Ee.panelButtonClick(oe)}),Ee.panelButtons.push(tt),Ee.buttonRow.appendChild(tt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ue.prototype.panelButtonClick=function(V){var Y=this,ie=-1;if(V!==this.activePanel){ie=this.panels.indexOf(V),this.panelRow.innerHTML="";var Ee=V.getUi();Ee.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Ee),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=V}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Y.displayMode==="inline"?Y.panelRow.style.display="none":Y.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(oe,Fe){var tt,xt;oe.className=Y.toolboxButtonStyleClass.name+" "+(Fe===ie?""+((tt=Y.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&tt!==void 0?tt:Y.toolboxActiveButtonStyleColorsClass.name):""+((xt=Y.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&xt!==void 0?xt:Y.toolboxButtonStyleColorsClass.name))})},ue}(),Z=function(){function ue(V,Y,ie){this.title=V,this.icon=Y,this._id=ie}return Object.defineProperty(ue.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),ue}(),pe=function(ue){function V(Y,ie,Ee,oe,Fe){var tt=ue.call(this,Y,oe||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>',Fe||"color-picker-panel")||this;return tt.colors=[],tt.addTransparent=!1,tt.colorBoxes=[],tt.colors=ie,tt.currentColor=Ee,tt.setCurrentColor=tt.setCurrentColor.bind(tt),tt.getColorBox=tt.getColorBox.bind(tt),tt}return ne(V,ue),V.prototype.getUi=function(){var Y=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.overflowX="auto",ie.style.whiteSpace="nowrap",this.colors.forEach(function(Ee){var oe=Y.getColorBox(Ee);ie.appendChild(oe),Y.colorBoxes.push(oe)}),ie},V.prototype.getColorBox=function(Y){var ie=this,Ee=this.uiStyleSettings.toolbarHeight/4,oe=this.uiStyleSettings.toolbarHeight-Ee,Fe=document.createElement("div");Fe.style.display="inline-block",Fe.style.boxSizing="content-box",Fe.style.width=oe-2+"px",Fe.style.height=oe-2+"px",Fe.style.padding="1px",Fe.style.marginRight="2px",Fe.style.marginBottom="2px",Fe.style.borderWidth="2px",Fe.style.borderStyle="solid",Fe.style.borderRadius=(oe+2)/2+"px",Fe.style.borderColor=Y===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Fe.addEventListener("click",function(){ie.setCurrentColor(Y,Fe)});var tt=document.createElement("div");return tt.style.display="inline-block",tt.style.width=oe-2+"px",tt.style.height=oe-2+"px",tt.style.backgroundColor=Y,tt.style.borderRadius=oe/2+"px",Y==="transparent"&&(tt.style.fill=this.uiStyleSettings.toolboxAccentColor,tt.innerHTML=`<svg viewBox="0 0 24 24">
|
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
|
</svg>`),Fe.appendChild(tt),Fe},V.prototype.setCurrentColor=function(Y,ie){var Ee=this;this.currentColor=Y,this.colorBoxes.forEach(function(oe){oe.style.borderColor=oe===ie?Ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Y)},V}(Z),le=function(){function ue(V,Y,ie){this._state="new",this._isSelected=!1,this._container=V,this._overlayContainer=Y,this.globalSettings=ie,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ue.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ue.prototype.ownsTarget=function(V){return!1},Object.defineProperty(ue.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ue.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ue.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ue.prototype.pointerDown=function(V,Y){},ue.prototype.dblClick=function(V,Y){},ue.prototype.manipulate=function(V){},ue.prototype.pointerUp=function(V){this.stateChanged()},ue.prototype.dispose=function(){},ue.prototype.addMarkerVisualToContainer=function(V){this.container.childNodes.length>0?this.container.insertBefore(V,this.container.childNodes[0]):this.container.appendChild(V)},ue.prototype.getState=function(){return{typeName:ue.typeName,state:this.state,notes:this.notes}},ue.prototype.restoreState=function(V){this._state=V.state,this.notes=V.notes},ue.prototype.scale=function(V,Y){},ue.prototype.colorChanged=function(V){this.onColorChanged&&this.onColorChanged(V),this.stateChanged()},ue.prototype.fillColorChanged=function(V){this.onFillColorChanged&&this.onFillColorChanged(V),this.stateChanged()},ue.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var V=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),V.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(V)&&this.onStateChanged(this)}},ue.typeName="MarkerBase",ue}(),ye=function(){function ue(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ue.prototype.findGripByVisual=function(V){return this.topLeft.ownsTarget(V)?this.topLeft:this.topCenter.ownsTarget(V)?this.topCenter:this.topRight.ownsTarget(V)?this.topRight:this.centerLeft.ownsTarget(V)?this.centerLeft:this.centerRight.ownsTarget(V)?this.centerRight:this.bottomLeft.ownsTarget(V)?this.bottomLeft:this.bottomCenter.ownsTarget(V)?this.bottomCenter:this.bottomRight.ownsTarget(V)?this.bottomRight:void 0},ue}(),Te=function(){function ue(){this.GRIP_SIZE=10,this.visual=se.createGroup(),this.visual.appendChild(se.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(se.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ue.prototype.ownsTarget=function(V){return V===this.visual||V===this.visual.childNodes[0]||V===this.visual.childNodes[1]},ue}(),Pe=function(){function ue(){}return ue.toITransformMatrix=function(V){return{a:V.a,b:V.b,c:V.c,d:V.d,e:V.e,f:V.f}},ue.toSVGMatrix=function(V,Y){return V.a=Y.a,V.b=Y.b,V.c=Y.c,V.d=Y.d,V.e=Y.e,V.f=Y.f,V},ue}(),He=function(ue){function V(Y,ie,Ee){var oe=ue.call(this,Y,ie,Ee)||this;return oe.left=0,oe.top=0,oe.width=0,oe.height=0,oe.defaultSize={x:50,y:20},oe.offsetX=0,oe.offsetY=0,oe.rotationAngle=0,oe.CB_DISTANCE=10,oe._suppressMarkerCreateEvent=!1,oe.container.transform.baseVal.appendItem(se.createTransform()),oe.setupControlBox(),oe}return ne(V,ue),Object.defineProperty(V.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"visual",{get:function(){return this._visual},set:function(Y){this._visual=Y;var ie=se.createTransform();this._visual.transform.baseVal.appendItem(ie)},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function(Y){return!!ue.prototype.ownsTarget.call(this,Y)||!!(this.controlGrips.findGripByVisual(Y)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Y))},V.prototype.pointerDown=function(Y,ie){ue.prototype.pointerDown.call(this,Y,ie),this.state==="new"&&(this.left=Y.x,this.top=Y.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Ee=this.unrotatePoint(Y);if(this.manipulationStartX=Ee.x,this.manipulationStartY=Ee.y,this.offsetX=Ee.x-this.left,this.offsetY=Ee.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ie),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ie)){this.activeGrip=this.rotatorGrip;var oe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=oe.x-this.width/2,this.top=oe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Fe=this.container.transform.baseVal.getItem(0);Fe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Fe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},V.prototype.pointerUp=function(Y){var ie=this.state;ue.prototype.pointerUp.call(this,Y),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Y),this._state="select",ie==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},V.prototype.moveVisual=function(Y){this.visual.style.transform="translate("+Y.x+"px, "+Y.y+"px)"},V.prototype.manipulate=function(Y){var ie=this.unrotatePoint(Y);this.state==="creating"?this.resize(Y):this.state==="move"?(this.left=this.manipulationStartLeft+(ie.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ie.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ie):this.state==="rotate"&&this.rotate(Y)},V.prototype.resize=function(Y){var ie=this.manipulationStartLeft,Ee=this.manipulationStartWidth,oe=this.manipulationStartTop,Fe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ie=this.manipulationStartLeft+Y.x-this.manipulationStartX,Ee=this.manipulationStartWidth+this.manipulationStartLeft-ie;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Ee=this.manipulationStartWidth+Y.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:oe=this.manipulationStartTop+Y.y-this.manipulationStartY,Fe=this.manipulationStartHeight+this.manipulationStartTop-oe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Fe=this.manipulationStartHeight+Y.y-this.manipulationStartY}Ee>=0?(this.left=ie,this.width=Ee):(this.left=ie+Ee,this.width=-Ee),Fe>=0?(this.top=oe,this.height=Fe):(this.top=oe+Fe,this.height=-Fe),this.setSize()},V.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},V.prototype.rotate=function(Y){if(Math.abs(Y.x-this.centerX)>.1){var ie=Math.sign(Y.x-this.centerX);this.rotationAngle=180*Math.atan((Y.y-this.centerY)/(Y.x-this.centerX))/Math.PI+90*ie,this.applyRotation()}},V.prototype.applyRotation=function(){var Y=this.container.transform.baseVal.getItem(0);Y.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Y,0)},V.prototype.rotatePoint=function(Y){if(this.rotationAngle===0)return Y;var ie=this.container.getCTM(),Ee=se.createPoint(Y.x,Y.y);return{x:(Ee=Ee.matrixTransform(ie)).x,y:Ee.y}},V.prototype.unrotatePoint=function(Y){if(this.rotationAngle===0)return Y;var ie=this.container.getCTM();ie=ie.inverse();var Ee=se.createPoint(Y.x,Y.y);return{x:(Ee=Ee.matrixTransform(ie)).x,y:Ee.y}},V.prototype.select=function(){ue.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){ue.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=se.createGroup();var Y=se.createTransform();Y.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Y),this.container.appendChild(this.controlBox),this.controlRect=se.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=se.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new ye,this.addControlGrips(),this.controlBox.style.display="none"},V.prototype.adjustControlBox=function(){var Y=this.controlBox.transform.baseVal.getItem(0);Y.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Y,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},V.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},V.prototype.createGrip=function(){var Y=new Te;return Y.visual.transform.baseVal.appendItem(se.createTransform()),this.controlBox.appendChild(Y.visual),Y},V.prototype.positionGrips=function(){var Y=this.controlGrips.topLeft.GRIP_SIZE,ie=-Y/2,Ee=ie,oe=(this.width+this.CB_DISTANCE)/2-Y/2,Fe=(this.height+this.CB_DISTANCE)/2-Y/2,tt=this.height+this.CB_DISTANCE-Y/2,xt=this.width+this.CB_DISTANCE-Y/2;this.positionGrip(this.controlGrips.topLeft.visual,ie,Ee),this.positionGrip(this.controlGrips.topCenter.visual,oe,Ee),this.positionGrip(this.controlGrips.topRight.visual,xt,Ee),this.positionGrip(this.controlGrips.centerLeft.visual,ie,Fe),this.positionGrip(this.controlGrips.centerRight.visual,xt,Fe),this.positionGrip(this.controlGrips.bottomLeft.visual,ie,tt),this.positionGrip(this.controlGrips.bottomCenter.visual,oe,tt),this.positionGrip(this.controlGrips.bottomRight.visual,xt,tt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,oe,Ee-3*this.CB_DISTANCE)},V.prototype.positionGrip=function(Y,ie,Ee){var oe=Y.transform.baseVal.getItem(0);oe.setTranslate(ie,Ee),Y.transform.baseVal.replaceItem(oe,0)},V.prototype.hideControlBox=function(){this.controlBox.style.display="none"},V.prototype.showControlBox=function(){this.controlBox.style.display=""},V.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Pe.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Pe.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ue.prototype.getState.call(this))},V.prototype.restoreState=function(Y){ue.prototype.restoreState.call(this,Y);var ie=Y;this.left=ie.left,this.top=ie.top,this.width=ie.width,this.height=ie.height,this.rotationAngle=ie.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Pe.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ie.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Pe.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ie.containerTransformMatrix))},V.prototype.scale=function(Y,ie){ue.prototype.scale.call(this,Y,ie);var Ee=this.rotatePoint({x:this.left,y:this.top}),oe=this.unrotatePoint({x:Ee.x*Y,y:Ee.y*ie});this.left=oe.x,this.top=oe.y,this.width=this.width*Y,this.height=this.height*ie,this.adjustControlBox()},V}(le),Oe=function(ue){function V(Y,ie,Ee){var oe=ue.call(this,Y,ie,Ee)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe}return ne(V,ue),V.prototype.ownsTarget=function(Y){return!(!ue.prototype.ownsTarget.call(this,Y)&&Y!==this.visual)},V.prototype.createVisual=function(){this.visual=se.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function(Y,ie){ue.prototype.pointerDown.call(this,Y,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},V.prototype.manipulate=function(Y){ue.prototype.manipulate.call(this,Y)},V.prototype.resize=function(Y){ue.prototype.resize.call(this,Y),this.setSize()},V.prototype.setSize=function(){ue.prototype.setSize.call(this),se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function(Y){ue.prototype.pointerUp.call(this,Y),this.setSize()},V.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.visual&&se.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Y),this.stateChanged()},V.prototype.setFillColor=function(Y){this.fillColor=Y,this.visual&&se.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},V.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.visual&&se.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.visual&&se.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},V.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ue.prototype.getState.call(this))},V.prototype.restoreState=function(Y){var ie=Y;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),ue.prototype.restoreState.call(this,Y),this.setSize()},V.prototype.scale=function(Y,ie){ue.prototype.scale.call(this,Y,ie),this.setSize()},V.title="Rectangle marker",V}(He),Ue=function(ue){function V(Y,ie,Ee,oe,Fe){var tt=ue.call(this,Y,oe||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>',Fe||"line-width-panel")||this;return tt.widths=[],tt.widthBoxes=[],tt.widths=ie,tt.currentWidth=Ee,tt.setCurrentWidth=tt.setCurrentWidth.bind(tt),tt}return ne(V,ue),V.prototype.getUi=function(){var Y=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.widths.forEach(function(Ee){var oe=document.createElement("div");oe.style.display="flex",oe.style.flexGrow="2",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=Ee===Y.currentWidth?Y.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){Y.setCurrentWidth(Ee,oe)}),ie.appendChild(oe);var Fe=document.createElement("div");Fe.innerText=Ee.toString(),Fe.style.marginRight="5px",oe.appendChild(Fe);var tt=document.createElement("div");tt.style.minHeight="20px",tt.style.flexGrow="2",tt.style.display="flex",tt.style.alignItems="center";var xt=document.createElement("hr");xt.style.minWidth="20px",xt.style.border="0px",xt.style.borderTop=Ee+"px solid "+Y.uiStyleSettings.toolboxColor,xt.style.flexGrow="2",tt.appendChild(xt),oe.appendChild(tt),Y.widthBoxes.push(oe)}),ie},V.prototype.setCurrentWidth=function(Y,ie){var Ee=this;this.currentWidth=Y,this.widthBoxes.forEach(function(oe){oe.style.borderColor=oe===ie?Ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},V}(Z),je=function(ue){function V(Y,ie,Ee,oe,Fe){var tt=ue.call(this,Y,oe||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>',Fe||"line-style-panel")||this;return tt.styles=[],tt.styleBoxes=[],tt.styles=ie,tt.currentStyle=Ee,tt.setCurrentStyle=tt.setCurrentStyle.bind(tt),tt}return ne(V,ue),V.prototype.getUi=function(){var Y=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.styles.forEach(function(Ee){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/Y.styles.length-5+"%",oe.style.borderColor=Ee===Y.currentStyle?Y.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){Y.setCurrentStyle(Ee,oe)}),ie.appendChild(oe);var Fe=document.createElement("div");Fe.style.minHeight="20px",Fe.style.flexGrow="2",Fe.style.overflow="hidden";var tt=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Y.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Ee!==""?'stroke-dasharray="'+Ee+'"':"")+` />
|
|
|
</svg>`;Fe.innerHTML=tt,oe.appendChild(Fe),Y.styleBoxes.push(oe)}),ie},V.prototype.setCurrentStyle=function(Y,ie){var Ee=this;this.currentStyle=Y,this.styleBoxes.forEach(function(oe){oe.style.borderColor=oe===ie?Ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},V}(Z),Ve=function(ue){function V(Y,ie,Ee){var oe=ue.call(this,Y,ie,Ee)||this;return oe.strokeColor=Ee.defaultColor,oe.strokeWidth=Ee.defaultStrokeWidth,oe.strokeDasharray=Ee.defaultStrokeDasharray,oe.strokePanel=new pe("Line color",Ee.defaultColorSet,Ee.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new Ue("Line width",Ee.defaultStrokeWidths,Ee.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new je("Line style",Ee.defaultStrokeDasharrays,Ee.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return ne(V,ue),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=ue.prototype.getState.call(this);return Y.typeName=V.typeName,Y},V.typeName="FrameMarker",V.title="Frame marker",V.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',V}(Oe),Re=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text",this.wrapText=!1,this.defaultText="Your text here"},Xe=function(ue){function V(Y,ie,Ee){var oe=ue.call(this,Y,ie,Ee)||this;return oe.x1=0,oe.y1=0,oe.x2=0,oe.y2=0,oe.defaultLength=50,oe.manipulationStartX=0,oe.manipulationStartY=0,oe.manipulationStartX1=0,oe.manipulationStartY1=0,oe.manipulationStartX2=0,oe.manipulationStartY2=0,oe.setupControlBox(),oe}return ne(V,ue),V.prototype.ownsTarget=function(Y){return!!ue.prototype.ownsTarget.call(this,Y)||!(!this.grip1.ownsTarget(Y)&&!this.grip2.ownsTarget(Y))},V.prototype.pointerDown=function(Y,ie){ue.prototype.pointerDown.call(this,Y,ie),this.manipulationStartX=Y.x,this.manipulationStartY=Y.y,this.state==="new"&&(this.x1=Y.x,this.y1=Y.y,this.x2=Y.x,this.y2=Y.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(ie)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ie)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},V.prototype.pointerUp=function(Y){var ie=this.state;ue.prototype.pointerUp.call(this,Y),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(Y),this._state="select",ie==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},V.prototype.adjustVisual=function(){},V.prototype.manipulate=function(Y){this.state==="creating"?this.resize(Y):this.state==="move"?(this.x1=this.manipulationStartX1+Y.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Y.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Y.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Y.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Y)},V.prototype.resize=function(Y){switch(this.activeGrip){case this.grip1:this.x1=Y.x,this.y1=Y.y;break;case this.grip2:case void 0:this.x2=Y.x,this.y2=Y.y}this.adjustVisual(),this.adjustControlBox()},V.prototype.select=function(){ue.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){ue.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=se.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},V.prototype.adjustControlBox=function(){this.positionGrips()},V.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},V.prototype.createGrip=function(){var Y=new Te;return Y.visual.transform.baseVal.appendItem(se.createTransform()),this.controlBox.appendChild(Y.visual),Y},V.prototype.positionGrips=function(){var Y=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Y/2,this.y1-Y/2),this.positionGrip(this.grip2.visual,this.x2-Y/2,this.y2-Y/2)},V.prototype.positionGrip=function(Y,ie,Ee){var oe=Y.transform.baseVal.getItem(0);oe.setTranslate(ie,Ee),Y.transform.baseVal.replaceItem(oe,0)},V.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ue.prototype.getState.call(this))},V.prototype.restoreState=function(Y){ue.prototype.restoreState.call(this,Y);var ie=Y;this.x1=ie.x1,this.y1=ie.y1,this.x2=ie.x2,this.y2=ie.y2},V.prototype.scale=function(Y,ie){ue.prototype.scale.call(this,Y,ie),this.x1=this.x1*Y,this.y1=this.y1*ie,this.x2=this.x2*Y,this.y2=this.y2*ie,this.adjustVisual(),this.adjustControlBox()},V}(le),Qe=function(ue){function V(Y,ie,Ee){var oe=ue.call(this,Y,ie,Ee)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.strokeColor=Ee.defaultColor,oe.strokeWidth=Ee.defaultStrokeWidth,oe.strokeDasharray=Ee.defaultStrokeDasharray,oe.strokePanel=new pe("Line color",Ee.defaultColorSet,Ee.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new Ue("Line width",Ee.defaultStrokeWidths,Ee.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new je("Line style",Ee.defaultStrokeDasharrays,Ee.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return ne(V,ue),V.prototype.ownsTarget=function(Y){return!(!ue.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.selectorLine&&Y!==this.visibleLine)},V.prototype.createVisual=function(){this.visual=se.createGroup(),this.selectorLine=se.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=se.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function(Y,ie){ue.prototype.pointerDown.call(this,Y,ie),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},V.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),se.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),se.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),se.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.adjustVisual(),this.colorChanged(Y)},V.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.adjustVisual()},V.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.adjustVisual(),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ue.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){ue.prototype.restoreState.call(this,Y);var ie=Y;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.createVisual(),this.adjustVisual()},V.typeName="LineMarker",V.title="Line marker",V.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',V}(Xe),We=function(ue){function V(Y,ie,Ee,oe,Fe){var tt=ue.call(this,Y,oe||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>',Fe||"font-family-panel")||this;return tt.fonts=[],tt.fontBoxes=[],tt.fonts=ie,tt.currentFont=Ee,tt.setCurrentFont=tt.setCurrentFont.bind(tt),tt}return ne(V,ue),V.prototype.getUi=function(){var Y=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.flexGrow="2",this.fonts.forEach(function(Ee){var oe=document.createElement("div");oe.style.display="inline-block",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/Y.fonts.length-5+"%",oe.style.borderColor=Ee===Y.currentFont?Y.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){Y.setCurrentFont(Ee,oe)}),ie.appendChild(oe);var Fe=document.createElement("div");Fe.style.display="flex",Fe.style.minHeight="20px",Fe.style.flexGrow="2",Fe.style.fontFamily=Ee,Fe.style.overflow="hidden";var tt=document.createElement("div");tt.style.whiteSpace="nowrap",tt.style.overflow="hidden",tt.style.textOverflow="ellipsis",tt.innerHTML="The quick brown fox jumps over the lazy dog",Fe.appendChild(tt),oe.appendChild(Fe),Y.fontBoxes.push(oe)}),ie},V.prototype.setCurrentFont=function(Y,ie){var Ee=this;this.currentFont=Y,this.fontBoxes.forEach(function(oe){oe.style.borderColor=oe===ie?Ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},V}(Z),ze=function(ue){function V(Y,ie,Ee){var oe,Fe=ue.call(this,Y,ie,Ee)||this;return Fe.color="transparent",Fe.padding=5,Fe.DEFAULT_TEXT="your text here",Fe.isMoved=!1,Fe.color=Ee.defaultColor,Fe.fontFamily=Ee.defaultFontFamily,Fe.text=(oe=Ee.defaultText)!==null&&oe!==void 0?oe:Fe.DEFAULT_TEXT,Fe.defaultSize={x:100,y:30},Fe.setColor=Fe.setColor.bind(Fe),Fe.setFont=Fe.setFont.bind(Fe),Fe.renderText=Fe.renderText.bind(Fe),Fe.sizeText=Fe.sizeText.bind(Fe),Fe.textEditDivClicked=Fe.textEditDivClicked.bind(Fe),Fe.showTextEditor=Fe.showTextEditor.bind(Fe),Fe.setSize=Fe.setSize.bind(Fe),Fe.positionTextEditor=Fe.positionTextEditor.bind(Fe),Fe.wrapText=Fe.wrapText.bind(Fe),Fe.colorPanel=new pe("Color",Ee.defaultColorSet,Ee.defaultColor),Fe.colorPanel.onColorChanged=Fe.setColor,Fe.fontFamilyPanel=new We("Font",Ee.defaultFontFamilies,Ee.defaultFontFamily),Fe.fontFamilyPanel.onFontChanged=Fe.setFont,Fe}return ne(V,ue),V.prototype.ownsTarget=function(Y){if(ue.prototype.ownsTarget.call(this,Y)||Y===this.visual||Y===this.textElement||Y===this.bgRectangle)return!0;var ie=!1;return this.textElement.childNodes.forEach(function(Ee){Ee===Y&&(ie=!0)}),ie},V.prototype.createVisual=function(){this.visual=se.createGroup(),this.bgRectangle=se.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=se.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(se.createTransform()),this.textElement.transform.baseVal.appendItem(se.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},V.prototype.pointerDown=function(Y,ie){ue.prototype.pointerDown.call(this,Y,ie),this.isMoved=!1,this.pointerDownPoint=Y,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},V.prototype.wrapText=function(){function Y(Ot){var ut=Ot[0].length;return Ot.forEach(function(Ft){Ft.length>ut&&(ut=Ft.length)}),.35*ut/Ot.length}if(this.text!==""){for(var ie=this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/),Ee=1*this.width/this.height,oe=new(Array.bind.apply(Array,he([void 0],ie))),Fe=Y(oe),tt=Number.MAX_VALUE,xt=function(){var Ot=oe[0];oe.forEach(function(ut){ut.length>Ot.length&&(Ot=ut)}),(tt=Ot.lastIndexOf(" ",tt-1))>0?(oe=[],ie.forEach(function(ut){for(var Ft=ut;Ft.length>tt;){var Xt=Ft.lastIndexOf(" ",tt);Xt<0&&(Xt=Ft.indexOf(" ")),Xt>0?(oe.push(Ft.substring(0,Xt)),Ft=Ft.substring(Xt).trim()):(oe.push(Ft),Ft="")}oe.push(Ft)}),Fe=Y(oe)):Fe=-1};Fe>Ee;)xt();return oe.join(`\r
|
|
|
`)}return this.text},V.prototype.renderText=function(){var Y=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);(this.globalSettings.wrapText?this.wrapText():this.text).split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(ie){Y.textElement.appendChild(se.createTSpan(ie.trim()===""?" ":ie.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},V.prototype.getTextScale=function(){var Y=this.textElement.getBBox(),ie=1;if(Y.width>0&&Y.height>0){var Ee=(1*this.width-this.width*this.padding*2/100)/Y.width,oe=(1*this.height-this.height*this.padding*2/100)/Y.height;ie=Math.min(Ee,oe)}return ie},V.prototype.getTextPosition=function(Y){var ie=window.getComputedStyle(this.textElement).direction==="rtl"?1:-1,Ee=this.textElement.getBBox(),oe=0,Fe=0;return Ee.width>0&&Ee.height>0&&(oe=(this.width+ie*Ee.width*Y)/2,Fe=this.height/2-Ee.height*Y/2),{x:oe,y:Fe}},V.prototype.sizeText=function(){var Y=this.textElement.getBBox(),ie=this.getTextScale(),Ee=this.getTextPosition(ie);Ee.y-=Y.y*ie,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Ee.x+"px, "+Ee.y+"px) scale("+ie+", "+ie+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Ee.x,Ee.y),this.textElement.transform.baseVal.getItem(1).setScale(ie,ie))},V.prototype.manipulate=function(Y){ue.prototype.manipulate.call(this,Y),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Y.x-this.pointerDownPoint.x)>5||Math.abs(Y.y-this.pointerDownPoint.y)>5)},V.prototype.resize=function(Y){ue.prototype.resize.call(this,Y),this.isMoved=!0,this.setSize(),this.globalSettings.wrapText?this.renderText():this.sizeText()},V.prototype.setSize=function(){ue.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),se.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},V.prototype.pointerUp=function(Y){var ie=this.state;ie==="creating"&&(this._suppressMarkerCreateEvent=!0),ue.prototype.pointerUp.call(this,Y),this.setSize(),(ie==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},V.prototype.showTextEditor=function(){var Y=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(ie){ie.stopPropagation()}),this.globalSettings.wrapText||this.textEditor.addEventListener("input",function(){for(var ie=Number.parseFloat(Y.textEditor.style.fontSize);Y.textEditor.clientWidth>=Number.parseInt(Y.textEditor.style.maxWidth)&&ie>.9;)ie-=.1,Y.textEditor.style.fontSize=Math.max(ie,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ie){if(ie.clipboardData){var Ee=ie.clipboardData.getData("text"),oe=window.getSelection();if(!oe.rangeCount)return!1;oe.deleteFromDocument(),oe.getRangeAt(0).insertNode(document.createTextNode(Ee)),ie.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Y.textEditDivClicked(Y.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},V.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else if(this.globalSettings.wrapText)this.textEditor.style.left=this.left+this.padding+"px",this.textEditor.style.top=this.top+this.padding+"px",this.textEditor.style.width=this.width-2*this.padding+"px",this.textEditor.style.height=this.height-2*this.padding+"px",this.textEditor.style.maxHeight=this.textEditor.style.height,this.textEditor.style.whiteSpace="wrap";else{this.textElement.style.display="";var Y=this.getTextScale(),ie=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Ee=this.textElement.getBBox(),oe={x:Ee.width*Y,y:Ee.height*Y};ie.x-=oe.x/2,ie.y-=oe.y/2,this.textEditor.style.top=ie.y+"px",this.textEditor.style.left=ie.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ie.x+"px",this.textEditor.style.fontSize=Math.max(16*Y,12)+"px",this.textElement.style.display="none"}},V.prototype.textEditDivClicked=function(Y){this.text=Y.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},V.prototype.select=function(){ue.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},V.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ue.prototype.deselect.call(this)},V.prototype.dblClick=function(Y,ie){ue.prototype.dblClick.call(this,Y,ie),this.showTextEditor()},V.prototype.setColor=function(Y){this.textElement&&se.setAttributes(this.textElement,[["fill",Y]]),this.color=Y,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Y)},V.prototype.setFont=function(Y){this.textElement&&se.setAttributes(this.textElement,[["font-family",Y]]),this.fontFamily=Y,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},V.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},V.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text,wrapText:this.globalSettings.wrapText},ue.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){var ie=Y;this.color=ie.color,this.fontFamily=ie.fontFamily,this.padding=ie.padding,this.text=ie.text,this.createVisual(),ue.prototype.restoreState.call(this,Y),this.setSize(),this.globalSettings.wrapText&&this.renderText()},V.prototype.scale=function(Y,ie){ue.prototype.scale.call(this,Y,ie),this.setSize(),this.sizeText(),this.positionTextEditor()},V.typeName="TextMarker",V.title="Text marker",V.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',V}(He),Me=function(ue){function V(Y,ie,Ee){var oe=ue.call(this,Y,ie,Ee)||this;return oe.color="transparent",oe.lineWidth=3,oe.drawing=!1,oe.pixelRatio=1,oe.color=Ee.defaultColor,oe.lineWidth=Ee.defaultStrokeWidth,oe.pixelRatio=Ee.freehandPixelRatio,oe.setColor=oe.setColor.bind(oe),oe.addCanvas=oe.addCanvas.bind(oe),oe.finishCreation=oe.finishCreation.bind(oe),oe.setLineWidth=oe.setLineWidth.bind(oe),oe.colorPanel=new pe("Color",Ee.defaultColorSet,Ee.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.lineWidthPanel=new Ue("Line width",Ee.defaultStrokeWidths,Ee.defaultStrokeWidth),oe.lineWidthPanel.onWidthChanged=oe.setLineWidth,oe}return ne(V,ue),V.prototype.ownsTarget=function(Y){return!(!ue.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.drawingImage)},V.prototype.createVisual=function(){this.visual=se.createGroup(),this.drawingImage=se.createImage(),this.visual.appendChild(this.drawingImage);var Y=se.createTransform();this.visual.transform.baseVal.appendItem(Y),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function(Y,ie){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(Y.x,Y.y),this.drawing=!0):ue.prototype.pointerDown.call(this,Y,ie)},V.prototype.manipulate=function(Y){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Y.x,Y.y),this.canvasContext.stroke()):ue.prototype.manipulate.call(this,Y)},V.prototype.resize=function(Y){ue.prototype.resize.call(this,Y),se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),se.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function(Y){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ue.prototype.pointerUp.call(this,Y)},V.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},V.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ue.prototype.select.call(this)},V.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ue.prototype.deselect.call(this)},V.prototype.finishCreation=function(){for(var Y=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ie=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Ee=ie[0],oe=ie[1],Fe=ie[2],tt=ie[3],xt=!1,Ot=0;Ot<this.canvasElement.height;Ot++)for(var ut=0;ut<this.canvasElement.width;ut++)Y.data[Ot*this.canvasElement.width*4+4*ut+3]>0&&(xt=!0,Ot<oe&&(oe=Ot),ut<Ee&&(Ee=ut),Ot>tt&&(tt=Ot),ut>Fe&&(Fe=ut));if(xt){this.left=Ee/this.pixelRatio,this.top=oe/this.pixelRatio,this.width=(Fe-Ee)/this.pixelRatio,this.height=(tt-oe)/this.pixelRatio;var Ft=document.createElement("canvas");Ft.width=Fe-Ee,Ft.height=tt-oe,Ft.getContext("2d").putImageData(this.canvasContext.getImageData(Ee,oe,Fe-Ee,tt-oe),0,0),this.drawingImgUrl=Ft.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},V.prototype.setDrawingImage=function(){se.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),se.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},V.prototype.setColor=function(Y){this.color=Y,this.colorChanged(Y)},V.prototype.setLineWidth=function(Y){this.lineWidth=Y},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({drawingImgUrl:this.drawingImgUrl},ue.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){this.createVisual(),ue.prototype.restoreState.call(this,Y),this.drawingImgUrl=Y.drawingImgUrl,this.setDrawingImage()},V.prototype.scale=function(Y,ie){ue.prototype.scale.call(this,Y,ie),this.setDrawingImage()},V.typeName="FreehandMarker",V.title="Freehand marker",V.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',V}(He),Ie=function(ue){function V(Y,ie,Ee,oe){var Fe=ue.call(this,Y,Ee||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>',oe||"arrow-type-panel")||this;return Fe.typeBoxes=[],Fe.currentType=ie,Fe.setCurrentType=Fe.setCurrentType.bind(Fe),Fe}return ne(V,ue),V.prototype.getUi=function(){var Y=this,ie=document.createElement("div");ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2";for(var Ee=function(tt){var xt="both";switch(tt){case 0:xt="both";break;case 1:xt="start";break;case 2:xt="end";break;case 3:xt="none"}var Ot=document.createElement("div");if(Ot.style.display="flex",Ot.style.flexGrow="2",Ot.style.alignItems="center",Ot.style.justifyContent="space-between",Ot.style.padding="5px",Ot.style.borderWidth="2px",Ot.style.borderStyle="solid",Ot.style.borderColor=xt===oe.currentType?oe.uiStyleSettings.toolboxAccentColor:"transparent",Ot.addEventListener("click",function(){Y.setCurrentType(xt,Ot)}),ie.appendChild(Ot),xt==="both"||xt==="start"){var ut=document.createElement("div");ut.style.display="flex",ut.style.alignItems="center",ut.style.minHeight="20px",ut.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,5 10,0 10,10" fill="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,ut.style.marginLeft="5px",Ot.appendChild(ut)}var Ft=document.createElement("div");Ft.style.display="flex",Ft.style.alignItems="center",Ft.style.minHeight="20px",Ft.style.flexGrow="2";var Xt=document.createElement("hr");if(Xt.style.minWidth="20px",Xt.style.border="0px",Xt.style.borderTop="3px solid "+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee"),Xt.style.flexGrow="2",Ft.appendChild(Xt),Ot.appendChild(Ft),xt==="both"||xt==="end"){var er=document.createElement("div");er.style.display="flex",er.style.alignItems="center",er.style.minHeight="20px",er.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,0 10,5 0,10" fill="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,er.style.marginRight="5px",Ot.appendChild(er)}oe.typeBoxes.push(Ot)},oe=this,Fe=0;Fe<4;Fe++)Ee(Fe);return ie},V.prototype.setCurrentType=function(Y,ie){var Ee=this;this.currentType=Y,this.typeBoxes.forEach(function(oe){oe.style.borderColor=oe===ie?Ee.uiStyleSettings!==void 0?Ee.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},V}(Z),Be=function(ue){function V(Y,ie,Ee){var oe=ue.call(this,Y,ie,Ee)||this;return oe.arrowType="end",oe.arrowBaseHeight=10,oe.arrowBaseWidth=10,oe.getArrowPoints=oe.getArrowPoints.bind(oe),oe.setArrowType=oe.setArrowType.bind(oe),oe.arrowTypePanel=new Ie("Arrow type","end"),oe.arrowTypePanel.onArrowTypeChanged=oe.setArrowType,oe}return ne(V,ue),V.prototype.ownsTarget=function(Y){return!(!ue.prototype.ownsTarget.call(this,Y)&&Y!==this.arrow1&&Y!==this.arrow2)},V.prototype.getArrowPoints=function(Y,ie){var Ee=this.arrowBaseWidth+2*this.strokeWidth,oe=this.arrowBaseHeight+2*this.strokeWidth;return Y-Ee/2+","+(ie+oe/2)+" "+Y+","+(ie-oe/2)+" "+(Y+Ee/2)+","+(ie+oe/2)},V.prototype.createTips=function(){this.arrow1=se.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(se.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=se.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(se.createTransform()),this.visual.appendChild(this.arrow2)},V.prototype.pointerDown=function(Y,ie){ue.prototype.pointerDown.call(this,Y,ie),this.state==="creating"&&this.createTips()},V.prototype.adjustVisual=function(){if(ue.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",se.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),se.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Y=0;Math.abs(this.x1-this.x2)>.1&&(Y=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var ie=this.arrow1.transform.baseVal.getItem(0);ie.setRotate(Y,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ie,0);var Ee=this.arrow2.transform.baseVal.getItem(0);Ee.setRotate(Y+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Ee,0)}},V.prototype.setArrowType=function(Y){this.arrowType=Y,this.adjustVisual(),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({arrowType:this.arrowType},ue.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){ue.prototype.restoreState.call(this,Y);var ie=Y;this.arrowType=ie.arrowType,this.createTips(),this.adjustVisual()},V.typeName="ArrowMarker",V.title="Arrow marker",V.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',V}(Qe),we=function(ue){function V(Y,ie,Ee){var oe=ue.call(this,Y,ie,Ee)||this;return oe.fillColor=Ee.defaultFillColor,oe.strokeWidth=0,oe.fillPanel=new pe("Color",Ee.defaultColorSet,Ee.defaultFillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe}return ne(V,ue),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=ue.prototype.getState.call(this);return Y.typeName=V.typeName,Y},V.typeName="CoverMarker",V.title="Cover marker",V.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',V}(Oe),Ae=function(ue){function V(Y,ie,Ee,oe,Fe){var tt=ue.call(this,Y,oe||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>',Fe||"opacity-panel")||this;return tt.opacities=[],tt.opacityBoxes=[],tt.opacities=ie,tt.currentOpacity=Ee,tt.setCurrentOpacity=tt.setCurrentOpacity.bind(tt),tt}return ne(V,ue),V.prototype.getUi=function(){var Y=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",ie.style.justifyContent="space-between",this.opacities.forEach(function(Ee){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="center",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=Ee===Y.currentOpacity?Y.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){Y.setCurrentOpacity(Ee,oe)}),ie.appendChild(oe);var Fe=document.createElement("div");Fe.innerText=100*Ee+"%",oe.appendChild(Fe),Y.opacityBoxes.push(oe)}),ie},V.prototype.setCurrentOpacity=function(Y,ie){var Ee=this;this.currentOpacity=Y,this.opacityBoxes.forEach(function(oe){oe.style.borderColor=oe===ie?Ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},V}(Z),ke=function(ue){function V(Y,ie,Ee){var oe=ue.call(this,Y,ie,Ee)||this;return oe.setOpacity=oe.setOpacity.bind(oe),oe.fillColor=Ee.defaultHighlightColor,oe.strokeWidth=0,oe.opacity=Ee.defaultHighlightOpacity,oe.fillPanel=new pe("Color",Ee.defaultColorSet,oe.fillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe.opacityPanel=new Ae("Opacity",Ee.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return ne(V,ue),V.prototype.setOpacity=function(Y){this.opacity=Y,this.visual&&se.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=ue.prototype.getState.call(this);return Y.typeName=V.typeName,Y},V.typeName="HighlightMarker",V.title="Highlight marker",V.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',V}(we),Le='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',Ke='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',Ze=function(ue){function V(Y,ie,Ee){var oe=ue.call(this,Y,ie,Ee)||this;return oe.bgColor="transparent",oe.tipPosition={x:0,y:0},oe.tipBase1Position={x:0,y:0},oe.tipBase2Position={x:0,y:0},oe.tipMoving=!1,oe.color=Ee.defaultStrokeColor,oe.bgColor=Ee.defaultFillColor,oe.fontFamily=Ee.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setBgColor=oe.setBgColor.bind(oe),oe.getTipPoints=oe.getTipPoints.bind(oe),oe.positionTip=oe.positionTip.bind(oe),oe.setTipPoints=oe.setTipPoints.bind(oe),oe.colorPanel=new pe("Text color",Ee.defaultColorSet,oe.color,Le,"text-color-panel"),oe.colorPanel.onColorChanged=oe.setColor,oe.bgColorPanel=new pe("Fill color",Ee.defaultColorSet,oe.bgColor,Ke,"fill-color-panel"),oe.bgColorPanel.onColorChanged=oe.setBgColor,oe.fontFamilyPanel=new We("Font",Ee.defaultFontFamilies,Ee.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.tipGrip=new Te,oe.tipGrip.visual.transform.baseVal.appendItem(se.createTransform()),oe.controlBox.appendChild(oe.tipGrip.visual),oe}return ne(V,ue),V.prototype.ownsTarget=function(Y){return ue.prototype.ownsTarget.call(this,Y)||this.tipGrip.ownsTarget(Y)||this.tip===Y},V.prototype.createTip=function(){se.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=se.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},V.prototype.pointerDown=function(Y,ie){this.state==="new"&&ue.prototype.pointerDown.call(this,Y,ie),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ie)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ue.prototype.pointerDown.call(this,Y,ie)},V.prototype.pointerUp=function(Y){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ue.prototype.pointerUp.call(this,Y);else{var ie=this.state==="creating";ue.prototype.pointerUp.call(this,Y),this.setTipPoints(ie),this.positionTip()}},V.prototype.manipulate=function(Y){if(this.tipMoving){var ie=this.unrotatePoint(Y);this.tipPosition={x:ie.x-this.manipulationStartLeft,y:ie.y-this.manipulationStartTop},this.positionTip()}else ue.prototype.manipulate.call(this,Y)},V.prototype.setBgColor=function(Y){this.bgRectangle&&this.tip&&(se.setAttributes(this.bgRectangle,[["fill",Y]]),se.setAttributes(this.tip,[["fill",Y]])),this.bgColor=Y,this.fillColorChanged(Y)},V.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},V.prototype.setTipPoints=function(Y){Y===void 0&&(Y=!1);var ie=Math.min(this.height/2,15),Ee=this.height/5;Y&&(this.tipPosition={x:ie+Ee/2,y:this.height+20});var oe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Ee=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:0},this.tipBase2Position={x:ie+Ee,y:0}):(this.tipBase1Position={x:0,y:ie},this.tipBase2Position={x:0,y:ie+Ee}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Ee=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-Ee,y:0},this.tipBase2Position={x:this.width-ie,y:0}):(this.tipBase1Position={x:this.width,y:ie},this.tipBase2Position={x:this.width,y:ie+Ee}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?oe<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Ee=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-Ee,y:this.height},this.tipBase2Position={x:this.width-ie,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ie-Ee},this.tipBase2Position={x:this.width,y:this.height-ie}):oe<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Ee=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:this.height},this.tipBase2Position={x:ie+Ee,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ie},this.tipBase2Position={x:0,y:this.height-ie-Ee})},V.prototype.resize=function(Y){ue.prototype.resize.call(this,Y),this.positionTip()},V.prototype.positionTip=function(){se.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Y=this.tipGrip.visual.transform.baseVal.getItem(0);Y.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Y,0)},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),V.prototype.select=function(){this.positionTip(),ue.prototype.select.call(this)},V.prototype.getState=function(){var Y=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ue.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){var ie=Y;this.bgColor=ie.bgColor,this.tipPosition=ie.tipPosition,ue.prototype.restoreState.call(this,Y),this.createTip(),this.setTipPoints()},V.prototype.scale=function(Y,ie){ue.prototype.scale.call(this,Y,ie),this.tipPosition={x:this.tipPosition.x*Y,y:this.tipPosition.y*ie},this.positionTip()},V.typeName="CalloutMarker",V.title="Callout marker",V.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',V}(ze),Ne=function(ue){function V(Y,ie,Ee){var oe=ue.call(this,Y,ie,Ee)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.strokeColor=Ee.defaultColor,oe.strokeWidth=Ee.defaultStrokeWidth,oe.strokeDasharray=Ee.defaultStrokeDasharray,oe.fillColor=Ee.defaultFillColor,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.setOpacity=oe.setOpacity.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.strokePanel=new pe("Line color",he(Ee.defaultColorSet,["transparent"]),Ee.defaultColor,void 0,"stroke-color-panel"),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new pe("Fill color",he(Ee.defaultColorSet,["transparent"]),oe.fillColor,Ke,"fill-color-panel"),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new Ue("Line width",Ee.defaultStrokeWidths,Ee.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new je("Line style",Ee.defaultStrokeDasharrays,Ee.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.opacityPanel=new Ae("Opacity",Ee.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return ne(V,ue),V.prototype.ownsTarget=function(Y){return!(!ue.prototype.ownsTarget.call(this,Y)&&Y!==this.visual)},V.prototype.createVisual=function(){this.visual=se.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function(Y,ie){ue.prototype.pointerDown.call(this,Y,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},V.prototype.manipulate=function(Y){ue.prototype.manipulate.call(this,Y)},V.prototype.resize=function(Y){ue.prototype.resize.call(this,Y),this.setSize()},V.prototype.setSize=function(){ue.prototype.setSize.call(this),se.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},V.prototype.pointerUp=function(Y){ue.prototype.pointerUp.call(this,Y),this.setSize()},V.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.visual&&se.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Y),this.stateChanged()},V.prototype.setFillColor=function(Y){this.fillColor=Y,this.visual&&se.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Y),this.stateChanged()},V.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.visual&&se.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.visual&&se.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},V.prototype.setOpacity=function(Y){this.opacity=Y,this.visual&&se.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ue.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){var ie=Y;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),ue.prototype.restoreState.call(this,Y),this.setSize()},V.prototype.scale=function(Y,ie){ue.prototype.scale.call(this,Y,ie),this.setSize()},V.typeName="EllipseMarker",V.title="Ellipse marker",V.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',V}(He),$e=function(ue){function V(Y,ie,Ee){return ue.call(this,Y,ie,Ee)||this}return ne(V,ue),Object.defineProperty(V.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function(Y){return!(!ue.prototype.ownsTarget.call(this,Y)&&Y!==this.tip1&&Y!==this.tip2)},V.prototype.createTips=function(){this.tip1=se.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(se.createTransform()),this.visual.appendChild(this.tip1),this.tip2=se.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(se.createTransform()),this.visual.appendChild(this.tip2)},V.prototype.pointerDown=function(Y,ie){ue.prototype.pointerDown.call(this,Y,ie),this.state==="creating"&&this.createTips()},V.prototype.adjustVisual=function(){if(ue.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(se.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),se.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var Y=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ie=this.tip1.transform.baseVal.getItem(0);ie.setRotate(Y,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ie,0);var Ee=this.tip2.transform.baseVal.getItem(0);Ee.setRotate(Y+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Ee,0)}},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=ue.prototype.getState.call(this);return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){ue.prototype.restoreState.call(this,Y),this.createTips(),this.adjustVisual()},V.typeName="MeasurementMarker",V.title="Measurement marker",V.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',V}(Qe),Je=function(ue){function V(Y,ie,Ee){var oe=ue.call(this,Y,ie,Ee)||this;return oe.strokePanel.colors=Ee.defaultColorSet,oe.fillColor="transparent",oe}return ne(V,ue),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=ue.prototype.getState.call(this);return Y.typeName=V.typeName,Y},V.typeName="EllipseFrameMarker",V.title="Ellipse frame marker",V.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',V}(Ne),qe=function(){function ue(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ue.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ue.prototype.addUndoStep=function(V){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(V)||(this.undoStack.push(V),JSON.stringify(this.lastRedoStep)!==JSON.stringify(V)&&this.redoStack.splice(0,this.redoStack.length))},ue.prototype.replaceLastUndoStep=function(V){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=V)},ue.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ue.prototype.undo=function(){if(this.undoStack.length>1){var V=this.undoStack.pop();return V!==void 0&&this.redoStack.push(V),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ue.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ue}(),ot=function(ue){function V(Y,ie,Ee){var oe=ue.call(this,Y,ie,Ee)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.curveX=0,oe.curveY=0,oe.manipulationStartCurveX=0,oe.manipulationStartCurveY=0,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.positionGrips=oe.positionGrips.bind(oe),oe.addControlGrips=oe.addControlGrips.bind(oe),oe.adjustVisual=oe.adjustVisual.bind(oe),oe.setupControlBox=oe.setupControlBox.bind(oe),oe.resize=oe.resize.bind(oe),oe.strokeColor=Ee.defaultColor,oe.strokeWidth=Ee.defaultStrokeWidth,oe.strokeDasharray=Ee.defaultStrokeDasharray,oe.strokePanel=new pe("Line color",Ee.defaultColorSet,Ee.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new Ue("Line width",Ee.defaultStrokeWidths,Ee.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new je("Line style",Ee.defaultStrokeDasharrays,Ee.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return ne(V,ue),V.prototype.ownsTarget=function(Y){return!(!ue.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.selectorCurve&&Y!==this.visibleCurve&&!this.curveGrip.ownsTarget(Y))},V.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},V.prototype.createVisual=function(){this.visual=se.createGroup(),this.selectorCurve=se.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=se.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function(Y,ie){ue.prototype.pointerDown.call(this,Y,ie),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Y.x,this.curveY=Y.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ie)&&(this.activeGrip=this.curveGrip,this._state="resize")},V.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),se.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),se.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),se.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setupControlBox=function(){ue.prototype.setupControlBox.call(this),this.curveControlLine1=se.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=se.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},V.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ue.prototype.addControlGrips.call(this)},V.prototype.positionGrips=function(){ue.prototype.positionGrips.call(this);var Y=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Y/2,this.curveY-Y/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},V.prototype.manipulate=function(Y){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Y.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Y.y-this.manipulationStartY),ue.prototype.manipulate.call(this,Y)},V.prototype.resize=function(Y){this.activeGrip===this.curveGrip&&(this.curveX=Y.x,this.curveY=Y.y),ue.prototype.resize.call(this,Y),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},V.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.adjustVisual(),this.colorChanged(Y)},V.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.adjustVisual()},V.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.adjustVisual()},V.prototype.scale=function(Y,ie){this.curveX=this.curveX*Y,this.curveY=this.curveY*ie,ue.prototype.scale.call(this,Y,ie)},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ue.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){ue.prototype.restoreState.call(this,Y);var ie=Y;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.curveX=ie.curveX,this.curveY=ie.curveY,this.createVisual(),this.adjustVisual()},V.typeName="CurveMarker",V.title="Curve marker",V.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',V}(Xe),at=function(ue){function V(Y,ie,Ee){var oe=ue.call(this,Y,ie,Ee)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.textColor="transparent",oe.fontSize="1rem",oe.isMoved=!1,oe.captionText="Caption",oe.PADDING=5,oe.captionBoxWidth=0,oe.captionBoxHeight=0,oe.strokeColor=Ee.defaultColor,oe.strokeWidth=Ee.defaultStrokeWidth,oe.strokeDasharray=Ee.defaultStrokeDasharray,oe.fillColor=Ee.defaultFillColor,oe.textColor=Ee.defaultStrokeColor,oe.fontFamily=Ee.defaultFontFamily,oe.fontSize=Ee.defaultCaptionFontSize,oe.captionText=Ee.defaultCaptionText,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.sizeCaption=oe.sizeCaption.bind(oe),oe.setCaptionText=oe.setCaptionText.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.finishTextEditing=oe.finishTextEditing.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.setTextColor=oe.setTextColor.bind(oe),oe.strokePanel=new pe("Line color",he(Ee.defaultColorSet,["transparent"]),oe.strokeColor,void 0,"stroke-color-panel"),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new pe("Fill color",he(Ee.defaultColorSet,["transparent"]),oe.fillColor,Ke,"fill-color-panel"),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new Ue("Line width",Ee.defaultStrokeWidths,Ee.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new je("Line style",Ee.defaultStrokeDasharrays,Ee.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.fontFamilyPanel=new We("Font",Ee.defaultFontFamilies,Ee.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.textColorPanel=new pe("Text color",Ee.defaultColorSet,oe.textColor,Le,"text-color-panel"),oe.textColorPanel.onColorChanged=oe.setTextColor,oe}return ne(V,ue),V.prototype.ownsTarget=function(Y){return!(!ue.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.frame&&Y!==this.captionBg&&Y!==this.captionElement)},V.prototype.createVisual=function(){this.visual=se.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=se.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=se.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=se.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},V.prototype.setCaptionText=function(Y){this.captionText=Y,this.captionElement.textContent=this.captionText,this.sizeCaption()},V.prototype.pointerDown=function(Y,ie){ue.prototype.pointerDown.call(this,Y,ie),this.isMoved=!1,this.pointerDownPoint=Y,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},V.prototype.manipulate=function(Y){ue.prototype.manipulate.call(this,Y),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Y.x-this.pointerDownPoint.x)>5||Math.abs(Y.y-this.pointerDownPoint.y)>5)},V.prototype.resize=function(Y){ue.prototype.resize.call(this,Y),this.setSize()},V.prototype.sizeCaption=function(){var Y=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Y.width+2*this.PADDING,this.captionBoxHeight=Y.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),se.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),se.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},V.prototype.showTextEditor=function(){var Y=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(ie){ie.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(ie){ie.key==="Enter"&&Y.finishTextEditing(Y.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Y.finishTextEditing(Y.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Y.finishTextEditing(Y.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},V.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},V.prototype.finishTextEditing=function(Y){this.setCaptionText(Y.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},V.prototype.setFont=function(Y){this.captionElement&&se.setAttributes(this.captionElement,[["font-family",Y]]),this.fontFamily=Y,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},V.prototype.setTextColor=function(Y){this.captionElement&&se.setAttributes(this.captionElement,[["fill",Y]]),this.textColor=Y,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},V.prototype.setSize=function(){ue.prototype.setSize.call(this),se.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},V.prototype.pointerUp=function(Y){ue.prototype.pointerUp.call(this,Y),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},V.prototype.dblClick=function(Y,ie){ue.prototype.dblClick.call(this,Y,ie),this.showTextEditor()},V.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.frame&&se.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Y),this.stateChanged()},V.prototype.setFillColor=function(Y){this.fillColor=Y,this.captionBg&&se.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Y),this.stateChanged()},V.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.frame&&se.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.frame&&se.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},ue.prototype.getState.call(this));return Y.typeName=this.typeName,Y},V.prototype.restoreState=function(Y){var ie=Y;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.textColor=ie.textColor,this.fontFamily=ie.fontFamily,this.captionText=ie.captionText,this.fontSize=ie.fontSize,this.createVisual(),ue.prototype.restoreState.call(this,Y),this.setSize()},V.prototype.scale=function(Y,ie){ue.prototype.scale.call(this,Y,ie),this.setSize()},V.typeName="CaptionFrameMarker",V.title="Caption frame marker",V.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',V}(He),rt=function(){function ue(V,Y){Y===void 0&&(Y=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=V,this.cancelable=Y}return Object.defineProperty(ue.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ue.prototype.preventDefault=function(){this._defaultPrevented=!0},ue}(),dt=function(ue){function V(Y,ie,Ee){var oe=ue.call(this,Y,!1)||this;return oe.dataUrl=ie,oe.state=Ee,oe}return ne(V,ue),V}(rt),nt=function(ue){function V(Y,ie,Ee){Ee===void 0&&(Ee=!1);var oe=ue.call(this,Y,Ee)||this;return oe.marker=ie,oe}return ne(V,ue),V}(rt),mt=function(){function ue(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return ue.prototype.addEventListener=function(V,Y){this[V].push(Y)},ue.prototype.removeEventListener=function(V,Y){var ie=this[V].indexOf(Y);ie>-1&&this[V].splice(ie,1)},ue}(),yt=function(){function ue(V){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Re,this._isOpen=!1,this.undoRedoManager=new qe,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new mt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ue.instanceCounter++,this.styles=new fe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=V,this.targetRoot=document.body,this.width=V.clientWidth,this.height=V.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this),this.addMarkerEvents=this.addMarkerEvents.bind(this)}return Object.defineProperty(ue.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ve,Me,Be,ze,Je,Ne,ke,Ze,$e,we,Qe,ot,at]},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ve,Me,Be,ze,Ne,ke,Ze]},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ve,Me,Be,ze,ke]},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(V){var Y=this;this._availableMarkerTypes.splice(0),V.forEach(function(ie){if(typeof ie=="string"){var Ee=Y.ALL_MARKER_TYPES.find(function(oe){return oe.typeName===ie});Ee!==void 0&&Y._availableMarkerTypes.push(Ee)}else Y._availableMarkerTypes.push(ie)})},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(V){this._zoomLevel=V,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ue.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),_e.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ue.prototype.show=function(){var V=this;this.styles.styleSheetRoot===void 0&&ge.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ge.styleSheetRoot),this.markers.splice(0),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Y){return Y(new rt(V))})},ue.prototype.render=function(){return me(this,void 0,void 0,function(){var V;return be(this,function(Y){switch(Y.label){case 0:return this.setCurrentMarker(),(V=new De).naturalSize=this.renderAtNaturalSize,V.imageType=this.renderImageType,V.imageQuality=this.renderImageQuality,V.markersOnly=this.renderMarkersOnly,V.width=this.renderWidth,V.height=this.renderHeight,[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Y.sent(),[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Y.sent()]}})})},ue.prototype.close=function(V){var Y=this;if(V===void 0&&(V=!1),this.isOpen){var ie=!1;V||this.eventListeners.beforeclose.forEach(function(Ee){var oe=new rt(Y,!0);Ee(oe),oe.defaultPrevented&&(ie=!0)}),ie||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Ee){return Ee(new rt(Y))}),this.detachEvents(),this._isOpen=!1)}},ue.prototype.addMarkersToToolbar=function(){for(var V,Y=[],ie=0;ie<arguments.length;ie++)Y[ie]=arguments[ie];(V=this._availableMarkerTypes).push.apply(V,Y)},ue.prototype.addRenderEventListener=function(V){this.addEventListener("render",function(Y){V(Y.dataUrl,Y.state)})},ue.prototype.removeRenderEventListener=function(V){},ue.prototype.addCloseEventListener=function(V){this.addEventListener("close",function(){V()})},ue.prototype.removeCloseEventListener=function(V){},ue.prototype.setupResizeObserver=function(){var V=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){V.resize(V.target.clientWidth,V.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return V.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ue.prototype.onPopupTargetResize=function(){var V=1*this.target.clientWidth/this.target.clientHeight,Y=this.editorCanvas.clientWidth/V>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*V:this.editorCanvas.clientWidth,ie=Y<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/V;this.resize(Y,ie)},ue.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ue.prototype.resize=function(V,Y){this._isResizing=!0;var ie=V/this.imageWidth,Ee=Y/this.imageHeight;this.imageWidth=Math.round(V),this.imageHeight=Math.round(Y),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(ie,Ee),this._isResizing=!1},ue.prototype.scaleMarkers=function(V,Y){var ie,Ee=this;this._currentMarker&&this._currentMarker instanceof ze?this._currentMarker.scale(V,Y):(ie=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(oe){oe!==Ee._currentMarker&&oe.scale(V,Y)}),ie!==void 0&&this.setCurrentMarker(ie)},ue.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},ue.prototype.setTopLeft=function(){var V=this.editingTarget.getBoundingClientRect(),Y=this.editorCanvas.getBoundingClientRect();this.left=V.left-Y.left,this.top=V.top-Y.top},ue.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},ue.prototype.addDefs=function(){for(var V,Y=[],ie=0;ie<arguments.length;ie++)Y[ie]=arguments[ie];this.defs=se.createDefs(),this.addDefsToImage(),(V=this.defs).append.apply(V,Y)},ue.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ue.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},ue.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ue.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("touchmove",function(V){return V.preventDefault()}),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ue.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},ue.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ue.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},ue.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var V=document.createElement("a");V.href="https://markerjs.com/",V.target="_blank",V.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',V.title="Powered by marker.js",V.style.display="grid",V.style.alignItems="center",V.style.justifyItems="center",V.style.padding="3px",V.style.width="20px",V.style.height="20px",this.logoUI.appendChild(V),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ue.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},ue.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},ue.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ue.prototype.showUI=function(){var V;switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var Y=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0,ie=this.target.offsetLeft+((V=this.settings.uiOffsetLeft)!==null&&V!==void 0?V:0);this.coverDiv.style.top=Y+"px",this.coverDiv.style.left=ie+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="fixed",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.settings.displayMode==="popup"&&(this.uiDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px"),this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Q(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.displayMode==="inline"&&this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new J(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ue.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv),this.coverDiv.remove(),this.coverDiv=null},ue.prototype.removeMarker=function(V){this.markerImage.removeChild(V.container),this.markers.indexOf(V)>-1&&this.markers.splice(this.markers.indexOf(V),1),V.dispose()},ue.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},ue.prototype.toolbarButtonClicked=function(V,Y){if(V==="marker"&&Y!==void 0)this.createNewMarker(Y);else if(V==="action")switch(Y){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},ue.prototype.deleteSelectedMarker=function(){var V=this;if(this._currentMarker!==void 0&&this._currentMarker.state==="select"){var Y=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Ee){var oe=new nt(V,V._currentMarker,!0);Ee(oe),oe.defaultPrevented&&(Y=!0)}),!Y){var ie=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(Ee){return Ee(new nt(V,ie))})}}},ue.prototype.clear=function(){var V=this,Y=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Fe){var tt=new nt(V,void 0,!0);Fe(tt),tt.defaultPrevented&&(Y=!0)}),!Y)){this.setCurrentMarker();for(var ie=function(Fe){var tt=Ee.markers[Fe];Ee.setCurrentMarker(Ee.markers[Fe]),Ee._currentMarker.dispose(),Ee.markerImage.removeChild(Ee._currentMarker.container),Ee.markers.splice(Ee.markers.indexOf(Ee._currentMarker),1),Ee.eventListeners.markerdelete.forEach(function(xt){return xt(new nt(V,tt))})},Ee=this,oe=this.markers.length-1;oe>=0;oe--)ie(oe);this.addUndoStep()}},Object.defineProperty(ue.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ue.prototype.showNotesEditor=function(){var V;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(V=this._currentMarker.notes)!==null&&V!==void 0?V:"",this.overlayContainer.appendChild(this.notesArea))},ue.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},ue.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ue.prototype.addUndoStep=function(){var V=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Y=this.getState(),ie=this.undoRedoManager.getLastUndoStep();if(!ie||ie.width===Y.width&&ie.height===Y.height){var Ee=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Y),Ee<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(oe){return oe(new rt(V))})}else this.undoRedoManager.replaceLastUndoStep(Y)}},ue.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ue.prototype.undoStep=function(){var V=this,Y=this.undoRedoManager.undo();Y!==void 0&&(this.restoreState(Y),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ie){return ie(new rt(V))}))},ue.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ue.prototype.redoStep=function(){var V=this,Y=this.undoRedoManager.redo();Y!==void 0&&(this.restoreState(Y),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ie){return ie(new rt(V))}))},ue.prototype.stepZoom=function(){var V=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=V<this.zoomSteps.length-1?this.zoomSteps[V+1]:this.zoomSteps[0]},ue.prototype.panTo=function(V){this.contentDiv.scrollBy({left:this.prevPanPoint.x-V.x,top:this.prevPanPoint.y-V.y}),this.prevPanPoint=V},ue.prototype.startRenderAndClose=function(){return me(this,void 0,void 0,function(){var V,Y,ie=this;return be(this,function(Ee){switch(Ee.label){case 0:return[4,this.render()];case 1:return V=Ee.sent(),Y=this.getState(),this.eventListeners.render.forEach(function(oe){return oe(new dt(ie,V,Y))}),this.close(!0),[2]}})})},ue.prototype.getState=function(V){V===!0&&this.setCurrentMarker();var Y={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(ie){return Y.markers.push(ie.getState())}),Y},ue.prototype.restoreState=function(V){var Y=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);V.markers.forEach(function(ie){var Ee=Y._availableMarkerTypes.find(function(Fe){return Fe.typeName===ie.typeName});if(Ee!==void 0){var oe=Y.addNewMarker(Ee);oe.restoreState(ie),Y.addMarkerEvents(oe),Y.markers.push(oe)}}),V.width&&V.height&&(V.width!==this.imageWidth||V.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/V.width,this.imageHeight/V.height),this.eventListeners.restorestate.forEach(function(ie){return ie(new rt(Y))})},ue.prototype.addNewMarker=function(V){var Y=se.createGroup();return this.markerImage.appendChild(Y),new V(Y,this.overlayContainer,this.settings)},ue.prototype.createNewMarker=function(V){var Y,ie=this;(Y=typeof V=="string"?this._availableMarkerTypes.find(function(Ee){return Ee.typeName===V}):V)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Y),this.addMarkerEvents(this._currentMarker),this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(Y.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Ee){return Ee(new nt(ie,ie._currentMarker))}))},ue.prototype.addMarkerEvents=function(V){V.onMarkerCreated=this.markerCreated,V.onColorChanged=this.colorChanged,V.onFillColorChanged=this.fillColorChanged,V.onStateChanged=this.markerStateChanged},ue.prototype.markerCreated=function(V){var Y=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(V),this.setCurrentMarker(V),V instanceof Me&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Me):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(ie){return ie(new nt(Y,V))})},ue.prototype.colorChanged=function(V){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=V,this.settings.defaultStrokeColor=V)},ue.prototype.fillColorChanged=function(V){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=V)},ue.prototype.markerStateChanged=function(V){var Y=this;this.eventListeners.markerchange.forEach(function(ie){return ie(new nt(Y,V))})},ue.prototype.setCurrentMarker=function(V){var Y=this;this._currentMarker!==V&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(ie){return ie(new nt(Y,Y._currentMarker))})),this._currentMarker=V,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(ie){return ie(new nt(Y,Y._currentMarker))}))},ue.prototype.onPointerDown=function(V){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||V.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Y=this.markers.find(function(ie){return ie.ownsTarget(V.target)});Y!==void 0?(this.setCurrentMarker(Y),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(V.clientX,V.clientY),V.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:V.clientX,y:V.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(V.clientX,V.clientY))},ue.prototype.onDblClick=function(V){if(this._isFocused||this.focus(),this.mode==="select"){var Y=this.markers.find(function(ie){return ie.ownsTarget(V.target)});Y!==void 0&&Y!==this._currentMarker&&this.setCurrentMarker(Y),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(V.clientX,V.clientY),V.target):this.setCurrentMarker()}},ue.prototype.onPointerMove=function(V){this.touchPoints!==1&&V.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||V.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(V.clientX,V.clientY)):this.zoomLevel>1&&this.panTo({x:V.clientX,y:V.clientY}))},ue.prototype.onPointerUp=function(V){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(V.clientX,V.clientY)),this.isDragging=!1,this.addUndoStep()},ue.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ue.prototype.onKeyUp=function(V){this._currentMarker===void 0||this.notesArea!==void 0||V.key!=="Delete"&&V.key!=="Backspace"||this.deleteSelectedMarker()},ue.prototype.clientToLocalCoordinates=function(V,Y){var ie=this.markerImage.getBoundingClientRect(),Ee=ie.width/this.imageWidth/this.zoomLevel,oe=ie.height/this.imageHeight/this.zoomLevel;return{x:(V-ie.left)/this.zoomLevel/Ee,y:(Y-ie.top)/this.zoomLevel/oe}},ue.prototype.onWindowResize=function(){this.positionUI()},ue.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var V=this.target.getClientRects(),Y=V.length>0&&V.item(0)&&V.item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Y+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},ue.prototype.addLicenseKey=function(V){_e.addKey(V)},ue.prototype.addEventListener=function(V,Y){this.eventListeners.addEventListener(V,Y)},ue.prototype.removeEventListener=function(V,Y){this.eventListeners.removeEventListener(V,Y)},ue.prototype.renderState=function(V){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(V),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ue.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ue.prototype.focus=function(){var V=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Y){return Y(new rt(V))}))},ue.prototype.blur=function(){var V=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Y){return Y(new rt(V))}))},ue.instanceCounter=0,ue}();/* **********************************
|
|
|
cropro version 1.6.0
|
|
|
@license SEE LICENSE IN LICENSE
|
|
|
|
|
|
copyright Alan Mendelevich
|
|
|
see README and LICENSE for details
|
|
|
********************************** *//*! *****************************************************************************
|
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
purpose with or without fee is hereby granted.
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
|
***************************************************************************** */var ft=function(ue,V){return(ft=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,ie){Y.__proto__=ie}||function(Y,ie){for(var Ee in ie)Object.prototype.hasOwnProperty.call(ie,Ee)&&(Y[Ee]=ie[Ee])})(ue,V)};function ht(ue,V){if(typeof V!="function"&&V!==null)throw new TypeError("Class extends value "+String(V)+" is not a constructor or null");function Y(){this.constructor=ue}ft(ue,V),ue.prototype=V===null?Object.create(V):(Y.prototype=V.prototype,new Y)}function Rt(ue,V,Y,ie){return new(Y||(Y=Promise))(function(Ee,oe){function Fe(Ot){try{xt(ie.next(Ot))}catch(ut){oe(ut)}}function tt(Ot){try{xt(ie.throw(Ot))}catch(ut){oe(ut)}}function xt(Ot){var ut;Ot.done?Ee(Ot.value):(ut=Ot.value,ut instanceof Y?ut:new Y(function(Ft){Ft(ut)})).then(Fe,tt)}xt((ie=ie.apply(ue,V||[])).next())})}function Wt(ue,V){var Y,ie,Ee,oe,Fe={label:0,sent:function(){if(1&Ee[0])throw Ee[1];return Ee[1]},trys:[],ops:[]};return oe={next:tt(0),throw:tt(1),return:tt(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function tt(xt){return function(Ot){return function(ut){if(Y)throw new TypeError("Generator is already executing.");for(;Fe;)try{if(Y=1,ie&&(Ee=2&ut[0]?ie.return:ut[0]?ie.throw||((Ee=ie.return)&&Ee.call(ie),0):ie.next)&&!(Ee=Ee.call(ie,ut[1])).done)return Ee;switch(ie=0,Ee&&(ut=[2&ut[0],Ee.value]),ut[0]){case 0:case 1:Ee=ut;break;case 4:return Fe.label++,{value:ut[1],done:!1};case 5:Fe.label++,ie=ut[1],ut=[0];continue;case 7:ut=Fe.ops.pop(),Fe.trys.pop();continue;default:if(!(Ee=Fe.trys,(Ee=Ee.length>0&&Ee[Ee.length-1])||ut[0]!==6&&ut[0]!==2)){Fe=0;continue}if(ut[0]===3&&(!Ee||ut[1]>Ee[0]&&ut[1]<Ee[3])){Fe.label=ut[1];break}if(ut[0]===6&&Fe.label<Ee[1]){Fe.label=Ee[1],Ee=ut;break}if(Ee&&Fe.label<Ee[2]){Fe.label=Ee[2],Fe.ops.push(ut);break}Ee[2]&&Fe.ops.pop(),Fe.trys.pop();continue}ut=V.call(ue,Fe)}catch(Ft){ut=[6,Ft],ie=0}finally{Y=Ee=0}if(5&ut[0])throw ut[1];return{value:ut[0]?ut[1]:void 0,done:!0}}([xt,Ot])}}}var wt=function(){function ue(){}return ue.addKey=function(V){ue.key=V},Object.defineProperty(ue,"isLicensed",{get:function(){return!!ue.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ue.key)},enumerable:!1,configurable:!0}),ue}(),lt=function(){function ue(){}return ue.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ue.setAttributes=function(V,Y){for(var ie=0,Ee=Y;ie<Ee.length;ie++){var oe=Ee[ie],Fe=oe[0],tt=oe[1];V.setAttribute(Fe,tt)}},ue.createRect=function(V,Y,ie){var Ee=document.createElementNS("http://www.w3.org/2000/svg","rect");return Ee.setAttribute("width",V.toString()),Ee.setAttribute("height",Y.toString()),ie&&ue.setAttributes(Ee,ie),Ee},ue.createLine=function(V,Y,ie,Ee,oe){var Fe=document.createElementNS("http://www.w3.org/2000/svg","line");return Fe.setAttribute("x1",V.toString()),Fe.setAttribute("y1",Y.toString()),Fe.setAttribute("x2",ie.toString()),Fe.setAttribute("y2",Ee.toString()),oe&&ue.setAttributes(Fe,oe),Fe},ue.createPolygon=function(V,Y){var ie=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ie.setAttribute("points",V),Y&&ue.setAttributes(ie,Y),ie},ue.createCircle=function(V,Y){var ie=document.createElementNS("http://www.w3.org/2000/svg","circle");return ie.setAttribute("cx",(V/2).toString()),ie.setAttribute("cy",(V/2).toString()),ie.setAttribute("r",V.toString()),Y&&ue.setAttributes(ie,Y),ie},ue.createEllipse=function(V,Y,ie){var Ee=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Ee.setAttribute("cx",(V/2).toString()),Ee.setAttribute("cy",(Y/2).toString()),Ee.setAttribute("rx",(V/2).toString()),Ee.setAttribute("ry",(Y/2).toString()),ie&&ue.setAttributes(Ee,ie),Ee},ue.createGroup=function(V){var Y=document.createElementNS("http://www.w3.org/2000/svg","g");return V&&ue.setAttributes(Y,V),Y},ue.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ue.createMarker=function(V,Y,ie,Ee,oe,Fe,tt){var xt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ue.setAttributes(xt,[["id",V],["orient",Y],["markerWidth",ie.toString()],["markerHeight",Ee.toString()],["refX",oe.toString()],["refY",Fe.toString()]]),xt.appendChild(tt),xt},ue.createText=function(V){var Y=document.createElementNS("http://www.w3.org/2000/svg","text");return Y.setAttribute("x","0"),Y.setAttribute("y","0"),V&&ue.setAttributes(Y,V),Y},ue.createTSpan=function(V,Y){var ie=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ie.textContent=V,Y&&ue.setAttributes(ie,Y),ie},ue.createImage=function(V){var Y=document.createElementNS("http://www.w3.org/2000/svg","image");return V&&ue.setAttributes(Y,V),Y},ue.createPoint=function(V,Y){var ie=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ie.x=V,ie.y=Y,ie},ue.createPath=function(V,Y){var ie=document.createElementNS("http://www.w3.org/2000/svg","path");return ie.setAttribute("d",V),Y&&ue.setAttributes(ie,Y),ie},ue.createElement=function(V,Y){var ie=document.createElementNS("http://www.w3.org/2000/svg",V);return Y&&ue.setAttributes(ie,Y),ie},ue.getHollowRectanglePath=function(V,Y,ie,Ee,oe,Fe,tt,xt){return"M"+V+","+Y+"V"+(Y+Ee)+"H"+(V+ie)+"V"+Y+"H"+oe+"V"+Fe+"H"+(oe+tt)+"V"+(Fe+xt)+"H"+oe+"V"+Y+"Z"},ue}(),_t=function(){function ue(V){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+V+"_"}return Object.defineProperty(ue.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),ue.prototype.addClass=function(V){return this.styleSheet===void 0&&this.addStyleSheet(),V.name=""+this.classNamePrefix+V.localName,this.classes.push(V),this.styleSheet.sheet.insertRule("."+V.name+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length),V},ue.prototype.addRule=function(V){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(V),this.styleSheet.sheet.insertRule(V.selector+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length)},ue.prototype.addStyleSheet=function(){var V;this.styleSheet=document.createElement("style"),((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).appendChild(this.styleSheet),this.addRule(new jt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new jt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new jt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new Ht("_fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new Ht("_fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},ue.prototype.removeStyleSheet=function(){var V;this.styleSheet&&(((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ue}(),jt=function(ue,V){this.selector=ue,this.style=V},Ht=function(ue,V){this.localName=ue,this.style=V},ct=function(){function ue(){this.blocks=[],this.display=""}return ue.prototype.addButtonBlock=function(V){V.className=this.blockClassName,V.buttonClassName=this.buttonClassName,V.buttonColorsClassName=this.buttonColorsClassName,V.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(V)},ue.prototype.addElementBlock=function(V){V.className===void 0&&(V.className=this.blockClassName),this.blocks.push(V)},ue.prototype.getUI=function(){var V=document.createElement("div");return V.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,V.style.display=this.display,this.blocks.forEach(function(Y){return V.appendChild(Y.getUI())}),V},ue}(),bt=function(){function ue(){}return ue.prototype.getUI=function(){var V=document.createElement("div");if(V.className=this.className,this.minWidth!==void 0&&(V.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":V.style.justifyContent="flex-start";break;case"center":V.style.justifyContent="center";break;case"end":V.style.justifyContent="flex-end"}return V.style.whiteSpace="nowrap",V},ue}(),gt=function(ue){function V(){var Y=ue!==null&&ue.apply(this,arguments)||this;return Y.buttons=[],Y}return ht(V,ue),V.prototype.addButton=function(Y){Y.className=this.buttonClassName,Y.colorsClassName=this.buttonColorsClassName,Y.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(Y)},V.prototype.getUI=function(){var Y=ue.prototype.getUI.call(this);return this.buttons.forEach(function(ie){return Y.appendChild(ie.getUI())}),Y},V}(bt),Ut=function(){function ue(V,Y){this._isActive=!1,this._isHidden=!1,this._icon=V,this.title=Y,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(ue.prototype,"icon",{get:function(){return this._icon},set:function(V){this._icon=V,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isActive",{get:function(){return this._isActive},set:function(V){this._isActive=V,this.adjustClassName()},enumerable:!1,configurable:!0}),ue.prototype.getUI=function(){var V=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.setAttribute("role","button"),this.buttonContainer.setAttribute("aria-label",this.title),this.buttonContainer.setAttribute("data-action",this.title),this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return V.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},ue.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},ue.prototype.hide=function(){this._isHidden=!0},ue}(),Lt=function(ue){function V(){var Y=ue!==null&&ue.apply(this,arguments)||this;return Y.elements=[],Y}return ht(V,ue),V.prototype.addElement=function(Y){this.elements.push(Y)},V.prototype.getUI=function(){var Y=ue.prototype.getUI.call(this);return this.elements.forEach(function(ie){return Y.appendChild(ie)}),Y},V}(bt),It=function(){function ue(V,Y){this.horizontal=V,this.vertical=Y}return Object.defineProperty(ue.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),ue.prototype.getVerticalLength=function(V){return V/this.ratio},ue.prototype.getHorizontalLength=function(V){return V*this.ratio},ue}(),St=function(){function ue(){}return ue.getIcon=function(V,Y){if(V>0&&Y>0){var ie=new It(V,Y),Ee=ie.ratio>=1?20:ie.getHorizontalLength(20),oe=ie.ratio<1?20:ie.getVerticalLength(20),Fe=document.createElementNS("http://www.w3.org/2000/svg","svg");Fe.setAttribute("xmlns","http://www.w3.org/2000/svg"),Fe.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Fe);var tt=lt.createDefs();Fe.appendChild(tt);var xt=lt.createElement("clipPath",[["id","text-bg-clip"]]);tt.appendChild(xt);var Ot=lt.createPath(lt.getHollowRectanglePath((24-Ee)/2,(24-oe)/2,Ee,oe,(24-Ee)/2+2,(24-oe)/2+2,Ee-4,oe-4));Fe.appendChild(Ot);var ut=lt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);ut.appendChild(lt.createTSpan(V+":"+Y)),Fe.appendChild(ut);var Ft=ut.getBBox();lt.setAttributes(ut,[["x",((24-Ft.width)/2).toString()],["y",((24-Ft.height)/2-Ft.y).toString()]]);var Xt=lt.createPath(lt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Ft.width))/2,(24-Math.ceil(Ft.height))/2,Math.ceil(Ft.width),Math.ceil(Ft.height)));return xt.appendChild(Xt),lt.setAttributes(Ot,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Fe),Fe.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},ue}(),Jt=function(ue){function V(Y,ie,Ee){var oe=ue.call(this,Y,ie)||this;return oe.isDropdownOpen=!1,oe.onClick=oe.dropdownButtonClicked,oe.dropdownButtons=Ee,oe}return ht(V,ue),V.prototype.setupDropdown=function(){var Y=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ie){ie.className=Y.className,ie.colorsClassName=Y.colorsClassName,Y.dropdownBlock.appendChild(ie.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},V.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},V.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},V.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},V.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},V.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},V}(Ut),kt=function(){function ue(V,Y){this.GRIP_SIZE=10,this.color=V,this.fillColor=Y,this.visual=lt.createGroup(),this.visual.appendChild(lt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(lt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ue.prototype.ownsTarget=function(V){return V===this.visual||V===this.visual.childNodes[0]||V===this.visual.childNodes[1]},ue.prototype.setCenter=function(V,Y){this.visual.childNodes.forEach(function(ie){return lt.setAttributes(ie,[["cx",V.toString()],["cy",Y.toString()]])})},ue}(),zt=function(){function ue(V,Y,ie,Ee){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this._zoomToCropEnabled=!1,this.cropRectChanged=!1,this.canvasWidth=V,this.canvasHeight=Y,this.margin=ie,this.container=Ee,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(ue.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(V){this._aspectRatio=V,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(V){this._isGridVisible=V,this.gridContainer&<.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(V){this._zoomFactor=V,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"zoomToCropEnabled",{set:function(V){this._zoomToCropEnabled=V},enumerable:!1,configurable:!0}),ue.prototype.open=function(){var V=this;this.cropShadeElement=lt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=lt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var Y=0;Y<this.numberOfGridLines;Y++)this.horizontalGridLines.push(lt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(lt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(ie){return V.gridContainer.appendChild(ie)}),this.verticalGridLines.forEach(function(ie){return V.gridContainer.appendChild(ie)}),this.cropRectElement=lt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new kt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new kt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new kt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new kt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},ue.prototype.setCropRectangle=function(V){this.cropRect=V;var Y=Object.assign({},this.cropRect);this._zoomToCropEnabled&&(Y.width=this.cropRect.width*this.zoomFactor,Y.height=this.cropRect.height*this.zoomFactor,Y.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-Y.width/2,Y.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-Y.height/2),lt.setAttributes(this.cropRectElement,[["x",Y.x.toString()],["y",Y.y.toString()],["width",Y.width.toString()],["height",Y.height.toString()]]);var ie=Y.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(oe,Fe){var tt=Y.y+ie*(Fe+1);lt.setAttributes(oe,[["x1",""+Y.x],["y1",""+tt],["x2",""+(Y.x+Y.width)],["y2",""+tt]])});var Ee=Y.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(oe,Fe){var tt=Y.x+Ee*(Fe+1);lt.setAttributes(oe,[["x1",""+tt],["y1",""+Y.y],["x2",""+tt],["y2",""+(Y.y+Y.height)]])}),lt.setAttributes(this.cropShadeElement,[["d",lt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,Y.x,Y.y,Y.width,Y.height)]]),this.topLeftGrip.setCenter(Y.x,Y.y),this.topRightGrip.setCenter(Y.x+Y.width,Y.y),this.bottomLeftGrip.setCenter(Y.x,Y.y+Y.height),this.bottomRightGrip.setCenter(Y.x+Y.width,Y.y+Y.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},ue.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},ue.prototype.clientToLocalCoordinates=function(V,Y){var ie=this.container.getBoundingClientRect();return{x:V-ie.left+this.margin,y:Y-ie.top+this.margin}},ue.prototype.onPointerDown=function(V){this.container.setPointerCapture(V.pointerId),this.previousPoint=this.clientToLocalCoordinates(V.clientX,V.clientY),this.cropRectElement===V.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(V.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(V.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(V.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(V.target)&&(this.activeGrip=this.bottomRightGrip)},ue.prototype.onPointerMove=function(V){if(this.isMoving)this.move(this.clientToLocalCoordinates(V.clientX,V.clientY));else if(this.activeGrip){var Y=this.clientToLocalCoordinates(V.clientX,V.clientY);this.resize(Y)}V.preventDefault()},ue.prototype.onPointerUp=function(V){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(V.pointerId)},ue.prototype.move=function(V){var Y=V.x-this.previousPoint.x,ie=V.y-this.previousPoint.y;this.zoomFactor!==1&&(Y=-Y/this.zoomFactor,ie=-ie/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+Y),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ie),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=V},ue.prototype.resize=function(V){var Y=Object.assign({},this.cropRect),ie=V.x-this.previousPoint.x,Ee=V.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:Y.x+ie<this.margin&&(ie=this.margin-Y.x),Y.x+=ie,Y.width=this.cropRect.x+this.cropRect.width-Y.x;break;case this.bottomRightGrip:case this.topRightGrip:Y.width+ie>this.canvasWidth*this.zoomFactor&&(ie=this.canvasWidth*this.zoomFactor-Y.width),Y.width+=ie}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(Y.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ie),Y.height=this.aspectRatio.getVerticalLength(Y.width)):(Y.y+=Ee,Y.height=this.cropRect.y+this.cropRect.height-Y.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?Y.height=this.aspectRatio.getVerticalLength(Y.width):Y.height+=Ee}Y.width<10&&(Y.x=this.cropRect.x,Y.width=10),Y.height<10&&(Y.y=this.cropRect.y,Y.height=10),this.previousPoint=V,Y.x>=this.margin&&Y.y>=this.margin&&Math.floor(Y.x-this.margin+Y.width)<=Math.ceil(this.canvasWidth)&&Math.floor(Y.y-this.margin+Y.height)<=Math.ceil(this.canvasHeight)&&(this.cropRect=Y,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},ue.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var V=this.cropRect.x+this.cropRect.width/2,Y=this.cropRect.y+this.cropRect.height/2,ie=this.aspectRatio.getHorizontalLength(this.cropRect.height),Ee=this.aspectRatio.getVerticalLength(this.cropRect.width);ie/this.canvasWidth<Ee/this.canvasHeight?this.cropRect.width=ie:this.cropRect.height=Ee,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=V-this.cropRect.width/2,this.cropRect.y=Y-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},ue.prototype.getRescaledRect=function(V,Y,ie,Ee,oe,Fe){var tt=ie/V,xt=Ee/Y;return{x:(oe.x-Fe)*tt+Fe,y:(oe.y-Fe)*xt+Fe,width:oe.width*tt,height:oe.height*xt}},ue.prototype.scaleCanvas=function(V,Y){var ie=this.getRescaledRect(this.canvasWidth,this.canvasHeight,V,Y,this.cropRect,this.margin);this.canvasWidth=V,this.canvasHeight=Y,this.onCropChange&&this.onCropChange(ie),this.setCropRectangle(ie)},ue}(),st=function(){function ue(V){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=V,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(ue.prototype,"angle",{get:function(){return this._angle},set:function(V){this._angle=V,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),ue.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.setAttribute("role","button"),this.controlContainer.setAttribute("aria-label",this.title),this.controlContainer.setAttribute("data-action",this.title),this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},ue.prototype.onPointerDown=function(V){this.controlContainer.setPointerCapture(V.pointerId),this.isDragging=!0,this.previousPoint={x:V.clientX,y:V.clientY}},ue.prototype.onPointerMove=function(V){this.isDragging&&(this.onAngleChange&&this.onAngleChange((V.clientX-this.previousPoint.x)/5),this.previousPoint.x=V.clientX)},ue.prototype.onPointerUp=function(V){this.isDragging&&this.onAngleChange&&this.onAngleChange((V.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(V.pointerId)},ue.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var V=this.angleLabelText.getBBox();lt.setAttributes(this.angleLabelElement,[["x",((this.width-V.width)/2).toString()],["y",(this.height/2).toString()]])}},ue.prototype.positionScaleShape=function(){if(this.scaleShape){var V=this.scaleShape.transform.baseVal.getItem(0);V.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(V,0)}},ue.prototype.getVisual=function(){var V=document.createElementNS("http://www.w3.org/2000/svg","svg");V.setAttribute("xmlns","http://www.w3.org/2000/svg"),V.setAttribute("width",this.width+"px"),V.setAttribute("height",this.height+"px"),V.setAttribute("viewBox","0 0 "+this.width+" "+this.height),V.style.flexShrink="0",document.body.appendChild(V);for(var Y="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ie=1;ie<=this.width/5+10;ie++){var Ee=ie%5==0?this.height/3:this.height/6;Y+="h4v"+-Ee+"h1v"+Ee}Y+="v1H0Z",this.scaleShape=lt.createPath(Y);var oe=lt.createTransform();this.scaleShape.transform.baseVal.appendItem(oe),V.appendChild(this.scaleShape),this.angleLabelElement=lt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=lt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Fe=lt.createTSpan("");return Fe.innerHTML="°",this.angleLabelElement.appendChild(Fe),V.appendChild(this.angleLabelElement),document.body.removeChild(V),V},ue}(),pt=function(){function ue(){this.naturalSize=!1,this.imageType="image/png",this.rasterize=this.rasterize.bind(this)}return ue.prototype.rasterize=function(V,Y,ie,Ee,oe,Fe,tt){var xt=this;return new Promise(function(Ot){var ut=document.createElement("canvas");ut.width=V.width.baseVal.value-2*Ee,ut.height=V.height.baseVal.value-2*Ee;var Ft=1,Xt=1;if(xt.naturalSize===!0?(Ft=Math.abs(Y.naturalWidth/(V.width.baseVal.value-2*Ee)/Fe),Xt=Math.abs(Y.naturalHeight/(V.height.baseVal.value-2*Ee)/tt),ut.width=Math.abs(Y.naturalWidth/Fe),ut.height=Math.abs(Y.naturalHeight/tt)):xt.width!==void 0&&xt.height!==void 0&&(Ft=xt.width/ie.width,Xt=xt.height/ie.height,ut.width*=Ft,ut.height*=Xt),xt.maxSize!==void 0&&ut.width*ut.height>=xt.maxSize){var er=ut.width*ut.height,nr=Math.sqrt(xt.maxSize/er);Ft*=nr,Xt*=nr,ut.width*=nr,ut.height*=nr}var ur=ut.getContext("2d");ur.translate(ut.width/2,ut.height/2),ur.rotate(oe*Math.PI/180),ur.scale(Fe,tt),ur.translate(-ut.width/2,-ut.height/2),ur.drawImage(Y,0,0,ut.width,ut.height);var fr=document.createElement("canvas");fr.width=ie.width*Ft,fr.height=ie.height*Xt,fr.getContext("2d").putImageData(ur.getImageData((ie.x-Ee)*Ft,(ie.y-Ee)*Xt,ie.width*Ft,ie.height*Xt),0,0),Ot(fr.toDataURL(xt.imageType,xt.imageQuality))})},ue}(),Ct=function(){function ue(V){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this.stateChangeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this.previousState="",this._instanceNo=ue.instanceCounter++,this.styles=new _t(this.instanceNo),this.target=V,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this),this.renderState=this.renderState.bind(this),this.addStateChangeEventListener=this.addStateChangeEventListener.bind(this),this.removeStateChangeEventListener=this.removeStateChangeEventListener.bind(this),this.onStateChanged=this.onStateChanged.bind(this)}return Object.defineProperty(ue.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(V){this._zoomToCropEnabled=V,this.cropLayer!==void 0&&(this.cropLayer.zoomToCropEnabled=this._zoomToCropEnabled),V?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(V){this._isGridVisible=V,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"gridLines",{get:function(){return this._gridLines},set:function(V){this._gridLines=V,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(V){this._rotationAngle=V,this.straightener&&(this.straightener.angle=this._rotationAngle),this.onStateChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"aspectRatio",{get:function(){var V;return(V=this._aspectRatio)!==null&&V!==void 0?V:this.aspectRatios[0]},set:function(V){this._aspectRatio=V},enumerable:!1,configurable:!0}),ue.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},ue.prototype.show=function(){this.showUI(),this.open()},ue.prototype.close=function(V){V===void 0&&(V=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),V||this.closeEventListeners.forEach(function(Y){return Y()}),this._isOpen=!1)},ue.prototype.addRenderEventListener=function(V){this.renderEventListeners.push(V)},ue.prototype.removeRenderEventListener=function(V){this.renderEventListeners.indexOf(V)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(V),1)},ue.prototype.addCloseEventListener=function(V){this.closeEventListeners.push(V)},ue.prototype.removeCloseEventListener=function(V){this.closeEventListeners.indexOf(V)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(V),1)},ue.prototype.addStateChangeEventListener=function(V){this.stateChangeEventListeners.push(V)},ue.prototype.removeStateChangeEventListener=function(V){this.stateChangeEventListeners.indexOf(V)>-1&&this.stateChangeEventListeners.splice(this.stateChangeEventListeners.indexOf(V),1)},ue.prototype.setupResizeObserver=function(){var V=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){V.resize(V.target.clientWidth,V.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},ue.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var V=1*this.target.clientWidth/this.target.clientHeight,Y=this.contentDiv.clientWidth/V>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*V:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ie=Y+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/V;this.resize(Y,ie)}},ue.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ue.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",lt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},ue.prototype.resize=function(V,Y){this.imageWidth=Math.round(V),this.imageHeight=Math.round(Y),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation(),this.onStateChanged()},ue.prototype.setEditingTarget=function(){lt.setAttributes(this.editingTarget,[["href",this.target.src]]),this.setEditingTargetSize()},ue.prototype.setTopLeft=function(){var V=this.target.getBoundingClientRect(),Y=this.editorCanvas.getBoundingClientRect();this.left=V.left-Y.left-this.CANVAS_MARGIN,this.top=V.top-Y.top-this.CANVAS_MARGIN},ue.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=lt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=lt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=lt.createGroup(),this.editingTargetRotationScaleContainer=lt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var V=lt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(V);var Y=lt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(Y),this.editingTargetContainer=lt.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},ue.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},ue.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=lt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new zt(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.zoomToCropEnabled=this.zoomToCropEnabled,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},ue.prototype.zoomToCrop=function(){if(this.cropRect){var V=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,Y=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=V+"px "+Y+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-V+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-Y+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},ue.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},ue.prototype.cropRectChanged=function(V){this.cropRect=V,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1,this.onStateChanged()},ue.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},ue.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},ue.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ue.prototype.showUI=function(){var V,Y;switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var ie=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,Ee=this.target.offsetTop>ie+this.CANVAS_MARGIN?this.target.offsetTop-(ie+this.CANVAS_MARGIN):0;Ee+=(V=this.uiOffsetTop)!==null&&V!==void 0?V:0;var oe=this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0;oe+=(Y=this.uiOffsetLeft)!==null&&Y!==void 0?Y:0,this.coverDiv.style.top=Ee+"px",this.coverDiv.style.left=oe+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.processingUi=document.createElement("div"),this.processingUi.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: none; display: block; shape-rendering: auto;" width="50px" height="50px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
|
|
<rect x="19" y="19" width="20" height="20" fill="#eeeeee">
|
|
|
<animate attributeName="fill" values="#888888;#eeeeee;#eeeeee" keyTimes="0;0.125;1" dur="1s" repeatCount="indefinite" begin="0s" calcMode="discrete"></animate>
|
|
|
</rect><rect x="40" y="19" width="20" height="20" fill="#eeeeee">
|
|
|
<animate attributeName="fill" values="#888888;#eeeeee;#eeeeee" keyTimes="0;0.125;1" dur="1s" repeatCount="indefinite" begin="0.125s" calcMode="discrete"></animate>
|
|
|
</rect><rect x="61" y="19" width="20" height="20" fill="#eeeeee">
|
|
|
<animate attributeName="fill" values="#888888;#eeeeee;#eeeeee" keyTimes="0;0.125;1" dur="1s" repeatCount="indefinite" begin="0.25s" calcMode="discrete"></animate>
|
|
|
</rect><rect x="19" y="40" width="20" height="20" fill="#eeeeee">
|
|
|
<animate attributeName="fill" values="#888888;#eeeeee;#eeeeee" keyTimes="0;0.125;1" dur="1s" repeatCount="indefinite" begin="0.875s" calcMode="discrete"></animate>
|
|
|
</rect><rect x="61" y="40" width="20" height="20" fill="#eeeeee">
|
|
|
<animate attributeName="fill" values="#888888;#eeeeee;#eeeeee" keyTimes="0;0.125;1" dur="1s" repeatCount="indefinite" begin="0.375s" calcMode="discrete"></animate>
|
|
|
</rect><rect x="19" y="61" width="20" height="20" fill="#eeeeee">
|
|
|
<animate attributeName="fill" values="#888888;#eeeeee;#eeeeee" keyTimes="0;0.125;1" dur="1s" repeatCount="indefinite" begin="0.75s" calcMode="discrete"></animate>
|
|
|
</rect><rect x="40" y="61" width="20" height="20" fill="#eeeeee">
|
|
|
<animate attributeName="fill" values="#888888;#eeeeee;#eeeeee" keyTimes="0;0.125;1" dur="1s" repeatCount="indefinite" begin="0.625s" calcMode="discrete"></animate>
|
|
|
</rect><rect x="61" y="61" width="20" height="20" fill="#eeeeee">
|
|
|
<animate attributeName="fill" values="#888888;#eeeeee;#eeeeee" keyTimes="0;0.125;1" dur="1s" repeatCount="indefinite" begin="0.5s" calcMode="discrete"></animate>
|
|
|
</rect>
|
|
|
</svg>`,this.processingUi.style.position="absolute",this.processingUi.style.width="100%",this.processingUi.style.height="100%",this.processingUi.style.backgroundColor="rgba(0,0,0,0.3)",this.processingUi.style.alignItems="center",this.processingUi.style.justifyContent="center",this.processingUi.style.display="none",this.editorCanvas.appendChild(this.processingUi),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},ue.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},ue.prototype.addTopToolbar=function(){var V=this;this.topToolbar=new ct,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var Y=new gt;Y.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(Y);var ie=[];this.aspectRatios.forEach(function(Xt){var er=new Ut(St.getIcon(Xt.horizontal,Xt.vertical),Xt.horizontal===0&&Xt.vertical===0?"FREE":Xt.horizontal+":"+Xt.vertical);er.onClick=function(){return V.ratioButtonClicked(Xt)},ie.push(er)}),this.aspectRatioButton=new Jt(St.getIcon(0,0),"Aspect ratio",ie),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,Y.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var Ee=new Ut('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");Ee.isActive=this.isGridVisible,Ee.onClick=function(){V.isGridVisible=!V.isGridVisible,Ee.isActive=V.isGridVisible},Y.addButton(Ee);var oe=new Ut('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(oe.isActive=this.zoomToCropEnabled,oe.onClick=function(){V.zoomToCropEnabled=!V.zoomToCropEnabled,oe.isActive=V.zoomToCropEnabled},Y.addButton(oe),!wt.isLicensed){var Fe=new Lt;this.topToolbar.addElementBlock(Fe);var tt=document.createElement("div");tt.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var xt=document.createElement("a");xt.style.color="currentColor",xt.href="https://markerjs.com/products/cropro",xt.target="_blank",xt.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',tt.appendChild(xt),Fe.addElement(tt)}var Ot=new gt;Ot.minWidth=3*this.toolbarHeight+"px",Ot.contentAlign="end",this.topToolbar.addButtonBlock(Ot);var ut=new Ut('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");ut.onClick=function(){V.processingUi.style.display="flex",setTimeout(V.startRenderAndClose,100)},Ot.addButton(ut),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(ut.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Ft=new Ut('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");Ft.onClick=this.close,Ot.addButton(Ft),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Ft.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},ue.prototype.addBottomToolbar=function(){var V=this;this.bottomToolbar=new ct,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var Y=new gt;Y.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(Y);var ie=new Ut('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");ie.onClick=this.rotateLeftButtonClicked,Y.addButton(ie);var Ee=new Ut('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");Ee.onClick=this.rotateRightButtonClicked,Y.addButton(Ee);var oe=new Lt;oe.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(oe),this.straightener=new st("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(Ot){V.rotateBy(Ot),V.straightener.angle=V.rotationAngle},oe.addElement(this.straightener.getUI());var Fe=new gt;Fe.minWidth=2*this.toolbarHeight+"px",Fe.contentAlign="end",this.bottomToolbar.addButtonBlock(Fe);var tt=new Ut('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");tt.onClick=this.flipHorizontallyButtonClicked,Fe.addButton(tt);var xt=new Ut('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");xt.onClick=this.flipVerticallyButtonClicked,Fe.addButton(xt)},ue.prototype.ratioButtonClicked=function(V){this.aspectRatio=V,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},ue.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=St.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},ue.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new It(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0,this.onStateChanged())},ue.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ue.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},ue.prototype.restoreState=function(V){if(V){var Y=this.cropLayer.getRescaledRect(V.width,V.height,this.imageWidth,this.imageHeight,V.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(Y),this.cropRectChanged(Y),this.flippedHorizontally=V.flippedHorizontally,this.flippedVertically=V.flippedVertically,this.applyFlip(),this.rotationAngle=V.rotationAngle,this.applyRotation(),this.onStateChanged()}},ue.prototype.renderState=function(V){this.displayMode="inline",this.isOpen||this.show(),this.restoreState(V),this.startRenderAndClose()},ue.prototype.clientToLocalCoordinates=function(V,Y){var ie=this.cropImage.getBoundingClientRect();return{x:V-ie.left,y:Y-ie.top}},ue.prototype.onWindowResize=function(){this.positionUI()},ue.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var V=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=V+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},ue.prototype.rotateLeftButtonClicked=function(){var V=this.rotationAngle-90;this.rotationAngle%90!=0&&(V+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(V)},ue.prototype.rotateRightButtonClicked=function(){var V=this.rotationAngle+90;this.rotationAngle%90!=0&&(V-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(V)},ue.prototype.rotateTo=function(V){V=(V=V>180?V-360:V)<=-180?V+360:V,this.rotationAngle=V,this.applyRotation()},ue.prototype.rotateBy=function(V){this.rotateTo((this.rotationAngle+V)%360)},ue.prototype.applyRotation=function(){var V=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var Y=this.editingTargetRotationContainer.transform.baseVal.getItem(0);Y.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(Y,0);var ie=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ie.width,this.imageHeight/ie.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=V},ue.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},ue.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},ue.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")",this.onStateChanged()},ue.prototype.startRenderAndClose=function(){return Rt(this,void 0,void 0,function(){var V,Y;return Wt(this,function(ie){switch(ie.label){case 0:return[4,this.render()];case 1:return V=ie.sent(),Y=this.getState(),this.renderEventListeners.forEach(function(Ee){return Ee(V,Y)}),this.close(!0),[2]}})})},ue.prototype.render=function(){return Rt(this,void 0,void 0,function(){var V,Y;return Wt(this,function(ie){switch(ie.label){case 0:return(V=new pt).naturalSize=this.renderAtNaturalSize,V.imageType=this.renderImageType,V.imageQuality=this.renderImageQuality,V.width=this.renderWidth,V.height=this.renderHeight,V.maxSize=this.renderMaxSize,this.unzoomFromCrop(),lt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,V.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return ie.sent(),[4,V.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return Y=ie.sent(),this.processingUi.style.display="none",[2,Y]}})})},ue.prototype.onStateChanged=function(){var V=this.getState(),Y=JSON.stringify(V);this.previousState!==Y&&(this.stateChangeEventListeners.forEach(function(ie){return ie(V)}),this.previousState=Y)},ue.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ht("toolbar",`
|
|
|
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
overflow: hidden;
|
|
|
line-height: 0px;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Ht("toolbar_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ht("toolbar-block",`
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
box-sizing: content-box;
|
|
|
`));var V=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ht("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.toolbarHeight-2*V)+`px;
|
|
|
height: `+(this.toolbarHeight-2*V)+`px;
|
|
|
padding: `+V+`px;
|
|
|
cursor: default;
|
|
|
user-select: none;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_button_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ht("toolbar_active_button",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
|
`)),this.styles.addRule(new jt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new jt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Ht("toolbar_dropdown",`
|
|
|
position: absolute;
|
|
|
max-width: `+4*this.toolbarHeight+`px;
|
|
|
z-index: 20;
|
|
|
white-space: normal;
|
|
|
box-sizing: content-box;
|
|
|
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
|
|
|
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
|
|
|
line-height: 0px;
|
|
|
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Ht("toolbar_dropdown_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ht("toolbar_straightener_block",`
|
|
|
display: flex;
|
|
|
overflow: hidden;
|
|
|
justify-content: center;
|
|
|
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
|
|
|
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new Ht("toolbar_straightener",`
|
|
|
display: flex;
|
|
|
overflow: hidden;
|
|
|
justify-content: center;
|
|
|
height: `+(this.toolbarHeight-2*V)+`px;
|
|
|
padding: `+V+`px;
|
|
|
cursor: default;
|
|
|
user-select: none;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ht("toolbar_straightener_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`))},ue.instanceCounter=0,ue}(),Dt=L("8hTe"),Tt=L.n(Dt),tr=/<pre[^>]*>/g;function yr(ue){var V=document.createElement("div");return V.innerHTML=ue,V.childNodes.length===0?"":V.childNodes[0].nodeValue}var Kt=ee.a=function(ue){var V=ue.value,Y=V===void 0?"":V,ie=ue.edit,Ee=ie===void 0?!1:ie,oe=ue.className,Fe=ue.showTextOnly,tt=ue.showLines,xt=ue.replaces,Ot=ue.zoomImg,ut=ue.hasMask,Ft=ue.style,Xt=Ft===void 0?{}:Ft,er=ue.stylesPrev,nr=er===void 0?{}:er,ur=String(Y),fr=Object(E.useRef)(),Pt=Object(E.useRef)(),sr=Object(E.useState)(""),lr=Object(i.a)(sr,2),br=lr[0],$t=lr[1],$r=Object(E.useState)("office"),jr=Object(i.a)($r,2),Kn=jr[0],Xr=jr[1],pn=function(){var cr=new Ct(Pt.current);cr.displayMode="popup",cr.addRenderEventListener(function(){var Nr=Object(N.a)(e.a.mark(function mr(zr){var Or;return e.a.wrap(function(Wr){for(;;)switch(Wr.prev=Wr.next){case 0:return fr.current.style.display="none",Wr.next=3,Object(re.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:zr}});case 3:Or=Wr.sent,Or!=null&&Or.id&&xt(Pt.current.getAttribute("src").replace(z.a.API_SERVER,""),"/api/attachments/".concat(Or==null?void 0:Or.id,"?type=").concat(Or.content_type));case 5:case"end":return Wr.stop()}},mr)}));return function(mr){return Nr.apply(this,arguments)}}()),cr.show()},rn=function(){var cr=new yt(Pt.current);cr.settings.displayMode="popup",cr.addEventListener("render",function(){var Nr=Object(N.a)(e.a.mark(function mr(zr){var Or;return e.a.wrap(function(Wr){for(;;)switch(Wr.prev=Wr.next){case 0:if(fr.current.style.display="none",!Pt.current){Wr.next=6;break}return Wr.next=4,Object(re.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:zr.dataUrl}});case 4:Or=Wr.sent,Or!=null&&Or.id&&xt(Pt.current.getAttribute("src").replace(z.a.API_SERVER,""),"/api/attachments/".concat(Or==null?void 0:Or.id,"?type=").concat(Or.content_type));case 6:case"end":return Wr.stop()}},mr)}));return function(mr){return Nr.apply(this,arguments)}}()),cr.show(),window.markerArea=cr},Nn=Object(E.useMemo)(function(){fr.current&&(fr.current.style.zIndex=-1);try{var Pr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,cr=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Nr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;ur=ur.replace(Pr,"("+z.a.API_SERVER+"/api/attachments/").replace(cr,'"'+z.a.API_SERVER+"/api/attachments/").replace(Nr,'"'+z.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,`
|
|
|
`)}catch(Vr){}var mr=C(ur),zr=P();if(ur.match(/\[TOC\]/)&&(mr=mr.replace("<p>[TOC]</p>",x()),b()),mr=mr.replace(/(__special_katext_id_\d+__)/g,function(Vr,Wr){var vn=zr[Wr],Dn=vn.type,hr=vn.expression;return Object(q.renderToString)(yr(hr)||"",{displayMode:Dn==="block",throwOnError:!1,output:"html"})}),mr=mr.replace(/▁/g,"\u2581\u2581\u2581"),I(),Fe){var Or=document.createElement("div");return Or.innerHTML=mr,Or.innerText}return setTimeout(function(){return Tn()},500),mr},[ur]),Cr=Object(E.useRef)();m.WebkitLineClamp=tt,tt&&(Xt=Object(K.a)(Object(K.a)({},Xt),m));function nn(Pr){var cr=Pr.target;if(cr.tagName.toUpperCase()==="IMG"){if(Ot){var Nr=cr.getAttribute("src");$t(Nr),Xr("image")}}else if(cr.tagName.toUpperCase()==="A"){var mr=cr.getAttribute("href");if(mr.indexOf("office")>-1)Pr.preventDefault(),$t(mr),Xr("office");else if(mr.indexOf("application/pdf")>-1)Pr.preventDefault(),$t(mr),Xr("pdf");else if(mr.indexOf("text/html")>-1)Pr.preventDefault(),$t(mr),Xr("html");else if(mr.startsWith("#")){Pr.preventDefault();var zr=document.getElementById(mr.replace("#",""));zr&&zr.scrollIntoView(!0)}}}var Tn=function(){var cr,Nr=(cr=Cr.current)===null||cr===void 0?void 0:cr.querySelectorAll("video");Nr==null||Nr.forEach(function(mr){if(mr.oncontextmenu=function(){return!1},mr.src.indexOf(".m3u8")>-1&&!mr.canPlayType("application/vnd.apple.mpegurl")){if(U.a.isSupported()){var zr=new U.a;zr.loadSource(mr.src),zr.attachMedia(mr)}}})};Object(E.useEffect)(function(){if(Cr.current&&Nn&&(Nn.match(tr)&&window.PR.prettyPrint()),Cr.current)return Cr.current.addEventListener("click",nn),function(){Cr.current.removeEventListener("click",nn),I(),b()}},[Nn,Cr.current,nn]);var an=function(cr){if(!Ee)return;cr.target.nodeName==="IMG"?(fr.current.style.zIndex=1,fr.current.style.display="flex",fr.current.style.width=cr.target.clientWidth+"px",fr.current.style.height=cr.target.clientHeight+"px",fr.current.style.top=cr.target.offsetTop+"px",fr.current.style.left=cr.target.offsetLeft+"px",Pt.current.src=cr.target.getAttribute("src")):fr.current.style.display="none"};return l.a.createElement("div",{style:{position:"relative"}},l.a.createElement("div",{ref:Cr,style:Object(K.a)({},Xt),className:"".concat(oe||""," markdown-body ").concat(Tt.a.mdBody),onMouseOver:an,dangerouslySetInnerHTML:{__html:Nn}}),l.a.createElement("div",{ref:fr,className:Tt.a.button},l.a.createElement(M.b,null,l.a.createElement(X.a,{onClick:function(){return pn()}},"\u88C1\u526A"),l.a.createElement(X.a,{onClick:function(){return rn()}},"\u7F16\u8F91"))),l.a.createElement("img",{ref:Pt,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),l.a.createElement($.a,{close:!0,data:br,type:br!=null&&br.length?Kn:"",style:Object(K.a)({},nr),onClose:function(){return $t("")}}))}},"9OqN":function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("OLod"))})(this,function(B){return B.mode.CTR=function(){var M=B.lib.BlockCipherMode.extend(),G=M.Encryptor=M.extend({processBlock:function(X,K){var N=this._cipher,i=N.blockSize,T=this._iv,e=this._counter;T&&(e=this._counter=T.slice(0),this._iv=void 0);var E=e.slice(0);N.encryptBlock(E,0),e[i-1]=e[i-1]+1|0;for(var l=0;l<i;l++)X[K+l]^=E[l]}});return M.Decryptor=G,M}(),B.mode.CTR})},"9VGf":function(W,ee,L){"use strict";L.d(ee,"a",function(){return G});var B=L("T/Jt"),M=L.n(B);function G(X,K){var N=Object(B.useRef)();Object(B.useEffect)(function(){N.current=X}),Object(B.useEffect)(function(){function i(){N.current()}if(K!==null){var T=setInterval(i,K);return function(){return clearInterval(T)}}},[K])}},ALsQ:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("OLod"))})(this,function(B){return B.mode.CFB=function(){var M=B.lib.BlockCipherMode.extend();M.Encryptor=M.extend({processBlock:function(X,K){var N=this._cipher,i=N.blockSize;G.call(this,X,K,i,N),this._prevBlock=X.slice(K,K+i)}}),M.Decryptor=M.extend({processBlock:function(X,K){var N=this._cipher,i=N.blockSize,T=X.slice(K,K+i);G.call(this,X,K,i,N),this._prevBlock=T}});function G(X,K,N,i){var T,e=this._iv;e?(T=e.slice(0),this._iv=void 0):T=this._prevBlock,i.encryptBlock(T,0);for(var E=0;E<N;E++)X[K+E]^=T[E]}return M}(),B.mode.CFB})},B7Ph:function(W,ee,L){"use strict";L.d(ee,"a",function(){return q});var B=L("47JS"),M=L("TOZL"),G=L("P6vI"),X=L("N082"),K=L("YfA7"),N=L("e4Gi"),i=L("6NPb"),T=L("o3AU"),e=L("2yBE"),E=L("5LYH"),l=L("dLI4"),_=L("4d5L"),r=L("c3Iv"),n=L("rBQ5"),o=L("8OG5"),c=L("mgsT"),v=L("YaWb"),f=L("IYef"),y=L("Hqw+"),h=L("nc60"),b=L("sOWs"),m=L("jDAR"),d=L("XXmO"),x=L.n(d),R=L("T/Jt"),O=L.n(R),w=L("Bvq2"),D=L.n(w),A=L("nj2k"),P=L.n(A),I=L("mxV5"),u=L.n(I),k=L("KhGG"),g=L("ErOA"),a=L("7Cbv"),C=L("1vsH"),S=L("p5ED"),p=m.a.Dragger,U=function(re){for(var ce=function(Ce){return Ce&&Ce.substring(0,Ce.lastIndexOf("."))},ne=Object(h.a)(re),me=0,be=[],he=0;he<ne.length;he++){for(var se="",_e=0;_e<be.length;_e++)if(ce(be[_e][0].name)==ce(ne[he].name)){me=1,se=_e;break}if(me==1)be[se].push(ne[he]),me=0;else if(me==0){var De=new Array;De.push(ne[he]),be.push(De)}}var ge=be.map(function(fe){if(fe[0].name.includes(".in"))return fe.length===2?fe:[fe[0],{}];if(fe[0].name.includes(".out"))return fe.length===2?fe.reverse():[{},fe[0]]});return ge},z=function(re){var ce=re.onClose,ne=re.onOK,me=re.visible,be=re.wrapClassName,he=re.rootIdentifier,se=re.multiple,_e=se===void 0?!1:se,De=re.defaultMultipleValue,ge=De===void 0?!0:De,fe=Object(R.useState)([]),Ce=Object(y.a)(fe,2),ae=Ce[0],Q=Ce[1],J=Object(R.useState)({}),Z=Object(y.a)(J,2),pe=Z[0],le=Z[1],ye=Object(R.useState)(!1),Te=Object(y.a)(ye,2),Pe=Te[0],He=Te[1],Oe=Object(R.useState)(!0),Ue=Object(y.a)(Oe,2),je=Ue[0],Ve=Ue[1],Re=Object(R.useState)(null),Xe=Object(y.a)(Re,2),Qe=Xe[0],We=Xe[1],ze=Object(R.useRef)([]),Me=Object(R.useRef)(0),Ie=function(){ce()};Object(R.useEffect)(function(){Be()},[]),Object(R.useEffect)(function(){me&&(ze.current=[],Me.current=0,Q([]),Ve(ge))},[me]);var Be=function(){var $e=Object(f.a)(x.a.mark(function Je(){var qe,ot;return x.a.wrap(function(rt){for(;;)switch(rt.prev=rt.next){case 0:return rt.prev=0,rt.next=3,Object(g.a)("/api/buckets/get_upload_token_for_big_files",{method:"get"});case 3:qe=rt.sent,(qe==null?void 0:qe.status)===0&&(qe!=null&&qe.is_oss?(ot=JSON.parse(Object(k.a)(qe.data)),le(ot),We(!1)):We(!0)),rt.next=9;break;case 7:rt.prev=7,rt.t0=rt.catch(0);case 9:case"end":return rt.stop()}},Je,null,[[0,7]])}));return function(){return $e.apply(this,arguments)}}(),we=function(Je){return Je&&Je.substring(0,Je.lastIndexOf("."))},Ae=function(Je){var qe,ot,at=we((qe=Je[0])===null||qe===void 0?void 0:qe.name)||we((ot=Je[1])===null||ot===void 0?void 0:ot.name),rt=ae.filter(function(dt){return we(dt.name)!==at});ze.current=Object(h.a)(rt),Q(Object(h.a)(rt))},ke=function(Je){if(!je){var qe=new FormData;qe.append("file",Je.file);var ot=Object(g.a)("/api/attachments/get_file_content.json",{method:"post",body:qe},!0);ot.then(function(ht){if(ht.status===0){Me.current=Me.current+1;var Rt=ze.current.map(function(wt){if(wt.name===Je.name){var lt,_t=Object(v.a)({},wt);return Je!=null&&(lt=Je.name)!==null&<!==void 0&<.includes(".in")?_t.input=ht==null?void 0:ht.content:_t.output=ht==null?void 0:ht.content,_t}return wt});if(ze.current=Object(h.a)(Rt),Q(Object(h.a)(Rt)),Me.current>0&&Me.current===ae.length){He(!1);var Wt=U(Rt);Wt=Wt.filter(function(wt){var lt,_t;return!!((lt=wt[0])!==null&<!==void 0&<.name&&(_t=wt[1])!==null&&_t!==void 0&&_t.name)}),Wt=Wt.map(function(wt){return Object(v.a)(Object(v.a)(Object(v.a)({},wt[0]),wt[1]),{},{is_file:!1})}),ne(Wt),ce()}}else He(!1),ce()});return}if(Qe){var at=new FormData;at.append("file",Je.file),at.append("identifier",he);var rt=Object(g.a)("/api/attachments.json",{method:"post",body:at},!0);rt.then(function(ht){if(ht.filename){Me.current=Me.current+1;var Rt=ze.current.map(function(wt){if(wt.name===(ht==null?void 0:ht.filename)){var lt,_t=Object(v.a)(Object(v.a)({},wt),{},{is_oss:!Qe});return ht!=null&&(lt=ht.filename)!==null&<!==void 0&<.includes(".in")?(_t.in_object_key=ht==null?void 0:ht.object,_t.in_object_size=ht==null?void 0:ht.size,_t.input=ht==null?void 0:ht.filename,_t.in_file=Je):(_t.out_object_key=ht==null?void 0:ht.object,_t.out_object_size=ht==null?void 0:ht.size,_t.output=ht==null?void 0:ht.filename,_t.out_file=Je),_t}return wt});if(ze.current=Object(h.a)(Rt),Q(Object(h.a)(Rt)),Me.current>0&&Me.current===ae.length){He(!1);var Wt=U(Rt);Wt=Wt.filter(function(wt){var lt,_t;return!!((lt=wt[0])!==null&<!==void 0&<.name&&(_t=wt[1])!==null&&_t!==void 0&&_t.name)}),Wt=Wt.map(function(wt){return Object(v.a)(Object(v.a)(Object(v.a)({},wt[0]),wt[1]),{},{is_file:!0})}),ne(Wt),ce()}}else He(!1),ce()});return}var dt=new u.a({endpoint:pe.end_point,region:pe.region,accessKeyId:pe.access_key_id,accessKeySecret:pe.access_key_secret,bucket:pe.bucket,stsToken:pe.security_token}),nt=Je.name,mt={container_type:"TestSet",file_name:nt},yt=Object(a.a)(),ft="testsets/".concat(he,"/").concat(yt).concat(nt.indexOf(".")>-1?"."+nt.split(".").pop():"");he===null&&(ft="testsets/".concat(yt).concat(nt.indexOf(".")>-1?"."+nt.split(".").pop():"")),dt.multipartUpload(ft,new Blob([Je.file],{type:Je.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:nt+""},url:pe==null?void 0:pe.callback_url,host:pe==null?void 0:pe.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(g.e)(mt)}}).then(function(ht){if(ht.data.status===0){Me.current=Me.current+1;var Rt=ze.current.map(function(wt){var lt,_t;if(wt.name===((lt=ht.data)===null||lt===void 0||((_t=lt.data)===null||_t===void 0)?void 0:_t.file_name)){var jt,Ht,ct,bt=Object(v.a)(Object(v.a)({},wt),{},{is_oss:!Qe});if((jt=ht.data)!==null&&jt!==void 0&&(Ht=jt.data)!==null&&Ht!==void 0&&(ct=Ht.file_name)!==null&&ct!==void 0&&ct.includes(".in")){var gt,Ut,Lt,It,St,Jt;bt.in_object_key=(gt=ht.data)===null||gt===void 0||((Ut=gt.data)===null||Ut===void 0)?void 0:Ut.object,bt.in_object_size=(Lt=ht.data)===null||Lt===void 0||((It=Lt.data)===null||It===void 0)?void 0:It.size,bt.input=(St=ht.data)===null||St===void 0||((Jt=St.data)===null||Jt===void 0)?void 0:Jt.file_name,bt.in_file=Je}else{var kt,zt,st,pt,Ct,Dt;bt.out_object_key=(kt=ht.data)===null||kt===void 0||((zt=kt.data)===null||zt===void 0)?void 0:zt.object,bt.out_object_size=(st=ht.data)===null||st===void 0||((pt=st.data)===null||pt===void 0)?void 0:pt.size,bt.output=(Ct=ht.data)===null||Ct===void 0||((Dt=Ct.data)===null||Dt===void 0)?void 0:Dt.file_name,bt.out_file=Je}return bt}return wt});if(ze.current=Object(h.a)(Rt),Q(Object(h.a)(Rt)),Me.current>0&&Me.current===ae.length){He(!1);var Wt=U(Rt);Wt=Wt.filter(function(wt){var lt,_t;return!!((lt=wt[0])!==null&<!==void 0&<.name&&(_t=wt[1])!==null&&_t!==void 0&&_t.name)}),Wt=Wt.map(function(wt){return Object(v.a)(Object(v.a)(Object(v.a)({},wt[0]),wt[1]),{},{is_file:!0})}),ne(Wt),ce()}}})},Le=function(Je){return new Promise(function(qe,ot){for(var at=0,rt=[],dt=function(yt){Je[yt].file.slice(0,1).arrayBuffer().then(function(){at++,at===Je.length&&(rt.length?(c.b.warn("".concat(rt.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),ot()):qe(Je))}).catch(function(ft){console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",ft),at++,rt.push(Je[yt].name),at===Je.length&&(rt.length?(c.b.warn("".concat(rt.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),ot()):qe(Je))})},nt=0;nt<Je.length;nt++)dt(nt)})},Ke=function(){var $e=Object(f.a)(x.a.mark(function Je(){var qe;return x.a.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(!(ae.length===0)){at.next=3;break}return c.b.warn("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6"),at.abrupt("return");case 3:return at.next=5,Le(ae);case 5:if(He(!0),qe=U(ae),!qe.some(function(rt){var dt,nt;return!((dt=rt[0])!==null&&dt!==void 0&&dt.name&&(nt=rt[1])!==null&&nt!==void 0&&nt.name)})){at.next=10;break}return n.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u4E0A\u4F20\u7684\u6D4B\u8BD5\u7528\u4F8B\u4E2D\u5B58\u5728\u672A\u914D\u5BF9\u7684\u6587\u4EF6\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4EC5\u4FDD\u5B58\u5DF2\u914D\u5BF9\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF1F",onOk:function(){var rt=Object(f.a)(x.a.mark(function nt(){return x.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:ae.map(function(){var ft=Object(f.a)(x.a.mark(function ht(Rt){return x.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:ke(Rt);case 1:case"end":return wt.stop()}},ht)}));return function(ht){return ft.apply(this,arguments)}}());case 1:case"end":return yt.stop()}},nt)}));function dt(){return rt.apply(this,arguments)}return dt}(),onCancel:function(){He(!1)}}),at.abrupt("return");case 10:ae.map(function(){var rt=Object(f.a)(x.a.mark(function dt(nt){return x.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:ke(nt);case 1:case"end":return yt.stop()}},dt)}));return function(dt){return rt.apply(this,arguments)}}());case 11:case"end":return at.stop()}},Je)}));return function(){return $e.apply(this,arguments)}}(),Ze={name:"file",fileList:ae,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:function(Je){if(ae!=null&&ae.some(function(ot){return ot.name===Je.name}))return c.b.info("".concat(Je.name,"\u6587\u4EF6\u5DF2\u5B58\u5728")),!1;if(Je.size/1024/1024>100)return c.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(Je.name))return c.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var qe={name:Je.name,uid:Je.uid,file:Je,percent:0};return ae.push(qe),ze.current=Object(h.a)(ae),Q(Object(h.a)(ae)),!1}},Ne=U(ae);return console.log(ae,Ne,"fileList"),O.a.createElement(n.a,{visible:me,wrapClassName:be,onOk:Ke,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:Pe},onCancel:Ie,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},O.a.createElement("div",{className:D.a.wrap},ae.length?O.a.createElement("div",null,O.a.createElement(T.a,{justify:"space-between",align:"middle",className:"mb20"},O.a.createElement("div",{style:{visibility:_e?"visible":"hidden"}},"\u6D4B\u8BD5\u7528\u4F8B\u7C7B\u578B\uFF1A",O.a.createElement(E.a.Group,{className:"ml10",value:je,onChange:function(Je){return Ve(Je.target.value)}},O.a.createElement(E.a,{value:!1},"\u6587\u672C"),O.a.createElement(E.a,{value:!0},"\u6587\u4EF6"))),O.a.createElement(m.a,Ze,O.a.createElement(_.a,{className:D.a.btnS},"\u4E0A\u4F20\u6587\u4EF6"))),O.a.createElement(q,{data:Ne,onRemove:Ae})):O.a.createElement("div",{className:D.a.noData},O.a.createElement("img",{src:P.a,alt:""}),O.a.createElement(m.a,Ze,O.a.createElement(_.a,{className:D.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),O.a.createElement("div",{className:D.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",O.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",O.a.createElement("br",null),"2\u3001\u4E0A\u4F20\u7684\u6587\u4EF6\u7F16\u7801\u4EC5\u652F\u6301UTF-8\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6587\u672C\u4E71\u7801\u3002",O.a.createElement("br",null),"3\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",O.a.createElement("br",null),"4\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002",O.a.createElement("br",null))))},q=function(re){var ce=re.data,ne=ce===void 0?[]:ce,me=re.onRemove,be=re.width,he=be===void 0?"auto":be,se=re.showScore,_e=se===void 0?!1:se,De=re.disabled,ge=De===void 0?!1:De,fe=re.inputChange,Ce=re.onEvaluatingChange,ae=re.showEvaluatingSetting,Q=ae===void 0?!1:ae,J={value:"",filename:"",dataUrl:""},Z=Object(R.useState)(Object(v.a)({},J)),pe=Object(y.a)(Z,2),le=pe[0],ye=pe[1],Te=function(Ue){var je=document.createElement("a");document.body.appendChild(je);var Ve=URL.createObjectURL(Ue.file);je.href=Ve,je.download=Ue.name,je.click(),URL.revokeObjectURL(Ve),document.body.removeChild(je)},Pe=function(Ue,je){Object(C.y)(Ue,je)},He=function(Ue,je){n.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:O.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){me(Ue,je)},onCancel:function(){}})};return ne.length?O.a.createElement("div",{style:{width:he}},O.a.createElement("div",{className:D.a.head},Q&&O.a.createElement("div",{style:{width:"10%"}},"\u9690\u85CF",O.a.createElement(N.a,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},O.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),O.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),O.a.createElement("div",{style:{width:_e?"25%":"35%",padding:"0 12px"}},"\u8F93\u5165"),O.a.createElement("div",{style:{width:_e?"25%":"35%",padding:"0 12px"}},"\u8F93\u51FA"),_e&&O.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),Q&&O.a.createElement("div",{style:{width:"20%"}},"\u9884\u671F\u8F93\u51FA",O.a.createElement(N.a,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},O.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),Q&&O.a.createElement("div",{style:{width:"20%"}},"\u7279\u6B8A\u5224\u5B9A",O.a.createElement(N.a,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},O.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),O.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),ne.map(function(Oe,Ue){var je,Ve,Re,Xe;return O.a.createElement("div",{key:Ue,className:D.a.list},Q&&O.a.createElement("div",{style:{width:"10%"}},O.a.createElement(X.a,{checked:!!Oe.hidden,onChange:function(We){Ce(We.target.checked?1:0,Ue,"hidden")}})),O.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",Ue+1),O.a.createElement("div",{className:D.a.info,style:{width:_e?"25%":"35%"}},O.a.createElement("span",{title:Oe.input||((je=Oe[0])===null||je===void 0?void 0:je.name),onClick:Object(f.a)(x.a.mark(function Qe(){var We,ze;return x.a.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(Oe.input?Oe.input_file_url?We=Oe.input_file_url:We=Oe.in_file:We=Oe[0],!(typeof We=="string")){Ie.next=14;break}return Ie.next=4,fetch(We,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return ze=Ie.sent,Ie.t0=ye,Ie.next=8,ze.text();case 8:Ie.t1=Ie.sent,Ie.t2=We,Ie.t3={value:Ie.t1,filename:"",dataUrl:Ie.t2},(0,Ie.t0)(Ie.t3),Ie.next=18;break;case 14:return Ie.next=16,Object(C.H)(We.file);case 16:ze=Ie.sent,ye({value:ze.text,filename:We.name,dataUrl:ze.link});case 18:case"end":return Ie.stop()}},Qe)}))},Oe.input||((Ve=Oe[0])===null||Ve===void 0?void 0:Ve.name))),O.a.createElement("div",{className:D.a.info,style:{width:_e?"25%":"35%"}},O.a.createElement("span",{title:Oe.output||((Re=Oe[1])===null||Re===void 0?void 0:Re.name),onClick:Object(f.a)(x.a.mark(function Qe(){var We,ze;return x.a.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(Oe.input?Oe.output_file_url?We=Oe.output_file_url:We=Oe.out_file:We=Oe[1],!(typeof We=="string")){Ie.next=14;break}return Ie.next=4,fetch(We,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return ze=Ie.sent,Ie.t0=ye,Ie.next=8,ze.text();case 8:Ie.t1=Ie.sent,Ie.t2=We,Ie.t3={value:Ie.t1,filename:"",dataUrl:Ie.t2},(0,Ie.t0)(Ie.t3),Ie.next=18;break;case 14:return Ie.next=16,Object(C.H)(We.file);case 16:ze=Ie.sent,ye({value:ze.text,filename:We.name,dataUrl:ze.link});case 18:case"end":return Ie.stop()}},Qe)}))},Oe.output||((Xe=Oe[1])===null||Xe===void 0?void 0:Xe.name))),_e&&O.a.createElement("div",{style:{width:"20%"}},O.a.createElement(M.a,{disabled:ge,style:{width:"70%"},onChange:function(We){return fe(We,Ue)},value:Oe.score}),O.a.createElement("span",null,"\xA0%")),Q&&O.a.createElement("div",{style:{width:"20%"}},O.a.createElement(X.a,{checked:Oe.is_invisible||!1,onChange:function(We){Ce(We.target.checked,Ue,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),Q&&O.a.createElement("div",{style:{width:"20%"}},O.a.createElement(X.a,{checked:Oe.last_match_rule||!1,onChange:function(We){Ce(We.target.checked,Ue,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),O.a.createElement("div",{onClick:function(){return He(Oe,Ue)},style:{width:"10%"}},O.a.createElement("span",{className:D.a.del},"\u5220\u9664")))}),O.a.createElement(S.a,{close:!0,data:le.dataUrl,filename:le.filename,type:le.dataUrl.length?"txt":"",onClose:function(){return ye(Object(v.a)({},J))},monacoEditor:{value:le.value,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):O.a.createElement(O.a.Fragment,null)};ee.b=z},Bd2K:function(W,ee,L){(function(B){B(L("VrN/"),L("osHv"))})(function(B){B.defineOption("autoCloseTags",!1,function(e,E,l){if(l!=B.Init&&l&&e.removeKeyMap("autoCloseTags"),!E)return;var _={name:"autoCloseTags"};(typeof E!="object"||E.whenClosing!==!1)&&(_["'/'"]=function(r){return N(r)}),(typeof E!="object"||E.whenOpening!==!1)&&(_["'>'"]=function(r){return X(r)}),e.addKeyMap(_)});var M=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],G=["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 X(e){if(e.getOption("disableInput"))return B.Pass;for(var E=e.listSelections(),l=[],_=e.getOption("autoCloseTags"),r=0;r<E.length;r++){if(!E[r].empty())return B.Pass;var n=E[r].head,o=e.getTokenAt(n),c=B.innerMode(e.getMode(),o.state),v=c.state,f=c.mode.xmlCurrentTag&&c.mode.xmlCurrentTag(v),y=f&&f.name;if(!y)return B.Pass;var h=c.mode.configuration=="html",b=typeof _=="object"&&_.dontCloseTags||h&&M,m=typeof _=="object"&&_.indentTags||h&&G;o.end>n.ch&&(y=y.slice(0,y.length-o.end+n.ch));var d=y.toLowerCase();if(!y||o.type=="string"&&(o.end!=n.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&f.close||o.string.indexOf("/")==n.ch-o.start-1||b&&i(b,d)>-1||T(e,c.mode.xmlCurrentContext&&c.mode.xmlCurrentContext(v)||[],y,n,!0))return B.Pass;var x=typeof _=="object"&&_.emptyTags;if(x&&i(x,y)>-1){l[r]={text:"/>",newPos:B.Pos(n.line,n.ch+2)};continue}var R=m&&i(m,d)>-1;l[r]={indent:R,text:">"+(R?`
|
|
|
|
|
|
`:"")+"</"+y+">",newPos:R?B.Pos(n.line+1,0):B.Pos(n.line,n.ch+1)}}for(var O=typeof _=="object"&&_.dontIndentOnAutoClose,r=E.length-1;r>=0;r--){var w=l[r];e.replaceRange(w.text,E[r].head,E[r].anchor,"+insert");var D=e.listSelections().slice(0);D[r]={head:w.newPos,anchor:w.newPos},e.setSelections(D),!O&&w.indent&&(e.indentLine(w.newPos.line,null,!0),e.indentLine(w.newPos.line+1,null,!0))}}function K(e,E){for(var l=e.listSelections(),_=[],r=E?"/":"</",n=e.getOption("autoCloseTags"),o=typeof n=="object"&&n.dontIndentOnSlash,c=0;c<l.length;c++){if(!l[c].empty())return B.Pass;var v=l[c].head,f=e.getTokenAt(v),y=B.innerMode(e.getMode(),f.state),h=y.state;if(E&&(f.type=="string"||f.string.charAt(0)!="<"||f.start!=v.ch-1))return B.Pass;var b,m=y.mode.name!="xml"&&e.getMode().name=="htmlmixed";if(m&&y.mode.name=="javascript")b=r+"script";else if(m&&y.mode.name=="css")b=r+"style";else{var d=y.mode.xmlCurrentContext&&y.mode.xmlCurrentContext(h);if(!d||d.length&&T(e,d,d[d.length-1],v))return B.Pass;b=r+d[d.length-1]}e.getLine(v.line).charAt(f.end)!=">"&&(b+=">"),_[c]=b}if(e.replaceSelections(_),l=e.listSelections(),!o)for(var c=0;c<l.length;c++)(c==l.length-1||l[c].head.line<l[c+1].head.line)&&e.indentLine(l[c].head.line)}function N(e){return e.getOption("disableInput")?B.Pass:K(e,!0)}B.commands.closeTag=function(e){return K(e)};function i(e,E){if(e.indexOf)return e.indexOf(E);for(var l=0,_=e.length;l<_;++l)if(e[l]==E)return l;return-1}function T(e,E,l,_,r){if(!B.scanForClosingTag)return!1;var n=Math.min(e.lastLine()+1,_.line+500),o=B.scanForClosingTag(e,_,null,n);if(!o||o.tag!=l)return!1;for(var c=r?1:0,v=E.length-1;v>=0&&E[v]==l;v--)++c;_=o.to;for(var v=1;v<c;v++){var f=B.scanForClosingTag(e,_,null,n);if(!f||f.tag!=l)return!1;_=f.to}return!0}})},BjJ7:function(W,ee,L){"use strict";L.d(ee,"d",function(){return M}),L.d(ee,"c",function(){return G}),L.d(ee,"e",function(){return X}),L.d(ee,"b",function(){return K}),L.d(ee,"a",function(){return i});var B=L("m3rI");function M(T){var e=!0;if(T.length>0){for(var E=0;E<T.length;E++)if(T[E].compile_success==0||!T[E].compile_success){e=!1;break}}else e=!1;return e}function G(T){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",E=[],l=0;l<T.length;l++){var _=T[l],r=e?"".concat(e,"/").concat(_.name):"".concat(_.name);E.push({title:_.name,isLeaf:!(_.type==="tree"),key:r})}return E}function X(T,e,E){for(var l=0;l<T.length;l++){var _=T[l];if(_.key===e){_.children=E;break}_.children&&X(_.children,e,E)}return T}function K(T,e,E){var l;return function(){var _=this,r=arguments,n=function(){l=null,E||T.apply(_,r)},o=E&&!l;clearTimeout(l),l=setTimeout(n,e),o&&T.apply(_,r)}}var N=!0,i=B.a.API_SERVER},BsWD:function(W,ee,L){"use strict";L.d(ee,"a",function(){return M});var B=L("a3WO");function M(G,X){if(!G)return;if(typeof G=="string")return Object(B.a)(G,X);var K=Object.prototype.toString.call(G).slice(8,-1);if(K==="Object"&&G.constructor&&(K=G.constructor.name),K==="Map"||K==="Set")return Array.from(G);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return Object(B.a)(G,X)}},Bvq2:function(W,ee,L){W.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":function(W,ee,L){},"C/vA":function(W,ee,L){"use strict";L.d(ee,"a",function(){return B});function B(M){const G=this;let X=!1,K;return function(){return X||(X=!0,K=M.apply(G,arguments)),K}}},"Cg/j":function(W,ee,L){"use strict";L.d(ee,"b",function(){return B}),L.d(ee,"a",function(){return M}),L.d(ee,"c",function(){return X}),L.d(ee,"d",function(){return K});var B;(function(N){N.serviceIds=new Map,N.DI_TARGET="$di$target",N.DI_DEPENDENCIES="$di$dependencies";function i(T){return T[N.DI_DEPENDENCIES]||[]}N.getServiceDependencies=i})(B||(B={}));const M=X("instantiationService");function G(N,i,T,e){i[B.DI_TARGET]===i?i[B.DI_DEPENDENCIES].push({id:N,index:T,optional:e}):(i[B.DI_DEPENDENCIES]=[{id:N,index:T,optional:e}],i[B.DI_TARGET]=i)}function X(N){if(B.serviceIds.has(N))return B.serviceIds.get(N);const i=function(T,e,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");G(i,T,E,!1)};return i.toString=()=>N,B.serviceIds.set(N,i),i}function K(N){return function(i,T,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");G(N,i,e,!0)}}},CrYA:function(W,ee,L){var B=L("MFOe"),M=B.Global;W.exports={name:"sessionStorage",read:X,write:K,each:N,remove:i,clearAll:T};function G(){return M.sessionStorage}function X(e){return G().getItem(e)}function K(e,E){return G().setItem(e,E)}function N(e){for(var E=G().length-1;E>=0;E--){var l=G().key(E);e(X(l),l)}}function i(e){return G().removeItem(e)}function T(){return G().clear()}},"DlR+":function(W,ee,L){var B=L("MFOe"),M=B.Global,G=B.trim;W.exports={name:"cookieStorage",read:K,write:i,each:N,remove:T,clearAll:e};var X=M.document;function K(l){if(!l||!E(l))return null;var _="(?:^|.*;\\s*)"+escape(l).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(X.cookie.replace(new RegExp(_),"$1"))}function N(l){for(var _=X.cookie.split(/; ?/g),r=_.length-1;r>=0;r--){if(!G(_[r]))continue;var n=_[r].split("="),o=unescape(n[0]),c=unescape(n[1]);l(c,o)}}function i(l,_){if(!l)return;X.cookie=escape(l)+"="+escape(_)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function T(l){if(!l||!E(l))return;X.cookie=escape(l)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function e(){N(function(l,_){T(_)})}function E(l){return new RegExp("(?:^|;\\s*)"+escape(l).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(X.cookie)}},Dpym:function(W,ee,L){"use strict";var B=L("T/Jt"),M=L.n(B),G=B.createContext(null);ee.a=G},E4JC:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(B){return function(){var M=B,G=M.lib,X=G.StreamCipher,K=M.algo,N=[],i=[],T=[],e=K.Rabbit=X.extend({_doReset:function(){for(var l=this._key.words,_=this.cfg.iv,r=0;r<4;r++)l[r]=(l[r]<<8|l[r]>>>24)&16711935|(l[r]<<24|l[r]>>>8)&4278255360;var n=this._X=[l[0],l[3]<<16|l[2]>>>16,l[1],l[0]<<16|l[3]>>>16,l[2],l[1]<<16|l[0]>>>16,l[3],l[2]<<16|l[1]>>>16],o=this._C=[l[2]<<16|l[2]>>>16,l[0]&4294901760|l[1]&65535,l[3]<<16|l[3]>>>16,l[1]&4294901760|l[2]&65535,l[0]<<16|l[0]>>>16,l[2]&4294901760|l[3]&65535,l[1]<<16|l[1]>>>16,l[3]&4294901760|l[0]&65535];this._b=0;for(var r=0;r<4;r++)E.call(this);for(var r=0;r<8;r++)o[r]^=n[r+4&7];if(_){var c=_.words,v=c[0],f=c[1],y=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,h=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,b=y>>>16|h&4294901760,m=h<<16|y&65535;o[0]^=y,o[1]^=b,o[2]^=h,o[3]^=m,o[4]^=y,o[5]^=b,o[6]^=h,o[7]^=m;for(var r=0;r<4;r++)E.call(this)}},_doProcessBlock:function(l,_){var r=this._X;E.call(this),N[0]=r[0]^r[5]>>>16^r[3]<<16,N[1]=r[2]^r[7]>>>16^r[5]<<16,N[2]=r[4]^r[1]>>>16^r[7]<<16,N[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)N[n]=(N[n]<<8|N[n]>>>24)&16711935|(N[n]<<24|N[n]>>>8)&4278255360,l[_+n]^=N[n]},blockSize:128/32,ivSize:64/32});function E(){for(var l=this._X,_=this._C,r=0;r<8;r++)i[r]=_[r];_[0]=_[0]+1295307597+this._b|0,_[1]=_[1]+3545052371+(_[0]>>>0<i[0]>>>0?1:0)|0,_[2]=_[2]+886263092+(_[1]>>>0<i[1]>>>0?1:0)|0,_[3]=_[3]+1295307597+(_[2]>>>0<i[2]>>>0?1:0)|0,_[4]=_[4]+3545052371+(_[3]>>>0<i[3]>>>0?1:0)|0,_[5]=_[5]+886263092+(_[4]>>>0<i[4]>>>0?1:0)|0,_[6]=_[6]+1295307597+(_[5]>>>0<i[5]>>>0?1:0)|0,_[7]=_[7]+3545052371+(_[6]>>>0<i[6]>>>0?1:0)|0,this._b=_[7]>>>0<i[7]>>>0?1:0;for(var r=0;r<8;r++){var n=l[r]+_[r],o=n&65535,c=n>>>16,v=((o*o>>>17)+o*c>>>15)+c*c,f=((n&4294901760)*n|0)+((n&65535)*n|0);T[r]=v^f}l[0]=T[0]+(T[7]<<16|T[7]>>>16)+(T[6]<<16|T[6]>>>16)|0,l[1]=T[1]+(T[0]<<8|T[0]>>>24)+T[7]|0,l[2]=T[2]+(T[1]<<16|T[1]>>>16)+(T[0]<<16|T[0]>>>16)|0,l[3]=T[3]+(T[2]<<8|T[2]>>>24)+T[1]|0,l[4]=T[4]+(T[3]<<16|T[3]>>>16)+(T[2]<<16|T[2]>>>16)|0,l[5]=T[5]+(T[4]<<8|T[4]>>>24)+T[3]|0,l[6]=T[6]+(T[5]<<16|T[5]>>>16)+(T[4]<<16|T[4]>>>16)|0,l[7]=T[7]+(T[6]<<8|T[6]>>>24)+T[5]|0}M.Rabbit=X._createHelper(e)}(),B.Rabbit})},ELLl:function(W,ee,L){(function(B){B(L("VrN/"))})(function(B){var M={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},G=B.Pos;B.defineOption("autoCloseBrackets",!1,function(o,c,v){v&&v!=B.Init&&(o.removeKeyMap(K),o.state.closeBrackets=null),c&&(N(X(c,"pairs")),o.state.closeBrackets=c,o.addKeyMap(K))});function X(o,c){return c=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[c]!=null?o[c]:M[c]}var K={Backspace:e,Enter:E};function N(o){for(var c=0;c<o.length;c++){var v=o.charAt(c),f="'"+v+"'";K[f]||(K[f]=i(v))}}N(M.pairs+"`");function i(o){return function(c){return _(c,o)}}function T(o){var c=o.state.closeBrackets;if(!c||c.override)return c;var v=o.getModeAt(o.getCursor());return v.closeBrackets||c}function e(o){var c=T(o);if(!c||o.getOption("disableInput"))return B.Pass;for(var v=X(c,"pairs"),f=o.listSelections(),y=0;y<f.length;y++){if(!f[y].empty())return B.Pass;var h=r(o,f[y].head);if(!h||v.indexOf(h)%2!=0)return B.Pass}for(var y=f.length-1;y>=0;y--){var b=f[y].head;o.replaceRange("",G(b.line,b.ch-1),G(b.line,b.ch+1),"+delete")}}function E(o){var c=T(o),v=c&&X(c,"explode");if(!v||o.getOption("disableInput"))return B.Pass;for(var f=o.listSelections(),y=0;y<f.length;y++){if(!f[y].empty())return B.Pass;var h=r(o,f[y].head);if(!h||v.indexOf(h)%2!=0)return B.Pass}o.operation(function(){var b=o.lineSeparator()||`
|
|
|
`;o.replaceSelection(b+b,null),o.execCommand("goCharLeft"),f=o.listSelections();for(var m=0;m<f.length;m++){var d=f[m].head.line;o.indentLine(d,null,!0),o.indentLine(d+1,null,!0)}})}function l(o){var c=B.cmpPos(o.anchor,o.head)>0;return{anchor:new G(o.anchor.line,o.anchor.ch+(c?-1:1)),head:new G(o.head.line,o.head.ch+(c?1:-1))}}function _(o,c){var v=T(o);if(!v||o.getOption("disableInput"))return B.Pass;var f=X(v,"pairs"),y=f.indexOf(c);if(y==-1)return B.Pass;for(var h=X(v,"closeBefore"),b=X(v,"triples"),m=f.charAt(y+1)==c,d=o.listSelections(),x=y%2==0,R,O=0;O<d.length;O++){var w=d[O],D=w.head,A,P=o.getRange(D,G(D.line,D.ch+1));if(x&&!w.empty())A="surround";else if((m||!x)&&P==c)m&&n(o,D)?A="both":b.indexOf(c)>=0&&o.getRange(D,G(D.line,D.ch+3))==c+c+c?A="skipThree":A="skip";else if(m&&D.ch>1&&b.indexOf(c)>=0&&o.getRange(G(D.line,D.ch-2),D)==c+c){if(D.ch>2&&/\bstring/.test(o.getTokenTypeAt(G(D.line,D.ch-2))))return B.Pass;A="addFour"}else if(m){var I=D.ch==0?" ":o.getRange(G(D.line,D.ch-1),D);if(!B.isWordChar(P)&&I!=c&&!B.isWordChar(I))A="both";else return B.Pass}else if(x&&(P.length===0||/\s/.test(P)||h.indexOf(P)>-1))A="both";else return B.Pass;if(!R)R=A;else if(R!=A)return B.Pass}var u=y%2?f.charAt(y-1):c,k=y%2?c:f.charAt(y+1);o.operation(function(){if(R=="skip")o.execCommand("goCharRight");else if(R=="skipThree")for(var g=0;g<3;g++)o.execCommand("goCharRight");else if(R=="surround"){for(var a=o.getSelections(),g=0;g<a.length;g++)a[g]=u+a[g]+k;o.replaceSelections(a,"around"),a=o.listSelections().slice();for(var g=0;g<a.length;g++)a[g]=l(a[g]);o.setSelections(a)}else R=="both"?(o.replaceSelection(u+k,null),o.triggerElectric(u+k),o.execCommand("goCharLeft")):R=="addFour"&&(o.replaceSelection(u+u+u+u,"before"),o.execCommand("goCharRight"))})}function r(o,c){var v=o.getRange(G(c.line,c.ch-1),G(c.line,c.ch+1));return v.length==2?v:null}function n(o,c){var v=o.getTokenAt(G(c.line,c.ch+1));return/\bstring/.test(v.type)&&v.start==c.ch&&(c.ch==0||!/\bstring/.test(o.getTokenTypeAt(c)))}})},ELcG:function(W,ee,L){(function(B,M){W.exports=ee=M(L("Ib8C"))})(this,function(B){/** @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.
|
|
|
*/return function(M){var G=B,X=G.lib,K=X.WordArray,N=X.Hasher,i=G.algo,T=K.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]),e=K.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]),E=K.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]),l=K.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]),_=K.create([0,1518500249,1859775393,2400959708,2840853838]),r=K.create([1352829926,1548603684,1836072691,2053994217,0]),n=i.RIPEMD160=N.extend({_doReset:function(){this._hash=K.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(b,m){for(var d=0;d<16;d++){var x=m+d,R=b[x];b[x]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360}var O=this._hash.words,w=_.words,D=r.words,A=T.words,P=e.words,I=E.words,u=l.words,k,g,a,C,S,p,U,z,q,$;p=k=O[0],U=g=O[1],z=a=O[2],q=C=O[3],$=S=O[4];for(var re,d=0;d<80;d+=1)re=k+b[m+A[d]]|0,d<16?re+=o(g,a,C)+w[0]:d<32?re+=c(g,a,C)+w[1]:d<48?re+=v(g,a,C)+w[2]:d<64?re+=f(g,a,C)+w[3]:re+=y(g,a,C)+w[4],re=re|0,re=h(re,I[d]),re=re+S|0,k=S,S=C,C=h(a,10),a=g,g=re,re=p+b[m+P[d]]|0,d<16?re+=y(U,z,q)+D[0]:d<32?re+=f(U,z,q)+D[1]:d<48?re+=v(U,z,q)+D[2]:d<64?re+=c(U,z,q)+D[3]:re+=o(U,z,q)+D[4],re=re|0,re=h(re,u[d]),re=re+$|0,p=$,$=q,q=h(z,10),z=U,U=re;re=O[1]+a+q|0,O[1]=O[2]+C+$|0,O[2]=O[3]+S+p|0,O[3]=O[4]+k+U|0,O[4]=O[0]+g+z|0,O[0]=re},_doFinalize:function(){var b=this._data,m=b.words,d=this._nDataBytes*8,x=b.sigBytes*8;m[x>>>5]|=128<<24-x%32,m[(x+64>>>9<<4)+14]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,b.sigBytes=(m.length+1)*4,this._process();for(var R=this._hash,O=R.words,w=0;w<5;w++){var D=O[w];O[w]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}return R},clone:function(){var b=N.clone.call(this);return b._hash=this._hash.clone(),b}});function o(b,m,d){return b^m^d}function c(b,m,d){return b&m|~b&d}function v(b,m,d){return(b|~m)^d}function f(b,m,d){return b&d|m&~d}function y(b,m,d){return b^(m|~d)}function h(b,m){return b<<m|b>>>32-m}G.RIPEMD160=N._createHelper(n),G.HmacRIPEMD160=N._createHmacHelper(n)}(Math),B.RIPEMD160})},ETIr:function(W,ee,L){(function(B,M){W.exports=ee=M(L("Ib8C"))})(this,function(B){return function(){var M=B,G=M.lib,X=G.WordArray,K=M.enc,N=K.Base64={stringify:function(T){var e=T.words,E=T.sigBytes,l=this._map;T.clamp();for(var _=[],r=0;r<E;r+=3)for(var n=e[r>>>2]>>>24-r%4*8&255,o=e[r+1>>>2]>>>24-(r+1)%4*8&255,c=e[r+2>>>2]>>>24-(r+2)%4*8&255,v=n<<16|o<<8|c,f=0;f<4&&r+f*.75<E;f++)_.push(l.charAt(v>>>6*(3-f)&63));var y=l.charAt(64);if(y)for(;_.length%4;)_.push(y);return _.join("")},parse:function(T){var e=T.length,E=this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var _=0;_<E.length;_++)l[E.charCodeAt(_)]=_}var r=E.charAt(64);if(r){var n=T.indexOf(r);n!==-1&&(e=n)}return i(T,e,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function i(T,e,E){for(var l=[],_=0,r=0;r<e;r++)if(r%4){var n=E[T.charCodeAt(r-1)]<<r%4*2,o=E[T.charCodeAt(r)]>>>6-r%4*2,c=n|o;l[_>>>2]|=c<<24-_%4*8,_++}return X.create(l,_)}}(),B.enc.Base64})},El5i:function(W,ee,L){"use strict";L.d(ee,"a",function(){return B});function B(M,G){return M[G]}},"F+F2":function(W,ee,L){(function(B,M){W.exports=ee=M(L("Ib8C"))})(this,function(B){return function(){if(typeof ArrayBuffer!="function")return;var M=B,G=M.lib,X=G.WordArray,K=X.init,N=X.init=function(i){if(i instanceof ArrayBuffer&&(i=new Uint8Array(i)),(i instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&i instanceof Uint8ClampedArray||i instanceof Int16Array||i instanceof Uint16Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Float32Array||i instanceof Float64Array)&&(i=new Uint8Array(i.buffer,i.byteOffset,i.byteLength)),i instanceof Uint8Array){for(var T=i.byteLength,e=[],E=0;E<T;E++)e[E>>>2]|=i[E]<<24-E%4*8;K.call(this,e,T)}else K.apply(this,arguments)};N.prototype=X}(),B.lib.WordArray})},FER5:function(W,ee,L){"use strict";L.d(ee,"g",function(){return M}),L.d(ee,"b",function(){return K}),L.d(ee,"f",function(){return N}),L.d(ee,"c",function(){return i}),L.d(ee,"e",function(){return T}),L.d(ee,"a",function(){return _}),L.d(ee,"d",function(){return r});var B=L("b3aT");function M(o,c,v){return{r:Object(B.a)(o,255)*255,g:Object(B.a)(c,255)*255,b:Object(B.a)(v,255)*255}}function G(o,c,v){o=Object(B.a)(o,255),c=Object(B.a)(c,255),v=Object(B.a)(v,255);var f=Math.max(o,c,v),y=Math.min(o,c,v),h=0,b=0,m=(f+y)/2;if(f===y)b=0,h=0;else{var d=f-y;b=m>.5?d/(2-f-y):d/(f+y);switch(f){case o:h=(c-v)/d+(c<v?6:0);break;case c:h=(v-o)/d+2;break;case v:h=(o-c)/d+4;break;default:break}h/=6}return{h,s:b,l:m}}function X(o,c,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?o+(c-o)*(6*v):v<1/2?c:v<2/3?o+(c-o)*(2/3-v)*6:o}function K(o,c,v){var f,y,h;if(o=Object(B.a)(o,360),c=Object(B.a)(c,100),v=Object(B.a)(v,100),c===0)y=v,h=v,f=v;else{var b=v<.5?v*(1+c):v+c-v*c,m=2*v-b;f=X(m,b,o+1/3),y=X(m,b,o),h=X(m,b,o-1/3)}return{r:f*255,g:y*255,b:h*255}}function N(o,c,v){o=Object(B.a)(o,255),c=Object(B.a)(c,255),v=Object(B.a)(v,255);var f=Math.max(o,c,v),y=Math.min(o,c,v),h=0,b=f,m=f-y,d=f===0?0:m/f;if(f===y)h=0;else{switch(f){case o:h=(c-v)/m+(c<v?6:0);break;case c:h=(v-o)/m+2;break;case v:h=(o-c)/m+4;break;default:break}h/=6}return{h,s:d,v:b}}function i(o,c,v){o=Object(B.a)(o,360)*6,c=Object(B.a)(c,100),v=Object(B.a)(v,100);var f=Math.floor(o),y=o-f,h=v*(1-c),b=v*(1-y*c),m=v*(1-(1-y)*c),d=f%6,x=[v,b,h,h,m,v][d],R=[m,v,v,b,h,h][d],O=[h,h,m,v,v,b][d];return{r:x*255,g:R*255,b:O*255}}function T(o,c,v,f){var y=[Object(B.d)(Math.round(o).toString(16)),Object(B.d)(Math.round(c).toString(16)),Object(B.d)(Math.round(v).toString(16))];return f&&y[0].startsWith(y[0].charAt(1))&&y[1].startsWith(y[1].charAt(1))&&y[2].startsWith(y[2].charAt(1))?y[0].charAt(0)+y[1].charAt(0)+y[2].charAt(0):y.join("")}function e(o,c,v,f,y){var h=[Object(B.d)(Math.round(o).toString(16)),Object(B.d)(Math.round(c).toString(16)),Object(B.d)(Math.round(v).toString(16)),Object(B.d)(l(f))];return y&&h[0].startsWith(h[0].charAt(1))&&h[1].startsWith(h[1].charAt(1))&&h[2].startsWith(h[2].charAt(1))&&h[3].startsWith(h[3].charAt(1))?h[0].charAt(0)+h[1].charAt(0)+h[2].charAt(0)+h[3].charAt(0):h.join("")}function E(o,c,v,f){var y=[Object(B.d)(l(f)),Object(B.d)(Math.round(o).toString(16)),Object(B.d)(Math.round(c).toString(16)),Object(B.d)(Math.round(v).toString(16))];return y.join("")}function l(o){return Math.round(parseFloat(o)*255).toString(16)}function _(o){return r(o)/255}function r(o){return parseInt(o,16)}function n(o){return{r:o>>16,g:(o&65280)>>8,b:o&255}}},FWmy:function(W,ee,L){"use strict";L.d(ee,"a",function(){return B});function B(M,G){if(!M)throw new Error(G?`Assertion failed (${G})`:"Assertion Failed")}},Ff2n:function(W,ee,L){"use strict";L.d(ee,"a",function(){return M});var B=L("zLVn");function M(G,X){if(G==null)return{};var K=Object(B.a)(G,X),N,i;if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(G);for(i=0;i<T.length;i++){if(N=T[i],X.indexOf(N)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(G,N))continue;K[N]=G[N]}}return K}},GRuw:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("lPiR"))})(this,function(B){return function(){var M=B,G=M.lib,X=G.WordArray,K=M.algo,N=K.SHA256,i=K.SHA224=N.extend({_doReset:function(){this._hash=new X.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var T=N._doFinalize.call(this);return T.sigBytes-=4,T}});M.SHA224=N._createHelper(i),M.HmacSHA224=N._createHmacHelper(i)}(),B.SHA224})},GcTH:function(W,ee){const L=/[&<>"']/,B=/[&<>"']/g,M=/[<>"']|&(?!#?\w+;)/,G=/[<>"']|&(?!#?\w+;)/g,X={"&":"&","<":"<",">":">",'"':""","'":"'"},K=R=>X[R];function N(R,O){if(O){if(L.test(R))return R.replace(B,K)}else if(M.test(R))return R.replace(G,K);return R}const i=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function T(R){return R.replace(i,(O,w)=>(w=w.toLowerCase(),w==="colon"?":":w.charAt(0)==="#"?w.charAt(1)==="x"?String.fromCharCode(parseInt(w.substring(2),16)):String.fromCharCode(+w.substring(1)):""))}const e=/(^|[^\[])\^/g;function E(R,O){R=R.source||R,O=O||"";const w={replace:(D,A)=>(A=A.source||A,A=A.replace(e,"$1"),R=R.replace(D,A),w),getRegex:()=>new RegExp(R,O)};return w}const l=/[^\w:]/g,_=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function r(R,O,w){if(R){let D;try{D=decodeURIComponent(T(w)).replace(l,"").toLowerCase()}catch(A){return null}if(D.indexOf("javascript:")===0||D.indexOf("vbscript:")===0||D.indexOf("data:")===0)return null}O&&!_.test(w)&&(w=f(O,w));try{w=encodeURI(w).replace(/%25/g,"%")}catch(D){return null}return w}const n={},o=/^[^:]+:\/*[^/]*$/,c=/^([^:]+:)[\s\S]*$/,v=/^([^:]+:\/*[^/]*)[\s\S]*$/;function f(R,O){n[" "+R]||(o.test(R)?n[" "+R]=R+"/":n[" "+R]=m(R,"/",!0)),R=n[" "+R];const w=R.indexOf(":")===-1;return O.substring(0,2)==="//"?w?O:R.replace(c,"$1")+O:O.charAt(0)==="/"?w?O:R.replace(v,"$1")+O:R+O}const y={exec:function(){}};function h(R){let O=1,w,D;for(;O<arguments.length;O++){w=arguments[O];for(D in w)Object.prototype.hasOwnProperty.call(w,D)&&(R[D]=w[D])}return R}function b(R,O){const w=R.replace(/\|/g,(P,I,u)=>{let k=!1,g=I;for(;--g>=0&&u[g]==="\\";)k=!k;return k?"|":" |"}),D=w.split(/ \|/);let A=0;if(D.length>O)D.splice(O);else for(;D.length<O;)D.push("");for(;A<D.length;A++)D[A]=D[A].trim().replace(/\\\|/g,"|");return D}function m(R,O,w){const D=R.length;if(D===0)return"";let A=0;for(;A<D;){const P=R.charAt(D-A-1);if(P===O&&!w)A++;else if(P!==O&&w)A++;else break}return R.substr(0,D-A)}function d(R,O){if(R.indexOf(O[1])===-1)return-1;const w=R.length;let D=0,A=0;for(;A<w;A++)if(R[A]==="\\")A++;else if(R[A]===O[0])D++;else if(R[A]===O[1]&&(D--,D<0))return A;return-1}function x(R){R&&R.sanitize&&!R.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")}W.exports={escape:N,unescape:T,edit:E,cleanUrl:r,resolveUrl:f,noopTest:y,merge:h,splitCells:b,rtrim:m,findClosingBracket:d,checkSanitizeDeprecation:x}},Gq82:function(W,ee,L){"use strict";L.d(ee,"a",function(){return r});var B=L("XjgL"),M=L("aVTQ"),G=L("6ASS"),X=L("fNpE"),K=L("T/Jt"),N=L.n(K),i=L("B/uU"),T=L("qoVz"),e=L("+E2i"),E=L("VUat"),l=["children"],_=["fixed"];function r(f){return Object(T.a)(f).filter(function(y){return K.isValidElement(y)}).map(function(y){var h=y.key,b=y.props,m=b.children,d=Object(X.a)(b,l),x=Object(G.a)({key:h},d);return m&&(x.children=r(m)),x})}function n(f){return f.reduce(function(y,h){var b=h.fixed,m=b===!0?"left":b,d=h.children;return d&&d.length>0?[].concat(Object(M.a)(y),Object(M.a)(n(d).map(function(x){return Object(G.a)({fixed:m},x)}))):[].concat(Object(M.a)(y),[Object(G.a)(Object(G.a)({},h),{},{fixed:m})])},[])}function o(f){for(var y=!0,h=0;h<f.length;h+=1){var b=f[h];if(y&&b.fixed!=="left")y=!1;else if(!y&&b.fixed==="left"){Object(i.a)(!1,"Index ".concat(h-1," of `columns` missing `fixed='left'` prop."));break}}for(var m=!0,d=f.length-1;d>=0;d-=1){var x=f[d];if(m&&x.fixed!=="right")m=!1;else if(!m&&x.fixed==="right"){Object(i.a)(!1,"Index ".concat(d+1," of `columns` missing `fixed='right'` prop."));break}}}function c(f){return f.map(function(y){var h=y.fixed,b=Object(X.a)(y,_),m=h;return h==="left"?m="right":h==="right"&&(m="left"),Object(G.a)({fixed:m},b)})}function v(f,y){var h=f.prefixCls,b=f.columns,m=f.children,d=f.expandable,x=f.expandedKeys,R=f.columnTitle,O=f.getRowKey,w=f.onTriggerExpand,D=f.expandIcon,A=f.rowExpandable,P=f.expandIconColumnIndex,I=f.direction,u=f.expandRowByClick,k=f.columnWidth,g=f.fixed,a=K.useMemo(function(){return b||r(m)},[b,m]),C=K.useMemo(function(){if(d){var U,z=a.slice();if(!z.includes(E.a)){var q=P||0;q>=0&&z.splice(q,0,E.a)}var $=z.indexOf(E.a);z=z.filter(function(me,be){return me!==E.a||be===$});var re=a[$],ce;(g==="left"||g)&&!P?ce="left":(g==="right"||g)&&P===a.length?ce="right":ce=re?re.fixed:null;var ne=(U={},Object(B.a)(U,e.a,{className:"".concat(h,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),Object(B.a)(U,"title",R),Object(B.a)(U,"fixed",ce),Object(B.a)(U,"className","".concat(h,"-row-expand-icon-cell")),Object(B.a)(U,"width",k),Object(B.a)(U,"render",function(be,he,se){var _e=O(he,se),De=x.has(_e),ge=A?A(he):!0,fe=D({prefixCls:h,expanded:De,expandable:ge,record:he,onExpand:w});return u?K.createElement("span",{onClick:function(ae){return ae.stopPropagation()}},fe):fe}),U);return z.map(function(me){return me===E.a?ne:me})}return a.filter(function(me){return me!==E.a})},[d,a,O,x,D,I]),S=K.useMemo(function(){var U=C;return y&&(U=y(U)),U.length||(U=[{render:function(){return null}}]),U},[y,C,I]),p=K.useMemo(function(){return I==="rtl"?c(n(S)):n(S)},[S,I]);return[S,p]}ee.b=v},HmJG:function(W,ee,L){},IEJz:function(W,ee,L){"use strict";function B(M){return null}ee.a=B},Ib8C:function(W,ee,L){(function(B){(function(M,G){W.exports=ee=G()})(this,function(){var M=M||function(G,X){var K;if(typeof window!="undefined"&&window.crypto&&(K=window.crypto),typeof self!="undefined"&&self.crypto&&(K=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(K=globalThis.crypto),!K&&typeof window!="undefined"&&window.msCrypto&&(K=window.msCrypto),!K&&typeof B!="undefined"&&B.crypto&&(K=B.crypto),!K&&!0)try{K=L(4)}catch(y){}var N=function(){if(K){if(typeof K.getRandomValues=="function")try{return K.getRandomValues(new Uint32Array(1))[0]}catch(y){}if(typeof K.randomBytes=="function")try{return K.randomBytes(4).readInt32LE()}catch(y){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function y(){}return function(h){var b;return y.prototype=h,b=new y,y.prototype=null,b}}(),T={},e=T.lib={},E=e.Base=function(){return{extend:function(y){var h=i(this);return y&&h.mixIn(y),(!h.hasOwnProperty("init")||this.init===h.init)&&(h.init=function(){h.$super.init.apply(this,arguments)}),h.init.prototype=h,h.$super=this,h},create:function(){var y=this.extend();return y.init.apply(y,arguments),y},init:function(){},mixIn:function(y){for(var h in y)y.hasOwnProperty(h)&&(this[h]=y[h]);y.hasOwnProperty("toString")&&(this.toString=y.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),l=e.WordArray=E.extend({init:function(y,h){y=this.words=y||[],h!=X?this.sigBytes=h:this.sigBytes=y.length*4},toString:function(y){return(y||r).stringify(this)},concat:function(y){var h=this.words,b=y.words,m=this.sigBytes,d=y.sigBytes;if(this.clamp(),m%4)for(var x=0;x<d;x++){var R=b[x>>>2]>>>24-x%4*8&255;h[m+x>>>2]|=R<<24-(m+x)%4*8}else for(var O=0;O<d;O+=4)h[m+O>>>2]=b[O>>>2];return this.sigBytes+=d,this},clamp:function(){var y=this.words,h=this.sigBytes;y[h>>>2]&=4294967295<<32-h%4*8,y.length=G.ceil(h/4)},clone:function(){var y=E.clone.call(this);return y.words=this.words.slice(0),y},random:function(y){for(var h=[],b=0;b<y;b+=4)h.push(N());return new l.init(h,y)}}),_=T.enc={},r=_.Hex={stringify:function(y){for(var h=y.words,b=y.sigBytes,m=[],d=0;d<b;d++){var x=h[d>>>2]>>>24-d%4*8&255;m.push((x>>>4).toString(16)),m.push((x&15).toString(16))}return m.join("")},parse:function(y){for(var h=y.length,b=[],m=0;m<h;m+=2)b[m>>>3]|=parseInt(y.substr(m,2),16)<<24-m%8*4;return new l.init(b,h/2)}},n=_.Latin1={stringify:function(y){for(var h=y.words,b=y.sigBytes,m=[],d=0;d<b;d++){var x=h[d>>>2]>>>24-d%4*8&255;m.push(String.fromCharCode(x))}return m.join("")},parse:function(y){for(var h=y.length,b=[],m=0;m<h;m++)b[m>>>2]|=(y.charCodeAt(m)&255)<<24-m%4*8;return new l.init(b,h)}},o=_.Utf8={stringify:function(y){try{return decodeURIComponent(escape(n.stringify(y)))}catch(h){throw new Error("Malformed UTF-8 data")}},parse:function(y){return n.parse(unescape(encodeURIComponent(y)))}},c=e.BufferedBlockAlgorithm=E.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(y){typeof y=="string"&&(y=o.parse(y)),this._data.concat(y),this._nDataBytes+=y.sigBytes},_process:function(y){var h,b=this._data,m=b.words,d=b.sigBytes,x=this.blockSize,R=x*4,O=d/R;y?O=G.ceil(O):O=G.max((O|0)-this._minBufferSize,0);var w=O*x,D=G.min(w*4,d);if(w){for(var A=0;A<w;A+=x)this._doProcessBlock(m,A);h=m.splice(0,w),b.sigBytes-=D}return new l.init(h,D)},clone:function(){var y=E.clone.call(this);return y._data=this._data.clone(),y},_minBufferSize:0}),v=e.Hasher=c.extend({cfg:E.extend(),init:function(y){this.cfg=this.cfg.extend(y),this.reset()},reset:function(){c.reset.call(this),this._doReset()},update:function(y){return this._append(y),this._process(),this},finalize:function(y){y&&this._append(y);var h=this._doFinalize();return h},blockSize:512/32,_createHelper:function(y){return function(h,b){return new y.init(b).finalize(h)}},_createHmacHelper:function(y){return function(h,b){return new f.HMAC.init(y,b).finalize(h)}}}),f=T.algo={};return T}(Math);return M})}).call(this,L("IGO8"))},J66h:function(W,ee,L){(function(B){var M,G;(function(X,K){W.exports=K(X)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof B!="undefined"?B:this,function(X){"use strict";X=X||{};var K=X.Base64,N="2.6.4",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=function(u){for(var k={},g=0,a=u.length;g<a;g++)k[u.charAt(g)]=g;return k}(i),e=String.fromCharCode,E=function(u){if(u.length<2){var k=u.charCodeAt(0);return k<128?u:k<2048?e(192|k>>>6)+e(128|k&63):e(224|k>>>12&15)+e(128|k>>>6&63)+e(128|k&63)}else{var k=65536+(u.charCodeAt(0)-55296)*1024+(u.charCodeAt(1)-56320);return e(240|k>>>18&7)+e(128|k>>>12&63)+e(128|k>>>6&63)+e(128|k&63)}},l=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,_=function(u){return u.replace(l,E)},r=function(u){var k=[0,2,1][u.length%3],g=u.charCodeAt(0)<<16|(u.length>1?u.charCodeAt(1):0)<<8|(u.length>2?u.charCodeAt(2):0),a=[i.charAt(g>>>18),i.charAt(g>>>12&63),k>=2?"=":i.charAt(g>>>6&63),k>=1?"=":i.charAt(g&63)];return a.join("")},n=X.btoa&&typeof X.btoa=="function"?function(u){return X.btoa(u)}:function(u){if(u.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return u.replace(/[\s\S]{1,3}/g,r)},o=function(u){return n(_(String(u)))},c=function(u){return u.replace(/[+\/]/g,function(k){return k=="+"?"-":"_"}).replace(/=/g,"")},v=function(u,k){return k?c(o(u)):o(u)},f=function(u){return v(u,!0)},y;X.Uint8Array&&(y=function(u,k){for(var g="",a=0,C=u.length;a<C;a+=3){var S=u[a],p=u[a+1],U=u[a+2],z=S<<16|p<<8|U;g+=i.charAt(z>>>18)+i.charAt(z>>>12&63)+(typeof p!="undefined"?i.charAt(z>>>6&63):"=")+(typeof U!="undefined"?i.charAt(z&63):"=")}return k?c(g):g});var h=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,b=function(u){switch(u.length){case 4:var k=(7&u.charCodeAt(0))<<18|(63&u.charCodeAt(1))<<12|(63&u.charCodeAt(2))<<6|63&u.charCodeAt(3),g=k-65536;return e((g>>>10)+55296)+e((g&1023)+56320);case 3:return e((15&u.charCodeAt(0))<<12|(63&u.charCodeAt(1))<<6|63&u.charCodeAt(2));default:return e((31&u.charCodeAt(0))<<6|63&u.charCodeAt(1))}},m=function(u){return u.replace(h,b)},d=function(u){var k=u.length,g=k%4,a=(k>0?T[u.charAt(0)]<<18:0)|(k>1?T[u.charAt(1)]<<12:0)|(k>2?T[u.charAt(2)]<<6:0)|(k>3?T[u.charAt(3)]:0),C=[e(a>>>16),e(a>>>8&255),e(a&255)];return C.length-=[0,0,2,1][g],C.join("")},x=X.atob&&typeof X.atob=="function"?function(u){return X.atob(u)}:function(u){return u.replace(/\S{1,4}/g,d)},R=function(u){return x(String(u).replace(/[^A-Za-z0-9\+\/]/g,""))},O=function(u){return m(x(u))},w=function(u){return String(u).replace(/[-_]/g,function(k){return k=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},D=function(u){return O(w(u))},A;X.Uint8Array&&(A=function(u){return Uint8Array.from(R(w(u)),function(k){return k.charCodeAt(0)})});var P=function(){var u=X.Base64;return X.Base64=K,u};if(X.Base64={VERSION:N,atob:R,btoa:n,fromBase64:D,toBase64:v,utob:_,encode:v,encodeURI:f,btou:m,decode:D,noConflict:P,fromUint8Array:y,toUint8Array:A},typeof Object.defineProperty=="function"){var I=function(u){return{value:u,enumerable:!1,writable:!0,configurable:!0}};X.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",I(function(){return D(this)})),Object.defineProperty(String.prototype,"toBase64",I(function(u){return v(this,u)})),Object.defineProperty(String.prototype,"toBase64URI",I(function(){return v(this,!0)}))}}return X.Meteor&&(Base64=X.Base64),W.exports?W.exports.Base64=X.Base64:!(M=[],G=function(){return X.Base64}.apply(ee,M),G!==void 0&&(W.exports=G)),{Base64:X.Base64}})}).call(this,L("IGO8"))},JYp7:function(W,ee,L){"use strict";L.d(ee,"a",function(){return B});var B;(function(M){function G(h){return h&&typeof h=="object"&&typeof h[Symbol.iterator]=="function"}M.is=G;const X=Object.freeze([]);function K(){return X}M.empty=K;function*N(h){yield h}M.single=N;function i(h){return h||X}M.from=i;function T(h){return!h||h[Symbol.iterator]().next().done===!0}M.isEmpty=T;function e(h){return h[Symbol.iterator]().next().value}M.first=e;function E(h,b){for(const m of h)if(b(m))return!0;return!1}M.some=E;function l(h,b){for(const m of h)if(b(m))return m;return}M.find=l;function*_(h,b){for(const m of h)b(m)&&(yield m)}M.filter=_;function*r(h,b){let m=0;for(const d of h)yield b(d,m++)}M.map=r;function*n(...h){for(const b of h)for(const m of b)yield m}M.concat=n;function*o(h){for(const b of h)for(const m of b)yield m}M.concatNested=o;function c(h,b,m){let d=m;for(const x of h)d=b(d,x);return d}M.reduce=c;function*v(h,b,m=h.length){for(b<0&&(b+=h.length),m<0?m+=h.length:m>h.length&&(m=h.length);b<m;b++)yield h[b]}M.slice=v;function f(h,b=Number.POSITIVE_INFINITY){const m=[];if(b===0)return[m,h];const d=h[Symbol.iterator]();for(let x=0;x<b;x++){const R=d.next();if(R.done)return[m,M.empty()];m.push(R.value)}return[m,{[Symbol.iterator](){return d}}]}M.consume=f;function y(h,b,m=(d,x)=>d===x){const d=h[Symbol.iterator](),x=b[Symbol.iterator]();for(;;){const R=d.next(),O=x.next();if(R.done!==O.done)return!1;if(R.done)return!0;if(!m(R.value,O.value))return!1}}M.equals=y})(B||(B={}))},K3mO:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("3y9D"),L("WYAk"))})(this,function(B){return function(){var M=B,G=M.lib,X=G.Base,K=G.WordArray,N=M.algo,i=N.MD5,T=N.EvpKDF=X.extend({cfg:X.extend({keySize:128/32,hasher:i,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,E){for(var l,_=this.cfg,r=_.hasher.create(),n=K.create(),o=n.words,c=_.keySize,v=_.iterations;o.length<c;){l&&r.update(l),l=r.update(e).finalize(E),r.reset();for(var f=1;f<v;f++)l=r.finalize(l),r.reset();n.concat(l)}return n.sigBytes=c*4,n}});M.EvpKDF=function(e,E,l){return T.create(l).compute(e,E)}}(),B.EvpKDF})},KhGG:function(W,ee,L){"use strict";L.d(ee,"a",function(){return d}),L.d(ee,"c",function(){return O});var B=L("HPgX"),M=L("8OG5"),G=L("mgsT"),X=L("nc60"),K=L("Hqw+"),N=L("ftSv"),i=L("YaWb"),T=L("IYef"),e=L("sOWs"),E=L("jDAR"),l=L("XXmO"),_=L.n(l),r=L("T/Jt"),n=L.n(r),o=L("ErOA"),c=L("NFKh"),v=L.n(c),f=L("7Cbv"),y=L("9kvl"),h=L("mxV5"),b=L.n(h),m=E.a.Dragger,d=function(A){var P="bf3c199c2470cb477d907b1e0917c17b",I="5183666c72eec9e4",u=v.a.enc.Utf8.parse(P),k=v.a.enc.Utf8.parse(I),g=v.a.AES.decrypt(A,u,{iv:k,mode:v.a.mode.CBC});return g.toString(v.a.enc.Utf8)},x,R=function(){var D=Object(T.a)(_.a.mark(function A(P){var I,u,k,g,a,C,S,p,U,z,q;return _.a.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return S=P.identifier,p=P.oldFilename,U=P.newFilename,re.next=3,Object(o.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 3:return z=re.sent,z.data=JSON.parse(d(z.data)),q=new b.a({endpoint:z==null||((I=z.data)===null||I===void 0)?void 0:I.end_point,region:z==null||((u=z.data)===null||u===void 0)?void 0:u.region,accessKeyId:z==null||((k=z.data)===null||k===void 0)?void 0:k.access_key_id,accessKeySecret:z==null||((g=z.data)===null||g===void 0)?void 0:g.access_key_secret,bucket:z==null||((a=z.data)===null||a===void 0)?void 0:a.bucket,stsToken:z==null||((C=z.data)===null||C===void 0)?void 0:C.security_token}),re.abrupt("return",new Promise(function(ce,ne){console.log(11111,"".concat(S,"/").concat(p),"".concat(S,"/").concat(U),z.data),q.copy("/".concat(S,"/").concat(p),"/".concat(S,"/").concat(U)).then(function(me){console.log("\u62F7\u8D1D\u6210\u529F",me)}).catch(function(me){console.log(me)})}));case 7:case"end":return re.stop()}},A)}));return function(P){return D.apply(this,arguments)}}(),O=function(){var D=Object(T.a)(_.a.mark(function A(P,I,u){var k,g,a,C,S,p,U,z,q,$;return _.a.wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return I.file_name=P.name,ce.next=3,Object(o.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return U=ce.sent,console.log("decrypt(res.data):",d(U.data)),U.data=JSON.parse(d(U.data)),z=P.name.split("."),z.pop(),q=I.realFileName?z:Object(f.a)(),$=new b.a({endpoint:U==null||((k=U.data)===null||k===void 0)?void 0:k.end_point,region:U==null||((g=U.data)===null||g===void 0)?void 0:g.region,accessKeyId:U==null||((a=U.data)===null||a===void 0)?void 0:a.access_key_id,accessKeySecret:U==null||((C=U.data)===null||C===void 0)?void 0:C.access_key_secret,bucket:U==null||((S=U.data)===null||S===void 0)?void 0:S.bucket,stsToken:U==null||((p=U.data)===null||p===void 0)?void 0:p.security_token}),ce.abrupt("return",new Promise(function(ne,me){var be;$.multipartUpload("".concat(q),new Blob([P],{type:P.type}),Object(i.a)(Object(i.a)({timeout:200*1e3,partSize:102400},u),{},{callback:{url:U==null||((be=U.data)===null||be===void 0)?void 0:be.callback_url,host:U==null?void 0:U.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(o.e)(I)}})).then(function(he){var se;P.response=(se=he.data)===null||se===void 0?void 0:se.data,ne(he==null?void 0:he.data)}).catch(function(he){me(he),console.log("err:",he)})}));case 11:case"end":return ce.stop()}},A)}));return function(P,I,u){return D.apply(this,arguments)}}(),w=function(A){var P=A.user,I=A.cancelUpload,u=Object(N.a)(A,["user","cancelUpload"]),k=Object(r.useState)([]),g=Object(K.a)(k,2),a=g[0],C=g[1],S=Object(r.useState)(),p=Object(K.a)(S,2),U=p[0],z=p[1],q={onRemove:function(ce){C(Object(X.a)(a.filter(function(ne){return ne.name!==ce.name}))),u.onChange(a.filter(function(ne){return ne.name!==ce.name}))},disabled:u.disabled,multiple:!0,fileList:a==null?void 0:a.map(function(re){return re.file}),customRequest:function(){},beforeUpload:function(){var re=Object(T.a)(_.a.mark(function ne(me){var be;return _.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(be=u.maxSize||1024*1024*1024*1,!a.filter(function(_e){return _e.name===me.name}).length){se.next=4;break}return G.b.info("".concat(me.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),se.abrupt("return");case 4:if(!((me==null?void 0:me.size)>be)){se.next=7;break}return G.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(be/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),se.abrupt("return",!1);case 7:return a.push({name:me.name,file:me}),C(Object(X.a)(a)),u.onChange(a),se.abrupt("return",!1);case 11:case"end":return se.stop()}},ne)}));function ce(ne){return re.apply(this,arguments)}return ce}()},$=function(){var re=Object(T.a)(_.a.mark(function ce(ne,me){var be,he,se,_e,De,ge,fe,Ce,ae,Q;return _.a.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return me.file_name=ne.name,fe=ne.name,Z.next=4,Object(o.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(Ce=Z.sent,Ce.data=JSON.parse(d(Ce.data)),!((Ce==null?void 0:Ce.status)!==0)){Z.next=12;break}return a[a.findIndex(function(pe){return pe.name===fe})].status="error",a[a.findIndex(function(pe){return pe.name===fe})].file.status="error",u.onChange(a),G.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),Z.abrupt("return");case 12:return U=new b.a({endpoint:Ce==null||((be=Ce.data)===null||be===void 0)?void 0:be.end_point,region:Ce==null||((he=Ce.data)===null||he===void 0)?void 0:he.region,accessKeyId:Ce==null||((se=Ce.data)===null||se===void 0)?void 0:se.access_key_id,accessKeySecret:Ce==null||((_e=Ce.data)===null||_e===void 0)?void 0:_e.access_key_secret,bucket:Ce==null||((De=Ce.data)===null||De===void 0)?void 0:De.bucket,stsToken:Ce==null||((ge=Ce.data)===null||ge===void 0)?void 0:ge.security_token}),console.log(ne,"file"),z(U),ae=ne.name.split("."),ae.pop(),Q=me.realFileName?ae:Object(f.a)(),Z.abrupt("return",new Promise(function(pe,le){try{var ye;U.multipartUpload("".concat(u.identifier,"/").concat(Q).concat(fe.indexOf(".")>-1?"."+fe.split(".").pop():""),new Blob([ne.file],{type:ne.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Pe,He,Oe){try{console.log("\u8FDB\u5EA6",Pe,He,Oe);var Ue=a.findIndex(function(je){return je.name===fe});a[Ue].file.percent=Pe*100,a[Ue].tempCheckpoint=He,C(Object(X.a)(a))}catch(je){}},checkpoint:a[a.findIndex(function(Te){return Te.name===fe})].tempCheckpoint,callback:{customValue:{id:fe+""},url:Ce==null||((ye=Ce.data)===null||ye===void 0)?void 0:ye.callback_url,host:Ce==null?void 0:Ce.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(o.e)(me)}}).then(function(Te){var Pe,He=a.findIndex(function(Re){return Re.name===fe}),Oe="done";if(((Pe=Te.data)===null||Pe===void 0?void 0:Pe.status)===0){var Ue;ne.response=(Ue=Te.data)===null||Ue===void 0?void 0:Ue.data;var je=a.findIndex(function(Re){return Re.name===fe});a[je].status="done",a[je].file.status="done"}else{var Ve;G.b.warn((Ve=Te.data)===null||Ve===void 0?void 0:Ve.message),Oe="error"}a[He].status=Oe,a[He].file.status=Oe,u.onChange(a),pe(Te==null?void 0:Te.data)}).catch(function(Te){a[a.findIndex(function(Pe){return Pe.name===fe})].status="error",a[a.findIndex(function(Pe){return Pe.name===fe})].file.status="error",G.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),C(Object(X.a)(a)),u.onChange(a),le(Te),console.log("err:",Te)})}catch(Te){}}));case 19:case"end":return Z.stop()}},ce)}));return function(ne,me){return re.apply(this,arguments)}}();return Object(r.useEffect)(function(){a.every(function(re){return re==="done"||re==="error"})&&u.onComplete(a)},[a]),Object(r.useEffect)(function(){if(I){var re;(re=U)===null||re===void 0||re.cancel()}},[I]),Object(r.useEffect)(function(){u.uploading&&a.map(function(){var re=Object(T.a)(_.a.mark(function ce(ne){var me,be;return _.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(!((!ne.status||ne.status==="error")&&!I)){se.next=6;break}return ne.status="uploading",ne.file.status="uploading",se.next=5,$(ne,{login:P==null||((me=P.userInfo)===null||me===void 0)?void 0:me.login,container_type:u.container_type,container_id:u.container_id,description:u.description,realFileName:u.realFileName});case 5:be=se.sent;case 6:case"end":return se.stop()}},ce)}));return function(ce){return re.apply(this,arguments)}}())},[u.uploading]),n.a.createElement(m,Object(B.a)({},q,{height:u.height,className:u.className}),n.a.createElement("p",{className:"ant-upload-hint"},u.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};ee.b=Object(y.a)(function(D){var A=D.loading,P=D.globalSetting,I=D.user;return{globalSetting:P,loading:A.models.competitions,user:I}})(w)},KmYQ:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("OLod"))})(this,function(B){return B.pad.ZeroPadding={pad:function(M,G){var X=G*4;M.clamp(),M.sigBytes+=X-(M.sigBytes%X||X)},unpad:function(M){for(var G=M.words,X=M.sigBytes-1,X=M.sigBytes-1;X>=0;X--)if(G[X>>>2]>>>24-X%4*8&255){M.sigBytes=X+1;break}}},B.pad.ZeroPadding})},L9qf:function(W,ee,L){W.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"}},LuSS:function(W,ee,L){"use strict";L.d(ee,"a",function(){return X});var B=L("FER5"),M={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",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:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",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:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",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:"#ff0000",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:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},G=L("b3aT");function X(r){var n={r:0,g:0,b:0},o=1,c=null,v=null,f=null,y=!1,h=!1;return typeof r=="string"&&(r=l(r)),typeof r=="object"&&(_(r.r)&&_(r.g)&&_(r.b)?(n=Object(B.g)(r.r,r.g,r.b),y=!0,h=String(r.r).substr(-1)==="%"?"prgb":"rgb"):_(r.h)&&_(r.s)&&_(r.v)?(c=Object(G.c)(r.s),v=Object(G.c)(r.v),n=Object(B.c)(r.h,c,v),y=!0,h="hsv"):_(r.h)&&_(r.s)&&_(r.l)&&(c=Object(G.c)(r.s),f=Object(G.c)(r.l),n=Object(B.b)(r.h,c,f),y=!0,h="hsl"),Object.prototype.hasOwnProperty.call(r,"a")&&(o=r.a)),o=Object(G.b)(o),{ok:y,format:r.format||h,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:o}}var K="[-\\+]?\\d+%?",N="[-\\+]?\\d*\\.\\d+%?",i="(?:".concat(N,")|(?:").concat(K,")"),T="[\\s|\\(]+(".concat(i,")[,|\\s]+(").concat(i,")[,|\\s]+(").concat(i,")\\s*\\)?"),e="[\\s|\\(]+(".concat(i,")[,|\\s]+(").concat(i,")[,|\\s]+(").concat(i,")[,|\\s]+(").concat(i,")\\s*\\)?"),E={CSS_UNIT:new RegExp(i),rgb:new RegExp("rgb"+T),rgba:new RegExp("rgba"+e),hsl:new RegExp("hsl"+T),hsla:new RegExp("hsla"+e),hsv:new RegExp("hsv"+T),hsva:new RegExp("hsva"+e),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 l(r){if(r=r.trim().toLowerCase(),r.length===0)return!1;var n=!1;if(M[r])r=M[r],n=!0;else if(r==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=E.rgb.exec(r);return o?{r:o[1],g:o[2],b:o[3]}:(o=E.rgba.exec(r),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=E.hsl.exec(r),o?{h:o[1],s:o[2],l:o[3]}:(o=E.hsla.exec(r),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=E.hsv.exec(r),o?{h:o[1],s:o[2],v:o[3]}:(o=E.hsva.exec(r),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=E.hex8.exec(r),o?{r:Object(B.d)(o[1]),g:Object(B.d)(o[2]),b:Object(B.d)(o[3]),a:Object(B.a)(o[4]),format:n?"name":"hex8"}:(o=E.hex6.exec(r),o?{r:Object(B.d)(o[1]),g:Object(B.d)(o[2]),b:Object(B.d)(o[3]),format:n?"name":"hex"}:(o=E.hex4.exec(r),o?{r:Object(B.d)(o[1]+o[1]),g:Object(B.d)(o[2]+o[2]),b:Object(B.d)(o[3]+o[3]),a:Object(B.a)(o[4]+o[4]),format:n?"name":"hex8"}:(o=E.hex3.exec(r),o?{r:Object(B.d)(o[1]+o[1]),g:Object(B.d)(o[2]+o[2]),b:Object(B.d)(o[3]+o[3]),format:n?"name":"hex"}:!1)))))))))}function _(r){return Boolean(E.CSS_UNIT.exec(String(r)))}},M8RZ:function(W,ee,L){"use strict";L.d(ee,"a",function(){return e});var B=L("gKMJ"),M=L("d9ep"),G=L("BSjk"),X=L("FA6E"),K=L("T/Jt"),N=L.n(K),i=L("gLfR"),T=L.n(i),e=function(E){Object(G.a)(_,E);var l=Object(X.a)(_);function _(r){var n;Object(B.a)(this,_),n=l.call(this,r);var o=window.document;return n.node=o.createElement("div"),o.body.appendChild(n.node),n}return Object(M.a)(_,[{key:"render",value:function(){var n=this.props.children;return Object(i.createPortal)(n,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),_}(N.a.Component)},MFOe:function(W,ee,L){(function(B){var M=N(),G=i(),X=T(),K=typeof window!="undefined"?window:B;W.exports={assign:M,create:G,trim:X,bind:e,slice:E,each:l,map:_,pluck:r,isList:n,isFunction:o,isObject:c,Global:K};function N(){return Object.assign?Object.assign:function(f,y,h,b){for(var m=1;m<arguments.length;m++)l(Object(arguments[m]),function(d,x){f[x]=d});return f}}function i(){if(Object.create)return function(y,h,b,m){var d=E(arguments,1);return M.apply(this,[Object.create(y)].concat(d))};{function v(){}return function(y,h,b,m){var d=E(arguments,1);return v.prototype=y,M.apply(this,[new v].concat(d))}}}function T(){return String.prototype.trim?function(f){return String.prototype.trim.call(f)}:function(f){return f.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function e(v,f){return function(){return f.apply(v,Array.prototype.slice.call(arguments,0))}}function E(v,f){return Array.prototype.slice.call(v,f||0)}function l(v,f){r(v,function(y,h){return f(y,h),!1})}function _(v,f){var y=n(v)?[]:{};return r(v,function(h,b){return y[b]=f(h,b),!1}),y}function r(v,f){if(n(v)){for(var y=0;y<v.length;y++)if(f(v[y],y))return v[y]}else for(var h in v)if(v.hasOwnProperty(h)&&f(v[h],h))return v[h]}function n(v){return v!=null&&typeof v!="function"&&typeof v.length=="number"}function o(v){return v&&{}.toString.call(v)==="[object Function]"}function c(v){return v&&{}.toString.call(v)==="[object Object]"}}).call(this,L("IGO8"))},MI8n:function(W,ee,L){"use strict";L.d(ee,"c",function(){return K}),L.d(ee,"b",function(){return e}),L.d(ee,"e",function(){return E}),L.d(ee,"a",function(){return l}),L.d(ee,"d",function(){return _}),L.d(ee,"f",function(){return r});var B=L("/cxE"),M=L("pmY6"),G=L("24hK"),X=L("5Y4S"),K;(function(n){n.None=()=>M.a.None;function o(u){return(k,g=null,a)=>{let C=!1,S;return S=u(p=>C?void 0:(S?S.dispose():C=!0,k.call(g,p)),null,a),C&&S.dispose(),S}}n.once=o;function c(u,k){return m((g,a=null,C)=>u(S=>g.call(a,k(S)),null,C))}n.map=c;function v(u,k){return m((g,a=null,C)=>u(S=>{k(S),g.call(a,S)},null,C))}n.forEach=v;function f(u,k){return m((g,a=null,C)=>u(S=>k(S)&&g.call(a,S),null,C))}n.filter=f;function y(u){return u}n.signal=y;function h(...u){return(k,g=null,a)=>Object(M.e)(...u.map(C=>C(S=>k.call(g,S),null,a)))}n.any=h;function b(u,k,g){let a=g;return c(u,C=>(a=k(a,C),a))}n.reduce=b;function m(u){let k;const g=new e({onFirstListenerAdd(){k=u(g.fire,g)},onLastListenerRemove(){k.dispose()}});return g.event}function d(u,k,g=100,a=!1,C){let S,p,U,z=0;const q=new e({leakWarningThreshold:C,onFirstListenerAdd(){S=u($=>{z++,p=k(p,$),a&&!U&&(q.fire(p),p=void 0),clearTimeout(U),U=setTimeout(()=>{const re=p;p=void 0,U=void 0,(!a||z>1)&&q.fire(re),z=0},g)})},onLastListenerRemove(){S.dispose()}});return q.event}n.debounce=d;function x(u,k=(g,a)=>g===a){let g=!0,a;return f(u,C=>{const S=g||!k(C,a);return g=!1,a=C,S})}n.latch=x;function R(u,k){return[n.filter(u,k),n.filter(u,g=>!k(g))]}n.split=R;function O(u,k=!1,g=[]){let a=g.slice(),C=u(U=>{a?a.push(U):p.fire(U)});const S=()=>{a&&a.forEach(U=>p.fire(U)),a=null},p=new e({onFirstListenerAdd(){C||(C=u(U=>p.fire(U)))},onFirstListenerDidAdd(){a&&(k?setTimeout(S):S())},onLastListenerRemove(){C&&C.dispose(),C=null}});return p.event}n.buffer=O;class w{constructor(u){this.event=u}map(u){return new w(c(this.event,u))}forEach(u){return new w(v(this.event,u))}filter(u){return new w(f(this.event,u))}reduce(u,k){return new w(b(this.event,u,k))}latch(){return new w(x(this.event))}debounce(u,k=100,g=!1,a){return new w(d(this.event,u,k,g,a))}on(u,k,g){return this.event(u,k,g)}once(u,k,g){return o(this.event)(u,k,g)}}function D(u){return new w(u)}n.chain=D;function A(u,k,g=a=>a){const a=(...U)=>p.fire(g(...U)),C=()=>u.on(k,a),S=()=>u.removeListener(k,a),p=new e({onFirstListenerAdd:C,onLastListenerRemove:S});return p.event}n.fromNodeEventEmitter=A;function P(u,k,g=a=>a){const a=(...U)=>p.fire(g(...U)),C=()=>u.addEventListener(k,a),S=()=>u.removeEventListener(k,a),p=new e({onFirstListenerAdd:C,onLastListenerRemove:S});return p.event}n.fromDOMEventEmitter=P;function I(u){return new Promise(k=>o(u)(k))}n.toPromise=I})(K||(K={}));class N{constructor(n){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${n}_${N._idPool++}`}start(n){this._stopWatch=new X.a(!0),this._listenerCount=n}stop(){if(this._stopWatch){const n=this._stopWatch.elapsed();this._elapsedOverall+=n,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${n.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}N._idPool=0;let i=-1;class T{constructor(n,o=Math.random().toString(18).slice(2,5)){this.customThreshold=n,this.name=o,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(n){let o=i;if(typeof this.customThreshold=="number"&&(o=this.customThreshold),o<=0||n<o)return;this._stacks||(this._stacks=new Map);const c=new Error().stack.split(`
|
|
|
`).slice(3).join(`
|
|
|
`),v=this._stacks.get(c)||0;if(this._stacks.set(c,v+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=o*.5;let f,y=0;for(const[h,b]of this._stacks)(!f||y<b)&&(f=h,y=b);console.warn(`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${y}):`),console.warn(f)}return()=>{const f=this._stacks.get(c)||0;this._stacks.set(c,f-1)}}}class e{constructor(n){var o;this._disposed=!1,this._options=n,this._leakageMon=i>0?new T(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((o=this._options)===null||o===void 0?void 0:o._profName)?new N(this._options._profName):void 0}get event(){return this._event||(this._event=(n,o,c)=>{var v;this._listeners||(this._listeners=new G.a);const f=this._listeners.isEmpty();f&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const y=this._listeners.push(o?[n,o]:n);f&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,n,o);const h=(v=this._leakageMon)===null||v===void 0?void 0:v.check(this._listeners.size),b=Object(M.i)(()=>{if(h&&h(),!this._disposed&&(y(),this._options&&this._options.onLastListenerRemove)){const m=this._listeners&&!this._listeners.isEmpty();m||this._options.onLastListenerRemove(this)}});return c instanceof M.b?c.add(b):Array.isArray(c)&&c.push(b),b}),this._event}fire(n){var o,c;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new G.a);for(let v of this._listeners)this._deliveryQueue.push([v,n]);for((o=this._perfMon)===null||o===void 0||o.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[v,f]=this._deliveryQueue.shift();try{typeof v=="function"?v.call(void 0,f):v[0].call(v[1],f)}catch(y){Object(B.f)(y)}}(c=this._perfMon)===null||c===void 0||c.stop()}}dispose(){var n,o,c,v,f;this._disposed||(this._disposed=!0,(n=this._listeners)===null||n===void 0||n.clear(),(o=this._deliveryQueue)===null||o===void 0||o.clear(),(v=(c=this._options)===null||c===void 0?void 0:c.onLastListenerRemove)===null||v===void 0||v.call(c),(f=this._leakageMon)===null||f===void 0||f.dispose())}}class E extends e{constructor(n){super(n);this._isPaused=0,this._eventQueue=new G.a,this._mergeFn=n==null?void 0:n.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const n=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(n))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(n){this._listeners&&(this._isPaused!==0?this._eventQueue.push(n):super.fire(n))}}class l extends E{constructor(n){var o;super(n);this._delay=(o=n.delay)!==null&&o!==void 0?o:100}fire(n){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(n)}}class _{constructor(){this.buffers=[]}wrapEvent(n){return(o,c,v)=>n(f=>{const y=this.buffers[this.buffers.length-1];y?y.push(()=>o.call(c,f)):o.call(c,f)},void 0,v)}bufferEvents(n){const o=[];this.buffers.push(o);const c=n();return this.buffers.pop(),o.forEach(v=>v()),c}}class r{constructor(){this.listening=!1,this.inputEvent=K.None,this.inputEventListener=M.a.None,this.emitter=new e({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(n){this.inputEvent=n,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=n(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(W,ee,L){"use strict";(function(B,M){L.d(ee,"b",function(){return c}),L.d(ee,"i",function(){return h}),L.d(ee,"f",function(){return b}),L.d(ee,"d",function(){return m}),L.d(ee,"g",function(){return d}),L.d(ee,"h",function(){return x}),L.d(ee,"c",function(){return R}),L.d(ee,"k",function(){return O}),L.d(ee,"j",function(){return w}),L.d(ee,"a",function(){return D}),L.d(ee,"e",function(){return I});var G;const X="en";let K=!1,N=!1,i=!1,T=!1,e=!1,E=!1,l=!1,_,r=X,n,o;const c=typeof self=="object"?self:typeof B=="object"?B:{};let v;typeof c.vscode!="undefined"&&typeof c.vscode.process!="undefined"?v=c.vscode.process:typeof M!="undefined"&&(v=M);const f=typeof((G=v==null?void 0:v.versions)===null||G===void 0?void 0:G.electron)=="string"&&v.type==="renderer";if(typeof navigator=="object"&&!f)o=navigator.userAgent,K=o.indexOf("Windows")>=0,N=o.indexOf("Macintosh")>=0,l=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,i=o.indexOf("Linux")>=0,E=!0,_=navigator.language,r=_;else if(typeof v=="object"){K=v.platform==="win32",N=v.platform==="darwin",i=v.platform==="linux",T=i&&!!v.env.SNAP&&!!v.env.SNAP_REVISION,_=X,r=X;const u=v.env.VSCODE_NLS_CONFIG;if(u)try{const k=JSON.parse(u),g=k.availableLanguages["*"];_=k.locale,r=g||X,n=k._translationsConfigFile}catch(k){}e=!0}else console.error("Unable to resolve platform.");let y=0;N?y=1:K?y=3:i&&(y=2);const h=K,b=N,m=i,d=e,x=E,R=l,O=o,w=function(){if(c.setImmediate)return c.setImmediate.bind(c);if(typeof c.postMessage=="function"&&!c.importScripts){let g=[];c.addEventListener("message",C=>{if(C.data&&C.data.vscodeSetImmediateId)for(let S=0,p=g.length;S<p;S++){const U=g[S];if(U.id===C.data.vscodeSetImmediateId){g.splice(S,1),U.callback();return}}});let a=0;return C=>{const S=++a;g.push({id:S,callback:C}),c.postMessage({vscodeSetImmediateId:S},"*")}}if(typeof(v==null?void 0:v.nextTick)=="function")return v.nextTick.bind(v);const k=Promise.resolve();return g=>k.then(g)}(),D=N||l?2:K?1:3;let A=!0,P=!1;function I(){if(!P){P=!0;const u=new Uint8Array(2);u[0]=1,u[1]=2;const k=new Uint16Array(u.buffer);A=k[0]===(2<<8)+1}return A}}).call(this,L("IGO8"),L("B0ME"))},MRIS:function(W,ee,L){"use strict";var B=L("T/Jt"),M=L.n(B),G=B.createContext(!1);ee.a=G},MlIO:function(W,ee,L){(function(B,M){W.exports=ee=M(L("Ib8C"))})(this,function(B){return function(M){var G=B,X=G.lib,K=X.Base,N=X.WordArray,i=G.x64={},T=i.Word=K.extend({init:function(E,l){this.high=E,this.low=l}}),e=i.WordArray=K.extend({init:function(E,l){E=this.words=E||[],l!=M?this.sigBytes=l:this.sigBytes=E.length*8},toX32:function(){for(var E=this.words,l=E.length,_=[],r=0;r<l;r++){var n=E[r];_.push(n.high),_.push(n.low)}return N.create(_,this.sigBytes)},clone:function(){for(var E=K.clone.call(this),l=E.words=this.words.slice(0),_=l.length,r=0;r<_;r++)l[r]=l[r].clone();return E}})}(),B})},N0LK:function(W,ee,L){"use strict";L.d(ee,"C",function(){return B}),L.d(ee,"v",function(){return G}),L.d(ee,"s",function(){return X}),L.d(ee,"t",function(){return K}),L.d(ee,"U",function(){return N}),L.d(ee,"J",function(){return i}),L.d(ee,"O",function(){return T}),L.d(ee,"p",function(){return e}),L.d(ee,"T",function(){return E}),L.d(ee,"q",function(){return l}),L.d(ee,"N",function(){return _}),L.d(ee,"M",function(){return r}),L.d(ee,"Q",function(){return n}),L.d(ee,"u",function(){return o}),L.d(ee,"x",function(){return c}),L.d(ee,"I",function(){return v}),L.d(ee,"f",function(){return f}),L.d(ee,"h",function(){return y}),L.d(ee,"g",function(){return h}),L.d(ee,"i",function(){return b}),L.d(ee,"G",function(){return m}),L.d(ee,"H",function(){return d}),L.d(ee,"r",function(){return x}),L.d(ee,"R",function(){return R}),L.d(ee,"d",function(){return O}),L.d(ee,"e",function(){return w}),L.d(ee,"E",function(){return D}),L.d(ee,"F",function(){return A}),L.d(ee,"j",function(){return P}),L.d(ee,"z",function(){return I}),L.d(ee,"K",function(){return k}),L.d(ee,"L",function(){return g}),L.d(ee,"m",function(){return C}),L.d(ee,"k",function(){return p}),L.d(ee,"A",function(){return z}),L.d(ee,"a",function(){return q}),L.d(ee,"n",function(){return $}),L.d(ee,"l",function(){return re}),L.d(ee,"D",function(){return ce}),L.d(ee,"B",function(){return ne}),L.d(ee,"b",function(){return me}),L.d(ee,"S",function(){return be}),L.d(ee,"o",function(){return he}),L.d(ee,"P",function(){return se}),L.d(ee,"w",function(){return _e}),L.d(ee,"c",function(){return De}),L.d(ee,"y",function(){return Ce});function B(Z){return!Z||typeof Z!="string"?!0:Z.trim().length===0}const M=/{(\d+)}/g;function G(Z,...pe){return pe.length===0?Z:Z.replace(M,function(le,ye){const Te=parseInt(ye,10);return isNaN(Te)||Te<0||Te>=pe.length?le:pe[Te]})}function X(Z){return Z.replace(/[<>&]/g,function(pe){switch(pe){case"<":return"<";case">":return">";case"&":return"&";default:return pe}})}function K(Z){return Z.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function N(Z,pe=" "){const le=i(Z,pe);return T(le,pe)}function i(Z,pe){if(!Z||!pe)return Z;const le=pe.length;if(le===0||Z.length===0)return Z;let ye=0;for(;Z.indexOf(pe,ye)===ye;)ye=ye+le;return Z.substring(ye)}function T(Z,pe){if(!Z||!pe)return Z;const le=pe.length,ye=Z.length;if(le===0||ye===0)return Z;let Te=ye,Pe=-1;for(;!(Pe=Z.lastIndexOf(pe,Te-1),Pe===-1||Pe+le!==Te);){if(Pe===0)return"";Te=Pe}return Z.substring(0,Te)}function e(Z){return Z.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function E(Z){return Z.replace(/\*/g,"")}function l(Z,pe,le={}){if(!Z)throw new Error("Cannot create regex from empty string");pe||(Z=K(Z)),le.wholeWord&&(/\B/.test(Z.charAt(0))||(Z="\\b"+Z),/\B/.test(Z.charAt(Z.length-1))||(Z=Z+"\\b"));let ye="";return le.global&&(ye+="g"),le.matchCase||(ye+="i"),le.multiline&&(ye+="m"),le.unicode&&(ye+="u"),new RegExp(Z,ye)}function _(Z){if(Z.source==="^"||Z.source==="^$"||Z.source==="$"||Z.source==="^\\s*$")return!1;const pe=Z.exec("");return!!(pe&&Z.lastIndex===0)}function r(Z){return(Z.global?"g":"")+(Z.ignoreCase?"i":"")+(Z.multiline?"m":"")+(Z.unicode?"u":"")}function n(Z){return Z.split(/\r\n|\r|\n/)}function o(Z){for(let pe=0,le=Z.length;pe<le;pe++){const ye=Z.charCodeAt(pe);if(ye!==32&&ye!==9)return pe}return-1}function c(Z,pe=0,le=Z.length){for(let ye=pe;ye<le;ye++){const Te=Z.charCodeAt(ye);if(Te!==32&&Te!==9)return Z.substring(pe,ye)}return Z.substring(pe,le)}function v(Z,pe=Z.length-1){for(let le=pe;le>=0;le--){const ye=Z.charCodeAt(le);if(ye!==32&&ye!==9)return le}return-1}function f(Z,pe){return Z<pe?-1:Z>pe?1:0}function y(Z,pe,le=0,ye=Z.length,Te=0,Pe=pe.length){for(;le<ye&&Te<Pe;le++,Te++){let Ue=Z.charCodeAt(le),je=pe.charCodeAt(Te);if(Ue<je)return-1;if(Ue>je)return 1}const He=ye-le,Oe=Pe-Te;return He<Oe?-1:He>Oe?1:0}function h(Z,pe){return b(Z,pe,0,Z.length,0,pe.length)}function b(Z,pe,le=0,ye=Z.length,Te=0,Pe=pe.length){for(;le<ye&&Te<Pe;le++,Te++){let Ue=Z.charCodeAt(le),je=pe.charCodeAt(Te);if(Ue===je)continue;if(Ue>=128||je>=128)return y(Z.toLowerCase(),pe.toLowerCase(),le,ye,Te,Pe);m(Ue)&&(Ue-=32),m(je)&&(je-=32);const Ve=Ue-je;if(Ve===0)continue;return Ve}const He=ye-le,Oe=Pe-Te;return He<Oe?-1:He>Oe?1:0}function m(Z){return Z>=97&&Z<=122}function d(Z){return Z>=65&&Z<=90}function x(Z,pe){return Z.length===pe.length&&b(Z,pe)===0}function R(Z,pe){const le=pe.length;return pe.length>Z.length?!1:b(Z,pe,0,le)===0}function O(Z,pe){let le,ye=Math.min(Z.length,pe.length);for(le=0;le<ye;le++)if(Z.charCodeAt(le)!==pe.charCodeAt(le))return le;return ye}function w(Z,pe){let le,ye=Math.min(Z.length,pe.length);const Te=Z.length-1,Pe=pe.length-1;for(le=0;le<ye;le++)if(Z.charCodeAt(Te-le)!==pe.charCodeAt(Pe-le))return le;return ye}function D(Z){return 55296<=Z&&Z<=56319}function A(Z){return 56320<=Z&&Z<=57343}function P(Z,pe){return(Z-55296<<10)+(pe-56320)+65536}function I(Z,pe,le){const ye=Z.charCodeAt(le);if(D(ye)&&le+1<pe){const Te=Z.charCodeAt(le+1);if(A(Te))return P(ye,Te)}return ye}function u(Z,pe){const le=Z.charCodeAt(pe-1);if(A(le)&&pe>1){const ye=Z.charCodeAt(pe-2);if(D(ye))return P(ye,le)}return le}function k(Z,pe){const le=ge.getInstance(),ye=pe,Te=Z.length,Pe=I(Z,Te,pe);pe+=Pe>=65536?2:1;let He=le.getGraphemeBreakType(Pe);for(;pe<Te;){const Oe=I(Z,Te,pe),Ue=le.getGraphemeBreakType(Oe);if(De(He,Ue))break;pe+=Oe>=65536?2:1,He=Ue}return pe-ye}function g(Z,pe){const le=ge.getInstance(),ye=pe,Te=u(Z,pe);pe-=Te>=65536?2:1;let Pe=le.getGraphemeBreakType(Te);for(;pe>0;){const He=u(Z,pe),Oe=le.getGraphemeBreakType(He);if(De(Oe,Pe))break;pe-=He>=65536?2:1,Pe=Oe}return ye-pe}const a=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function C(Z){return a.test(Z)}const S=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function p(Z){return S.test(Z)}const U=/^[\t\n\r\x20-\x7E]*$/;function z(Z){return U.test(Z)}const q=/[\u2028\u2029]/;function $(Z){return q.test(Z)}function re(Z){for(let pe=0,le=Z.length;pe<le;pe++)if(ce(Z.charCodeAt(pe)))return!0;return!1}function ce(Z){return Z=+Z,Z>=11904&&Z<=55215||Z>=63744&&Z<=64255||Z>=65281&&Z<=65374}function ne(Z){return Z>=127462&&Z<=127487||Z===8986||Z===8987||Z===9200||Z===9203||Z>=9728&&Z<=10175||Z===11088||Z===11093||Z>=127744&&Z<=128591||Z>=128640&&Z<=128764||Z>=128992&&Z<=129003||Z>=129280&&Z<=129535||Z>=129648&&Z<=129750}const me=String.fromCharCode(65279);function be(Z){return!!(Z&&Z.length>0&&Z.charCodeAt(0)===65279)}function he(Z,pe=!1){return Z?(pe&&(Z=Z.replace(/\\./g,"")),Z.toLowerCase()!==Z):!1}function se(Z){const pe=90-65+1;return Z=Z%(2*pe),Z<pe?String.fromCharCode(97+Z):String.fromCharCode(65+Z-pe)}function _e(Z){const pe=ge.getInstance();return pe.getGraphemeBreakType(Z)}function De(Z,pe){return Z===0?pe!==5&&pe!==7:Z===2&&pe===3?!1:Z===4||Z===2||Z===3||(pe===4||pe===2||pe===3)?!0:Z===8&&(pe===8||pe===9||pe===11||pe===12)||((Z===11||Z===9)&&(pe===9||pe===10)||((Z===12||Z===10)&&pe===10||(pe===5||pe===13||(pe===7||(Z===1||Z===13&&pe===14)))))?!1:!(Z===6&&pe===6)}class ge{constructor(){this._data=fe()}static getInstance(){return ge._INSTANCE||(ge._INSTANCE=new ge),ge._INSTANCE}getGraphemeBreakType(Z){if(Z<32)return Z===10?3:Z===13?2:4;if(Z<127)return 0;const pe=this._data,le=pe.length/3;let ye=1;for(;ye<=le;)if(Z<pe[3*ye])ye=2*ye;else if(Z>pe[3*ye+1])ye=2*ye+1;else return pe[3*ye+2];return 0}}ge._INSTANCE=null;function fe(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function Ce(Z,pe){if(Z===0)return 0;const le=ae(Z,pe);if(le!==void 0)return le;const ye=u(pe,Z);return Z-=Q(ye),Z}function ae(Z,pe){let le=u(pe,Z);for(Z-=Q(le);J(le)||le===65039||le===8419;){if(Z===0)return;le=u(pe,Z),Z-=Q(le)}if(!ne(le))return;if(Z>=0){const ye=u(pe,Z);ye===8205&&(Z-=Q(ye))}return Z}function Q(Z){return Z>=65536?2:1}function J(Z){return 127995<=Z&&Z<=127999}},NFKh:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("MlIO"),L("F+F2"),L("qM6L"),L("ETIr"),L("wbyO"),L("cv67"),L("3y9D"),L("lPiR"),L("GRuw"),L("1uat"),L("uGsb"),L("5hvy"),L("ELcG"),L("WYAk"),L("e7zE"),L("K3mO"),L("OLod"),L("ALsQ"),L("9OqN"),L("qu8F"),L("S6kV"),L("gb/T"),L("qBft"),L("oRuE"),L("jO9C"),L("KmYQ"),L("uGxW"),L("bQjk"),L("wZgz"),L("pA7S"),L("w7YG"),L("E4JC"),L("PVpz"))})(this,function(B){return B})},ODXe:function(W,ee,L){"use strict";L.d(ee,"a",function(){return K});function B(N){if(Array.isArray(N))return N}function M(N,i){var T=N==null?null:typeof Symbol!="undefined"&&N[Symbol.iterator]||N["@@iterator"];if(T!=null){var e,E,l,_,r=[],n=!0,o=!1;try{if(l=(T=T.call(N)).next,i===0){if(Object(T)!==T)return;n=!1}else for(;!(n=(e=l.call(T)).done)&&(r.push(e.value),r.length!==i);n=!0);}catch(c){o=!0,E=c}finally{try{if(!n&&T.return!=null&&(_=T.return(),Object(_)!==_))return}finally{if(o)throw E}}return r}}var G=L("BsWD");function X(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K(N,i){return B(N)||M(N,i)||Object(G.a)(N,i)||X()}},OLod:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("K3mO"))})(this,function(B){B.lib.Cipher||function(M){var G=B,X=G.lib,K=X.Base,N=X.WordArray,i=X.BufferedBlockAlgorithm,T=G.enc,e=T.Utf8,E=T.Base64,l=G.algo,_=l.EvpKDF,r=X.Cipher=i.extend({cfg:K.extend(),createEncryptor:function(D,A){return this.create(this._ENC_XFORM_MODE,D,A)},createDecryptor:function(D,A){return this.create(this._DEC_XFORM_MODE,D,A)},init:function(D,A,P){this.cfg=this.cfg.extend(P),this._xformMode=D,this._key=A,this.reset()},reset:function(){i.reset.call(this),this._doReset()},process:function(D){return this._append(D),this._process()},finalize:function(D){D&&this._append(D);var A=this._doFinalize();return A},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function D(A){return typeof A=="string"?w:x}return function(A){return{encrypt:function(P,I,u){return D(I).encrypt(A,P,I,u)},decrypt:function(P,I,u){return D(I).decrypt(A,P,I,u)}}}}()}),n=X.StreamCipher=r.extend({_doFinalize:function(){var D=this._process(!0);return D},blockSize:1}),o=G.mode={},c=X.BlockCipherMode=K.extend({createEncryptor:function(D,A){return this.Encryptor.create(D,A)},createDecryptor:function(D,A){return this.Decryptor.create(D,A)},init:function(D,A){this._cipher=D,this._iv=A}}),v=o.CBC=function(){var D=c.extend();D.Encryptor=D.extend({processBlock:function(P,I){var u=this._cipher,k=u.blockSize;A.call(this,P,I,k),u.encryptBlock(P,I),this._prevBlock=P.slice(I,I+k)}}),D.Decryptor=D.extend({processBlock:function(P,I){var u=this._cipher,k=u.blockSize,g=P.slice(I,I+k);u.decryptBlock(P,I),A.call(this,P,I,k),this._prevBlock=g}});function A(P,I,u){var k,g=this._iv;g?(k=g,this._iv=M):k=this._prevBlock;for(var a=0;a<u;a++)P[I+a]^=k[a]}return D}(),f=G.pad={},y=f.Pkcs7={pad:function(D,A){for(var P=A*4,I=P-D.sigBytes%P,u=I<<24|I<<16|I<<8|I,k=[],g=0;g<I;g+=4)k.push(u);var a=N.create(k,I);D.concat(a)},unpad:function(D){var A=D.words[D.sigBytes-1>>>2]&255;D.sigBytes-=A}},h=X.BlockCipher=r.extend({cfg:r.cfg.extend({mode:v,padding:y}),reset:function(){var D;r.reset.call(this);var A=this.cfg,P=A.iv,I=A.mode;this._xformMode==this._ENC_XFORM_MODE?D=I.createEncryptor:(D=I.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==D?this._mode.init(this,P&&P.words):(this._mode=D.call(I,this,P&&P.words),this._mode.__creator=D)},_doProcessBlock:function(D,A){this._mode.processBlock(D,A)},_doFinalize:function(){var D,A=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(A.pad(this._data,this.blockSize),D=this._process(!0)):(D=this._process(!0),A.unpad(D)),D},blockSize:128/32}),b=X.CipherParams=K.extend({init:function(D){this.mixIn(D)},toString:function(D){return(D||this.formatter).stringify(this)}}),m=G.format={},d=m.OpenSSL={stringify:function(D){var A,P=D.ciphertext,I=D.salt;return I?A=N.create([1398893684,1701076831]).concat(I).concat(P):A=P,A.toString(E)},parse:function(D){var A,P=E.parse(D),I=P.words;return I[0]==1398893684&&I[1]==1701076831&&(A=N.create(I.slice(2,4)),I.splice(0,4),P.sigBytes-=16),b.create({ciphertext:P,salt:A})}},x=X.SerializableCipher=K.extend({cfg:K.extend({format:d}),encrypt:function(D,A,P,I){I=this.cfg.extend(I);var u=D.createEncryptor(P,I),k=u.finalize(A),g=u.cfg;return b.create({ciphertext:k,key:P,iv:g.iv,algorithm:D,mode:g.mode,padding:g.padding,blockSize:D.blockSize,formatter:I.format})},decrypt:function(D,A,P,I){I=this.cfg.extend(I),A=this._parse(A,I.format);var u=D.createDecryptor(P,I).finalize(A.ciphertext);return u},_parse:function(D,A){return typeof D=="string"?A.parse(D,this):D}}),R=G.kdf={},O=R.OpenSSL={execute:function(D,A,P,I){I||(I=N.random(64/8));var u=_.create({keySize:A+P}).compute(D,I),k=N.create(u.words.slice(A),P*4);return u.sigBytes=A*4,b.create({key:u,iv:k,salt:I})}},w=X.PasswordBasedCipher=x.extend({cfg:x.cfg.extend({kdf:O}),encrypt:function(D,A,P,I){I=this.cfg.extend(I);var u=I.kdf.execute(P,D.keySize,D.ivSize);I.iv=u.iv;var k=x.encrypt.call(this,D,A,u.key,I);return k.mixIn(u),k},decrypt:function(D,A,P,I){I=this.cfg.extend(I),A=this._parse(A,I.format);var u=I.kdf.execute(P,D.keySize,D.ivSize,A.salt);I.iv=u.iv;var k=x.decrypt.call(this,D,A,u.key,I);return k}})}()})},Ot1p:function(W,ee,L){"use strict";var B=L("c3Iv"),M=L("rBQ5"),G=L("sh+1"),X=L("8OG5"),K=L("mgsT"),N=L("IYef"),i=L("Hqw+"),T=L("Hbia"),e=L("XXmO"),E=L.n(e),l=L("T/Jt"),_=L.n(l),r=L("VrN/"),n=L.n(r),o=L("bdgK"),c=L("p77/"),v=L("Bd2K"),f=L("ELLl"),y=L("19Vz"),h=L("lZu9"),b=L("+NIl"),m=L("kSUc"),d=L("9Bee"),x=function(Ke){var Ze=Ke.value,Ne=Ze===void 0?"":Ze,$e=Ke.className,Je=Ke.showTextOnly,qe=Ke.showLines,ot=Ke.style,at=ot===void 0?{}:ot,rt=Object(l.useMemo)(function(){return""},[Ne]);return _.a.createElement(_.a.Fragment,null,_.a.createElement("div",{dangerouslySetInnerHTML:{__html:rt}}))},R=L("HPgX"),O=L("dejd"),w=L("C+DQ"),D=L("1vsH"),A=L("m3rI"),P=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function I(Ke){var Ze=Ke.onActionCallback,Ne=Ke.title,$e=Ke.icon,Je=Ke.actionName,qe=Ke.className,ot=qe===void 0?"":qe,at=Ke.children;function rt(){Ze(Je)}return _.a.createElement("a",{title:Ne,className:ot,onClick:rt},_.a.createElement("i",{className:"md-iconfont ".concat($e)}),at)}var u=function(Ke){var Ze=Ke.watch,Ne=Ke.showNullButton,$e=Ke.onActionCallback,Je=Ke.fullScreen,qe=Ke.insertTemp,ot=Ke.hidetoolBar,at=Ke.uuid,rt=Ke.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(D.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(D.G)("_educoder_session"),"&key=").concat(at,"&api=").concat(encodeURIComponent(A.a.PROXY_SERVER)));var dt=[].concat(P,[{title:"".concat(Ze?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ze?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return _.a.createElement("ul",{className:"markdown-toolbar-container"},!ot&&dt.map(function(nt,mt){return _.a.createElement("li",{key:mt},nt.actionName?_.a.createElement(I,Object(R.a)({},nt,{onActionCallback:$e})):_.a.createElement("span",{className:"v-line"}))}),Ne?_.a.createElement("li",null,_.a.createElement(I,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:$e},_.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,qe&&_.a.createElement("li",null,_.a.createElement(I,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(qe),onActionCallback:$e},_.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),_.a.createElement("li",{className:"btn-full-screen"},_.a.createElement(I,{icon:"".concat(Je?"icon-shrink":"icon-enlarge"),title:Je?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:$e})))},k=L("M8RZ"),g=L("dLI4"),a=L("4d5L"),C=L("y6Ii"),S=L("Wuip"),p=L("47JS"),U=L("TOZL"),z={labelCol:{span:4},wrapperCol:{span:20}},q=function(Ke){var Ze=Ke.callback,Ne=Ke.onCancel;function $e(Je){Ze(Je)}return _.a.createElement(S.a,Object(R.a)({},z,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:$e}),_.a.createElement(S.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},_.a.createElement(U.a,null)),_.a.createElement(S.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},_.a.createElement(U.a,null)),_.a.createElement("div",{className:"flex-container flex-end"},_.a.createElement(a.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),_.a.createElement(a.a,{type:"ghost",onClick:Ne},"\u53D6\u6D88")))},$=L("7ahc"),re=L("HmJG"),ce=L("BjJ7"),ne=S.a.useForm,me={width:280,marginRight:10},be={labelCol:{span:5},wrapperCol:{span:19}},he=function(Ke){var Ze=Ke.callback,Ne=Ke.onCancel,$e=ne(),Je=Object(i.a)($e,1),qe=Je[0];function ot(dt){Ze(dt)}function at(dt,nt){if(dt.status===-1){K.b.error(dt.message);return}qe.setFieldsValue({src:"/api/attachments/".concat(dt.id),type:nt.type})}function rt(dt){var nt=dt.target.files[0];_e(nt,at)}return _.a.createElement(S.a,Object(R.a)({form:qe},be,{className:"upload-image-panel",onFinish:ot}),_.a.createElement(S.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},_.a.createElement("div",{className:"flex-container"},_.a.createElement(S.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},_.a.createElement(U.a,{style:me})),_.a.createElement(se,{onFileChange:rt}))),_.a.createElement(S.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},_.a.createElement(U.a,{style:{width:264}})),_.a.createElement(S.a.Item,{style:{textAlign:"right"}},_.a.createElement(a.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),_.a.createElement(a.a,{type:"ghost",onClick:Ne},"\u53D6\u6D88")))};function se(Ke){var Ze=Ke.onFileChange;return _.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",_.a.createElement("input",{type:"file",onChange:Ze}))}function _e(Ke,Ze){if(!Ke)throw new String("\u6CA1\u6709\u6587\u4EF6");var Ne=new FormData;Ne.append("editormd-image-file",Ke),Ne.append("file_param_name","editormd-image-file"),Ne.append("byxhr","true");var $e=new window.XMLHttpRequest;$e.withCredentials=!0,$e.addEventListener("load",function(Je){Ze(JSON.parse(Je.target.responseText),Ke)},!1),$e.addEventListener("error",function(Je){console.error(Je)},!1),$e.open("POST","".concat(ce.a,"/api/attachments.json")),$e.send(Ne)}var De=L("XlT3"),ge=L("e7Hv"),fe=L("2yBE"),Ce=L("5LYH"),ae=Ce.a.Group,Q={margin:"0 8px"},J=function(Ke){var Ze=Ke.callback,Ne=Ke.onCancel;function $e(Je){Ze(Je)}return _.a.createElement(S.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:$e},_.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},_.a.createElement("span",{style:Q},"\u5355\u5143\u683C\u6570\uFF1A"),_.a.createElement("span",{style:Q},"\u884C\u6570"),_.a.createElement(S.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},_.a.createElement(ge.a,null)),_.a.createElement("span",{style:Q},"\u5217\u6570"),_.a.createElement(S.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},_.a.createElement(ge.a,null))),_.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},_.a.createElement("span",{style:Q},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),_.a.createElement(S.a.Item,{name:"align"},_.a.createElement(ae,null,_.a.createElement(Ce.a,{value:"default"},_.a.createElement("i",{className:"fa fa-align-justify"})),_.a.createElement(Ce.a,{value:"left"},_.a.createElement("i",{className:"fa fa-align-left"})),_.a.createElement(Ce.a,{value:"center"},_.a.createElement("i",{className:"fa fa-align-center"})),_.a.createElement(Ce.a,{value:"right"},_.a.createElement("i",{className:"fa fa-align-right"}))))),_.a.createElement("div",{className:"flex-container flex-end"},_.a.createElement(a.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),_.a.createElement(a.a,{type:"ghost",onClick:Ne},"\u53D6\u6D88")))},Z=L("ErOA"),pe=L("7Cbv"),le="link",ye="upload-image",Te="code-block",Pe="add-table",He="------------",Oe={default:He,left:":".concat(He),center:":".concat(He,":"),right:"".concat(He,":")},Ue=L("9VGf"),je,Ve;function Re(){}var Xe=0,Qe=1e4,We="\u2581",ze=`
|
|
|
**\u6A21\u677F\u6807\u9898**
|
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function Me(Ke){return/^\d+$/.test(Ke)?"".concat(Ke,"px"):Ke}var Ie=navigator.platform.toUpperCase().indexOf("MAC")>=0,Be=Ie?"Cmd":"Ctrl",we=["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"],Ae=(je={},Object(T.a)(je,Be+"-B","bold"),Object(T.a)(je,Be+"-I","italic"),je),ke=(Ve={},Object(T.a)(Ve,le,"\u6DFB\u52A0\u94FE\u63A5"),Object(T.a)(Ve,Te,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(T.a)(Ve,ye,"\u6DFB\u52A0\u6587\u4EF6"),Object(T.a)(Ve,Pe,"\u6DFB\u52A0\u8868\u683C"),Ve),Le=ee.a=function(Ke){var Ze=Ke.defaultValue,Ne=Ze===void 0?"":Ze,$e=Ke.onChange,Je=Ke.width,qe=Je===void 0?"100%":Je,ot=Ke.height,at=ot===void 0?400:ot,rt=Ke.miniToolbar,dt=rt===void 0?!1:rt,nt=Ke.isFocus,mt=nt===void 0?!1:nt,yt=Ke.watch,ft=Ke.insertTemp,ht=Ke.mode,Rt=ht===void 0?"markdown":ht,Wt=Ke.id,wt=Wt===void 0?"markdown-editor-id":Wt,lt=Ke.showResizeBar,_t=lt===void 0?!1:lt,jt=Ke.noStorage,Ht=jt===void 0?!1:jt,ct=Ke.showNullButton,bt=ct===void 0?!1:ct,gt=Ke.hidetoolBar,Ut=gt===void 0?!1:gt,Lt=Ke.fullScreen,It=Lt===void 0?!1:Lt,St=Ke.onBlur,Jt=Ke.onCMBeforeChange,kt=Ke.onFullScreen,zt=Ke.className,st=zt===void 0?"":zt,pt=Ke.disablePaste,Ct=pt===void 0?!1:pt,Dt=Ke.placeholder,Tt=Dt===void 0?"":Dt,tr=Ke.values,yr=tr===void 0?"":tr,Kt=Object(l.useState)(null),ue=Object(i.a)(Kt,2),V=ue[0],Y=ue[1],ie=Object(l.useState)(Ne),Ee=Object(i.a)(ie,2),oe=Ee[0],Fe=Ee[1],tt=Object(l.useState)(yt),xt=Object(i.a)(tt,2),Ot=xt[0],ut=xt[1],Ft=Object(l.useState)(It),Xt=Object(i.a)(Ft,2),er=Xt[0],nr=Xt[1],ur=Object(l.useState)(""),fr=Object(i.a)(ur,2),Pt=fr[0],sr=fr[1],lr=Object(l.useState)(0),br=Object(i.a)(lr,2),$t=br[0],$r=br[1],jr=Object(l.useState)(at),Kn=Object(i.a)(jr,2),Xr=Kn[0],pn=Kn[1],rn=Object(l.useState)(!1),Nn=Object(i.a)(rn,2),Cr=Nn[0],nn=Nn[1],Tn=Object(l.useRef)(Object(pe.a)()),an=Object(l.useRef)(!1),Pr=Object(l.useRef)(),cr=Object(l.useRef)(),Nr=Object(l.useRef)(),mr=Object(l.useRef)(),zr=Object(l.useRef)(),Or=function(){var Yt=Object(N.a)(E.a.mark(function ir(){var Zt,Er;return E.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:return Rr.next=2,Object(Z.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Tn.current}});case 2:Er=Rr.sent,Er!=null&&(Zt=Er.attachments)!==null&&Zt!==void 0&&Zt.length&&(console.log("cm:",V,cr),Er.attachments.map(function(xr){xr.content_type.indexOf("image")>-1?V.replaceSelection(".concat(xr.content_type,")")):xr.content_type.indexOf("video")>-1?V.replaceSelection('<video width="100%" controls src="'.concat(A.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):xr.content_type.indexOf("pdf")>-1?V.replaceSelection('<a href="'.concat(A.a.API_SERVER,"/api/attachments/").concat(xr.id,"?type=").concat(xr.content_type,'&disposition=inline" target="_blank">').concat(xr.name,"</a>")):V.replaceSelection("[".concat(xr.name,"](").concat(A.a.API_SERVER,"/api/attachments/").concat(xr.id,"?type=").concat(xr.content_type,")"))}));case 4:case"end":return Rr.stop()}},ir)}));return function(){return Yt.apply(this,arguments)}}();Object(l.useEffect)(function(){Fe(yr),V==null||V.setValue(yr)},[yr]),Object(l.useEffect)(function(){kt==null||kt(er)},[er]),Object(l.useEffect)(function(){if(cr.current){var Yt=n.a.fromTextArea(cr.current,{mode:Rt,lineNumbers:!dt,lineWrapping:!0,value:Ne,autoCloseTags:!0,autoCloseBrackets:!0});mt&&Yt.focus();function ir(Zt,Er){if(Ct){Er.preventDefault();return}var gr=Er.clipboardData;if(gr){var Rr=gr.types.toString(),xr=gr.items;if(Rr==="Files"||gr.types.indexOf("Files")>-1){if(Er.preventDefault(),Rt=="stex")return;try{var Br,dn=xr[1];((Br=xr[0])===null||Br===void 0?void 0:Br.kind)==="file"&&(dn=xr[0]);var wr=dn.getAsFile(),Yn=wr.name.split(".").pop();_e(wr,function(Ir){if(Ir.id){var yn,on,bn;(wr==null||((yn=wr.type)===null||yn===void 0)?void 0:yn.indexOf("image"))>-1?Yt.replaceSelection(".concat(Ir.content_type,")")):(wr==null||((on=wr.type)===null||on===void 0)?void 0:on.indexOf("video"))>-1?Yt.replaceSelection('<video width="100%" controls src="'.concat(A.a.API_SERVER,"/api/attachments/").concat(Ir.id,'"></video>')):(wr==null||((bn=wr.type)===null||bn===void 0)?void 0:bn.indexOf("pdf"))>-1?Yt.replaceSelection('<a href="'.concat(A.a.API_SERVER,"/api/attachments/").concat(Ir.id,"?type=").concat(wr.type,'&disposition=inline" target="_blank">').concat(wr.name,"</a>")):we.includes(Yn)?Yt.replaceSelection('<a href="'.concat(A.a.API_SERVER,"/api/attachments/").concat(Ir.id,'?type=office&disposition=inline" target="_blank">').concat(wr.name,"</a>")):Yt.replaceSelection("[".concat(wr.name,"](").concat(A.a.API_SERVER,"/api/attachments/").concat(Ir.id,"?type=").concat(Ir.content_type,")"))}else(Ir==null?void 0:Ir.status)===401&&(document.location.href="/user/login")})}catch(Ir){K.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Yt.on("paste",ir),Yt.on("dragleave",function(Zt,Er){Nr.current.classList.remove("mouse-hover-md")}),Yt.on("dragover",function(Zt,Er){Nr.current.classList.add("mouse-hover-md")}),Yt.on("drop",function(Zt,Er){Nr.current.classList.add("mouse-hover-md");var gr;if(gr=Er.dataTransfer.files,gr.length>0){Er.preventDefault(),Er.stopPropagation();for(var Rr=function(dn){var wr=gr[dn],Yn=wr.name.split(".").pop();_e(wr,function(Ir){if(Ir.id){var yn,on,bn;(wr==null||((yn=wr.type)===null||yn===void 0)?void 0:yn.indexOf("image"))>-1?Yt.replaceSelection(".concat(Ir.content_type,")")):(wr==null||((on=wr.type)===null||on===void 0)?void 0:on.indexOf("video"))>-1?Yt.replaceSelection('<video width="100%" controls src="'.concat(A.a.API_SERVER,"/api/attachments/").concat(Ir.id,'"></video>')):(wr==null||((bn=wr.type)===null||bn===void 0)?void 0:bn.indexOf("pdf"))>-1?Yt.replaceSelection('<a href="'.concat(A.a.API_SERVER,"/api/attachments/").concat(Ir.id,"?type=").concat(wr.type,'&disposition=inline" target="_blank">').concat(wr.name,"</a>")):we.includes(Yn)?Yt.replaceSelection('<a href="'.concat(A.a.API_SERVER,"/api/attachments/").concat(Ir.id,'?type=office&disposition=inline" target="_blank">').concat(wr.name,"</a>")):Yt.replaceSelection("[".concat(wr.name,"](").concat(A.a.API_SERVER,"/api/attachments/").concat(Ir.id,"?type=").concat(Ir.content_type,")"))}else(Ir==null?void 0:Ir.status)===401&&(document.location.href="/user/login")})},xr=0;xr<gr.length;xr++)Rr(xr)}}),Y(Yt),function(){Yt.off("paste",ir)}}},[]);var Vr=Object(l.useCallback)(function(){if(Nr.current)try{}catch(Yt){console.log(Yt,"---- to set md editor body height")}},[Xr,Nr,er]);Object(l.useEffect)(function(){function Yt(){var Zt=new o.a(function(Er){var gr=Object(G.a)(Er),Rr;try{for(gr.s();!(Rr=gr.n()).done;){var xr=Rr.value;(xr.target.offsetHeight>0||xr.target.offsetWidth>0)&&(Vr(),V.setSize("100%","100%"),V.refresh())}}catch(Br){gr.e(Br)}finally{gr.f()}});return Zt.observe(cr.current.parentElement),Zt}if(V){var ir=Yt();return function(){ir.unobserve(cr.current.parentElement)}}},[V,Vr]),Object(l.useEffect)(function(){if(V){for(var Yt=[],ir=function(){var xr=Er[Zt];gr=Object(i.a)(xr,2);var Br=gr[0],dn=gr[1],wr=Object(T.a)({},Br,function(){Wr(dn)});Yt.push(wr),V.addKeyMap(wr)},Zt=0,Er=Object.entries(Ae);Zt<Er.length;Zt++){var gr;ir()}return Pr.current=setInterval(function(){an.current&&Or()},4e3),function(){clearInterval(Pr.current);var Rr=Object(G.a)(Yt),xr;try{for(Rr.s();!(xr=Rr.n()).done;){var Br=xr.value;V.removeKeyMap(Br)}}catch(dn){Rr.e(dn)}finally{Rr.f()}}}},[V]),Object(l.useEffect)(function(){It!==er&&nr(It)},[It]),Object(Ue.a)(function(){if(!Ht&&$t>0){var Yt=new Date().getTime(),ir=window.sessionStorage.getItem(wt);Yt>=$t+Qe&&(!ir||ir!==oe)&&(window.sessionStorage.setItem(wt,oe),nn(!0))}},Qe),Object(l.useEffect)(function(){ut(yt)},[V,yt]),Object(l.useEffect)(function(){V&&(mt&&V.focus())},[V,mt]),Object(l.useEffect)(function(){if(Ot&&V){var Yt=V.getScrollerElement();function ir(Zt){var Er=Zt.target;if(zr.current){var gr=Er.scrollTop/Er.scrollHeight;zr.current.scrollTop=zr.current.scrollHeight*gr}}return Yt.addEventListener("scroll",ir),function(){Yt.removeEventListener("scroll",ir)}}},[V,Ot]),Object(l.useEffect)(function(){if(V&&Jt){function Yt(ir,Zt){Jt(ir,Zt)}return V.on("beforeChange",Yt),function(){V.off("beforeChange",Yt)}}},[V,Jt]),Object(l.useEffect)(function(){if(V&&St){function Yt(){St(V.getValue())}return V.on("blur",Yt),function(){V.off("blur",Yt)}}},[V,St]),Object(l.useEffect)(function(){if(V){function Yt(ir){var Zt=ir.getValue();Fe(Zt),$r(new Date().getTime()),ir.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),$e&&$e(Zt)}return V.on("change",Yt),function(){V.off("change",Yt)}}},[V,$e]),Object(l.useEffect)(function(){V&&(Ne==null?(V.setValue(""),Fe("")):Ne!==V.getValue()&&(V.setValue(Ne),Fe(Ne),V.setCursor(V.lineCount(),0)))},[V,Ne]);var Wr=Object(l.useCallback)(function(Yt){var ir=V.getCursor(),Zt=V.getSelection(),Er=Zt.split(`
|
|
|
`);switch(Yt){case"bold":return V.replaceSelection("**"+Zt+"**"),Zt===""&&V.setCursor(ir.line,ir.ch+2),V.focus();case"italic":return V.replaceSelection("*"+Zt+"*"),Zt===""&&V.setCursor(ir.line,ir.ch+1),V.focus();case"code":return V.replaceSelection("`"+Zt+"`"),Zt===""&&V.setCursor(ir.line,ir.ch+1),V.focus();case"inline-latex":return V.replaceSelection("`$$"+Zt+"$$`"),Zt===""&&V.setCursor(ir.line,ir.ch+3),V.focus();case"latex":return V.replaceSelection("```latex\n"+Zt+"\n```"),V.setCursor(ir.line+1,Zt.length+1),V.focus();case"line-break":return V.replaceSelection(`<br/>
|
|
|
`),V.focus();case"list-ul":return Zt===""?V.replaceSelection("- "+Zt):V.replaceSelection(Er.map(function(gr){return gr===""?"":"- ".concat(gr)}).join(`
|
|
|
`)),V.focus();case"list-ol":return Zt===""?V.replaceSelection("1. "+Zt):V.replaceSelection(Er.map(function(gr,Rr){return gr===""?"":"".concat(Rr+1,". ").concat(gr)}).join(`
|
|
|
`)),V.focus();case"add-null-ch":return Zt===""&&V.setCursor(ir.line,ir.ch+1),V.replaceSelection(We),V.focus();case"inster-template-1":return Zt===""&&V.setCursor(ir.line,ir.ch),V.replaceSelection(ze),V.focus();case"eraser":return V.setValue(""),V.focus();case"trigger-watch":return ut(!Ot),V.focus();case"trigger-full-screen":return nr(!er),V.focus();case le:sr(le);return;case Te:sr(Te);return;case ye:sr(ye);return;case Pe:sr(Pe);return;default:throw new Error}},[V,Ot,er]),vn=Object(l.useCallback)(function(Yt){sr("");switch(Pt){case le:var ir=Yt.title,Zt=Yt.link;return V.replaceSelection("[".concat(ir,"](").concat(Zt,")")),V.focus();case Te:var Er=Yt.language,gr=Yt.content;return V.replaceSelection(["```"+Er,gr,"```"].join(`
|
|
|
`)),V.focus();case ye:var Rr=Yt.src,xr=Yt.alt;return xr?V.replaceSelection(".concat(Rr,' "').concat(xr,'" )')):V.replaceSelection("")),V.focus();case Pe:for(var Br=Yt.row,dn=Yt.col,wr=Yt.align,Yn=`
|
|
|
`,Ir=0;Ir<Br;Ir++){for(var yn=[],on=[],bn=0;bn<dn;bn++)Ir===1&&on.push(Oe[wr]),yn.push(" ");Ir===1&&(Yn+="| ".concat(on.join(" | "),` |
|
|
|
`)),Yn+="| ".concat(yn.join(dn===1?"":" | "),` |
|
|
|
`)}return V.replaceSelection(Yn+`
|
|
|
`),V.focus();default:throw new Error}},[V,Pt]),Dn=Object(l.useMemo)(function(){switch(Pt){case le:return _.a.createElement(q,{callback:vn,onCancel:hr});case Te:return _.a.createElement($.b,{callback:vn,onCancel:hr});case ye:return _.a.createElement(he,{callback:vn,onCancel:hr});case Pe:return _.a.createElement(J,{callback:vn,onCancel:hr});default:return null}},[Pt]);function hr(){sr("")}Object(l.useEffect)(function(){if(mr.current){var Yt=mr.current,ir=!1,Zt=0;function Er(xr){ir=!0,Zt=xr.pageY}function gr(){ir=!1}function Rr(xr){if(ir){var Br=xr.pageY-Zt;Br<0&&(Br=0),Br>300&&(Br=300);var dn=at+Br+"px";pn(dn)}}return Yt.addEventListener("mousedown",Er),document.addEventListener("mousemove",Rr),document.addEventListener("mouseup",gr),function(){Yt.removeEventListener("mousedown",Er),document.removeEventListener("mousemove",Rr),document.removeEventListener("mouseup",gr)}}},[V,mr]),Object(l.useEffect)(function(){pn(at)},[at]);var rr=Me(qe),Ar=Me(Xr),Dr={width:rr,height:Ar},Jr=Object(l.useMemo)(function(){if($t){var Yt=new Date($t),ir=Yt.getHours(),Zt=Yt.getMinutes(),Er=Yt.getSeconds();return ir=ir<10?"0"+ir:ir,Zt=Zt<10?"0"+Zt:Zt,Er=Er<10?"0"+Er:Er,"".concat(ir,":").concat(Zt,":").concat(Er)}return 0},[$t]);function Qr(){window.sessionStorage.removeItem(wt),nn(!1),$r(0)}function cn(){nn(!1),$r(0),V.setValue(window.sessionStorage.getItem(wt))}function kr(Yt,ir){var Zt=V.getValue();Zt=Zt.replace(Yt,ir),Fe(Zt),V==null||V.setValue(Zt)}return _.a.createElement(l.Fragment,null,_.a.createElement("div",{className:"markdown-editor-wrapper",ref:Nr},_.a.createElement("div",{className:"markdown-editor-container ".concat(st," ").concat(Ot?"on-preview":""," ").concat(dt?"mini":""," ").concat(er?"full-screen":""),style:Dr},_.a.createElement(u,{insertTemp:ft,watch:Ot,fullScreen:er,showNullButton:bt,onActionCallback:Wr,hidetoolBar:Ut,uuid:Tn.current,setOpenPhones:function(){an.current=!0}}),_.a.createElement("div",{className:"markdown-editor-body"},_.a.createElement("div",{className:"codemirror-container"},_.a.createElement("textarea",{ref:cr,placeholder:Tt})),Ot?_.a.createElement("div",{ref:zr,className:"preview-container"},Rt==="stex"&&_.a.createElement(x,{value:oe}),Rt!=="stex"&&_.a.createElement(d.a,{edit:!0,value:oe,replaces:kr})):null))),_t?_.a.createElement("a",{ref:mr,className:"editor-resize"}):null,_.a.createElement(k.a,null,ke[Pt]?_.a.createElement(M.a,{centered:!0,title:ke[Pt],visible:!0,onCancel:hr,footer:null,className:"markdown-popup-form"},Dn):null))}},PD8m:function(W,ee){W.exports={name:"memoryStorage",read:B,write:M,each:G,remove:X,clearAll:K};var L={};function B(N){return L[N]}function M(N,i){L[N]=i}function G(N){for(var i in L)L.hasOwnProperty(i)&&N(L[i],i)}function X(N){delete L[N]}function K(N){L={}}},PVpz:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(B){return function(){var M=B,G=M.lib,X=G.StreamCipher,K=M.algo,N=[],i=[],T=[],e=K.RabbitLegacy=X.extend({_doReset:function(){var l=this._key.words,_=this.cfg.iv,r=this._X=[l[0],l[3]<<16|l[2]>>>16,l[1],l[0]<<16|l[3]>>>16,l[2],l[1]<<16|l[0]>>>16,l[3],l[2]<<16|l[1]>>>16],n=this._C=[l[2]<<16|l[2]>>>16,l[0]&4294901760|l[1]&65535,l[3]<<16|l[3]>>>16,l[1]&4294901760|l[2]&65535,l[0]<<16|l[0]>>>16,l[2]&4294901760|l[3]&65535,l[1]<<16|l[1]>>>16,l[3]&4294901760|l[0]&65535];this._b=0;for(var o=0;o<4;o++)E.call(this);for(var o=0;o<8;o++)n[o]^=r[o+4&7];if(_){var c=_.words,v=c[0],f=c[1],y=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,h=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,b=y>>>16|h&4294901760,m=h<<16|y&65535;n[0]^=y,n[1]^=b,n[2]^=h,n[3]^=m,n[4]^=y,n[5]^=b,n[6]^=h,n[7]^=m;for(var o=0;o<4;o++)E.call(this)}},_doProcessBlock:function(l,_){var r=this._X;E.call(this),N[0]=r[0]^r[5]>>>16^r[3]<<16,N[1]=r[2]^r[7]>>>16^r[5]<<16,N[2]=r[4]^r[1]>>>16^r[7]<<16,N[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)N[n]=(N[n]<<8|N[n]>>>24)&16711935|(N[n]<<24|N[n]>>>8)&4278255360,l[_+n]^=N[n]},blockSize:128/32,ivSize:64/32});function E(){for(var l=this._X,_=this._C,r=0;r<8;r++)i[r]=_[r];_[0]=_[0]+1295307597+this._b|0,_[1]=_[1]+3545052371+(_[0]>>>0<i[0]>>>0?1:0)|0,_[2]=_[2]+886263092+(_[1]>>>0<i[1]>>>0?1:0)|0,_[3]=_[3]+1295307597+(_[2]>>>0<i[2]>>>0?1:0)|0,_[4]=_[4]+3545052371+(_[3]>>>0<i[3]>>>0?1:0)|0,_[5]=_[5]+886263092+(_[4]>>>0<i[4]>>>0?1:0)|0,_[6]=_[6]+1295307597+(_[5]>>>0<i[5]>>>0?1:0)|0,_[7]=_[7]+3545052371+(_[6]>>>0<i[6]>>>0?1:0)|0,this._b=_[7]>>>0<i[7]>>>0?1:0;for(var r=0;r<8;r++){var n=l[r]+_[r],o=n&65535,c=n>>>16,v=((o*o>>>17)+o*c>>>15)+c*c,f=((n&4294901760)*n|0)+((n&65535)*n|0);T[r]=v^f}l[0]=T[0]+(T[7]<<16|T[7]>>>16)+(T[6]<<16|T[6]>>>16)|0,l[1]=T[1]+(T[0]<<8|T[0]>>>24)+T[7]|0,l[2]=T[2]+(T[1]<<16|T[1]>>>16)+(T[0]<<16|T[0]>>>16)|0,l[3]=T[3]+(T[2]<<8|T[2]>>>24)+T[1]|0,l[4]=T[4]+(T[3]<<16|T[3]>>>16)+(T[2]<<16|T[2]>>>16)|0,l[5]=T[5]+(T[4]<<8|T[4]>>>24)+T[3]|0,l[6]=T[6]+(T[5]<<16|T[5]>>>16)+(T[4]<<16|T[4]>>>16)|0,l[7]=T[7]+(T[6]<<8|T[6]>>>24)+T[5]|0}M.RabbitLegacy=X._createHelper(e)}(),B.RabbitLegacy})},QOAJ:function(W,ee,L){"use strict";var B=L("U+Vu"),M=Object(B.a)();ee.a=M},RELg:function(W,ee,L){var B=L("MFOe"),M=B.Global;W.exports={name:"oldIE-userDataStorage",write:i,read:T,each:e,remove:E,clearAll:l};var G="storejs",X=M.document,K=n(),N=(M.navigator?M.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function i(o,c){if(N)return;var v=r(o);K(function(f){f.setAttribute(v,c),f.save(G)})}function T(o){if(N)return;var c=r(o),v=null;return K(function(f){v=f.getAttribute(c)}),v}function e(o){K(function(c){for(var v=c.XMLDocument.documentElement.attributes,f=v.length-1;f>=0;f--){var y=v[f];o(c.getAttribute(y.name),y.name)}})}function E(o){var c=r(o);K(function(v){v.removeAttribute(c),v.save(G)})}function l(){K(function(o){var c=o.XMLDocument.documentElement.attributes;o.load(G);for(var v=c.length-1;v>=0;v--)o.removeAttribute(c[v].name);o.save(G)})}var _=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function r(o){return o.replace(/^\d/,"___$&").replace(_,"___")}function n(){if(!X||!X.documentElement||!X.documentElement.addBehavior)return null;var o="script",c,v,f;try{v=new ActiveXObject("htmlfile"),v.open(),v.write("<"+o+">document.w=window</"+o+'><iframe src="/favicon.ico"></iframe>'),v.close(),c=v.w.frames[0].document,f=c.createElement("div")}catch(y){f=X.createElement("div"),c=X.body}return function(y){var h=[].slice.call(arguments,0);h.unshift(f),c.appendChild(f),f.addBehavior("#default#userData"),f.load(G),y.apply(this,h),c.removeChild(f);return}}},S6kV:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("OLod"))})(this,function(B){return B.mode.OFB=function(){var M=B.lib.BlockCipherMode.extend(),G=M.Encryptor=M.extend({processBlock:function(X,K){var N=this._cipher,i=N.blockSize,T=this._iv,e=this._keystream;T&&(e=this._keystream=T.slice(0),this._iv=void 0),N.encryptBlock(e,0);for(var E=0;E<i;E++)X[K+E]^=e[E]}});return M.Decryptor=G,M}(),B.mode.OFB})},SJMd:function(W,ee){/**
|
|
|
* @license
|
|
|
* Copyright (C) 2006 Google Inc.
|
|
|
*
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
* You may obtain a copy of the License at
|
|
|
*
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
*
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
* See the License for the specific language governing permissions and
|
|
|
* limitations under the License.
|
|
|
*/var L,B,M,G=!1,X,K;window.PR_SHOULD_USE_CONTINUATION=!0;var N,i;(function(){var T=window,e=["break,continue,do,else,for,if,return,while"],E=[e,"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"],l=[E,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],_=[l,"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"],r=[l,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],n=[l,"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"],o="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",c=[l,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],v="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",f=[e,"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"],y=[e,"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"],h=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],b=[_,n,r,c,v,f,y,h],m=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,d="str",x="kwd",R="com",O="typ",w="lit",D="pun",A="pln",P="tag",I="dec",u="src",k="atn",g="atv",a="nocode",C="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function S(ae){for(var Q=0,J=!1,Z=!1,pe=0,le=ae.length;pe<le;++pe){var ye=ae[pe];if(ye.ignoreCase)Z=!0;else if(/[a-z]/i.test(ye.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){J=!0,Z=!1;break}}var Te={b:8,t:9,n:10,v:11,f:12,r:13};function Pe(Ve){var Re=Ve.charCodeAt(0);if(Re!==92)return Re;var Xe=Ve.charAt(1);return Re=Te[Xe],Re||("0"<=Xe&&Xe<="7"?parseInt(Ve.substring(1),8):Xe==="u"||Xe==="x"?parseInt(Ve.substring(2),16):Ve.charCodeAt(1))}function He(Ve){if(Ve<32)return(Ve<16?"\\x0":"\\x")+Ve.toString(16);var Re=String.fromCharCode(Ve);return Re==="\\"||Re==="-"||Re==="]"||Re==="^"?"\\"+Re:Re}function Oe(Ve){var Re=Ve.substring(1,Ve.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")),Xe=[],Qe=Re[0]==="^",We=["["];Qe&&We.push("^");for(var ze=Qe?1:0,Me=Re.length;ze<Me;++ze){var Ie=Re[ze];if(/\\[bdsw]/i.test(Ie))We.push(Ie);else{var Be=Pe(Ie),we;ze+2<Me&&Re[ze+1]==="-"?(we=Pe(Re[ze+2]),ze+=2):we=Be,Xe.push([Be,we]),we<65||Be>122||(we<65||Be>90||Xe.push([Math.max(65,Be)|32,Math.min(we,90)|32]),we<97||Be>122||Xe.push([Math.max(97,Be)&~32,Math.min(we,122)&~32]))}}Xe.sort(function(Ke,Ze){return Ke[0]-Ze[0]||Ze[1]-Ke[1]});for(var Ae=[],ke=[],ze=0;ze<Xe.length;++ze){var Le=Xe[ze];Le[0]<=ke[1]+1?ke[1]=Math.max(ke[1],Le[1]):Ae.push(ke=Le)}for(var ze=0;ze<Ae.length;++ze){var Le=Ae[ze];We.push(He(Le[0])),Le[1]>Le[0]&&(Le[1]+1>Le[0]&&We.push("-"),We.push(He(Le[1])))}return We.push("]"),We.join("")}function Ue(Ve){for(var Re=Ve.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")),Xe=Re.length,Qe=[],We=0,ze=0;We<Xe;++We){var Me=Re[We];if(Me==="(")++ze;else if(Me.charAt(0)==="\\"){var Ie=+Me.substring(1);Ie&&(Ie<=ze?Qe[Ie]=-1:Re[We]=He(Ie))}}for(var We=1;We<Qe.length;++We)Qe[We]===-1&&(Qe[We]=++Q);for(var We=0,ze=0;We<Xe;++We){var Me=Re[We];if(Me==="(")++ze,Qe[ze]||(Re[We]="(?:");else if(Me.charAt(0)==="\\"){var Ie=+Me.substring(1);Ie&&Ie<=ze&&(Re[We]="\\"+Qe[Ie])}}for(var We=0;We<Xe;++We)Re[We]==="^"&&Re[We+1]!=="^"&&(Re[We]="");if(Ve.ignoreCase&&J)for(var We=0;We<Xe;++We){var Me=Re[We],Be=Me.charAt(0);Me.length>=2&&Be==="["?Re[We]=Oe(Me):Be!=="\\"&&(Re[We]=Me.replace(/[a-zA-Z]/g,function(ke){var Le=ke.charCodeAt(0);return"["+String.fromCharCode(Le&~32,Le|32)+"]"}))}return Re.join("")}for(var je=[],pe=0,le=ae.length;pe<le;++pe){var ye=ae[pe];if(ye.global||ye.multiline)throw new Error(""+ye);je.push("(?:"+Ue(ye)+")")}return new RegExp(je.join("|"),Z?"gi":"g")}function p(ae,Q){var J=/(?:^|\s)nocode(?:\s|$)/,Z=[],pe=0,le=[],ye=0;function Te(Pe){var He=Pe.nodeType;if(He==1){if(J.test(Pe.className))return;for(var Oe=Pe.firstChild;Oe;Oe=Oe.nextSibling)Te(Oe);var Ue=Pe.nodeName.toLowerCase();(Ue==="br"||Ue==="li")&&(Z[ye]=`
|
|
|
`,le[ye<<1]=pe++,le[ye++<<1|1]=Pe)}else if(He==3||He==4){var je=Pe.nodeValue;je.length&&(Q?je=je.replace(/\r\n?/g,`
|
|
|
`):je=je.replace(/[ \t\r\n]+/g," "),Z[ye]=je,le[ye<<1]=pe,pe+=je.length,le[ye++<<1|1]=Pe)}}return Te(ae),{sourceCode:Z.join("").replace(/\n$/,""),spans:le}}function U(ae,Q,J,Z,pe){if(!J)return;var le={sourceNode:ae,pre:1,langExtension:null,numberLines:null,sourceCode:J,spans:null,basePos:Q,decorations:null};Z(le),pe.push.apply(pe,le.decorations)}var z=/\S/;function q(ae){for(var Q=void 0,J=ae.firstChild;J;J=J.nextSibling){var Z=J.nodeType;Q=Z===1?Q?ae:J:Z===3&&z.test(J.nodeValue)?ae:Q}return Q===ae?void 0:Q}function $(ae,Q){var J={},Z;(function(){for(var ye=ae.concat(Q),Te=[],Pe={},He=0,Oe=ye.length;He<Oe;++He){var Ue=ye[He],je=Ue[3];if(je)for(var Ve=je.length;--Ve>=0;)J[je.charAt(Ve)]=Ue;var Re=Ue[1],Xe=""+Re;Pe.hasOwnProperty(Xe)||(Te.push(Re),Pe[Xe]=null)}Te.push(/[\0-\uffff]/),Z=S(Te)})();var pe=Q.length,le=function(ye){for(var Te=ye.sourceCode,Pe=ye.basePos,He=ye.sourceNode,Oe=[Pe,A],Ue=0,je=Te.match(Z)||[],Ve={},Re=0,Xe=je.length;Re<Xe;++Re){var Qe=je[Re],We=Ve[Qe],ze=void 0,Me;if(typeof We=="string")Me=!1;else{var Ie=J[Qe.charAt(0)];if(Ie)ze=Qe.match(Ie[1]),We=Ie[0];else{for(var Be=0;Be<pe;++Be)if(Ie=Q[Be],ze=Qe.match(Ie[1]),ze){We=Ie[0];break}ze||(We=A)}Me=We.length>=5&&We.substring(0,5)==="lang-",Me&&!(ze&&typeof ze[1]=="string")&&(Me=!1,We=u),Me||(Ve[Qe]=We)}var we=Ue;if(Ue+=Qe.length,!Me)Oe.push(Pe+we,We);else{var Ae=ze[1],ke=Qe.indexOf(Ae),Le=ke+Ae.length;ze[2]&&(Le=Qe.length-ze[2].length,ke=Le-Ae.length);var Ke=We.substring(5);U(He,Pe+we,Qe.substring(0,ke),le,Oe),U(He,Pe+we+ke,Ae,se(Ke,Ae),Oe),U(He,Pe+we+Le,Qe.substring(Le),le,Oe)}}ye.decorations=Oe};return le}function re(ae){var Q=[],J=[];ae.tripleQuotedStrings?Q.push([d,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ae.multiLineStrings?Q.push([d,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Q.push([d,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ae.verbatimStrings&&J.push([d,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Z=ae.hashComments;Z&&(ae.cStyleComments?(Z>1?Q.push([R,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Q.push([R,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),J.push([d,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Q.push([R,/^#[^\r\n]*/,null,"#"])),ae.cStyleComments&&(J.push([R,/^\/\/[^\r\n]*/,null]),J.push([R,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var pe=ae.regexLiterals;if(pe){var le=pe>1?"":`
|
|
|
\r`,ye=le?".":"[\\S\\s]",Te="/(?=[^/*"+le+"])(?:[^/\\x5B\\x5C"+le+"]|\\x5C"+ye+"|\\x5B(?:[^\\x5C\\x5D"+le+"]|\\x5C"+ye+")*(?:\\x5D|$))+/";J.push(["lang-regex",RegExp("^"+C+"("+Te+")")])}var Pe=ae.types;Pe&&J.push([O,Pe]);var He=(""+ae.keywords).replace(/^ | $/g,"");He.length&&J.push([x,new RegExp("^(?:"+He.replace(/[\s,]+/g,"|")+")\\b"),null]),Q.push([A,/^\s+/,null,` \r
|
|
|
\xA0`]);var Oe="^.[^\\s\\w.$@'\"`/\\\\]*";return ae.regexLiterals&&(Oe+="(?!s*/)"),J.push([w,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[A,/^[a-z_$][a-z_$@0-9]*/i,null],[w,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[A,/^\\[\s\S]?/,null],[D,new RegExp(Oe),null]),$(Q,J)}var ce=re({keywords:b,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ne(ae,Q,J){for(var Z=/(?:^|\s)nocode(?:\s|$)/,pe=/\r\n?|\n/,le=ae.ownerDocument,ye=le.createElement("li");ae.firstChild;)ye.appendChild(ae.firstChild);var Te=[ye];function Pe(Re){var Xe=Re.nodeType;if(Xe==1&&!Z.test(Re.className))if(Re.nodeName==="br")He(Re),Re.parentNode&&Re.parentNode.removeChild(Re);else for(var Qe=Re.firstChild;Qe;Qe=Qe.nextSibling)Pe(Qe);else if((Xe==3||Xe==4)&&J){var We=Re.nodeValue,ze=We.match(pe);if(ze){var Me=We.substring(0,ze.index);Re.nodeValue=Me;var Ie=We.substring(ze.index+ze[0].length);if(Ie){var Be=Re.parentNode;Be.insertBefore(le.createTextNode(Ie),Re.nextSibling)}He(Re),Me||Re.parentNode.removeChild(Re)}}}function He(Re){for(;!Re.nextSibling;)if(Re=Re.parentNode,!Re)return;function Xe(ze,Me){var Ie=Me?ze.cloneNode(!1):ze,Be=ze.parentNode;if(Be){var we=Xe(Be,1),Ae=ze.nextSibling;we.appendChild(Ie);for(var ke=Ae;ke;ke=Ae)Ae=ke.nextSibling,we.appendChild(ke)}return Ie}for(var Qe=Xe(Re.nextSibling,0),We;(We=Qe.parentNode)&&We.nodeType===1;)Qe=We;Te.push(Qe)}for(var Oe=0;Oe<Te.length;++Oe)Pe(Te[Oe]);Q===(Q|0)&&Te[0].setAttribute("value",Q);var Ue=le.createElement("ol");Ue.className="linenums";for(var je=Math.max(0,Q-1|0)||0,Oe=0,Ve=Te.length;Oe<Ve;++Oe)ye=Te[Oe],ye.className="L"+(Oe+je)%10,ye.firstChild||ye.appendChild(le.createTextNode("\xA0")),Ue.appendChild(ye);ae.appendChild(Ue)}function me(ae){var Q=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Q=Q&&+Q[1]<=8;var J=/\n/g,Z=ae.sourceCode,pe=Z.length,le=0,ye=ae.spans,Te=ye.length,Pe=0,He=ae.decorations,Oe=He.length,Ue=0;He[Oe]=pe;var je,Ve;for(Ve=je=0;Ve<Oe;)He[Ve]!==He[Ve+2]?(He[je++]=He[Ve++],He[je++]=He[Ve++]):Ve+=2;for(Oe=je,Ve=je=0;Ve<Oe;){for(var Re=He[Ve],Xe=He[Ve+1],Qe=Ve+2;Qe+2<=Oe&&He[Qe+1]===Xe;)Qe+=2;He[je++]=Re,He[je++]=Xe,Ve=Qe}Oe=He.length=je;var We=ae.sourceNode,ze="";We&&(ze=We.style.display,We.style.display="none");try{for(var Me=null;Pe<Te;){var Ie=ye[Pe],Be=ye[Pe+2]||pe,we=He[Ue+2]||pe,Qe=Math.min(Be,we),Ae=ye[Pe+1],ke;if(Ae.nodeType!==1&&(ke=Z.substring(le,Qe))){Q&&(ke=ke.replace(J,"\r")),Ae.nodeValue=ke;var Le=Ae.ownerDocument,Ke=Le.createElement("span");Ke.className=He[Ue+1];var Ze=Ae.parentNode;Ze.replaceChild(Ke,Ae),Ke.appendChild(Ae),le<Be&&(ye[Pe+1]=Ae=Le.createTextNode(Z.substring(Qe,Be)),Ze.insertBefore(Ae,Ke.nextSibling))}le=Qe,le>=Be&&(Pe+=2),le>=we&&(Ue+=2)}}finally{We&&(We.style.display=ze)}}var be={};function he(ae,Q){for(var J=Q.length;--J>=0;){var Z=Q[J];be.hasOwnProperty(Z)?T.console&&console.warn("cannot override language handler %s",Z):be[Z]=ae}}function se(ae,Q){return ae&&be.hasOwnProperty(ae)||(ae=/^\s*</.test(Q)?"default-markup":"default-code"),be[ae]}he(ce,["default-code"]),he($([],[[A,/^[^<?]+/],[I,/^<!\w[^>]*(?:>|$)/],[R,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[D,/^(?:<[%?]|[%?]>)/],["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"]),he($([[A,/^[\s]+/,null,` \r
|
|
|
`],[g,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[P,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[k,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[D,/^[=<>\/]+/],["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"]),he($([],[[g,/^[\s\S]+/]]),["uq.val"]),he(re({keywords:_,hashComments:!0,cStyleComments:!0,types:m}),["c","cc","cpp","cxx","cyc","m"]),he(re({keywords:"null,true,false"}),["json"]),he(re({keywords:n,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:m}),["cs"]),he(re({keywords:r,cStyleComments:!0}),["java"]),he(re({keywords:h,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),he(re({keywords:f,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),he(re({keywords:v,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),he(re({keywords:y,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),he(re({keywords:c,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),he(re({keywords:o,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),he($([],[[d,/^[\s\S]+/]]),["regex"]);function _e(ae){var Q=ae.langExtension;try{var J=p(ae.sourceNode,ae.pre),Z=J.sourceCode;ae.sourceCode=Z,ae.spans=J.spans,ae.basePos=0,se(Q,Z)(ae),me(ae)}catch(pe){T.console&&console.log(pe&&pe.stack||pe)}}function De(ae,Q,J){var Z=J||!1,pe=Q||null,le=document.createElement("div");le.innerHTML="<pre>"+ae+"</pre>",le=le.firstChild,Z&&ne(le,Z,!0);var ye={langExtension:pe,numberLines:Z,sourceNode:le,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return _e(ye),le.innerHTML}function ge(ae,Q){var J=Q||document.body,Z=J.ownerDocument||document;function pe(Ie){return J.getElementsByTagName(Ie)}for(var le=[pe("pre"),pe("code"),pe("xmp")],ye=[],Te=0;Te<le.length;++Te)for(var Pe=0,He=le[Te].length;Pe<He;++Pe)ye.push(le[Te][Pe]);le=null;var Oe=Date;Oe.now||(Oe={now:function(){return+new Date}});var Ue=0,je=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ve=/\bprettyprint\b/,Re=/\bprettyprinted\b/,Xe=/pre|xmp/i,Qe=/^code$/i,We=/^(?:pre|code|xmp)$/i,ze={};function Me(){for(var Ie=T.PR_SHOULD_USE_CONTINUATION?Oe.now()+250:Infinity;Ue<ye.length&&Oe.now()<Ie;Ue++){for(var Be=ye[Ue],we=ze,Ae=Be;Ae=Ae.previousSibling;){var ke=Ae.nodeType,Le=(ke===7||ke===8)&&Ae.nodeValue;if(Le?!/^\??prettify\b/.test(Le):ke!==3||/\S/.test(Ae.nodeValue))break;if(Le){we={},Le.replace(/\b(\w+)=([\w:.%+-]+)/g,function(yt,ft,ht){we[ft]=ht});break}}var Ke=Be.className;if((we!==ze||Ve.test(Ke))&&!Re.test(Ke)){for(var Ze=!1,Ne=Be.parentNode;Ne;Ne=Ne.parentNode){var $e=Ne.tagName;if(We.test($e)&&Ne.className&&Ve.test(Ne.className)){Ze=!0;break}}if(!Ze){Be.className+=" prettyprinted";var Je=we.lang;if(!Je){Je=Ke.match(je);var qe;!Je&&(qe=q(Be))&&Qe.test(qe.tagName)&&(Je=qe.className.match(je)),Je&&(Je=Je[1])}var ot;if(Xe.test(Be.tagName))ot=1;else{var at=Be.currentStyle,rt=Z.defaultView,dt=at?at.whiteSpace:rt&&rt.getComputedStyle?rt.getComputedStyle(Be,null).getPropertyValue("white-space"):0;ot=dt&&dt.substring(0,3)==="pre"}var nt=we.linenums;(nt=nt==="true"||+nt)||(nt=Ke.match(/\blinenums\b(?::(\d+))?/),nt=nt?nt[1]&&nt[1].length?+nt[1]:!0:!1),nt&&ne(Be,nt,ot);var mt={langExtension:Je,sourceNode:Be,numberLines:nt,pre:ot,sourceCode:null,basePos:null,spans:null,decorations:null};_e(mt)}}}Ue<ye.length?T.setTimeout(Me,250):typeof ae=="function"&&ae()}Me()}var fe=T.PR={createSimpleLexer:$,registerLangHandler:he,sourceDecorator:re,PR_ATTRIB_NAME:k,PR_ATTRIB_VALUE:g,PR_COMMENT:R,PR_DECLARATION:I,PR_KEYWORD:x,PR_LITERAL:w,PR_NOCODE:a,PR_PLAIN:A,PR_PUNCTUATION:D,PR_SOURCE:u,PR_STRING:d,PR_TAG:P,PR_TYPE:O,prettyPrintOne:G?T.prettyPrintOne=De:N=De,prettyPrint:i=G?T.prettyPrint=ge:i=ge},Ce=T.define;typeof Ce=="function"&&Ce.amd&&Ce("google-code-prettify",[],function(){return fe})})()},T8No:function(W,ee,L){"use strict";L.d(ee,"a",function(){return i}),L.d(ee,"e",function(){return T}),L.d(ee,"c",function(){return D}),L.d(ee,"b",function(){return A}),L.d(ee,"d",function(){return P}),L.d(ee,"f",function(){return k});var B=L("MNsG"),M=L("N0LK"),G=L("Cg/j");let X=B.k||"";const K=new Map;K.set("false",!1),K.set("true",!0),K.set("isMac",B.f),K.set("isLinux",B.d),K.set("isWindows",B.i),K.set("isWeb",B.h),K.set("isMacNative",B.f&&!B.h),K.set("isEdge",X.indexOf("Edg/")>=0),K.set("isFirefox",X.indexOf("Firefox")>=0),K.set("isChrome",X.indexOf("Chrome")>=0),K.set("isSafari",X.indexOf("Safari")>=0);const N=Object.prototype.hasOwnProperty;class i{static has(a){return _.create(a)}static equals(a,C){return r.create(a,C)}static regex(a,C){return d.create(a,C)}static not(a){return v.create(a)}static and(...a){return O.create(a,null)}static or(...a){return w.create(a,null,!0)}static deserialize(a,C=!1){return a?this._deserializeOrExpression(a,C):void 0}static _deserializeOrExpression(a,C){let S=a.split("||");return w.create(S.map(p=>this._deserializeAndExpression(p,C)),null,!0)}static _deserializeAndExpression(a,C){let S=a.split("&&");return O.create(S.map(p=>this._deserializeOne(p,C)),null)}static _deserializeOne(a,C){if(a=a.trim(),a.indexOf("!=")>=0){let S=a.split("!=");return c.create(S[0].trim(),this._deserializeValue(S[1],C))}if(a.indexOf("==")>=0){let S=a.split("==");return r.create(S[0].trim(),this._deserializeValue(S[1],C))}if(a.indexOf("=~")>=0){let S=a.split("=~");return d.create(S[0].trim(),this._deserializeRegexValue(S[1],C))}if(a.indexOf(" in ")>=0){let S=a.split(" in ");return n.create(S[0].trim(),S[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(a)){const S=a.split(">=");return h.create(S[0].trim(),S[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(a)){const S=a.split(">");return y.create(S[0].trim(),S[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(a)){const S=a.split("<=");return m.create(S[0].trim(),S[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(a)){const S=a.split("<");return b.create(S[0].trim(),S[1].trim())}return/^\!\s*/.test(a)?v.create(a.substr(1).trim()):_.create(a)}static _deserializeValue(a,C){if(a=a.trim(),a==="true")return!0;if(a==="false")return!1;let S=/^'([^']*)'$/.exec(a);return S?S[1].trim():a}static _deserializeRegexValue(a,C){if(Object(M.C)(a)){if(C)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let S=a.indexOf("/"),p=a.lastIndexOf("/");if(S===p||S<0){if(C)throw new Error(`bad regexp-value '${a}', missing /-enclosure`);return console.warn(`bad regexp-value '${a}', missing /-enclosure`),null}let U=a.slice(S+1,p),z=a[p+1]==="i"?"i":"";try{return new RegExp(U,z)}catch(q){if(C)throw new Error(`bad regexp-value '${a}', parse error: ${q}`);return console.warn(`bad regexp-value '${a}', parse error: ${q}`),null}}}function T(a,C){const S=a?a.substituteConstants():void 0,p=C?C.substituteConstants():void 0;return!S&&!p?!0:!S||!p?!1:S.equals(p)}function e(a,C){return a.cmp(C)}class E{constructor(){this.type=0}cmp(a){return this.type-a.type}equals(a){return a.type===this.type}substituteConstants(){return this}evaluate(a){return!1}serialize(){return"false"}keys(){return[]}negate(){return l.INSTANCE}}E.INSTANCE=new E;class l{constructor(){this.type=1}cmp(a){return this.type-a.type}equals(a){return a.type===this.type}substituteConstants(){return this}evaluate(a){return!0}serialize(){return"true"}keys(){return[]}negate(){return E.INSTANCE}}l.INSTANCE=new l;class _{constructor(a,C){this.key=a,this.negated=C,this.type=2}static create(a,C=null){const S=K.get(a);return typeof S=="boolean"?S?l.INSTANCE:E.INSTANCE:new _(a,C)}cmp(a){return a.type!==this.type?this.type-a.type:I(this.key,a.key)}equals(a){return a.type===this.type?this.key===a.key:!1}substituteConstants(){const a=K.get(this.key);return typeof a=="boolean"?a?l.INSTANCE:E.INSTANCE:this}evaluate(a){return!!a.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this.key,this)),this.negated}}class r{constructor(a,C,S){this.key=a,this.value=C,this.negated=S,this.type=4}static create(a,C,S=null){if(typeof C=="boolean")return C?_.create(a,S):v.create(a,S);const p=K.get(a);if(typeof p=="boolean"){const U=p?"true":"false";return C===U?l.INSTANCE:E.INSTANCE}return new r(a,C,S)}cmp(a){return a.type!==this.type?this.type-a.type:u(this.key,this.value,a.key,a.value)}equals(a){return a.type===this.type?this.key===a.key&&this.value===a.value:!1}substituteConstants(){const a=K.get(this.key);if(typeof a=="boolean"){const C=a?"true":"false";return this.value===C?l.INSTANCE:E.INSTANCE}return this}evaluate(a){return a.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=c.create(this.key,this.value,this)),this.negated}}class n{constructor(a,C){this.key=a,this.valueKey=C,this.type=10,this.negated=null}static create(a,C){return new n(a,C)}cmp(a){return a.type!==this.type?this.type-a.type:u(this.key,this.valueKey,a.key,a.valueKey)}equals(a){return a.type===this.type?this.key===a.key&&this.valueKey===a.valueKey:!1}substituteConstants(){return this}evaluate(a){const C=a.getValue(this.valueKey),S=a.getValue(this.key);return Array.isArray(C)?C.indexOf(S)>=0:typeof S=="string"&&typeof C=="object"&&C!==null?N.call(C,S):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=o.create(this)),this.negated}}class o{constructor(a){this._actual=a,this.type=11}static create(a){return new o(a)}cmp(a){return a.type!==this.type?this.type-a.type:this._actual.cmp(a._actual)}equals(a){return a.type===this.type?this._actual.equals(a._actual):!1}substituteConstants(){return this}evaluate(a){return!this._actual.evaluate(a)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class c{constructor(a,C,S){this.key=a,this.value=C,this.negated=S,this.type=5}static create(a,C,S=null){if(typeof C=="boolean")return C?v.create(a,S):_.create(a,S);const p=K.get(a);if(typeof p=="boolean"){const U=p?"true":"false";return C===U?E.INSTANCE:l.INSTANCE}return new c(a,C,S)}cmp(a){return a.type!==this.type?this.type-a.type:u(this.key,this.value,a.key,a.value)}equals(a){return a.type===this.type?this.key===a.key&&this.value===a.value:!1}substituteConstants(){const a=K.get(this.key);if(typeof a=="boolean"){const C=a?"true":"false";return this.value===C?E.INSTANCE:l.INSTANCE}return this}evaluate(a){return a.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=r.create(this.key,this.value,this)),this.negated}}class v{constructor(a,C){this.key=a,this.negated=C,this.type=3}static create(a,C=null){const S=K.get(a);return typeof S=="boolean"?S?E.INSTANCE:l.INSTANCE:new v(a,C)}cmp(a){return a.type!==this.type?this.type-a.type:I(this.key,a.key)}equals(a){return a.type===this.type?this.key===a.key:!1}substituteConstants(){const a=K.get(this.key);return typeof a=="boolean"?a?E.INSTANCE:l.INSTANCE:this}evaluate(a){return!a.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_.create(this.key,this)),this.negated}}function f(a,C){if(typeof a=="string"){const S=parseFloat(a);isNaN(S)||(a=S)}return typeof a=="string"||typeof a=="number"?C(a):E.INSTANCE}class y{constructor(a,C,S){this.key=a,this.value=C,this.negated=S,this.type=12}static create(a,C,S=null){return f(C,p=>new y(a,p,S))}cmp(a){return a.type!==this.type?this.type-a.type:u(this.key,this.value,a.key,a.value)}equals(a){return a.type===this.type?this.key===a.key&&this.value===a.value:!1}substituteConstants(){return this}evaluate(a){return typeof this.value=="string"?!1:parseFloat(a.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=m.create(this.key,this.value,this)),this.negated}}class h{constructor(a,C,S){this.key=a,this.value=C,this.negated=S,this.type=13}static create(a,C,S=null){return f(C,p=>new h(a,p,S))}cmp(a){return a.type!==this.type?this.type-a.type:u(this.key,this.value,a.key,a.value)}equals(a){return a.type===this.type?this.key===a.key&&this.value===a.value:!1}substituteConstants(){return this}evaluate(a){return typeof this.value=="string"?!1:parseFloat(a.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this.key,this.value,this)),this.negated}}class b{constructor(a,C,S){this.key=a,this.value=C,this.negated=S,this.type=14}static create(a,C,S=null){return f(C,p=>new b(a,p,S))}cmp(a){return a.type!==this.type?this.type-a.type:u(this.key,this.value,a.key,a.value)}equals(a){return a.type===this.type?this.key===a.key&&this.value===a.value:!1}substituteConstants(){return this}evaluate(a){return typeof this.value=="string"?!1:parseFloat(a.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this.value,this)),this.negated}}class m{constructor(a,C,S){this.key=a,this.value=C,this.negated=S,this.type=15}static create(a,C,S=null){return f(C,p=>new m(a,p,S))}cmp(a){return a.type!==this.type?this.type-a.type:u(this.key,this.value,a.key,a.value)}equals(a){return a.type===this.type?this.key===a.key&&this.value===a.value:!1}substituteConstants(){return this}evaluate(a){return typeof this.value=="string"?!1:parseFloat(a.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=y.create(this.key,this.value,this)),this.negated}}class d{constructor(a,C){this.key=a,this.regexp=C,this.type=7,this.negated=null}static create(a,C){return new d(a,C)}cmp(a){if(a.type!==this.type)return this.type-a.type;if(this.key<a.key)return-1;if(this.key>a.key)return 1;const C=this.regexp?this.regexp.source:"",S=a.regexp?a.regexp.source:"";return C<S?-1:C>S?1:0}equals(a){if(a.type===this.type){const C=this.regexp?this.regexp.source:"",S=a.regexp?a.regexp.source:"";return this.key===a.key&&C===S}return!1}substituteConstants(){return this}evaluate(a){let C=a.getValue(this.key);return this.regexp?this.regexp.test(C):!1}serialize(){const a=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${a}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=x.create(this)),this.negated}}class x{constructor(a){this._actual=a,this.type=8}static create(a){return new x(a)}cmp(a){return a.type!==this.type?this.type-a.type:this._actual.cmp(a._actual)}equals(a){return a.type===this.type?this._actual.equals(a._actual):!1}substituteConstants(){return this}evaluate(a){return!this._actual.evaluate(a)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function R(a){let C=null;for(let S=0,p=a.length;S<p;S++){const U=a[S].substituteConstants();if(a[S]!==U&&C===null){C=[];for(let z=0;z<S;z++)C[z]=a[z]}C!==null&&(C[S]=U)}return C===null?a:C}class O{constructor(a,C){this.expr=a,this.negated=C,this.type=6}static create(a,C){return O._normalizeArr(a,C)}cmp(a){if(a.type!==this.type)return this.type-a.type;if(this.expr.length<a.expr.length)return-1;if(this.expr.length>a.expr.length)return 1;for(let C=0,S=this.expr.length;C<S;C++){const p=e(this.expr[C],a.expr[C]);if(p!==0)return p}return 0}equals(a){if(a.type===this.type){if(this.expr.length!==a.expr.length)return!1;for(let C=0,S=this.expr.length;C<S;C++)if(!this.expr[C].equals(a.expr[C]))return!1;return!0}return!1}substituteConstants(){const a=R(this.expr);return a===this.expr?this:O.create(a,this.negated)}evaluate(a){for(let C=0,S=this.expr.length;C<S;C++)if(!this.expr[C].evaluate(a))return!1;return!0}static _normalizeArr(a,C){const S=[];let p=!1;for(const U of a){if(!U)continue;if(U.type===1){p=!0;continue}if(U.type===0)return E.INSTANCE;if(U.type===6){S.push(...U.expr);continue}S.push(U)}if(S.length===0&&p)return l.INSTANCE;if(S.length===0)return;if(S.length===1)return S[0];S.sort(e);for(let U=1;U<S.length;U++)S[U-1].equals(S[U])&&(S.splice(U,1),U--);if(S.length===1)return S[0];for(;S.length>1;){const U=S[S.length-1];if(U.type!==9)break;S.pop();const z=S.pop(),q=S.length===0,$=w.create(U.expr.map(re=>O.create([re,z],null)),null,q);$&&(S.push($),S.sort(e))}return S.length===1?S[0]:new O(S,C)}serialize(){return this.expr.map(a=>a.serialize()).join(" && ")}keys(){const a=[];for(let C of this.expr)a.push(...C.keys());return a}negate(){if(!this.negated){const a=[];for(let C of this.expr)a.push(C.negate());this.negated=w.create(a,this,!0)}return this.negated}}class w{constructor(a,C){this.expr=a,this.negated=C,this.type=9}static create(a,C,S){return w._normalizeArr(a,C,S)}cmp(a){if(a.type!==this.type)return this.type-a.type;if(this.expr.length<a.expr.length)return-1;if(this.expr.length>a.expr.length)return 1;for(let C=0,S=this.expr.length;C<S;C++){const p=e(this.expr[C],a.expr[C]);if(p!==0)return p}return 0}equals(a){if(a.type===this.type){if(this.expr.length!==a.expr.length)return!1;for(let C=0,S=this.expr.length;C<S;C++)if(!this.expr[C].equals(a.expr[C]))return!1;return!0}return!1}substituteConstants(){const a=R(this.expr);return a===this.expr?this:w.create(a,this.negated,!1)}evaluate(a){for(let C=0,S=this.expr.length;C<S;C++)if(this.expr[C].evaluate(a))return!0;return!1}static _normalizeArr(a,C,S){let p=[],U=!1;if(a){for(let z=0,q=a.length;z<q;z++){const $=a[z];if(!$)continue;if($.type===0){U=!0;continue}if($.type===1)return l.INSTANCE;if($.type===9){p=p.concat($.expr);continue}p.push($)}if(p.length===0&&U)return E.INSTANCE;p.sort(e)}if(p.length===0)return;if(p.length===1)return p[0];for(let z=1;z<p.length;z++)p[z-1].equals(p[z])&&(p.splice(z,1),z--);if(p.length===1)return p[0];if(S){for(let z=0;z<p.length;z++)for(let q=z+1;q<p.length;q++)k(p[z],p[q])&&(p.splice(q,1),q--);if(p.length===1)return p[0]}return new w(p,C)}serialize(){return this.expr.map(a=>a.serialize()).join(" || ")}keys(){const a=[];for(let C of this.expr)a.push(...C.keys());return a}negate(){if(!this.negated){let a=[];for(let C of this.expr)a.push(C.negate());for(;a.length>1;){const C=a.shift(),S=a.shift(),p=[];for(const z of g(C))for(const q of g(S))p.push(O.create([z,q],null));const U=a.length===0;a.unshift(w.create(p,null,U))}this.negated=a[0]}return this.negated}}class D extends _{constructor(a,C,S){super(a,null);this._defaultValue=C,typeof S=="object"?D._info.push(Object.assign(Object.assign({},S),{key:a})):S!==!0&&D._info.push({key:a,description:S,type:C!=null?typeof C:void 0})}static all(){return D._info.values()}bindTo(a){return a.createKey(this.key,this._defaultValue)}getValue(a){return a.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(a){return r.create(this.key,a)}}D._info=[];const A=Object(G.c)("contextKeyService"),P="setContext";function I(a,C){return a<C?-1:a>C?1:0}function u(a,C,S,p){return a<S?-1:a>S?1:C<p?-1:C>p?1:0}function k(a,C){if(C.type===6&&a.type!==9&&a.type!==6){for(const U of C.expr)if(a.equals(U))return!0}const S=a.negate(),p=g(S).concat(g(C));p.sort(e);for(let U=0;U<p.length;U++){const z=p[U],q=z.negate();for(let $=U+1;$<p.length;$++){const re=p[$];if(q.equals(re))return!0}}return!1}function g(a){return a.type===9?a.expr:[a]}},TSYQ:function(W,ee,L){var B,M;/*!
|
|
|
Copyright (c) 2018 Jed Watson.
|
|
|
Licensed under the MIT License (MIT), see
|
|
|
http://jedwatson.github.io/classnames
|
|
|
*/(function(){"use strict";var G={}.hasOwnProperty,X="[native code]";function K(){for(var N=[],i=0;i<arguments.length;i++){var T=arguments[i];if(!T)continue;var e=typeof T;if(e==="string"||e==="number")N.push(T);else if(Array.isArray(T)){if(T.length){var E=K.apply(null,T);E&&N.push(E)}}else if(e==="object"){if(T.toString!==Object.prototype.toString&&!T.toString.toString().includes("[native code]")){N.push(T.toString());continue}for(var l in T)G.call(T,l)&&T[l]&&N.push(l)}}return N.join(" ")}W.exports?(K.default=K,W.exports=K):!(B=[],M=function(){return K}.apply(ee,B),M!==void 0&&(W.exports=M))})()},TXwP:function(W,ee,L){var B,M;(function(){var G;(function(){"use strict";var K=[,,function(e){function E(r){this.__parent=r,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}E.prototype.clone_empty=function(){var r=new E(this.__parent);return r.set_indent(this.__indent_count,this.__alignment_count),r},E.prototype.item=function(r){return r<0?this.__items[this.__items.length+r]:this.__items[r]},E.prototype.has_match=function(r){for(var n=this.__items.length-1;n>=0;n--)if(this.__items[n].match(r))return!0;return!1},E.prototype.set_indent=function(r,n){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=n||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},E.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},E.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},E.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__character_count-=1),!0}return!1},E.prototype.is_empty=function(){return this.__items.length===0},E.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},E.prototype.push=function(r){this.__items.push(r);var n=r.lastIndexOf(`
|
|
|
`);n!==-1?this.__character_count=r.length-n:this.__character_count+=r.length},E.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},E.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},E.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},E.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},E.prototype.toString=function(){var r="";return this.is_empty()?this.__parent.indent_empty_lines&&(r=this.__parent.get_indent_string(this.__indent_count)):(r=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),r+=this.__items.join("")),r};function l(r,n){this.__cache=[""],this.__indent_size=r.indent_size,this.__indent_string=r.indent_char,r.indent_with_tabs||(this.__indent_string=new Array(r.indent_size+1).join(r.indent_char)),n=n||"",r.indent_level>0&&(n=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}l.prototype.get_indent_size=function(r,n){var o=this.__base_string_length;return n=n||0,r<0&&(o=0),o+=r*this.__indent_size,o+=n,o},l.prototype.get_indent_string=function(r,n){var o=this.__base_string;return n=n||0,r<0&&(r=0,o=""),n+=r*this.__indent_size,this.__ensure_cache(n),o+=this.__cache[n],o},l.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},l.prototype.__add_column=function(){var r=this.__cache.length,n=0,o="";this.__indent_size&&r>=this.__indent_size&&(n=Math.floor(r/this.__indent_size),r-=n*this.__indent_size,o=new Array(n+1).join(this.__indent_string)),r&&(o+=new Array(r+1).join(" ")),this.__cache.push(o)};function _(r,n){this.__indent_cache=new l(r,n),this.raw=!1,this._end_with_newline=r.end_with_newline,this.indent_size=r.indent_size,this.wrap_line_length=r.wrap_line_length,this.indent_empty_lines=r.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new E(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}_.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},_.prototype.get_line_number=function(){return this.__lines.length},_.prototype.get_indent_string=function(r,n){return this.__indent_cache.get_indent_string(r,n)},_.prototype.get_indent_size=function(r,n){return this.__indent_cache.get_indent_size(r,n)},_.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},_.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},_.prototype.get_code=function(r){this.trim(!0);var n=this.current_line.pop();n&&(n[n.length-1]===`
|
|
|
`&&(n=n.replace(/\n+$/g,"")),this.current_line.push(n)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
|
|
|
`);return r!==`
|
|
|
`&&(o=o.replace(/[\n]/g,r)),o},_.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},_.prototype.set_indent=function(r,n){return r=r||0,n=n||0,this.next_line.set_indent(r,n),this.__lines.length>1?(this.current_line.set_indent(r,n),!0):(this.current_line.set_indent(),!1)},_.prototype.add_raw_token=function(r){for(var n=0;n<r.newlines;n++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(r.whitespace_before),this.current_line.push(r.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},_.prototype.add_token=function(r){this.__add_space_before_token(),this.current_line.push(r),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},_.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},_.prototype.remove_indent=function(r){for(var n=this.__lines.length;r<n;)this.__lines[r]._remove_indent(),r++;this.current_line._remove_wrap_indent()},_.prototype.trim=function(r){for(r=r===void 0?!1:r,this.current_line.trim();r&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},_.prototype.just_added_newline=function(){return this.current_line.is_empty()},_.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},_.prototype.ensure_empty_line_above=function(r,n){for(var o=this.__lines.length-2;o>=0;){var c=this.__lines[o];if(c.is_empty())break;if(c.item(0).indexOf(r)!==0&&c.item(-1)!==n){this.__lines.splice(o+1,0,new E(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},e.exports.Output=_},,,,function(e){function E(r,n){this.raw_options=l(r,n),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}E.prototype._get_array=function(r,n){var o=this.raw_options[r],c=n||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(c=o.concat()):typeof o=="string"&&(c=o.split(/[^a-zA-Z0-9_\/\-]+/)),c},E.prototype._get_boolean=function(r,n){var o=this.raw_options[r],c=o===void 0?!!n:!!o;return c},E.prototype._get_characters=function(r,n){var o=this.raw_options[r],c=n||"";return typeof o=="string"&&(c=o.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),c},E.prototype._get_number=function(r,n){var o=this.raw_options[r];n=parseInt(n,10),isNaN(n)&&(n=0);var c=parseInt(o,10);return isNaN(c)&&(c=n),c},E.prototype._get_selection=function(r,n,o){var c=this._get_selection_list(r,n,o);if(c.length!==1)throw new Error("Invalid Option Value: The option '"+r+`' can only be one of the following values:
|
|
|
`+n+`
|
|
|
You passed in: '`+this.raw_options[r]+"'");return c[0]},E.prototype._get_selection_list=function(r,n,o){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[n[0]],!this._is_valid_selection(o,n))throw new Error("Invalid Default Value!");var c=this._get_array(r,o);if(!this._is_valid_selection(c,n))throw new Error("Invalid Option Value: The option '"+r+`' can contain only the following values:
|
|
|
`+n+`
|
|
|
You passed in: '`+this.raw_options[r]+"'");return c},E.prototype._is_valid_selection=function(r,n){return r.length&&n.length&&!r.some(function(o){return n.indexOf(o)===-1})};function l(r,n){var o={};r=_(r);var c;for(c in r)c!==n&&(o[c]=r[c]);if(n&&r[n])for(c in r[n])o[c]=r[n][c];return o}function _(r){var n={},o;for(o in r){var c=o.replace(/-/g,"_");n[c]=r[o]}return n}e.exports.Options=E,e.exports.normalizeOpts=_,e.exports.mergeOpts=l},,function(e){var E=RegExp.prototype.hasOwnProperty("sticky");function l(_){this.__input=_||"",this.__input_length=this.__input.length,this.__position=0}l.prototype.restart=function(){this.__position=0},l.prototype.back=function(){this.__position>0&&(this.__position-=1)},l.prototype.hasNext=function(){return this.__position<this.__input_length},l.prototype.next=function(){var _=null;return this.hasNext()&&(_=this.__input.charAt(this.__position),this.__position+=1),_},l.prototype.peek=function(_){var r=null;return _=_||0,_+=this.__position,_>=0&&_<this.__input_length&&(r=this.__input.charAt(_)),r},l.prototype.__match=function(_,r){_.lastIndex=r;var n=_.exec(this.__input);return n&&!(E&&_.sticky)&&(n.index!==r&&(n=null)),n},l.prototype.test=function(_,r){return r=r||0,r+=this.__position,r>=0&&r<this.__input_length?!!this.__match(_,r):!1},l.prototype.testChar=function(_,r){var n=this.peek(r);return _.lastIndex=0,n!==null&&_.test(n)},l.prototype.match=function(_){var r=this.__match(_,this.__position);return r?this.__position+=r[0].length:r=null,r},l.prototype.read=function(_,r,n){var o="",c;return _&&(c=this.match(_),c&&(o+=c[0])),r&&(c||!_)&&(o+=this.readUntil(r,n)),o},l.prototype.readUntil=function(_,r){var n="",o=this.__position;_.lastIndex=this.__position;var c=_.exec(this.__input);return c?(o=c.index,r&&(o+=c[0].length)):o=this.__input_length,n=this.__input.substring(this.__position,o),this.__position=o,n},l.prototype.readUntilAfter=function(_){return this.readUntil(_,!0)},l.prototype.get_regexp=function(_,r){var n=null,o="g";return r&&E&&(o="y"),typeof _=="string"&&_!==""?n=new RegExp(_,o):_&&(n=new RegExp(_.source,o)),n},l.prototype.get_literal_regexp=function(_){return RegExp(_.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},l.prototype.peekUntilAfter=function(_){var r=this.__position,n=this.readUntilAfter(_);return this.__position=r,n},l.prototype.lookBack=function(_){var r=this.__position-1;return r>=_.length&&this.__input.substring(r-_.length,r).toLowerCase()===_},e.exports.InputScanner=l},,,,,function(e){function E(l,_){l=typeof l=="string"?l:l.source,_=typeof _=="string"?_:_.source,this.__directives_block_pattern=new RegExp(l+/ beautify( \w+[:]\w+)+ /.source+_,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(l+/\sbeautify\signore:end\s/.source+_,"g")}E.prototype.get_directives=function(l){if(!l.match(this.__directives_block_pattern))return null;var _={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(l);r;)_[r[1]]=r[2],r=this.__directive_pattern.exec(l);return _},E.prototype.readIgnored=function(l){return l.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=E},,function(e,E,l){var _=l(16).Beautifier,r=l(17).Options;function n(o,c){var v=new _(o,c);return v.beautify()}e.exports=n,e.exports.defaultOptions=function(){return new r}},function(e,E,l){var _=l(17).Options,r=l(2).Output,n=l(8).InputScanner,o=l(13).Directives,c=new o(/\/\*/,/\*\//),v=/\r\n|[\r\n]/,f=/\r\n|[\r\n]/g,y=/\s/,h=/(?:\s|\n)+/g,b=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,m=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function d(x,R){this._source_text=x||"",this._options=new _(R),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}d.prototype.eatString=function(x){var R="";for(this._ch=this._input.next();this._ch;){if(R+=this._ch,this._ch==="\\")R+=this._input.next();else if(x.indexOf(this._ch)!==-1||this._ch===`
|
|
|
`)break;this._ch=this._input.next()}return R},d.prototype.eatWhitespace=function(x){for(var R=y.test(this._input.peek()),O=0;y.test(this._input.peek());)this._ch=this._input.next(),x&&this._ch===`
|
|
|
`&&((O===0||O<this._options.max_preserve_newlines)&&(O++,this._output.add_new_line(!0)));return R},d.prototype.foundNestedPseudoClass=function(){for(var x=0,R=1,O=this._input.peek(R);O;){if(O==="{")return!0;if(O==="(")x+=1;else if(O===")"){if(x===0)return!1;x-=1}else if(O===";"||O==="}")return!1;R++,O=this._input.peek(R)}return!1},d.prototype.print_string=function(x){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(x)},d.prototype.preserveSingleSpace=function(x){x&&(this._output.space_before_token=!0)},d.prototype.indent=function(){this._indentLevel++},d.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var x=this._source_text,R=this._options.eol;R==="auto"&&(R=`
|
|
|
`,x&&v.test(x||"")&&(R=x.match(v)[0])),x=x.replace(f,`
|
|
|
`);var O=x.match(/^[\t ]*/)[0];this._output=new r(this._options,O),this._input=new n(x),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var w=0,D=!1,A=!1,P=!1,I=!1,u=!1,k=!1,g=this._ch,a=!1,C,S,p;C=this._input.read(h),S=C!=="",p=g,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),g=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var U=this._input.read(b),z=c.get_directives(U);z&&z.ignore==="start"&&(U+=c.readIgnored(this._input)),this.print_string(U),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(m)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(S),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var q=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);q.match(/[ :]$/)&&(q=this.eatString(": ").replace(/\s$/,""),this.print_string(q),this._output.space_before_token=!0),q=q.replace(/\s$/,""),q==="extend"?I=!0:q==="import"&&(u=!0),q in this.NESTED_AT_RULE?(this._nestedLevel+=1,q in this.CONDITIONAL_GROUP_RULE&&(P=!0)):!D&&w===0&&q.indexOf(":")!==-1&&(A=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(S),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")A&&(A=!1,this.outdent()),P?(P=!1,D=this._indentLevel>=this._nestedLevel):D=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&D&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(p==="("?this._output.space_before_token=!1:p!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),p==="{"&&this._output.trim(!0),u=!1,I=!1,A&&(this.outdent(),A=!1),this.print_string(this._ch),D=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var $=0;$<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;$++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[$])){a=!0;break}(D||P)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!I&&w===0?(this.print_string(":"),A||(A=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var re=p==='"'||p==="'";this.preserveSingleSpace(re||S),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")a=!1,w===0?(A&&(this.outdent(),A=!1),I=!1,u=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),w++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),w&&(w--,this.outdent()));else{var ce=!1;this._input.lookBack("with")&&(ce=!0),this.preserveSingleSpace(S||ce),this.print_string(this._ch),A&&p==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),k=!0):(this.eatWhitespace(),w++,this.indent())}else if(this._ch===")")w&&(w--,this.outdent()),k&&this._input.peek()===";"&&this._options.selector_separator_newline&&(k=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!A||k)&&w===0&&!u&&!I?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!A&&w===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&y.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(S),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),y.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var ne=p==='"'||p==="'";this.preserveSingleSpace(ne||S),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
|
`&&a&&this._output.add_new_line()}var me=this._output.get_code(R);return me},e.exports.Beautifier=d},function(e,E,l){var _=l(6).Options;function r(n){_.call(this,n,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var o=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||o;var c=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var v=0;v<c.length;v++)c[v]!=="expand"?this.brace_style="collapse":this.brace_style=c[v]}r.prototype=new _,e.exports.Options=r}],N={};function i(e){var E=N[e];if(E!==void 0)return E.exports;var l=N[e]={exports:{}};return K[e](l,l.exports,i),l.exports}var T=i(15);G=T})();var X=G;!(B=[],M=function(){return{css_beautify:X}}.apply(ee,B),M!==void 0&&(W.exports=M))})()},TqI3:function(W,ee,L){"use strict";L.d(ee,"a",function(){return B});function B(M,G,X,K,N){var i=X[M]||{},T=X[G]||{},e,E;i.fixed==="left"?e=K.left[M]:T.fixed==="right"&&(E=K.right[G]);var l=!1,_=!1,r=!1,n=!1,o=X[G+1],c=X[M-1];if(N==="rtl"){if(e!==void 0){var v=c&&c.fixed==="left";n=!v}else if(E!==void 0){var f=o&&o.fixed==="right";r=!f}}else if(e!==void 0){var y=o&&o.fixed==="left";l=!y}else if(E!==void 0){var h=c&&c.fixed==="right";_=!h}return{fixLeft:e,fixRight:E,lastFixLeft:l,firstFixRight:_,lastFixRight:r,firstFixLeft:n,isSticky:K.isSticky}}},"U+Vu":function(W,ee,L){"use strict";L.d(ee,"a",function(){return T}),L.d(ee,"b",function(){return e});var B=L("36hc"),M=L("T/Jt"),G=L.n(M),X=L("s7W6"),K=L("HnKm"),N=L("1HCi"),i=L.n(N);function T(){var E=M.createContext(null),l=function(r){var n=r.value,o=r.children,c=M.useRef(n);c.current=n;var v=M.useState(function(){return{getValue:function(){return c.current},listeners:new Set}}),f=Object(B.a)(v,1),y=f[0];return Object(X.a)(function(){y.listeners.forEach(function(h){h(n)})},[n]),M.createElement(E.Provider,{value:y},o)};return{Context:E,Provider:l}}function e(E,l){var _=Object(K.a)(l),r=M.useContext(E==null?void 0:E.Context),n=r||{},o=n.listeners,c=n.getValue,v=M.useState(function(){return _(r?c():null)}),f=Object(B.a)(v,2),y=f[0],h=f[1];return Object(X.a)(function(){if(!r)return;function b(m){h(function(d){var x=_(m);return i()(d,x)?d:x})}return o.add(b),function(){o.delete(b)}},[r]),y}},U8pU:function(W,ee,L){"use strict";L.d(ee,"a",function(){return B});function B(M){return B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},B(M)}},VTBJ:function(W,ee,L){"use strict";L.d(ee,"a",function(){return G});var B=L("rePB");function M(X,K){var N=Object.keys(X);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(X);K&&(i=i.filter(function(T){return Object.getOwnPropertyDescriptor(X,T).enumerable})),N.push.apply(N,i)}return N}function G(X){for(var K=1;K<arguments.length;K++){var N=arguments[K]!=null?arguments[K]:{};K%2?M(Object(N),!0).forEach(function(i){Object(B.a)(X,i,N[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(X,Object.getOwnPropertyDescriptors(N)):M(Object(N)).forEach(function(i){Object.defineProperty(X,i,Object.getOwnPropertyDescriptor(N,i))})}return X}},VUat:function(W,ee,L){"use strict";L.d(ee,"a",function(){return B});var B={}},VbWF:function(W,ee,L){"use strict";var B=L("T/Jt"),M=L.n(B),G=B.createContext({renderWithProps:!1});ee.a=G},Vhoy:function(W,ee,L){"use strict";L.d(ee,"d",function(){return X}),L.d(ee,"e",function(){return K}),L.d(ee,"c",function(){return N}),L.d(ee,"b",function(){return i}),L.d(ee,"a",function(){return T});var B=L("MI8n");class M{constructor(){this._icons=new Map,this._onDidRegister=new B.b}add(e){const E=this._icons.get(e.id);E?e.description?E.description=e.description:console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const G=new M,X=G;function K(e,E){return new i(e,E)}function N(e){return e?e.replace(/\$\((.*?)\)/g,(E,l)=>` ${l} `).trim():""}class i{constructor(e,E,l){this.id=e,this.definition=E,this.description=l,G.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var T;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const E=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function l(n){if(n instanceof i)return["codicon","codicon-"+n.id];const o=E.exec(n.id);if(!o)return l(i.error);let[,c,v]=o;const f=["codicon","codicon-"+c];return v&&f.push("codicon-modifier-"+v.substr(1)),f}e.asClassNameArray=l;function _(n){return l(n).join(" ")}e.asClassName=_;function r(n){return"."+l(n).join(".")}e.asCSSSelector=r})(T||(T={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",e.add.definition),e.gistNew=new e("gist-new",e.add.definition),e.repoCreate=new e("repo-create",e.add.definition),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eba4"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.layers=new e("layers",{fontCharacter:"\\ebd2"}),e.layersDot=new e("layers-dot",{fontCharacter:"\\ebd3"}),e.layersActive=new e("layers-active",{fontCharacter:"\\ebd4"}),e.compass=new e("compass",{fontCharacter:"\\ebd5"}),e.compassDot=new e("compass-dot",{fontCharacter:"\\ebd6"}),e.compassActive=new e("compass-active",{fontCharacter:"\\ebd7"}),e.azure=new e("azure",{fontCharacter:"\\ebd8"}),e.issueDraft=new e("issue-draft",{fontCharacter:"\\ebd9"}),e.gitPullRequestClosed=new e("git-pull-request-closed",{fontCharacter:"\\ebda"}),e.gitPullRequestDraft=new e("git-pull-request-draft",{fontCharacter:"\\ebdb"}),e.debugAll=new e("debug-all",{fontCharacter:"\\ebdc"}),e.debugCoverage=new e("debug-coverage",{fontCharacter:"\\ebdd"}),e.runErrors=new e("run-errors",{fontCharacter:"\\ebde"}),e.folderLibrary=new e("folder-library",{fontCharacter:"\\ebdf"}),e.debugContinueSmall=new e("debug-continue-small",{fontCharacter:"\\ebe0"}),e.beakerStop=new e("beaker-stop",{fontCharacter:"\\ebe1"}),e.graphLine=new e("graph-line",{fontCharacter:"\\ebe2"}),e.graphScatter=new e("graph-scatter",{fontCharacter:"\\ebe3"}),e.pieChart=new e("pie-chart",{fontCharacter:"\\ebe4"}),e.bracket=new e("bracket",e.json.definition),e.bracketDot=new e("bracket-dot",{fontCharacter:"\\ebe5"}),e.bracketError=new e("bracket-error",{fontCharacter:"\\ebe6"}),e.lockSmall=new e("lock-small",{fontCharacter:"\\ebe7"}),e.azureDevops=new e("azure-devops",{fontCharacter:"\\ebe8"}),e.verifiedFilled=new e("verified-filled",{fontCharacter:"\\ebe9"})}(i||(i={}))},"VrN/":function(W,ee,L){(function(B,M){W.exports=M()})(this,function(){"use strict";var B=navigator.userAgent,M=navigator.platform,G=/gecko\/\d/i.test(B),X=/MSIE \d/.test(B),K=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(B),N=/Edge\/(\d+)/.exec(B),i=X||K||N,T=i&&(X?document.documentMode||6:+(N||K)[1]),e=!N&&/WebKit\//.test(B),E=e&&/Qt\/\d+\.\d+/.test(B),l=!N&&/Chrome\//.test(B),_=/Opera\//.test(B),r=/Apple Computer/.test(navigator.vendor),n=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(B),o=/PhantomJS/.test(B),c=!N&&/AppleWebKit/.test(B)&&/Mobile\/\w+/.test(B),v=/Android/.test(B),f=c||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(B),y=c||/Mac/.test(M),h=/\bCrOS\b/.test(B),b=/win/i.test(M),m=_&&B.match(/Version\/(\d*\.\d*)/);m&&(m=Number(m[1])),m&&m>=15&&(_=!1,e=!0);var d=y&&(E||_&&(m==null||m<12.11)),x=G||i&&T>=9;function R(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var O=function(t,s){var F=t.className,j=R(s).exec(F);if(j){var H=F.slice(j.index+j[0].length);t.className=F.slice(0,j.index)+(H?j[1]+H:"")}};function w(t){for(var s=t.childNodes.length;s>0;--s)t.removeChild(t.firstChild);return t}function D(t,s){return w(t).appendChild(s)}function A(t,s,F,j){var H=document.createElement(t);if(F&&(H.className=F),j&&(H.style.cssText=j),typeof s=="string")H.appendChild(document.createTextNode(s));else if(s)for(var te=0;te<s.length;++te)H.appendChild(s[te]);return H}function P(t,s,F,j){var H=A(t,s,F,j);return H.setAttribute("role","presentation"),H}var I;document.createRange?I=function(t,s,F,j){var H=document.createRange();return H.setEnd(j||t,F),H.setStart(t,s),H}:I=function(t,s,F){var j=document.body.createTextRange();try{j.moveToElementText(t.parentNode)}catch(H){return j}return j.collapse(!0),j.moveEnd("character",F),j.moveStart("character",s),j};function u(t,s){if(s.nodeType==3&&(s=s.parentNode),t.contains)return t.contains(s);do if(s.nodeType==11&&(s=s.host),s==t)return!0;while(s=s.parentNode)}function k(){var t;try{t=document.activeElement}catch(s){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function g(t,s){var F=t.className;R(s).test(F)||(t.className+=(F?" ":"")+s)}function a(t,s){for(var F=t.split(" "),j=0;j<F.length;j++)F[j]&&!R(F[j]).test(s)&&(s+=" "+F[j]);return s}var C=function(t){t.select()};c?C=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:i&&(C=function(t){try{t.select()}catch(s){}});function S(t){var s=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,s)}}function p(t,s,F){s||(s={});for(var j in t)t.hasOwnProperty(j)&&(F!==!1||!s.hasOwnProperty(j))&&(s[j]=t[j]);return s}function U(t,s,F,j,H){s==null&&(s=t.search(/[^\s\u00a0]/),s==-1&&(s=t.length));for(var te=j||0,de=H||0;;){var ve=t.indexOf(" ",te);if(ve<0||ve>=s)return de+(s-te);de+=ve-te,de+=F-de%F,te=ve+1}}var z=function(){this.id=null,this.f=null,this.time=0,this.handler=S(this.onTimeout,this)};z.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-+new Date)},z.prototype.set=function(t,s){this.f=s;var F=+new Date+t;(!this.id||F<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,t),this.time=F)};function q(t,s){for(var F=0;F<t.length;++F)if(t[F]==s)return F;return-1}var $=50,re={toString:function(){return"CodeMirror.Pass"}},ce={scroll:!1},ne={origin:"*mouse"},me={origin:"+move"};function be(t,s,F){for(var j=0,H=0;;){var te=t.indexOf(" ",j);te==-1&&(te=t.length);var de=te-j;if(te==t.length||H+de>=s)return j+Math.min(de,s-H);if(H+=te-j,H+=F-H%F,j=te+1,H>=s)return j}}var he=[""];function se(t){for(;he.length<=t;)he.push(_e(he)+" ");return he[t]}function _e(t){return t[t.length-1]}function De(t,s){for(var F=[],j=0;j<t.length;j++)F[j]=s(t[j],j);return F}function ge(t,s,F){for(var j=0,H=F(s);j<t.length&&F(t[j])<=H;)j++;t.splice(j,0,s)}function fe(){}function Ce(t,s){var F;return Object.create?F=Object.create(t):(fe.prototype=t,F=new fe),s&&p(s,F),F}var ae=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Q(t){return/\w/.test(t)||t>"\x80"&&(t.toUpperCase()!=t.toLowerCase()||ae.test(t))}function J(t,s){return s?s.source.indexOf("\\w")>-1&&Q(t)?!0:s.test(t):Q(t)}function Z(t){for(var s in t)if(t.hasOwnProperty(s)&&t[s])return!1;return!0}var pe=/[\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 le(t){return t.charCodeAt(0)>=768&&pe.test(t)}function ye(t,s,F){for(;(F<0?s>0:s<t.length)&&le(t.charAt(s));)s+=F;return s}function Te(t,s,F){for(var j=s>F?-1:1;;){if(s==F)return s;var H=(s+F)/2,te=j<0?Math.ceil(H):Math.floor(H);if(te==s)return t(te)?s:F;t(te)?F=te:s=te+j}}function Pe(t,s,F,j){if(!t)return j(s,F,"ltr",0);for(var H=!1,te=0;te<t.length;++te){var de=t[te];(de.from<F&&de.to>s||s==F&&de.to==s)&&(j(Math.max(de.from,s),Math.min(de.to,F),de.level==1?"rtl":"ltr",te),H=!0)}H||j(s,F,"ltr")}var He=null;function Oe(t,s,F){var j;He=null;for(var H=0;H<t.length;++H){var te=t[H];if(te.from<s&&te.to>s)return H;te.to==s&&(te.from!=te.to&&F=="before"?j=H:He=H),te.from==s&&(te.from!=te.to&&F!="before"?j=H:He=H)}return j!=null?j:He}var Ue=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",s="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function F(Se){return Se<=247?t.charAt(Se):1424<=Se&&Se<=1524?"R":1536<=Se&&Se<=1785?s.charAt(Se-1536):1774<=Se&&Se<=2220?"r":8192<=Se&&Se<=8203?"w":Se==8204?"b":"L"}var j=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,H=/[stwN]/,te=/[LRr]/,de=/[Lb1n]/,ve=/[1n]/;function xe(Se,Ge,Ye){this.level=Se,this.from=Ge,this.to=Ye}return function(Se,Ge){var Ye=Ge=="ltr"?"L":"R";if(Se.length==0||Ge=="ltr"&&!j.test(Se))return!1;for(var it=Se.length,et=[],vt=0;vt<it;++vt)et.push(F(Se.charCodeAt(vt)));for(var Et=0,At=Ye;Et<it;++Et){var Nt=et[Et];Nt=="m"?et[Et]=At:At=Nt}for(var Gt=0,Mt=Ye;Gt<it;++Gt){var Vt=et[Gt];Vt=="1"&&Mt=="r"?et[Gt]="n":te.test(Vt)&&(Mt=Vt,Vt=="r"&&(et[Gt]="R"))}for(var or=1,qt=et[0];or<it-1;++or){var Sr=et[or];Sr=="+"&&qt=="1"&&et[or+1]=="1"?et[or]="1":Sr==","&&qt==et[or+1]&&(qt=="1"||qt=="n")&&(et[or]=qt),qt=Sr}for(var Gr=0;Gr<it;++Gr){var xn=et[Gr];if(xn==",")et[Gr]="N";else if(xn=="%"){var qr=void 0;for(qr=Gr+1;qr<it&&et[qr]=="%";++qr);for(var Vn=Gr&&et[Gr-1]=="!"||qr<it&&et[qr]=="1"?"1":"N",Bn=Gr;Bn<qr;++Bn)et[Bn]=Vn;Gr=qr-1}}for(var hn=0,Wn=Ye;hn<it;++hn){var Cn=et[hn];Wn=="L"&&Cn=="1"?et[hn]="L":te.test(Cn)&&(Wn=Cn)}for(var gn=0;gn<it;++gn)if(H.test(et[gn])){var fn=void 0;for(fn=gn+1;fn<it&&H.test(et[fn]);++fn);for(var tn=(gn?et[gn-1]:Ye)=="L",Hn=(fn<it?et[fn]:Ye)=="L",Xi=tn==Hn?tn?"L":"R":Ye,yi=gn;yi<fn;++yi)et[yi]=Xi;gn=fn-1}for(var In=[],oi,wn=0;wn<it;)if(de.test(et[wn])){var vo=wn;for(++wn;wn<it&&de.test(et[wn]);++wn);In.push(new xe(0,vo,wn))}else{var ui=wn,Ai=In.length,Ri=Ge=="rtl"?1:0;for(++wn;wn<it&&et[wn]!="L";++wn);for(var Pn=ui;Pn<wn;)if(ve.test(et[Pn])){ui<Pn&&(In.splice(Ai,0,new xe(1,ui,Pn)),Ai+=Ri);var Vi=Pn;for(++Pn;Pn<wn&&ve.test(et[Pn]);++Pn);In.splice(Ai,0,new xe(2,Vi,Pn)),Ai+=Ri,ui=Pn}else++Pn;ui<wn&&In.splice(Ai,0,new xe(1,ui,wn))}return Ge=="ltr"&&(In[0].level==1&&(oi=Se.match(/^\s+/))&&(In[0].from=oi[0].length,In.unshift(new xe(0,0,oi[0].length))),_e(In).level==1&&(oi=Se.match(/\s+$/))&&(_e(In).to-=oi[0].length,In.push(new xe(0,it-oi[0].length,it)))),Ge=="rtl"?In.reverse():In}}();function je(t,s){var F=t.order;return F==null&&(F=t.order=Ue(t.text,s)),F}var Ve=[],Re=function(t,s,F){if(t.addEventListener)t.addEventListener(s,F,!1);else if(t.attachEvent)t.attachEvent("on"+s,F);else{var j=t._handlers||(t._handlers={});j[s]=(j[s]||Ve).concat(F)}};function Xe(t,s){return t._handlers&&t._handlers[s]||Ve}function Qe(t,s,F){if(t.removeEventListener)t.removeEventListener(s,F,!1);else if(t.detachEvent)t.detachEvent("on"+s,F);else{var j=t._handlers,H=j&&j[s];if(H){var te=q(H,F);te>-1&&(j[s]=H.slice(0,te).concat(H.slice(te+1)))}}}function We(t,s){var F=Xe(t,s);if(!F.length)return;for(var j=Array.prototype.slice.call(arguments,2),H=0;H<F.length;++H)F[H].apply(null,j)}function ze(t,s,F){return typeof s=="string"&&(s={type:s,preventDefault:function(){this.defaultPrevented=!0}}),We(t,F||s.type,t,s),ke(s)||s.codemirrorIgnore}function Me(t){var s=t._handlers&&t._handlers.cursorActivity;if(!s)return;for(var F=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),j=0;j<s.length;++j)q(F,s[j])==-1&&F.push(s[j])}function Ie(t,s){return Xe(t,s).length>0}function Be(t){t.prototype.on=function(s,F){Re(this,s,F)},t.prototype.off=function(s,F){Qe(this,s,F)}}function we(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Ae(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function ke(t){return t.defaultPrevented!=null?t.defaultPrevented:t.returnValue==!1}function Le(t){we(t),Ae(t)}function Ke(t){return t.target||t.srcElement}function Ze(t){var s=t.which;return s==null&&(t.button&1?s=1:t.button&2?s=3:t.button&4&&(s=2)),y&&t.ctrlKey&&s==1&&(s=3),s}var Ne=function(){if(i&&T<9)return!1;var t=A("div");return"draggable"in t||"dragDrop"in t}(),$e;function Je(t){if($e==null){var s=A("span","\u200B");D(t,A("span",[s,document.createTextNode("x")])),t.firstChild.offsetHeight!=0&&($e=s.offsetWidth<=1&&s.offsetHeight>2&&!(i&&T<8))}var F=$e?A("span","\u200B"):A("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return F.setAttribute("cm-text",""),F}var qe;function ot(t){if(qe!=null)return qe;var s=D(t,document.createTextNode("A\u062EA")),F=I(s,0,1).getBoundingClientRect(),j=I(s,1,2).getBoundingClientRect();return w(t),!F||F.left==F.right?!1:qe=j.right-F.right<3}var at=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(t){for(var s=0,F=[],j=t.length;s<=j;){var H=t.indexOf(`
|
|
|
`,s);H==-1&&(H=t.length);var te=t.slice(s,t.charAt(H-1)=="\r"?H-1:H),de=te.indexOf("\r");de!=-1?(F.push(te.slice(0,de)),s+=de+1):(F.push(te),s=H+1)}return F}:function(t){return t.split(/\r\n?|\n/)},rt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(s){return!1}}:function(t){var s;try{s=t.ownerDocument.selection.createRange()}catch(F){}return!s||s.parentElement()!=t?!1:s.compareEndPoints("StartToEnd",s)!=0},dt=function(){var t=A("div");return"oncopy"in t?!0:(t.setAttribute("oncopy","return;"),typeof t.oncopy=="function")}(),nt=null;function mt(t){if(nt!=null)return nt;var s=D(t,A("span","x")),F=s.getBoundingClientRect(),j=I(s,0,1).getBoundingClientRect();return nt=Math.abs(F.left-j.left)>1}var yt={},ft={};function ht(t,s){arguments.length>2&&(s.dependencies=Array.prototype.slice.call(arguments,2)),yt[t]=s}function Rt(t,s){ft[t]=s}function Wt(t){if(typeof t=="string"&&ft.hasOwnProperty(t))t=ft[t];else if(t&&typeof t.name=="string"&&ft.hasOwnProperty(t.name)){var s=ft[t.name];typeof s=="string"&&(s={name:s}),t=Ce(s,t),t.name=s.name}else{if(typeof t=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Wt("application/xml");if(typeof t=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Wt("application/json")}return typeof t=="string"?{name:t}:t||{name:"null"}}function wt(t,s){s=Wt(s);var F=yt[s.name];if(!F)return wt(t,"text/plain");var j=F(t,s);if(lt.hasOwnProperty(s.name)){var H=lt[s.name];for(var te in H){if(!H.hasOwnProperty(te))continue;j.hasOwnProperty(te)&&(j["_"+te]=j[te]),j[te]=H[te]}}if(j.name=s.name,s.helperType&&(j.helperType=s.helperType),s.modeProps)for(var de in s.modeProps)j[de]=s.modeProps[de];return j}var lt={};function _t(t,s){var F=lt.hasOwnProperty(t)?lt[t]:lt[t]={};p(s,F)}function jt(t,s){if(s===!0)return s;if(t.copyState)return t.copyState(s);var F={};for(var j in s){var H=s[j];H instanceof Array&&(H=H.concat([])),F[j]=H}return F}function Ht(t,s){for(var F;t.innerMode&&!(F=t.innerMode(s),!F||F.mode==t);)s=F.state,t=F.mode;return F||{mode:t,state:s}}function ct(t,s,F){return t.startState?t.startState(s,F):!0}var bt=function(t,s,F){this.pos=this.start=0,this.string=t,this.tabSize=s||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=F};bt.prototype.eol=function(){return this.pos>=this.string.length},bt.prototype.sol=function(){return this.pos==this.lineStart},bt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},bt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},bt.prototype.eat=function(t){var s=this.string.charAt(this.pos),F;if(typeof t=="string"?F=s==t:F=s&&(t.test?t.test(s):t(s)),F)return++this.pos,s},bt.prototype.eatWhile=function(t){for(var s=this.pos;this.eat(t););return this.pos>s},bt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},bt.prototype.skipToEnd=function(){this.pos=this.string.length},bt.prototype.skipTo=function(t){var s=this.string.indexOf(t,this.pos);if(s>-1)return this.pos=s,!0},bt.prototype.backUp=function(t){this.pos-=t},bt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=U(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?U(this.string,this.lineStart,this.tabSize):0)},bt.prototype.indentation=function(){return U(this.string,null,this.tabSize)-(this.lineStart?U(this.string,this.lineStart,this.tabSize):0)},bt.prototype.match=function(t,s,F){if(typeof t=="string"){var j=function(de){return F?de.toLowerCase():de},H=this.string.substr(this.pos,t.length);if(j(H)==j(t))return s!==!1&&(this.pos+=t.length),!0}else{var te=this.string.slice(this.pos).match(t);return te&&te.index>0?null:(te&&s!==!1&&(this.pos+=te[0].length),te)}},bt.prototype.current=function(){return this.string.slice(this.start,this.pos)},bt.prototype.hideFirstChars=function(t,s){this.lineStart+=t;try{return s()}finally{this.lineStart-=t}},bt.prototype.lookAhead=function(t){var s=this.lineOracle;return s&&s.lookAhead(t)},bt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};function gt(t,s){if(s-=t.first,s<0||s>=t.size)throw new Error("There is no line "+(s+t.first)+" in the document.");for(var F=t;!F.lines;)for(var j=0;;++j){var H=F.children[j],te=H.chunkSize();if(s<te){F=H;break}s-=te}return F.lines[s]}function Ut(t,s,F){var j=[],H=s.line;return t.iter(s.line,F.line+1,function(te){var de=te.text;H==F.line&&(de=de.slice(0,F.ch)),H==s.line&&(de=de.slice(s.ch)),j.push(de),++H}),j}function Lt(t,s,F){var j=[];return t.iter(s,F,function(H){j.push(H.text)}),j}function It(t,s){var F=s-t.height;if(F)for(var j=t;j;j=j.parent)j.height+=F}function St(t){if(t.parent==null)return null;for(var s=t.parent,F=q(s.lines,t),j=s.parent;j;s=j,j=j.parent)for(var H=0;!(j.children[H]==s);++H)F+=j.children[H].chunkSize();return F+s.first}function Jt(t,s){var F=t.first;e:do{for(var j=0;j<t.children.length;++j){var H=t.children[j],te=H.height;if(s<te){t=H;continue e}s-=te,F+=H.chunkSize()}return F}while(!t.lines);for(var de=0;de<t.lines.length;++de){var ve=t.lines[de],xe=ve.height;if(s<xe)break;s-=xe}return F+de}function kt(t,s){return s>=t.first&&s<t.first+t.size}function zt(t,s){return String(t.lineNumberFormatter(s+t.firstLineNumber))}function st(t,s,F){if(F===void 0&&(F=null),!(this instanceof st))return new st(t,s,F);this.line=t,this.ch=s,this.sticky=F}function pt(t,s){return t.line-s.line||t.ch-s.ch}function Ct(t,s){return t.sticky==s.sticky&&pt(t,s)==0}function Dt(t){return st(t.line,t.ch)}function Tt(t,s){return pt(t,s)<0?s:t}function tr(t,s){return pt(t,s)<0?t:s}function yr(t,s){return Math.max(t.first,Math.min(s,t.first+t.size-1))}function Kt(t,s){if(s.line<t.first)return st(t.first,0);var F=t.first+t.size-1;return s.line>F?st(F,gt(t,F).text.length):ue(s,gt(t,s.line).text.length)}function ue(t,s){var F=t.ch;return F==null||F>s?st(t.line,s):F<0?st(t.line,0):t}function V(t,s){for(var F=[],j=0;j<s.length;j++)F[j]=Kt(t,s[j]);return F}var Y=function(t,s){this.state=t,this.lookAhead=s},ie=function(t,s,F,j){this.state=s,this.doc=t,this.line=F,this.maxLookAhead=j||0,this.baseTokens=null,this.baseTokenPos=1};ie.prototype.lookAhead=function(t){var s=this.doc.getLine(this.line+t);return s!=null&&t>this.maxLookAhead&&(this.maxLookAhead=t),s},ie.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var s=this.baseTokens[this.baseTokenPos+1];return{type:s&&s.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ie.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ie.fromSaved=function(t,s,F){return s instanceof Y?new ie(t,jt(t.mode,s.state),F,s.lookAhead):new ie(t,jt(t.mode,s),F)},ie.prototype.save=function(t){var s=t!==!1?jt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Y(s,this.maxLookAhead):s};function Ee(t,s,F,j){var H=[t.state.modeGen],te={};er(t,s.text,t.doc.mode,F,function(Se,Ge){return H.push(Se,Ge)},te,j);for(var de=F.state,ve=function(Se){F.baseTokens=H;var Ge=t.state.overlays[Se],Ye=1,it=0;F.state=!0,er(t,s.text,Ge.mode,F,function(et,vt){for(var Et=Ye;it<et;){var At=H[Ye];At>et&&H.splice(Ye,1,et,H[Ye+1],At),Ye+=2,it=Math.min(et,At)}if(!vt)return;if(Ge.opaque)H.splice(Et,Ye-Et,et,"overlay "+vt),Ye=Et+2;else for(;Et<Ye;Et+=2){var Nt=H[Et+1];H[Et+1]=(Nt?Nt+" ":"")+"overlay "+vt}},te),F.state=de,F.baseTokens=null,F.baseTokenPos=1},xe=0;xe<t.state.overlays.length;++xe)ve(xe);return{styles:H,classes:te.bgClass||te.textClass?te:null}}function oe(t,s,F){if(!s.styles||s.styles[0]!=t.state.modeGen){var j=Fe(t,St(s)),H=s.text.length>t.options.maxHighlightLength&&jt(t.doc.mode,j.state),te=Ee(t,s,j);H&&(j.state=H),s.stateAfter=j.save(!H),s.styles=te.styles,te.classes?s.styleClasses=te.classes:s.styleClasses&&(s.styleClasses=null),F===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return s.styles}function Fe(t,s,F){var j=t.doc,H=t.display;if(!j.mode.startState)return new ie(j,!0,s);var te=nr(t,s,F),de=te>j.first&>(j,te-1).stateAfter,ve=de?ie.fromSaved(j,de,te):new ie(j,ct(j.mode),te);return j.iter(te,s,function(xe){tt(t,xe.text,ve);var Se=ve.line;xe.stateAfter=Se==s-1||Se%5==0||Se>=H.viewFrom&&Se<H.viewTo?ve.save():null,ve.nextLine()}),F&&(j.modeFrontier=ve.line),ve}function tt(t,s,F,j){var H=t.doc.mode,te=new bt(s,t.options.tabSize,F);for(te.start=te.pos=j||0,s==""&&xt(H,F.state);!te.eol();)Ot(H,te,F.state),te.start=te.pos}function xt(t,s){if(t.blankLine)return t.blankLine(s);if(!t.innerMode)return;var F=Ht(t,s);if(F.mode.blankLine)return F.mode.blankLine(F.state)}function Ot(t,s,F,j){for(var H=0;H<10;H++){j&&(j[0]=Ht(t,F).mode);var te=t.token(s,F);if(s.pos>s.start)return te}throw new Error("Mode "+t.name+" failed to advance stream.")}var ut=function(t,s,F){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=s||null,this.state=F};function Ft(t,s,F,j){var H=t.doc,te=H.mode,de;s=Kt(H,s);var ve=gt(H,s.line),xe=Fe(t,s.line,F),Se=new bt(ve.text,t.options.tabSize,xe),Ge;for(j&&(Ge=[]);(j||Se.pos<s.ch)&&!Se.eol();)Se.start=Se.pos,de=Ot(te,Se,xe.state),j&&Ge.push(new ut(Se,de,jt(H.mode,xe.state)));return j?Ge:new ut(Se,de,xe.state)}function Xt(t,s){if(t)for(;;){var F=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!F)break;t=t.slice(0,F.index)+t.slice(F.index+F[0].length);var j=F[1]?"bgClass":"textClass";s[j]==null?s[j]=F[2]:new RegExp("(?:^|\\s)"+F[2]+"(?:$|\\s)").test(s[j])||(s[j]+=" "+F[2])}return t}function er(t,s,F,j,H,te,de){var ve=F.flattenSpans;ve==null&&(ve=t.options.flattenSpans);var xe=0,Se=null,Ge=new bt(s,t.options.tabSize,j),Ye,it=t.options.addModeClass&&[null];for(s==""&&Xt(xt(F,j.state),te);!Ge.eol();){if(Ge.pos>t.options.maxHighlightLength?(ve=!1,de&&tt(t,s,j,Ge.pos),Ge.pos=s.length,Ye=null):Ye=Xt(Ot(F,Ge,j.state,it),te),it){var et=it[0].name;et&&(Ye="m-"+(Ye?et+" "+Ye:et))}if(!ve||Se!=Ye){for(;xe<Ge.start;)xe=Math.min(Ge.start,xe+5e3),H(xe,Se);Se=Ye}Ge.start=Ge.pos}for(;xe<Ge.pos;){var vt=Math.min(Ge.pos,xe+5e3);H(vt,Se),xe=vt}}function nr(t,s,F){for(var j,H,te=t.doc,de=F?-1:s-(t.doc.mode.innerMode?1e3:100),ve=s;ve>de;--ve){if(ve<=te.first)return te.first;var xe=gt(te,ve-1),Se=xe.stateAfter;if(Se&&(!F||ve+(Se instanceof Y?Se.lookAhead:0)<=te.modeFrontier))return ve;var Ge=U(xe.text,null,t.options.tabSize);(H==null||j>Ge)&&(H=ve-1,j=Ge)}return H}function ur(t,s){if(t.modeFrontier=Math.min(t.modeFrontier,s),t.highlightFrontier<s-10)return;for(var F=t.first,j=s-1;j>F;j--){var H=gt(t,j).stateAfter;if(H&&(!(H instanceof Y)||j+H.lookAhead<s)){F=j+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,F)}var fr=!1,Pt=!1;function sr(){fr=!0}function lr(){Pt=!0}function br(t,s,F){this.marker=t,this.from=s,this.to=F}function $t(t,s){if(t)for(var F=0;F<t.length;++F){var j=t[F];if(j.marker==s)return j}}function $r(t,s){for(var F,j=0;j<t.length;++j)t[j]!=s&&(F||(F=[])).push(t[j]);return F}function jr(t,s){t.markedSpans=t.markedSpans?t.markedSpans.concat([s]):[s],s.marker.attachLine(t)}function Kn(t,s,F){var j;if(t)for(var H=0;H<t.length;++H){var te=t[H],de=te.marker,ve=te.from==null||(de.inclusiveLeft?te.from<=s:te.from<s);if(ve||te.from==s&&de.type=="bookmark"&&(!F||!te.marker.insertLeft)){var xe=te.to==null||(de.inclusiveRight?te.to>=s:te.to>s);(j||(j=[])).push(new br(de,te.from,xe?null:te.to))}}return j}function Xr(t,s,F){var j;if(t)for(var H=0;H<t.length;++H){var te=t[H],de=te.marker,ve=te.to==null||(de.inclusiveRight?te.to>=s:te.to>s);if(ve||te.from==s&&de.type=="bookmark"&&(!F||te.marker.insertLeft)){var xe=te.from==null||(de.inclusiveLeft?te.from<=s:te.from<s);(j||(j=[])).push(new br(de,xe?null:te.from-s,te.to==null?null:te.to-s))}}return j}function pn(t,s){if(s.full)return null;var F=kt(t,s.from.line)&>(t,s.from.line).markedSpans,j=kt(t,s.to.line)&>(t,s.to.line).markedSpans;if(!F&&!j)return null;var H=s.from.ch,te=s.to.ch,de=pt(s.from,s.to)==0,ve=Kn(F,H,de),xe=Xr(j,te,de),Se=s.text.length==1,Ge=_e(s.text).length+(Se?H:0);if(ve)for(var Ye=0;Ye<ve.length;++Ye){var it=ve[Ye];if(it.to==null){var et=$t(xe,it.marker);et?Se&&(it.to=et.to==null?null:et.to+Ge):it.to=H}}if(xe)for(var vt=0;vt<xe.length;++vt){var Et=xe[vt];if(Et.to!=null&&(Et.to+=Ge),Et.from==null){var At=$t(ve,Et.marker);At||(Et.from=Ge,Se&&(ve||(ve=[])).push(Et))}else Et.from+=Ge,Se&&(ve||(ve=[])).push(Et)}ve&&(ve=rn(ve)),xe&&xe!=ve&&(xe=rn(xe));var Nt=[ve];if(!Se){var Gt=s.text.length-2,Mt;if(Gt>0&&ve)for(var Vt=0;Vt<ve.length;++Vt)ve[Vt].to==null&&(Mt||(Mt=[])).push(new br(ve[Vt].marker,null,null));for(var or=0;or<Gt;++or)Nt.push(Mt);Nt.push(xe)}return Nt}function rn(t){for(var s=0;s<t.length;++s){var F=t[s];F.from!=null&&F.from==F.to&&F.marker.clearWhenEmpty!==!1&&t.splice(s--,1)}return t.length?t:null}function Nn(t,s,F){var j=null;if(t.iter(s.line,F.line+1,function(et){if(et.markedSpans)for(var vt=0;vt<et.markedSpans.length;++vt){var Et=et.markedSpans[vt].marker;Et.readOnly&&(!j||q(j,Et)==-1)&&(j||(j=[])).push(Et)}}),!j)return null;for(var H=[{from:s,to:F}],te=0;te<j.length;++te)for(var de=j[te],ve=de.find(0),xe=0;xe<H.length;++xe){var Se=H[xe];if(pt(Se.to,ve.from)<0||pt(Se.from,ve.to)>0)continue;var Ge=[xe,1],Ye=pt(Se.from,ve.from),it=pt(Se.to,ve.to);(Ye<0||!de.inclusiveLeft&&!Ye)&&Ge.push({from:Se.from,to:ve.from}),(it>0||!de.inclusiveRight&&!it)&&Ge.push({from:ve.to,to:Se.to}),H.splice.apply(H,Ge),xe+=Ge.length-3}return H}function Cr(t){var s=t.markedSpans;if(!s)return;for(var F=0;F<s.length;++F)s[F].marker.detachLine(t);t.markedSpans=null}function nn(t,s){if(!s)return;for(var F=0;F<s.length;++F)s[F].marker.attachLine(t);t.markedSpans=s}function Tn(t){return t.inclusiveLeft?-1:0}function an(t){return t.inclusiveRight?1:0}function Pr(t,s){var F=t.lines.length-s.lines.length;if(F!=0)return F;var j=t.find(),H=s.find(),te=pt(j.from,H.from)||Tn(t)-Tn(s);if(te)return-te;var de=pt(j.to,H.to)||an(t)-an(s);return de||s.id-t.id}function cr(t,s){var F=Pt&&t.markedSpans,j;if(F)for(var H=void 0,te=0;te<F.length;++te)H=F[te],H.marker.collapsed&&(s?H.from:H.to)==null&&(!j||Pr(j,H.marker)<0)&&(j=H.marker);return j}function Nr(t){return cr(t,!0)}function mr(t){return cr(t,!1)}function zr(t,s){var F=Pt&&t.markedSpans,j;if(F)for(var H=0;H<F.length;++H){var te=F[H];te.marker.collapsed&&(te.from==null||te.from<s)&&(te.to==null||te.to>s)&&(!j||Pr(j,te.marker)<0)&&(j=te.marker)}return j}function Or(t,s,F,j,H){var te=gt(t,s),de=Pt&&te.markedSpans;if(de)for(var ve=0;ve<de.length;++ve){var xe=de[ve];if(!xe.marker.collapsed)continue;var Se=xe.marker.find(0),Ge=pt(Se.from,F)||Tn(xe.marker)-Tn(H),Ye=pt(Se.to,j)||an(xe.marker)-an(H);if(Ge>=0&&Ye<=0||Ge<=0&&Ye>=0)continue;if(Ge<=0&&(xe.marker.inclusiveRight&&H.inclusiveLeft?pt(Se.to,F)>=0:pt(Se.to,F)>0)||Ge>=0&&(xe.marker.inclusiveRight&&H.inclusiveLeft?pt(Se.from,j)<=0:pt(Se.from,j)<0))return!0}}function Vr(t){for(var s;s=Nr(t);)t=s.find(-1,!0).line;return t}function Wr(t){for(var s;s=mr(t);)t=s.find(1,!0).line;return t}function vn(t){for(var s,F;s=mr(t);)t=s.find(1,!0).line,(F||(F=[])).push(t);return F}function Dn(t,s){var F=gt(t,s),j=Vr(F);return F==j?s:St(j)}function hr(t,s){if(s>t.lastLine())return s;var F=gt(t,s),j;if(!rr(t,F))return s;for(;j=mr(F);)F=j.find(1,!0).line;return St(F)+1}function rr(t,s){var F=Pt&&s.markedSpans;if(F)for(var j=void 0,H=0;H<F.length;++H){if(j=F[H],!j.marker.collapsed)continue;if(j.from==null)return!0;if(j.marker.widgetNode)continue;if(j.from==0&&j.marker.inclusiveLeft&&Ar(t,s,j))return!0}}function Ar(t,s,F){if(F.to==null){var j=F.marker.find(1,!0);return Ar(t,j.line,$t(j.line.markedSpans,F.marker))}if(F.marker.inclusiveRight&&F.to==s.text.length)return!0;for(var H=void 0,te=0;te<s.markedSpans.length;++te)if(H=s.markedSpans[te],H.marker.collapsed&&!H.marker.widgetNode&&H.from==F.to&&(H.to==null||H.to!=F.from)&&(H.marker.inclusiveLeft||F.marker.inclusiveRight)&&Ar(t,s,H))return!0}function Dr(t){t=Vr(t);for(var s=0,F=t.parent,j=0;j<F.lines.length;++j){var H=F.lines[j];if(H==t)break;s+=H.height}for(var te=F.parent;te;F=te,te=F.parent)for(var de=0;de<te.children.length;++de){var ve=te.children[de];if(ve==F)break;s+=ve.height}return s}function Jr(t){if(t.height==0)return 0;for(var s=t.text.length,F,j=t;F=Nr(j);){var H=F.find(0,!0);j=H.from.line,s+=H.from.ch-H.to.ch}for(j=t;F=mr(j);){var te=F.find(0,!0);s-=j.text.length-te.from.ch,j=te.to.line,s+=j.text.length-te.to.ch}return s}function Qr(t){var s=t.display,F=t.doc;s.maxLine=gt(F,F.first),s.maxLineLength=Jr(s.maxLine),s.maxLineChanged=!0,F.iter(function(j){var H=Jr(j);H>s.maxLineLength&&(s.maxLineLength=H,s.maxLine=j)})}var cn=function(t,s,F){this.text=t,nn(this,s),this.height=F?F(this):1};cn.prototype.lineNo=function(){return St(this)},Be(cn);function kr(t,s,F,j){t.text=s,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),t.order!=null&&(t.order=null),Cr(t),nn(t,F);var H=j?j(t):1;H!=t.height&&It(t,H)}function Yt(t){t.parent=null,Cr(t)}var ir={},Zt={};function Er(t,s){if(!t||/^\s*$/.test(t))return null;var F=s.addModeClass?Zt:ir;return F[t]||(F[t]=t.replace(/\S+/g,"cm-$&"))}function gr(t,s){var F=P("span",null,null,e?"padding-right: .1px":null),j={pre:P("pre",[F],"CodeMirror-line"),content:F,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};s.measure={};for(var H=0;H<=(s.rest?s.rest.length:0);H++){var te=H?s.rest[H-1]:s.line,de=void 0;j.pos=0,j.addToken=xr,ot(t.display.measure)&&(de=je(te,t.doc.direction))&&(j.addToken=dn(j.addToken,de)),j.map=[];var ve=s!=t.display.externalMeasured&&St(te);Yn(te,j,oe(t,te,ve)),te.styleClasses&&(te.styleClasses.bgClass&&(j.bgClass=a(te.styleClasses.bgClass,j.bgClass||"")),te.styleClasses.textClass&&(j.textClass=a(te.styleClasses.textClass,j.textClass||""))),j.map.length==0&&j.map.push(0,0,j.content.appendChild(Je(t.display.measure))),H==0?(s.measure.map=j.map,s.measure.cache={}):((s.measure.maps||(s.measure.maps=[])).push(j.map),(s.measure.caches||(s.measure.caches=[])).push({}))}if(e){var xe=j.content.lastChild;(/\bcm-tab\b/.test(xe.className)||xe.querySelector&&xe.querySelector(".cm-tab"))&&(j.content.className="cm-tab-wrap-hack")}return We(t,"renderLine",t,s.line,j.pre),j.pre.className&&(j.textClass=a(j.pre.className,j.textClass||"")),j}function Rr(t){var s=A("span","\u2022","cm-invalidchar");return s.title="\\u"+t.charCodeAt(0).toString(16),s.setAttribute("aria-label",s.title),s}function xr(t,s,F,j,H,te,de){if(!s)return;var ve=t.splitSpaces?Br(s,t.trailingSpace):s,xe=t.cm.state.specialChars,Se=!1,Ge;if(!xe.test(s))t.col+=s.length,Ge=document.createTextNode(ve),t.map.push(t.pos,t.pos+s.length,Ge),i&&T<9&&(Se=!0),t.pos+=s.length;else{Ge=document.createDocumentFragment();for(var Ye=0;;){xe.lastIndex=Ye;var it=xe.exec(s),et=it?it.index-Ye:s.length-Ye;if(et){var vt=document.createTextNode(ve.slice(Ye,Ye+et));i&&T<9?Ge.appendChild(A("span",[vt])):Ge.appendChild(vt),t.map.push(t.pos,t.pos+et,vt),t.col+=et,t.pos+=et}if(!it)break;Ye+=et+1;var Et=void 0;if(it[0]==" "){var At=t.cm.options.tabSize,Nt=At-t.col%At;Et=Ge.appendChild(A("span",se(Nt),"cm-tab")),Et.setAttribute("role","presentation"),Et.setAttribute("cm-text"," "),t.col+=Nt}else it[0]=="\r"||it[0]==`
|
|
|
`?(Et=Ge.appendChild(A("span",it[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Et.setAttribute("cm-text",it[0]),t.col+=1):(Et=t.cm.options.specialCharPlaceholder(it[0]),Et.setAttribute("cm-text",it[0]),i&&T<9?Ge.appendChild(A("span",[Et])):Ge.appendChild(Et),t.col+=1);t.map.push(t.pos,t.pos+1,Et),t.pos++}}if(t.trailingSpace=ve.charCodeAt(s.length-1)==32,F||j||H||Se||te||de){var Gt=F||"";j&&(Gt+=j),H&&(Gt+=H);var Mt=A("span",[Ge],Gt,te);if(de)for(var Vt in de)de.hasOwnProperty(Vt)&&Vt!="style"&&Vt!="class"&&Mt.setAttribute(Vt,de[Vt]);return t.content.appendChild(Mt)}t.content.appendChild(Ge)}function Br(t,s){if(t.length>1&&!/ /.test(t))return t;for(var F=s,j="",H=0;H<t.length;H++){var te=t.charAt(H);te==" "&&F&&(H==t.length-1||t.charCodeAt(H+1)==32)&&(te="\xA0"),j+=te,F=te==" "}return j}function dn(t,s){return function(F,j,H,te,de,ve,xe){H=H?H+" cm-force-border":"cm-force-border";for(var Se=F.pos,Ge=Se+j.length;;){for(var Ye=void 0,it=0;it<s.length&&!(Ye=s[it],Ye.to>Se&&Ye.from<=Se);it++);if(Ye.to>=Ge)return t(F,j,H,te,de,ve,xe);t(F,j.slice(0,Ye.to-Se),H,te,null,ve,xe),te=null,j=j.slice(Ye.to-Se),Se=Ye.to}}}function wr(t,s,F,j){var H=!j&&F.widgetNode;H&&t.map.push(t.pos,t.pos+s,H),!j&&t.cm.display.input.needsContentAttribute&&(H||(H=t.content.appendChild(document.createElement("span"))),H.setAttribute("cm-marker",F.id)),H&&(t.cm.display.input.setUneditable(H),t.content.appendChild(H)),t.pos+=s,t.trailingSpace=!1}function Yn(t,s,F){var j=t.markedSpans,H=t.text,te=0;if(!j){for(var de=1;de<F.length;de+=2)s.addToken(s,H.slice(te,te=F[de]),Er(F[de+1],s.cm.options));return}for(var ve=H.length,xe=0,Se=1,Ge="",Ye,it,et=0,vt,Et,At,Nt,Gt;;){if(et==xe){vt=Et=At=it="",Gt=null,Nt=null,et=Infinity;for(var Mt=[],Vt=void 0,or=0;or<j.length;++or){var qt=j[or],Sr=qt.marker;if(Sr.type=="bookmark"&&qt.from==xe&&Sr.widgetNode)Mt.push(Sr);else if(qt.from<=xe&&(qt.to==null||qt.to>xe||Sr.collapsed&&qt.to==xe&&qt.from==xe)){if(qt.to!=null&&qt.to!=xe&&et>qt.to&&(et=qt.to,Et=""),Sr.className&&(vt+=" "+Sr.className),Sr.css&&(it=(it?it+";":"")+Sr.css),Sr.startStyle&&qt.from==xe&&(At+=" "+Sr.startStyle),Sr.endStyle&&qt.to==et&&(Vt||(Vt=[])).push(Sr.endStyle,qt.to),Sr.title&&((Gt||(Gt={})).title=Sr.title),Sr.attributes)for(var Gr in Sr.attributes)(Gt||(Gt={}))[Gr]=Sr.attributes[Gr];Sr.collapsed&&(!Nt||Pr(Nt.marker,Sr)<0)&&(Nt=qt)}else qt.from>xe&&et>qt.from&&(et=qt.from)}if(Vt)for(var xn=0;xn<Vt.length;xn+=2)Vt[xn+1]==et&&(Et+=" "+Vt[xn]);if(!Nt||Nt.from==xe)for(var qr=0;qr<Mt.length;++qr)wr(s,0,Mt[qr]);if(Nt&&(Nt.from||0)==xe){if(wr(s,(Nt.to==null?ve+1:Nt.to)-xe,Nt.marker,Nt.from==null),Nt.to==null)return;Nt.to==xe&&(Nt=!1)}}if(xe>=ve)break;for(var Vn=Math.min(ve,et);;){if(Ge){var Bn=xe+Ge.length;if(!Nt){var hn=Bn>Vn?Ge.slice(0,Vn-xe):Ge;s.addToken(s,hn,Ye?Ye+vt:vt,At,xe+hn.length==et?Et:"",it,Gt)}if(Bn>=Vn){Ge=Ge.slice(Vn-xe),xe=Vn;break}xe=Bn,At=""}Ge=H.slice(te,te=F[Se++]),Ye=Er(F[Se++],s.cm.options)}}}function Ir(t,s,F){this.line=s,this.rest=vn(s),this.size=this.rest?St(_e(this.rest))-F+1:1,this.node=this.text=null,this.hidden=rr(t,s)}function yn(t,s,F){for(var j=[],H,te=s;te<F;te=H){var de=new Ir(t.doc,gt(t.doc,te),te);H=te+de.size,j.push(de)}return j}var on=null;function bn(t){on?on.ops.push(t):t.ownsGroup=on={ops:[t],delayedCallbacks:[]}}function ii(t){var s=t.delayedCallbacks,F=0;do{for(;F<s.length;F++)s[F].call(null);for(var j=0;j<t.ops.length;j++){var H=t.ops[j];if(H.cursorActivityHandlers)for(;H.cursorActivityCalled<H.cursorActivityHandlers.length;)H.cursorActivityHandlers[H.cursorActivityCalled++].call(null,H.cm)}}while(F<s.length)}function Ii(t,s){var F=t.ownsGroup;if(!F)return;try{ii(F)}finally{on=null,s(F)}}var si=null;function Zr(t,s){var F=Xe(t,s);if(!F.length)return;var j=Array.prototype.slice.call(arguments,2),H;on?H=on.delayedCallbacks:si?H=si:(H=si=[],setTimeout(Yi,0));for(var te=function(ve){H.push(function(){return F[ve].apply(null,j)})},de=0;de<F.length;++de)te(de)}function Yi(){var t=si;si=null;for(var s=0;s<t.length;++s)t[s]()}function bi(t,s,F,j){for(var H=0;H<s.changes.length;H++){var te=s.changes[H];te=="text"?dr(t,s):te=="gutter"?Lr(t,s,F,j):te=="class"?pr(t,s):te=="widget"&&_r(t,s,j)}s.changes=null}function qn(t){return t.node==t.text&&(t.node=A("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),i&&T<8&&(t.node.style.zIndex=2)),t.node}function ar(t,s){var F=s.bgClass?s.bgClass+" "+(s.line.bgClass||""):s.line.bgClass;if(F&&(F+=" CodeMirror-linebackground"),s.background)F?s.background.className=F:(s.background.parentNode.removeChild(s.background),s.background=null);else if(F){var j=qn(s);s.background=j.insertBefore(A("div",null,F),j.firstChild),t.display.input.setUneditable(s.background)}}function Bt(t,s){var F=t.display.externalMeasured;return F&&F.line==s.line?(t.display.externalMeasured=null,s.measure=F.measure,F.built):gr(t,s)}function dr(t,s){var F=s.text.className,j=Bt(t,s);s.text==s.node&&(s.node=j.pre),s.text.parentNode.replaceChild(j.pre,s.text),s.text=j.pre,j.bgClass!=s.bgClass||j.textClass!=s.textClass?(s.bgClass=j.bgClass,s.textClass=j.textClass,pr(t,s)):F&&(s.text.className=F)}function pr(t,s){ar(t,s),s.line.wrapClass?qn(s).className=s.line.wrapClass:s.node!=s.text&&(s.node.className="");var F=s.textClass?s.textClass+" "+(s.line.textClass||""):s.line.textClass;s.text.className=F||""}function Lr(t,s,F,j){if(s.gutter&&(s.node.removeChild(s.gutter),s.gutter=null),s.gutterBackground&&(s.node.removeChild(s.gutterBackground),s.gutterBackground=null),s.line.gutterClass){var H=qn(s);s.gutterBackground=A("div",null,"CodeMirror-gutter-background "+s.line.gutterClass,"left: "+(t.options.fixedGutter?j.fixedPos:-j.gutterTotalWidth)+"px; width: "+j.gutterTotalWidth+"px"),t.display.input.setUneditable(s.gutterBackground),H.insertBefore(s.gutterBackground,s.text)}var te=s.line.gutterMarkers;if(t.options.lineNumbers||te){var de=qn(s),ve=s.gutter=A("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?j.fixedPos:-j.gutterTotalWidth)+"px");if(t.display.input.setUneditable(ve),de.insertBefore(ve,s.text),s.line.gutterClass&&(ve.className+=" "+s.line.gutterClass),t.options.lineNumbers&&(!te||!te["CodeMirror-linenumbers"])&&(s.lineNumber=ve.appendChild(A("div",zt(t.options,F),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+j.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),te)for(var xe=0;xe<t.display.gutterSpecs.length;++xe){var Se=t.display.gutterSpecs[xe].className,Ge=te.hasOwnProperty(Se)&&te[Se];Ge&&ve.appendChild(A("div",[Ge],"CodeMirror-gutter-elt","left: "+j.gutterLeft[Se]+"px; width: "+j.gutterWidth[Se]+"px"))}}}function _r(t,s,F){s.alignable&&(s.alignable=null);for(var j=R("CodeMirror-linewidget"),H=s.node.firstChild,te=void 0;H;H=te)te=H.nextSibling,j.test(H.className)&&s.node.removeChild(H);Ur(t,s,F)}function Hr(t,s,F,j){var H=Bt(t,s);return s.text=s.node=H.pre,H.bgClass&&(s.bgClass=H.bgClass),H.textClass&&(s.textClass=H.textClass),pr(t,s),Lr(t,s,F,j),Ur(t,s,j),s.node}function Ur(t,s,F){if(On(t,s.line,s,F,!0),s.rest)for(var j=0;j<s.rest.length;j++)On(t,s.rest[j],s,F,!1)}function On(t,s,F,j,H){if(!s.widgets)return;for(var te=qn(F),de=0,ve=s.widgets;de<ve.length;++de){var xe=ve[de],Se=A("div",[xe.node],"CodeMirror-linewidget"+(xe.className?" "+xe.className:""));xe.handleMouseEvents||Se.setAttribute("cm-ignore-events","true"),en(xe,Se,F,j),t.display.input.setUneditable(Se),H&&xe.above?te.insertBefore(Se,F.gutter||F.text):te.appendChild(Se),Zr(xe,"redraw")}}function en(t,s,F,j){if(t.noHScroll){(F.alignable||(F.alignable=[])).push(s);var H=j.wrapperWidth;s.style.left=j.fixedPos+"px",t.coverGutter||(H-=j.gutterTotalWidth,s.style.paddingLeft=j.gutterTotalWidth+"px"),s.style.width=H+"px"}t.coverGutter&&(s.style.zIndex=5,s.style.position="relative",t.noHScroll||(s.style.marginLeft=-j.gutterTotalWidth+"px"))}function sn(t){if(t.height!=null)return t.height;var s=t.doc.cm;if(!s)return 0;if(!u(document.body,t.node)){var F="position: relative;";t.coverGutter&&(F+="margin-left: -"+s.display.gutters.offsetWidth+"px;"),t.noHScroll&&(F+="width: "+s.display.wrapper.clientWidth+"px;"),D(s.display.measure,A("div",[t.node],null,F))}return t.height=t.node.parentNode.offsetHeight}function ln(t,s){for(var F=Ke(s);F!=t.wrapper;F=F.parentNode)if(!F||F.nodeType==1&&F.getAttribute("cm-ignore-events")=="true"||F.parentNode==t.sizer&&F!=t.mover)return!0}function Gn(t){return t.lineSpace.offsetTop}function Sn(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function Ln(t){if(t.cachedPaddingH)return t.cachedPaddingH;var s=D(t.measure,A("pre","x","CodeMirror-line-like")),F=window.getComputedStyle?window.getComputedStyle(s):s.currentStyle,j={left:parseInt(F.paddingLeft),right:parseInt(F.paddingRight)};return!isNaN(j.left)&&!isNaN(j.right)&&(t.cachedPaddingH=j),j}function mn(t){return $-t.display.nativeBarWidth}function An(t){return t.display.scroller.clientWidth-mn(t)-t.display.barWidth}function $n(t){return t.display.scroller.clientHeight-mn(t)-t.display.barHeight}function Jn(t,s,F){var j=t.options.lineWrapping,H=j&&An(t);if(!s.measure.heights||j&&s.measure.width!=H){var te=s.measure.heights=[];if(j){s.measure.width=H;for(var de=s.text.firstChild.getClientRects(),ve=0;ve<de.length-1;ve++){var xe=de[ve],Se=de[ve+1];Math.abs(xe.bottom-Se.bottom)>2&&te.push((xe.bottom+Se.top)/2-F.top)}}te.push(F.bottom-F.top)}}function Mn(t,s,F){if(t.line==s)return{map:t.measure.map,cache:t.measure.cache};for(var j=0;j<t.rest.length;j++)if(t.rest[j]==s)return{map:t.measure.maps[j],cache:t.measure.caches[j]};for(var H=0;H<t.rest.length;H++)if(St(t.rest[H])>F)return{map:t.measure.maps[H],cache:t.measure.caches[H],before:!0}}function ai(t,s){s=Vr(s);var F=St(s),j=t.display.externalMeasured=new Ir(t.doc,s,F);j.lineN=F;var H=j.built=gr(t,j);return j.text=H.pre,D(t.display.lineMeasure,H.pre),j}function vr(t,s,F,j){return Kr(t,Tr(t,s),F,j)}function Qt(t,s){if(s>=t.display.viewFrom&&s<t.display.viewTo)return t.display.view[wi(t,s)];var F=t.display.externalMeasured;if(F&&s>=F.lineN&&s<F.lineN+F.size)return F}function Tr(t,s){var F=St(s),j=Qt(t,F);j&&!j.text?j=null:j&&j.changes&&(bi(t,j,F,Ka(t)),t.curOp.forceUpdate=!0),j||(j=ai(t,s));var H=Mn(j,s,F);return{line:s,view:j,rect:null,map:H.map,cache:H.cache,before:H.before,hasHeights:!1}}function Kr(t,s,F,j,H){s.before&&(F=-1);var te=F+(j||""),de;return s.cache.hasOwnProperty(te)?de=s.cache[te]:(s.rect||(s.rect=s.view.text.getBoundingClientRect()),s.hasHeights||(Jn(t,s.view,s.rect),s.hasHeights=!0),de=Di(t,s,F,j),de.bogus||(s.cache[te]=de)),{left:de.left,right:de.right,top:H?de.rtop:de.top,bottom:H?de.rbottom:de.bottom}}var ci={left:0,right:0,top:0,bottom:0};function zn(t,s,F){for(var j,H,te,de,ve,xe,Se=0;Se<t.length;Se+=3)if(ve=t[Se],xe=t[Se+1],s<ve?(H=0,te=1,de="left"):s<xe?(H=s-ve,te=H+1):(Se==t.length-3||s==xe&&t[Se+3]>s)&&(te=xe-ve,H=te-1,s>=xe&&(de="right")),H!=null){if(j=t[Se+2],ve==xe&&F==(j.insertLeft?"left":"right")&&(de=F),F=="left"&&H==0)for(;Se&&t[Se-2]==t[Se-3]&&t[Se-1].insertLeft;)j=t[(Se-=3)+2],de="left";if(F=="right"&&H==xe-ve)for(;Se<t.length-3&&t[Se+3]==t[Se+4]&&!t[Se+5].insertLeft;)j=t[(Se+=3)+2],de="right";break}return{node:j,start:H,end:te,collapse:de,coverStart:ve,coverEnd:xe}}function _i(t,s){var F=ci;if(s=="left")for(var j=0;j<t.length&&!((F=t[j]).left!=F.right);j++);else for(var H=t.length-1;H>=0&&!((F=t[H]).left!=F.right);H--);return F}function Di(t,s,F,j){var H=zn(s.map,F,j),te=H.node,de=H.start,ve=H.end,xe=H.collapse,Se;if(te.nodeType==3){for(var Ge=0;Ge<4;Ge++){for(;de&&le(s.line.text.charAt(H.coverStart+de));)--de;for(;H.coverStart+ve<H.coverEnd&&le(s.line.text.charAt(H.coverStart+ve));)++ve;if(i&&T<9&&de==0&&ve==H.coverEnd-H.coverStart?Se=te.parentNode.getBoundingClientRect():Se=_i(I(te,de,ve).getClientRects(),j),Se.left||Se.right||de==0)break;ve=de,de=de-1,xe="right"}i&&T<11&&(Se=jn(t.display.measure,Se))}else{de>0&&(xe=j="right");var Ye;t.options.lineWrapping&&(Ye=te.getClientRects()).length>1?Se=Ye[j=="right"?Ye.length-1:0]:Se=te.getBoundingClientRect()}if(i&&T<9&&!de&&(!Se||!Se.left&&!Se.right)){var it=te.parentNode.getClientRects()[0];it?Se={left:it.left,right:it.left+ki(t.display),top:it.top,bottom:it.bottom}:Se=ci}for(var et=Se.top-s.rect.top,vt=Se.bottom-s.rect.top,Et=(et+vt)/2,At=s.view.measure.heights,Nt=0;Nt<At.length-1&&!(Et<At[Nt]);Nt++);var Gt=Nt?At[Nt-1]:0,Mt=At[Nt],Vt={left:(xe=="right"?Se.right:Se.left)-s.rect.left,right:(xe=="left"?Se.left:Se.right)-s.rect.left,top:Gt,bottom:Mt};return!Se.left&&!Se.right&&(Vt.bogus=!0),t.options.singleCursorHeightPerLine||(Vt.rtop=et,Vt.rbottom=vt),Vt}function jn(t,s){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!mt(t))return s;var F=screen.logicalXDPI/screen.deviceXDPI,j=screen.logicalYDPI/screen.deviceYDPI;return{left:s.left*F,right:s.right*F,top:s.top*j,bottom:s.bottom*j}}function ei(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var s=0;s<t.rest.length;s++)t.measure.caches[s]={}}function bo(t){t.display.externalMeasure=null,w(t.display.lineMeasure);for(var s=0;s<t.display.view.length;s++)ei(t.display.view[s])}function $i(t){bo(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function _o(){return l&&v?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Eo(){return l&&v?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ua(t){var s=0;if(t.widgets)for(var F=0;F<t.widgets.length;++F)t.widgets[F].above&&(s+=sn(t.widgets[F]));return s}function va(t,s,F,j,H){if(!H){var te=Ua(s);F.top+=te,F.bottom+=te}if(j=="line")return F;j||(j="local");var de=Dr(s);if(j=="local"?de+=Gn(t.display):de-=t.display.viewOffset,j=="page"||j=="window"){var ve=t.display.lineSpace.getBoundingClientRect();de+=ve.top+(j=="window"?0:Eo());var xe=ve.left+(j=="window"?0:_o());F.left+=xe,F.right+=xe}return F.top+=de,F.bottom+=de,F}function xo(t,s,F){if(F=="div")return s;var j=s.left,H=s.top;if(F=="page")j-=_o(),H-=Eo();else if(F=="local"||!F){var te=t.display.sizer.getBoundingClientRect();j+=te.left,H+=te.top}var de=t.display.lineSpace.getBoundingClientRect();return{left:j-de.left,top:H-de.top}}function Fa(t,s,F,j,H){return j||(j=gt(t.doc,s.line)),va(t,j,vr(t,j,s.ch,H),F)}function ti(t,s,F,j,H,te){j=j||gt(t.doc,s.line),H||(H=Tr(t,j));function de(vt,Et){var At=Kr(t,H,vt,Et?"right":"left",te);return Et?At.left=At.right:At.right=At.left,va(t,j,At,F)}var ve=je(j,t.doc.direction),xe=s.ch,Se=s.sticky;if(xe>=j.text.length?(xe=j.text.length,Se="before"):xe<=0&&(xe=0,Se="after"),!ve)return de(Se=="before"?xe-1:xe,Se=="before");function Ge(vt,Et,At){var Nt=ve[Et],Gt=Nt.level==1;return de(At?vt-1:vt,Gt!=At)}var Ye=Oe(ve,xe,Se),it=He,et=Ge(xe,Ye,Se=="before");return it!=null&&(et.other=Ge(xe,it,Se!="before")),et}function wo(t,s){var F=0;s=Kt(t.doc,s),t.options.lineWrapping||(F=ki(t.display)*s.ch);var j=gt(t.doc,s.line),H=Dr(j)+Gn(t.display);return{left:F,right:F,top:H,bottom:H+j.height}}function Ba(t,s,F,j,H){var te=st(t,s,F);return te.xRel=H,j&&(te.outside=j),te}function Wa(t,s,F){var j=t.doc;if(F+=t.display.viewOffset,F<0)return Ba(j.first,0,null,-1,-1);var H=Jt(j,F),te=j.first+j.size-1;if(H>te)return Ba(j.first+j.size-1,gt(j,te).text.length,null,1,1);s<0&&(s=0);for(var de=gt(j,H);;){var ve=Ks(t,de,H,s,F),xe=zr(de,ve.ch+(ve.xRel>0||ve.outside>0?1:0));if(!xe)return ve;var Se=xe.find(1);if(Se.line==H)return Se;de=gt(j,H=Se.line)}}function To(t,s,F,j){j-=Ua(s);var H=s.text.length,te=Te(function(de){return Kr(t,F,de-1).bottom<=j},H,0);return H=Te(function(de){return Kr(t,F,de).top>j},te,H),{begin:te,end:H}}function So(t,s,F,j){F||(F=Tr(t,s));var H=va(t,s,Kr(t,F,j),"line").top;return To(t,s,F,H)}function Ha(t,s,F,j){return t.bottom<=F?!1:t.top>F?!0:(j?t.left:t.right)>s}function Ks(t,s,F,j,H){H-=Dr(s);var te=Tr(t,s),de=Ua(s),ve=0,xe=s.text.length,Se=!0,Ge=je(s,t.doc.direction);if(Ge){var Ye=(t.options.lineWrapping?zs:Gs)(t,s,F,te,Ge,j,H);Se=Ye.level!=1,ve=Se?Ye.from:Ye.to-1,xe=Se?Ye.to:Ye.from-1}var it=null,et=null,vt=Te(function(or){var qt=Kr(t,te,or);return qt.top+=de,qt.bottom+=de,Ha(qt,j,H,!1)?(qt.top<=H&&qt.left<=j&&(it=or,et=qt),!0):!1},ve,xe),Et,At,Nt=!1;if(et){var Gt=j-et.left<et.right-j,Mt=Gt==Se;vt=it+(Mt?0:1),At=Mt?"after":"before",Et=Gt?et.left:et.right}else{!Se&&(vt==xe||vt==ve)&&vt++,At=vt==0?"after":vt==s.text.length?"before":Kr(t,te,vt-(Se?1:0)).bottom+de<=H==Se?"after":"before";var Vt=ti(t,st(F,vt,At),"line",s,te);Et=Vt.left,Nt=H<Vt.top?-1:H>=Vt.bottom?1:0}return vt=ye(s.text,vt,1),Ba(F,vt,At,Nt,j-Et)}function Gs(t,s,F,j,H,te,de){var ve=Te(function(Ye){var it=H[Ye],et=it.level!=1;return Ha(ti(t,st(F,et?it.to:it.from,et?"before":"after"),"line",s,j),te,de,!0)},0,H.length-1),xe=H[ve];if(ve>0){var Se=xe.level!=1,Ge=ti(t,st(F,Se?xe.from:xe.to,Se?"after":"before"),"line",s,j);Ha(Ge,te,de,!0)&&Ge.top>de&&(xe=H[ve-1])}return xe}function zs(t,s,F,j,H,te,de){var ve=To(t,s,j,de),xe=ve.begin,Se=ve.end;/\s/.test(s.text.charAt(Se-1))&&Se--;for(var Ge=null,Ye=null,it=0;it<H.length;it++){var et=H[it];if(et.from>=Se||et.to<=xe)continue;var vt=et.level!=1,Et=Kr(t,j,vt?Math.min(Se,et.to)-1:Math.max(xe,et.from)).right,At=Et<te?te-Et+1e9:Et-te;(!Ge||Ye>At)&&(Ge=et,Ye=At)}return Ge||(Ge=H[H.length-1]),Ge.from<xe&&(Ge={from:xe,to:Ge.to,level:Ge.level}),Ge.to>Se&&(Ge={from:Ge.from,to:Se,level:Ge.level}),Ge}var Ei;function Li(t){if(t.cachedTextHeight!=null)return t.cachedTextHeight;if(Ei==null){Ei=A("pre",null,"CodeMirror-line-like");for(var s=0;s<49;++s)Ei.appendChild(document.createTextNode("x")),Ei.appendChild(A("br"));Ei.appendChild(document.createTextNode("x"))}D(t.measure,Ei);var F=Ei.offsetHeight/50;return F>3&&(t.cachedTextHeight=F),w(t.measure),F||1}function ki(t){if(t.cachedCharWidth!=null)return t.cachedCharWidth;var s=A("span","xxxxxxxxxx"),F=A("pre",[s],"CodeMirror-line-like");D(t.measure,F);var j=s.getBoundingClientRect(),H=(j.right-j.left)/10;return H>2&&(t.cachedCharWidth=H),H||10}function Ka(t){for(var s=t.display,F={},j={},H=s.gutters.clientLeft,te=s.gutters.firstChild,de=0;te;te=te.nextSibling,++de){var ve=t.display.gutterSpecs[de].className;F[ve]=te.offsetLeft+te.clientLeft+H,j[ve]=te.clientWidth}return{fixedPos:Ga(s),gutterTotalWidth:s.gutters.offsetWidth,gutterLeft:F,gutterWidth:j,wrapperWidth:s.wrapper.clientWidth}}function Ga(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function Co(t){var s=Li(t.display),F=t.options.lineWrapping,j=F&&Math.max(5,t.display.scroller.clientWidth/ki(t.display)-3);return function(H){if(rr(t.doc,H))return 0;var te=0;if(H.widgets)for(var de=0;de<H.widgets.length;de++)H.widgets[de].height&&(te+=H.widgets[de].height);return F?te+(Math.ceil(H.text.length/j)||1)*s:te+s}}function za(t){var s=t.doc,F=Co(t);s.iter(function(j){var H=F(j);H!=j.height&&It(j,H)})}function xi(t,s,F,j){var H=t.display;if(!F&&Ke(s).getAttribute("cm-not-content")=="true")return null;var te,de,ve=H.lineSpace.getBoundingClientRect();try{te=s.clientX-ve.left,de=s.clientY-ve.top}catch(Ye){return null}var xe=Wa(t,te,de),Se;if(j&&xe.xRel>0&&(Se=gt(t.doc,xe.line).text).length==xe.ch){var Ge=U(Se,Se.length,t.options.tabSize)-Se.length;xe=st(xe.line,Math.max(0,Math.round((te-Ln(t.display).left)/ki(t.display))-Ge))}return xe}function wi(t,s){if(s>=t.display.viewTo)return null;if(s-=t.display.viewFrom,s<0)return null;for(var F=t.display.view,j=0;j<F.length;j++)if(s-=F[j].size,s<0)return j}function Un(t,s,F,j){s==null&&(s=t.doc.first),F==null&&(F=t.doc.first+t.doc.size),j||(j=0);var H=t.display;if(j&&F<H.viewTo&&(H.updateLineNumbers==null||H.updateLineNumbers>s)&&(H.updateLineNumbers=s),t.curOp.viewChanged=!0,s>=H.viewTo)Pt&&Dn(t.doc,s)<H.viewTo&&hi(t);else if(F<=H.viewFrom)Pt&&hr(t.doc,F+j)>H.viewFrom?hi(t):(H.viewFrom+=j,H.viewTo+=j);else if(s<=H.viewFrom&&F>=H.viewTo)hi(t);else if(s<=H.viewFrom){var te=ya(t,F,F+j,1);te?(H.view=H.view.slice(te.index),H.viewFrom=te.lineN,H.viewTo+=j):hi(t)}else if(F>=H.viewTo){var de=ya(t,s,s,-1);de?(H.view=H.view.slice(0,de.index),H.viewTo=de.lineN):hi(t)}else{var ve=ya(t,s,s,-1),xe=ya(t,F,F+j,1);ve&&xe?(H.view=H.view.slice(0,ve.index).concat(yn(t,ve.lineN,xe.lineN)).concat(H.view.slice(xe.index)),H.viewTo+=j):hi(t)}var Se=H.externalMeasured;Se&&(F<Se.lineN?Se.lineN+=j:s<Se.lineN+Se.size&&(H.externalMeasured=null))}function di(t,s,F){t.curOp.viewChanged=!0;var j=t.display,H=t.display.externalMeasured;if(H&&s>=H.lineN&&s<H.lineN+H.size&&(j.externalMeasured=null),s<j.viewFrom||s>=j.viewTo)return;var te=j.view[wi(t,s)];if(te.node==null)return;var de=te.changes||(te.changes=[]);q(de,F)==-1&&de.push(F)}function hi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function ya(t,s,F,j){var H=wi(t,s),te,de=t.display.view;if(!Pt||F==t.doc.first+t.doc.size)return{index:H,lineN:F};for(var ve=t.display.viewFrom,xe=0;xe<H;xe++)ve+=de[xe].size;if(ve!=s){if(j>0){if(H==de.length-1)return null;te=ve+de[H].size-s,H++}else te=ve-s;s+=te,F+=te}for(;Dn(t.doc,F)!=F;){if(H==(j<0?0:de.length-1))return null;F+=j*de[H-(j<0?1:0)].size,H+=j}return{index:H,lineN:F}}function Xs(t,s,F){var j=t.display,H=j.view;H.length==0||s>=j.viewTo||F<=j.viewFrom?(j.view=yn(t,s,F),j.viewFrom=s):(j.viewFrom>s?j.view=yn(t,s,j.viewFrom).concat(j.view):j.viewFrom<s&&(j.view=j.view.slice(wi(t,s))),j.viewFrom=s,j.viewTo<F?j.view=j.view.concat(yn(t,j.viewTo,F)):j.viewTo>F&&(j.view=j.view.slice(0,wi(t,F)))),j.viewTo=F}function Oo(t){for(var s=t.display.view,F=0,j=0;j<s.length;j++){var H=s[j];!H.hidden&&(!H.node||H.changes)&&++F}return F}function Ji(t){t.display.input.showSelection(t.display.input.prepareSelection())}function Ao(t,s){s===void 0&&(s=!0);for(var F=t.doc,j={},H=j.cursors=document.createDocumentFragment(),te=j.selection=document.createDocumentFragment(),de=0;de<F.sel.ranges.length;de++){if(!s&&de==F.sel.primIndex)continue;var ve=F.sel.ranges[de];if(ve.from().line>=t.display.viewTo||ve.to().line<t.display.viewFrom)continue;var xe=ve.empty();(xe||t.options.showCursorWhenSelecting)&&Ro(t,ve.head,H),xe||Vs(t,ve,te)}return j}function Ro(t,s,F){var j=ti(t,s,"div",null,null,!t.options.singleCursorHeightPerLine),H=F.appendChild(A("div","\xA0","CodeMirror-cursor"));if(H.style.left=j.left+"px",H.style.top=j.top+"px",H.style.height=Math.max(0,j.bottom-j.top)*t.options.cursorHeight+"px",j.other){var te=F.appendChild(A("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));te.style.display="",te.style.left=j.other.left+"px",te.style.top=j.other.top+"px",te.style.height=(j.other.bottom-j.other.top)*.85+"px"}}function ba(t,s){return t.top-s.top||t.left-s.left}function Vs(t,s,F){var j=t.display,H=t.doc,te=document.createDocumentFragment(),de=Ln(t.display),ve=de.left,xe=Math.max(j.sizerWidth,An(t)-j.sizer.offsetLeft)-de.right,Se=H.direction=="ltr";function Ge(Mt,Vt,or,qt){Vt<0&&(Vt=0),Vt=Math.round(Vt),qt=Math.round(qt),te.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+Mt+`px;
|
|
|
top: `+Vt+"px; width: "+(or==null?xe-Mt:or)+`px;
|
|
|
height: `+(qt-Vt)+"px"))}function Ye(Mt,Vt,or){var qt=gt(H,Mt),Sr=qt.text.length,Gr,xn;function qr(hn,Wn){return Fa(t,st(Mt,hn),"div",qt,Wn)}function Vn(hn,Wn,Cn){var gn=So(t,qt,null,hn),fn=Wn=="ltr"==(Cn=="after")?"left":"right",tn=Cn=="after"?gn.begin:gn.end-(/\s/.test(qt.text.charAt(gn.end-1))?2:1);return qr(tn,fn)[fn]}var Bn=je(qt,H.direction);return Pe(Bn,Vt||0,or==null?Sr:or,function(hn,Wn,Cn,gn){var fn=Cn=="ltr",tn=qr(hn,fn?"left":"right"),Hn=qr(Wn-1,fn?"right":"left"),Xi=Vt==null&&hn==0,yi=or==null&&Wn==Sr,In=gn==0,oi=!Bn||gn==Bn.length-1;if(Hn.top-tn.top<=3){var wn=(Se?Xi:yi)&&In,vo=(Se?yi:Xi)&&oi,ui=wn?ve:(fn?tn:Hn).left,Ai=vo?xe:(fn?Hn:tn).right;Ge(ui,tn.top,Ai-ui,tn.bottom)}else{var Ri,Pn,Vi,yo;fn?(Ri=Se&&Xi&&In?ve:tn.left,Pn=Se?xe:Vn(hn,Cn,"before"),Vi=Se?ve:Vn(Wn,Cn,"after"),yo=Se&&yi&&oi?xe:Hn.right):(Ri=Se?Vn(hn,Cn,"before"):ve,Pn=!Se&&Xi&&In?xe:tn.right,Vi=!Se&&yi&&oi?ve:Hn.left,yo=Se?Vn(Wn,Cn,"after"):xe),Ge(Ri,tn.top,Pn-Ri,tn.bottom),tn.bottom<Hn.top&&Ge(ve,tn.bottom,null,Hn.top),Ge(Vi,Hn.top,yo-Vi,Hn.bottom)}(!Gr||ba(tn,Gr)<0)&&(Gr=tn),ba(Hn,Gr)<0&&(Gr=Hn),(!xn||ba(tn,xn)<0)&&(xn=tn),ba(Hn,xn)<0&&(xn=Hn)}),{start:Gr,end:xn}}var it=s.from(),et=s.to();if(it.line==et.line)Ye(it.line,it.ch,et.ch);else{var vt=gt(H,it.line),Et=gt(H,et.line),At=Vr(vt)==Vr(Et),Nt=Ye(it.line,it.ch,At?vt.text.length+1:null).end,Gt=Ye(et.line,At?0:null,et.ch).start;At&&(Nt.top<Gt.top-2?(Ge(Nt.right,Nt.top,null,Nt.bottom),Ge(ve,Gt.top,Gt.left,Gt.bottom)):Ge(Nt.right,Nt.top,Gt.left-Nt.right,Nt.bottom)),Nt.bottom<Gt.top&&Ge(ve,Nt.bottom,null,Gt.top)}F.appendChild(te)}function Xa(t){if(!t.state.focused)return;var s=t.display;clearInterval(s.blinker);var F=!0;s.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?s.blinker=setInterval(function(){t.hasFocus()||Pi(t),s.cursorDiv.style.visibility=(F=!F)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(s.cursorDiv.style.visibility="hidden")}function Io(t){t.state.focused||(t.display.input.focus(),Va(t))}function Do(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,Pi(t))},100)}function Va(t,s){if(t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),t.options.readOnly=="nocursor")return;t.state.focused||(We(t,"focus",t,s),t.state.focused=!0,g(t.display.wrapper,"CodeMirror-focused"),!t.curOp&&t.display.selForContextMenu!=t.doc.sel&&(t.display.input.reset(),e&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Xa(t)}function Pi(t,s){if(t.state.delayingBlurEvent)return;t.state.focused&&(We(t,"blur",t,s),t.state.focused=!1,O(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150)}function _a(t){for(var s=t.display,F=s.lineDiv.offsetTop,j=0;j<s.view.length;j++){var H=s.view[j],te=t.options.lineWrapping,de=void 0,ve=0;if(H.hidden)continue;if(i&&T<8){var xe=H.node.offsetTop+H.node.offsetHeight;de=xe-F,F=xe}else{var Se=H.node.getBoundingClientRect();de=Se.bottom-Se.top,!te&&H.text.firstChild&&(ve=H.text.firstChild.getBoundingClientRect().right-Se.left-1)}var Ge=H.line.height-de;if((Ge>.005||Ge<-.005)&&(It(H.line,de),Lo(H.line),H.rest))for(var Ye=0;Ye<H.rest.length;Ye++)Lo(H.rest[Ye]);if(ve>t.display.sizerWidth){var it=Math.ceil(ve/ki(t.display));it>t.display.maxLineLength&&(t.display.maxLineLength=it,t.display.maxLine=H.line,t.display.maxLineChanged=!0)}}}function Lo(t){if(t.widgets)for(var s=0;s<t.widgets.length;++s){var F=t.widgets[s],j=F.node.parentNode;j&&(F.height=j.offsetHeight)}}function Ea(t,s,F){var j=F&&F.top!=null?Math.max(0,F.top):t.scroller.scrollTop;j=Math.floor(j-Gn(t));var H=F&&F.bottom!=null?F.bottom:j+t.wrapper.clientHeight,te=Jt(s,j),de=Jt(s,H);if(F&&F.ensure){var ve=F.ensure.from.line,xe=F.ensure.to.line;ve<te?(te=ve,de=Jt(s,Dr(gt(s,ve))+t.wrapper.clientHeight)):Math.min(xe,s.lastLine())>=de&&(te=Jt(s,Dr(gt(s,xe))-t.wrapper.clientHeight),de=xe)}return{from:te,to:Math.max(de,te+1)}}function Ys(t,s){if(ze(t,"scrollCursorIntoView"))return;var F=t.display,j=F.sizer.getBoundingClientRect(),H=null;if(s.top+j.top<0?H=!0:s.bottom+j.top>(window.innerHeight||document.documentElement.clientHeight)&&(H=!1),H!=null&&!o){var te=A("div","\u200B",null,`position: absolute;
|
|
|
top: `+(s.top-F.viewOffset-Gn(t.display))+`px;
|
|
|
height: `+(s.bottom-s.top+mn(t)+F.barHeight)+`px;
|
|
|
left: `+s.left+"px; width: "+Math.max(2,s.right-s.left)+"px;");t.display.lineSpace.appendChild(te),te.scrollIntoView(H),t.display.lineSpace.removeChild(te)}}function $s(t,s,F,j){j==null&&(j=0);var H;!t.options.lineWrapping&&s==F&&(s=s.ch?st(s.line,s.sticky=="before"?s.ch-1:s.ch,"after"):s,F=s.sticky=="before"?st(s.line,s.ch+1,"before"):s);for(var te=0;te<5;te++){var de=!1,ve=ti(t,s),xe=!F||F==s?ve:ti(t,F);H={left:Math.min(ve.left,xe.left),top:Math.min(ve.top,xe.top)-j,right:Math.max(ve.left,xe.left),bottom:Math.max(ve.bottom,xe.bottom)+j};var Se=Ya(t,H),Ge=t.doc.scrollTop,Ye=t.doc.scrollLeft;if(Se.scrollTop!=null&&(Zi(t,Se.scrollTop),Math.abs(t.doc.scrollTop-Ge)>1&&(de=!0)),Se.scrollLeft!=null&&(Ti(t,Se.scrollLeft),Math.abs(t.doc.scrollLeft-Ye)>1&&(de=!0)),!de)break}return H}function Js(t,s){var F=Ya(t,s);F.scrollTop!=null&&Zi(t,F.scrollTop),F.scrollLeft!=null&&Ti(t,F.scrollLeft)}function Ya(t,s){var F=t.display,j=Li(t.display);s.top<0&&(s.top=0);var H=t.curOp&&t.curOp.scrollTop!=null?t.curOp.scrollTop:F.scroller.scrollTop,te=$n(t),de={};s.bottom-s.top>te&&(s.bottom=s.top+te);var ve=t.doc.height+Sn(F),xe=s.top<j,Se=s.bottom>ve-j;if(s.top<H)de.scrollTop=xe?0:s.top;else if(s.bottom>H+te){var Ge=Math.min(s.top,(Se?ve:s.bottom)-te);Ge!=H&&(de.scrollTop=Ge)}var Ye=t.options.fixedGutter?0:F.gutters.offsetWidth,it=t.curOp&&t.curOp.scrollLeft!=null?t.curOp.scrollLeft:F.scroller.scrollLeft-Ye,et=An(t)-F.gutters.offsetWidth,vt=s.right-s.left>et;return vt&&(s.right=s.left+et),s.left<10?de.scrollLeft=0:s.left<it?de.scrollLeft=Math.max(0,s.left+Ye-(vt?0:10)):s.right>et+it-3&&(de.scrollLeft=s.right+(vt?0:10)-et),de}function $a(t,s){if(s==null)return;xa(t),t.curOp.scrollTop=(t.curOp.scrollTop==null?t.doc.scrollTop:t.curOp.scrollTop)+s}function Ni(t){xa(t);var s=t.getCursor();t.curOp.scrollToPos={from:s,to:s,margin:t.options.cursorScrollMargin}}function Qi(t,s,F){(s!=null||F!=null)&&xa(t),s!=null&&(t.curOp.scrollLeft=s),F!=null&&(t.curOp.scrollTop=F)}function Qs(t,s){xa(t),t.curOp.scrollToPos=s}function xa(t){var s=t.curOp.scrollToPos;if(s){t.curOp.scrollToPos=null;var F=wo(t,s.from),j=wo(t,s.to);ko(t,F,j,s.margin)}}function ko(t,s,F,j){var H=Ya(t,{left:Math.min(s.left,F.left),top:Math.min(s.top,F.top)-j,right:Math.max(s.right,F.right),bottom:Math.max(s.bottom,F.bottom)+j});Qi(t,H.scrollLeft,H.scrollTop)}function Zi(t,s){if(Math.abs(t.doc.scrollTop-s)<2)return;G||Qa(t,{top:s}),Po(t,s,!0),G&&Qa(t),ta(t,100)}function Po(t,s,F){if(s=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,s)),t.display.scroller.scrollTop==s&&!F)return;t.doc.scrollTop=s,t.display.scrollbars.setScrollTop(s),t.display.scroller.scrollTop!=s&&(t.display.scroller.scrollTop=s)}function Ti(t,s,F,j){if(s=Math.max(0,Math.min(s,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(F?s==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-s)<2)&&!j)return;t.doc.scrollLeft=s,Fo(t),t.display.scroller.scrollLeft!=s&&(t.display.scroller.scrollLeft=s),t.display.scrollbars.setScrollLeft(s)}function qi(t){var s=t.display,F=s.gutters.offsetWidth,j=Math.round(t.doc.height+Sn(t.display));return{clientHeight:s.scroller.clientHeight,viewHeight:s.wrapper.clientHeight,scrollWidth:s.scroller.scrollWidth,clientWidth:s.scroller.clientWidth,viewWidth:s.wrapper.clientWidth,barLeft:t.options.fixedGutter?F:0,docHeight:j,scrollHeight:j+mn(t)+s.barHeight,nativeBarWidth:s.nativeBarWidth,gutterWidth:F}}var Si=function(t,s,F){this.cm=F;var j=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),H=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");j.tabIndex=H.tabIndex=-1,t(j),t(H),Re(j,"scroll",function(){j.clientHeight&&s(j.scrollTop,"vertical")}),Re(H,"scroll",function(){H.clientWidth&&s(H.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,i&&T<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Si.prototype.update=function(t){var s=t.scrollWidth>t.clientWidth+1,F=t.scrollHeight>t.clientHeight+1,j=t.nativeBarWidth;if(F){this.vert.style.display="block",this.vert.style.bottom=s?j+"px":"0";var H=t.viewHeight-(s?j:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+H)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(s){this.horiz.style.display="block",this.horiz.style.right=F?j+"px":"0",this.horiz.style.left=t.barLeft+"px";var te=t.viewWidth-t.barLeft-(F?j:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+te)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(j==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:F?j:0,bottom:s?j:0}},Si.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Si.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Si.prototype.zeroWidthHack=function(){var t=y&&!n?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new z,this.disableVert=new z},Si.prototype.enableZeroWidthBar=function(t,s,F){t.style.pointerEvents="auto";function j(){var H=t.getBoundingClientRect(),te=F=="vert"?document.elementFromPoint(H.right-1,(H.top+H.bottom)/2):document.elementFromPoint((H.right+H.left)/2,H.bottom-1);te!=t?t.style.pointerEvents="none":s.set(1e3,j)}s.set(1e3,j)},Si.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var ea=function(){};ea.prototype.update=function(){return{bottom:0,right:0}},ea.prototype.setScrollLeft=function(){},ea.prototype.setScrollTop=function(){},ea.prototype.clear=function(){};function Mi(t,s){s||(s=qi(t));var F=t.display.barWidth,j=t.display.barHeight;No(t,s);for(var H=0;H<4&&F!=t.display.barWidth||j!=t.display.barHeight;H++)F!=t.display.barWidth&&t.options.lineWrapping&&_a(t),No(t,qi(t)),F=t.display.barWidth,j=t.display.barHeight}function No(t,s){var F=t.display,j=F.scrollbars.update(s);F.sizer.style.paddingRight=(F.barWidth=j.right)+"px",F.sizer.style.paddingBottom=(F.barHeight=j.bottom)+"px",F.heightForcer.style.borderBottom=j.bottom+"px solid transparent",j.right&&j.bottom?(F.scrollbarFiller.style.display="block",F.scrollbarFiller.style.height=j.bottom+"px",F.scrollbarFiller.style.width=j.right+"px"):F.scrollbarFiller.style.display="",j.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(F.gutterFiller.style.display="block",F.gutterFiller.style.height=j.bottom+"px",F.gutterFiller.style.width=s.gutterWidth+"px"):F.gutterFiller.style.display=""}var Mo={native:Si,null:ea};function jo(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&O(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Mo[t.options.scrollbarStyle](function(s){t.display.wrapper.insertBefore(s,t.display.scrollbarFiller),Re(s,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),s.setAttribute("cm-not-content","true")},function(s,F){F=="horizontal"?Ti(t,s):Zi(t,s)},t),t.display.scrollbars.addClass&&g(t.display.wrapper,t.display.scrollbars.addClass)}var Zs=0;function Ci(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.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:++Zs},bn(t.curOp)}function Oi(t){var s=t.curOp;s&&Ii(s,function(F){for(var j=0;j<F.ops.length;j++)F.ops[j].cm.curOp=null;el(F)})}function el(t){for(var s=t.ops,F=0;F<s.length;F++)tl(s[F]);for(var j=0;j<s.length;j++)rl(s[j]);for(var H=0;H<s.length;H++)nl(s[H]);for(var te=0;te<s.length;te++)il(s[te]);for(var de=0;de<s.length;de++)al(s[de])}function tl(t){var s=t.cm,F=s.display;sl(s),t.updateMaxLine&&Qr(s),t.mustUpdate=t.viewChanged||t.forceUpdate||t.scrollTop!=null||t.scrollToPos&&(t.scrollToPos.from.line<F.viewFrom||t.scrollToPos.to.line>=F.viewTo)||F.maxLineChanged&&s.options.lineWrapping,t.update=t.mustUpdate&&new wa(s,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function rl(t){t.updatedDisplay=t.mustUpdate&&Ja(t.cm,t.update)}function nl(t){var s=t.cm,F=s.display;t.updatedDisplay&&_a(s),t.barMeasure=qi(s),F.maxLineChanged&&!s.options.lineWrapping&&(t.adjustWidthTo=vr(s,F.maxLine,F.maxLine.text.length).left+3,s.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(F.scroller.clientWidth,F.sizer.offsetLeft+t.adjustWidthTo+mn(s)+s.display.barWidth),t.maxScrollLeft=Math.max(0,F.sizer.offsetLeft+t.adjustWidthTo-An(s))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=F.input.prepareSelection())}function il(t){var s=t.cm;t.adjustWidthTo!=null&&(s.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<s.doc.scrollLeft&&Ti(s,Math.min(s.display.scroller.scrollLeft,t.maxScrollLeft),!0),s.display.maxLineChanged=!1);var F=t.focus&&t.focus==k();t.preparedSelection&&s.display.input.showSelection(t.preparedSelection,F),(t.updatedDisplay||t.startHeight!=s.doc.height)&&Mi(s,t.barMeasure),t.updatedDisplay&&qa(s,t.barMeasure),t.selectionChanged&&Xa(s),s.state.focused&&t.updateInput&&s.display.input.reset(t.typing),F&&Io(t.cm)}function al(t){var s=t.cm,F=s.display,j=s.doc;if(t.updatedDisplay&&Uo(s,t.update),F.wheelStartX!=null&&(t.scrollTop!=null||t.scrollLeft!=null||t.scrollToPos)&&(F.wheelStartX=F.wheelStartY=null),t.scrollTop!=null&&Po(s,t.scrollTop,t.forceScroll),t.scrollLeft!=null&&Ti(s,t.scrollLeft,!0,!0),t.scrollToPos){var H=$s(s,Kt(j,t.scrollToPos.from),Kt(j,t.scrollToPos.to),t.scrollToPos.margin);Ys(s,H)}var te=t.maybeHiddenMarkers,de=t.maybeUnhiddenMarkers;if(te)for(var ve=0;ve<te.length;++ve)te[ve].lines.length||We(te[ve],"hide");if(de)for(var xe=0;xe<de.length;++xe)de[xe].lines.length&&We(de[xe],"unhide");F.wrapper.offsetHeight&&(j.scrollTop=s.display.scroller.scrollTop),t.changeObjs&&We(s,"changes",s,t.changeObjs),t.update&&t.update.finish()}function Xn(t,s){if(t.curOp)return s();Ci(t);try{return s()}finally{Oi(t)}}function _n(t,s){return function(){if(t.curOp)return s.apply(t,arguments);Ci(t);try{return s.apply(t,arguments)}finally{Oi(t)}}}function kn(t){return function(){if(this.curOp)return t.apply(this,arguments);Ci(this);try{return t.apply(this,arguments)}finally{Oi(this)}}}function En(t){return function(){var s=this.cm;if(!s||s.curOp)return t.apply(this,arguments);Ci(s);try{return t.apply(this,arguments)}finally{Oi(s)}}}function ta(t,s){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(s,S(ol,t))}function ol(t){var s=t.doc;if(s.highlightFrontier>=t.display.viewTo)return;var F=+new Date+t.options.workTime,j=Fe(t,s.highlightFrontier),H=[];s.iter(j.line,Math.min(s.first+s.size,t.display.viewTo+500),function(te){if(j.line>=t.display.viewFrom){var de=te.styles,ve=te.text.length>t.options.maxHighlightLength?jt(s.mode,j.state):null,xe=Ee(t,te,j,!0);ve&&(j.state=ve),te.styles=xe.styles;var Se=te.styleClasses,Ge=xe.classes;Ge?te.styleClasses=Ge:Se&&(te.styleClasses=null);for(var Ye=!de||de.length!=te.styles.length||Se!=Ge&&(!Se||!Ge||Se.bgClass!=Ge.bgClass||Se.textClass!=Ge.textClass),it=0;!Ye&&it<de.length;++it)Ye=de[it]!=te.styles[it];Ye&&H.push(j.line),te.stateAfter=j.save(),j.nextLine()}else te.text.length<=t.options.maxHighlightLength&&tt(t,te.text,j),te.stateAfter=j.line%5==0?j.save():null,j.nextLine();if(+new Date>F)return ta(t,t.options.workDelay),!0}),s.highlightFrontier=j.line,s.modeFrontier=Math.max(s.modeFrontier,j.line),H.length&&Xn(t,function(){for(var te=0;te<H.length;te++)di(t,H[te],"text")})}var wa=function(t,s,F){var j=t.display;this.viewport=s,this.visible=Ea(j,t.doc,s),this.editorIsHidden=!j.wrapper.offsetWidth,this.wrapperHeight=j.wrapper.clientHeight,this.wrapperWidth=j.wrapper.clientWidth,this.oldDisplayWidth=An(t),this.force=F,this.dims=Ka(t),this.events=[]};wa.prototype.signal=function(t,s){Ie(t,s)&&this.events.push(arguments)},wa.prototype.finish=function(){for(var t=0;t<this.events.length;t++)We.apply(null,this.events[t])};function sl(t){var s=t.display;!s.scrollbarsClipped&&s.scroller.offsetWidth&&(s.nativeBarWidth=s.scroller.offsetWidth-s.scroller.clientWidth,s.heightForcer.style.height=mn(t)+"px",s.sizer.style.marginBottom=-s.nativeBarWidth+"px",s.sizer.style.borderRightWidth=mn(t)+"px",s.scrollbarsClipped=!0)}function ll(t){if(t.hasFocus())return null;var s=k();if(!s||!u(t.display.lineDiv,s))return null;var F={activeElt:s};if(window.getSelection){var j=window.getSelection();j.anchorNode&&j.extend&&u(t.display.lineDiv,j.anchorNode)&&(F.anchorNode=j.anchorNode,F.anchorOffset=j.anchorOffset,F.focusNode=j.focusNode,F.focusOffset=j.focusOffset)}return F}function ul(t){if(!t||!t.activeElt||t.activeElt==k())return;if(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&u(document.body,t.anchorNode)&&u(document.body,t.focusNode)){var s=window.getSelection(),F=document.createRange();F.setEnd(t.anchorNode,t.anchorOffset),F.collapse(!1),s.removeAllRanges(),s.addRange(F),s.extend(t.focusNode,t.focusOffset)}}function Ja(t,s){var F=t.display,j=t.doc;if(s.editorIsHidden)return hi(t),!1;if(!s.force&&s.visible.from>=F.viewFrom&&s.visible.to<=F.viewTo&&(F.updateLineNumbers==null||F.updateLineNumbers>=F.viewTo)&&F.renderedView==F.view&&Oo(t)==0)return!1;Bo(t)&&(hi(t),s.dims=Ka(t));var H=j.first+j.size,te=Math.max(s.visible.from-t.options.viewportMargin,j.first),de=Math.min(H,s.visible.to+t.options.viewportMargin);F.viewFrom<te&&te-F.viewFrom<20&&(te=Math.max(j.first,F.viewFrom)),F.viewTo>de&&F.viewTo-de<20&&(de=Math.min(H,F.viewTo)),Pt&&(te=Dn(t.doc,te),de=hr(t.doc,de));var ve=te!=F.viewFrom||de!=F.viewTo||F.lastWrapHeight!=s.wrapperHeight||F.lastWrapWidth!=s.wrapperWidth;Xs(t,te,de),F.viewOffset=Dr(gt(t.doc,F.viewFrom)),t.display.mover.style.top=F.viewOffset+"px";var xe=Oo(t);if(!ve&&xe==0&&!s.force&&F.renderedView==F.view&&(F.updateLineNumbers==null||F.updateLineNumbers>=F.viewTo))return!1;var Se=ll(t);return xe>4&&(F.lineDiv.style.display="none"),cl(t,F.updateLineNumbers,s.dims),xe>4&&(F.lineDiv.style.display=""),F.renderedView=F.view,ul(Se),w(F.cursorDiv),w(F.selectionDiv),F.gutters.style.height=F.sizer.style.minHeight=0,ve&&(F.lastWrapHeight=s.wrapperHeight,F.lastWrapWidth=s.wrapperWidth,ta(t,400)),F.updateLineNumbers=null,!0}function Uo(t,s){for(var F=s.viewport,j=!0;;j=!1){if(!j||!t.options.lineWrapping||s.oldDisplayWidth==An(t)){if(F&&F.top!=null&&(F={top:Math.min(t.doc.height+Sn(t.display)-$n(t),F.top)}),s.visible=Ea(t.display,t.doc,F),s.visible.from>=t.display.viewFrom&&s.visible.to<=t.display.viewTo)break}else j&&(s.visible=Ea(t.display,t.doc,F));if(!Ja(t,s))break;_a(t);var H=qi(t);Ji(t),Mi(t,H),qa(t,H),s.force=!1}s.signal(t,"update",t),(t.display.viewFrom!=t.display.reportedViewFrom||t.display.viewTo!=t.display.reportedViewTo)&&(s.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function Qa(t,s){var F=new wa(t,s);if(Ja(t,F)){_a(t),Uo(t,F);var j=qi(t);Ji(t),Mi(t,j),qa(t,j),F.finish()}}function cl(t,s,F){var j=t.display,H=t.options.lineNumbers,te=j.lineDiv,de=te.firstChild;function ve(vt){var Et=vt.nextSibling;return e&&y&&t.display.currentWheelTarget==vt?vt.style.display="none":vt.parentNode.removeChild(vt),Et}for(var xe=j.view,Se=j.viewFrom,Ge=0;Ge<xe.length;Ge++){var Ye=xe[Ge];if(!Ye.hidden)if(!Ye.node||Ye.node.parentNode!=te){var it=Hr(t,Ye,Se,F);te.insertBefore(it,de)}else{for(;de!=Ye.node;)de=ve(de);var et=H&&s!=null&&s<=Se&&Ye.lineNumber;Ye.changes&&(q(Ye.changes,"gutter")>-1&&(et=!1),bi(t,Ye,Se,F)),et&&(w(Ye.lineNumber),Ye.lineNumber.appendChild(document.createTextNode(zt(t.options,Se)))),de=Ye.node.nextSibling}Se+=Ye.size}for(;de;)de=ve(de)}function Za(t){var s=t.gutters.offsetWidth;t.sizer.style.marginLeft=s+"px"}function qa(t,s){t.display.sizer.style.minHeight=s.docHeight+"px",t.display.heightForcer.style.top=s.docHeight+"px",t.display.gutters.style.height=s.docHeight+t.display.barHeight+mn(t)+"px"}function Fo(t){var s=t.display,F=s.view;if(!s.alignWidgets&&(!s.gutters.firstChild||!t.options.fixedGutter))return;for(var j=Ga(s)-s.scroller.scrollLeft+t.doc.scrollLeft,H=s.gutters.offsetWidth,te=j+"px",de=0;de<F.length;de++)if(!F[de].hidden){t.options.fixedGutter&&(F[de].gutter&&(F[de].gutter.style.left=te),F[de].gutterBackground&&(F[de].gutterBackground.style.left=te));var ve=F[de].alignable;if(ve)for(var xe=0;xe<ve.length;xe++)ve[xe].style.left=te}t.options.fixedGutter&&(s.gutters.style.left=j+H+"px")}function Bo(t){if(!t.options.lineNumbers)return!1;var s=t.doc,F=zt(t.options,s.first+s.size-1),j=t.display;if(F.length!=j.lineNumChars){var H=j.measure.appendChild(A("div",[A("div",F)],"CodeMirror-linenumber CodeMirror-gutter-elt")),te=H.firstChild.offsetWidth,de=H.offsetWidth-te;return j.lineGutter.style.width="",j.lineNumInnerWidth=Math.max(te,j.lineGutter.offsetWidth-de)+1,j.lineNumWidth=j.lineNumInnerWidth+de,j.lineNumChars=j.lineNumInnerWidth?F.length:-1,j.lineGutter.style.width=j.lineNumWidth+"px",Za(t.display),!0}return!1}function eo(t,s){for(var F=[],j=!1,H=0;H<t.length;H++){var te=t[H],de=null;if(typeof te!="string"&&(de=te.style,te=te.className),te=="CodeMirror-linenumbers")if(s)j=!0;else continue;F.push({className:te,style:de})}return s&&!j&&F.push({className:"CodeMirror-linenumbers",style:null}),F}function Wo(t){var s=t.gutters,F=t.gutterSpecs;w(s),t.lineGutter=null;for(var j=0;j<F.length;++j){var H=F[j],te=H.className,de=H.style,ve=s.appendChild(A("div",null,"CodeMirror-gutter "+te));de&&(ve.style.cssText=de),te=="CodeMirror-linenumbers"&&(t.lineGutter=ve,ve.style.width=(t.lineNumWidth||1)+"px")}s.style.display=F.length?"":"none",Za(t)}function ra(t){Wo(t.display),Un(t),Fo(t)}function dl(t,s,F,j){var H=this;this.input=F,H.scrollbarFiller=A("div",null,"CodeMirror-scrollbar-filler"),H.scrollbarFiller.setAttribute("cm-not-content","true"),H.gutterFiller=A("div",null,"CodeMirror-gutter-filler"),H.gutterFiller.setAttribute("cm-not-content","true"),H.lineDiv=P("div",null,"CodeMirror-code"),H.selectionDiv=A("div",null,null,"position: relative; z-index: 1"),H.cursorDiv=A("div",null,"CodeMirror-cursors"),H.measure=A("div",null,"CodeMirror-measure"),H.lineMeasure=A("div",null,"CodeMirror-measure"),H.lineSpace=P("div",[H.measure,H.lineMeasure,H.selectionDiv,H.cursorDiv,H.lineDiv],null,"position: relative; outline: none");var te=P("div",[H.lineSpace],"CodeMirror-lines");H.mover=A("div",[te],null,"position: relative"),H.sizer=A("div",[H.mover],"CodeMirror-sizer"),H.sizerWidth=null,H.heightForcer=A("div",null,null,"position: absolute; height: "+$+"px; width: 1px;"),H.gutters=A("div",null,"CodeMirror-gutters"),H.lineGutter=null,H.scroller=A("div",[H.sizer,H.heightForcer,H.gutters],"CodeMirror-scroll"),H.scroller.setAttribute("tabIndex","-1"),H.wrapper=A("div",[H.scrollbarFiller,H.gutterFiller,H.scroller],"CodeMirror"),i&&T<8&&(H.gutters.style.zIndex=-1,H.scroller.style.paddingRight=0),!e&&!(G&&f)&&(H.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(H.wrapper):t(H.wrapper)),H.viewFrom=H.viewTo=s.first,H.reportedViewFrom=H.reportedViewTo=s.first,H.view=[],H.renderedView=null,H.externalMeasured=null,H.viewOffset=0,H.lastWrapHeight=H.lastWrapWidth=0,H.updateLineNumbers=null,H.nativeBarWidth=H.barHeight=H.barWidth=0,H.scrollbarsClipped=!1,H.lineNumWidth=H.lineNumInnerWidth=H.lineNumChars=null,H.alignWidgets=!1,H.cachedCharWidth=H.cachedTextHeight=H.cachedPaddingH=null,H.maxLine=null,H.maxLineLength=0,H.maxLineChanged=!1,H.wheelDX=H.wheelDY=H.wheelStartX=H.wheelStartY=null,H.shift=!1,H.selForContextMenu=null,H.activeTouch=null,H.gutterSpecs=eo(j.gutters,j.lineNumbers),Wo(H),F.init(H)}var Ta=0,Qn=null;i?Qn=-.53:G?Qn=15:l?Qn=-.7:r&&(Qn=-1/3);function Ho(t){var s=t.wheelDeltaX,F=t.wheelDeltaY;return s==null&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(s=t.detail),F==null&&t.detail&&t.axis==t.VERTICAL_AXIS?F=t.detail:F==null&&(F=t.wheelDelta),{x:s,y:F}}function hl(t){var s=Ho(t);return s.x*=Qn,s.y*=Qn,s}function Ko(t,s){var F=Ho(s),j=F.x,H=F.y,te=t.display,de=te.scroller,ve=de.scrollWidth>de.clientWidth,xe=de.scrollHeight>de.clientHeight;if(!(j&&ve||H&&xe))return;if(H&&y&&e){e:for(var Se=s.target,Ge=te.view;Se!=de;Se=Se.parentNode)for(var Ye=0;Ye<Ge.length;Ye++)if(Ge[Ye].node==Se){t.display.currentWheelTarget=Se;break e}}if(j&&!G&&!_&&Qn!=null){H&&xe&&Zi(t,Math.max(0,de.scrollTop+H*Qn)),Ti(t,Math.max(0,de.scrollLeft+j*Qn)),(!H||H&&xe)&&we(s),te.wheelStartX=null;return}if(H&&Qn!=null){var it=H*Qn,et=t.doc.scrollTop,vt=et+te.wrapper.clientHeight;it<0?et=Math.max(0,et+it-50):vt=Math.min(t.doc.height,vt+it+50),Qa(t,{top:et,bottom:vt})}Ta<20&&(te.wheelStartX==null?(te.wheelStartX=de.scrollLeft,te.wheelStartY=de.scrollTop,te.wheelDX=j,te.wheelDY=H,setTimeout(function(){if(te.wheelStartX==null)return;var Et=de.scrollLeft-te.wheelStartX,At=de.scrollTop-te.wheelStartY,Nt=At&&te.wheelDY&&At/te.wheelDY||Et&&te.wheelDX&&Et/te.wheelDX;if(te.wheelStartX=te.wheelStartY=null,!Nt)return;Qn=(Qn*Ta+Nt)/(Ta+1),++Ta},200)):(te.wheelDX+=j,te.wheelDY+=H))}var Zn=function(t,s){this.ranges=t,this.primIndex=s};Zn.prototype.primary=function(){return this.ranges[this.primIndex]},Zn.prototype.equals=function(t){if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var s=0;s<this.ranges.length;s++){var F=this.ranges[s],j=t.ranges[s];if(!Ct(F.anchor,j.anchor)||!Ct(F.head,j.head))return!1}return!0},Zn.prototype.deepCopy=function(){for(var t=[],s=0;s<this.ranges.length;s++)t[s]=new Mr(Dt(this.ranges[s].anchor),Dt(this.ranges[s].head));return new Zn(t,this.primIndex)},Zn.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},Zn.prototype.contains=function(t,s){s||(s=t);for(var F=0;F<this.ranges.length;F++){var j=this.ranges[F];if(pt(s,j.from())>=0&&pt(t,j.to())<=0)return F}return-1};var Mr=function(t,s){this.anchor=t,this.head=s};Mr.prototype.from=function(){return tr(this.anchor,this.head)},Mr.prototype.to=function(){return Tt(this.anchor,this.head)},Mr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ri(t,s,F){var j=t&&t.options.selectionsMayTouch,H=s[F];s.sort(function(it,et){return pt(it.from(),et.from())}),F=q(s,H);for(var te=1;te<s.length;te++){var de=s[te],ve=s[te-1],xe=pt(ve.to(),de.from());if(j&&!de.empty()?xe>0:xe>=0){var Se=tr(ve.from(),de.from()),Ge=Tt(ve.to(),de.to()),Ye=ve.empty()?de.from()==de.head:ve.from()==ve.head;te<=F&&--F,s.splice(--te,2,new Mr(Ye?Ge:Se,Ye?Se:Ge))}}return new Zn(s,F)}function fi(t,s){return new Zn([new Mr(t,s||t)],0)}function pi(t){return t.text?st(t.from.line+t.text.length-1,_e(t.text).length+(t.text.length==1?t.from.ch:0)):t.to}function Go(t,s){if(pt(t,s.from)<0)return t;if(pt(t,s.to)<=0)return pi(s);var F=t.line+s.text.length-(s.to.line-s.from.line)-1,j=t.ch;return t.line==s.to.line&&(j+=pi(s).ch-s.to.ch),st(F,j)}function to(t,s){for(var F=[],j=0;j<t.sel.ranges.length;j++){var H=t.sel.ranges[j];F.push(new Mr(Go(H.anchor,s),Go(H.head,s)))}return ri(t.cm,F,t.sel.primIndex)}function zo(t,s,F){return t.line==s.line?st(F.line,t.ch-s.ch+F.ch):st(F.line+(t.line-s.line),t.ch)}function fl(t,s,F){for(var j=[],H=st(t.first,0),te=H,de=0;de<s.length;de++){var ve=s[de],xe=zo(ve.from,H,te),Se=zo(pi(ve),H,te);if(H=ve.to,te=Se,F=="around"){var Ge=t.sel.ranges[de],Ye=pt(Ge.head,Ge.anchor)<0;j[de]=new Mr(Ye?Se:xe,Ye?xe:Se)}else j[de]=new Mr(xe,xe)}return new Zn(j,t.sel.primIndex)}function ro(t){t.doc.mode=wt(t.options,t.doc.modeOption),na(t)}function na(t){t.doc.iter(function(s){s.stateAfter&&(s.stateAfter=null),s.styles&&(s.styles=null)}),t.doc.modeFrontier=t.doc.highlightFrontier=t.doc.first,ta(t,100),t.state.modeGen++,t.curOp&&Un(t)}function Xo(t,s){return s.from.ch==0&&s.to.ch==0&&_e(s.text)==""&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function no(t,s,F,j){function H(Gt){return F?F[Gt]:null}function te(Gt,Mt,Vt){kr(Gt,Mt,Vt,j),Zr(Gt,"change",Gt,s)}function de(Gt,Mt){for(var Vt=[],or=Gt;or<Mt;++or)Vt.push(new cn(Se[or],H(or),j));return Vt}var ve=s.from,xe=s.to,Se=s.text,Ge=gt(t,ve.line),Ye=gt(t,xe.line),it=_e(Se),et=H(Se.length-1),vt=xe.line-ve.line;if(s.full)t.insert(0,de(0,Se.length)),t.remove(Se.length,t.size-Se.length);else if(Xo(t,s)){var Et=de(0,Se.length-1);te(Ye,Ye.text,et),vt&&t.remove(ve.line,vt),Et.length&&t.insert(ve.line,Et)}else if(Ge==Ye)if(Se.length==1)te(Ge,Ge.text.slice(0,ve.ch)+it+Ge.text.slice(xe.ch),et);else{var At=de(1,Se.length-1);At.push(new cn(it+Ge.text.slice(xe.ch),et,j)),te(Ge,Ge.text.slice(0,ve.ch)+Se[0],H(0)),t.insert(ve.line+1,At)}else if(Se.length==1)te(Ge,Ge.text.slice(0,ve.ch)+Se[0]+Ye.text.slice(xe.ch),H(0)),t.remove(ve.line+1,vt);else{te(Ge,Ge.text.slice(0,ve.ch)+Se[0],H(0)),te(Ye,it+Ye.text.slice(xe.ch),et);var Nt=de(1,Se.length-1);vt>1&&t.remove(ve.line+1,vt-1),t.insert(ve.line+1,Nt)}Zr(t,"change",t,s)}function mi(t,s,F){function j(H,te,de){if(H.linked)for(var ve=0;ve<H.linked.length;++ve){var xe=H.linked[ve];if(xe.doc==te)continue;var Se=de&&xe.sharedHist;if(F&&!Se)continue;s(xe.doc,Se),j(xe.doc,H,Se)}}j(t,null,!0)}function Vo(t,s){if(s.cm)throw new Error("This document is already in use.");t.doc=s,s.cm=t,za(t),ro(t),Yo(t),t.options.lineWrapping||Qr(t),t.options.mode=s.modeOption,Un(t)}function Yo(t){(t.doc.direction=="rtl"?g:O)(t.display.lineDiv,"CodeMirror-rtl")}function pl(t){Xn(t,function(){Yo(t),Un(t)})}function Sa(t){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=t||1}function io(t,s){var F={from:Dt(s.from),to:pi(s),text:Ut(t,s.from,s.to)};return Qo(t,F,s.from.line,s.to.line+1),mi(t,function(j){return Qo(j,F,s.from.line,s.to.line+1)},!0),F}function $o(t){for(;t.length;){var s=_e(t);if(s.ranges)t.pop();else break}}function ml(t,s){if(s)return $o(t.done),_e(t.done);if(t.done.length&&!_e(t.done).ranges)return _e(t.done);if(t.done.length>1&&!t.done[t.done.length-2].ranges)return t.done.pop(),_e(t.done)}function Jo(t,s,F,j){var H=t.history;H.undone.length=0;var te=+new Date,de,ve;if((H.lastOp==j||H.lastOrigin==s.origin&&s.origin&&(s.origin.charAt(0)=="+"&&H.lastModTime>te-(t.cm?t.cm.options.historyEventDelay:500)||s.origin.charAt(0)=="*"))&&(de=ml(H,H.lastOp==j)))ve=_e(de.changes),pt(s.from,s.to)==0&&pt(s.from,ve.to)==0?ve.to=pi(s):de.changes.push(io(t,s));else{var xe=_e(H.done);for((!xe||!xe.ranges)&&Ca(t.sel,H.done),de={changes:[io(t,s)],generation:H.generation},H.done.push(de);H.done.length>H.undoDepth;)H.done.shift(),H.done[0].ranges||H.done.shift()}H.done.push(F),H.generation=++H.maxGeneration,H.lastModTime=H.lastSelTime=te,H.lastOp=H.lastSelOp=j,H.lastOrigin=H.lastSelOrigin=s.origin,ve||We(t,"historyAdded")}function gl(t,s,F,j){var H=s.charAt(0);return H=="*"||H=="+"&&F.ranges.length==j.ranges.length&&F.somethingSelected()==j.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function vl(t,s,F,j){var H=t.history,te=j&&j.origin;F==H.lastSelOp||te&&H.lastSelOrigin==te&&(H.lastModTime==H.lastSelTime&&H.lastOrigin==te||gl(t,te,_e(H.done),s))?H.done[H.done.length-1]=s:Ca(s,H.done),H.lastSelTime=+new Date,H.lastSelOrigin=te,H.lastSelOp=F,j&&j.clearRedo!==!1&&$o(H.undone)}function Ca(t,s){var F=_e(s);F&&F.ranges&&F.equals(t)||s.push(t)}function Qo(t,s,F,j){var H=s["spans_"+t.id],te=0;t.iter(Math.max(t.first,F),Math.min(t.first+t.size,j),function(de){de.markedSpans&&((H||(H=s["spans_"+t.id]={}))[te]=de.markedSpans),++te})}function yl(t){if(!t)return null;for(var s,F=0;F<t.length;++F)t[F].marker.explicitlyCleared?s||(s=t.slice(0,F)):s&&s.push(t[F]);return s?s.length?s:null:t}function bl(t,s){var F=s["spans_"+t.id];if(!F)return null;for(var j=[],H=0;H<s.text.length;++H)j.push(yl(F[H]));return j}function Zo(t,s){var F=bl(t,s),j=pn(t,s);if(!F)return j;if(!j)return F;for(var H=0;H<F.length;++H){var te=F[H],de=j[H];if(te&&de){e:for(var ve=0;ve<de.length;++ve){for(var xe=de[ve],Se=0;Se<te.length;++Se)if(te[Se].marker==xe.marker)continue e;te.push(xe)}}else de&&(F[H]=de)}return F}function ji(t,s,F){for(var j=[],H=0;H<t.length;++H){var te=t[H];if(te.ranges){j.push(F?Zn.prototype.deepCopy.call(te):te);continue}var de=te.changes,ve=[];j.push({changes:ve});for(var xe=0;xe<de.length;++xe){var Se=de[xe],Ge=void 0;if(ve.push({from:Se.from,to:Se.to,text:Se.text}),s)for(var Ye in Se)(Ge=Ye.match(/^spans_(\d+)$/))&&(q(s,Number(Ge[1]))>-1&&(_e(ve)[Ye]=Se[Ye],delete Se[Ye]))}}return j}function ao(t,s,F,j){if(j){var H=t.anchor;if(F){var te=pt(s,H)<0;te!=pt(F,H)<0?(H=s,s=F):te!=pt(s,F)<0&&(s=F)}return new Mr(H,s)}else return new Mr(F||s,s)}function Oa(t,s,F,j,H){H==null&&(H=t.cm&&(t.cm.display.shift||t.extend)),Rn(t,new Zn([ao(t.sel.primary(),s,F,H)],0),j)}function qo(t,s,F){for(var j=[],H=t.cm&&(t.cm.display.shift||t.extend),te=0;te<t.sel.ranges.length;te++)j[te]=ao(t.sel.ranges[te],s[te],null,H);var de=ri(t.cm,j,t.sel.primIndex);Rn(t,de,F)}function oo(t,s,F,j){var H=t.sel.ranges.slice(0);H[s]=F,Rn(t,ri(t.cm,H,t.sel.primIndex),j)}function es(t,s,F,j){Rn(t,fi(s,F),j)}function _l(t,s,F){var j={ranges:s.ranges,update:function(H){this.ranges=[];for(var te=0;te<H.length;te++)this.ranges[te]=new Mr(Kt(t,H[te].anchor),Kt(t,H[te].head))},origin:F&&F.origin};return We(t,"beforeSelectionChange",t,j),t.cm&&We(t.cm,"beforeSelectionChange",t.cm,j),j.ranges!=s.ranges?ri(t.cm,j.ranges,j.ranges.length-1):s}function ts(t,s,F){var j=t.history.done,H=_e(j);H&&H.ranges?(j[j.length-1]=s,Aa(t,s,F)):Rn(t,s,F)}function Rn(t,s,F){Aa(t,s,F),vl(t,t.sel,t.cm?t.cm.curOp.id:NaN,F)}function Aa(t,s,F){(Ie(t,"beforeSelectionChange")||t.cm&&Ie(t.cm,"beforeSelectionChange"))&&(s=_l(t,s,F));var j=F&&F.bias||(pt(s.primary().head,t.sel.primary().head)<0?-1:1);rs(t,is(t,s,j,!0)),!(F&&F.scroll===!1)&&t.cm&&Ni(t.cm)}function rs(t,s){if(s.equals(t.sel))return;t.sel=s,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,Me(t.cm)),Zr(t,"cursorActivity",t)}function ns(t){rs(t,is(t,t.sel,null,!1))}function is(t,s,F,j){for(var H,te=0;te<s.ranges.length;te++){var de=s.ranges[te],ve=s.ranges.length==t.sel.ranges.length&&t.sel.ranges[te],xe=Ra(t,de.anchor,ve&&ve.anchor,F,j),Se=Ra(t,de.head,ve&&ve.head,F,j);(H||xe!=de.anchor||Se!=de.head)&&(H||(H=s.ranges.slice(0,te)),H[te]=new Mr(xe,Se))}return H?ri(t.cm,H,s.primIndex):s}function Ui(t,s,F,j,H){var te=gt(t,s.line);if(te.markedSpans)for(var de=0;de<te.markedSpans.length;++de){var ve=te.markedSpans[de],xe=ve.marker,Se="selectLeft"in xe?!xe.selectLeft:xe.inclusiveLeft,Ge="selectRight"in xe?!xe.selectRight:xe.inclusiveRight;if((ve.from==null||(Se?ve.from<=s.ch:ve.from<s.ch))&&(ve.to==null||(Ge?ve.to>=s.ch:ve.to>s.ch))){if(H&&(We(xe,"beforeCursorEnter"),xe.explicitlyCleared))if(te.markedSpans){--de;continue}else break;if(!xe.atomic)continue;if(F){var Ye=xe.find(j<0?1:-1),it=void 0;if((j<0?Ge:Se)&&(Ye=as(t,Ye,-j,Ye&&Ye.line==s.line?te:null)),Ye&&Ye.line==s.line&&(it=pt(Ye,F))&&(j<0?it<0:it>0))return Ui(t,Ye,s,j,H)}var et=xe.find(j<0?-1:1);return(j<0?Se:Ge)&&(et=as(t,et,j,et.line==s.line?te:null)),et?Ui(t,et,s,j,H):null}}return s}function Ra(t,s,F,j,H){var te=j||1,de=Ui(t,s,F,te,H)||!H&&Ui(t,s,F,te,!0)||Ui(t,s,F,-te,H)||!H&&Ui(t,s,F,-te,!0);return de||(t.cantEdit=!0,st(t.first,0))}function as(t,s,F,j){return F<0&&s.ch==0?s.line>t.first?Kt(t,st(s.line-1)):null:F>0&&s.ch==(j||gt(t,s.line)).text.length?s.line<t.first+t.size-1?st(s.line+1,0):null:new st(s.line,s.ch+F)}function os(t){t.setSelection(st(t.firstLine(),0),st(t.lastLine()),ce)}function ss(t,s,F){var j={canceled:!1,from:s.from,to:s.to,text:s.text,origin:s.origin,cancel:function(){return j.canceled=!0}};return F&&(j.update=function(H,te,de,ve){H&&(j.from=Kt(t,H)),te&&(j.to=Kt(t,te)),de&&(j.text=de),ve!==void 0&&(j.origin=ve)}),We(t,"beforeChange",t,j),t.cm&&We(t.cm,"beforeChange",t.cm,j),j.canceled?(t.cm&&(t.cm.curOp.updateInput=2),null):{from:j.from,to:j.to,text:j.text,origin:j.origin}}function Fi(t,s,F){if(t.cm){if(!t.cm.curOp)return _n(t.cm,Fi)(t,s,F);if(t.cm.state.suppressEdits)return}if((Ie(t,"beforeChange")||t.cm&&Ie(t.cm,"beforeChange"))&&(s=ss(t,s,!0),!s))return;var j=fr&&!F&&Nn(t,s.from,s.to);if(j)for(var H=j.length-1;H>=0;--H)ls(t,{from:j[H].from,to:j[H].to,text:H?[""]:s.text,origin:s.origin});else ls(t,s)}function ls(t,s){if(s.text.length==1&&s.text[0]==""&&pt(s.from,s.to)==0)return;var F=to(t,s);Jo(t,s,F,t.cm?t.cm.curOp.id:NaN),ia(t,s,F,pn(t,s));var j=[];mi(t,function(H,te){!te&&q(j,H.history)==-1&&(hs(H.history,s),j.push(H.history)),ia(H,s,null,pn(H,s))})}function Ia(t,s,F){var j=t.cm&&t.cm.state.suppressEdits;if(j&&!F)return;for(var H=t.history,te,de=t.sel,ve=s=="undo"?H.done:H.undone,xe=s=="undo"?H.undone:H.done,Se=0;Se<ve.length&&!(te=ve[Se],F?te.ranges&&!te.equals(t.sel):!te.ranges);Se++);if(Se==ve.length)return;for(H.lastOrigin=H.lastSelOrigin=null;;)if(te=ve.pop(),te.ranges){if(Ca(te,xe),F&&!te.equals(t.sel)){Rn(t,te,{clearRedo:!1});return}de=te}else if(j){ve.push(te);return}else break;var Ge=[];Ca(de,xe),xe.push({changes:Ge,generation:H.generation}),H.generation=te.generation||++H.maxGeneration;for(var Ye=Ie(t,"beforeChange")||t.cm&&Ie(t.cm,"beforeChange"),it=function(Et){var At=te.changes[Et];if(At.origin=s,Ye&&!ss(t,At,!1))return ve.length=0,{};Ge.push(io(t,At));var Nt=Et?to(t,At):_e(ve);ia(t,At,Nt,Zo(t,At)),!Et&&t.cm&&t.cm.scrollIntoView({from:At.from,to:pi(At)});var Gt=[];mi(t,function(Mt,Vt){!Vt&&q(Gt,Mt.history)==-1&&(hs(Mt.history,At),Gt.push(Mt.history)),ia(Mt,At,null,Zo(Mt,At))})},et=te.changes.length-1;et>=0;--et){var vt=it(et);if(vt)return vt.v}}function us(t,s){if(s==0)return;if(t.first+=s,t.sel=new Zn(De(t.sel.ranges,function(H){return new Mr(st(H.anchor.line+s,H.anchor.ch),st(H.head.line+s,H.head.ch))}),t.sel.primIndex),t.cm){Un(t.cm,t.first,t.first-s,s);for(var F=t.cm.display,j=F.viewFrom;j<F.viewTo;j++)di(t.cm,j,"gutter")}}function ia(t,s,F,j){if(t.cm&&!t.cm.curOp)return _n(t.cm,ia)(t,s,F,j);if(s.to.line<t.first){us(t,s.text.length-1-(s.to.line-s.from.line));return}if(s.from.line>t.lastLine())return;if(s.from.line<t.first){var H=s.text.length-1-(t.first-s.from.line);us(t,H),s={from:st(t.first,0),to:st(s.to.line+H,s.to.ch),text:[_e(s.text)],origin:s.origin}}var te=t.lastLine();s.to.line>te&&(s={from:s.from,to:st(te,gt(t,te).text.length),text:[s.text[0]],origin:s.origin}),s.removed=Ut(t,s.from,s.to),F||(F=to(t,s)),t.cm?El(t.cm,s,j):no(t,s,j),Aa(t,F,ce),t.cantEdit&&Ra(t,st(t.firstLine(),0))&&(t.cantEdit=!1)}function El(t,s,F){var j=t.doc,H=t.display,te=s.from,de=s.to,ve=!1,xe=te.line;t.options.lineWrapping||(xe=St(Vr(gt(j,te.line))),j.iter(xe,de.line+1,function(et){if(et==H.maxLine)return ve=!0,!0})),j.sel.contains(s.from,s.to)>-1&&Me(t),no(j,s,F,Co(t)),t.options.lineWrapping||(j.iter(xe,te.line+s.text.length,function(et){var vt=Jr(et);vt>H.maxLineLength&&(H.maxLine=et,H.maxLineLength=vt,H.maxLineChanged=!0,ve=!1)}),ve&&(t.curOp.updateMaxLine=!0)),ur(j,te.line),ta(t,400);var Se=s.text.length-(de.line-te.line)-1;s.full?Un(t):te.line==de.line&&s.text.length==1&&!Xo(t.doc,s)?di(t,te.line,"text"):Un(t,te.line,de.line+1,Se);var Ge=Ie(t,"changes"),Ye=Ie(t,"change");if(Ye||Ge){var it={from:te,to:de,text:s.text,removed:s.removed,origin:s.origin};Ye&&Zr(t,"change",t,it),Ge&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(it)}t.display.selForContextMenu=null}function Bi(t,s,F,j,H){var te;j||(j=F),pt(j,F)<0&&(te=[j,F],F=te[0],j=te[1]),typeof s=="string"&&(s=t.splitLines(s)),Fi(t,{from:F,to:j,text:s,origin:H})}function cs(t,s,F,j){F<t.line?t.line+=j:s<t.line&&(t.line=s,t.ch=0)}function ds(t,s,F,j){for(var H=0;H<t.length;++H){var te=t[H],de=!0;if(te.ranges){te.copied||(te=t[H]=te.deepCopy(),te.copied=!0);for(var ve=0;ve<te.ranges.length;ve++)cs(te.ranges[ve].anchor,s,F,j),cs(te.ranges[ve].head,s,F,j);continue}for(var xe=0;xe<te.changes.length;++xe){var Se=te.changes[xe];if(F<Se.from.line)Se.from=st(Se.from.line+j,Se.from.ch),Se.to=st(Se.to.line+j,Se.to.ch);else if(s<=Se.to.line){de=!1;break}}de||(t.splice(0,H+1),H=0)}}function hs(t,s){var F=s.from.line,j=s.to.line,H=s.text.length-(j-F)-1;ds(t.done,F,j,H),ds(t.undone,F,j,H)}function aa(t,s,F,j){var H=s,te=s;return typeof s=="number"?te=gt(t,yr(t,s)):H=St(s),H==null?null:(j(te,H)&&t.cm&&di(t.cm,H,F),te)}function oa(t){this.lines=t,this.parent=null;for(var s=0,F=0;F<t.length;++F)t[F].parent=this,s+=t[F].height;this.height=s}oa.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,s){for(var F=t,j=t+s;F<j;++F){var H=this.lines[F];this.height-=H.height,Yt(H),Zr(H,"delete")}this.lines.splice(t,s)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,s,F){this.height+=F,this.lines=this.lines.slice(0,t).concat(s).concat(this.lines.slice(t));for(var j=0;j<s.length;++j)s[j].parent=this},iterN:function(t,s,F){for(var j=t+s;t<j;++t)if(F(this.lines[t]))return!0}};function sa(t){this.children=t;for(var s=0,F=0,j=0;j<t.length;++j){var H=t[j];s+=H.chunkSize(),F+=H.height,H.parent=this}this.size=s,this.height=F,this.parent=null}sa.prototype={chunkSize:function(){return this.size},removeInner:function(t,s){this.size-=s;for(var F=0;F<this.children.length;++F){var j=this.children[F],H=j.chunkSize();if(t<H){var te=Math.min(s,H-t),de=j.height;if(j.removeInner(t,te),this.height-=de-j.height,H==te&&(this.children.splice(F--,1),j.parent=null),(s-=te)==0)break;t=0}else t-=H}if(this.size-s<25&&(this.children.length>1||!(this.children[0]instanceof oa))){var ve=[];this.collapse(ve),this.children=[new oa(ve)],this.children[0].parent=this}},collapse:function(t){for(var s=0;s<this.children.length;++s)this.children[s].collapse(t)},insertInner:function(t,s,F){this.size+=s.length,this.height+=F;for(var j=0;j<this.children.length;++j){var H=this.children[j],te=H.chunkSize();if(t<=te){if(H.insertInner(t,s,F),H.lines&&H.lines.length>50){for(var de=H.lines.length%25+25,ve=de;ve<H.lines.length;){var xe=new oa(H.lines.slice(ve,ve+=25));H.height-=xe.height,this.children.splice(++j,0,xe),xe.parent=this}H.lines=H.lines.slice(0,de),this.maybeSpill()}break}t-=te}},maybeSpill:function(){if(this.children.length<=10)return;var t=this;do{var s=t.children.splice(t.children.length-5,5),F=new sa(s);if(t.parent){t.size-=F.size,t.height-=F.height;var H=q(t.parent.children,t);t.parent.children.splice(H+1,0,F)}else{var j=new sa(t.children);j.parent=t,t.children=[j,F],t=j}F.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()},iterN:function(t,s,F){for(var j=0;j<this.children.length;++j){var H=this.children[j],te=H.chunkSize();if(t<te){var de=Math.min(s,te-t);if(H.iterN(t,de,F))return!0;if((s-=de)==0)break;t=0}else t-=te}}};var la=function(t,s,F){if(F)for(var j in F)F.hasOwnProperty(j)&&(this[j]=F[j]);this.doc=t,this.node=s};la.prototype.clear=function(){var t=this.doc.cm,s=this.line.widgets,F=this.line,j=St(F);if(j==null||!s)return;for(var H=0;H<s.length;++H)s[H]==this&&s.splice(H--,1);s.length||(F.widgets=null);var te=sn(this);It(F,Math.max(0,F.height-te)),t&&(Xn(t,function(){fs(t,F,-te),di(t,j,"widget")}),Zr(t,"lineWidgetCleared",t,this,j))},la.prototype.changed=function(){var t=this,s=this.height,F=this.doc.cm,j=this.line;this.height=null;var H=sn(this)-s;if(!H)return;rr(this.doc,j)||It(j,j.height+H),F&&Xn(F,function(){F.curOp.forceUpdate=!0,fs(F,j,H),Zr(F,"lineWidgetChanged",F,t,St(j))})},Be(la);function fs(t,s,F){Dr(s)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&$a(t,F)}function xl(t,s,F,j){var H=new la(t,F,j),te=t.cm;return te&&H.noHScroll&&(te.display.alignWidgets=!0),aa(t,s,"widget",function(de){var ve=de.widgets||(de.widgets=[]);if(H.insertAt==null?ve.push(H):ve.splice(Math.min(ve.length-1,Math.max(0,H.insertAt)),0,H),H.line=de,te&&!rr(t,de)){var xe=Dr(de)<t.scrollTop;It(de,de.height+sn(H)),xe&&$a(te,H.height),te.curOp.forceUpdate=!0}return!0}),te&&Zr(te,"lineWidgetAdded",te,H,typeof s=="number"?s:St(s)),H}var ps=0,gi=function(t,s){this.lines=[],this.type=s,this.doc=t,this.id=++ps};gi.prototype.clear=function(){if(this.explicitlyCleared)return;var t=this.doc.cm,s=t&&!t.curOp;if(s&&Ci(t),Ie(this,"clear")){var F=this.find();F&&Zr(this,"clear",F.from,F.to)}for(var j=null,H=null,te=0;te<this.lines.length;++te){var de=this.lines[te],ve=$t(de.markedSpans,this);t&&!this.collapsed?di(t,St(de),"text"):t&&(ve.to!=null&&(H=St(de)),ve.from!=null&&(j=St(de))),de.markedSpans=$r(de.markedSpans,ve),ve.from==null&&this.collapsed&&!rr(this.doc,de)&&t&&It(de,Li(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var xe=0;xe<this.lines.length;++xe){var Se=Vr(this.lines[xe]),Ge=Jr(Se);Ge>t.display.maxLineLength&&(t.display.maxLine=Se,t.display.maxLineLength=Ge,t.display.maxLineChanged=!0)}j!=null&&t&&this.collapsed&&Un(t,j,H+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&ns(t.doc)),t&&Zr(t,"markerCleared",t,this,j,H),s&&Oi(t),this.parent&&this.parent.clear()},gi.prototype.find=function(t,s){t==null&&this.type=="bookmark"&&(t=1);for(var F,j,H=0;H<this.lines.length;++H){var te=this.lines[H],de=$t(te.markedSpans,this);if(de.from!=null&&(F=st(s?te:St(te),de.from),t==-1))return F;if(de.to!=null&&(j=st(s?te:St(te),de.to),t==1))return j}return F&&{from:F,to:j}},gi.prototype.changed=function(){var t=this,s=this.find(-1,!0),F=this,j=this.doc.cm;if(!s||!j)return;Xn(j,function(){var H=s.line,te=St(s.line),de=Qt(j,te);if(de&&(ei(de),j.curOp.selectionChanged=j.curOp.forceUpdate=!0),j.curOp.updateMaxLine=!0,!rr(F.doc,H)&&F.height!=null){var ve=F.height;F.height=null;var xe=sn(F)-ve;xe&&It(H,H.height+xe)}Zr(j,"markerChanged",j,t)})},gi.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var s=this.doc.cm.curOp;(!s.maybeHiddenMarkers||q(s.maybeHiddenMarkers,this)==-1)&&(s.maybeUnhiddenMarkers||(s.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},gi.prototype.detachLine=function(t){if(this.lines.splice(q(this.lines,t),1),!this.lines.length&&this.doc.cm){var s=this.doc.cm.curOp;(s.maybeHiddenMarkers||(s.maybeHiddenMarkers=[])).push(this)}},Be(gi);function Wi(t,s,F,j,H){if(j&&j.shared)return wl(t,s,F,j,H);if(t.cm&&!t.cm.curOp)return _n(t.cm,Wi)(t,s,F,j,H);var te=new gi(t,H),de=pt(s,F);if(j&&p(j,te,!1),de>0||de==0&&te.clearWhenEmpty!==!1)return te;if(te.replacedWith&&(te.collapsed=!0,te.widgetNode=P("span",[te.replacedWith],"CodeMirror-widget"),j.handleMouseEvents||te.widgetNode.setAttribute("cm-ignore-events","true"),j.insertLeft&&(te.widgetNode.insertLeft=!0)),te.collapsed){if(Or(t,s.line,s,F,te)||s.line!=F.line&&Or(t,F.line,s,F,te))throw new Error("Inserting collapsed marker partially overlapping an existing one");lr()}te.addToHistory&&Jo(t,{from:s,to:F,origin:"markText"},t.sel,NaN);var ve=s.line,xe=t.cm,Se;if(t.iter(ve,F.line+1,function(Ye){xe&&te.collapsed&&!xe.options.lineWrapping&&Vr(Ye)==xe.display.maxLine&&(Se=!0),te.collapsed&&ve!=s.line&&It(Ye,0),jr(Ye,new br(te,ve==s.line?s.ch:null,ve==F.line?F.ch:null)),++ve}),te.collapsed&&t.iter(s.line,F.line+1,function(Ye){rr(t,Ye)&&It(Ye,0)}),te.clearOnEnter&&Re(te,"beforeCursorEnter",function(){return te.clear()}),te.readOnly&&(sr(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),te.collapsed&&(te.id=++ps,te.atomic=!0),xe){if(Se&&(xe.curOp.updateMaxLine=!0),te.collapsed)Un(xe,s.line,F.line+1);else if(te.className||te.startStyle||te.endStyle||te.css||te.attributes||te.title)for(var Ge=s.line;Ge<=F.line;Ge++)di(xe,Ge,"text");te.atomic&&ns(xe.doc),Zr(xe,"markerAdded",xe,te)}return te}var ua=function(t,s){this.markers=t,this.primary=s;for(var F=0;F<t.length;++F)t[F].parent=this};ua.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();Zr(this,"clear")},ua.prototype.find=function(t,s){return this.primary.find(t,s)},Be(ua);function wl(t,s,F,j,H){j=p(j),j.shared=!1;var te=[Wi(t,s,F,j,H)],de=te[0],ve=j.widgetNode;return mi(t,function(xe){ve&&(j.widgetNode=ve.cloneNode(!0)),te.push(Wi(xe,Kt(xe,s),Kt(xe,F),j,H));for(var Se=0;Se<xe.linked.length;++Se)if(xe.linked[Se].isParent)return;de=_e(te)}),new ua(te,de)}function ms(t){return t.findMarks(st(t.first,0),t.clipPos(st(t.lastLine())),function(s){return s.parent})}function Tl(t,s){for(var F=0;F<s.length;F++){var j=s[F],H=j.find(),te=t.clipPos(H.from),de=t.clipPos(H.to);if(pt(te,de)){var ve=Wi(t,te,de,j.primary,j.primary.type);j.markers.push(ve),ve.parent=j}}}function Sl(t){for(var s=function(j){var H=t[j],te=[H.primary.doc];mi(H.primary.doc,function(xe){return te.push(xe)});for(var de=0;de<H.markers.length;de++){var ve=H.markers[de];q(te,ve.doc)==-1&&(ve.parent=null,H.markers.splice(de--,1))}},F=0;F<t.length;F++)s(F)}var Cl=0,Fn=function(t,s,F,j,H){if(!(this instanceof Fn))return new Fn(t,s,F,j,H);F==null&&(F=0),sa.call(this,[new oa([new cn("",null)])]),this.first=F,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=F;var te=st(F,0);this.sel=fi(te),this.history=new Sa(null),this.id=++Cl,this.modeOption=s,this.lineSep=j,this.direction=H=="rtl"?"rtl":"ltr",this.extend=!1,typeof t=="string"&&(t=this.splitLines(t)),no(this,{from:te,to:te,text:t}),Rn(this,fi(te),ce)};Fn.prototype=Ce(sa.prototype,{constructor:Fn,iter:function(t,s,F){F?this.iterN(t-this.first,s-t,F):this.iterN(this.first,this.first+this.size,t)},insert:function(t,s){for(var F=0,j=0;j<s.length;++j)F+=s[j].height;this.insertInner(t-this.first,s,F)},remove:function(t,s){this.removeInner(t-this.first,s)},getValue:function(t){var s=Lt(this,this.first,this.first+this.size);return t===!1?s:s.join(t||this.lineSeparator())},setValue:En(function(t){var s=st(this.first,0),F=this.first+this.size-1;Fi(this,{from:s,to:st(F,gt(this,F).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&Qi(this.cm,0,0),Rn(this,fi(s),ce)}),replaceRange:function(t,s,F,j){s=Kt(this,s),F=F?Kt(this,F):s,Bi(this,t,s,F,j)},getRange:function(t,s,F){var j=Ut(this,Kt(this,t),Kt(this,s));return F===!1?j:j.join(F||this.lineSeparator())},getLine:function(t){var s=this.getLineHandle(t);return s&&s.text},getLineHandle:function(t){if(kt(this,t))return gt(this,t)},getLineNumber:function(t){return St(t)},getLineHandleVisualStart:function(t){return typeof t=="number"&&(t=gt(this,t)),Vr(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return Kt(this,t)},getCursor:function(t){var s=this.sel.primary(),F;return t==null||t=="head"?F=s.head:t=="anchor"?F=s.anchor:t=="end"||t=="to"||t===!1?F=s.to():F=s.from(),F},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:En(function(t,s,F){es(this,Kt(this,typeof t=="number"?st(t,s||0):t),null,F)}),setSelection:En(function(t,s,F){es(this,Kt(this,t),Kt(this,s||t),F)}),extendSelection:En(function(t,s,F){Oa(this,Kt(this,t),s&&Kt(this,s),F)}),extendSelections:En(function(t,s){qo(this,V(this,t),s)}),extendSelectionsBy:En(function(t,s){var F=De(this.sel.ranges,t);qo(this,V(this,F),s)}),setSelections:En(function(t,s,F){if(!t.length)return;for(var j=[],H=0;H<t.length;H++)j[H]=new Mr(Kt(this,t[H].anchor),Kt(this,t[H].head));s==null&&(s=Math.min(t.length-1,this.sel.primIndex)),Rn(this,ri(this.cm,j,s),F)}),addSelection:En(function(t,s,F){var j=this.sel.ranges.slice(0);j.push(new Mr(Kt(this,t),Kt(this,s||t))),Rn(this,ri(this.cm,j,j.length-1),F)}),getSelection:function(t){for(var s=this.sel.ranges,F,j=0;j<s.length;j++){var H=Ut(this,s[j].from(),s[j].to());F=F?F.concat(H):H}return t===!1?F:F.join(t||this.lineSeparator())},getSelections:function(t){for(var s=[],F=this.sel.ranges,j=0;j<F.length;j++){var H=Ut(this,F[j].from(),F[j].to());t!==!1&&(H=H.join(t||this.lineSeparator())),s[j]=H}return s},replaceSelection:function(t,s,F){for(var j=[],H=0;H<this.sel.ranges.length;H++)j[H]=t;this.replaceSelections(j,s,F||"+input")},replaceSelections:En(function(t,s,F){for(var j=[],H=this.sel,te=0;te<H.ranges.length;te++){var de=H.ranges[te];j[te]={from:de.from(),to:de.to(),text:this.splitLines(t[te]),origin:F}}for(var ve=s&&s!="end"&&fl(this,j,s),xe=j.length-1;xe>=0;xe--)Fi(this,j[xe]);ve?ts(this,ve):this.cm&&Ni(this.cm)}),undo:En(function(){Ia(this,"undo")}),redo:En(function(){Ia(this,"redo")}),undoSelection:En(function(){Ia(this,"undo",!0)}),redoSelection:En(function(){Ia(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,s=0,F=0,j=0;j<t.done.length;j++)t.done[j].ranges||++s;for(var H=0;H<t.undone.length;H++)t.undone[H].ranges||++F;return{undo:s,redo:F}},clearHistory:function(){var t=this;this.history=new Sa(this.history.maxGeneration),mi(this,function(s){return s.history=t.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:ji(this.history.done),undone:ji(this.history.undone)}},setHistory:function(t){var s=this.history=new Sa(this.history.maxGeneration);s.done=ji(t.done.slice(0),null,!0),s.undone=ji(t.undone.slice(0),null,!0)},setGutterMarker:En(function(t,s,F){return aa(this,t,"gutter",function(j){var H=j.gutterMarkers||(j.gutterMarkers={});return H[s]=F,!F&&Z(H)&&(j.gutterMarkers=null),!0})}),clearGutter:En(function(t){var s=this;this.iter(function(F){F.gutterMarkers&&F.gutterMarkers[t]&&aa(s,F,"gutter",function(){return F.gutterMarkers[t]=null,Z(F.gutterMarkers)&&(F.gutterMarkers=null),!0})})}),lineInfo:function(t){var s;if(typeof t=="number"){if(!kt(this,t))return null;if(s=t,t=gt(this,t),!t)return null}else if(s=St(t),s==null)return null;return{line:s,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:En(function(t,s,F){return aa(this,t,s=="gutter"?"gutter":"class",function(j){var H=s=="text"?"textClass":s=="background"?"bgClass":s=="gutter"?"gutterClass":"wrapClass";if(!j[H])j[H]=F;else{if(R(F).test(j[H]))return!1;j[H]+=" "+F}return!0})}),removeLineClass:En(function(t,s,F){return aa(this,t,s=="gutter"?"gutter":"class",function(j){var H=s=="text"?"textClass":s=="background"?"bgClass":s=="gutter"?"gutterClass":"wrapClass",te=j[H];if(te)if(F==null)j[H]=null;else{var de=te.match(R(F));if(!de)return!1;var ve=de.index+de[0].length;j[H]=te.slice(0,de.index)+(!de.index||ve==te.length?"":" ")+te.slice(ve)||null}else return!1;return!0})}),addLineWidget:En(function(t,s,F){return xl(this,t,s,F)}),removeLineWidget:function(t){t.clear()},markText:function(t,s,F){return Wi(this,Kt(this,t),Kt(this,s),F,F&&F.type||"range")},setBookmark:function(t,s){var F={replacedWith:s&&(s.nodeType==null?s.widget:s),insertLeft:s&&s.insertLeft,clearWhenEmpty:!1,shared:s&&s.shared,handleMouseEvents:s&&s.handleMouseEvents};return t=Kt(this,t),Wi(this,t,t,F,"bookmark")},findMarksAt:function(t){t=Kt(this,t);var s=[],F=gt(this,t.line).markedSpans;if(F)for(var j=0;j<F.length;++j){var H=F[j];(H.from==null||H.from<=t.ch)&&(H.to==null||H.to>=t.ch)&&s.push(H.marker.parent||H.marker)}return s},findMarks:function(t,s,F){t=Kt(this,t),s=Kt(this,s);var j=[],H=t.line;return this.iter(t.line,s.line+1,function(te){var de=te.markedSpans;if(de)for(var ve=0;ve<de.length;ve++){var xe=de[ve];!(xe.to!=null&&H==t.line&&t.ch>=xe.to||xe.from==null&&H!=t.line||xe.from!=null&&H==s.line&&xe.from>=s.ch)&&(!F||F(xe.marker))&&j.push(xe.marker.parent||xe.marker)}++H}),j},getAllMarks:function(){var t=[];return this.iter(function(s){var F=s.markedSpans;if(F)for(var j=0;j<F.length;++j)F[j].from!=null&&t.push(F[j].marker)}),t},posFromIndex:function(t){var s,F=this.first,j=this.lineSeparator().length;return this.iter(function(H){var te=H.text.length+j;if(te>t)return s=t,!0;t-=te,++F}),Kt(this,st(F,s))},indexFromPos:function(t){t=Kt(this,t);var s=t.ch;if(t.line<this.first||t.ch<0)return 0;var F=this.lineSeparator().length;return this.iter(this.first,t.line,function(j){s+=j.text.length+F}),s},copy:function(t){var s=new Fn(Lt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return s.scrollTop=this.scrollTop,s.scrollLeft=this.scrollLeft,s.sel=this.sel,s.extend=!1,t&&(s.history.undoDepth=this.history.undoDepth,s.setHistory(this.getHistory())),s},linkedDoc:function(t){t||(t={});var s=this.first,F=this.first+this.size;t.from!=null&&t.from>s&&(s=t.from),t.to!=null&&t.to<F&&(F=t.to);var j=new Fn(Lt(this,s,F),t.mode||this.modeOption,s,this.lineSep,this.direction);return t.sharedHist&&(j.history=this.history),(this.linked||(this.linked=[])).push({doc:j,sharedHist:t.sharedHist}),j.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],Tl(j,ms(this)),j},unlinkDoc:function(t){if(t instanceof Yr&&(t=t.doc),this.linked)for(var s=0;s<this.linked.length;++s){var F=this.linked[s];if(F.doc!=t)continue;this.linked.splice(s,1),t.unlinkDoc(this),Sl(ms(this));break}if(t.history==this.history){var j=[t.id];mi(t,function(H){return j.push(H.id)},!0),t.history=new Sa(null),t.history.done=ji(this.history.done,j),t.history.undone=ji(this.history.undone,j)}},iterLinkedDocs:function(t){mi(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):at(t)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:En(function(t){if(t!="rtl"&&(t="ltr"),t==this.direction)return;this.direction=t,this.iter(function(s){return s.order=null}),this.cm&&pl(this.cm)})}),Fn.prototype.eachLine=Fn.prototype.iter;var gs=0;function Ol(t){var s=this;if(vs(s),ze(s,t)||ln(s.display,t))return;we(t),i&&(gs=+new Date);var F=xi(s,t,!0),j=t.dataTransfer.files;if(!F||s.isReadOnly())return;if(j&&j.length&&window.FileReader&&window.File)for(var H=j.length,te=Array(H),de=0,ve=function(){++de==H&&_n(s,function(){F=Kt(s.doc,F);var et={from:F,to:F,text:s.doc.splitLines(te.filter(function(vt){return vt!=null}).join(s.doc.lineSeparator())),origin:"paste"};Fi(s.doc,et),ts(s.doc,fi(Kt(s.doc,F),Kt(s.doc,pi(et))))})()},xe=function(et,vt){if(s.options.allowDropFileTypes&&q(s.options.allowDropFileTypes,et.type)==-1){ve();return}var Et=new FileReader;Et.onerror=function(){return ve()},Et.onload=function(){var At=Et.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(At)){ve();return}te[vt]=At,ve()},Et.readAsText(et)},Se=0;Se<j.length;Se++)xe(j[Se],Se);else{if(s.state.draggingText&&s.doc.sel.contains(F)>-1){s.state.draggingText(t),setTimeout(function(){return s.display.input.focus()},20);return}try{var Ge=t.dataTransfer.getData("Text");if(Ge){var Ye;if(s.state.draggingText&&!s.state.draggingText.copy&&(Ye=s.listSelections()),Aa(s.doc,fi(F,F)),Ye)for(var it=0;it<Ye.length;++it)Bi(s.doc,"",Ye[it].anchor,Ye[it].head,"drag");s.replaceSelection(Ge,"around","paste"),s.display.input.focus()}}catch(et){}}}function Al(t,s){if(i&&(!t.state.draggingText||+new Date-gs<100)){Le(s);return}if(ze(t,s)||ln(t.display,s))return;if(s.dataTransfer.setData("Text",t.getSelection()),s.dataTransfer.effectAllowed="copyMove",s.dataTransfer.setDragImage&&!r){var F=A("img",null,null,"position: fixed; left: 0; top: 0;");F.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",_&&(F.width=F.height=1,t.display.wrapper.appendChild(F),F._top=F.offsetTop),s.dataTransfer.setDragImage(F,0,0),_&&F.parentNode.removeChild(F)}}function Rl(t,s){var F=xi(t,s);if(!F)return;var j=document.createDocumentFragment();Ro(t,F,j),t.display.dragCursor||(t.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),D(t.display.dragCursor,j)}function vs(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function ys(t){if(!document.getElementsByClassName)return;for(var s=document.getElementsByClassName("CodeMirror"),F=[],j=0;j<s.length;j++){var H=s[j].CodeMirror;H&&F.push(H)}F.length&&F[0].operation(function(){for(var te=0;te<F.length;te++)t(F[te])})}var bs=!1;function Il(){if(bs)return;Dl(),bs=!0}function Dl(){var t;Re(window,"resize",function(){t==null&&(t=setTimeout(function(){t=null,ys(Ll)},100))}),Re(window,"blur",function(){return ys(Pi)})}function Ll(t){var s=t.display;s.cachedCharWidth=s.cachedTextHeight=s.cachedPaddingH=null,s.scrollbarsClipped=!1,t.setSize()}for(var vi={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"},ca=0;ca<10;ca++)vi[ca+48]=vi[ca+96]=String(ca);for(var Da=65;Da<=90;Da++)vi[Da]=String.fromCharCode(Da);for(var da=1;da<=12;da++)vi[da+111]=vi[da+63235]="F"+da;var li={};li.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"},li.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"},li.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"},li.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"]},li.default=y?li.macDefault:li.pcDefault;function kl(t){var s=t.split(/-(?!$)/);t=s[s.length-1];for(var F,j,H,te,de=0;de<s.length-1;de++){var ve=s[de];if(/^(cmd|meta|m)$/i.test(ve))te=!0;else if(/^a(lt)?$/i.test(ve))F=!0;else if(/^(c|ctrl|control)$/i.test(ve))j=!0;else if(/^s(hift)?$/i.test(ve))H=!0;else throw new Error("Unrecognized modifier name: "+ve)}return F&&(t="Alt-"+t),j&&(t="Ctrl-"+t),te&&(t="Cmd-"+t),H&&(t="Shift-"+t),t}function Pl(t){var s={};for(var F in t)if(t.hasOwnProperty(F)){var j=t[F];if(/^(name|fallthrough|(de|at)tach)$/.test(F))continue;if(j=="..."){delete t[F];continue}for(var H=De(F.split(" "),kl),te=0;te<H.length;te++){var de=void 0,ve=void 0;te==H.length-1?(ve=H.join(" "),de=j):(ve=H.slice(0,te+1).join(" "),de="...");var xe=s[ve];if(!xe)s[ve]=de;else if(xe!=de)throw new Error("Inconsistent bindings for "+ve)}delete t[F]}for(var Se in s)t[Se]=s[Se];return t}function Hi(t,s,F,j){s=La(s);var H=s.call?s.call(t,j):s[t];if(H===!1)return"nothing";if(H==="...")return"multi";if(H!=null&&F(H))return"handled";if(s.fallthrough){if(Object.prototype.toString.call(s.fallthrough)!="[object Array]")return Hi(t,s.fallthrough,F,j);for(var te=0;te<s.fallthrough.length;te++){var de=Hi(t,s.fallthrough[te],F,j);if(de)return de}}}function _s(t){var s=typeof t=="string"?t:vi[t.keyCode];return s=="Ctrl"||s=="Alt"||s=="Shift"||s=="Mod"}function Es(t,s,F){var j=t;return s.altKey&&j!="Alt"&&(t="Alt-"+t),(d?s.metaKey:s.ctrlKey)&&j!="Ctrl"&&(t="Ctrl-"+t),(d?s.ctrlKey:s.metaKey)&&j!="Mod"&&(t="Cmd-"+t),!F&&s.shiftKey&&j!="Shift"&&(t="Shift-"+t),t}function xs(t,s){if(_&&t.keyCode==34&&t.char)return!1;var F=vi[t.keyCode];return F==null||t.altGraphKey?!1:(t.keyCode==3&&t.code&&(F=t.code),Es(F,t,s))}function La(t){return typeof t=="string"?li[t]:t}function Ki(t,s){for(var F=t.doc.sel.ranges,j=[],H=0;H<F.length;H++){for(var te=s(F[H]);j.length&&pt(te.from,_e(j).to)<=0;){var de=j.pop();if(pt(de.from,te.from)<0){te.from=de.from;break}}j.push(te)}Xn(t,function(){for(var ve=j.length-1;ve>=0;ve--)Bi(t.doc,"",j[ve].from,j[ve].to,"+delete");Ni(t)})}function so(t,s,F){var j=ye(t.text,s+F,F);return j<0||j>t.text.length?null:j}function lo(t,s,F){var j=so(t,s.ch,F);return j==null?null:new st(s.line,j,F<0?"after":"before")}function uo(t,s,F,j,H){if(t){s.doc.direction=="rtl"&&(H=-H);var te=je(F,s.doc.direction);if(te){var de=H<0?_e(te):te[0],ve=H<0==(de.level==1),xe=ve?"after":"before",Se;if(de.level>0||s.doc.direction=="rtl"){var Ge=Tr(s,F);Se=H<0?F.text.length-1:0;var Ye=Kr(s,Ge,Se).top;Se=Te(function(it){return Kr(s,Ge,it).top==Ye},H<0==(de.level==1)?de.from:de.to-1,Se),xe=="before"&&(Se=so(F,Se,1))}else Se=H<0?de.to:de.from;return new st(j,Se,xe)}}return new st(j,H<0?F.text.length:0,H<0?"before":"after")}function Nl(t,s,F,j){var H=je(s,t.doc.direction);if(!H)return lo(s,F,j);F.ch>=s.text.length?(F.ch=s.text.length,F.sticky="before"):F.ch<=0&&(F.ch=0,F.sticky="after");var te=Oe(H,F.ch,F.sticky),de=H[te];if(t.doc.direction=="ltr"&&de.level%2==0&&(j>0?de.to>F.ch:de.from<F.ch))return lo(s,F,j);var ve=function(Nt,Gt){return so(s,Nt instanceof st?Nt.ch:Nt,Gt)},xe,Se=function(Nt){return t.options.lineWrapping?(xe=xe||Tr(t,s),So(t,s,xe,Nt)):{begin:0,end:s.text.length}},Ge=Se(F.sticky=="before"?ve(F,-1):F.ch);if(t.doc.direction=="rtl"||de.level==1){var Ye=de.level==1==j<0,it=ve(F,Ye?1:-1);if(it!=null&&(Ye?it<=de.to&&it<=Ge.end:it>=de.from&&it>=Ge.begin)){var et=Ye?"before":"after";return new st(F.line,it,et)}}var vt=function(Nt,Gt,Mt){for(var Vt=function(Gr,xn){return xn?new st(F.line,ve(Gr,1),"before"):new st(F.line,Gr,"after")};Nt>=0&&Nt<H.length;Nt+=Gt){var or=H[Nt],qt=Gt>0==(or.level!=1),Sr=qt?Mt.begin:ve(Mt.end,-1);if(or.from<=Sr&&Sr<or.to)return Vt(Sr,qt);if(Sr=qt?or.from:ve(or.to,-1),Mt.begin<=Sr&&Sr<Mt.end)return Vt(Sr,qt)}},Et=vt(te+j,j,Ge);if(Et)return Et;var At=j>0?Ge.end:ve(Ge.begin,-1);return At!=null&&!(j>0&&At==s.text.length)&&(Et=vt(j>0?0:H.length-1,j,Se(At)),Et)?Et:null}var ha={selectAll:os,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),ce)},killLine:function(t){return Ki(t,function(s){if(s.empty()){var F=gt(t.doc,s.head.line).text.length;return s.head.ch==F&&s.head.line<t.lastLine()?{from:s.head,to:st(s.head.line+1,0)}:{from:s.head,to:st(s.head.line,F)}}else return{from:s.from(),to:s.to()}})},deleteLine:function(t){return Ki(t,function(s){return{from:st(s.from().line,0),to:Kt(t.doc,st(s.to().line+1,0))}})},delLineLeft:function(t){return Ki(t,function(s){return{from:st(s.from().line,0),to:s.from()}})},delWrappedLineLeft:function(t){return Ki(t,function(s){var F=t.charCoords(s.head,"div").top+5,j=t.coordsChar({left:0,top:F},"div");return{from:j,to:s.from()}})},delWrappedLineRight:function(t){return Ki(t,function(s){var F=t.charCoords(s.head,"div").top+5,j=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:F},"div");return{from:s.from(),to:j}})},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(st(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(st(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(s){return ws(t,s.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(s){return Ts(t,s.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(s){return Ml(t,s.head.line)},{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy(function(s){var F=t.cursorCoords(s.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:F},"div")},me)},goLineLeft:function(t){return t.extendSelectionsBy(function(s){var F=t.cursorCoords(s.head,"div").top+5;return t.coordsChar({left:0,top:F},"div")},me)},goLineLeftSmart:function(t){return t.extendSelectionsBy(function(s){var F=t.cursorCoords(s.head,"div").top+5,j=t.coordsChar({left:0,top:F},"div");return j.ch<t.getLine(j.line).search(/\S/)?Ts(t,s.head):j},me)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"codepoint")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection(" ")},insertSoftTab:function(t){for(var s=[],F=t.listSelections(),j=t.options.tabSize,H=0;H<F.length;H++){var te=F[H].from(),de=U(t.getLine(te.line),te.ch,j);s.push(se(j-de%j))}t.replaceSelections(s)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return Xn(t,function(){for(var s=t.listSelections(),F=[],j=0;j<s.length;j++){if(!s[j].empty())continue;var H=s[j].head,te=gt(t.doc,H.line).text;if(te){if(H.ch==te.length&&(H=new st(H.line,H.ch-1)),H.ch>0)H=new st(H.line,H.ch+1),t.replaceRange(te.charAt(H.ch-1)+te.charAt(H.ch-2),st(H.line,H.ch-2),H,"+transpose");else if(H.line>t.doc.first){var de=gt(t.doc,H.line-1).text;de&&(H=new st(H.line,1),t.replaceRange(te.charAt(0)+t.doc.lineSeparator()+de.charAt(de.length-1),st(H.line-1,de.length-1),H,"+transpose"))}}F.push(new Mr(H,H))}t.setSelections(F)})},newlineAndIndent:function(t){return Xn(t,function(){for(var s=t.listSelections(),F=s.length-1;F>=0;F--)t.replaceRange(t.doc.lineSeparator(),s[F].anchor,s[F].head,"+input");s=t.listSelections();for(var j=0;j<s.length;j++)t.indentLine(s[j].from().line,null,!0);Ni(t)})},openLine:function(t){return t.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(t){return t.toggleOverwrite()}};function ws(t,s){var F=gt(t.doc,s),j=Vr(F);return j!=F&&(s=St(j)),uo(!0,t,j,s,1)}function Ml(t,s){var F=gt(t.doc,s),j=Wr(F);return j!=F&&(s=St(j)),uo(!0,t,F,s,-1)}function Ts(t,s){var F=ws(t,s.line),j=gt(t.doc,F.line),H=je(j,t.doc.direction);if(!H||H[0].level==0){var te=Math.max(F.ch,j.text.search(/\S/)),de=s.line==F.line&&s.ch<=te&&s.ch;return st(F.line,de?0:te,F.sticky)}return F}function ka(t,s,F){if(typeof s=="string"&&(s=ha[s],!s))return!1;t.display.input.ensurePolled();var j=t.display.shift,H=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),F&&(t.display.shift=!1),H=s(t)!=re}finally{t.display.shift=j,t.state.suppressEdits=!1}return H}function jl(t,s,F){for(var j=0;j<t.state.keyMaps.length;j++){var H=Hi(s,t.state.keyMaps[j],F,t);if(H)return H}return t.options.extraKeys&&Hi(s,t.options.extraKeys,F,t)||Hi(s,t.options.keyMap,F,t)}var Ul=new z;function fa(t,s,F,j){var H=t.state.keySeq;if(H){if(_s(s))return"handled";if(/\'$/.test(s)?t.state.keySeq=null:Ul.set(50,function(){t.state.keySeq==H&&(t.state.keySeq=null,t.display.input.reset())}),Ss(t,H+" "+s,F,j))return!0}return Ss(t,s,F,j)}function Ss(t,s,F,j){var H=jl(t,s,j);return H=="multi"&&(t.state.keySeq=s),H=="handled"&&Zr(t,"keyHandled",t,s,F),(H=="handled"||H=="multi")&&(we(F),Xa(t)),!!H}function Cs(t,s){var F=xs(s,!0);return F?s.shiftKey&&!t.state.keySeq?fa(t,"Shift-"+F,s,function(j){return ka(t,j,!0)})||fa(t,F,s,function(j){if(typeof j=="string"?/^go[A-Z]/.test(j):j.motion)return ka(t,j)}):fa(t,F,s,function(j){return ka(t,j)}):!1}function Fl(t,s,F){return fa(t,"'"+F+"'",s,function(j){return ka(t,j,!0)})}var co=null;function Os(t){var s=this;if(t.target&&t.target!=s.display.input.getField())return;if(s.curOp.focus=k(),ze(s,t))return;i&&T<11&&t.keyCode==27&&(t.returnValue=!1);var F=t.keyCode;s.display.shift=F==16||t.shiftKey;var j=Cs(s,t);_&&(co=j?F:null,!j&&F==88&&!dt&&(y?t.metaKey:t.ctrlKey)&&s.replaceSelection("",null,"cut")),G&&!y&&!j&&F==46&&t.shiftKey&&!t.ctrlKey&&document.execCommand&&document.execCommand("cut"),F==18&&!/\bCodeMirror-crosshair\b/.test(s.display.lineDiv.className)&&Bl(s)}function Bl(t){var s=t.display.lineDiv;g(s,"CodeMirror-crosshair");function F(j){(j.keyCode==18||!j.altKey)&&(O(s,"CodeMirror-crosshair"),Qe(document,"keyup",F),Qe(document,"mouseover",F))}Re(document,"keyup",F),Re(document,"mouseover",F)}function As(t){t.keyCode==16&&(this.doc.sel.shift=!1),ze(this,t)}function Rs(t){var s=this;if(t.target&&t.target!=s.display.input.getField())return;if(ln(s.display,t)||ze(s,t)||t.ctrlKey&&!t.altKey||y&&t.metaKey)return;var F=t.keyCode,j=t.charCode;if(_&&F==co){co=null,we(t);return}if(_&&(!t.which||t.which<10)&&Cs(s,t))return;var H=String.fromCharCode(j==null?F:j);if(H=="\b")return;if(Fl(s,t,H))return;s.display.input.onKeyPress(t)}var Wl=400,ho=function(t,s,F){this.time=t,this.pos=s,this.button=F};ho.prototype.compare=function(t,s,F){return this.time+Wl>t&&pt(s,this.pos)==0&&F==this.button};var pa,ma;function Hl(t,s){var F=+new Date;return ma&&ma.compare(F,t,s)?(pa=ma=null,"triple"):pa&&pa.compare(F,t,s)?(ma=new ho(F,t,s),pa=null,"double"):(pa=new ho(F,t,s),ma=null,"single")}function Is(t){var s=this,F=s.display;if(ze(s,t)||F.activeTouch&&F.input.supportsTouch())return;if(F.input.ensurePolled(),F.shift=t.shiftKey,ln(F,t)){e||(F.scroller.draggable=!1,setTimeout(function(){return F.scroller.draggable=!0},100));return}if(fo(s,t))return;var j=xi(s,t),H=Ze(t),te=j?Hl(j,H):"single";if(window.focus(),H==1&&s.state.selectingText&&s.state.selectingText(t),j&&Kl(s,H,j,te,t))return;H==1?j?zl(s,j,te,t):Ke(t)==F.scroller&&we(t):H==2?(j&&Oa(s.doc,j),setTimeout(function(){return F.input.focus()},20)):H==3&&(x?s.display.input.onContextMenu(t):Do(s))}function Kl(t,s,F,j,H){var te="Click";return j=="double"?te="Double"+te:j=="triple"&&(te="Triple"+te),te=(s==1?"Left":s==2?"Middle":"Right")+te,fa(t,Es(te,H),H,function(de){if(typeof de=="string"&&(de=ha[de]),!de)return!1;var ve=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),ve=de(t,F)!=re}finally{t.state.suppressEdits=!1}return ve})}function Gl(t,s,F){var j=t.getOption("configureMouse"),H=j?j(t,s,F):{};if(H.unit==null){var te=h?F.shiftKey&&F.metaKey:F.altKey;H.unit=te?"rectangle":s=="single"?"char":s=="double"?"word":"line"}return(H.extend==null||t.doc.extend)&&(H.extend=t.doc.extend||F.shiftKey),H.addNew==null&&(H.addNew=y?F.metaKey:F.ctrlKey),H.moveOnDrag==null&&(H.moveOnDrag=!(y?F.altKey:F.ctrlKey)),H}function zl(t,s,F,j){i?setTimeout(S(Io,t),0):t.curOp.focus=k();var H=Gl(t,F,j),te=t.doc.sel,de;t.options.dragDrop&&Ne&&!t.isReadOnly()&&F=="single"&&(de=te.contains(s))>-1&&(pt((de=te.ranges[de]).from(),s)<0||s.xRel>0)&&(pt(de.to(),s)>0||s.xRel<0)?Xl(t,j,s,H):Vl(t,j,s,H)}function Xl(t,s,F,j){var H=t.display,te=!1,de=_n(t,function(Se){e&&(H.scroller.draggable=!1),t.state.draggingText=!1,Qe(H.wrapper.ownerDocument,"mouseup",de),Qe(H.wrapper.ownerDocument,"mousemove",ve),Qe(H.scroller,"dragstart",xe),Qe(H.scroller,"drop",de),te||(we(Se),j.addNew||Oa(t.doc,F,null,null,j.extend),e&&!r||i&&T==9?setTimeout(function(){H.wrapper.ownerDocument.body.focus({preventScroll:!0}),H.input.focus()},20):H.input.focus())}),ve=function(Se){te=te||Math.abs(s.clientX-Se.clientX)+Math.abs(s.clientY-Se.clientY)>=10},xe=function(){return te=!0};e&&(H.scroller.draggable=!0),t.state.draggingText=de,de.copy=!j.moveOnDrag,H.scroller.dragDrop&&H.scroller.dragDrop(),Re(H.wrapper.ownerDocument,"mouseup",de),Re(H.wrapper.ownerDocument,"mousemove",ve),Re(H.scroller,"dragstart",xe),Re(H.scroller,"drop",de),Do(t),setTimeout(function(){return H.input.focus()},20)}function Ds(t,s,F){if(F=="char")return new Mr(s,s);if(F=="word")return t.findWordAt(s);if(F=="line")return new Mr(st(s.line,0),Kt(t.doc,st(s.line+1,0)));var j=F(t,s);return new Mr(j.from,j.to)}function Vl(t,s,F,j){var H=t.display,te=t.doc;we(s);var de,ve,xe=te.sel,Se=xe.ranges;if(j.addNew&&!j.extend?(ve=te.sel.contains(F),ve>-1?de=Se[ve]:de=new Mr(F,F)):(de=te.sel.primary(),ve=te.sel.primIndex),j.unit=="rectangle")j.addNew||(de=new Mr(F,F)),F=xi(t,s,!0,!0),ve=-1;else{var Ge=Ds(t,F,j.unit);j.extend?de=ao(de,Ge.anchor,Ge.head,j.extend):de=Ge}j.addNew?ve==-1?(ve=Se.length,Rn(te,ri(t,Se.concat([de]),ve),{scroll:!1,origin:"*mouse"})):Se.length>1&&Se[ve].empty()&&j.unit=="char"&&!j.extend?(Rn(te,ri(t,Se.slice(0,ve).concat(Se.slice(ve+1)),0),{scroll:!1,origin:"*mouse"}),xe=te.sel):oo(te,ve,de,ne):(ve=0,Rn(te,new Zn([de],0),ne),xe=te.sel);var Ye=F;function it(Mt){if(pt(Ye,Mt)==0)return;if(Ye=Mt,j.unit=="rectangle"){for(var Vt=[],or=t.options.tabSize,qt=U(gt(te,F.line).text,F.ch,or),Sr=U(gt(te,Mt.line).text,Mt.ch,or),Gr=Math.min(qt,Sr),xn=Math.max(qt,Sr),qr=Math.min(F.line,Mt.line),Vn=Math.min(t.lastLine(),Math.max(F.line,Mt.line));qr<=Vn;qr++){var Bn=gt(te,qr).text,hn=be(Bn,Gr,or);Gr==xn?Vt.push(new Mr(st(qr,hn),st(qr,hn))):Bn.length>hn&&Vt.push(new Mr(st(qr,hn),st(qr,be(Bn,xn,or))))}Vt.length||Vt.push(new Mr(F,F)),Rn(te,ri(t,xe.ranges.slice(0,ve).concat(Vt),ve),{origin:"*mouse",scroll:!1}),t.scrollIntoView(Mt)}else{var Wn=de,Cn=Ds(t,Mt,j.unit),gn=Wn.anchor,fn;pt(Cn.anchor,gn)>0?(fn=Cn.head,gn=tr(Wn.from(),Cn.anchor)):(fn=Cn.anchor,gn=Tt(Wn.to(),Cn.head));var tn=xe.ranges.slice(0);tn[ve]=Yl(t,new Mr(Kt(te,gn),fn)),Rn(te,ri(t,tn,ve),ne)}}var et=H.wrapper.getBoundingClientRect(),vt=0;function Et(Mt){var Vt=++vt,or=xi(t,Mt,!0,j.unit=="rectangle");if(!or)return;if(pt(or,Ye)!=0){t.curOp.focus=k(),it(or);var qt=Ea(H,te);(or.line>=qt.to||or.line<qt.from)&&setTimeout(_n(t,function(){vt==Vt&&Et(Mt)}),150)}else{var Sr=Mt.clientY<et.top?-20:Mt.clientY>et.bottom?20:0;Sr&&setTimeout(_n(t,function(){if(vt!=Vt)return;H.scroller.scrollTop+=Sr,Et(Mt)}),50)}}function At(Mt){t.state.selectingText=!1,vt=Infinity,Mt&&(we(Mt),H.input.focus()),Qe(H.wrapper.ownerDocument,"mousemove",Nt),Qe(H.wrapper.ownerDocument,"mouseup",Gt),te.history.lastSelOrigin=null}var Nt=_n(t,function(Mt){Mt.buttons===0||!Ze(Mt)?At(Mt):Et(Mt)}),Gt=_n(t,At);t.state.selectingText=Gt,Re(H.wrapper.ownerDocument,"mousemove",Nt),Re(H.wrapper.ownerDocument,"mouseup",Gt)}function Yl(t,s){var F=s.anchor,j=s.head,H=gt(t.doc,F.line);if(pt(F,j)==0&&F.sticky==j.sticky)return s;var te=je(H);if(!te)return s;var de=Oe(te,F.ch,F.sticky),ve=te[de];if(ve.from!=F.ch&&ve.to!=F.ch)return s;var xe=de+(ve.from==F.ch==(ve.level!=1)?0:1);if(xe==0||xe==te.length)return s;var Se;if(j.line!=F.line)Se=(j.line-F.line)*(t.doc.direction=="ltr"?1:-1)>0;else{var Ge=Oe(te,j.ch,j.sticky),Ye=Ge-de||(j.ch-F.ch)*(ve.level==1?-1:1);Ge==xe-1||Ge==xe?Se=Ye<0:Se=Ye>0}var it=te[xe+(Se?-1:0)],et=Se==(it.level==1),vt=et?it.from:it.to,Et=et?"after":"before";return F.ch==vt&&F.sticky==Et?s:new Mr(new st(F.line,vt,Et),j)}function Ls(t,s,F,j){var H,te;if(s.touches)H=s.touches[0].clientX,te=s.touches[0].clientY;else try{H=s.clientX,te=s.clientY}catch(it){return!1}if(H>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;j&&we(s);var de=t.display,ve=de.lineDiv.getBoundingClientRect();if(te>ve.bottom||!Ie(t,F))return ke(s);te-=ve.top-de.viewOffset;for(var xe=0;xe<t.display.gutterSpecs.length;++xe){var Se=de.gutters.childNodes[xe];if(Se&&Se.getBoundingClientRect().right>=H){var Ge=Jt(t.doc,te),Ye=t.display.gutterSpecs[xe];return We(t,F,t,Ge,Ye.className,s),ke(s)}}}function fo(t,s){return Ls(t,s,"gutterClick",!0)}function ks(t,s){if(ln(t.display,s)||$l(t,s))return;if(ze(t,s,"contextmenu"))return;x||t.display.input.onContextMenu(s)}function $l(t,s){return Ie(t,"gutterContextMenu")?Ls(t,s,"gutterContextMenu",!1):!1}function Ps(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),$i(t)}var Gi={toString:function(){return"CodeMirror.Init"}},Ns={},Pa={};function Jl(t){var s=t.optionHandlers;function F(j,H,te,de){t.defaults[j]=H,te&&(s[j]=de?function(ve,xe,Se){Se!=Gi&&te(ve,xe,Se)}:te)}t.defineOption=F,t.Init=Gi,F("value","",function(j,H){return j.setValue(H)},!0),F("mode",null,function(j,H){j.doc.modeOption=H,ro(j)},!0),F("indentUnit",2,ro,!0),F("indentWithTabs",!1),F("smartIndent",!0),F("tabSize",4,function(j){na(j),$i(j),Un(j)},!0),F("lineSeparator",null,function(j,H){if(j.doc.lineSep=H,!H)return;var te=[],de=j.doc.first;j.doc.iter(function(xe){for(var Se=0;;){var Ge=xe.text.indexOf(H,Se);if(Ge==-1)break;Se=Ge+H.length,te.push(st(de,Ge))}de++});for(var ve=te.length-1;ve>=0;ve--)Bi(j.doc,H,te[ve],st(te[ve].line,te[ve].ch+H.length))}),F("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(j,H,te){j.state.specialChars=new RegExp(H.source+(H.test(" ")?"":"| "),"g"),te!=Gi&&j.refresh()}),F("specialCharPlaceholder",Rr,function(j){return j.refresh()},!0),F("electricChars",!0),F("inputStyle",f?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),F("spellcheck",!1,function(j,H){return j.getInputField().spellcheck=H},!0),F("autocorrect",!1,function(j,H){return j.getInputField().autocorrect=H},!0),F("autocapitalize",!1,function(j,H){return j.getInputField().autocapitalize=H},!0),F("rtlMoveVisually",!b),F("wholeLineUpdateBefore",!0),F("theme","default",function(j){Ps(j),ra(j)},!0),F("keyMap","default",function(j,H,te){var de=La(H),ve=te!=Gi&&La(te);ve&&ve.detach&&ve.detach(j,de),de.attach&&de.attach(j,ve||null)}),F("extraKeys",null),F("configureMouse",null),F("lineWrapping",!1,Zl,!0),F("gutters",[],function(j,H){j.display.gutterSpecs=eo(H,j.options.lineNumbers),ra(j)},!0),F("fixedGutter",!0,function(j,H){j.display.gutters.style.left=H?Ga(j.display)+"px":"0",j.refresh()},!0),F("coverGutterNextToScrollbar",!1,function(j){return Mi(j)},!0),F("scrollbarStyle","native",function(j){jo(j),Mi(j),j.display.scrollbars.setScrollTop(j.doc.scrollTop),j.display.scrollbars.setScrollLeft(j.doc.scrollLeft)},!0),F("lineNumbers",!1,function(j,H){j.display.gutterSpecs=eo(j.options.gutters,H),ra(j)},!0),F("firstLineNumber",1,ra,!0),F("lineNumberFormatter",function(j){return j},ra,!0),F("showCursorWhenSelecting",!1,Ji,!0),F("resetSelectionOnContextMenu",!0),F("lineWiseCopyCut",!0),F("pasteLinesPerSelection",!0),F("selectionsMayTouch",!1),F("readOnly",!1,function(j,H){H=="nocursor"&&(Pi(j),j.display.input.blur()),j.display.input.readOnlyChanged(H)}),F("screenReaderLabel",null,function(j,H){H=H===""?null:H,j.display.input.screenReaderLabelChanged(H)}),F("disableInput",!1,function(j,H){H||j.display.input.reset()},!0),F("dragDrop",!0,Ql),F("allowDropFileTypes",null),F("cursorBlinkRate",530),F("cursorScrollMargin",0),F("cursorHeight",1,Ji,!0),F("singleCursorHeightPerLine",!0,Ji,!0),F("workTime",100),F("workDelay",100),F("flattenSpans",!0,na,!0),F("addModeClass",!1,na,!0),F("pollInterval",100),F("undoDepth",200,function(j,H){return j.doc.history.undoDepth=H}),F("historyEventDelay",1250),F("viewportMargin",10,function(j){return j.refresh()},!0),F("maxHighlightLength",1e4,na,!0),F("moveInputWithCursor",!0,function(j,H){H||j.display.input.resetPosition()}),F("tabindex",null,function(j,H){return j.display.input.getField().tabIndex=H||""}),F("autofocus",null),F("direction","ltr",function(j,H){return j.doc.setDirection(H)},!0),F("phrases",null)}function Ql(t,s,F){var j=F&&F!=Gi;if(!s!=!j){var H=t.display.dragFunctions,te=s?Re:Qe;te(t.display.scroller,"dragstart",H.start),te(t.display.scroller,"dragenter",H.enter),te(t.display.scroller,"dragover",H.over),te(t.display.scroller,"dragleave",H.leave),te(t.display.scroller,"drop",H.drop)}}function Zl(t){t.options.lineWrapping?(g(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(O(t.display.wrapper,"CodeMirror-wrap"),Qr(t)),za(t),Un(t),$i(t),setTimeout(function(){return Mi(t)},100)}function Yr(t,s){var F=this;if(!(this instanceof Yr))return new Yr(t,s);this.options=s=s?p(s):{},p(Ns,s,!1);var j=s.value;typeof j=="string"?j=new Fn(j,s.mode,null,s.lineSeparator,s.direction):s.mode&&(j.modeOption=s.mode),this.doc=j;var H=new Yr.inputStyles[s.inputStyle](this),te=this.display=new dl(t,j,H,s);te.wrapper.CodeMirror=this,Ps(this),s.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),jo(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 z,keySeq:null,specialChars:null},s.autofocus&&!f&&te.input.focus(),i&&T<11&&setTimeout(function(){return F.display.input.reset(!0)},20),ql(this),Il(),Ci(this),this.curOp.forceUpdate=!0,Vo(this,j),s.autofocus&&!f||this.hasFocus()?setTimeout(function(){F.hasFocus()&&!F.state.focused&&Va(F)},20):Pi(this);for(var de in Pa)Pa.hasOwnProperty(de)&&Pa[de](this,s[de],Gi);Bo(this),s.finishInit&&s.finishInit(this);for(var ve=0;ve<po.length;++ve)po[ve](this);Oi(this),e&&s.lineWrapping&&getComputedStyle(te.lineDiv).textRendering=="optimizelegibility"&&(te.lineDiv.style.textRendering="auto")}Yr.defaults=Ns,Yr.optionHandlers=Pa;function ql(t){var s=t.display;Re(s.scroller,"mousedown",_n(t,Is)),i&&T<11?Re(s.scroller,"dblclick",_n(t,function(xe){if(ze(t,xe))return;var Se=xi(t,xe);if(!Se||fo(t,xe)||ln(t.display,xe))return;we(xe);var Ge=t.findWordAt(Se);Oa(t.doc,Ge.anchor,Ge.head)})):Re(s.scroller,"dblclick",function(xe){return ze(t,xe)||we(xe)}),Re(s.scroller,"contextmenu",function(xe){return ks(t,xe)}),Re(s.input.getField(),"contextmenu",function(xe){s.scroller.contains(xe.target)||ks(t,xe)});var F,j={end:0};function H(){s.activeTouch&&(F=setTimeout(function(){return s.activeTouch=null},1e3),j=s.activeTouch,j.end=+new Date)}function te(xe){if(xe.touches.length!=1)return!1;var Se=xe.touches[0];return Se.radiusX<=1&&Se.radiusY<=1}function de(xe,Se){if(Se.left==null)return!0;var Ge=Se.left-xe.left,Ye=Se.top-xe.top;return Ge*Ge+Ye*Ye>20*20}Re(s.scroller,"touchstart",function(xe){if(!ze(t,xe)&&!te(xe)&&!fo(t,xe)){s.input.ensurePolled(),clearTimeout(F);var Se=+new Date;s.activeTouch={start:Se,moved:!1,prev:Se-j.end<=300?j:null},xe.touches.length==1&&(s.activeTouch.left=xe.touches[0].pageX,s.activeTouch.top=xe.touches[0].pageY)}}),Re(s.scroller,"touchmove",function(){s.activeTouch&&(s.activeTouch.moved=!0)}),Re(s.scroller,"touchend",function(xe){var Se=s.activeTouch;if(Se&&!ln(s,xe)&&Se.left!=null&&!Se.moved&&new Date-Se.start<300){var Ge=t.coordsChar(s.activeTouch,"page"),Ye;!Se.prev||de(Se,Se.prev)?Ye=new Mr(Ge,Ge):!Se.prev.prev||de(Se,Se.prev.prev)?Ye=t.findWordAt(Ge):Ye=new Mr(st(Ge.line,0),Kt(t.doc,st(Ge.line+1,0))),t.setSelection(Ye.anchor,Ye.head),t.focus(),we(xe)}H()}),Re(s.scroller,"touchcancel",H),Re(s.scroller,"scroll",function(){s.scroller.clientHeight&&(Zi(t,s.scroller.scrollTop),Ti(t,s.scroller.scrollLeft,!0),We(t,"scroll",t))}),Re(s.scroller,"mousewheel",function(xe){return Ko(t,xe)}),Re(s.scroller,"DOMMouseScroll",function(xe){return Ko(t,xe)}),Re(s.wrapper,"scroll",function(){return s.wrapper.scrollTop=s.wrapper.scrollLeft=0}),s.dragFunctions={enter:function(xe){ze(t,xe)||Le(xe)},over:function(xe){ze(t,xe)||(Rl(t,xe),Le(xe))},start:function(xe){return Al(t,xe)},drop:_n(t,Ol),leave:function(xe){ze(t,xe)||vs(t)}};var ve=s.input.getField();Re(ve,"keyup",function(xe){return As.call(t,xe)}),Re(ve,"keydown",_n(t,Os)),Re(ve,"keypress",_n(t,Rs)),Re(ve,"focus",function(xe){return Va(t,xe)}),Re(ve,"blur",function(xe){return Pi(t,xe)})}var po=[];Yr.defineInitHook=function(t){return po.push(t)};function ga(t,s,F,j){var H=t.doc,te;F==null&&(F="add"),F=="smart"&&(H.mode.indent?te=Fe(t,s).state:F="prev");var de=t.options.tabSize,ve=gt(H,s),xe=U(ve.text,null,de);ve.stateAfter&&(ve.stateAfter=null);var Se=ve.text.match(/^\s*/)[0],Ge;if(!j&&!/\S/.test(ve.text))Ge=0,F="not";else if(F=="smart"&&(Ge=H.mode.indent(te,ve.text.slice(Se.length),ve.text),Ge==re||Ge>150)){if(!j)return;F="prev"}F=="prev"?s>H.first?Ge=U(gt(H,s-1).text,null,de):Ge=0:F=="add"?Ge=xe+t.options.indentUnit:F=="subtract"?Ge=xe-t.options.indentUnit:typeof F=="number"&&(Ge=xe+F),Ge=Math.max(0,Ge);var Ye="",it=0;if(t.options.indentWithTabs)for(var et=Math.floor(Ge/de);et;--et)it+=de,Ye+=" ";if(it<Ge&&(Ye+=se(Ge-it)),Ye!=Se)return Bi(H,Ye,st(s,0),st(s,Se.length),"+input"),ve.stateAfter=null,!0;for(var vt=0;vt<H.sel.ranges.length;vt++){var Et=H.sel.ranges[vt];if(Et.head.line==s&&Et.head.ch<Se.length){var At=st(s,Se.length);oo(H,vt,new Mr(At,At));break}}}var ni=null;function Na(t){ni=t}function mo(t,s,F,j,H){var te=t.doc;t.display.shift=!1,j||(j=te.sel);var de=+new Date-200,ve=H=="paste"||t.state.pasteIncoming>de,xe=at(s),Se=null;if(ve&&j.ranges.length>1)if(ni&&ni.text.join(`
|
|
|
`)==s){if(j.ranges.length%ni.text.length==0){Se=[];for(var Ge=0;Ge<ni.text.length;Ge++)Se.push(te.splitLines(ni.text[Ge]))}}else xe.length==j.ranges.length&&t.options.pasteLinesPerSelection&&(Se=De(xe,function(Nt){return[Nt]}));for(var Ye=t.curOp.updateInput,it=j.ranges.length-1;it>=0;it--){var et=j.ranges[it],vt=et.from(),Et=et.to();et.empty()&&(F&&F>0?vt=st(vt.line,vt.ch-F):t.state.overwrite&&!ve?Et=st(Et.line,Math.min(gt(te,Et.line).text.length,Et.ch+_e(xe).length)):ve&&ni&&ni.lineWise&&ni.text.join(`
|
|
|
`)==xe.join(`
|
|
|
`)&&(vt=Et=st(vt.line,0)));var At={from:vt,to:Et,text:Se?Se[it%Se.length]:xe,origin:H||(ve?"paste":t.state.cutIncoming>de?"cut":"+input")};Fi(t.doc,At),Zr(t,"inputRead",t,At)}s&&!ve&&js(t,s),Ni(t),t.curOp.updateInput<2&&(t.curOp.updateInput=Ye),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Ms(t,s){var F=t.clipboardData&&t.clipboardData.getData("Text");if(F)return t.preventDefault(),!s.isReadOnly()&&!s.options.disableInput&&Xn(s,function(){return mo(s,F,0,null,"paste")}),!0}function js(t,s){if(!t.options.electricChars||!t.options.smartIndent)return;for(var F=t.doc.sel,j=F.ranges.length-1;j>=0;j--){var H=F.ranges[j];if(H.head.ch>100||j&&F.ranges[j-1].head.line==H.head.line)continue;var te=t.getModeAt(H.head),de=!1;if(te.electricChars){for(var ve=0;ve<te.electricChars.length;ve++)if(s.indexOf(te.electricChars.charAt(ve))>-1){de=ga(t,H.head.line,"smart");break}}else te.electricInput&&(te.electricInput.test(gt(t.doc,H.head.line).text.slice(0,H.head.ch))&&(de=ga(t,H.head.line,"smart")));de&&Zr(t,"electricInput",t,H.head.line)}}function Us(t){for(var s=[],F=[],j=0;j<t.doc.sel.ranges.length;j++){var H=t.doc.sel.ranges[j].head.line,te={anchor:st(H,0),head:st(H+1,0)};F.push(te),s.push(t.getRange(te.anchor,te.head))}return{text:s,ranges:F}}function Fs(t,s,F,j){t.setAttribute("autocorrect",F?"":"off"),t.setAttribute("autocapitalize",j?"":"off"),t.setAttribute("spellcheck",!!s)}function Bs(){var t=A("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),s=A("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return e?t.style.width="1000px":t.setAttribute("wrap","off"),c&&(t.style.border="1px solid black"),Fs(t),s}function eu(t){var s=t.optionHandlers,F=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(j,H){var te=this.options,de=te[j];if(te[j]==H&&j!="mode")return;te[j]=H,s.hasOwnProperty(j)&&_n(this,s[j])(this,H,de),We(this,"optionChange",this,j)},getOption:function(j){return this.options[j]},getDoc:function(){return this.doc},addKeyMap:function(j,H){this.state.keyMaps[H?"push":"unshift"](La(j))},removeKeyMap:function(j){for(var H=this.state.keyMaps,te=0;te<H.length;++te)if(H[te]==j||H[te].name==j)return H.splice(te,1),!0},addOverlay:kn(function(j,H){var te=j.token?j:t.getMode(this.options,j);if(te.startState)throw new Error("Overlays may not be stateful.");ge(this.state.overlays,{mode:te,modeSpec:j,opaque:H&&H.opaque,priority:H&&H.priority||0},function(de){return de.priority}),this.state.modeGen++,Un(this)}),removeOverlay:kn(function(j){for(var H=this.state.overlays,te=0;te<H.length;++te){var de=H[te].modeSpec;if(de==j||typeof j=="string"&&de.name==j){H.splice(te,1),this.state.modeGen++,Un(this);return}}}),indentLine:kn(function(j,H,te){typeof H!="string"&&typeof H!="number"&&(H==null?H=this.options.smartIndent?"smart":"prev":H=H?"add":"subtract"),kt(this.doc,j)&&ga(this,j,H,te)}),indentSelection:kn(function(j){for(var H=this.doc.sel.ranges,te=-1,de=0;de<H.length;de++){var ve=H[de];if(ve.empty())ve.head.line>te&&(ga(this,ve.head.line,j,!0),te=ve.head.line,de==this.doc.sel.primIndex&&Ni(this));else{var xe=ve.from(),Se=ve.to(),Ge=Math.max(te,xe.line);te=Math.min(this.lastLine(),Se.line-(Se.ch?0:1))+1;for(var Ye=Ge;Ye<te;++Ye)ga(this,Ye,j);var it=this.doc.sel.ranges;xe.ch==0&&H.length==it.length&&it[de].from().ch>0&&oo(this.doc,de,new Mr(xe,it[de].to()),ce)}}}),getTokenAt:function(j,H){return Ft(this,j,H)},getLineTokens:function(j,H){return Ft(this,st(j),H,!0)},getTokenTypeAt:function(j){j=Kt(this.doc,j);var H=oe(this,gt(this.doc,j.line)),te=0,de=(H.length-1)/2,ve=j.ch,xe;if(ve==0)xe=H[2];else for(;;){var Se=te+de>>1;if((Se?H[Se*2-1]:0)>=ve)de=Se;else if(H[Se*2+1]<ve)te=Se+1;else{xe=H[Se*2+2];break}}var Ge=xe?xe.indexOf("overlay "):-1;return Ge<0?xe:Ge==0?null:xe.slice(0,Ge-1)},getModeAt:function(j){var H=this.doc.mode;return H.innerMode?t.innerMode(H,this.getTokenAt(j).state).mode:H},getHelper:function(j,H){return this.getHelpers(j,H)[0]},getHelpers:function(j,H){var te=[];if(!F.hasOwnProperty(H))return te;var de=F[H],ve=this.getModeAt(j);if(typeof ve[H]=="string")de[ve[H]]&&te.push(de[ve[H]]);else if(ve[H])for(var xe=0;xe<ve[H].length;xe++){var Se=de[ve[H][xe]];Se&&te.push(Se)}else ve.helperType&&de[ve.helperType]?te.push(de[ve.helperType]):de[ve.name]&&te.push(de[ve.name]);for(var Ge=0;Ge<de._global.length;Ge++){var Ye=de._global[Ge];Ye.pred(ve,this)&&q(te,Ye.val)==-1&&te.push(Ye.val)}return te},getStateAfter:function(j,H){var te=this.doc;return j=yr(te,j==null?te.first+te.size-1:j),Fe(this,j+1,H).state},cursorCoords:function(j,H){var te,de=this.doc.sel.primary();return j==null?te=de.head:typeof j=="object"?te=Kt(this.doc,j):te=j?de.from():de.to(),ti(this,te,H||"page")},charCoords:function(j,H){return Fa(this,Kt(this.doc,j),H||"page")},coordsChar:function(j,H){return j=xo(this,j,H||"page"),Wa(this,j.left,j.top)},lineAtHeight:function(j,H){return j=xo(this,{top:j,left:0},H||"page").top,Jt(this.doc,j+this.display.viewOffset)},heightAtLine:function(j,H,te){var de=!1,ve;if(typeof j=="number"){var xe=this.doc.first+this.doc.size-1;j<this.doc.first?j=this.doc.first:j>xe&&(j=xe,de=!0),ve=gt(this.doc,j)}else ve=j;return va(this,ve,{top:0,left:0},H||"page",te||de).top+(de?this.doc.height-Dr(ve):0)},defaultTextHeight:function(){return Li(this.display)},defaultCharWidth:function(){return ki(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(j,H,te,de,ve){var xe=this.display;j=ti(this,Kt(this.doc,j));var Se=j.bottom,Ge=j.left;if(H.style.position="absolute",H.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(H),xe.sizer.appendChild(H),de=="over")Se=j.top;else if(de=="above"||de=="near"){var Ye=Math.max(xe.wrapper.clientHeight,this.doc.height),it=Math.max(xe.sizer.clientWidth,xe.lineSpace.clientWidth);(de=="above"||j.bottom+H.offsetHeight>Ye)&&j.top>H.offsetHeight?Se=j.top-H.offsetHeight:j.bottom+H.offsetHeight<=Ye&&(Se=j.bottom),Ge+H.offsetWidth>it&&(Ge=it-H.offsetWidth)}H.style.top=Se+"px",H.style.left=H.style.right="",ve=="right"?(Ge=xe.sizer.clientWidth-H.offsetWidth,H.style.right="0px"):(ve=="left"?Ge=0:ve=="middle"&&(Ge=(xe.sizer.clientWidth-H.offsetWidth)/2),H.style.left=Ge+"px"),te&&Js(this,{left:Ge,top:Se,right:Ge+H.offsetWidth,bottom:Se+H.offsetHeight})},triggerOnKeyDown:kn(Os),triggerOnKeyPress:kn(Rs),triggerOnKeyUp:As,triggerOnMouseDown:kn(Is),execCommand:function(j){if(ha.hasOwnProperty(j))return ha[j].call(null,this)},triggerElectric:kn(function(j){js(this,j)}),findPosH:function(j,H,te,de){var ve=1;H<0&&(ve=-1,H=-H);for(var xe=Kt(this.doc,j),Se=0;Se<H&&!(xe=go(this.doc,xe,ve,te,de),xe.hitSide);++Se);return xe},moveH:kn(function(j,H){var te=this;this.extendSelectionsBy(function(de){return te.display.shift||te.doc.extend||de.empty()?go(te.doc,de.head,j,H,te.options.rtlMoveVisually):j<0?de.from():de.to()},me)}),deleteH:kn(function(j,H){var te=this.doc.sel,de=this.doc;te.somethingSelected()?de.replaceSelection("",null,"+delete"):Ki(this,function(ve){var xe=go(de,ve.head,j,H,!1);return j<0?{from:xe,to:ve.head}:{from:ve.head,to:xe}})}),findPosV:function(j,H,te,de){var ve=1,xe=de;H<0&&(ve=-1,H=-H);for(var Se=Kt(this.doc,j),Ge=0;Ge<H;++Ge){var Ye=ti(this,Se,"div");if(xe==null?xe=Ye.left:Ye.left=xe,Se=Ws(this,Ye,ve,te),Se.hitSide)break}return Se},moveV:kn(function(j,H){var te=this,de=this.doc,ve=[],xe=!this.display.shift&&!de.extend&&de.sel.somethingSelected();if(de.extendSelectionsBy(function(Ge){if(xe)return j<0?Ge.from():Ge.to();var Ye=ti(te,Ge.head,"div");Ge.goalColumn!=null&&(Ye.left=Ge.goalColumn),ve.push(Ye.left);var it=Ws(te,Ye,j,H);return H=="page"&&Ge==de.sel.primary()&&$a(te,Fa(te,it,"div").top-Ye.top),it},me),ve.length)for(var Se=0;Se<de.sel.ranges.length;Se++)de.sel.ranges[Se].goalColumn=ve[Se]}),findWordAt:function(j){var H=this.doc,te=gt(H,j.line).text,de=j.ch,ve=j.ch;if(te){var xe=this.getHelper(j,"wordChars");(j.sticky=="before"||ve==te.length)&&de?--de:++ve;for(var Se=te.charAt(de),Ge=J(Se,xe)?function(Ye){return J(Ye,xe)}:/\s/.test(Se)?function(Ye){return/\s/.test(Ye)}:function(Ye){return!/\s/.test(Ye)&&!J(Ye)};de>0&&Ge(te.charAt(de-1));)--de;for(;ve<te.length&&Ge(te.charAt(ve));)++ve}return new Mr(st(j.line,de),st(j.line,ve))},toggleOverwrite:function(j){if(j!=null&&j==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?g(this.display.cursorDiv,"CodeMirror-overwrite"):O(this.display.cursorDiv,"CodeMirror-overwrite"),We(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==k()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:kn(function(j,H){Qi(this,j,H)}),getScrollInfo:function(){var j=this.display.scroller;return{left:j.scrollLeft,top:j.scrollTop,height:j.scrollHeight-mn(this)-this.display.barHeight,width:j.scrollWidth-mn(this)-this.display.barWidth,clientHeight:$n(this),clientWidth:An(this)}},scrollIntoView:kn(function(j,H){j==null?(j={from:this.doc.sel.primary().head,to:null},H==null&&(H=this.options.cursorScrollMargin)):typeof j=="number"?j={from:st(j,0),to:null}:j.from==null&&(j={from:j,to:null}),j.to||(j.to=j.from),j.margin=H||0,j.from.line!=null?Qs(this,j):ko(this,j.from,j.to,j.margin)}),setSize:kn(function(j,H){var te=this,de=function(xe){return typeof xe=="number"||/^\d+$/.test(String(xe))?xe+"px":xe};j!=null&&(this.display.wrapper.style.width=de(j)),H!=null&&(this.display.wrapper.style.height=de(H)),this.options.lineWrapping&&bo(this);var ve=this.display.viewFrom;this.doc.iter(ve,this.display.viewTo,function(xe){if(xe.widgets){for(var Se=0;Se<xe.widgets.length;Se++)if(xe.widgets[Se].noHScroll){di(te,ve,"widget");break}}++ve}),this.curOp.forceUpdate=!0,We(this,"refresh",this)}),operation:function(j){return Xn(this,j)},startOperation:function(){return Ci(this)},endOperation:function(){return Oi(this)},refresh:kn(function(){var j=this.display.cachedTextHeight;Un(this),this.curOp.forceUpdate=!0,$i(this),Qi(this,this.doc.scrollLeft,this.doc.scrollTop),Za(this.display),(j==null||Math.abs(j-Li(this.display))>.5||this.options.lineWrapping)&&za(this),We(this,"refresh",this)}),swapDoc:kn(function(j){var H=this.doc;return H.cm=null,this.state.selectingText&&this.state.selectingText(),Vo(this,j),$i(this),this.display.input.reset(),Qi(this,j.scrollLeft,j.scrollTop),this.curOp.forceScroll=!0,Zr(this,"swapDoc",this,H),H}),phrase:function(j){var H=this.options.phrases;return H&&Object.prototype.hasOwnProperty.call(H,j)?H[j]:j},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(t),t.registerHelper=function(j,H,te){F.hasOwnProperty(j)||(F[j]=t[j]={_global:[]}),F[j][H]=te},t.registerGlobalHelper=function(j,H,te,de){t.registerHelper(j,H,de),F[j]._global.push({pred:te,val:de})}}function go(t,s,F,j,H){var te=s,de=F,ve=gt(t,s.line),xe=H&&t.direction=="rtl"?-F:F;function Se(){var Gt=s.line+xe;return Gt<t.first||Gt>=t.first+t.size?!1:(s=new st(Gt,s.ch,s.sticky),ve=gt(t,Gt))}function Ge(Gt){var Mt;if(j=="codepoint"){var Vt=ve.text.charCodeAt(s.ch+(j>0?0:-1));isNaN(Vt)?Mt=null:Mt=new st(s.line,Math.max(0,Math.min(ve.text.length,s.ch+F*(Vt>=55296&&Vt<56320?2:1))),-F)}else H?Mt=Nl(t.cm,ve,s,F):Mt=lo(ve,s,F);if(Mt==null)if(!Gt&&Se())s=uo(H,t.cm,ve,s.line,xe);else return!1;else s=Mt;return!0}if(j=="char"||j=="codepoint")Ge();else if(j=="column")Ge(!0);else if(j=="word"||j=="group")for(var Ye=null,it=j=="group",et=t.cm&&t.cm.getHelper(s,"wordChars"),vt=!0;!(F<0&&!Ge(!vt));vt=!1){var Et=ve.text.charAt(s.ch)||`
|
|
|
`,At=J(Et,et)?"w":it&&Et==`
|
|
|
`?"n":!it||/\s/.test(Et)?null:"p";if(it&&!vt&&!At&&(At="s"),Ye&&Ye!=At){F<0&&(F=1,Ge(),s.sticky="after");break}if(At&&(Ye=At),F>0&&!Ge(!vt))break}var Nt=Ra(t,s,te,de,!0);return Ct(te,Nt)&&(Nt.hitSide=!0),Nt}function Ws(t,s,F,j){var H=t.doc,te=s.left,de;if(j=="page"){var ve=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),xe=Math.max(ve-.5*Li(t.display),3);de=(F>0?s.bottom:s.top)+F*xe}else j=="line"&&(de=F>0?s.bottom+3:s.top-3);for(var Se;!(Se=Wa(t,te,de),!Se.outside);){if(F<0?de<=0:de>=H.height){Se.hitSide=!0;break}de+=F*5}return Se}var Fr=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Fr.prototype.init=function(t){var s=this,F=this,j=F.cm,H=F.div=t.lineDiv;Fs(H,j.options.spellcheck,j.options.autocorrect,j.options.autocapitalize);function te(ve){for(var xe=ve.target;xe;xe=xe.parentNode){if(xe==H)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(xe.className))break}return!1}Re(H,"paste",function(ve){if(!te(ve)||ze(j,ve)||Ms(ve,j))return;T<=11&&setTimeout(_n(j,function(){return s.updateFromDOM()}),20)}),Re(H,"compositionstart",function(ve){s.composing={data:ve.data,done:!1}}),Re(H,"compositionupdate",function(ve){s.composing||(s.composing={data:ve.data,done:!1})}),Re(H,"compositionend",function(ve){s.composing&&(ve.data!=s.composing.data&&s.readFromDOMSoon(),s.composing.done=!0)}),Re(H,"touchstart",function(){return F.forceCompositionEnd()}),Re(H,"input",function(){s.composing||s.readFromDOMSoon()});function de(ve){if(!te(ve)||ze(j,ve))return;if(j.somethingSelected())Na({lineWise:!1,text:j.getSelections()}),ve.type=="cut"&&j.replaceSelection("",null,"cut");else if(j.options.lineWiseCopyCut){var xe=Us(j);Na({lineWise:!0,text:xe.text}),ve.type=="cut"&&j.operation(function(){j.setSelections(xe.ranges,0,ce),j.replaceSelection("",null,"cut")})}else return;if(ve.clipboardData){ve.clipboardData.clearData();var Se=ni.text.join(`
|
|
|
`);if(ve.clipboardData.setData("Text",Se),ve.clipboardData.getData("Text")==Se){ve.preventDefault();return}}var Ge=Bs(),Ye=Ge.firstChild;j.display.lineSpace.insertBefore(Ge,j.display.lineSpace.firstChild),Ye.value=ni.text.join(`
|
|
|
`);var it=document.activeElement;C(Ye),setTimeout(function(){j.display.lineSpace.removeChild(Ge),it.focus(),it==H&&F.showPrimarySelection()},50)}Re(H,"copy",de),Re(H,"cut",de)},Fr.prototype.screenReaderLabelChanged=function(t){t?this.div.setAttribute("aria-label",t):this.div.removeAttribute("aria-label")},Fr.prototype.prepareSelection=function(){var t=Ao(this.cm,!1);return t.focus=document.activeElement==this.div,t},Fr.prototype.showSelection=function(t,s){if(!t||!this.cm.display.view.length)return;(t.focus||s)&&this.showPrimarySelection(),this.showMultipleSelections(t)},Fr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Fr.prototype.showPrimarySelection=function(){var t=this.getSelection(),s=this.cm,F=s.doc.sel.primary(),j=F.from(),H=F.to();if(s.display.viewTo==s.display.viewFrom||j.line>=s.display.viewTo||H.line<s.display.viewFrom){t.removeAllRanges();return}var te=Ma(s,t.anchorNode,t.anchorOffset),de=Ma(s,t.focusNode,t.focusOffset);if(te&&!te.bad&&de&&!de.bad&&pt(tr(te,de),j)==0&&pt(Tt(te,de),H)==0)return;var ve=s.display.view,xe=j.line>=s.display.viewFrom&&Hs(s,j)||{node:ve[0].measure.map[2],offset:0},Se=H.line<s.display.viewTo&&Hs(s,H);if(!Se){var Ge=ve[ve.length-1].measure,Ye=Ge.maps?Ge.maps[Ge.maps.length-1]:Ge.map;Se={node:Ye[Ye.length-1],offset:Ye[Ye.length-2]-Ye[Ye.length-3]}}if(!xe||!Se){t.removeAllRanges();return}var it=t.rangeCount&&t.getRangeAt(0),et;try{et=I(xe.node,xe.offset,Se.offset,Se.node)}catch(vt){}et&&(!G&&s.state.focused?(t.collapse(xe.node,xe.offset),et.collapsed||(t.removeAllRanges(),t.addRange(et))):(t.removeAllRanges(),t.addRange(et)),it&&t.anchorNode==null?t.addRange(it):G&&this.startGracePeriod()),this.rememberSelection()},Fr.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation(function(){return t.cm.curOp.selectionChanged=!0})},20)},Fr.prototype.showMultipleSelections=function(t){D(this.cm.display.cursorDiv,t.cursors),D(this.cm.display.selectionDiv,t.selection)},Fr.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},Fr.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var s=t.getRangeAt(0).commonAncestorContainer;return u(this.div,s)},Fr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Fr.prototype.blur=function(){this.div.blur()},Fr.prototype.getField=function(){return this.div},Fr.prototype.supportsTouch=function(){return!0},Fr.prototype.receivedFocus=function(){var t=this;this.selectionInEditor()?this.pollSelection():Xn(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function s(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,s))}this.polling.set(this.cm.options.pollInterval,s)},Fr.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},Fr.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var t=this.getSelection(),s=this.cm;if(v&&l&&this.cm.display.gutterSpecs.length&&tu(t.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var F=Ma(s,t.anchorNode,t.anchorOffset),j=Ma(s,t.focusNode,t.focusOffset);F&&j&&Xn(s,function(){Rn(s.doc,fi(F,j),ce),(F.bad||j.bad)&&(s.curOp.selectionChanged=!0)})},Fr.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t=this.cm,s=t.display,F=t.doc.sel.primary(),j=F.from(),H=F.to();if(j.ch==0&&j.line>t.firstLine()&&(j=st(j.line-1,gt(t.doc,j.line-1).length)),H.ch==gt(t.doc,H.line).text.length&&H.line<t.lastLine()&&(H=st(H.line+1,0)),j.line<s.viewFrom||H.line>s.viewTo-1)return!1;var te,de,ve;j.line==s.viewFrom||(te=wi(t,j.line))==0?(de=St(s.view[0].line),ve=s.view[0].node):(de=St(s.view[te].line),ve=s.view[te-1].node.nextSibling);var xe=wi(t,H.line),Se,Ge;if(xe==s.view.length-1?(Se=s.viewTo-1,Ge=s.lineDiv.lastChild):(Se=St(s.view[xe+1].line)-1,Ge=s.view[xe+1].node.previousSibling),!ve)return!1;for(var Ye=t.doc.splitLines(ru(t,ve,Ge,de,Se)),it=Ut(t.doc,st(de,0),st(Se,gt(t.doc,Se).text.length));Ye.length>1&&it.length>1;)if(_e(Ye)==_e(it))Ye.pop(),it.pop(),Se--;else if(Ye[0]==it[0])Ye.shift(),it.shift(),de++;else break;for(var et=0,vt=0,Et=Ye[0],At=it[0],Nt=Math.min(Et.length,At.length);et<Nt&&Et.charCodeAt(et)==At.charCodeAt(et);)++et;for(var Gt=_e(Ye),Mt=_e(it),Vt=Math.min(Gt.length-(Ye.length==1?et:0),Mt.length-(it.length==1?et:0));vt<Vt&&Gt.charCodeAt(Gt.length-vt-1)==Mt.charCodeAt(Mt.length-vt-1);)++vt;if(Ye.length==1&&it.length==1&&de==j.line)for(;et&&et>j.ch&&Gt.charCodeAt(Gt.length-vt-1)==Mt.charCodeAt(Mt.length-vt-1);)et--,vt++;Ye[Ye.length-1]=Gt.slice(0,Gt.length-vt).replace(/^\u200b+/,""),Ye[0]=Ye[0].slice(et).replace(/\u200b+$/,"");var or=st(de,et),qt=st(Se,it.length?_e(it).length-vt:0);if(Ye.length>1||Ye[0]||pt(or,qt))return Bi(t.doc,Ye,or,qt,"+input"),!0},Fr.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fr.prototype.reset=function(){this.forceCompositionEnd()},Fr.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Fr.prototype.readFromDOMSoon=function(){var t=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing)if(t.composing.done)t.composing=null;else return;t.updateFromDOM()},80)},Fr.prototype.updateFromDOM=function(){var t=this;(this.cm.isReadOnly()||!this.pollContent())&&Xn(this.cm,function(){return Un(t.cm)})},Fr.prototype.setUneditable=function(t){t.contentEditable="false"},Fr.prototype.onKeyPress=function(t){if(t.charCode==0||this.composing)return;t.preventDefault(),this.cm.isReadOnly()||_n(this.cm,mo)(this.cm,String.fromCharCode(t.charCode==null?t.keyCode:t.charCode),0)},Fr.prototype.readOnlyChanged=function(t){this.div.contentEditable=String(t!="nocursor")},Fr.prototype.onContextMenu=function(){},Fr.prototype.resetPosition=function(){},Fr.prototype.needsContentAttribute=!0;function Hs(t,s){var F=Qt(t,s.line);if(!F||F.hidden)return null;var j=gt(t.doc,s.line),H=Mn(F,j,s.line),te=je(j,t.doc.direction),de="left";if(te){var ve=Oe(te,s.ch);de=ve%2?"right":"left"}var xe=zn(H.map,s.ch,de);return xe.offset=xe.collapse=="right"?xe.end:xe.start,xe}function tu(t){for(var s=t;s;s=s.parentNode)if(/CodeMirror-gutter-wrapper/.test(s.className))return!0;return!1}function zi(t,s){return s&&(t.bad=!0),t}function ru(t,s,F,j,H){var te="",de=!1,ve=t.doc.lineSeparator(),xe=!1;function Se(et){return function(vt){return vt.id==et}}function Ge(){de&&(te+=ve,xe&&(te+=ve),de=xe=!1)}function Ye(et){et&&(Ge(),te+=et)}function it(et){if(et.nodeType==1){var vt=et.getAttribute("cm-text");if(vt){Ye(vt);return}var Et=et.getAttribute("cm-marker"),At;if(Et){var Nt=t.findMarks(st(j,0),st(H+1,0),Se(+Et));Nt.length&&(At=Nt[0].find(0))&&Ye(Ut(t.doc,At.from,At.to).join(ve));return}if(et.getAttribute("contenteditable")=="false")return;var Gt=/^(pre|div|p|li|table|br)$/i.test(et.nodeName);if(!/^br$/i.test(et.nodeName)&&et.textContent.length==0)return;Gt&&Ge();for(var Mt=0;Mt<et.childNodes.length;Mt++)it(et.childNodes[Mt]);/^(pre|p)$/i.test(et.nodeName)&&(xe=!0),Gt&&(de=!0)}else et.nodeType==3&&Ye(et.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(it(s),s==F);)s=s.nextSibling,xe=!1;return te}function Ma(t,s,F){var j;if(s==t.display.lineDiv){if(j=t.display.lineDiv.childNodes[F],!j)return zi(t.clipPos(st(t.display.viewTo-1)),!0);s=null,F=0}else for(j=s;;j=j.parentNode){if(!j||j==t.display.lineDiv)return null;if(j.parentNode&&j.parentNode==t.display.lineDiv)break}for(var H=0;H<t.display.view.length;H++){var te=t.display.view[H];if(te.node==j)return nu(te,s,F)}}function nu(t,s,F){var j=t.text.firstChild,H=!1;if(!s||!u(j,s))return zi(st(St(t.line),0),!0);if(s==j&&(H=!0,s=j.childNodes[F],F=0,!s)){var te=t.rest?_e(t.rest):t.line;return zi(st(St(te),te.text.length),H)}var de=s.nodeType==3?s:null,ve=s;for(!de&&s.childNodes.length==1&&s.firstChild.nodeType==3&&(de=s.firstChild,F&&(F=de.nodeValue.length));ve.parentNode!=j;)ve=ve.parentNode;var xe=t.measure,Se=xe.maps;function Ge(At,Nt,Gt){for(var Mt=-1;Mt<(Se?Se.length:0);Mt++)for(var Vt=Mt<0?xe.map:Se[Mt],or=0;or<Vt.length;or+=3){var qt=Vt[or+2];if(qt==At||qt==Nt){var Sr=St(Mt<0?t.line:t.rest[Mt]),Gr=Vt[or]+Gt;return(Gt<0||qt!=At)&&(Gr=Vt[or+(Gt?1:0)]),st(Sr,Gr)}}}var Ye=Ge(de,ve,F);if(Ye)return zi(Ye,H);for(var it=ve.nextSibling,et=de?de.nodeValue.length-F:0;it;it=it.nextSibling){if(Ye=Ge(it,it.firstChild,0),Ye)return zi(st(Ye.line,Ye.ch-et),H);et+=it.textContent.length}for(var vt=ve.previousSibling,Et=F;vt;vt=vt.previousSibling){if(Ye=Ge(vt,vt.firstChild,-1),Ye)return zi(st(Ye.line,Ye.ch+Et),H);Et+=vt.textContent.length}}var un=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new z,this.hasSelection=!1,this.composing=null};un.prototype.init=function(t){var s=this,F=this,j=this.cm;this.createField(t);var H=this.textarea;t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),c&&(H.style.width="0px"),Re(H,"input",function(){i&&T>=9&&s.hasSelection&&(s.hasSelection=null),F.poll()}),Re(H,"paste",function(de){if(ze(j,de)||Ms(de,j))return;j.state.pasteIncoming=+new Date,F.fastPoll()});function te(de){if(ze(j,de))return;if(j.somethingSelected())Na({lineWise:!1,text:j.getSelections()});else if(j.options.lineWiseCopyCut){var ve=Us(j);Na({lineWise:!0,text:ve.text}),de.type=="cut"?j.setSelections(ve.ranges,null,ce):(F.prevInput="",H.value=ve.text.join(`
|
|
|
`),C(H))}else return;de.type=="cut"&&(j.state.cutIncoming=+new Date)}Re(H,"cut",te),Re(H,"copy",te),Re(t.scroller,"paste",function(de){if(ln(t,de)||ze(j,de))return;if(!H.dispatchEvent){j.state.pasteIncoming=+new Date,F.focus();return}var ve=new Event("paste");ve.clipboardData=de.clipboardData,H.dispatchEvent(ve)}),Re(t.lineSpace,"selectstart",function(de){ln(t,de)||we(de)}),Re(H,"compositionstart",function(){var de=j.getCursor("from");F.composing&&F.composing.range.clear(),F.composing={start:de,range:j.markText(de,j.getCursor("to"),{className:"CodeMirror-composing"})}}),Re(H,"compositionend",function(){F.composing&&(F.poll(),F.composing.range.clear(),F.composing=null)})},un.prototype.createField=function(t){this.wrapper=Bs(),this.textarea=this.wrapper.firstChild},un.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},un.prototype.prepareSelection=function(){var t=this.cm,s=t.display,F=t.doc,j=Ao(t);if(t.options.moveInputWithCursor){var H=ti(t,F.sel.primary().head,"div"),te=s.wrapper.getBoundingClientRect(),de=s.lineDiv.getBoundingClientRect();j.teTop=Math.max(0,Math.min(s.wrapper.clientHeight-10,H.top+de.top-te.top)),j.teLeft=Math.max(0,Math.min(s.wrapper.clientWidth-10,H.left+de.left-te.left))}return j},un.prototype.showSelection=function(t){var s=this.cm,F=s.display;D(F.cursorDiv,t.cursors),D(F.selectionDiv,t.selection),t.teTop!=null&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},un.prototype.reset=function(t){if(this.contextMenuPending||this.composing)return;var s=this.cm;if(s.somethingSelected()){this.prevInput="";var F=s.getSelection();this.textarea.value=F,s.state.focused&&C(this.textarea),i&&T>=9&&(this.hasSelection=F)}else t||(this.prevInput=this.textarea.value="",i&&T>=9&&(this.hasSelection=null))},un.prototype.getField=function(){return this.textarea},un.prototype.supportsTouch=function(){return!1},un.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!f||k()!=this.textarea))try{this.textarea.focus()}catch(t){}},un.prototype.blur=function(){this.textarea.blur()},un.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},un.prototype.receivedFocus=function(){this.slowPoll()},un.prototype.slowPoll=function(){var t=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},un.prototype.fastPoll=function(){var t=!1,s=this;s.pollingFast=!0;function F(){var j=s.poll();!j&&!t?(t=!0,s.polling.set(60,F)):(s.pollingFast=!1,s.slowPoll())}s.polling.set(20,F)},un.prototype.poll=function(){var t=this,s=this.cm,F=this.textarea,j=this.prevInput;if(this.contextMenuPending||!s.state.focused||rt(F)&&!j&&!this.composing||s.isReadOnly()||s.options.disableInput||s.state.keySeq)return!1;var H=F.value;if(H==j&&!s.somethingSelected())return!1;if(i&&T>=9&&this.hasSelection===H||y&&/[\uf700-\uf7ff]/.test(H))return s.display.input.reset(),!1;if(s.doc.sel==s.display.selForContextMenu){var te=H.charCodeAt(0);if(te==8203&&!j&&(j="\u200B"),te==8666)return this.reset(),this.cm.execCommand("undo")}for(var de=0,ve=Math.min(j.length,H.length);de<ve&&j.charCodeAt(de)==H.charCodeAt(de);)++de;return Xn(s,function(){mo(s,H.slice(de),j.length-de,null,t.composing?"*compose":null),H.length>1e3||H.indexOf(`
|
|
|
`)>-1?F.value=t.prevInput="":t.prevInput=H,t.composing&&(t.composing.range.clear(),t.composing.range=s.markText(t.composing.start,s.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},un.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},un.prototype.onKeyPress=function(){i&&T>=9&&(this.hasSelection=null),this.fastPoll()},un.prototype.onContextMenu=function(t){var s=this,F=s.cm,j=F.display,H=s.textarea;s.contextMenuPending&&s.contextMenuPending();var te=xi(F,t),de=j.scroller.scrollTop;if(!te||_)return;var ve=F.options.resetSelectionOnContextMenu;ve&&F.doc.sel.contains(te)==-1&&_n(F,Rn)(F.doc,fi(te),ce);var xe=H.style.cssText,Se=s.wrapper.style.cssText,Ge=s.wrapper.offsetParent.getBoundingClientRect();s.wrapper.style.cssText="position: static",H.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(t.clientY-Ge.top-5)+"px; left: "+(t.clientX-Ge.left-5)+`px;
|
|
|
z-index: 1000; background: `+(i?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ye;e&&(Ye=window.scrollY),j.input.focus(),e&&window.scrollTo(null,Ye),j.input.reset(),F.somethingSelected()||(H.value=s.prevInput=" "),s.contextMenuPending=et,j.selForContextMenu=F.doc.sel,clearTimeout(j.detectingSelectAll);function it(){if(H.selectionStart!=null){var Et=F.somethingSelected(),At="\u200B"+(Et?H.value:"");H.value="\u21DA",H.value=At,s.prevInput=Et?"":"\u200B",H.selectionStart=1,H.selectionEnd=At.length,j.selForContextMenu=F.doc.sel}}function et(){if(s.contextMenuPending!=et)return;if(s.contextMenuPending=!1,s.wrapper.style.cssText=Se,H.style.cssText=xe,i&&T<9&&j.scrollbars.setScrollTop(j.scroller.scrollTop=de),H.selectionStart!=null){(!i||i&&T<9)&&it();var Et=0,At=function(){j.selForContextMenu==F.doc.sel&&H.selectionStart==0&&H.selectionEnd>0&&s.prevInput=="\u200B"?_n(F,os)(F):Et++<10?j.detectingSelectAll=setTimeout(At,500):(j.selForContextMenu=null,j.input.reset())};j.detectingSelectAll=setTimeout(At,200)}}if(i&&T>=9&&it(),x){Le(t);var vt=function(){Qe(window,"mouseup",vt),setTimeout(et,20)};Re(window,"mouseup",vt)}else setTimeout(et,50)},un.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled=t=="nocursor",this.textarea.readOnly=!!t},un.prototype.setUneditable=function(){},un.prototype.needsContentAttribute=!1;function iu(t,s){if(s=s?p(s):{},s.value=t.value,!s.tabindex&&t.tabIndex&&(s.tabindex=t.tabIndex),!s.placeholder&&t.placeholder&&(s.placeholder=t.placeholder),s.autofocus==null){var F=k();s.autofocus=F==t||t.getAttribute("autofocus")!=null&&F==document.body}function j(){t.value=ve.getValue()}var H;if(t.form&&(Re(t.form,"submit",j),!s.leaveSubmitMethodAlone)){var te=t.form;H=te.submit;try{var de=te.submit=function(){j(),te.submit=H,te.submit(),te.submit=de}}catch(xe){}}s.finishInit=function(xe){xe.save=j,xe.getTextArea=function(){return t},xe.toTextArea=function(){xe.toTextArea=isNaN,j(),t.parentNode.removeChild(xe.getWrapperElement()),t.style.display="",t.form&&(Qe(t.form,"submit",j),!s.leaveSubmitMethodAlone&&typeof t.form.submit=="function"&&(t.form.submit=H))}},t.style.display="none";var ve=Yr(function(xe){return t.parentNode.insertBefore(xe,t.nextSibling)},s);return ve}function au(t){t.off=Qe,t.on=Re,t.wheelEventPixels=hl,t.Doc=Fn,t.splitLines=at,t.countColumn=U,t.findColumn=be,t.isWordChar=Q,t.Pass=re,t.signal=We,t.Line=cn,t.changeEnd=pi,t.scrollbarModel=Mo,t.Pos=st,t.cmpPos=pt,t.modes=yt,t.mimeModes=ft,t.resolveMode=Wt,t.getMode=wt,t.modeExtensions=lt,t.extendMode=_t,t.copyState=jt,t.startState=ct,t.innerMode=Ht,t.commands=ha,t.keyMap=li,t.keyName=xs,t.isModifierKey=_s,t.lookupKey=Hi,t.normalizeKeyMap=Pl,t.StringStream=bt,t.SharedTextMarker=ua,t.TextMarker=gi,t.LineWidget=la,t.e_preventDefault=we,t.e_stopPropagation=Ae,t.e_stop=Le,t.addClass=g,t.contains=u,t.rmClass=O,t.keyNames=vi}Jl(Yr),eu(Yr);var ou="iter insert remove copy getEditor constructor".split(" ");for(var ja in Fn.prototype)Fn.prototype.hasOwnProperty(ja)&&q(ou,ja)<0&&(Yr.prototype[ja]=function(t){return function(){return t.apply(this.doc,arguments)}}(Fn.prototype[ja]));return Be(Fn),Yr.inputStyles={textarea:un,contenteditable:Fr},Yr.defineMode=function(t){!Yr.defaults.mode&&t!="null"&&(Yr.defaults.mode=t),ht.apply(this,arguments)},Yr.defineMIME=Rt,Yr.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Yr.defineMIME("text/plain","null"),Yr.defineExtension=function(t,s){Yr.prototype[t]=s},Yr.defineDocExtension=function(t,s){Fn.prototype[t]=s},Yr.fromTextArea=iu,au(Yr),Yr.version="5.58.2",Yr})},WYAk:function(W,ee,L){(function(B,M){W.exports=ee=M(L("Ib8C"))})(this,function(B){(function(){var M=B,G=M.lib,X=G.Base,K=M.enc,N=K.Utf8,i=M.algo,T=i.HMAC=X.extend({init:function(e,E){e=this._hasher=new e.init,typeof E=="string"&&(E=N.parse(E));var l=e.blockSize,_=l*4;E.sigBytes>_&&(E=e.finalize(E)),E.clamp();for(var r=this._oKey=E.clone(),n=this._iKey=E.clone(),o=r.words,c=n.words,v=0;v<l;v++)o[v]^=1549556828,c[v]^=909522486;r.sigBytes=n.sigBytes=_,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 E=this._hasher,l=E.finalize(e);E.reset();var _=E.finalize(this._oKey.clone().concat(l));return _}})})()})},YA0V:function(W,ee,L){"use strict";L.d(ee,"a",function(){return i});var B=L("T/Jt"),M=L.n(B),G=L("Dpym"),X=L("3GYr"),K=L("0lMV");function N(T){var e=T.children,E=T.stickyOffsets,l=T.flattenColumns,_=B.useContext(G.a),r=_.prefixCls,n=l.length-1,o=l[n],c=B.useMemo(function(){return{stickyOffsets:E,flattenColumns:l,scrollColumnIndex:(o==null?void 0:o.scrollbar)?n:null}},[o,l,n,E]);return B.createElement(K.a.Provider,{value:c},B.createElement("tfoot",{className:"".concat(r,"-summary")},e))}ee.b=N;var i=X.a},YLkp:function(W,ee,L){"use strict";function B(M){return null}ee.a=B},ZD9Y:function(W,ee,L){"use strict";var B=L("s2St"),M=L("KUJN"),G=L("FrBR"),X=L("SCzF"),K=L("T/Jt"),N=L.n(K),i=L("lOMy"),T=L.n(i),e=X.a.Option;ee.a=function(E){var l=E.onFontSizeChange,_=E.cmFontSize,r=E.cmCodeMode,n=E.onCodeModeChange,o=E.onTabToSpace,c=E.className,v=c===void 0?"":c,f=E.tabToSpace,y=E.children;return N.a.createElement("div",{className:"tpi-code-setting ".concat(v)},N.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),N.a.createElement("section",null,N.a.createElement("div",{className:"file-item"},N.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),N.a.createElement(X.a,{bordered:!1,size:"small",value:r,onChange:n},N.a.createElement(e,{value:"vs"},"\u767D\u8272\u80CC\u666F"),N.a.createElement(e,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),N.a.createElement("div",{className:"file-item"},N.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),N.a.createElement(X.a,{bordered:!1,size:"small",value:_,onChange:l},N.a.createElement(e,{value:12},"12px"),N.a.createElement(e,{value:14},"14px"),N.a.createElement(e,{value:16},"16px"),N.a.createElement(e,{value:18},"18px"),N.a.createElement(e,{value:20},"20px"),N.a.createElement(e,{value:22},"22px"))),N.a.createElement("div",{className:"file-item"},N.a.createElement("b",null,"Tab\u8F6C\u6362"),N.a.createElement(M.a,{checked:f,onChange:o}))),N.a.createElement("h3",null,"\u5FEB\u6377\u952E"),N.a.createElement("section",null,N.a.createElement("div",{className:"file-item"},N.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),N.a.createElement("span",null,"Ctrl + S")),N.a.createElement("div",{className:"file-item"},N.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),N.a.createElement("span",null,"F1 / Alt + F1")),N.a.createElement("div",{className:"file-item"},N.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),N.a.createElement("span",null,"Ctrl + ]/[")),N.a.createElement("div",{className:"file-item"},N.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),N.a.createElement("span",null,"Ctrl + Shift + \\")),N.a.createElement("div",{className:"file-item"},N.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),N.a.createElement("span",null,"Home")),N.a.createElement("div",{className:"file-item"},N.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),N.a.createElement("span",null,"End"))),y)}},ZW9T:function(W,ee,L){"use strict";L.d(ee,"a",function(){return S});var B=L("YaWb"),M=L("nc60"),G=L("8OG5"),X=L("mgsT"),K=L("sh+1"),N=L("Hqw+"),i=L("ftSv"),T=L("T/Jt"),e=L.n(T),E=L("bdgK"),l=L("IYef"),_=L("XXmO"),r=L.n(_),n={keywords:["print","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"]},o={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},c={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
|
`)}]},v={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
|
`)}]},f=L("5VLF"),y=L.n(f),h={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},b=function(U,z){return z.map(function(q){return{label:q,kind:U.languages.CompletionItemKind.Keyword,insertText:q}})},m=function(U){return Object.keys(h.tables).map(function(z){return{label:z,kind:U.languages.CompletionItemKind.Variable,insertText:z}})},d=function(U,z){var q=h.tables[U];return q?q.map(function($){return{label:$,kind:z.languages.CompletionItemKind.Field,insertText:$}}):[]};function x(p,U,z,q,$){var re=U.getWordUntilPosition(z),ce={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:re.startColumn,endColumn:re.endColumn},ne=q.map(function(me){return{label:me,kind:p.languages.CompletionItemKind.Keyword,insertText:me,insertTextRules:p.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}});return $.map(function(me){ne.push(Object(B.a)(Object(B.a)({},me),{},{range:ce}))}),ne}var R=function(p){h.languages.map(function($){return p.languages.registerDocumentFormattingEditProvider($,{provideDocumentFormattingEdits:function(ce,ne,me){return Object(l.a)(r.a.mark(function be(){var he;return r.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:return he=y()(ce.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),_e.abrupt("return",[{range:ce.getFullModelRange(),text:he}]);case 2:case"end":return _e.stop()}},be)}))()}}),$});var U=c.quickKey.map(function($){return{label:$.label,kind:p.languages.CompletionItemKind.Method,insertText:$.content,insertTextRules:p.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),z=v.quickKey.map(function($){return{label:$.label,kind:p.languages.CompletionItemKind.Method,insertText:$.content,insertTextRules:p.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),q=o.quickKey.map(function($){return{label:$.label,kind:p.languages.CompletionItemKind.Method,insertText:$.content,insertTextRules:p.languages.CompletionItemInsertTextRule.InsertAsSnippet}});p.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(re,ce){var ne=re.getWordUntilPosition(ce),me={startLineNumber:ce.lineNumber,endLineNumber:ce.lineNumber,startColumn:ne.startColumn,endColumn:ne.endColumn},be=re.getLineContent(ce.lineNumber).substring(ne.startColumn-2,ne.endColumn);return{suggestions:[].concat(Object(M.a)(c.keywords.map(function(he){return{label:he,kind:p.languages.CompletionItemKind.Function,documentation:he,insertText:he,insertTextRules:p.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:me}})),Object(M.a)(c.quickKey.map(function(he){return{label:he.label,kind:p.languages.CompletionItemKind.Function,documentation:he.content,insertText:be.startsWith("#")?he.content.replace(/#/,""):he.content,insertTextRules:p.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:me}})))}}}),p.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(re,ce){var ne=re.getWordUntilPosition(ce),me={startLineNumber:ce.lineNumber,endLineNumber:ce.lineNumber,startColumn:ne.startColumn,endColumn:ne.endColumn};return{suggestions:Object(M.a)(n.keywords.map(function(be){return{label:be,kind:p.languages.CompletionItemKind.Function,documentation:be,insertText:be,insertTextRules:p.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:me}}))}}}),p.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(re,ce){var ne=re.getWordUntilPosition(ce),me={startLineNumber:ce.lineNumber,endLineNumber:ce.lineNumber,startColumn:ne.startColumn,endColumn:ne.endColumn},be=re.getLineContent(ce.lineNumber).substring(ne.startColumn-2,ne.endColumn);return{suggestions:[].concat(Object(M.a)(o.keywords.map(function(he){return{label:he,kind:p.languages.CompletionItemKind.Function,documentation:he,insertText:he,insertTextRules:p.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:me}})),Object(M.a)(o.quickKey.map(function(he){return{label:he.label,kind:p.languages.CompletionItemKind.Function,documentation:he.content,insertText:be.startsWith("#")?he.content.replace(/#/,""):he.content,insertTextRules:p.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:me}})))}}}),p.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(re,ce){var ne=re.getWordUntilPosition(ce),me={startLineNumber:ce.lineNumber,endLineNumber:ce.lineNumber,startColumn:ne.startColumn,endColumn:ne.endColumn},be=re.getLineContent(ce.lineNumber).substring(ne.startColumn-2,ne.endColumn);return{suggestions:[].concat(Object(M.a)(v.keywords.map(function(he){return{label:he,kind:p.languages.CompletionItemKind.Function,documentation:he,insertText:he,insertTextRules:p.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:me}})),Object(M.a)(v.quickKey.map(function(he){return{label:he.label,kind:p.languages.CompletionItemKind.Function,documentation:he.content,insertText:be.startsWith("#")?he.content.replace(/#/,""):he.content,insertTextRules:p.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:me}})))}}})},O="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",w=L("fjLI"),D=L("LvDl"),A=L("+ua5");function P(p){return/^\d+$/.test(p)?"".concat(p,"px"):p}function I(){}var u=!1,k={"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 g(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],U=p;if(Array.isArray(p)){for(var z=0;z<p.length;z++){var q=k[p[z]];if(q)return q}return U[0]}return k[U]||U}var a=null,C=ee.b=function(p){var U=p.width,z=U===void 0?"100%":U,q=p.height,$=q===void 0?"100%":q,re=p.value,ce=p.language,ne=ce===void 0?"javascript":ce,me=p.style,be=me===void 0?{}:me,he=p.options,se=he===void 0?{}:he,_e=p.overrideServices,De=_e===void 0?{}:_e,ge=p.theme,fe=ge===void 0?"vs-dark":ge,Ce=p.onEditBlur,ae=p.onSave,Q=p.autoHeight,J=Q===void 0?!1:Q,Z=p.forbidCopy,pe=Z===void 0?!1:Z,le=p.onChange,ye=le===void 0?I:le,Te=p.editorDidMount,Pe=Te===void 0?I:Te,He=p.onFocus,Oe=He===void 0?I:He,Ue=p.filename,je=Ue===void 0?"educoder.txt":Ue,Ve=p.errorLine,Re=p.errorContent,Xe=Re===void 0?"":Re,Qe=Object(i.a)(p,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),We=Object(T.useRef)(),ze=Object(T.useRef)({}),Me=Object(T.useRef)(),Ie=Object(T.useRef)(),Be=Object(T.useRef)(!1),we=Object(T.useRef)(),Ae=Object(T.useState)(!1),ke=Object(N.a)(Ae,2),Le=ke[0],Ke=ke[1];function Ze(){var lt;return We.current&&(lt=new E.a(function(_t){var jt=Object(K.a)(_t),Ht;try{for(jt.s();!(Ht=jt.n()).done;){var ct=Ht.value;(ct.target.offsetHeight>0||ct.target.offsetWidth>0)&&ze.current.instance.layout()}}catch(bt){jt.e(bt)}finally{jt.f()}}),lt.observe(We.current)),lt}function Ne(){X.b.warn(decodeURIComponent(O))}var $e=function(){var _t=ze.current.instance;if(re!=null&&_t&&Le){var jt=_t.getModel();jt&&re!==jt.getValue()&&(u=!0,jt.setValue(re),_t.layout(),u=!1)}};Object(T.useEffect)(function(){Ie.current&&clearTimeout(Ie.current),Ie.current=setTimeout(function(){$e()},500)},[re,Le,ze.current]),Object(T.useEffect)(function(){if(Ve&&ze.current&&ze.current.instance){var lt=ze.current.instance;lt.changeViewZones(function(jt){var Ht=document.createElement("div");Ht.style.padding="10px 20px",Ht.style.width="calc(100% - 20px)",Ht.className="my-error-line-wrp",Ht.innerHTML=Xe,jt.addZone({afterLineNumber:Ve||11,heightInLines:3,domNode:Ht})});var _t={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};lt.addOverlayWidget(_t),lt.revealPositionInCenter({lineNumber:20,column:1})}},[Ve,ze.current,Le]);function Je(){var lt=ze.current.instance;if(lt){var _t=lt.getSelection(),jt=ze.current.pastePos||{},Ht=new a.Range(jt.startLineNumber||_t.endLineNumber,jt.startColumn||_t.endColumn,jt.endLineNumber||_t.endLineNumber,jt.endColumn||_t.endColumn);setTimeout(function(){lt.executeEdits("",[{range:Ht,text:""}])},300)}}function qe(lt){(window.navigator.platform.match("Mac")?lt.metaKey:lt.ctrlKey)&<.keyCode==83&&(lt.preventDefault(),ae())}var ot=function(){if(J&&ze.current.instance){var _t=ze.current.instance.getContentHeight();Wt(_t<$?$:_t)}else Wt($)};function at(lt){var _t=document.createEvent("MouseEvents");_t.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),lt.dispatchEvent(_t)}function rt(lt,_t){var jt=window.URL||window.webkitURL||window,Ht=new Blob([_t]),ct=document.createElementNS("http://www.w3.org/1999/xhtml","a");ct.href=jt.createObjectURL(Ht),ct.download=lt,at(ct)}Object(T.useEffect)(function(){ot()},[ot]),Object(T.useEffect)(function(){We.current&&!Le&&L.e(26).then(L.t.bind(null,"M/lh",7)).then(function(lt){try{a=lt,ze.current.instance=a.editor.create(We.current,{value:re,language:g(ne),theme:fe,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},De);var _t=ze.current.instance,jt=w.d._menuItems,Ht=Object(M.a)(jt).find(function(Lt){return Lt[0]._debugName=="EditorContext"}),ct=Ht[1],bt=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],gt=function(It,St){var Jt=It._first;do{var kt,zt,st=St.includes((kt=Jt.element)===null||kt===void 0||((zt=kt.command)===null||zt===void 0)?void 0:zt.id);st&&It._remove(Jt)}while(Jt=Jt.next)};if(Pe(_t,a),setTimeout(function(){ot(),ze.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){rt(je||"educoder.txt",_t.getValue())}}),_t.getDomNode().addEventListener("input",function(){Me.current.autoFormat&&_t.getAction("editor.action.formatDocument").run()})},500),ze.current.subscription=_t.onDidChangeModelContent(function(Lt){Be.current?clearTimeout(we.current):(ot(),ye(_t.getValue(),Lt)),we.current=setTimeout(function(){Be.current=!1},500)}),window.Monaco||R(a,g(ne)),pe&&(gt(ct,bt),We.current.classList.add("noCopyPaste"),_t.onKeyDown(function(Lt){var It=Lt.keyCode,St=Lt.ctrlKey,Jt=Lt.metaKey;(It===33||It===52)&&(Jt||St)&&(Ne(),Lt.preventDefault())})),window.Monaco=a,Ce&&_t.onDidBlurEditorWidget(function(){Ce(_t.getValue())}),Oe&&_t.onDidFocusEditorText(function(){Oe(_t.getValue())}),pe){_t.addCommand(a.KeyMod.CtrlCmd|a.KeyCode.KEY_V,function(){return Ne(),null}),_t.onDidPaste(function(Lt){ze.current.pastePos=Lt});try{window.addEventListener("paste",Je)}catch(Lt){}}var Ut=Ze();return Ke(!0),function(){var Lt=ze.current.instance;Lt.dispose();var It=Lt.getModel();It&&It.dispose(),ze.current.subscription&&ze.current.subscription.dispose(),pe&&window.removeEventListener("paste",Je),Ut.unobserve(We.current)}}catch(Lt){}})},[]),Object(T.useEffect)(function(){var lt=ze.current.instance;if(lt&&Le)return document.addEventListener("keydown",qe,!1),function(){document.removeEventListener("keydown",qe)}},[ae,Le]),Object(T.useEffect)(function(){var lt=ze.current.instance;if(lt&&Le){var _t=g(ne);a.editor.setModelLanguage(lt.getModel(),_t),console.log("language:",ne,lt.getModel(),_t)}},[ne,Le]),Object(T.useEffect)(function(){var lt=ze.current.instance;lt&&Le&&a.editor.setTheme(fe)},[fe,Le]),Object(T.useEffect)(function(){var lt=ze.current.instance;Me.current=se,lt&&Le&&(lt.updateOptions(Object(B.a)({},se)),setTimeout(function(){lt.getModel().updateOptions(Object(B.a)({},se))},200))},[JSON.stringify(se),Le]),Object(T.useEffect)(function(){var lt=ze.current.instance;lt&&Le&<.layout()},[z,$,Le]);var dt=Object(T.useState)(P(z)),nt=Object(N.a)(dt,2),mt=nt[0],yt=nt[1],ft=Object(T.useState)(P($)),ht=Object(N.a)(ft,2),Rt=ht[0],Wt=ht[1],wt=Object(B.a)(Object(B.a)({},be),{},{width:mt,height:Rt});return e.a.createElement("div",{className:"my-monaco-editor",ref:We,style:wt})};function S(p){var U=p.width,z=U===void 0?"100%":U,q=p.height,$=q===void 0?"100%":q,re=p.original,ce=p.modified,ne=p.language,me=p.options,be=me===void 0?{}:me,he=Object(T.useRef)(),se=Object(T.useState)(null),_e=Object(N.a)(se,2),De=_e[0],ge=_e[1];function fe(J){var Z;return he.current&&(Z=new E.a(function(pe){var le=Object(K.a)(pe),ye;try{for(le.s();!(ye=le.n()).done;){var Te=ye.value;(Te.target.offsetHeight>0||Te.target.offsetWidth>0)&&J.layout()}}catch(Pe){le.e(Pe)}finally{le.f()}}),Z.observe(he.current)),Z}Object(T.useEffect)(function(){he.current&&L.e(26).then(L.t.bind(null,"M/lh",7)).then(function(J){a=J;var Z=a.editor.createDiffEditor(he.current,Object(B.a)(Object(B.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},be),{},{wordWrap:!0}));ge(Z);var pe=fe(Z);return function(){Z.dispose();var le=Z.getModel();le&&le.dispose(),pe.unobserve(he.current)}})},[]),Object(T.useEffect)(function(){De&&De.setModel({original:a.editor.createModel(re,ne),modified:a.editor.createModel(ce,ne)})},[re,ce,ne,De]);var Ce=P(z),ae=P($),Q={width:Ce,height:ae};return e.a.createElement("div",{className:"my-diff-editor",ref:he,style:Q})}},Zaiq:function(W,ee,L){"use strict";L.d(ee,"a",function(){return R.a});var B=L("yuO0"),M=L("XjgL"),G=L("kxoy"),X=L("6ASS"),K=L("aVTQ"),N=L("eA01"),i=L("fXDJ"),T=L("fhFH"),e=L("BPTR"),E=L("udol"),l=L("27eb"),_=L.n(l),r=L("sg8A"),n=L("E0BR"),o=L("B/uU"),c=L("T/Jt"),v=L("c27x");function f(fe){var Ce=fe.dropPosition,ae=fe.dropLevelOffset,Q=fe.indent,J={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ce){case-1:J.top=0,J.left=-ae*Q;break;case 1:J.bottom=0,J.left=-ae*Q;break;case 0:J.bottom=0,J.left=Q;break}return c.createElement("div",{style:J})}function y(fe){if(fe==null)throw new TypeError("Cannot destructure "+fe)}var h=L("36hc"),b=L("fNpE"),m=L("s7W6"),d=L("JTpS"),x=L("J5No"),R=L("0pdE");function O(fe,Ce){var ae=c.useState(!1),Q=Object(h.a)(ae,2),J=Q[0],Z=Q[1];c.useLayoutEffect(function(){if(J)return fe(),function(){Ce()}},[J]),c.useLayoutEffect(function(){return Z(!0),function(){Z(!1)}},[])}var w=L("rgEC"),D=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],A=function(Ce,ae){var Q=Ce.className,J=Ce.style,Z=Ce.motion,pe=Ce.motionNodes,le=Ce.motionType,ye=Ce.onMotionStart,Te=Ce.onMotionEnd,Pe=Ce.active,He=Ce.treeNodeRequiredProps,Oe=Object(b.a)(Ce,D),Ue=c.useState(!0),je=Object(h.a)(Ue,2),Ve=je[0],Re=je[1],Xe=c.useContext(v.a),Qe=Xe.prefixCls,We=pe&&le!=="hide";Object(m.a)(function(){pe&&(We!==Ve&&Re(We))},[pe]);var ze=function(){pe&&ye()},Me=c.useRef(!1),Ie=function(){pe&&!Me.current&&(Me.current=!0,Te())};O(ze,Ie);var Be=function(Ae){We===Ae&&Ie()};return pe?c.createElement(x.default,Object(B.a)({ref:ae,visible:Ve},Z,{motionAppear:le==="show",onVisibleChanged:Be}),function(we,Ae){var ke=we.className,Le=we.style;return c.createElement("div",{ref:Ae,className:_()("".concat(Qe,"-treenode-motion"),ke),style:Le},pe.map(function(Ke){var Ze=Object(B.a)({},(y(Ke.data),Ke.data)),Ne=Ke.title,$e=Ke.key,Je=Ke.isStart,qe=Ke.isEnd;delete Ze.children;var ot=Object(w.g)($e,He);return c.createElement(R.a,Object(B.a)({},Ze,ot,{title:Ne,active:Pe,data:Ke.data,key:$e,isStart:Je,isEnd:qe}))}))}):c.createElement(R.a,Object(B.a)({domRef:ae,className:Q,style:J},Oe,{active:Pe}))};A.displayName="MotionTreeNode";var P=c.forwardRef(A),I=P;function u(){var fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ae=fe.length,Q=Ce.length;if(Math.abs(ae-Q)!==1)return{add:!1,key:null};function J(Z,pe){var le=new Map;Z.forEach(function(Te){le.set(Te,!0)});var ye=pe.filter(function(Te){return!le.has(Te)});return ye.length===1?ye[0]:null}return ae<Q?{add:!0,key:J(fe,Ce)}:{add:!1,key:J(Ce,fe)}}function k(fe,Ce,ae){var Q=fe.findIndex(function(le){return le.key===ae}),J=fe[Q+1],Z=Ce.findIndex(function(le){return le.key===ae});if(J){var pe=Ce.findIndex(function(le){return le.key===J.key});return Ce.slice(Z+1,pe)}return Ce.slice(Z+1)}var g=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],a={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},C=function(){},S="RC_TREE_MOTION_".concat(Math.random()),p={key:S},U={key:S,level:0,index:0,pos:"0",node:p,nodes:[p]},z={parent:null,children:[],pos:U.pos,data:p,title:null,key:S,isStart:[],isEnd:[]};function q(fe,Ce,ae,Q){return Ce===!1||!ae?fe:fe.slice(0,Math.ceil(ae/Q)+1)}function $(fe){var Ce=fe.key,ae=fe.pos;return Object(w.f)(Ce,ae)}function re(fe){for(var Ce=String(fe.data.key),ae=fe;ae.parent;)ae=ae.parent,Ce="".concat(ae.data.key," > ").concat(Ce);return Ce}var ce=c.forwardRef(function(fe,Ce){var ae=fe.prefixCls,Q=fe.data,J=fe.selectable,Z=fe.checkable,pe=fe.expandedKeys,le=fe.selectedKeys,ye=fe.checkedKeys,Te=fe.loadedKeys,Pe=fe.loadingKeys,He=fe.halfCheckedKeys,Oe=fe.keyEntities,Ue=fe.disabled,je=fe.dragging,Ve=fe.dragOverNodeKey,Re=fe.dropPosition,Xe=fe.motion,Qe=fe.height,We=fe.itemHeight,ze=fe.virtual,Me=fe.focusable,Ie=fe.activeItem,Be=fe.focused,we=fe.tabIndex,Ae=fe.onKeyDown,ke=fe.onFocus,Le=fe.onBlur,Ke=fe.onActiveChange,Ze=fe.onListChangeStart,Ne=fe.onListChangeEnd,$e=Object(b.a)(fe,g),Je=c.useRef(null),qe=c.useRef(null);c.useImperativeHandle(Ce,function(){return{scrollTo:function(zt){Je.current.scrollTo(zt)},getIndentWidth:function(){return qe.current.offsetWidth}}});var ot=c.useState(pe),at=Object(h.a)(ot,2),rt=at[0],dt=at[1],nt=c.useState(Q),mt=Object(h.a)(nt,2),yt=mt[0],ft=mt[1],ht=c.useState(Q),Rt=Object(h.a)(ht,2),Wt=Rt[0],wt=Rt[1],lt=c.useState([]),_t=Object(h.a)(lt,2),jt=_t[0],Ht=_t[1],ct=c.useState(null),bt=Object(h.a)(ct,2),gt=bt[0],Ut=bt[1],Lt=c.useRef(Q);Lt.current=Q;function It(){var kt=Lt.current;ft(kt),wt(kt),Ht([]),Ut(null),Ne()}Object(m.a)(function(){dt(pe);var kt=u(rt,pe);if(kt.key!==null)if(kt.add){var zt=yt.findIndex(function(tr){var yr=tr.key;return yr===kt.key}),st=q(k(yt,Q,kt.key),ze,Qe,We),pt=yt.slice();pt.splice(zt+1,0,z),wt(pt),Ht(st),Ut("show")}else{var Ct=Q.findIndex(function(tr){var yr=tr.key;return yr===kt.key}),Dt=q(k(Q,yt,kt.key),ze,Qe,We),Tt=Q.slice();Tt.splice(Ct+1,0,z),wt(Tt),Ht(Dt),Ut("hide")}else yt!==Q&&(ft(Q),wt(Q))},[pe,Q]),c.useEffect(function(){je||It()},[je]);var St=Xe?Wt:Q,Jt={expandedKeys:pe,selectedKeys:le,loadedKeys:Te,loadingKeys:Pe,checkedKeys:ye,halfCheckedKeys:He,dragOverNodeKey:Ve,dropPosition:Re,keyEntities:Oe};return c.createElement(c.Fragment,null,Be&&Ie&&c.createElement("span",{style:a,"aria-live":"assertive"},re(Ie)),c.createElement("div",null,c.createElement("input",{style:a,disabled:Me===!1||Ue,tabIndex:Me!==!1?we:null,onKeyDown:Ae,onFocus:ke,onBlur:Le,value:"",onChange:C,"aria-label":"for screen reader"})),c.createElement("div",{className:"".concat(ae,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},c.createElement("div",{className:"".concat(ae,"-indent")},c.createElement("div",{ref:qe,className:"".concat(ae,"-indent-unit")}))),c.createElement(d.a,Object(B.a)({},$e,{data:St,itemKey:$,height:Qe,fullHeight:!1,virtual:ze,itemHeight:We,prefixCls:"".concat(ae,"-list"),ref:Je,onVisibleChange:function(zt,st){var pt=new Set(zt),Ct=st.filter(function(Dt){return!pt.has(Dt)});Ct.some(function(Dt){return $(Dt)===S})&&It()}}),function(kt){var zt=kt.pos,st=Object(B.a)({},(y(kt.data),kt.data)),pt=kt.title,Ct=kt.key,Dt=kt.isStart,Tt=kt.isEnd,tr=Object(w.f)(Ct,zt);delete st.key,delete st.children;var yr=Object(w.g)(tr,Jt);return c.createElement(I,Object(B.a)({},st,yr,{title:pt,active:!!Ie&&Ct===Ie.key,pos:zt,data:kt.data,isStart:Dt,isEnd:Tt,motion:Xe,motionNodes:Ct===S?jt:null,motionType:gt,onMotionStart:Ze,onMotionEnd:It,treeNodeRequiredProps:Jt,onMouseMove:function(){Ke(null)}}))}))});ce.displayName="NodeList";var ne=ce,me=L("ju+a"),be=L("vqdp"),he=L("El5i"),se=10,_e=function(fe){Object(e.a)(ae,fe);var Ce=Object(E.a)(ae);function ae(){var Q;Object(N.a)(this,ae);for(var J=arguments.length,Z=new Array(J),pe=0;pe<J;pe++)Z[pe]=arguments[pe];return Q=Ce.call.apply(Ce,[this].concat(Z)),Q.destroyed=!1,Q.delayedDragEnterLogic=void 0,Q.loadingRetryTimes={},Q.state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:Object(w.d)()},Q.dragStartMousePosition=null,Q.dragNode=void 0,Q.currentMouseOverDroppableNodeKey=null,Q.listRef=c.createRef(),Q.onNodeDragStart=function(le,ye){var Te=Q.state,Pe=Te.expandedKeys,He=Te.keyEntities,Oe=Q.props.onDragStart,Ue=ye.props.eventKey;Q.dragNode=ye,Q.dragStartMousePosition={x:le.clientX,y:le.clientY};var je=Object(me.b)(Pe,Ue);Q.setState({draggingNodeKey:Ue,dragChildrenKeys:Object(me.f)(Ue,He),indent:Q.listRef.current.getIndentWidth()}),Q.setExpandedKeys(je),window.addEventListener("dragend",Q.onWindowDragEnd),Oe==null||Oe({event:le,node:Object(w.b)(ye.props)})},Q.onNodeDragEnter=function(le,ye){var Te=Q.state,Pe=Te.expandedKeys,He=Te.keyEntities,Oe=Te.dragChildrenKeys,Ue=Te.flattenNodes,je=Te.indent,Ve=Q.props,Re=Ve.onDragEnter,Xe=Ve.onExpand,Qe=Ve.allowDrop,We=Ve.direction,ze=ye.props,Me=ze.pos,Ie=ze.eventKey,Be=Object(T.a)(Q),we=Be.dragNode;if(Q.currentMouseOverDroppableNodeKey!==Ie&&(Q.currentMouseOverDroppableNodeKey=Ie),!we){Q.resetDragState();return}var Ae=Object(me.c)(le,we,ye,je,Q.dragStartMousePosition,Qe,Ue,He,Pe,We),ke=Ae.dropPosition,Le=Ae.dropLevelOffset,Ke=Ae.dropTargetKey,Ze=Ae.dropContainerKey,Ne=Ae.dropTargetPos,$e=Ae.dropAllowed,Je=Ae.dragOverNodeKey;if(Oe.indexOf(Ke)!==-1||!$e){Q.resetDragState();return}if(Q.delayedDragEnterLogic||(Q.delayedDragEnterLogic={}),Object.keys(Q.delayedDragEnterLogic).forEach(function(qe){clearTimeout(Q.delayedDragEnterLogic[qe])}),we.props.eventKey!==ye.props.eventKey&&(le.persist(),Q.delayedDragEnterLogic[Me]=window.setTimeout(function(){if(Q.state.draggingNodeKey===null)return;var qe=Object(K.a)(Pe),ot=Object(he.a)(He,ye.props.eventKey);ot&&(ot.children||[]).length&&(qe=Object(me.a)(Pe,ye.props.eventKey)),"expandedKeys"in Q.props||Q.setExpandedKeys(qe),Xe==null||Xe(qe,{node:Object(w.b)(ye.props),expanded:!0,nativeEvent:le.nativeEvent})},800)),we.props.eventKey===Ke&&Le===0){Q.resetDragState();return}Q.setState({dragOverNodeKey:Je,dropPosition:ke,dropLevelOffset:Le,dropTargetKey:Ke,dropContainerKey:Ze,dropTargetPos:Ne,dropAllowed:$e}),Re==null||Re({event:le,node:Object(w.b)(ye.props),expandedKeys:Pe})},Q.onNodeDragOver=function(le,ye){var Te=Q.state,Pe=Te.dragChildrenKeys,He=Te.flattenNodes,Oe=Te.keyEntities,Ue=Te.expandedKeys,je=Te.indent,Ve=Q.props,Re=Ve.onDragOver,Xe=Ve.allowDrop,Qe=Ve.direction,We=Object(T.a)(Q),ze=We.dragNode;if(!ze)return;var Me=Object(me.c)(le,ze,ye,je,Q.dragStartMousePosition,Xe,He,Oe,Ue,Qe),Ie=Me.dropPosition,Be=Me.dropLevelOffset,we=Me.dropTargetKey,Ae=Me.dropContainerKey,ke=Me.dropAllowed,Le=Me.dropTargetPos,Ke=Me.dragOverNodeKey;if(Pe.indexOf(we)!==-1||!ke)return;ze.props.eventKey===we&&Be===0?Q.state.dropPosition===null&&Q.state.dropLevelOffset===null&&Q.state.dropTargetKey===null&&Q.state.dropContainerKey===null&&Q.state.dropTargetPos===null&&Q.state.dropAllowed===!1&&Q.state.dragOverNodeKey===null||Q.resetDragState():Ie===Q.state.dropPosition&&Be===Q.state.dropLevelOffset&&we===Q.state.dropTargetKey&&Ae===Q.state.dropContainerKey&&Le===Q.state.dropTargetPos&&ke===Q.state.dropAllowed&&Ke===Q.state.dragOverNodeKey||Q.setState({dropPosition:Ie,dropLevelOffset:Be,dropTargetKey:we,dropContainerKey:Ae,dropTargetPos:Le,dropAllowed:ke,dragOverNodeKey:Ke}),Re==null||Re({event:le,node:Object(w.b)(ye.props)})},Q.onNodeDragLeave=function(le,ye){Q.currentMouseOverDroppableNodeKey===ye.props.eventKey&&!le.currentTarget.contains(le.relatedTarget)&&(Q.resetDragState(),Q.currentMouseOverDroppableNodeKey=null);var Te=Q.props.onDragLeave;Te==null||Te({event:le,node:Object(w.b)(ye.props)})},Q.onWindowDragEnd=function(le){Q.onNodeDragEnd(le,null,!0),window.removeEventListener("dragend",Q.onWindowDragEnd)},Q.onNodeDragEnd=function(le,ye){var Te=Q.props.onDragEnd;Q.setState({dragOverNodeKey:null}),Q.cleanDragState(),Te==null||Te({event:le,node:Object(w.b)(ye.props)}),Q.dragNode=null,window.removeEventListener("dragend",Q.onWindowDragEnd)},Q.onNodeDrop=function(le,ye){var Te,Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,He=Q.state,Oe=He.dragChildrenKeys,Ue=He.dropPosition,je=He.dropTargetKey,Ve=He.dropTargetPos,Re=He.dropAllowed;if(!Re)return;var Xe=Q.props.onDrop;if(Q.setState({dragOverNodeKey:null}),Q.cleanDragState(),je===null)return;var Qe=Object(X.a)(Object(X.a)({},Object(w.g)(je,Q.getTreeNodeRequiredProps())),{},{active:((Te=Q.getActiveItem())===null||Te===void 0?void 0:Te.key)===je,data:Object(he.a)(Q.state.keyEntities,je).node}),We=Oe.indexOf(je)!==-1;Object(o.a)(!We,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var ze=Object(me.h)(Ve),Me={event:le,node:Object(w.b)(Qe),dragNode:Q.dragNode?Object(w.b)(Q.dragNode.props):null,dragNodesKeys:[Q.dragNode.props.eventKey].concat(Oe),dropToGap:Ue!==0,dropPosition:Ue+Number(ze[ze.length-1])};Pe||(Xe==null||Xe(Me)),Q.dragNode=null},Q.cleanDragState=function(){var le=Q.state.draggingNodeKey;le!==null&&Q.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Q.dragStartMousePosition=null,Q.currentMouseOverDroppableNodeKey=null},Q.triggerExpandActionExpand=function(le,ye){var Te=Q.state,Pe=Te.expandedKeys,He=Te.flattenNodes,Oe=ye.expanded,Ue=ye.key,je=ye.isLeaf;if(je||le.shiftKey||le.metaKey||le.ctrlKey)return;var Ve=He.filter(function(Xe){return Xe.key===Ue})[0],Re=Object(w.b)(Object(X.a)(Object(X.a)({},Object(w.g)(Ue,Q.getTreeNodeRequiredProps())),{},{data:Ve.data}));Q.setExpandedKeys(Oe?Object(me.b)(Pe,Ue):Object(me.a)(Pe,Ue)),Q.onNodeExpand(le,Re)},Q.onNodeClick=function(le,ye){var Te=Q.props,Pe=Te.onClick,He=Te.expandAction;He==="click"&&Q.triggerExpandActionExpand(le,ye),Pe==null||Pe(le,ye)},Q.onNodeDoubleClick=function(le,ye){var Te=Q.props,Pe=Te.onDoubleClick,He=Te.expandAction;He==="doubleClick"&&Q.triggerExpandActionExpand(le,ye),Pe==null||Pe(le,ye)},Q.onNodeSelect=function(le,ye){var Te=Q.state.selectedKeys,Pe=Q.state,He=Pe.keyEntities,Oe=Pe.fieldNames,Ue=Q.props,je=Ue.onSelect,Ve=Ue.multiple,Re=ye.selected,Xe=ye[Oe.key],Qe=!Re;Qe?Ve?Te=Object(me.a)(Te,Xe):Te=[Xe]:Te=Object(me.b)(Te,Xe);var We=Te.map(function(ze){var Me=Object(he.a)(He,ze);return Me?Me.node:null}).filter(function(ze){return ze});Q.setUncontrolledState({selectedKeys:Te}),je==null||je(Te,{event:"select",selected:Qe,node:ye,selectedNodes:We,nativeEvent:le.nativeEvent})},Q.onNodeCheck=function(le,ye,Te){var Pe=Q.state,He=Pe.keyEntities,Oe=Pe.checkedKeys,Ue=Pe.halfCheckedKeys,je=Q.props,Ve=je.checkStrictly,Re=je.onCheck,Xe=ye.key,Qe,We={event:"check",node:ye,checked:Te,nativeEvent:le.nativeEvent};if(Ve){var ze=Te?Object(me.a)(Oe,Xe):Object(me.b)(Oe,Xe),Me=Object(me.b)(Ue,Xe);Qe={checked:ze,halfChecked:Me},We.checkedNodes=ze.map(function(Le){return Object(he.a)(He,Le)}).filter(function(Le){return Le}).map(function(Le){return Le.node}),Q.setUncontrolledState({checkedKeys:ze})}else{var Ie=Object(be.a)([].concat(Object(K.a)(Oe),[Xe]),!0,He),Be=Ie.checkedKeys,we=Ie.halfCheckedKeys;if(!Te){var Ae=new Set(Be);Ae.delete(Xe);var ke=Object(be.a)(Array.from(Ae),{checked:!1,halfCheckedKeys:we},He);Be=ke.checkedKeys,we=ke.halfCheckedKeys}Qe=Be,We.checkedNodes=[],We.checkedNodesPositions=[],We.halfCheckedKeys=we,Be.forEach(function(Le){var Ke=Object(he.a)(He,Le);if(!Ke)return;var Ze=Ke.node,Ne=Ke.pos;We.checkedNodes.push(Ze),We.checkedNodesPositions.push({node:Ze,pos:Ne})}),Q.setUncontrolledState({checkedKeys:Be},!1,{halfCheckedKeys:we})}Re==null||Re(Qe,We)},Q.onNodeLoad=function(le){var ye=le.key,Te=new Promise(function(Pe,He){Q.setState(function(Oe){var Ue=Oe.loadedKeys,je=Ue===void 0?[]:Ue,Ve=Oe.loadingKeys,Re=Ve===void 0?[]:Ve,Xe=Q.props,Qe=Xe.loadData,We=Xe.onLoad;if(!Qe||je.indexOf(ye)!==-1||Re.indexOf(ye)!==-1)return null;var ze=Qe(le);return ze.then(function(){var Me=Q.state.loadedKeys,Ie=Object(me.a)(Me,ye);We==null||We(Ie,{event:"load",node:le}),Q.setUncontrolledState({loadedKeys:Ie}),Q.setState(function(Be){return{loadingKeys:Object(me.b)(Be.loadingKeys,ye)}}),Pe()}).catch(function(Me){if(Q.setState(function(Be){return{loadingKeys:Object(me.b)(Be.loadingKeys,ye)}}),Q.loadingRetryTimes[ye]=(Q.loadingRetryTimes[ye]||0)+1,Q.loadingRetryTimes[ye]>=se){var Ie=Q.state.loadedKeys;Object(o.a)(!1,"Retry for `loadData` many times but still failed. No more retry."),Q.setUncontrolledState({loadedKeys:Object(me.a)(Ie,ye)}),Pe()}He(Me)}),{loadingKeys:Object(me.a)(Re,ye)}})});return Te.catch(function(){}),Te},Q.onNodeMouseEnter=function(le,ye){var Te=Q.props.onMouseEnter;Te==null||Te({event:le,node:ye})},Q.onNodeMouseLeave=function(le,ye){var Te=Q.props.onMouseLeave;Te==null||Te({event:le,node:ye})},Q.onNodeContextMenu=function(le,ye){var Te=Q.props.onRightClick;Te&&(le.preventDefault(),Te({event:le,node:ye}))},Q.onFocus=function(){var le=Q.props.onFocus;Q.setState({focused:!0});for(var ye=arguments.length,Te=new Array(ye),Pe=0;Pe<ye;Pe++)Te[Pe]=arguments[Pe];le==null||le.apply(void 0,Te)},Q.onBlur=function(){var le=Q.props.onBlur;Q.setState({focused:!1}),Q.onActiveChange(null);for(var ye=arguments.length,Te=new Array(ye),Pe=0;Pe<ye;Pe++)Te[Pe]=arguments[Pe];le==null||le.apply(void 0,Te)},Q.getTreeNodeRequiredProps=function(){var le=Q.state,ye=le.expandedKeys,Te=le.selectedKeys,Pe=le.loadedKeys,He=le.loadingKeys,Oe=le.checkedKeys,Ue=le.halfCheckedKeys,je=le.dragOverNodeKey,Ve=le.dropPosition,Re=le.keyEntities;return{expandedKeys:ye||[],selectedKeys:Te||[],loadedKeys:Pe||[],loadingKeys:He||[],checkedKeys:Oe||[],halfCheckedKeys:Ue||[],dragOverNodeKey:je,dropPosition:Ve,keyEntities:Re}},Q.setExpandedKeys=function(le){var ye=Q.state,Te=ye.treeData,Pe=ye.fieldNames,He=Object(w.e)(Te,le,Pe);Q.setUncontrolledState({expandedKeys:le,flattenNodes:He},!0)},Q.onNodeExpand=function(le,ye){var Te=Q.state.expandedKeys,Pe=Q.state,He=Pe.listChanging,Oe=Pe.fieldNames,Ue=Q.props,je=Ue.onExpand,Ve=Ue.loadData,Re=ye.expanded,Xe=ye[Oe.key];if(He)return;var Qe=Te.indexOf(Xe),We=!Re;if(Object(o.a)(Re&&Qe!==-1||!Re&&Qe===-1,"Expand state not sync with index check"),We?Te=Object(me.a)(Te,Xe):Te=Object(me.b)(Te,Xe),Q.setExpandedKeys(Te),je==null||je(Te,{node:ye,expanded:We,nativeEvent:le.nativeEvent}),We&&Ve){var ze=Q.onNodeLoad(ye);ze&&ze.then(function(){var Me=Object(w.e)(Q.state.treeData,Te,Oe);Q.setUncontrolledState({flattenNodes:Me})}).catch(function(){var Me=Q.state.expandedKeys,Ie=Object(me.b)(Me,Xe);Q.setExpandedKeys(Ie)})}},Q.onListChangeStart=function(){Q.setUncontrolledState({listChanging:!0})},Q.onListChangeEnd=function(){setTimeout(function(){Q.setUncontrolledState({listChanging:!1})})},Q.onActiveChange=function(le){var ye=Q.state.activeKey,Te=Q.props.onActiveChange;if(ye===le)return;Q.setState({activeKey:le}),le!==null&&Q.scrollTo({key:le}),Te==null||Te(le)},Q.getActiveItem=function(){var le=Q.state,ye=le.activeKey,Te=le.flattenNodes;return ye===null?null:Te.find(function(Pe){var He=Pe.key;return He===ye})||null},Q.offsetActiveKey=function(le){var ye=Q.state,Te=ye.flattenNodes,Pe=ye.activeKey,He=Te.findIndex(function(je){var Ve=je.key;return Ve===Pe});He===-1&&le<0&&(He=Te.length),He=(He+le+Te.length)%Te.length;var Oe=Te[He];if(Oe){var Ue=Oe.key;Q.onActiveChange(Ue)}else Q.onActiveChange(null)},Q.onKeyDown=function(le){var ye=Q.state,Te=ye.activeKey,Pe=ye.expandedKeys,He=ye.checkedKeys,Oe=ye.fieldNames,Ue=Q.props,je=Ue.onKeyDown,Ve=Ue.checkable,Re=Ue.selectable;switch(le.which){case r.a.UP:{Q.offsetActiveKey(-1),le.preventDefault();break}case r.a.DOWN:{Q.offsetActiveKey(1),le.preventDefault();break}}var Xe=Q.getActiveItem();if(Xe&&Xe.data){var Qe=Q.getTreeNodeRequiredProps(),We=Xe.data.isLeaf===!1||!!(Xe.data[Oe.children]||[]).length,ze=Object(w.b)(Object(X.a)(Object(X.a)({},Object(w.g)(Te,Qe)),{},{data:Xe.data,active:!0}));switch(le.which){case r.a.LEFT:{We&&Pe.includes(Te)?Q.onNodeExpand({},ze):Xe.parent&&Q.onActiveChange(Xe.parent.key),le.preventDefault();break}case r.a.RIGHT:{We&&!Pe.includes(Te)?Q.onNodeExpand({},ze):Xe.children&&Xe.children.length&&Q.onActiveChange(Xe.children[0].key),le.preventDefault();break}case r.a.ENTER:case r.a.SPACE:{Ve&&!ze.disabled&&ze.checkable!==!1&&!ze.disableCheckbox?Q.onNodeCheck({},ze,!He.includes(Te)):!Ve&&Re&&!ze.disabled&&ze.selectable!==!1&&Q.onNodeSelect({},ze);break}}}je==null||je(le)},Q.setUncontrolledState=function(le){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Q.destroyed){var Pe=!1,He=!0,Oe={};Object.keys(le).forEach(function(Ue){if(Ue in Q.props){He=!1;return}Pe=!0,Oe[Ue]=le[Ue]}),Pe&&(!ye||He)&&Q.setState(Object(X.a)(Object(X.a)({},Oe),Te))}},Q.scrollTo=function(le){Q.listRef.current.scrollTo(le)},Q}return Object(i.a)(ae,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var J=this.props.activeKey;J!==void 0&&J!==this.state.activeKey&&(this.setState({activeKey:J}),J!==null&&this.scrollTo({key:J}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var J,Z=this.state,pe=Z.focused,le=Z.flattenNodes,ye=Z.keyEntities,Te=Z.draggingNodeKey,Pe=Z.activeKey,He=Z.dropLevelOffset,Oe=Z.dropContainerKey,Ue=Z.dropTargetKey,je=Z.dropPosition,Ve=Z.dragOverNodeKey,Re=Z.indent,Xe=this.props,Qe=Xe.prefixCls,We=Xe.className,ze=Xe.style,Me=Xe.showLine,Ie=Xe.focusable,Be=Xe.tabIndex,we=Be===void 0?0:Be,Ae=Xe.selectable,ke=Xe.showIcon,Le=Xe.icon,Ke=Xe.switcherIcon,Ze=Xe.draggable,Ne=Xe.checkable,$e=Xe.checkStrictly,Je=Xe.disabled,qe=Xe.motion,ot=Xe.loadData,at=Xe.filterTreeNode,rt=Xe.height,dt=Xe.itemHeight,nt=Xe.virtual,mt=Xe.titleRender,yt=Xe.dropIndicatorRender,ft=Xe.onContextMenu,ht=Xe.onScroll,Rt=Xe.direction,Wt=Xe.rootClassName,wt=Xe.rootStyle,lt=Object(n.a)(this.props,{aria:!0,data:!0}),_t;return Ze&&(Object(G.a)(Ze)==="object"?_t=Ze:typeof Ze=="function"?_t={nodeDraggable:Ze}:_t={}),c.createElement(v.a.Provider,{value:{prefixCls:Qe,selectable:Ae,showIcon:ke,icon:Le,switcherIcon:Ke,draggable:_t,draggingNodeKey:Te,checkable:Ne,checkStrictly:$e,disabled:Je,keyEntities:ye,dropLevelOffset:He,dropContainerKey:Oe,dropTargetKey:Ue,dropPosition:je,dragOverNodeKey:Ve,indent:Re,direction:Rt,dropIndicatorRender:yt,loadData:ot,filterTreeNode:at,titleRender:mt,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},c.createElement("div",{role:"tree",className:_()(Qe,We,Wt,(J={},Object(M.a)(J,"".concat(Qe,"-show-line"),Me),Object(M.a)(J,"".concat(Qe,"-focused"),pe),Object(M.a)(J,"".concat(Qe,"-active-focused"),Pe!==null),J)),style:wt},c.createElement(ne,Object(B.a)({ref:this.listRef,prefixCls:Qe,style:ze,data:le,disabled:Je,selectable:Ae,checkable:!!Ne,motion:qe,dragging:Te!==null,height:rt,itemHeight:dt,virtual:nt,focusable:Ie,focused:pe,tabIndex:we,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:ft,onScroll:ht},this.getTreeNodeRequiredProps(),lt))))}}],[{key:"getDerivedStateFromProps",value:function(J,Z){var pe=Z.prevProps,le={prevProps:J};function ye(Ie){return!pe&&Ie in J||pe&&pe[Ie]!==J[Ie]}var Te,Pe=Z.fieldNames;if(ye("fieldNames")&&(Pe=Object(w.d)(J.fieldNames),le.fieldNames=Pe),ye("treeData")?Te=J.treeData:ye("children")&&(Object(o.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Te=Object(w.c)(J.children)),Te){le.treeData=Te;var He=Object(w.a)(Te,{fieldNames:Pe});le.keyEntities=Object(X.a)(Object(M.a)({},S,U),He.keyEntities)}var Oe=le.keyEntities||Z.keyEntities;if(ye("expandedKeys")||pe&&ye("autoExpandParent"))le.expandedKeys=J.autoExpandParent||!pe&&J.defaultExpandParent?Object(me.e)(J.expandedKeys,Oe):J.expandedKeys;else if(!pe&&J.defaultExpandAll){var Ue=Object(X.a)({},Oe);delete Ue[S],le.expandedKeys=Object.keys(Ue).map(function(Ie){return Ue[Ie].key})}else!pe&&J.defaultExpandedKeys&&(le.expandedKeys=J.autoExpandParent||J.defaultExpandParent?Object(me.e)(J.defaultExpandedKeys,Oe):J.defaultExpandedKeys);if(le.expandedKeys||delete le.expandedKeys,Te||le.expandedKeys){var je=Object(w.e)(Te||Z.treeData,le.expandedKeys||Z.expandedKeys,Pe);le.flattenNodes=je}if(J.selectable&&(ye("selectedKeys")?le.selectedKeys=Object(me.d)(J.selectedKeys,J):!pe&&J.defaultSelectedKeys&&(le.selectedKeys=Object(me.d)(J.defaultSelectedKeys,J))),J.checkable){var Ve;if(ye("checkedKeys")?Ve=Object(me.g)(J.checkedKeys)||{}:!pe&&J.defaultCheckedKeys?Ve=Object(me.g)(J.defaultCheckedKeys)||{}:Te&&(Ve=Object(me.g)(J.checkedKeys)||{checkedKeys:Z.checkedKeys,halfCheckedKeys:Z.halfCheckedKeys}),Ve){var Re=Ve,Xe=Re.checkedKeys,Qe=Xe===void 0?[]:Xe,We=Re.halfCheckedKeys,ze=We===void 0?[]:We;if(!J.checkStrictly){var Me=Object(be.a)(Qe,!0,Oe);Qe=Me.checkedKeys,ze=Me.halfCheckedKeys}le.checkedKeys=Qe,le.halfCheckedKeys=ze}}return ye("loadedKeys")&&(le.loadedKeys=J.loadedKeys),le}}]),ae}(c.Component);_e.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:f,allowDrop:function(){return!0},expandAction:!1},_e.TreeNode=R.a;var De=_e,ge=ee.b=De},a3WO:function(W,ee,L){"use strict";L.d(ee,"a",function(){return B});function B(M,G){(G==null||G>M.length)&&(G=M.length);for(var X=0,K=new Array(G);X<G;X++)K[X]=M[X];return K}},b3aT:function(W,ee,L){"use strict";L.d(ee,"a",function(){return B}),L.d(ee,"b",function(){return K}),L.d(ee,"c",function(){return N}),L.d(ee,"d",function(){return i});function B(T,e){G(T)&&(T="100%");var E=X(T);return T=e===360?T:Math.min(e,Math.max(0,parseFloat(T))),E&&(T=parseInt(String(T*e),10)/100),Math.abs(T-e)<1e-6?1:(e===360?T=(T<0?T%e+e:T%e)/parseFloat(String(e)):T=T%e/parseFloat(String(e)),T)}function M(T){return Math.min(1,Math.max(0,T))}function G(T){return typeof T=="string"&&T.indexOf(".")!==-1&&parseFloat(T)===1}function X(T){return typeof T=="string"&&T.indexOf("%")!==-1}function K(T){return T=parseFloat(T),(isNaN(T)||T<0||T>1)&&(T=1),T}function N(T){return T<=1?"".concat(Number(T)*100,"%"):T}function i(T){return T.length===1?"0"+T:String(T)}},bCnd:function(W,ee,L){"use strict";L.d(ee,"b",function(){return X}),L.d(ee,"a",function(){return K});var B=L("je13"),M=L.n(B),G=!1;function X(N,i){var T=M.a.get("__ec");T||(T={}),T[N]=i,M.a.set("__ec",T)}function K(N,i){var T=M.a.get("__ec");return T?T[N]===void 0?i:T[N]:i}},bQjk:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("OLod"))})(this,function(B){return function(M){var G=B,X=G.lib,K=X.CipherParams,N=G.enc,i=N.Hex,T=G.format,e=T.Hex={stringify:function(E){return E.ciphertext.toString(i)},parse:function(E){var l=i.parse(E);return K.create({ciphertext:l})}}}(),B.format.Hex})},bdgK:function(W,ee,L){"use strict";(function(B){var M=function(){if(typeof Map!="undefined")return Map;function I(u,k){var g=-1;return u.some(function(a,C){return a[0]===k?(g=C,!0):!1}),g}return function(){function u(){this.__entries__=[]}return Object.defineProperty(u.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),u.prototype.get=function(k){var g=I(this.__entries__,k),a=this.__entries__[g];return a&&a[1]},u.prototype.set=function(k,g){var a=I(this.__entries__,k);~a?this.__entries__[a][1]=g:this.__entries__.push([k,g])},u.prototype.delete=function(k){var g=this.__entries__,a=I(g,k);~a&&g.splice(a,1)},u.prototype.has=function(k){return!!~I(this.__entries__,k)},u.prototype.clear=function(){this.__entries__.splice(0)},u.prototype.forEach=function(k,g){g===void 0&&(g=null);for(var a=0,C=this.__entries__;a<C.length;a++){var S=C[a];k.call(g,S[1],S[0])}},u}()}(),G=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,X=function(){return typeof B!="undefined"&&B.Math===Math?B:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),K=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(X):function(I){return setTimeout(function(){return I(Date.now())},1e3/60)}}(),N=2;function i(I,u){var k=!1,g=!1,a=0;function C(){k&&(k=!1,I()),g&&p()}function S(){K(C)}function p(){var U=Date.now();if(k){if(U-a<N)return;g=!0}else k=!0,g=!1,setTimeout(S,u);a=U}return p}var T=20,e=["top","right","bottom","left","width","height","size","weight"],E=typeof MutationObserver!="undefined",l=function(){function I(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=i(this.refresh.bind(this),T)}return I.prototype.addObserver=function(u){~this.observers_.indexOf(u)||this.observers_.push(u),this.connected_||this.connect_()},I.prototype.removeObserver=function(u){var k=this.observers_,g=k.indexOf(u);~g&&k.splice(g,1),!k.length&&this.connected_&&this.disconnect_()},I.prototype.refresh=function(){var u=this.updateObservers_();u&&this.refresh()},I.prototype.updateObservers_=function(){var u=this.observers_.filter(function(k){return k.gatherActive(),k.hasActive()});return u.forEach(function(k){return k.broadcastActive()}),u.length>0},I.prototype.connect_=function(){if(!G||this.connected_)return;document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),E?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0},I.prototype.disconnect_=function(){if(!G||!this.connected_)return;document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1},I.prototype.onTransitionEnd_=function(u){var k=u.propertyName,g=k===void 0?"":k,a=e.some(function(C){return!!~g.indexOf(C)});a&&this.refresh()},I.getInstance=function(){return this.instance_||(this.instance_=new I),this.instance_},I.instance_=null,I}(),_=function(I,u){for(var k=0,g=Object.keys(u);k<g.length;k++){var a=g[k];Object.defineProperty(I,a,{value:u[a],enumerable:!1,writable:!1,configurable:!0})}return I},r=function(I){var u=I&&I.ownerDocument&&I.ownerDocument.defaultView;return u||X},n=x(0,0,0,0);function o(I){return parseFloat(I)||0}function c(I){for(var u=[],k=1;k<arguments.length;k++)u[k-1]=arguments[k];return u.reduce(function(g,a){var C=I["border-"+a+"-width"];return g+o(C)},0)}function v(I){for(var u=["top","right","bottom","left"],k={},g=0,a=u;g<a.length;g++){var C=a[g],S=I["padding-"+C];k[C]=o(S)}return k}function f(I){var u=I.getBBox();return x(0,0,u.width,u.height)}function y(I){var u=I.clientWidth,k=I.clientHeight;if(!u&&!k)return n;var g=r(I).getComputedStyle(I),a=v(g),C=a.left+a.right,S=a.top+a.bottom,p=o(g.width),U=o(g.height);if(g.boxSizing==="border-box"&&(Math.round(p+C)!==u&&(p-=c(g,"left","right")+C),Math.round(U+S)!==k&&(U-=c(g,"top","bottom")+S)),!b(I)){var z=Math.round(p+C)-u,q=Math.round(U+S)-k;Math.abs(z)!==1&&(p-=z),Math.abs(q)!==1&&(U-=q)}return x(a.left,a.top,p,U)}var h=function(){return typeof SVGGraphicsElement!="undefined"?function(I){return I instanceof r(I).SVGGraphicsElement}:function(I){return I instanceof r(I).SVGElement&&typeof I.getBBox=="function"}}();function b(I){return I===r(I).document.documentElement}function m(I){return G?h(I)?f(I):y(I):n}function d(I){var u=I.x,k=I.y,g=I.width,a=I.height,C=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,S=Object.create(C.prototype);return _(S,{x:u,y:k,width:g,height:a,top:k,right:u+g,bottom:a+k,left:u}),S}function x(I,u,k,g){return{x:I,y:u,width:k,height:g}}var R=function(){function I(u){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=x(0,0,0,0),this.target=u}return I.prototype.isActive=function(){var u=m(this.target);return this.contentRect_=u,u.width!==this.broadcastWidth||u.height!==this.broadcastHeight},I.prototype.broadcastRect=function(){var u=this.contentRect_;return this.broadcastWidth=u.width,this.broadcastHeight=u.height,u},I}(),O=function(){function I(u,k){var g=d(k);_(this,{target:u,contentRect:g})}return I}(),w=function(){function I(u,k,g){if(this.activeObservations_=[],this.observations_=new M,typeof u!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=u,this.controller_=k,this.callbackCtx_=g}return I.prototype.observe=function(u){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element=="undefined"||!(Element instanceof Object))return;if(!(u instanceof r(u).Element))throw new TypeError('parameter 1 is not of type "Element".');var k=this.observations_;if(k.has(u))return;k.set(u,new R(u)),this.controller_.addObserver(this),this.controller_.refresh()},I.prototype.unobserve=function(u){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element=="undefined"||!(Element instanceof Object))return;if(!(u instanceof r(u).Element))throw new TypeError('parameter 1 is not of type "Element".');var k=this.observations_;if(!k.has(u))return;k.delete(u),k.size||this.controller_.removeObserver(this)},I.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},I.prototype.gatherActive=function(){var u=this;this.clearActive(),this.observations_.forEach(function(k){k.isActive()&&u.activeObservations_.push(k)})},I.prototype.broadcastActive=function(){if(!this.hasActive())return;var u=this.callbackCtx_,k=this.activeObservations_.map(function(g){return new O(g.target,g.broadcastRect())});this.callback_.call(u,k,u),this.clearActive()},I.prototype.clearActive=function(){this.activeObservations_.splice(0)},I.prototype.hasActive=function(){return this.activeObservations_.length>0},I}(),D=typeof WeakMap!="undefined"?new WeakMap:new M,A=function(){function I(u){if(!(this instanceof I))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var k=l.getInstance(),g=new w(u,k,this);D.set(this,g)}return I}();["observe","unobserve","disconnect"].forEach(function(I){A.prototype[I]=function(){var u;return(u=D.get(this))[I].apply(u,arguments)}});var P=function(){return typeof X.ResizeObserver!="undefined"?X.ResizeObserver:A}();ee.a=P}).call(this,L("IGO8"))},c27x:function(W,ee,L){"use strict";L.d(ee,"a",function(){return G});var B=L("T/Jt"),M=L.n(B),G=B.createContext(null)},c5Ni:function(W,ee,L){},cDPC:function(W,ee,L){"use strict";var B=L("Hqw+"),M=L("T/Jt"),G=L.n(M),X=L("i3hx"),K=L.n(X);ee.a=function(N){var i=N.defaultX,T=i===void 0?"40%":i,e=N.leftChild,E=N.rightChild,l=N.className,_=N.hideResize,r=_===void 0?!1:_,n=Object(M.useState)(T),o=Object(B.a)(n,2),c=o[0],v=o[1],f=Object(M.useRef)();function y(){f.current=!0}Object(M.useEffect)(function(){function m(x){f.current&&v(x.pageX)}function d(){f.current=!1}return window.addEventListener("mousemove",m),window.addEventListener("mouseup",d),function(){window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",d)}},[]);var h=typeof c=="number"&&c!==.01?"".concat(c,"px"):T,b="calc(100% - ".concat(r?"0px":"4px"," - ").concat(h,")");return G.a.createElement("div",{className:"split-panel-container ".concat(l)},G.a.createElement("section",{style:{width:h,display:c===.01?"none":""}},e),G.a.createElement("section",{className:"resize-x-bar",onMouseDown:y},G.a.createElement("a",{className:"btn-resize"},G.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},G.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"})))),G.a.createElement("section",{style:{width:b}},E))}},cv67:function(W,ee,L){(function(B,M){W.exports=ee=M(L("Ib8C"))})(this,function(B){return function(M){var G=B,X=G.lib,K=X.WordArray,N=X.Hasher,i=G.algo,T=[];(function(){for(var n=0;n<64;n++)T[n]=M.abs(M.sin(n+1))*4294967296|0})();var e=i.MD5=N.extend({_doReset:function(){this._hash=new K.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(n,o){for(var c=0;c<16;c++){var v=o+c,f=n[v];n[v]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360}var y=this._hash.words,h=n[o+0],b=n[o+1],m=n[o+2],d=n[o+3],x=n[o+4],R=n[o+5],O=n[o+6],w=n[o+7],D=n[o+8],A=n[o+9],P=n[o+10],I=n[o+11],u=n[o+12],k=n[o+13],g=n[o+14],a=n[o+15],C=y[0],S=y[1],p=y[2],U=y[3];C=E(C,S,p,U,h,7,T[0]),U=E(U,C,S,p,b,12,T[1]),p=E(p,U,C,S,m,17,T[2]),S=E(S,p,U,C,d,22,T[3]),C=E(C,S,p,U,x,7,T[4]),U=E(U,C,S,p,R,12,T[5]),p=E(p,U,C,S,O,17,T[6]),S=E(S,p,U,C,w,22,T[7]),C=E(C,S,p,U,D,7,T[8]),U=E(U,C,S,p,A,12,T[9]),p=E(p,U,C,S,P,17,T[10]),S=E(S,p,U,C,I,22,T[11]),C=E(C,S,p,U,u,7,T[12]),U=E(U,C,S,p,k,12,T[13]),p=E(p,U,C,S,g,17,T[14]),S=E(S,p,U,C,a,22,T[15]),C=l(C,S,p,U,b,5,T[16]),U=l(U,C,S,p,O,9,T[17]),p=l(p,U,C,S,I,14,T[18]),S=l(S,p,U,C,h,20,T[19]),C=l(C,S,p,U,R,5,T[20]),U=l(U,C,S,p,P,9,T[21]),p=l(p,U,C,S,a,14,T[22]),S=l(S,p,U,C,x,20,T[23]),C=l(C,S,p,U,A,5,T[24]),U=l(U,C,S,p,g,9,T[25]),p=l(p,U,C,S,d,14,T[26]),S=l(S,p,U,C,D,20,T[27]),C=l(C,S,p,U,k,5,T[28]),U=l(U,C,S,p,m,9,T[29]),p=l(p,U,C,S,w,14,T[30]),S=l(S,p,U,C,u,20,T[31]),C=_(C,S,p,U,R,4,T[32]),U=_(U,C,S,p,D,11,T[33]),p=_(p,U,C,S,I,16,T[34]),S=_(S,p,U,C,g,23,T[35]),C=_(C,S,p,U,b,4,T[36]),U=_(U,C,S,p,x,11,T[37]),p=_(p,U,C,S,w,16,T[38]),S=_(S,p,U,C,P,23,T[39]),C=_(C,S,p,U,k,4,T[40]),U=_(U,C,S,p,h,11,T[41]),p=_(p,U,C,S,d,16,T[42]),S=_(S,p,U,C,O,23,T[43]),C=_(C,S,p,U,A,4,T[44]),U=_(U,C,S,p,u,11,T[45]),p=_(p,U,C,S,a,16,T[46]),S=_(S,p,U,C,m,23,T[47]),C=r(C,S,p,U,h,6,T[48]),U=r(U,C,S,p,w,10,T[49]),p=r(p,U,C,S,g,15,T[50]),S=r(S,p,U,C,R,21,T[51]),C=r(C,S,p,U,u,6,T[52]),U=r(U,C,S,p,d,10,T[53]),p=r(p,U,C,S,P,15,T[54]),S=r(S,p,U,C,b,21,T[55]),C=r(C,S,p,U,D,6,T[56]),U=r(U,C,S,p,a,10,T[57]),p=r(p,U,C,S,O,15,T[58]),S=r(S,p,U,C,k,21,T[59]),C=r(C,S,p,U,x,6,T[60]),U=r(U,C,S,p,I,10,T[61]),p=r(p,U,C,S,m,15,T[62]),S=r(S,p,U,C,A,21,T[63]),y[0]=y[0]+C|0,y[1]=y[1]+S|0,y[2]=y[2]+p|0,y[3]=y[3]+U|0},_doFinalize:function(){var n=this._data,o=n.words,c=this._nDataBytes*8,v=n.sigBytes*8;o[v>>>5]|=128<<24-v%32;var f=M.floor(c/4294967296),y=c;o[(v+64>>>9<<4)+15]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,o[(v+64>>>9<<4)+14]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,n.sigBytes=(o.length+1)*4,this._process();for(var h=this._hash,b=h.words,m=0;m<4;m++){var d=b[m];b[m]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360}return h},clone:function(){var n=N.clone.call(this);return n._hash=this._hash.clone(),n}});function E(n,o,c,v,f,y,h){var b=n+(o&c|~o&v)+f+h;return(b<<y|b>>>32-y)+o}function l(n,o,c,v,f,y,h){var b=n+(o&v|c&~v)+f+h;return(b<<y|b>>>32-y)+o}function _(n,o,c,v,f,y,h){var b=n+(o^c^v)+f+h;return(b<<y|b>>>32-y)+o}function r(n,o,c,v,f,y,h){var b=n+(c^(o|~v))+f+h;return(b<<y|b>>>32-y)+o}G.MD5=N._createHelper(e),G.HmacMD5=N._createHmacHelper(e)}(Math),B.MD5})},dejd:function(W,ee,L){},e7zE:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("3y9D"),L("WYAk"))})(this,function(B){return function(){var M=B,G=M.lib,X=G.Base,K=G.WordArray,N=M.algo,i=N.SHA1,T=N.HMAC,e=N.PBKDF2=X.extend({cfg:X.extend({keySize:128/32,hasher:i,iterations:1}),init:function(E){this.cfg=this.cfg.extend(E)},compute:function(E,l){for(var _=this.cfg,r=T.create(_.hasher,E),n=K.create(),o=K.create([1]),c=n.words,v=o.words,f=_.keySize,y=_.iterations;c.length<f;){var h=r.update(l).finalize(o);r.reset();for(var b=h.words,m=b.length,d=h,x=1;x<y;x++){d=r.finalize(d),r.reset();for(var R=d.words,O=0;O<m;O++)b[O]^=R[O]}n.concat(h),v[0]++}return n.sigBytes=f*4,n}});M.PBKDF2=function(E,l,_){return e.create(_).compute(E,l)}}(),B.PBKDF2})},eRFJ:function(W,ee,L){W.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"}},fjLI:function(W,ee,L){"use strict";L.d(ee,"f",function(){return r}),L.d(ee,"b",function(){return n}),L.d(ee,"a",function(){return o}),L.d(ee,"d",function(){return c}),L.d(ee,"e",function(){return v}),L.d(ee,"c",function(){return f});var B=L("8HAY"),M=L("Vhoy"),G=L("MI8n"),X=L("JYp7"),K=L("pmY6"),N=L("24hK"),i=L("nnTU"),T=L("T8No"),e=L("Cg/j"),E=L("t9D7"),l=function(y,h,b,m){var d=arguments.length,x=d<3?h:m===null?m=Object.getOwnPropertyDescriptor(h,b):m,R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(y,h,b,m);else for(var O=y.length-1;O>=0;O--)(R=y[O])&&(x=(d<3?R(x):d>3?R(h,b,x):R(h,b))||x);return d>3&&x&&Object.defineProperty(h,b,x),x},_=function(y,h){return function(b,m){h(b,m,y)}};function r(y){return y.command!==void 0}class n{constructor(y){this.id=n._idPool++,this._debugName=y}}n._idPool=0,n.CommandPalette=new n("CommandPalette"),n.EditorContext=new n("EditorContext"),n.SimpleEditorContext=new n("SimpleEditorContext"),n.EditorContextCopy=new n("EditorContextCopy"),n.EditorContextPeek=new n("EditorContextPeek"),n.MenubarEditMenu=new n("MenubarEditMenu"),n.MenubarCopy=new n("MenubarCopy"),n.MenubarGoMenu=new n("MenubarGoMenu"),n.MenubarSelectionMenu=new n("MenubarSelectionMenu"),n.InlineCompletionsActions=new n("InlineCompletionsActions");const o=Object(e.c)("menuService"),c=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new G.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:y=>y===n.CommandPalette}}addCommand(y){return this.addCommands(X.a.single(y))}addCommands(y){for(const h of y)this._commands.set(h.id,h);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(K.i)(()=>{let h=!1;for(const b of y)h=this._commands.delete(b.id)||h;h&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(y){return this._commands.get(y)}getCommands(){const y=new Map;return this._commands.forEach((h,b)=>y.set(b,h)),y}appendMenuItem(y,h){return this.appendMenuItems(X.a.single({id:y,item:h}))}appendMenuItems(y){const h=new Set,b=new N.a;for(const{id:m,item:d}of y){let x=this._menuItems.get(m);x||(x=new N.a,this._menuItems.set(m,x)),b.push(x.push(d)),h.add(m)}return this._onDidChangeMenu.fire(h),Object(K.i)(()=>{if(b.size>0){for(let m of b)m();this._onDidChangeMenu.fire(h),b.clear()}})}getMenuItems(y){let h;return this._menuItems.has(y)?h=[...this._menuItems.get(y)]:h=[],y===n.CommandPalette&&this._appendImplicitItems(h),h}_appendImplicitItems(y){const h=new Set;for(const b of y)r(b)&&(h.add(b.command.id),b.alt&&h.add(b.alt.id));this._commands.forEach((b,m)=>{h.has(m)||y.push({command:b})})}};class v extends B.e{constructor(y,h,b,m){super(`submenuitem.${y.submenu.id}`,typeof y.title=="string"?y.title:y.title.value,[],"submenu");this.item=y,this._menuService=h,this._contextKeyService=b,this._options=m}get actions(){const y=[],h=this._menuService.createMenu(this.item.submenu,this._contextKeyService),b=h.getActions(this._options);h.dispose();for(const[,m]of b)m.length>0&&(y.push(...m),y.push(new B.d));return y.length&&y.pop(),y}}let f=class y{constructor(h,b,m,d,x){var R,O;if(this._commandService=x,this.id=h.id,this.label=(m==null?void 0:m.renderShortTitle)&&h.shortTitle?typeof h.shortTitle=="string"?h.shortTitle:h.shortTitle.value:typeof h.title=="string"?h.title:h.title.value,this.tooltip=(O=typeof h.tooltip=="string"?h.tooltip:(R=h.tooltip)===null||R===void 0?void 0:R.value)!==null&&O!==void 0?O:"",this.enabled=!h.precondition||d.contextMatchesRules(h.precondition),this.checked=void 0,h.toggled){const w=h.toggled.condition?h.toggled:{condition:h.toggled};this.checked=d.contextMatchesRules(w.condition),this.checked&&w.tooltip&&(this.tooltip=typeof w.tooltip=="string"?w.tooltip:w.tooltip.value),w.title&&(this.label=typeof w.title=="string"?w.title:w.title.value)}this.item=h,this.alt=b?new y(b,void 0,m,d,x):void 0,this._options=m,E.d.isThemeIcon(h.icon)&&(this.class=M.a.asClassName(h.icon))}dispose(){}run(...h){var b,m;let d=[];return((b=this._options)===null||b===void 0?void 0:b.arg)&&(d=[...d,this._options.arg]),((m=this._options)===null||m===void 0?void 0:m.shouldForwardArgs)&&(d=[...d,...h]),this._commandService.executeCommand(this.id,...d)}};f=l([_(3,T.b),_(4,i.b)],f)},gRFJ:function(W,ee,L){W.exports=[L("rdUC"),L("ynwM"),L("RELg"),L("DlR+"),L("CrYA"),L("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(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;function f(W){return W<10?"0"+W:W}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(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);var gap,indent,meta,rep;function quote(W){return rx_escapable.lastIndex=0,rx_escapable.test(W)?'"'+W.replace(rx_escapable,function(ee){var L=meta[ee];return typeof L=="string"?L:"\\u"+("0000"+ee.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+W+'"'}function str(W,ee){var L,B,M,G,X=gap,K,N=ee[W];N&&typeof N=="object"&&typeof N.toJSON=="function"&&(N=N.toJSON(W)),typeof rep=="function"&&(N=rep.call(ee,W,N));switch(typeof N){case"string":return quote(N);case"number":return isFinite(N)?String(N):"null";case"boolean":case"null":return String(N);case"object":if(!N)return"null";if(gap+=indent,K=[],Object.prototype.toString.apply(N)==="[object Array]"){for(G=N.length,L=0;L<G;L+=1)K[L]=str(L,N)||"null";return M=K.length===0?"[]":gap?`[
|
|
|
`+gap+K.join(`,
|
|
|
`+gap)+`
|
|
|
`+X+"]":"["+K.join(",")+"]",gap=X,M}if(rep&&typeof rep=="object")for(G=rep.length,L=0;L<G;L+=1)typeof rep[L]=="string"&&(B=rep[L],M=str(B,N),M&&K.push(quote(B)+(gap?": ":":")+M));else for(B in N)Object.prototype.hasOwnProperty.call(N,B)&&(M=str(B,N),M&&K.push(quote(B)+(gap?": ":":")+M));return M=K.length===0?"{}":gap?`{
|
|
|
`+gap+K.join(`,
|
|
|
`+gap)+`
|
|
|
`+X+"}":"{"+K.join(",")+"}",gap=X,M}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(W,ee,L){var B;if(gap="",indent="",typeof L=="number")for(B=0;B<L;B+=1)indent+=" ";else typeof L=="string"&&(indent=L);if(rep=ee,ee&&typeof ee!="function"&&(typeof ee!="object"||typeof ee.length!="number"))throw new Error("JSON.stringify");return str("",{"":W})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(W,ee){var L,B,M=W[ee];if(M&&typeof M=="object")for(L in M)Object.prototype.hasOwnProperty.call(M,L)&&(B=walk(M,L),B!==void 0?M[L]=B:delete M[L]);return reviver.call(W,ee,M)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(W){return"\\u"+("0000"+W.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},"gb/T":function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("OLod"))})(this,function(B){return B.mode.ECB=function(){var M=B.lib.BlockCipherMode.extend();return M.Encryptor=M.extend({processBlock:function(G,X){this._cipher.encryptBlock(G,X)}}),M.Decryptor=M.extend({processBlock:function(G,X){this._cipher.decryptBlock(G,X)}}),M}(),B.mode.ECB})},hkPH:function(W,ee,L){"use strict";var B=L("yuO0"),M=L("XjgL"),G=L("kxoy"),X=L("36hc"),K=L("fNpE"),N=L("T/Jt"),i=L("27eb"),T=L.n(i),e=L("sg8A"),E=L("s7W6"),l=L("Eiay"),_=L("eA01"),r=L("fXDJ");function n(){return typeof BigInt=="function"}function o(U){var z=U.trim(),q=z.startsWith("-");q&&(z=z.slice(1)),z=z.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),z.startsWith(".")&&(z="0".concat(z));var $=z||"0",re=$.split("."),ce=re[0]||"0",ne=re[1]||"0";ce==="0"&&ne==="0"&&(q=!1);var me=q?"-":"";return{negative:q,negativeStr:me,trimStr:$,integerStr:ce,decimalStr:ne,fullStr:"".concat(me).concat($)}}function c(U){var z=String(U);return!Number.isNaN(Number(z))&&z.includes("e")}function v(U){var z=String(U);if(c(U)){var q=Number(z.slice(z.indexOf("e-")+2)),$=z.match(/\.(\d+)/);return($==null?void 0:$[1])&&(q+=$[1].length),q}return z.includes(".")&&y(z)?z.length-z.indexOf(".")-1:0}function f(U){var z=String(U);if(c(U)){if(U>Number.MAX_SAFE_INTEGER)return String(n()?BigInt(U).toString():Number.MAX_SAFE_INTEGER);if(U<Number.MIN_SAFE_INTEGER)return String(n()?BigInt(U).toString():Number.MIN_SAFE_INTEGER);z=U.toFixed(v(z))}return o(z).fullStr}function y(U){return typeof U=="number"?!Number.isNaN(U):U?/^\s*-?\d+(\.\d+)?\s*$/.test(U)||/^\s*-?\d+\.\s*$/.test(U)||/^\s*-?\.\d+\s*$/.test(U):!1}function h(U){var z=typeof U=="number"?f(U):o(U).fullStr,q=z.includes(".");return q?o(z.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:U+"0"}var b=function(){function U(z){if(Object(_.a)(this,U),this.origin="",this.number=void 0,this.empty=void 0,!z&&z!==0||!String(z).trim()){this.empty=!0;return}this.origin=String(z),this.number=Number(z)}return Object(r.a)(U,[{key:"negate",value:function(){return new U(-this.toNumber())}},{key:"add",value:function(q){if(this.isInvalidate())return new U(q);var $=Number(q);if(Number.isNaN($))return this;var re=this.number+$;if(re>Number.MAX_SAFE_INTEGER)return new U(Number.MAX_SAFE_INTEGER);if(re<Number.MIN_SAFE_INTEGER)return new U(Number.MIN_SAFE_INTEGER);var ce=Math.max(v(this.number),v($));return new U(re.toFixed(ce))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(q){return this.toNumber()===(q==null?void 0:q.toNumber())}},{key:"lessEquals",value:function(q){return this.add(q.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return q?this.isInvalidate()?"":f(this.number):this.origin}}]),U}(),m=function(){function U(z){if(Object(_.a)(this,U),this.origin="",this.negative=void 0,this.integer=void 0,this.decimal=void 0,this.decimalLen=void 0,this.empty=void 0,this.nan=void 0,!z&&z!==0||!String(z).trim()){this.empty=!0;return}if(this.origin=String(z),z==="-"){this.nan=!0;return}var q=z;if(c(q)&&(q=Number(q)),q=typeof q=="string"?q:f(q),y(q)){var $=o(q);this.negative=$.negative;var re=$.trimStr.split(".");this.integer=BigInt(re[0]);var ce=re[1]||"0";this.decimal=BigInt(ce),this.decimalLen=ce.length}else this.nan=!0}return Object(r.a)(U,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(q){var $="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(q,"0"));return BigInt($)}},{key:"negate",value:function(){var q=new U(this.toString());return q.negative=!q.negative,q}},{key:"add",value:function(q){if(this.isInvalidate())return new U(q);var $=new U(q);if($.isInvalidate())return this;var re=Math.max(this.getDecimalStr().length,$.getDecimalStr().length),ce=this.alignDecimal(re),ne=$.alignDecimal(re),me=(ce+ne).toString(),be=o(me),he=be.negativeStr,se=be.trimStr,_e="".concat(he).concat(se.padStart(re+1,"0"));return new U("".concat(_e.slice(0,-re),".").concat(_e.slice(-re)))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(q){return this.toString()===(q==null?void 0:q.toString())}},{key:"lessEquals",value:function(q){return this.add(q.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return q?this.isInvalidate()?"":o("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),U}();function d(U){return n()?new m(U):new b(U)}function x(U,z,q){var $=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(U==="")return"";var re=o(U),ce=re.negativeStr,ne=re.integerStr,me=re.decimalStr,be="".concat(z).concat(me),he="".concat(ce).concat(ne);if(q>=0){var se=Number(me[q]);if(se>=5&&!$){var _e=d(U).add("".concat(ce,"0.").concat("0".repeat(q)).concat(10-se));return x(_e.toString(),z,q,$)}return q===0?he:"".concat(he).concat(z).concat(me.padEnd(q,"0").slice(0,q))}return be===".0"?he:"".concat(he).concat(be)}var R=L("EOd9"),O=200,w=600;function D(U){var z=U.prefixCls,q=U.upNode,$=U.downNode,re=U.upDisabled,ce=U.downDisabled,ne=U.onStep,me=N.useRef(),be=N.useRef();be.current=ne;var he=function(ae,Q){ae.preventDefault(),be.current(Q);function J(){be.current(Q),me.current=setTimeout(J,O)}me.current=setTimeout(J,w)},se=function(){clearTimeout(me.current)};if(N.useEffect(function(){return se},[]),Object(R.a)())return null;var _e="".concat(z,"-handler"),De=T()(_e,"".concat(_e,"-up"),Object(M.a)({},"".concat(_e,"-up-disabled"),re)),ge=T()(_e,"".concat(_e,"-down"),Object(M.a)({},"".concat(_e,"-down-disabled"),ce)),fe={unselectable:"on",role:"button",onMouseUp:se,onMouseLeave:se};return N.createElement("div",{className:"".concat(_e,"-wrap")},N.createElement("span",Object(B.a)({},fe,{onMouseDown:function(ae){he(ae,!0)},"aria-label":"Increase Value","aria-disabled":re,className:De}),q||N.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-up-inner")})),N.createElement("span",Object(B.a)({},fe,{onMouseDown:function(ae){he(ae,!1)},"aria-label":"Decrease Value","aria-disabled":ce,className:ge}),$||N.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-down-inner")})))}var A=L("B/uU");function P(U,z){var q=Object(N.useRef)(null);function $(){try{var ce=U.selectionStart,ne=U.selectionEnd,me=U.value,be=me.substring(0,ce),he=me.substring(ne);q.current={start:ce,end:ne,value:me,beforeTxt:be,afterTxt:he}}catch(se){}}function re(){if(U&&q.current&&z)try{var ce=U.value,ne=q.current,me=ne.beforeTxt,be=ne.afterTxt,he=ne.start,se=ce.length;if(ce.endsWith(be))se=ce.length-q.current.afterTxt.length;else if(ce.startsWith(me))se=me.length;else{var _e=me[he-1],De=ce.indexOf(_e,he-1);De!==-1&&(se=De+1)}U.setSelectionRange(se,se)}catch(ge){Object(A.a)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(ge.message))}}return[$,re]}var I=L("IRwA"),u=function(){var U=Object(N.useRef)(0),z=function(){I.a.cancel(U.current)};return Object(N.useEffect)(function(){return z},[]),function(q){z(),U.current=Object(I.a)(function(){q()})}},k=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],g=function(z,q){return z||q.isEmpty()?q.toString():q.toNumber()},a=function(z){var q=d(z);return q.isInvalidate()?null:q},C=N.forwardRef(function(U,z){var q,$=U.prefixCls,re=$===void 0?"rc-input-number":$,ce=U.className,ne=U.style,me=U.min,be=U.max,he=U.step,se=he===void 0?1:he,_e=U.defaultValue,De=U.value,ge=U.disabled,fe=U.readOnly,Ce=U.upHandler,ae=U.downHandler,Q=U.keyboard,J=U.controls,Z=J===void 0?!0:J,pe=U.stringMode,le=U.parser,ye=U.formatter,Te=U.precision,Pe=U.decimalSeparator,He=U.onChange,Oe=U.onInput,Ue=U.onPressEnter,je=U.onStep,Ve=Object(K.a)(U,k),Re="".concat(re,"-input"),Xe=N.useRef(null),Qe=N.useState(!1),We=Object(X.a)(Qe,2),ze=We[0],Me=We[1],Ie=N.useRef(!1),Be=N.useRef(!1),we=N.useRef(!1),Ae=N.useState(function(){return d(De!=null?De:_e)}),ke=Object(X.a)(Ae,2),Le=ke[0],Ke=ke[1];function Ze(pt){De===void 0&&Ke(pt)}var Ne=N.useCallback(function(pt,Ct){return Ct?void 0:Te>=0?Te:Math.max(v(pt),v(se))},[Te,se]),$e=N.useCallback(function(pt){var Ct=String(pt);if(le)return le(Ct);var Dt=Ct;return Pe&&(Dt=Dt.replace(Pe,".")),Dt.replace(/[^\w.-]+/g,"")},[le,Pe]),Je=N.useRef(""),qe=N.useCallback(function(pt,Ct){if(ye)return ye(pt,{userTyping:Ct,input:String(Je.current)});var Dt=typeof pt=="number"?f(pt):pt;if(!Ct){var Tt=Ne(Dt,Ct);if(y(Dt)&&(Pe||Tt>=0)){var tr=Pe||".";Dt=x(Dt,tr,Tt)}}return Dt},[ye,Ne,Pe]),ot=N.useState(function(){var pt=_e!=null?_e:De;return Le.isInvalidate()&&["string","number"].includes(Object(G.a)(pt))?Number.isNaN(pt)?"":pt:qe(Le.toString(),!1)}),at=Object(X.a)(ot,2),rt=at[0],dt=at[1];Je.current=rt;function nt(pt,Ct){dt(qe(pt.isInvalidate()?pt.toString(!1):pt.toString(!Ct),Ct))}var mt=N.useMemo(function(){return a(be)},[be,Te]),yt=N.useMemo(function(){return a(me)},[me,Te]),ft=N.useMemo(function(){return!mt||!Le||Le.isInvalidate()?!1:mt.lessEquals(Le)},[mt,Le]),ht=N.useMemo(function(){return!yt||!Le||Le.isInvalidate()?!1:Le.lessEquals(yt)},[yt,Le]),Rt=P(Xe.current,ze),Wt=Object(X.a)(Rt,2),wt=Wt[0],lt=Wt[1],_t=function(Ct){return mt&&!Ct.lessEquals(mt)?mt:yt&&!yt.lessEquals(Ct)?yt:null},jt=function(Ct){return!_t(Ct)},Ht=function(Ct,Dt){var Tt=Ct,tr=jt(Tt)||Tt.isEmpty();if(!Tt.isEmpty()&&!Dt&&(Tt=_t(Tt)||Tt,tr=!0),!fe&&!ge&&tr){var yr=Tt.toString(),Kt=Ne(yr,Dt);return Kt>=0&&(Tt=d(x(yr,".",Kt)),jt(Tt)||(Tt=d(x(yr,".",Kt,!0)))),Tt.equals(Le)||(Ze(Tt),He==null||He(Tt.isEmpty()?null:g(pe,Tt)),De===void 0&&nt(Tt,Dt)),Tt}return Le},ct=u(),bt=function pt(Ct){if(wt(),dt(Ct),!Be.current){var Dt=$e(Ct),Tt=d(Dt);Tt.isNaN()||Ht(Tt,!0)}Oe==null||Oe(Ct),ct(function(){var tr=Ct;le||(tr=Ct.replace(/。/g,".")),tr!==Ct&&pt(tr)})},gt=function(){Be.current=!0},Ut=function(){Be.current=!1,bt(Xe.current.value)},Lt=function(Ct){bt(Ct.target.value)},It=function(Ct){var Dt;if(Ct&&ft||!Ct&&ht)return;Ie.current=!1;var Tt=d(we.current?h(se):se);Ct||(Tt=Tt.negate());var tr=(Le||d(0)).add(Tt.toString()),yr=Ht(tr,!1);je==null||je(g(pe,yr),{offset:we.current?h(se):se,type:Ct?"up":"down"}),(Dt=Xe.current)===null||Dt===void 0||Dt.focus()},St=function(Ct){var Dt=d($e(rt)),Tt=Dt;Dt.isNaN()?Tt=Le:Tt=Ht(Dt,Ct),De!==void 0?nt(Le,!1):Tt.isNaN()||nt(Tt,!1)},Jt=function(){Ie.current=!0},kt=function(Ct){var Dt=Ct.which,Tt=Ct.shiftKey;if(Ie.current=!0,Tt?we.current=!0:we.current=!1,Dt===e.a.ENTER&&(Be.current||(Ie.current=!1),St(!1),Ue==null||Ue(Ct)),Q===!1)return;!Be.current&&[e.a.UP,e.a.DOWN].includes(Dt)&&(It(e.a.UP===Dt),Ct.preventDefault())},zt=function(){Ie.current=!1,we.current=!1},st=function(){St(!1),Me(!1),Ie.current=!1};return Object(E.b)(function(){Le.isInvalidate()||nt(Le,!1)},[Te]),Object(E.b)(function(){var pt=d(De);Ke(pt);var Ct=d($e(rt));(!pt.equals(Ct)||!Ie.current||ye)&&nt(pt,Ie.current)},[De]),Object(E.b)(function(){ye&<()},[rt]),N.createElement("div",{className:T()(re,ce,(q={},Object(M.a)(q,"".concat(re,"-focused"),ze),Object(M.a)(q,"".concat(re,"-disabled"),ge),Object(M.a)(q,"".concat(re,"-readonly"),fe),Object(M.a)(q,"".concat(re,"-not-a-number"),Le.isNaN()),Object(M.a)(q,"".concat(re,"-out-of-range"),!Le.isInvalidate()&&!jt(Le)),q)),style:ne,onFocus:function(){Me(!0)},onBlur:st,onKeyDown:kt,onKeyUp:zt,onCompositionStart:gt,onCompositionEnd:Ut,onBeforeInput:Jt},Z&&N.createElement(D,{prefixCls:re,upNode:Ce,downNode:ae,upDisabled:ft,downDisabled:ht,onStep:It}),N.createElement("div",{className:"".concat(Re,"-wrap")},N.createElement("input",Object(B.a)({autoComplete:"off",role:"spinbutton","aria-valuemin":me,"aria-valuemax":be,"aria-valuenow":Le.isInvalidate()?null:Le.toString(),step:se},Ve,{ref:Object(l.a)(Xe,z),className:Re,value:rt,onChange:Lt,disabled:ge,readOnly:fe}))))});C.displayName="InputNumber";var S=C,p=ee.a=S},i3hx:function(W,ee,L){},ic2d:function(W,ee,L){"use strict";L.d(ee,"a",function(){return X});var B=L("FWmy"),M=L("746U");class G{constructor(){this.data=new Map}add(K,N){B.a(M.l(K)),B.a(M.k(N)),B.a(!this.data.has(K),"There is already an extension with this id"),this.data.set(K,N)}as(K){return this.data.get(K)||null}}const X=new G},jO9C:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("OLod"))})(this,function(B){return B.pad.Iso97971={pad:function(M,G){M.concat(B.lib.WordArray.create([2147483648],1)),B.pad.ZeroPadding.pad(M,G)},unpad:function(M){B.pad.ZeroPadding.unpad(M),M.sigBytes--}},B.pad.Iso97971})},je13:function(W,ee,L){var B=L("5nXd"),M=L("gRFJ"),G=[L("uQRt")];W.exports=B.createStore(M,G)},"ju+a":function(W,ee,L){"use strict";L.d(ee,"b",function(){return _}),L.d(ee,"a",function(){return r}),L.d(ee,"h",function(){return n}),L.d(ee,"f",function(){return o}),L.d(ee,"c",function(){return f}),L.d(ee,"d",function(){return y}),L.d(ee,"g",function(){return m}),L.d(ee,"e",function(){return d});var B=L("aVTQ"),M=L("kxoy"),G=L("yuO0"),X=L("fNpE"),K=L("B/uU"),N=L("T/Jt"),i=L.n(N),T=L("0pdE"),e=L("El5i"),E=L("rgEC"),l=["children"];function _(x,R){if(!x)return[];var O=x.slice(),w=O.indexOf(R);return w>=0&&O.splice(w,1),O}function r(x,R){var O=(x||[]).slice();return O.indexOf(R)===-1&&O.push(R),O}function n(x){return x.split("-")}function o(x,R){var O=[],w=Object(e.a)(R,x);function D(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];A.forEach(function(P){var I=P.key,u=P.children;O.push(I),D(u)})}return D(w.children),O}function c(x){if(x.parent){var R=n(x.pos);return Number(R[R.length-1])===x.parent.children.length-1}return!1}function v(x){var R=n(x.pos);return Number(R[R.length-1])===0}function f(x,R,O,w,D,A,P,I,u,k){var g,a=x.clientX,C=x.clientY,S=x.target.getBoundingClientRect(),p=S.top,U=S.height,z=(k==="rtl"?-1:1)*(((D==null?void 0:D.x)||0)-a),q=(z-12)/w,$=Object(e.a)(I,O.props.eventKey);if(C<p+U/2){var re=P.findIndex(function(ae){return ae.key===$.key}),ce=re<=0?0:re-1,ne=P[ce].key;$=Object(e.a)(I,ne)}var me=$.key,be=$,he=$.key,se=0,_e=0;if(!u.includes(me))for(var De=0;De<q&&c($);De+=1)$=$.parent,_e+=1;var ge=R.props.data,fe=$.node,Ce=!0;return v($)&&$.level===0&&C<p+U/2&&A({dragNode:ge,dropNode:fe,dropPosition:-1})&&$.key===O.props.eventKey?se=-1:(be.children||[]).length&&u.includes(he)?A({dragNode:ge,dropNode:fe,dropPosition:0})?se=0:Ce=!1:_e===0?q>-1.5?A({dragNode:ge,dropNode:fe,dropPosition:1})?se=1:Ce=!1:A({dragNode:ge,dropNode:fe,dropPosition:0})?se=0:A({dragNode:ge,dropNode:fe,dropPosition:1})?se=1:Ce=!1:A({dragNode:ge,dropNode:fe,dropPosition:1})?se=1:Ce=!1,{dropPosition:se,dropLevelOffset:_e,dropTargetKey:$.key,dropTargetPos:$.pos,dragOverNodeKey:he,dropContainerKey:se===0?null:((g=$.parent)===null||g===void 0?void 0:g.key)||null,dropAllowed:Ce}}function y(x,R){if(!x)return;var O=R.multiple;return O?x.slice():x.length?[x[0]]:x}var h=function(R){return R};function b(x,R){if(!x)return[];var O=R||{},w=O.processProps,D=w===void 0?h:w,A=Array.isArray(x)?x:[x];return A.map(function(P){var I=P.children,u=Object(X.a)(P,l),k=b(I,R);return i.a.createElement(T.a,Object(G.a)({key:u.key},D(u)),k)})}function m(x){if(!x)return null;var R;if(Array.isArray(x))R={checkedKeys:x,halfCheckedKeys:void 0};else if(Object(M.a)(x)==="object")R={checkedKeys:x.checked||void 0,halfCheckedKeys:x.halfChecked||void 0};else return Object(K.a)(!1,"`checkedKeys` is not an array or an object"),null;return R}function d(x,R){var O=new Set;function w(D){if(O.has(D))return;var A=Object(e.a)(R,D);if(!A)return;O.add(D);var P=A.parent,I=A.node;if(I.disabled)return;P&&w(P.key)}return(x||[]).forEach(function(D){w(D)}),Object(B.a)(O)}},kQR0:function(W,ee,L){"use strict";L.d(ee,"a",function(){return ke});var B=L("XjgL"),M=L("yuO0"),G=L("6ASS"),X=L("aVTQ"),K=L("36hc"),N=L("kxoy"),i=L("T/Jt"),T=L("bBMO"),e=L("E0BR"),E=L("cZC0"),l=L("27eb"),_=L.n(l),r=L("1HCi"),n=L.n(r),o=L("B/uU"),c=L("s3yx"),v=L("tybu"),f=L("YLkp"),y=L("IEJz"),h=L("x/L2"),b=L("Dpym"),m=L("TqI3"),d=L("5Und");function x(Ne){var $e=Ne.cells,Je=Ne.stickyOffsets,qe=Ne.flattenColumns,ot=Ne.rowComponent,at=Ne.cellComponent,rt=Ne.onHeaderRow,dt=Ne.index,nt=i.useContext(b.a),mt=nt.prefixCls,yt=nt.direction,ft;rt&&(ft=rt($e.map(function(Rt){return Rt.column}),dt));var ht=Object(d.a)($e.map(function(Rt){return Rt.column}));return i.createElement(ot,ft,$e.map(function(Rt,Wt){var wt=Rt.column,lt=Object(m.a)(Rt.colStart,Rt.colEnd,qe,Je,yt),_t;return wt&&wt.onHeaderCell&&(_t=Rt.column.onHeaderCell(wt)),i.createElement(h.a,Object(M.a)({},Rt,{ellipsis:wt.ellipsis,align:wt.align,component:at,prefixCls:mt,key:ht[Wt]},lt,{additionalProps:_t,rowType:"header"}))}))}x.displayName="HeaderRow";var R=x;function O(Ne){var $e=[];function Je(rt,dt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;$e[nt]=$e[nt]||[];var mt=dt,yt=rt.filter(Boolean).map(function(ft){var ht={key:ft.key,className:ft.className||"",children:ft.title,column:ft,colStart:mt},Rt=1,Wt=ft.children;return Wt&&Wt.length>0&&(Rt=Je(Wt,mt,nt+1).reduce(function(wt,lt){return wt+lt},0),ht.hasSubColumns=!0),"colSpan"in ft&&(Rt=ft.colSpan),"rowSpan"in ft&&(ht.rowSpan=ft.rowSpan),ht.colSpan=Rt,ht.colEnd=ht.colStart+Rt-1,$e[nt].push(ht),mt+=Rt,Rt});return yt}Je(Ne,0);for(var qe=$e.length,ot=function(dt){$e[dt].forEach(function(nt){!("rowSpan"in nt)&&!nt.hasSubColumns&&(nt.rowSpan=qe-dt)})},at=0;at<qe;at+=1)ot(at);return $e}function w(Ne){var $e=Ne.stickyOffsets,Je=Ne.columns,qe=Ne.flattenColumns,ot=Ne.onHeaderRow,at=i.useContext(b.a),rt=at.prefixCls,dt=at.getComponent,nt=i.useMemo(function(){return O(Je)},[Je]),mt=dt(["header","wrapper"],"thead"),yt=dt(["header","row"],"tr"),ft=dt(["header","cell"],"th");return i.createElement(mt,{className:"".concat(rt,"-thead")},nt.map(function(ht,Rt){var Wt=i.createElement(R,{key:Rt,flattenColumns:qe,cells:ht,stickyOffsets:$e,rowComponent:yt,cellComponent:ft,onHeaderRow:ot,index:Rt});return Wt}))}var D=w,A=L("ynYK"),P=i.createContext(null),I=P;function u(Ne){var $e=Ne.prefixCls,Je=Ne.children,qe=Ne.component,ot=Ne.cellComponent,at=Ne.className,rt=Ne.expanded,dt=Ne.colSpan,nt=Ne.isEmpty,mt=i.useContext(b.a),yt=mt.scrollbarSize,ft=i.useContext(I),ht=ft.fixHeader,Rt=ft.fixColumn,Wt=ft.componentWidth,wt=ft.horizonScroll;return i.useMemo(function(){var lt=Je;return(nt?wt:Rt)&&(lt=i.createElement("div",{style:{width:Wt-(ht?yt:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat($e,"-expanded-row-fixed")},Wt!==0&<)),i.createElement(qe,{className:at,style:{display:rt?null:"none"}},i.createElement(h.a,{component:ot,prefixCls:$e,colSpan:dt},lt))},[Je,qe,at,rt,dt,nt,yt,Wt,Rt,ht,wt])}var k=u,g=i.createContext(null),a=g;function C(Ne){var $e=Ne.className,Je=Ne.style,qe=Ne.record,ot=Ne.index,at=Ne.renderIndex,rt=Ne.rowKey,dt=Ne.rowExpandable,nt=Ne.expandedKeys,mt=Ne.onRow,yt=Ne.indent,ft=yt===void 0?0:yt,ht=Ne.rowComponent,Rt=Ne.cellComponent,Wt=Ne.childrenColumnName,wt=i.useContext(b.a),lt=wt.prefixCls,_t=wt.fixedInfoList,jt=i.useContext(A.a),Ht=jt.flattenColumns,ct=jt.expandableType,bt=jt.expandRowByClick,gt=jt.onTriggerExpand,Ut=jt.rowClassName,Lt=jt.expandedRowClassName,It=jt.indentSize,St=jt.expandIcon,Jt=jt.expandedRowRender,kt=jt.expandIconColumnIndex,zt=i.useState(!1),st=Object(K.a)(zt,2),pt=st[0],Ct=st[1],Dt=nt&&nt.has(Ne.recordKey);i.useEffect(function(){Dt&&Ct(!0)},[Dt]);var Tt=ct==="row"&&(!dt||dt(qe)),tr=ct==="nest",yr=Wt&&qe&&qe[Wt],Kt=Tt||tr,ue=i.useRef(gt);ue.current=gt;var V=function(){ue.current.apply(ue,arguments)},Y=mt==null?void 0:mt(qe,ot),ie=function(Ft){var Xt;bt&&Kt&&V(qe,Ft);for(var er=arguments.length,nr=new Array(er>1?er-1:0),ur=1;ur<er;ur++)nr[ur-1]=arguments[ur];Y==null||((Xt=Y.onClick)===null||Xt===void 0)||Xt.call.apply(Xt,[Y,Ft].concat(nr))},Ee;typeof Ut=="string"?Ee=Ut:typeof Ut=="function"&&(Ee=Ut(qe,ot,ft));var oe=Object(d.a)(Ht),Fe=i.createElement(ht,Object(M.a)({},Y,{"data-row-key":rt,className:_()($e,"".concat(lt,"-row"),"".concat(lt,"-row-level-").concat(ft),Ee,Y&&Y.className),style:Object(G.a)(Object(G.a)({},Je),Y?Y.style:null),onClick:ie}),Ht.map(function(ut,Ft){var Xt=ut.render,er=ut.dataIndex,nr=ut.className,ur=oe[Ft],fr=_t[Ft],Pt;Ft===(kt||0)&&tr&&(Pt=i.createElement(i.Fragment,null,i.createElement("span",{style:{paddingLeft:"".concat(It*ft,"px")},className:"".concat(lt,"-row-indent indent-level-").concat(ft)}),St({prefixCls:lt,expanded:Dt,expandable:yr,record:qe,onExpand:V})));var sr;return ut.onCell&&(sr=ut.onCell(qe,ot)),i.createElement(h.a,Object(M.a)({className:nr,ellipsis:ut.ellipsis,align:ut.align,component:Rt,prefixCls:lt,key:ur,record:qe,index:ot,renderIndex:at,dataIndex:er,render:Xt,shouldCellUpdate:ut.shouldCellUpdate,expanded:Pt&&Dt},fr,{appendNode:Pt,additionalProps:sr}))})),tt;if(Tt&&(pt||Dt)){var xt=Jt(qe,ot,ft+1,Dt),Ot=Lt&&Lt(qe,ot,ft);tt=i.createElement(k,{expanded:Dt,className:_()("".concat(lt,"-expanded-row"),"".concat(lt,"-expanded-row-level-").concat(ft+1),Ot),prefixCls:lt,component:ht,cellComponent:Rt,colSpan:Ht.length,isEmpty:!1},xt)}return i.createElement(i.Fragment,null,Fe,tt)}C.displayName="BodyRow";var S=C;function p(Ne,$e,Je,qe,ot,at){var rt=[];rt.push({record:Ne,indent:$e,index:at});var dt=ot(Ne),nt=qe==null?void 0:qe.has(dt);if(Ne&&Array.isArray(Ne[Je])&&nt)for(var mt=0;mt<Ne[Je].length;mt+=1){var yt=p(Ne[Je][mt],$e+1,Je,qe,ot,mt);rt.push.apply(rt,Object(X.a)(yt))}return rt}function U(Ne,$e,Je,qe){var ot=i.useMemo(function(){if(Je==null?void 0:Je.size){for(var at=[],rt=0;rt<(Ne==null?void 0:Ne.length);rt+=1){var dt=Ne[rt];at.push.apply(at,Object(X.a)(p(dt,0,$e,Je,qe,rt)))}return at}return Ne==null?void 0:Ne.map(function(nt,mt){return{record:nt,indent:0,index:mt}})},[Ne,$e,Je,qe]);return ot}var z=L("QOAJ"),q=L("VbWF");function $(Ne){var $e=Ne.columnKey,Je=Ne.onColumnResize,qe=i.useRef();return i.useEffect(function(){qe.current&&Je($e,qe.current.offsetWidth)},[]),i.createElement(c.a,{data:$e},i.createElement("td",{ref:qe,style:{padding:0,border:0,height:0}},i.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function re(Ne){var $e=Ne.prefixCls,Je=Ne.columnsKey,qe=Ne.onColumnResize;return i.createElement("tr",{"aria-hidden":"true",className:"".concat($e,"-measure-row"),style:{height:0,fontSize:0}},i.createElement(c.a.Collection,{onBatchResize:function(at){at.forEach(function(rt){var dt=rt.data,nt=rt.size;qe(dt,nt.offsetWidth)})}},Je.map(function(ot){return i.createElement($,{key:ot,columnKey:ot,onColumnResize:qe})})))}function ce(Ne){var $e=Ne.data,Je=Ne.getRowKey,qe=Ne.measureColumnWidth,ot=Ne.expandedKeys,at=Ne.onRow,rt=Ne.rowExpandable,dt=Ne.emptyNode,nt=Ne.childrenColumnName,mt=i.useContext(a),yt=mt.onColumnResize,ft=i.useContext(b.a),ht=ft.prefixCls,Rt=ft.getComponent,Wt=i.useContext(A.a),wt=Wt.flattenColumns,lt=U($e,nt,ot,Je),_t=i.useRef({renderWithProps:!1}),jt=i.useState(-1),Ht=Object(K.a)(jt,2),ct=Ht[0],bt=Ht[1],gt=i.useState(-1),Ut=Object(K.a)(gt,2),Lt=Ut[0],It=Ut[1],St=i.useCallback(function(kt,zt){bt(kt),It(zt)},[]),Jt=i.useMemo(function(){var kt=Rt(["body","wrapper"],"tbody"),zt=Rt(["body","row"],"tr"),st=Rt(["body","cell"],"td"),pt;$e.length?pt=lt.map(function(Dt,Tt){var tr=Dt.record,yr=Dt.indent,Kt=Dt.index,ue=Je(tr,Tt);return i.createElement(S,{key:ue,rowKey:ue,record:tr,recordKey:ue,index:Tt,renderIndex:Kt,rowComponent:zt,cellComponent:st,expandedKeys:ot,onRow:at,getRowKey:Je,rowExpandable:rt,childrenColumnName:nt,indent:yr})}):pt=i.createElement(k,{expanded:!0,className:"".concat(ht,"-placeholder"),prefixCls:ht,component:zt,cellComponent:st,colSpan:wt.length,isEmpty:!0},dt);var Ct=Object(d.a)(wt);return i.createElement(kt,{className:"".concat(ht,"-tbody")},qe&&i.createElement(re,{prefixCls:ht,columnsKey:Ct,onColumnResize:yt}),pt)},[$e,ht,at,qe,ot,Je,Rt,dt,wt,nt,yt,rt,lt]);return i.createElement(q.a.Provider,{value:_t.current},i.createElement(z.a.Provider,{value:{startRow:ct,endRow:Lt,onHover:St}},Jt))}var ne=i.memo(ce);ne.displayName="Body";var me=ne,be=L("Gq82");function he(Ne){var $e=Object(i.useRef)(Ne),Je=Object(i.useState)({}),qe=Object(K.a)(Je,2),ot=qe[1],at=Object(i.useRef)(null),rt=Object(i.useRef)([]);function dt(nt){rt.current.push(nt);var mt=Promise.resolve();at.current=mt,mt.then(function(){if(at.current===mt){var yt=rt.current,ft=$e.current;rt.current=[],yt.forEach(function(ht){$e.current=ht($e.current)}),at.current=null,ft!==$e.current&&ot({})}})}return Object(i.useEffect)(function(){return function(){at.current=null}},[]),[$e.current,dt]}function se(Ne){var $e=Object(i.useRef)(Ne||null),Je=Object(i.useRef)();function qe(){window.clearTimeout(Je.current)}function ot(rt){$e.current=rt,qe(),Je.current=window.setTimeout(function(){$e.current=null,Je.current=void 0},100)}function at(){return $e.current}return Object(i.useEffect)(function(){return qe},[]),[ot,at]}function _e(Ne,$e,Je){var qe=Object(i.useMemo)(function(){for(var ot=[],at=[],rt=0,dt=0,nt=0;nt<$e;nt+=1)if(Je==="rtl"){at[nt]=dt,dt+=Ne[nt]||0;var mt=$e-nt-1;ot[mt]=rt,rt+=Ne[mt]||0}else{ot[nt]=rt,rt+=Ne[nt]||0;var yt=$e-nt-1;at[yt]=dt,dt+=Ne[yt]||0}return{left:ot,right:at}},[Ne,$e,Je]);return qe}var De=_e,ge=L("fNpE"),fe=L("+E2i"),Ce=["columnType"];function ae(Ne){for(var $e=Ne.colWidths,Je=Ne.columns,qe=Ne.columCount,ot=[],at=qe||Je.length,rt=!1,dt=at-1;dt>=0;dt-=1){var nt=$e[dt],mt=Je&&Je[dt],yt=mt&&mt[fe.a];if(nt||yt||rt){var ft=yt||{},ht=ft.columnType,Rt=Object(ge.a)(ft,Ce);ot.unshift(i.createElement("col",Object(M.a)({key:dt,style:{width:nt}},Rt))),rt=!0}}return i.createElement("colgroup",null,ot)}var Q=ae;function J(Ne){var $e=Ne.className,Je=Ne.children;return i.createElement("div",{className:$e},Je)}var Z=J,pe=L("YA0V");function le(Ne){var $e,Je=Ne.prefixCls,qe=Ne.record,ot=Ne.onExpand,at=Ne.expanded,rt=Ne.expandable,dt="".concat(Je,"-row-expand-icon");if(!rt)return i.createElement("span",{className:_()(dt,"".concat(Je,"-row-spaced"))});var nt=function(yt){ot(qe,yt),yt.stopPropagation()};return i.createElement("span",{className:_()(dt,($e={},Object(B.a)($e,"".concat(Je,"-row-expanded"),at),Object(B.a)($e,"".concat(Je,"-row-collapsed"),!at),$e)),onClick:nt})}function ye(Ne,$e,Je){var qe=[];function ot(at){(at||[]).forEach(function(rt,dt){qe.push($e(rt,dt)),ot(rt[Je])})}return ot(Ne),qe}var Te=L("1bEF"),Pe=L("tty/"),He=function($e,Je){var qe,ot,at=$e.scrollBodyRef,rt=$e.onScroll,dt=$e.offsetScroll,nt=$e.container,mt=i.useContext(b.a),yt=mt.prefixCls,ft=((qe=at.current)===null||qe===void 0?void 0:qe.scrollWidth)||0,ht=((ot=at.current)===null||ot===void 0?void 0:ot.clientWidth)||0,Rt=ft&&ht*(ht/ft),Wt=i.useRef(),wt=he({scrollLeft:0,isHiddenScrollBar:!1}),lt=Object(K.a)(wt,2),_t=lt[0],jt=lt[1],Ht=i.useRef({delta:0,x:0}),ct=i.useState(!1),bt=Object(K.a)(ct,2),gt=bt[0],Ut=bt[1],Lt=function(){Ut(!1)},It=function(st){st.persist(),Ht.current.delta=st.pageX-_t.scrollLeft,Ht.current.x=0,Ut(!0),st.preventDefault()},St=function(st){var pt,Ct=st||((pt=window)===null||pt===void 0?void 0:pt.event),Dt=Ct.buttons;if(!gt||Dt===0){gt&&Ut(!1);return}var Tt=Ht.current.x+st.pageX-Ht.current.x-Ht.current.delta;Tt<=0&&(Tt=0),Tt+Rt>=ht&&(Tt=ht-Rt),rt({scrollLeft:Tt/ht*(ft+2)}),Ht.current.x=st.pageX},Jt=function(){if(!at.current)return;var st=Object(Pe.b)(at.current).top,pt=st+at.current.offsetHeight,Ct=nt===window?document.documentElement.scrollTop+window.innerHeight:Object(Pe.b)(nt).top+nt.clientHeight;pt-Object(v.a)()<=Ct||st>=Ct-dt?jt(function(Dt){return Object(G.a)(Object(G.a)({},Dt),{},{isHiddenScrollBar:!0})}):jt(function(Dt){return Object(G.a)(Object(G.a)({},Dt),{},{isHiddenScrollBar:!1})})},kt=function(st){jt(function(pt){return Object(G.a)(Object(G.a)({},pt),{},{scrollLeft:st/ft*ht||0})})};return i.useImperativeHandle(Je,function(){return{setScrollLeft:kt}}),i.useEffect(function(){var zt=Object(Te.a)(document.body,"mouseup",Lt,!1),st=Object(Te.a)(document.body,"mousemove",St,!1);return Jt(),function(){zt.remove(),st.remove()}},[Rt,gt]),i.useEffect(function(){var zt=Object(Te.a)(nt,"scroll",Jt,!1),st=Object(Te.a)(window,"resize",Jt,!1);return function(){zt.remove(),st.remove()}},[nt]),i.useEffect(function(){_t.isHiddenScrollBar||jt(function(zt){var st=at.current;return st?Object(G.a)(Object(G.a)({},zt),{},{scrollLeft:st.scrollLeft/st.scrollWidth*st.clientWidth}):zt})},[_t.isHiddenScrollBar]),ft<=ht||!Rt||_t.isHiddenScrollBar?null:i.createElement("div",{style:{height:Object(v.a)(),width:ht,bottom:dt},className:"".concat(yt,"-sticky-scroll")},i.createElement("div",{onMouseDown:It,ref:Wt,className:_()("".concat(yt,"-sticky-scroll-bar"),Object(B.a)({},"".concat(yt,"-sticky-scroll-bar-active"),gt)),style:{width:"".concat(Rt,"px"),transform:"translate3d(".concat(_t.scrollLeft,"px, 0, 0)")}}))},Oe=i.forwardRef(He),Ue=L("Zfln"),je=Object(Ue.a)()?window:null;function Ve(Ne,$e){var Je=Object(N.a)(Ne)==="object"?Ne:{},qe=Je.offsetHeader,ot=qe===void 0?0:qe,at=Je.offsetSummary,rt=at===void 0?0:at,dt=Je.offsetScroll,nt=dt===void 0?0:dt,mt=Je.getContainer,yt=mt===void 0?function(){return je}:mt,ft=yt()||je;return i.useMemo(function(){var ht=!!Ne;return{isSticky:ht,stickyClassName:ht?"".concat($e,"-sticky-holder"):"",offsetHeader:ot,offsetSummary:rt,offsetScroll:nt,container:ft}},[nt,ot,rt,$e,ft])}var Re=L("Eiay"),Xe=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Qe(Ne,$e){return Object(i.useMemo)(function(){for(var Je=[],qe=0;qe<$e;qe+=1){var ot=Ne[qe];if(ot!==void 0)Je[qe]=ot;else return null}return Je},[Ne.join("_"),$e])}var We=i.forwardRef(function(Ne,$e){var Je=Ne.className,qe=Ne.noData,ot=Ne.columns,at=Ne.flattenColumns,rt=Ne.colWidths,dt=Ne.columCount,nt=Ne.stickyOffsets,mt=Ne.direction,yt=Ne.fixHeader,ft=Ne.stickyTopOffset,ht=Ne.stickyBottomOffset,Rt=Ne.stickyClassName,Wt=Ne.onScroll,wt=Ne.maxContentScroll,lt=Ne.children,_t=Object(ge.a)(Ne,Xe),jt=i.useContext(b.a),Ht=jt.prefixCls,ct=jt.scrollbarSize,bt=jt.isSticky,gt=bt&&!yt?0:ct,Ut=i.useRef(null),Lt=i.useCallback(function(Ct){Object(Re.b)($e,Ct),Object(Re.b)(Ut,Ct)},[]);i.useEffect(function(){var Ct;function Dt(Tt){var tr=Tt.currentTarget,yr=Tt.deltaX;yr&&(Wt({currentTarget:tr,scrollLeft:tr.scrollLeft+yr}),Tt.preventDefault())}return(Ct=Ut.current)===null||Ct===void 0||Ct.addEventListener("wheel",Dt),function(){var Tt;(Tt=Ut.current)===null||Tt===void 0||Tt.removeEventListener("wheel",Dt)}},[]);var It=i.useMemo(function(){return at.every(function(Ct){return Ct.width>=0})},[at]),St=at[at.length-1],Jt={fixed:St?St.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Ht,"-cell-scrollbar")}}},kt=Object(i.useMemo)(function(){return gt?[].concat(Object(X.a)(ot),[Jt]):ot},[gt,ot]),zt=Object(i.useMemo)(function(){return gt?[].concat(Object(X.a)(at),[Jt]):at},[gt,at]),st=Object(i.useMemo)(function(){var Ct=nt.right,Dt=nt.left;return Object(G.a)(Object(G.a)({},nt),{},{left:mt==="rtl"?[].concat(Object(X.a)(Dt.map(function(Tt){return Tt+gt})),[0]):Dt,right:mt==="rtl"?Ct:[].concat(Object(X.a)(Ct.map(function(Tt){return Tt+gt})),[0]),isSticky:bt})},[gt,nt,bt]),pt=Qe(rt,dt);return i.createElement("div",{style:Object(G.a)({overflow:"hidden"},bt?{top:ft,bottom:ht}:{}),ref:Lt,className:_()(Je,Object(B.a)({},Rt,!!Rt))},i.createElement("table",{style:{tableLayout:"fixed",visibility:qe||pt?null:"hidden"}},(!qe||!wt||It)&&i.createElement(Q,{colWidths:pt?[].concat(Object(X.a)(pt),[gt]):[],columCount:dt+1,columns:zt}),lt(Object(G.a)(Object(G.a)({},_t),{},{stickyOffsets:st,columns:kt,flattenColumns:zt}))))});We.displayName="FixedHolder";var ze=We,Me=L("3GYr"),Ie=L("MRIS"),Be=L("VUat"),we=[],Ae={},ke="rc-table-internal-hook",Le=i.memo(function(Ne){var $e=Ne.children;return $e},function(Ne,$e){return n()(Ne.props,$e.props)?Ne.pingLeft!==$e.pingLeft||Ne.pingRight!==$e.pingRight:!1});function Ke(Ne){var $e,Je=Ne.prefixCls,qe=Ne.className,ot=Ne.rowClassName,at=Ne.style,rt=Ne.data,dt=Ne.rowKey,nt=Ne.scroll,mt=Ne.tableLayout,yt=Ne.direction,ft=Ne.title,ht=Ne.footer,Rt=Ne.summary,Wt=Ne.id,wt=Ne.showHeader,lt=Ne.components,_t=Ne.emptyText,jt=Ne.onRow,Ht=Ne.onHeaderRow,ct=Ne.internalHooks,bt=Ne.transformColumns,gt=Ne.internalRefs,Ut=Ne.sticky,Lt=rt||we,It=!!Lt.length,St=i.useCallback(function(vr,Qt){return Object(d.b)(lt||{},vr)||Qt},[lt]),Jt=i.useMemo(function(){return typeof dt=="function"?dt:function(vr){var Qt=vr&&vr[dt];return Qt}},[dt]),kt=Object(fe.b)(Ne),zt=kt.expandIcon,st=kt.expandedRowKeys,pt=kt.defaultExpandedRowKeys,Ct=kt.defaultExpandAllRows,Dt=kt.expandedRowRender,Tt=kt.columnTitle,tr=kt.onExpand,yr=kt.onExpandedRowsChange,Kt=kt.expandRowByClick,ue=kt.rowExpandable,V=kt.expandIconColumnIndex,Y=kt.expandedRowClassName,ie=kt.childrenColumnName,Ee=kt.indentSize,oe=zt||le,Fe=ie||"children",tt=i.useMemo(function(){return Dt?"row":Ne.expandable&&ct===ke&&Ne.expandable.__PARENT_RENDER_ICON__||Lt.some(function(vr){return vr&&Object(N.a)(vr)==="object"&&vr[Fe]})?"nest":!1},[!!Dt,Lt]),xt=i.useState(function(){return pt||(Ct?ye(Lt,Jt,Fe):[])}),Ot=Object(K.a)(xt,2),ut=Ot[0],Ft=Ot[1],Xt=i.useMemo(function(){return new Set(st||ut||[])},[st,ut]),er=i.useCallback(function(vr){var Qt=Jt(vr,Lt.indexOf(vr)),Tr,Kr=Xt.has(Qt);Kr?(Xt.delete(Qt),Tr=Object(X.a)(Xt)):Tr=[].concat(Object(X.a)(Xt),[Qt]),Ft(Tr),tr&&tr(!Kr,vr),yr&&yr(Tr)},[Jt,Xt,Lt,tr,yr]),nr=i.useState(0),ur=Object(K.a)(nr,2),fr=ur[0],Pt=ur[1],sr=Object(be.b)(Object(G.a)(Object(G.a)(Object(G.a)({},Ne),kt),{},{expandable:!!Dt,columnTitle:Tt,expandedKeys:Xt,getRowKey:Jt,onTriggerExpand:er,expandIcon:oe,expandIconColumnIndex:V,direction:yt}),ct===ke?bt:null),lr=Object(K.a)(sr,2),br=lr[0],$t=lr[1],$r=i.useMemo(function(){return{columns:br,flattenColumns:$t}},[br,$t]),jr=i.useRef(),Kn=i.useRef(),Xr=i.useRef(),pn=i.useRef(),rn=i.useRef(),Nn=i.useState(!1),Cr=Object(K.a)(Nn,2),nn=Cr[0],Tn=Cr[1],an=i.useState(!1),Pr=Object(K.a)(an,2),cr=Pr[0],Nr=Pr[1],mr=he(new Map),zr=Object(K.a)(mr,2),Or=zr[0],Vr=zr[1],Wr=Object(d.a)($t),vn=Wr.map(function(vr){return Or.get(vr)}),Dn=i.useMemo(function(){return vn},[vn.join("_")]),hr=De(Dn,$t.length,yt),rr=nt&&Object(d.c)(nt.y),Ar=nt&&Object(d.c)(nt.x)||Boolean(kt.fixed),Dr=Ar&&$t.some(function(vr){var Qt=vr.fixed;return Qt}),Jr=i.useRef(),Qr=Ve(Ut,Je),cn=Qr.isSticky,kr=Qr.offsetHeader,Yt=Qr.offsetSummary,ir=Qr.offsetScroll,Zt=Qr.stickyClassName,Er=Qr.container,gr=Rt==null?void 0:Rt(Lt),Rr=(rr||cn)&&i.isValidElement(gr)&&gr.type===Me.a&&gr.props.fixed,xr,Br,dn;rr&&(Br={overflowY:"scroll",maxHeight:nt.y}),Ar&&(xr={overflowX:"auto"},rr||(Br={overflowY:"hidden"}),dn={width:(nt==null?void 0:nt.x)===!0?"auto":nt==null?void 0:nt.x,minWidth:"100%"});var wr=i.useCallback(function(vr,Qt){Object(T.a)(jr.current)&&Vr(function(Tr){if(Tr.get(vr)!==Qt){var Kr=new Map(Tr);return Kr.set(vr,Qt),Kr}return Tr})},[]),Yn=se(null),Ir=Object(K.a)(Yn,2),yn=Ir[0],on=Ir[1];function bn(vr,Qt){if(!Qt)return;typeof Qt=="function"?Qt(vr):Qt.scrollLeft!==vr&&(Qt.scrollLeft=vr)}var ii=function(Qt){var Tr=Qt.currentTarget,Kr=Qt.scrollLeft,ci=yt==="rtl",zn=typeof Kr=="number"?Kr:Tr.scrollLeft,_i=Tr||Ae;if(!on()||on()===_i){var Di;yn(_i),bn(zn,Kn.current),bn(zn,Xr.current),bn(zn,rn.current),bn(zn,(Di=Jr.current)===null||Di===void 0?void 0:Di.setScrollLeft)}if(Tr){var jn=Tr.scrollWidth,ei=Tr.clientWidth;if(jn===ei){Tn(!1),Nr(!1);return}ci?(Tn(-zn<jn-ei),Nr(-zn>0)):(Tn(zn>0),Nr(zn<jn-ei))}},Ii=function(){Ar&&Xr.current?ii({currentTarget:Xr.current}):(Tn(!1),Nr(!1))},si=function(Qt){var Tr=Qt.width;Tr!==fr&&(Ii(),Pt(jr.current?jr.current.offsetWidth:Tr))},Zr=i.useRef(!1);i.useEffect(function(){Zr.current&&Ii()},[Ar,rt,br.length]),i.useEffect(function(){Zr.current=!0},[]);var Yi=i.useState(0),bi=Object(K.a)(Yi,2),qn=bi[0],ar=bi[1],Bt=i.useState(!0),dr=Object(K.a)(Bt,2),pr=dr[0],Lr=dr[1];i.useEffect(function(){Xr.current instanceof Element?ar(Object(v.b)(Xr.current).width):ar(Object(v.b)(pn.current).width),Lr(Object(E.a)("position","sticky"))},[]),i.useEffect(function(){ct===ke&>&&(gt.body.current=Xr.current)});var _r=St(["table"],"table"),Hr=i.useMemo(function(){return mt||(Dr?(nt==null?void 0:nt.x)==="max-content"?"auto":"fixed":rr||cn||$t.some(function(vr){var Qt=vr.ellipsis;return Qt})?"fixed":"auto")},[rr,Dr,$t,mt,cn]),Ur,On={colWidths:Dn,columCount:$t.length,stickyOffsets:hr,onHeaderRow:Ht,fixHeader:rr,scroll:nt},en=i.useMemo(function(){return It?null:typeof _t=="function"?_t():_t},[It,_t]),sn=i.createElement(me,{data:Lt,measureColumnWidth:rr||Ar||cn,expandedKeys:Xt,rowExpandable:ue,getRowKey:Jt,onRow:jt,emptyNode:en,childrenColumnName:Fe}),ln=i.createElement(Q,{colWidths:$t.map(function(vr){var Qt=vr.width;return Qt}),columns:$t}),Gn=St(["body"]);if(rr||cn){var Sn;typeof Gn=="function"?(Sn=Gn(Lt,{scrollbarSize:qn,ref:Xr,onScroll:ii}),On.colWidths=$t.map(function(vr,Qt){var Tr=vr.width,Kr=Qt===br.length-1?Tr-qn:Tr;return typeof Kr=="number"&&!Number.isNaN(Kr)?Kr:(Object(o.a)(!1,"When use `components.body` with render props. Each column should have a fixed `width` value."),0)})):Sn=i.createElement("div",{style:Object(G.a)(Object(G.a)({},xr),Br),onScroll:ii,ref:Xr,className:_()("".concat(Je,"-body"))},i.createElement(_r,{style:Object(G.a)(Object(G.a)({},dn),{},{tableLayout:Hr})},ln,sn,!Rr&&gr&&i.createElement(pe.b,{stickyOffsets:hr,flattenColumns:$t},gr)));var Ln=Object(G.a)(Object(G.a)(Object(G.a)({noData:!Lt.length,maxContentScroll:Ar&&nt.x==="max-content"},On),$r),{},{direction:yt,stickyClassName:Zt,onScroll:ii});Ur=i.createElement(i.Fragment,null,wt!==!1&&i.createElement(ze,Object(M.a)({},Ln,{stickyTopOffset:kr,className:"".concat(Je,"-header"),ref:Kn}),function(vr){return i.createElement(i.Fragment,null,i.createElement(D,vr),Rr==="top"&&i.createElement(pe.b,vr,gr))}),Sn,Rr&&Rr!=="top"&&i.createElement(ze,Object(M.a)({},Ln,{stickyBottomOffset:Yt,className:"".concat(Je,"-summary"),ref:rn}),function(vr){return i.createElement(pe.b,vr,gr)}),cn&&i.createElement(Oe,{ref:Jr,offsetScroll:ir,scrollBodyRef:Xr,onScroll:ii,container:Er}))}else Ur=i.createElement("div",{style:Object(G.a)(Object(G.a)({},xr),Br),className:_()("".concat(Je,"-content")),onScroll:ii,ref:Xr},i.createElement(_r,{style:Object(G.a)(Object(G.a)({},dn),{},{tableLayout:Hr})},ln,wt!==!1&&i.createElement(D,Object(M.a)({},On,$r)),sn,gr&&i.createElement(pe.b,{stickyOffsets:hr,flattenColumns:$t},gr)));var mn=Object(e.a)(Ne,{aria:!0,data:!0}),An=i.createElement("div",Object(M.a)({className:_()(Je,qe,($e={},Object(B.a)($e,"".concat(Je,"-rtl"),yt==="rtl"),Object(B.a)($e,"".concat(Je,"-ping-left"),nn),Object(B.a)($e,"".concat(Je,"-ping-right"),cr),Object(B.a)($e,"".concat(Je,"-layout-fixed"),mt==="fixed"),Object(B.a)($e,"".concat(Je,"-fixed-header"),rr),Object(B.a)($e,"".concat(Je,"-fixed-column"),Dr),Object(B.a)($e,"".concat(Je,"-scroll-horizontal"),Ar),Object(B.a)($e,"".concat(Je,"-has-fix-left"),$t[0]&&$t[0].fixed),Object(B.a)($e,"".concat(Je,"-has-fix-right"),$t[$t.length-1]&&$t[$t.length-1].fixed==="right"),$e)),style:at,id:Wt,ref:jr},mn),i.createElement(Le,{pingLeft:nn,pingRight:cr,props:Object(G.a)(Object(G.a)({},Ne),{},{stickyOffsets:hr,mergedExpandedKeys:Xt})},ft&&i.createElement(Z,{className:"".concat(Je,"-title")},ft(Lt)),i.createElement("div",{ref:pn,className:"".concat(Je,"-container")},Ur),ht&&i.createElement(Z,{className:"".concat(Je,"-footer")},ht(Lt))));Ar&&(An=i.createElement(c.a,{onResize:si},An));var $n=i.useMemo(function(){return{prefixCls:Je,getComponent:St,scrollbarSize:qn,direction:yt,fixedInfoList:$t.map(function(vr,Qt){return Object(m.a)(Qt,Qt,$t,hr,yt)}),isSticky:cn}},[Je,St,qn,yt,$t,hr,cn]),Jn=i.useMemo(function(){return Object(G.a)(Object(G.a)({},$r),{},{tableLayout:Hr,rowClassName:ot,expandedRowClassName:Y,expandIcon:oe,expandableType:tt,expandRowByClick:Kt,expandedRowRender:Dt,onTriggerExpand:er,expandIconColumnIndex:V,indentSize:Ee,allColumnsFixedLeft:$r.flattenColumns.every(function(vr){return vr.fixed==="left"})})},[$r,Hr,ot,Y,oe,tt,Kt,Dt,er,V,Ee]),Mn=i.useMemo(function(){return{componentWidth:fr,fixHeader:rr,fixColumn:Dr,horizonScroll:Ar}},[fr,rr,Dr,Ar]),ai=i.useMemo(function(){return{onColumnResize:wr}},[wr]);return i.createElement(Ie.a.Provider,{value:pr},i.createElement(b.a.Provider,{value:$n},i.createElement(A.a.Provider,{value:Jn},i.createElement(I.Provider,{value:Mn},i.createElement(a.Provider,{value:ai},An)))))}Ke.EXPAND_COLUMN=Be.a,Ke.Column=y.a,Ke.ColumnGroup=f.a,Ke.Summary=pe.a,Ke.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var Ze=ee.b=Ke},kSUc:function(W,ee,L){},kYCC:function(W,ee,L){"use strict";var B=L("kQR0"),M=L("YA0V");L.d(ee,"b",function(){return M.a});var G=L("IEJz"),X=L("YLkp"),K=L("+E2i");L.d(ee,"a",function(){return K.a}),ee.c=B.b},lOMy:function(W,ee,L){},lPiR:function(W,ee,L){(function(B,M){W.exports=ee=M(L("Ib8C"))})(this,function(B){return function(M){var G=B,X=G.lib,K=X.WordArray,N=X.Hasher,i=G.algo,T=[],e=[];(function(){function _(c){for(var v=M.sqrt(c),f=2;f<=v;f++)if(!(c%f))return!1;return!0}function r(c){return(c-(c|0))*4294967296|0}for(var n=2,o=0;o<64;)_(n)&&(o<8&&(T[o]=r(M.pow(n,1/2))),e[o]=r(M.pow(n,1/3)),o++),n++})();var E=[],l=i.SHA256=N.extend({_doReset:function(){this._hash=new K.init(T.slice(0))},_doProcessBlock:function(_,r){for(var n=this._hash.words,o=n[0],c=n[1],v=n[2],f=n[3],y=n[4],h=n[5],b=n[6],m=n[7],d=0;d<64;d++){if(d<16)E[d]=_[r+d]|0;else{var x=E[d-15],R=(x<<25|x>>>7)^(x<<14|x>>>18)^x>>>3,O=E[d-2],w=(O<<15|O>>>17)^(O<<13|O>>>19)^O>>>10;E[d]=R+E[d-7]+w+E[d-16]}var D=y&h^~y&b,A=o&c^o&v^c&v,P=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),I=(y<<26|y>>>6)^(y<<21|y>>>11)^(y<<7|y>>>25),u=m+I+D+e[d]+E[d],k=P+A;m=b,b=h,h=y,y=f+u|0,f=v,v=c,c=o,o=u+k|0}n[0]=n[0]+o|0,n[1]=n[1]+c|0,n[2]=n[2]+v|0,n[3]=n[3]+f|0,n[4]=n[4]+y|0,n[5]=n[5]+h|0,n[6]=n[6]+b|0,n[7]=n[7]+m|0},_doFinalize:function(){var _=this._data,r=_.words,n=this._nDataBytes*8,o=_.sigBytes*8;return r[o>>>5]|=128<<24-o%32,r[(o+64>>>9<<4)+14]=M.floor(n/4294967296),r[(o+64>>>9<<4)+15]=n,_.sigBytes=r.length*4,this._process(),this._hash},clone:function(){var _=N.clone.call(this);return _._hash=this._hash.clone(),_}});G.SHA256=N._createHelper(l),G.HmacSHA256=N._createHmacHelper(l)}(Math),B.SHA256})},lZu9:function(W,ee,L){(function(B){B(L("VrN/"),L("1eCo"),L("8EBN"))})(function(B){"use strict";B.defineMode("markdown",function(M,G){var X=B.getMode(M,"text/html"),K=X.name=="null";function N(S){if(B.findModeByName){var p=B.findModeByName(S);p&&(S=p.mime||p.mimes[0])}var U=B.getMode(M,S);return U.name=="null"?null:U}G.highlightFormatting===void 0&&(G.highlightFormatting=!1),G.maxBlockquoteDepth===void 0&&(G.maxBlockquoteDepth=0),G.taskLists===void 0&&(G.taskLists=!1),G.strikethrough===void 0&&(G.strikethrough=!1),G.emoji===void 0&&(G.emoji=!1),G.fencedCodeBlockHighlighting===void 0&&(G.fencedCodeBlockHighlighting=!0),G.fencedCodeBlockDefaultMode===void 0&&(G.fencedCodeBlockDefaultMode="text/plain"),G.xml===void 0&&(G.xml=!0),G.tokenTypeOverrides===void 0&&(G.tokenTypeOverrides={});var i={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 T in i)i.hasOwnProperty(T)&&G.tokenTypeOverrides[T]&&(i[T]=G.tokenTypeOverrides[T]);var e=/^([*\-_])(?:\s*\1){2,}\s*$/,E=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,l=/^\[(x| )\](?=\s)/i,_=G.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,r=/^ {0,3}(?:\={1,}|-{2,})\s*$/,n=/^[^#!\[\]*_\\<>` "'(~:]+/,o=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,c=/^\s*\[[^\]]+?\]:.*$/,v=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,f=" ";function y(S,p,U){return p.f=p.inline=U,U(S,p)}function h(S,p,U){return p.f=p.block=U,U(S,p)}function b(S){return!S||!/\S/.test(S.string)}function m(S){if(S.linkTitle=!1,S.linkHref=!1,S.linkText=!1,S.em=!1,S.strong=!1,S.strikethrough=!1,S.quote=0,S.indentedCode=!1,S.f==x){var p=K;if(!p){var U=B.innerMode(X,S.htmlState);p=U.mode.name=="xml"&&U.state.tagStart===null&&!U.state.context&&U.state.tokenize.isInText}p&&(S.f=D,S.block=d,S.htmlState=null)}return S.trailingSpace=0,S.trailingSpaceNewLine=!1,S.prevLine=S.thisLine,S.thisLine={stream:null},null}function d(S,p){var U=S.column()===p.indentation,z=b(p.prevLine.stream),q=p.indentedCode,$=p.prevLine.hr,re=p.list!==!1,ce=(p.listStack[p.listStack.length-1]||0)+3;p.indentedCode=!1;var ne=p.indentation;if(p.indentationDiff===null&&(p.indentationDiff=p.indentation,re)){for(p.list=null;ne<p.listStack[p.listStack.length-1];)p.listStack.pop(),p.listStack.length?p.indentation=p.listStack[p.listStack.length-1]:p.list=!1;p.list!==!1&&(p.indentationDiff=ne-p.listStack[p.listStack.length-1])}var me=!z&&!$&&!p.prevLine.header&&(!re||!q)&&!p.prevLine.fencedCodeEnd,be=(p.list===!1||$||z)&&p.indentation<=ce&&S.match(e),he=null;if(p.indentationDiff>=4&&(q||p.prevLine.fencedCodeEnd||p.prevLine.header||z))return S.skipToEnd(),p.indentedCode=!0,i.code;if(S.eatSpace())return null;if(U&&p.indentation<=ce&&(he=S.match(_))&&he[1].length<=6)return p.quote=0,p.header=he[1].length,p.thisLine.header=!0,G.highlightFormatting&&(p.formatting="header"),p.f=p.inline,O(p);if(p.indentation<=ce&&S.eat(">"))return p.quote=U?1:p.quote+1,G.highlightFormatting&&(p.formatting="quote"),S.eatSpace(),O(p);if(!be&&!p.setext&&U&&p.indentation<=ce&&(he=S.match(E))){var se=he[1]?"ol":"ul";return p.indentation=ne+S.current().length,p.list=!0,p.quote=0,p.listStack.push(p.indentation),p.em=!1,p.strong=!1,p.code=!1,p.strikethrough=!1,G.taskLists&&S.match(l,!1)&&(p.taskList=!0),p.f=p.inline,G.highlightFormatting&&(p.formatting=["list","list-"+se]),O(p)}else{if(U&&p.indentation<=ce&&(he=S.match(o,!0)))return p.quote=0,p.fencedEndRE=new RegExp(he[1]+"+ *$"),p.localMode=G.fencedCodeBlockHighlighting&&N(he[2]||G.fencedCodeBlockDefaultMode),p.localMode&&(p.localState=B.startState(p.localMode)),p.f=p.block=R,G.highlightFormatting&&(p.formatting="code-block"),p.code=-1,O(p);if(p.setext||(!me||!re)&&!p.quote&&p.list===!1&&!p.code&&!be&&!c.test(S.string)&&(he=S.lookAhead(1))&&(he=he.match(r)))return p.setext?(p.header=p.setext,p.setext=0,S.skipToEnd(),G.highlightFormatting&&(p.formatting="header")):(p.header=he[0].charAt(0)=="="?1:2,p.setext=p.header),p.thisLine.header=!0,p.f=p.inline,O(p);if(be)return S.skipToEnd(),p.hr=!0,p.thisLine.hr=!0,i.hr;if(S.peek()==="[")return y(S,p,k)}return y(S,p,p.inline)}function x(S,p){var U=X.token(S,p.htmlState);if(!K){var z=B.innerMode(X,p.htmlState);(z.mode.name=="xml"&&z.state.tagStart===null&&!z.state.context&&z.state.tokenize.isInText||p.md_inside&&S.current().indexOf(">")>-1)&&(p.f=D,p.block=d,p.htmlState=null)}return U}function R(S,p){var U=p.listStack[p.listStack.length-1]||0,z=p.indentation<U,q=U+3;if(p.fencedEndRE&&p.indentation<=q&&(z||S.match(p.fencedEndRE))){G.highlightFormatting&&(p.formatting="code-block");var $;return z||($=O(p)),p.localMode=p.localState=null,p.block=d,p.f=D,p.fencedEndRE=null,p.code=0,p.thisLine.fencedCodeEnd=!0,z?h(S,p,p.block):$}else return p.localMode?p.localMode.token(S,p.localState):(S.skipToEnd(),i.code)}function O(S){var p=[];if(S.formatting){p.push(i.formatting),typeof S.formatting=="string"&&(S.formatting=[S.formatting]);for(var U=0;U<S.formatting.length;U++)p.push(i.formatting+"-"+S.formatting[U]),S.formatting[U]==="header"&&p.push(i.formatting+"-"+S.formatting[U]+"-"+S.header),S.formatting[U]==="quote"&&(!G.maxBlockquoteDepth||G.maxBlockquoteDepth>=S.quote?p.push(i.formatting+"-"+S.formatting[U]+"-"+S.quote):p.push("error"))}if(S.taskOpen)return p.push("meta"),p.length?p.join(" "):null;if(S.taskClosed)return p.push("property"),p.length?p.join(" "):null;if(S.linkHref?p.push(i.linkHref,"url"):(S.strong&&p.push(i.strong),S.em&&p.push(i.em),S.strikethrough&&p.push(i.strikethrough),S.emoji&&p.push(i.emoji),S.linkText&&p.push(i.linkText),S.code&&p.push(i.code),S.image&&p.push(i.image),S.imageAltText&&p.push(i.imageAltText,"link"),S.imageMarker&&p.push(i.imageMarker)),S.header&&p.push(i.header,i.header+"-"+S.header),S.quote&&(p.push(i.quote),!G.maxBlockquoteDepth||G.maxBlockquoteDepth>=S.quote?p.push(i.quote+"-"+S.quote):p.push(i.quote+"-"+G.maxBlockquoteDepth)),S.list!==!1){var z=(S.listStack.length-1)%3;z?z===1?p.push(i.list2):p.push(i.list3):p.push(i.list1)}return S.trailingSpaceNewLine?p.push("trailing-space-new-line"):S.trailingSpace&&p.push("trailing-space-"+(S.trailingSpace%2?"a":"b")),p.length?p.join(" "):null}function w(S,p){return S.match(n,!0)?O(p):void 0}function D(S,p){var U=p.text(S,p);if(typeof U!="undefined")return U;if(p.list)return p.list=null,O(p);if(p.taskList){var z=S.match(l,!0)[1]===" ";return z?p.taskOpen=!0:p.taskClosed=!0,G.highlightFormatting&&(p.formatting="task"),p.taskList=!1,O(p)}if(p.taskOpen=!1,p.taskClosed=!1,p.header&&S.match(/^#+$/,!0))return G.highlightFormatting&&(p.formatting="header"),O(p);var q=S.next();if(p.linkTitle){p.linkTitle=!1;var $=q;q==="("&&($=")"),$=($+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var re="^\\s*(?:[^"+$+"\\\\]+|\\\\\\\\|\\\\.)"+$;if(S.match(new RegExp(re),!0))return i.linkHref}if(q==="`"){var ce=p.formatting;G.highlightFormatting&&(p.formatting="code"),S.eatWhile("`");var ne=S.current().length;if(p.code==0&&(!p.quote||ne==1))return p.code=ne,O(p);if(ne==p.code){var me=O(p);return p.code=0,me}else return p.formatting=ce,O(p)}else if(p.code)return O(p);if(q==="\\"&&(S.next(),G.highlightFormatting)){var be=O(p),he=i.formatting+"-escape";return be?be+" "+he:he}if(q==="!"&&S.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return p.imageMarker=!0,p.image=!0,G.highlightFormatting&&(p.formatting="image"),O(p);if(q==="["&&p.imageMarker&&S.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return p.imageMarker=!1,p.imageAltText=!0,G.highlightFormatting&&(p.formatting="image"),O(p);if(q==="]"&&p.imageAltText){G.highlightFormatting&&(p.formatting="image");var be=O(p);return p.imageAltText=!1,p.image=!1,p.inline=p.f=P,be}if(q==="["&&!p.image)return p.linkText&&S.match(/^.*?\]/)||(p.linkText=!0,G.highlightFormatting&&(p.formatting="link")),O(p);if(q==="]"&&p.linkText){G.highlightFormatting&&(p.formatting="link");var be=O(p);return p.linkText=!1,p.inline=p.f=S.match(/\(.*?\)| ?\[.*?\]/,!1)?P:D,be}if(q==="<"&&S.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){p.f=p.inline=A,G.highlightFormatting&&(p.formatting="link");var be=O(p);return be?be+=" ":be="",be+i.linkInline}if(q==="<"&&S.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){p.f=p.inline=A,G.highlightFormatting&&(p.formatting="link");var be=O(p);return be?be+=" ":be="",be+i.linkEmail}if(G.xml&&q==="<"&&S.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var se=S.string.indexOf(">",S.pos);if(se!=-1){var _e=S.string.substring(S.start,se);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(_e)&&(p.md_inside=!0)}return S.backUp(1),p.htmlState=B.startState(X),h(S,p,x)}if(G.xml&&q==="<"&&S.match(/^\/\w*?>/))return p.md_inside=!1,"tag";if(q==="*"||q==="_"){for(var De=1,ge=S.pos==1?" ":S.string.charAt(S.pos-2);De<3&&S.eat(q);)De++;var fe=S.peek()||" ",Ce=!/\s/.test(fe)&&(!v.test(fe)||/\s/.test(ge)||v.test(ge)),ae=!/\s/.test(ge)&&(!v.test(ge)||/\s/.test(fe)||v.test(fe)),Q=null,J=null;if(De%2&&(!p.em&&Ce&&(q==="*"||!ae||v.test(ge))?Q=!0:p.em==q&&ae&&(q==="*"||!Ce||v.test(fe))&&(Q=!1)),De>1&&(!p.strong&&Ce&&(q==="*"||!ae||v.test(ge))?J=!0:p.strong==q&&ae&&(q==="*"||!Ce||v.test(fe))&&(J=!1)),J!=null||Q!=null){G.highlightFormatting&&(p.formatting=Q==null?"strong":J==null?"em":"strong em"),Q===!0&&(p.em=q),J===!0&&(p.strong=q);var me=O(p);return Q===!1&&(p.em=!1),J===!1&&(p.strong=!1),me}}else if(q===" "&&(S.eat("*")||S.eat("_"))){if(S.peek()===" ")return O(p);S.backUp(1)}if(G.strikethrough){if(q==="~"&&S.eatWhile(q)){if(p.strikethrough){G.highlightFormatting&&(p.formatting="strikethrough");var me=O(p);return p.strikethrough=!1,me}else if(S.match(/^[^\s]/,!1))return p.strikethrough=!0,G.highlightFormatting&&(p.formatting="strikethrough"),O(p)}else if(q===" "&&S.match(/^~~/,!0)){if(S.peek()===" ")return O(p);S.backUp(2)}}if(G.emoji&&q===":"&&S.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){p.emoji=!0,G.highlightFormatting&&(p.formatting="emoji");var Z=O(p);return p.emoji=!1,Z}return q===" "&&(S.match(/^ +$/,!1)?p.trailingSpace++:p.trailingSpace&&(p.trailingSpaceNewLine=!0)),O(p)}function A(S,p){var U=S.next();if(U===">"){p.f=p.inline=D,G.highlightFormatting&&(p.formatting="link");var z=O(p);return z?z+=" ":z="",z+i.linkInline}return S.match(/^[^>]+/,!0),i.linkInline}function P(S,p){if(S.eatSpace())return null;var U=S.next();return U==="("||U==="["?(p.f=p.inline=u(U==="("?")":"]"),G.highlightFormatting&&(p.formatting="link-string"),p.linkHref=!0,O(p)):"error"}var I={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function u(S){return function(p,U){var z=p.next();if(z===S){U.f=U.inline=D,G.highlightFormatting&&(U.formatting="link-string");var q=O(U);return U.linkHref=!1,q}return p.match(I[S]),U.linkHref=!0,O(U)}}function k(S,p){return S.match(/^([^\]\\]|\\.)*\]:/,!1)?(p.f=g,S.next(),G.highlightFormatting&&(p.formatting="link"),p.linkText=!0,O(p)):y(S,p,D)}function g(S,p){if(S.match(/^\]:/,!0)){p.f=p.inline=a,G.highlightFormatting&&(p.formatting="link");var U=O(p);return p.linkText=!1,U}return S.match(/^([^\]\\]|\\.)+/,!0),i.linkText}function a(S,p){return S.eatSpace()?null:(S.match(/^[^\s]+/,!0),S.peek()===void 0?p.linkTitle=!0:S.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),p.f=p.inline=D,i.linkHref+" url")}var C={startState:function(){return{f:d,prevLine:{stream:null},thisLine:{stream:null},block:d,htmlState:null,indentation:0,inline:D,text:w,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(S){return{f:S.f,prevLine:S.prevLine,thisLine:S.thisLine,block:S.block,htmlState:S.htmlState&&B.copyState(X,S.htmlState),indentation:S.indentation,localMode:S.localMode,localState:S.localMode?B.copyState(S.localMode,S.localState):null,inline:S.inline,text:S.text,formatting:!1,linkText:S.linkText,linkTitle:S.linkTitle,linkHref:S.linkHref,code:S.code,em:S.em,strong:S.strong,strikethrough:S.strikethrough,emoji:S.emoji,header:S.header,setext:S.setext,hr:S.hr,taskList:S.taskList,list:S.list,listStack:S.listStack.slice(0),quote:S.quote,indentedCode:S.indentedCode,trailingSpace:S.trailingSpace,trailingSpaceNewLine:S.trailingSpaceNewLine,md_inside:S.md_inside,fencedEndRE:S.fencedEndRE}},token:function(S,p){if(p.formatting=!1,S!=p.thisLine.stream){if(p.header=0,p.hr=!1,S.match(/^\s*$/,!0))return m(p),null;if(p.prevLine=p.thisLine,p.thisLine={stream:S},p.taskList=!1,p.trailingSpace=0,p.trailingSpaceNewLine=!1,!p.localState&&(p.f=p.block,p.f!=x)){var U=S.match(/^\s*/,!0)[0].replace(/\t/g,f).length;if(p.indentation=U,p.indentationDiff=null,U>0)return null}}return p.f(S,p)},innerMode:function(S){return S.block==x?{state:S.htmlState,mode:X}:S.localState?{state:S.localState,mode:S.localMode}:{state:S,mode:C}},indent:function(S,p,U){return S.block==x&&X.indent?X.indent(S.htmlState,p,U):S.localState&&S.localMode.indent?S.localMode.indent(S.localState,p,U):B.Pass},blankLine:m,getType:O,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return C},"xml"),B.defineMIME("text/markdown","markdown"),B.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(W){if(!0)module.exports=W();else var ee})(function(){var define,module,exports;return function(){function W(ee,L,B){function M(K,N){if(!L[K]){if(!ee[K]){var i=typeof require=="function"&&require;if(!N&&i)return require(K,!0);if(G)return G(K,!0);var T=new Error("Cannot find module '"+K+"'");throw T.code="MODULE_NOT_FOUND",T}var e=L[K]={exports:{}};ee[K][0].call(e.exports,function(E){var l=ee[K][1][E];return M(l||E)},e,e.exports,W,ee,L,B)}return L[K].exports}for(var G=typeof require=="function"&&require,X=0;X<B.length;X++)M(B[X]);return M}return W}()({1:[function(W,ee,L){"use strict";var B=W("./browser/client");B.Buffer=W("buffer").Buffer,B.urllib=W("../shims/xhr"),B.version=W("./browser/version").version,ee.exports=B},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(W,ee,L){(function(B,M){"use strict";var G=W("babel-runtime/core-js/promise"),X=e(G),K=W("babel-runtime/regenerator"),N=e(K),i=W("babel-runtime/core-js/object/assign"),T=e(i);function e(k){return k&&k.__esModule?k:{default:k}}var E=W("debug")("ali-oss"),l=W("copy-to"),_=W("xml2js"),r=W("agentkeepalive"),n=W("merge-descriptors"),o=W("url"),c=W("is-type-of"),v=W("platform"),f=W("utility"),y=W("urllib"),h=W("./version"),b=W("bowser"),m=W("../common/signUtils"),d=W("../common/utils/isIP"),x=d.isIP,R=W("../common/client/initOptions"),O=W("../common/utils/createRequest"),w=O.createRequest,D=new r;function A(){var k=v.name,g=v.version;k&&k.toLowerCase&&k.toLowerCase()==="ie"&&g.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function P(){return location&&location.protocol==="https:"}function I(k,g){if(A(),!(this instanceof I))return new I(k,g);k&&k.inited?this.options=k:this.options=I.initOptions(k),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=y,this.agent=this.options.agent||D),this.ctx=g,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}ee.exports=I,I.initOptions=function(g){g.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var a=(0,T.default)({secure:P(),useFetch:!1},g);return R(a)};var u=I.prototype;u.debug=E,n(u,W("./object")),n(u,W("../common/bucket/getBucketWebsite")),n(u,W("../common/bucket/putBucketWebsite")),n(u,W("../common/bucket/deleteBucketWebsite")),n(u,W("../common/bucket/getBucketLifecycle")),n(u,W("../common/bucket/putBucketLifecycle")),n(u,W("../common/bucket/deleteBucketLifecycle")),n(u,W("../common/bucket/putBucketVersioning")),n(u,W("../common/bucket/getBucketVersioning")),n(u,W("./managed-upload")),n(u,W("../common/multipart")),n(u,W("../common/parallel")),u.signature=function(g){return this.debug("authorization stringToSign: %s",g,"info"),m.computeSignature(this.options.accessKeySecret,g)},u.authorization=function(g,a,C,S){var p=m.buildCanonicalString(g.toUpperCase(),a,{headers:S,parameters:C});return m.authorization(this.options.accessKeyId,this.options.accessKeySecret,p)},u.request=function(g){var a,C,S,p,U,z;return N.default.async(function($){for(;;)switch($.prev=$.next){case 0:return a=w.call(this,g),this.options.useFetch||(a.params.mode="disable-fetch"),C=void 0,S=void 0,p=!!g.stream,$.prev=5,$.next=8,N.default.awrap(this.urllib.request(a.url,a.params));case 8:C=$.sent,this.debug("response %s %s, got %s, headers: %j",g.method,a.url,C.status,C.headers,"info"),$.next=15;break;case 12:$.prev=12,$.t0=$.catch(5),S=$.t0;case 15:if(U=void 0,!(C&&g.successStatuses&&g.successStatuses.indexOf(C.status)===-1)){$.next=28;break}return $.next=19,N.default.awrap(this.requestError(C));case 19:if(U=$.sent,!(U.code==="RequestTimeTooSkewed"&&!p)){$.next=25;break}return this.options.amendTimeSkewed=+new Date(U.serverTime)-new Date,$.next=24,N.default.awrap(this.request(g));case 24:return $.abrupt("return",$.sent);case 25:U.params=g,$.next=32;break;case 28:if(!S){$.next=32;break}return $.next=31,N.default.awrap(this.requestError(S));case 31:U=$.sent;case 32:if(!U){$.next=34;break}throw U;case 34:if(!g.xmlResponse){$.next=39;break}return $.next=37,N.default.awrap(this.parseXML(C.data));case 37:z=$.sent,C.data=z;case 39:return $.abrupt("return",C);case 40:case"end":return $.stop()}},null,this,[[5,12]])},u._getResource=function(g){var a="/";return g.bucket&&(a+=g.bucket+"/"),g.object&&(a+=g.object),a},u._isIP=x,u._escape=function(g){return f.encodeURIComponent(g).replace(/%2F/g,"/")},u._getReqUrl=function(g){var a={};l(this.options.endpoint).to(a);var C=this._isIP(a.hostname),S=this.options.cname;g.bucket&&!S&&!C&&(a.host=g.bucket+"."+a.host);var p="/";g.bucket&&C&&(p+=g.bucket+"/"),g.object&&(p+=this._escape(g.object).replace(/\+/g,"%2B")),a.pathname=p;var U={};if(g.query&&n(U,g.query),g.subres){var z={};c.string(g.subres)?z[g.subres]="":c.array(g.subres)?g.subres.forEach(function(q){z[q]=""}):z=g.subres,n(U,z)}return a.query=U,o.format(a)},u._getUserAgent=function(){var g=M&&M.browser?"js":"nodejs",a="aliyun-sdk-"+g+"/"+h.version,C=v.description;return!C&&M&&(C="Node.js "+M.version.slice(1)+" on "+M.platform+" "+M.arch),this._checkUserAgent(a+" "+C)},u._checkUserAgent=function(g){var a=g.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return a},u.checkBrowserAndVersion=function(g,a){return b.name===g&&b.version.split(".")[0]===a},u.parseXML=function(g){return new X.default(function(a,C){B.isBuffer(g)&&(g=g.toString()),_.parseString(g,{explicitRoot:!1,explicitArray:!1},function(S,p){S?C(S):a(p)})})},u.requestError=function(g){var a,C,S,p;return N.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:if(a=null,!(!g.data||!g.data.length)){z.next=5;break}g.status===-1||g.status===-2?(a=new Error(g.message),a.name=g.name,a.status=g.status,a.code=g.name):(g.status===404?(a=new Error("Object not exists"),a.name="NoSuchKeyError",a.status=404,a.code="NoSuchKey"):g.status===412?(a=new Error("Pre condition failed"),a.name="PreconditionFailedError",a.status=412,a.code="PreconditionFailed"):(a=new Error("Unknow error, status: "+g.status),a.name="UnknowError",a.status=g.status),a.requestId=g.headers["x-oss-request-id"],a.host=""),z.next=33;break;case 5:return C=String(g.data),this.debug("request response error data: %s",C,"error"),S=void 0,z.prev=8,z.next=11,N.default.awrap(this.parseXML(C));case 11:if(z.t0=z.sent,z.t0){z.next=14;break}z.t0={};case 14:S=z.t0,z.next=24;break;case 17:return z.prev=17,z.t1=z.catch(8),this.debug(C,"error"),z.t1.message+=`
|
|
|
raw xml: `+C,z.t1.status=g.status,z.t1.requestId=g.headers["x-oss-request-id"],z.abrupt("return",z.t1);case 24:p=S.Message||"unknow request error, status: "+g.status,S.Condition&&(p+=" (condition: "+S.Condition+")"),a=new Error(p),a.name=S.Code?S.Code+"Error":"UnknowError",a.status=g.status,a.code=S.Code,a.requestId=S.RequestId,a.hostId=S.HostId,a.serverTime=S.ServerTime;case 33:return this.debug("generate error %j",a,"error"),z.abrupt("return",a);case 35:case"end":return z.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:W("../../node_modules/is-buffer/index.js")},W("_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(W,ee,L){(function(B){"use strict";var M=W("babel-runtime/core-js/array/from"),G=T(M),X=W("babel-runtime/core-js/promise"),K=T(X),N=W("babel-runtime/regenerator"),i=T(N);function T(m){return m&&m.__esModule?m:{default:m}}var e=W("is-type-of"),E=W("util"),l=W("path"),_=W("mime"),r=W("copy-to"),n=W("../common/utils/isBlob"),o=n.isBlob,c=W("../common/utils/isFile"),v=c.isFile,f=L;f.multipartUpload=function(d,x,R){var O,w,D,A,P,I,u,k,g;return i.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(this.resetCancelFlag(),R=R||{},!(R.checkpoint&&R.checkpoint.uploadId)){C.next=6;break}return C.next=5,i.default.awrap(this._resumeMultipart(R.checkpoint,R));case 5:return C.abrupt("return",C.sent);case 6:return O=100*1024,R.mime||(v(x)?R.mime=_.getType(l.extname(x.name)):o(x)?R.mime=x.type:R.mime=_.getType(l.extname(x))),R.headers=R.headers||{},this._convertMetaToHeaders(R.meta,R.headers),C.next=12,i.default.awrap(this._getFileSize(x));case 12:if(w=C.sent,!(w<O)){C.next=25;break}return D=this._createStream(x,0,w),R.contentLength=w,C.next=18,i.default.awrap(this.putStream(d,D,R));case 18:if(A=C.sent,!(R&&R.progress)){C.next=22;break}return C.next=22,i.default.awrap(R.progress(1));case 22:return P={res:A.res,bucket:this.options.bucket,name:d,etag:A.res.headers.etag},(R.headers&&R.headers["x-oss-callback"]||R.callback)&&(P.data=A.data),C.abrupt("return",P);case 25:if(!(R.partSize&&!(parseInt(R.partSize,10)===R.partSize))){C.next=27;break}throw new Error("partSize must be int number");case 27:if(!(R.partSize&&R.partSize<O)){C.next=29;break}throw new Error("partSize must not be smaller than "+O);case 29:return C.next=31,i.default.awrap(this.initMultipartUpload(d,R));case 31:if(I=C.sent,u=I.uploadId,k=this._getPartSize(w,R.partSize),g={file:x,name:d,fileSize:w,partSize:k,uploadId:u,doneParts:[]},!(R&&R.progress)){C.next=38;break}return C.next=38,i.default.awrap(R.progress(0,g,I.res));case 38:return C.next=40,i.default.awrap(this._resumeMultipart(g,R));case 40:return C.abrupt("return",C.sent);case 41:case"end":return C.stop()}},null,this)},f._resumeMultipart=function(d,x){var R,O,w,D,A,P,I,u,k,g,a,C,S,p,U,z,q,$;return i.default.async(function(ce){for(;;)switch(ce.prev=ce.next){case 0:if(R=this,!this.isCancel()){ce.next=3;break}throw this._makeCancelEvent();case 3:return O=d.file,w=d.fileSize,D=d.partSize,A=d.uploadId,P=d.doneParts,I=d.name,u=[],P.length>0&&r(P).to(u),k=this._divideParts(w,D),g=k.length,a=!1,C=function(me,be){var he=this;return new K.default(function(_e,De){var ge,fe,Ce,ae;return i.default.async(function(J){for(;;)switch(J.prev=J.next){case 0:if(J.prev=0,me.isCancel()){J.next=18;break}return ge=k[be-1],fe={stream:me._createStream(O,ge.start,ge.end),size:ge.end-ge.start},J.next=6,i.default.awrap(me._uploadPart(I,A,be,fe));case 6:if(Ce=J.sent,!(!me.isCancel()&&!a)){J.next=15;break}if(d.doneParts.push({number:be,etag:Ce.res.headers.etag}),!x.progress){J.next=12;break}return J.next=12,i.default.awrap(x.progress(P.length/g,d,Ce.res));case 12:_e({number:be,etag:Ce.res.headers.etag}),J.next=16;break;case 15:_e();case 16:J.next=19;break;case 18:_e();case 19:J.next=30;break;case 21:J.prev=21,J.t0=J.catch(0),ae=new Error,ae.name=J.t0.name,ae.message=J.t0.message,ae.stack=J.t0.stack,ae.partNum=be,r(J.t0).to(ae),De(ae);case 30:case"end":return J.stop()}},null,he,[[0,21]])})},S=(0,G.default)(new Array(g),function(ne,me){return me+1}),p=u.map(function(ne){return ne.number}),U=S.filter(function(ne){return p.indexOf(ne)<0}),z=5,q=x.parallel||z,ce.next=17,i.default.awrap(this._parallel(U,q,function(ne){return new K.default(function(me,be){C(R,ne).then(function(he){he&&u.push(he),me()}).catch(function(he){be(he)})})}));case 17:if($=ce.sent,a=!0,!this.isCancel()){ce.next=22;break}throw C=null,this._makeCancelEvent();case 22:if(!($&&$.length>0)){ce.next=25;break}throw $[0].message="Failed to upload some parts with error: "+$[0].toString()+" part_num: "+$[0].partNum,$[0];case 25:return ce.next=27,i.default.awrap(this.completeMultipartUpload(I,A,u,x));case 27:return ce.abrupt("return",ce.sent);case 28:case"end":return ce.stop()}},null,this)},f._getFileSize=function(d){return i.default.async(function(R){for(;;)switch(R.prev=R.next){case 0:if(!e.buffer(d)){R.next=4;break}return R.abrupt("return",d.length);case 4:if(!(o(d)||v(d))){R.next=6;break}return R.abrupt("return",d.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return R.stop()}},null,this)};var y=W("stream"),h=y.Readable;function b(m,d){if(!(this instanceof b))return new b(m,d);h.call(this,d),this.file=m,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}E.inherits(b,h),b.prototype.readFileAndPush=function(d){if(this.fileBuffer)for(var x=!0;x&&this.fileBuffer&&this.start<this.fileBuffer.length;){var R=this.start,O=R+d;O=O>this.fileBuffer.length?this.fileBuffer.length:O,this.start=O,x=this.push(this.fileBuffer.slice(R,O))}},b.prototype._read=function(d){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var x=16*1024;d=d||x;var R=this;this.reader.onload=function(w){R.fileBuffer=B.from(new Uint8Array(w.target.result)),R.file=null,R.readFileAndPush(d)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(d)},f._createStream=function(d,x,R){if(o(d)||v(d))return new b(d.slice(x,R));throw new Error("_createStream requires File/Blob.")},f._getPartSize=function(d,x){var R=10*1e3,O=1024*1024;return x?Math.max(Math.ceil(d/R),x):O},f._divideParts=function(d,x){for(var R=Math.ceil(d/x),O=[],w=0;w<R;w++){var D=x*w,A=Math.min(D+x,d);O.push({start:D,end:A})}return O}}).call(this,W("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(W,ee,L){"use strict";var B=W("babel-runtime/core-js/promise"),M=e(B),G=W("babel-runtime/core-js/object/keys"),X=e(G),K=W("babel-runtime/core-js/object/assign"),N=e(K),i=W("babel-runtime/regenerator"),T=e(i);function e(R){return R&&R.__esModule?R:{default:R}}var E=W("utility"),l=W("fs"),_=W("is-type-of"),r=W("url"),n=W("copy-to"),o=W("path"),c=W("mime"),v=W("../common/callback"),f=W("../common/signUtils"),y=W("merge-descriptors"),h=W("../common/utils/isBlob"),b=h.isBlob,m=W("../common/utils/isFile"),d=m.isFile,x=L;x.append=function(O,w,D){var A;return T.default.async(function(I){for(;;)switch(I.prev=I.next){case 0:return D=D||{},D.position===void 0&&(D.position="0"),D.subres={append:"",position:D.position},D.method="POST",I.next=6,T.default.awrap(this.put(O,w,D));case 6:return A=I.sent,A.nextAppendPosition=A.res.headers["x-oss-next-append-position"],I.abrupt("return",A);case 9:case"end":return I.stop()}},null,this)},x.put=function(O,w,D){var A,P,I,u,k,g,a;return T.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:if(A=void 0,D=D||{},O=this._objectName(O),!_.buffer(w)){S.next=7;break}A=w,S.next=33;break;case 7:if(!(b(w)||d(w))){S.next=32;break}return D.mime||(d(w)?D.mime=c.getType(o.extname(w.name)):D.mime=w.type),P=this._createStream(w,0,w.size),S.next=12,T.default.awrap(this._getFileSize(w));case 12:return D.contentLength=S.sent,S.prev=13,S.next=16,T.default.awrap(this.putStream(O,P,D));case 16:return I=S.sent,S.abrupt("return",I);case 20:if(S.prev=20,S.t0=S.catch(13),!(S.t0.code==="RequestTimeTooSkewed")){S.next=29;break}return this.options.amendTimeSkewed=+new Date(S.t0.serverTime)-new Date,S.next=26,T.default.awrap(this.put(O,w,D));case 26:return S.abrupt("return",S.sent);case 29:throw S.t0;case 30:S.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return D.headers=D.headers||{},this._convertMetaToHeaders(D.meta,D.headers),u=D.method||"PUT",k=this._objectRequestParams(u,O,D),v.encodeCallback(k,D),k.mime=D.mime,k.content=A,k.successStatuses=[200],S.next=43,T.default.awrap(this.request(k));case 43:return g=S.sent,a={name:O,url:this._objectUrl(O),res:g.res},k.headers&&k.headers["x-oss-callback"]&&(a.data=JSON.parse(g.data.toString())),S.abrupt("return",a);case 47:case"end":return S.stop()}},null,this,[[13,20]])},x.putStream=function(O,w,D){var A,P,I,u;return T.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return D=D||{},D.headers=D.headers||{},O=this._objectName(O),D.contentLength?D.headers["Content-Length"]=D.contentLength:D.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(D.meta,D.headers),A=D.method||"PUT",P=this._objectRequestParams(A,O,D),v.encodeCallback(P,D),P.mime=D.mime,P.stream=w,P.successStatuses=[200],g.next=13,T.default.awrap(this.request(P));case 13:return I=g.sent,u={name:O,url:this._objectUrl(O),res:I.res},P.headers&&P.headers["x-oss-callback"]&&(u.data=JSON.parse(I.data.toString())),g.abrupt("return",u);case 17:case"end":return g.stop()}},null,this)},y(x,W("../common/object/copyObject")),y(x,W("../common/object/getObjectTagging")),y(x,W("../common/object/putObjectTagging")),y(x,W("../common/object/deleteObjectTagging")),y(x,W("../common/image")),y(x,W("../common/object/getBucketVersions")),y(x,W("../common/object/getACL")),y(x,W("../common/object/putACL")),y(x,W("../common/object/head")),y(x,W("../common/object/delete")),y(x,W("../common/object/get")),y(x,W("../common/object/putSymlink")),y(x,W("../common/object/getSymlink")),y(x,W("../common/object/deleteMulti")),y(x,W("../common/object/getObjectMeta")),x.putMeta=function(O,w,D){var A;return T.default.async(function(I){for(;;)switch(I.prev=I.next){case 0:return I.next=2,T.default.awrap(this.copy(O,O,{meta:w||{},timeout:D&&D.timeout,ctx:D&&D.ctx}));case 2:return A=I.sent,I.abrupt("return",A);case 4:case"end":return I.stop()}},null,this)},x.list=function(O,w){var D,A,P,I,u;return T.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return D=this._objectRequestParams("GET","",w),D.query=O,D.xmlResponse=!0,D.successStatuses=[200],g.next=6,T.default.awrap(this.request(D));case 6:return A=g.sent,P=A.data.Contents,I=this,P&&(Array.isArray(P)||(P=[P]),P=P.map(function(a){return{name:a.Key,url:I._objectUrl(a.Key),lastModified:a.LastModified,etag:a.ETag,type:a.Type,size:Number(a.Size),storageClass:a.StorageClass,owner:{id:a.Owner.ID,displayName:a.Owner.DisplayName}}})),u=A.data.CommonPrefixes||null,u&&(Array.isArray(u)||(u=[u]),u=u.map(function(a){return a.Prefix})),g.abrupt("return",{res:A.res,objects:P,prefixes:u,nextMarker:A.data.NextMarker||null,isTruncated:A.data.IsTruncated==="true"});case 13:case"end":return g.stop()}},null,this)},x.restore=function(O,w){var D,A;return T.default.async(function(I){for(;;)switch(I.prev=I.next){case 0:return w=w||{},w.subres=(0,N.default)({restore:""},w.subres),w.versionId&&(w.subres.versionId=w.versionId),D=this._objectRequestParams("POST",O,w),D.successStatuses=[202],I.next=7,T.default.awrap(this.request(D));case 7:return A=I.sent,I.abrupt("return",{res:A.res});case 9:case"end":return I.stop()}},null,this)},x.signatureUrl=function(O,w){w=w||{},O=this._objectName(O),w.method=w.method||"GET";var D=E.timestamp()+(w.expires||1800),A={bucket:this.options.bucket,object:O},P=this._getResource(A);this.options.stsToken&&(w["security-token"]=this.options.stsToken);var I=f._signatureForURL(this.options.accessKeySecret,w,P,D),u=r.parse(this._getReqUrl(A));return u.query={OSSAccessKeyId:this.options.accessKeyId,Expires:D,Signature:I.Signature},n(I.subResource).to(u.query),u.format()},x.getObjectUrl=function(O,w){return w?w[w.length-1]!=="/"&&(w+="/"):w=this.options.endpoint.format(),w+this._escape(this._objectName(O))},x._objectUrl=function(O){return this._getReqUrl({bucket:this.options.bucket,object:O})},x.generateObjectUrl=function(R,O){if(O)O[O.length-1]!=="/"&&(O+="/");else{O=this.options.endpoint.format();var w=r.parse(O),D=this.options.bucket;w.hostname=D+"."+w.hostname,w.host=D+"."+w.host,O=w.format()}return O+this._escape(this._objectName(R))},x._objectRequestParams=function(O,w,D){if(!this.options.bucket)throw new Error("Please create a bucket first");D=D||{},w=this._objectName(w);var A={object:w,bucket:this.options.bucket,method:O,subres:D&&D.subres,timeout:D&&D.timeout,ctx:D&&D.ctx};return D.headers&&(A.headers={},n(D.headers).to(A.headers)),A},x._objectName=function(O){return O.replace(/^\/+/,"")},x._convertMetaToHeaders=function(O,w){if(!O)return;(0,X.default)(O).forEach(function(D){w["x-oss-meta-"+D]=O[D]})},x._deleteFileSafe=function(O){var w=this;return new M.default(function(D){l.exists(O,function(A){A?l.unlink(O,function(P){P&&w.debug("unlink %j error: %s",O,P,"error"),D()}):D()})})}},{"../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(W,ee,L){"use strict";L.version="6.10.0"},{}],6:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=G(B);function G(i){return i&&i.__esModule?i:{default:i}}var X=W("../utils/checkBucketName"),K=X.checkBucketName,N=L;N.deleteBucketLifecycle=function(T,e){var E,l;return M.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return K(T),E=this._bucketRequestParams("DELETE",T,"lifecycle",e),E.successStatuses=[204],r.next=5,M.default.awrap(this.request(E));case 5:return l=r.sent,r.abrupt("return",{res:l.res});case 7:case"end":return r.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=G(B);function G(i){return i&&i.__esModule?i:{default:i}}var X=W("../utils/checkBucketName"),K=X.checkBucketName,N=L;N.deleteBucketWebsite=function(T,e){var E,l;return M.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return K(T),E=this._bucketRequestParams("DELETE",T,"website",e),E.successStatuses=[204],r.next=5,M.default.awrap(this.request(E));case 5:return l=r.sent,r.abrupt("return",{res:l.res});case 7:case"end":return r.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=G(B);function G(l){return l&&l.__esModule?l:{default:l}}var X=W("../utils/checkBucketName"),K=X.checkBucketName,N=W("../utils/isArray"),i=N.isArray,T=W("../utils/formatObjKey"),e=T.formatObjKey,E=L;E.getBucketLifecycle=function(_,r){var n,o,c;return M.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return K(_),n=this._bucketRequestParams("GET",_,"lifecycle",r),n.successStatuses=[200],n.xmlResponse=!0,f.next=6,M.default.awrap(this.request(n));case 6:return o=f.sent,c=o.data.Rule||null,c&&(i(c)||(c=[c]),c=c.map(function(y){return y.ID&&(y.id=y.ID,delete y.ID),y.Tag&&!i(y.Tag)&&(y.Tag=[y.Tag]),e(y,"firstLowerCase")})),f.abrupt("return",{rules:c,res:o.res});case 10:case"end":return f.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=G(B);function G(i){return i&&i.__esModule?i:{default:i}}var X=W("../utils/checkBucketName"),K=X.checkBucketName,N=L;N.getBucketVersioning=function(T,e){var E,l,_;return M.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return K(T),E=this._bucketRequestParams("GET",T,"versioning",e),E.xmlResponse=!0,E.successStatuses=[200],n.next=6,M.default.awrap(this.request(E));case 6:return l=n.sent,_=l.data.Status,n.abrupt("return",{status:l.status,versionStatus:_,res:l.res});case 9:case"end":return n.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=G(B);function G(e){return e&&e.__esModule?e:{default:e}}var X=W("../utils/checkBucketName"),K=X.checkBucketName,N=W("../utils/isObject"),i=N.isObject,T=L;T.getBucketWebsite=function(E,l){var _,r,n;return M.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return K(E),_=this._bucketRequestParams("GET",E,"website",l),_.successStatuses=[200],_.xmlResponse=!0,c.next=6,M.default.awrap(this.request(_));case 6:return r=c.sent,n=[],r.data.RoutingRules&&r.data.RoutingRules.RoutingRule&&(i(r.data.RoutingRules.RoutingRule)?n=[r.data.RoutingRules.RoutingRule]:n=r.data.RoutingRules.RoutingRule),c.abrupt("return",{index:r.data.IndexDocument&&r.data.IndexDocument.Suffix||"",supportSubDir:r.data.IndexDocument&&r.data.IndexDocument.SupportSubDir||"false",type:r.data.IndexDocument&&r.data.IndexDocument.Type,routingRules:n,error:r.data.ErrorDocument&&r.data.ErrorDocument.Key||null,res:r.res});case 10:case"end":return c.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=G(B);function G(d){return d&&d.__esModule?d:{default:d}}var X=W("../utils/checkBucketName"),K=X.checkBucketName,N=W("../utils/isArray"),i=N.isArray,T=W("../utils/deepCopy"),e=T.deepCopy,E=W("../utils/isObject"),l=E.isObject,_=W("../utils/obj2xml"),r=_.obj2xml,n=W("../utils/checkObjectTag"),o=n.checkObjectTag,c=W("../utils/getStrBytesCount"),v=c.getStrBytesCount,f=L;f.putBucketLifecycle=function(x,R,O){var w,D,A,P,I;return M.default.async(function(k){for(;;)switch(k.prev=k.next){case 0:if(K(x),i(R)){k.next=3;break}throw new Error("rules must be Array");case 3:return w=this._bucketRequestParams("PUT",x,"lifecycle",O),D=[],A={LifecycleConfiguration:{Rule:D}},R.forEach(function(g){y(g),m(g),g.id&&(g.ID=g.id,delete g.id),D.push(g)}),P=r(A,{headers:!0,firstUpperCase:!0}),w.content=P,w.mime="xml",w.successStatuses=[200],k.next=13,M.default.awrap(this.request(w));case 13:return I=k.sent,k.abrupt("return",{res:I.res});case 15:case"end":return k.stop()}},null,this)};function y(d){d.days&&(d.expiration={days:d.days}),d.date&&(d.expiration={createdBeforeDate:d.date})}function h(d,x){var R=d.days,O=d.createdBeforeDate;if(!R&&!O)throw new Error(x+" must includes days or createdBeforeDate");if(R&&!/^[1-9][0-9]*$/.test(R))throw new Error("days must be a positive integer");if(O&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(O))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function b(d){if(!i(d)&&!l(d))throw new Error("tag must be Object or Array");d=l(d)?[d]:d;var x={},R=e(d);R.forEach(function(O){x[O.key]=O.value}),o(x)}function m(d){if(d.id&&v(d.id)>255)throw new Error("ID is composed of 255 bytes at most");if(d.prefix===""||d.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(d.status))throw new Error("Status must be Enabled or Disabled");if(d.transition){if(!["IA","Archive"].includes(d.transition.storageClass))throw new Error("StorageClass must be IA or Archive");h(d.transition,"Transition")}if(d.expiration){if(!d.expiration.expiredObjectDeleteMarker)h(d.expiration,"Expiration");else if(d.expiration.days||d.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(d.abortMultipartUpload&&h(d.abortMultipartUpload,"AbortMultipartUpload"),!d.expiration&&!d.abortMultipartUpload&&!d.transition&&!d.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(d.tag){if(d.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");b(d.tag)}}},{"../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(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=G(B);function G(e){return e&&e.__esModule?e:{default:e}}var X=W("../utils/checkBucketName"),K=X.checkBucketName,N=W("../utils/obj2xml"),i=N.obj2xml,T=L;T.putBucketVersioning=function(E,l){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,n,o;return M.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:if(K(E),["Enabled","Suspended"].includes(l)){v.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return r=this._bucketRequestParams("PUT",E,"versioning",_),n={VersioningConfiguration:{Status:l}},r.mime="xml",r.content=i(n,{headers:!0}),v.next=9,M.default.awrap(this.request(r));case 9:return o=v.sent,v.abrupt("return",{res:o.res,status:o.status});case 11:case"end":return v.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=G(B);function G(l){return l&&l.__esModule?l:{default:l}}var X=W("../utils/checkBucketName"),K=X.checkBucketName,N=W("../utils/obj2xml"),i=N.obj2xml,T=W("../utils/isArray"),e=T.isArray,E=L;E.putBucketWebsite=function(_){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments[2],o,c,v,f,y;return M.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:if(K(_),o=this._bucketRequestParams("PUT",_,"website",n),c={Suffix:r.index||"index.html"},v={IndexDocument:c},f={WebsiteConfiguration:v},r.supportSubDir&&(c.SupportSubDir=r.supportSubDir),r.type&&(c.Type=r.type),r.error&&(v.ErrorDocument={Key:r.error}),!(r.routingRules!==void 0)){b.next=12;break}if(e(r.routingRules)){b.next=11;break}throw new Error("RoutingRules must be Array");case 11:v.RoutingRules={RoutingRule:r.routingRules};case 12:return f=i(f),o.content=f,o.mime="xml",o.successStatuses=[200],b.next=18,M.default.awrap(this.request(o));case 18:return y=b.sent,b.abrupt("return",{res:y.res});case 20:case"end":return b.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(W,ee,L){(function(B){"use strict";var M=W("babel-runtime/core-js/object/keys"),G=N(M),X=W("babel-runtime/core-js/json/stringify"),K=N(X);function N(i){return i&&i.__esModule?i:{default:i}}L.encodeCallback=function(T,e){if(T.headers=T.headers||{},!Object.prototype.hasOwnProperty.call(T.headers,"x-oss-callback")&&e.callback){var E={callbackUrl:encodeURI(e.callback.url),callbackBody:e.callback.body};e.callback.host&&(E.callbackHost=e.callback.host),e.callback.contentType&&(E.callbackBodyType=e.callback.contentType);var l=B.from((0,K.default)(E)).toString("base64");if(T.headers["x-oss-callback"]=l,e.callback.customValue){var _={};(0,G.default)(e.callback.customValue).forEach(function(r){_["x:"+r]=e.callback.customValue[r]}),T.headers["x-oss-callback-var"]=B.from((0,K.default)(_)).toString("base64")}}}}).call(this,W("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/assign"),M=G(B);function G(E){return E&&E.__esModule?E:{default:E}}var X=W("humanize-ms"),K=W("url"),N=W("../utils/checkBucketName"),i=N.checkBucketName;function T(E,l){var _=K.parse(E);if(_.protocol||(_=K.parse("http"+(l?"s":"")+"://"+E)),_.protocol!=="http:"&&_.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return _}function e(E,l,_){var r=_?"https://":"http://",n=l?"-internal.aliyuncs.com":".aliyuncs.com",o="vpc100-oss-cn-";return E.substr(0,o.length)===o&&(n=".aliyuncs.com"),K.parse(r+E+n)}ee.exports=function(E){if(!E||!E.accessKeyId||!E.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");E.bucket&&i(E.bucket);var l=(0,M.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},E);if(l.accessKeyId=l.accessKeyId.trim(),l.accessKeySecret=l.accessKeySecret.trim(),l.timeout&&(l.timeout=X(l.timeout)),l.endpoint)l.endpoint=T(l.endpoint,l.secure);else if(l.region)l.endpoint=e(l.region,l.internal,l.secure);else throw new Error("require options.endpoint or options.region");return l.inited=!0,l}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(W,ee,L){"use strict";var B=W("merge-descriptors"),M=L;B(M,W("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=G(B);function G(l){return l&&l.__esModule?l:{default:l}}var X=W("../utils/checkBucketName"),K=X.checkBucketName,N=W("querystring"),i=W("js-base64"),T=i.Base64.encode,e=L;e.processObjectSave=function(_,r,n,o){var c,v,f,y;return M.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:return E(_,"sourceObject"),E(r,"targetObject"),E(n,"process"),r=this._objectName(r),o&&K(o),c=this._objectRequestParams("POST",_,{subres:"x-oss-process"}),v=o?",b_"+T(o):"",r=T(r),f={"x-oss-process":n+"|sys/saveas,o_"+r+v},c.content=N.stringify(f),b.next=12,M.default.awrap(this.request(c));case 12:return y=b.sent,b.abrupt("return",{res:y.res,status:y.res.status});case 14:case"end":return b.stop()}},null,this)};function E(l,_){if(!l)throw new Error(_+" is required");if(typeof l!="string")throw new Error(_+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=G(B);function G(e){return e&&e.__esModule?e:{default:e}}var X=W("copy-to"),K=W("./callback"),N=W("./utils/deepCopy"),i=N.deepCopy,T=L;T.listUploads=function(E,l){var _,r,n,o;return M.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return l=l||{},_={},X(l).to(_),_.subres="uploads",r=this._objectRequestParams("GET","",_),r.query=E,r.xmlResponse=!0,r.successStatuses=[200],v.next=10,M.default.awrap(this.request(r));case 10:return n=v.sent,o=n.data.Upload||[],Array.isArray(o)||(o=[o]),o=o.map(function(f){return{name:f.Key,uploadId:f.UploadId,initiated:f.Initiated}}),v.abrupt("return",{res:n.res,uploads:o,bucket:n.data.Bucket,nextKeyMarker:n.data.NextKeyMarker,nextUploadIdMarker:n.data.NextUploadIdMarker,isTruncated:n.data.IsTruncated==="true"});case 15:case"end":return v.stop()}},null,this)},T.listParts=function(E,l,_,r){var n,o,c;return M.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return r=r||{},n={},X(r).to(n),n.subres={uploadId:l},o=this._objectRequestParams("GET",E,n),o.query=_,o.xmlResponse=!0,o.successStatuses=[200],f.next=10,M.default.awrap(this.request(o));case 10:return c=f.sent,f.abrupt("return",{res:c.res,uploadId:c.data.UploadId,bucket:c.data.Bucket,name:c.data.Key,partNumberMarker:c.data.PartNumberMarker,nextPartNumberMarker:c.data.NextPartNumberMarker,maxParts:c.data.MaxParts,isTruncated:c.data.IsTruncated,parts:c.data.Part||[]});case 12:case"end":return f.stop()}},null,this)},T.abortMultipartUpload=function(E,l,_){var r,n,o;return M.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return this._stop(),_=_||{},r={},X(_).to(r),r.subres={uploadId:l},n=this._objectRequestParams("DELETE",E,r),n.successStatuses=[204],v.next=9,M.default.awrap(this.request(n));case 9:return o=v.sent,v.abrupt("return",{res:o.res});case 11:case"end":return v.stop()}},null,this)},T.initMultipartUpload=function(E,l){var _,r,n;return M.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return l=l||{},_={},X(l).to(_),_.headers=_.headers||{},this._convertMetaToHeaders(l.meta,_.headers),_.subres="uploads",r=this._objectRequestParams("POST",E,_),r.mime=l.mime,r.xmlResponse=!0,r.successStatuses=[200],c.next=12,M.default.awrap(this.request(r));case 12:return n=c.sent,c.abrupt("return",{res:n.res,bucket:n.data.Bucket,name:n.data.Key,uploadId:n.data.UploadId});case 14:case"end":return c.stop()}},null,this)},T.uploadPart=function(E,l,_,r,n,o,c){var v;return M.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:return v={stream:this._createStream(r,n,o),size:o-n},y.next=3,M.default.awrap(this._uploadPart(E,l,_,v,c));case 3:return y.abrupt("return",y.sent);case 4:case"end":return y.stop()}},null,this)},T.completeMultipartUpload=function(E,l,_,r){var n,o,c,v,f,y,h,b;return M.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:for(n=_.concat().sort(function(x,R){return x.number-R.number}).filter(function(x,R,O){return!R||x.number!==O[R-1].number}),o=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,c=0;c<n.length;c++)v=n[c],o+=`<Part>
|
|
|
`,o+="<PartNumber>"+v.number+`</PartNumber>
|
|
|
`,o+="<ETag>"+v.etag+`</ETag>
|
|
|
`,o+=`</Part>
|
|
|
`;return o+="</CompleteMultipartUpload>",r=r||{},f={},f=i(r),f.headers&&delete f.headers["x-oss-server-side-encryption"],f.subres={uploadId:l},y=this._objectRequestParams("POST",E,f),K.encodeCallback(y,f),y.mime="xml",y.content=o,y.headers&&y.headers["x-oss-callback"]||(y.xmlResponse=!0),y.successStatuses=[200],d.next=17,M.default.awrap(this.request(y));case 17:return h=d.sent,b={res:h.res,bucket:y.bucket,name:E,etag:h.res.headers.etag},y.headers&&y.headers["x-oss-callback"]&&(b.data=JSON.parse(h.data.toString())),d.abrupt("return",b);case 21:case"end":return d.stop()}},null,this)},T._uploadPart=function(E,l,_,r,n){var o,c,v;return M.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:return n=n||{},o={},X(n).to(o),o.headers={"Content-Length":r.size},o.subres={partNumber:_,uploadId:l},c=this._objectRequestParams("PUT",E,o),c.mime=o.mime,c.stream=r.stream,c.successStatuses=[200],y.next=11,M.default.awrap(this.request(c));case 11:if(v=y.sent,v.res.headers.etag){y.next=14;break}throw new Error(`Please set the etag of expose-headers in OSS
|
|
|
https://help.aliyun.com/document_detail/32069.html`);case 14:return r.stream=null,c.stream=null,y.abrupt("return",{name:E,etag:v.res.headers.etag,res:v.res});case 17:case"end":return y.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=i(B),G=W("babel-runtime/core-js/object/keys"),X=i(G),K=W("babel-runtime/helpers/typeof"),N=i(K);function i(l){return l&&l.__esModule?l:{default:l}}var T=W("../utils/checkBucketName"),e=T.checkBucketName,E=L;E.copy=function(_,r,n,o){var c,v,f;return M.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return(typeof n=="undefined"?"undefined":(0,N.default)(n))==="object"&&(o=n),o=o||{},o.headers=o.headers||{},(0,X.default)(o.headers).forEach(function(b){o.headers["x-oss-copy-source-"+b.toLowerCase()]=o.headers[b]}),o.meta&&(o.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(o.meta,o.headers),r=this._getSourceName(r,n),o.versionId&&(r=r+"?versionId="+o.versionId),o.headers["x-oss-copy-source"]=r,c=this._objectRequestParams("PUT",_,o),c.xmlResponse=!0,c.successStatuses=[200,304],h.next=14,M.default.awrap(this.request(c));case 14:return v=h.sent,f=v.data,f&&(f={etag:f.ETag,lastModified:f.LastModified}),h.abrupt("return",{data:f,res:v.res});case 18:case"end":return h.stop()}},null,this)},E._getSourceName=function(_,r){return typeof r=="string"?_=this._objectName(_):_[0]!=="/"?r=this.options.bucket:(r=_.replace(/\/(.+?)(\/.*)/,"$1"),_=_.replace(/(\/.+?\/)(.*)/,"$2")),e(r),_=encodeURI(_),_="/"+r+"/"+_,_}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=K(B),G=W("babel-runtime/core-js/object/assign"),X=K(G);function K(i){return i&&i.__esModule?i:{default:i}}var N=L;N.delete=function(T){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E,l;return M.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return e.subres=(0,X.default)({},e.subres),e.versionId&&(e.subres.versionId=e.versionId),E=this._objectRequestParams("DELETE",T,e),E.successStatuses=[204],r.next=6,M.default.awrap(this.request(E));case 6:return l=r.sent,r.abrupt("return",{res:l.res});case 8:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=K(B),G=W("babel-runtime/core-js/object/assign"),X=K(G);function K(E){return E&&E.__esModule?E:{default:E}}var N=W("utility"),i=W("../utils/obj2xml"),T=i.obj2xml,e=L;e.deleteMulti=function(l){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,n,o,c,v,f,y,h,b,m,d,x;return M.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(r=[],!(!l||!l.length)){O.next=3;break}throw new Error("names is required");case 3:for(n=0;n<l.length;n++)o={},typeof l[n]=="string"?o.Key=N.escape(this._objectName(l[n])):(c=l[n],v=c.key,f=c.versionId,o.Key=N.escape(this._objectName(v)),o.VersionId=f),r.push(o);return y={Delete:{Quiet:!!_.quiet,Object:r}},h=T(y,{headers:!0}),_.subres=(0,X.default)({delete:""},_.subres),_.versionId&&(_.subres.versionId=_.versionId),b=this._objectRequestParams("POST","",_),b.mime="xml",b.content=h,b.xmlResponse=!0,b.successStatuses=[200],O.next=15,M.default.awrap(this.request(b));case 15:return m=O.sent,d=m.data,x=d&&d.Deleted||null,x&&(Array.isArray(x)||(x=[x])),O.abrupt("return",{res:m.res,deleted:x||[]});case 20:case"end":return O.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=K(B),G=W("babel-runtime/core-js/object/assign"),X=K(G);function K(i){return i&&i.__esModule?i:{default:i}}var N=L;N.deleteObjectTagging=function(T){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E,l;return M.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return e.subres=(0,X.default)({tagging:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),T=this._objectName(T),E=this._objectRequestParams("DELETE",T,e),E.successStatuses=[204],r.next=7,M.default.awrap(this.request(E));case 7:return l=r.sent,r.abrupt("return",{status:l.status,res:l.res});case 9:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=K(B),G=W("babel-runtime/core-js/object/assign"),X=K(G);function K(e){return e&&e.__esModule?e:{default:e}}var N=W("fs"),i=W("is-type-of"),T=L;T.get=function(E,l){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,n,o,c;return M.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return r=null,n=!1,i.writableStream(l)?r=l:i.string(l)?(r=N.createWriteStream(l),n=!0):_=l,_=_||{},_.subres=(0,X.default)({},_.subres),_.versionId&&(_.subres.versionId=_.versionId),_.process&&(_.subres["x-oss-process"]=_.process),o=void 0,f.prev=8,c=this._objectRequestParams("GET",E,_),c.writeStream=r,c.successStatuses=[200,206,304],f.next=14,M.default.awrap(this.request(c));case 14:o=f.sent,n&&r.destroy(),f.next=25;break;case 18:if(f.prev=18,f.t0=f.catch(8),!n){f.next=24;break}return r.destroy(),f.next=24,M.default.awrap(this._deleteFileSafe(l));case 24:throw f.t0;case 25:return f.abrupt("return",{res:o.res,content:o.data});case 26:case"end":return f.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=K(B),G=W("babel-runtime/core-js/object/assign"),X=K(G);function K(i){return i&&i.__esModule?i:{default:i}}var N=L;N.getACL=function(T){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E,l;return M.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return e.subres=(0,X.default)({acl:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),T=this._objectName(T),E=this._objectRequestParams("GET",T,e),E.successStatuses=[200],E.xmlResponse=!0,r.next=8,M.default.awrap(this.request(E));case 8:return l=r.sent,r.abrupt("return",{acl:l.data.AccessControlList.Grant,owner:{id:l.data.Owner.ID,displayName:l.data.Owner.DisplayName},res:l.res});case 10:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/keys"),M=i(B),G=W("babel-runtime/regenerator"),X=i(G),K=W("babel-runtime/core-js/object/assign"),N=i(K);function i(c){return c&&c.__esModule?c:{default:c}}var T=L,e=W("../utils/isObject"),E=e.isObject,l=W("../utils/isArray"),_=l.isArray;T.getBucketVersions=r,T.listObjectVersions=r;function r(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f,y,h,b,m,d;return X.default.async(function(R){for(;;)switch(R.prev=R.next){case 0:if(!(c.versionIdMarker&&c.keyMarker===void 0)){R.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return v.subres=(0,N.default)({versions:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),f=this._objectRequestParams("GET","",v),f.xmlResponse=!0,f.successStatuses=[200],f.query=o(c),R.next=10,X.default.awrap(this.request(f));case 10:return y=R.sent,h=y.data.Version||[],b=y.data.DeleteMarker||[],m=this,h&&(Array.isArray(h)||(h=[h]),h=h.map(function(O){return{name:O.Key,url:m._objectUrl(O.Key),lastModified:O.LastModified,isLatest:O.IsLatest==="true",versionId:O.VersionId,etag:O.ETag,type:O.Type,size:Number(O.Size),storageClass:O.StorageClass,owner:{id:O.Owner.ID,displayName:O.Owner.DisplayName}}})),b&&(_(b)||(b=[b]),b=b.map(function(O){return{name:O.Key,lastModified:O.LastModified,versionId:O.VersionId,owner:{id:O.Owner.ID,displayName:O.Owner.DisplayName}}})),d=y.data.CommonPrefixes||null,d&&(_(d)||(d=[d]),d=d.map(function(O){return O.Prefix})),R.abrupt("return",{res:y.res,objects:h,deleteMarker:b,prefixes:d,nextMarker:y.data.NextMarker||null,NextVersionIdMarker:y.data.NextVersionIdMarker||null,isTruncated:y.data.IsTruncated==="true"});case 19:case"end":return R.stop()}},null,this)}function n(c){return c.replace(/([A-Z])/g,"-$1").toLowerCase()}function o(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},v={};return E(c)&&(0,M.default)(c).forEach(function(f){v[n(f)]=c[f]}),v}},{"../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(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=K(B),G=W("babel-runtime/core-js/object/assign"),X=K(G);function K(i){return i&&i.__esModule?i:{default:i}}var N=L;N.getObjectMeta=function(T,e){var E,l;return M.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return e=e||{},T=this._objectName(T),e.subres=(0,X.default)({objectMeta:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),E=this._objectRequestParams("HEAD",T,e),E.successStatuses=[200],r.next=8,M.default.awrap(this.request(E));case 8:return l=r.sent,r.abrupt("return",{status:l.status,res:l.res});case 10:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=K(B),G=W("babel-runtime/core-js/object/assign"),X=K(G);function K(e){return e&&e.__esModule?e:{default:e}}var N=L,i=W("../utils/isObject"),T=i.isObject;N.getObjectTagging=function(E){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_,r,n,o,c;return M.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return l.subres=(0,X.default)({tagging:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),E=this._objectName(E),_=this._objectRequestParams("GET",E,l),_.successStatuses=[200],f.next=7,M.default.awrap(this.request(_));case 7:return r=f.sent,f.next=10,M.default.awrap(this.parseXML(r.data));case 10:return n=f.sent,o=n.TagSet.Tag,o=o&&T(o)?[o]:o||[],c={},o.forEach(function(y){c[y.Key]=y.Value}),f.abrupt("return",{status:r.status,res:r.res,tag:c});case 16:case"end":return f.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=K(B),G=W("babel-runtime/core-js/object/assign"),X=K(G);function K(i){return i&&i.__esModule?i:{default:i}}var N=L;N.getSymlink=function(T){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E,l,_;return M.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return e.subres=(0,X.default)({symlink:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),T=this._objectName(T),E=this._objectRequestParams("GET",T,e),E.successStatuses=[200],n.next=7,M.default.awrap(this.request(E));case 7:return l=n.sent,_=l.res.headers["x-oss-symlink-target"],n.abrupt("return",{targetName:decodeURIComponent(_),res:l.res});case 10:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=i(B),G=W("babel-runtime/core-js/object/keys"),X=i(G),K=W("babel-runtime/core-js/object/assign"),N=i(K);function i(e){return e&&e.__esModule?e:{default:e}}var T=L;T.head=function(E){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_,r,n;return M.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return l.subres=(0,N.default)({},l.subres),l.versionId&&(l.subres.versionId=l.versionId),_=this._objectRequestParams("HEAD",E,l),_.successStatuses=[200,304],c.next=6,M.default.awrap(this.request(_));case 6:return r=c.sent,n={meta:null,res:r.res,status:r.status},r.status===200&&(0,X.default)(r.headers).forEach(function(v){v.indexOf("x-oss-meta-")===0&&(n.meta||(n.meta={}),n.meta[v.substring(11)]=r.headers[v])}),c.abrupt("return",n);case 10:case"end":return c.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=K(B),G=W("babel-runtime/core-js/object/assign"),X=K(G);function K(i){return i&&i.__esModule?i:{default:i}}var N=L;N.putACL=function(T,e,E){var l,_;return M.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return E=E||{},E.subres=(0,X.default)({acl:""},E.subres),E.versionId&&(E.subres.versionId=E.versionId),E.headers=E.headers||{},E.headers["x-oss-object-acl"]=e,T=this._objectName(T),l=this._objectRequestParams("PUT",T,E),l.successStatuses=[200],n.next=10,M.default.awrap(this.request(l));case 10:return _=n.sent,n.abrupt("return",{res:_.res});case 12:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=i(B),G=W("babel-runtime/core-js/object/keys"),X=i(G),K=W("babel-runtime/core-js/object/assign"),N=i(K);function i(r){return r&&r.__esModule?r:{default:r}}var T=W("../utils/obj2xml"),e=T.obj2xml,E=W("../utils/checkObjectTag"),l=E.checkObjectTag,_=L;_.putObjectTagging=function(n,o){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},v,f,y;return M.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:return l(o),c.subres=(0,N.default)({tagging:""},c.subres),c.versionId&&(c.subres.versionId=c.versionId),n=this._objectName(n),v=this._objectRequestParams("PUT",n,c),v.successStatuses=[200],o=(0,X.default)(o).map(function(m){return{Key:m,Value:o[m]}}),f={Tagging:{TagSet:{Tag:o}}},v.mime="xml",v.content=e(f),b.next=12,M.default.awrap(this.request(v));case 12:return y=b.sent,b.abrupt("return",{res:y.res,status:y.status});case 14:case"end":return b.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(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=K(B),G=W("babel-runtime/core-js/object/assign"),X=K(G);function K(i){return i&&i.__esModule?i:{default:i}}var N=L;N.putSymlink=function(T,e,E){var l,_;return M.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return E=E||{},E.headers=E.headers||{},e=this._escape(this._objectName(e)),this._convertMetaToHeaders(E.meta,E.headers),E.headers["x-oss-symlink-target"]=e,E.subres=(0,X.default)({symlink:""},E.subres),E.versionId&&(E.subres.versionId=E.versionId),E.storageClass&&(E.headers["x-oss-storage-class"]=E.storageClass),T=this._objectName(T),l=this._objectRequestParams("PUT",T,E),l.successStatuses=[200],n.next=13,M.default.awrap(this.request(l));case 13:return _=n.sent,n.abrupt("return",{res:_.res});case 15:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(W,ee,L){"use strict";var B=W("babel-runtime/regenerator"),M=K(B),G=W("babel-runtime/core-js/promise"),X=K(G);function K(i){return i&&i.__esModule?i:{default:i}}var N=L;N._parallelNode=function(T,e,E,l){var _,r,n,o,c,v,f,y;return M.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:_=this,r=[],n=[],o=T.length/e,c=T.length%e,v=c===0?o:(T.length-c)/e+1,f=1,y=0;case 8:if(!(y<T.length)){b.next=26;break}if(!_.isCancel()){b.next=11;break}return b.abrupt("break",26);case 11:if(l?n.push(E(_,T[y],l)):n.push(E(_,T[y])),!(n.length===e||f===v&&y===T.length-1)){b.next=23;break}return b.prev=13,f+=1,b.next=17,M.default.awrap(X.default.all(n));case 17:b.next=22;break;case 19:b.prev=19,b.t0=b.catch(13),r.push(b.t0);case 22:n=[];case 23:y++,b.next=8;break;case 26:return b.abrupt("return",r);case 27:case"end":return b.stop()}},null,this,[[13,19]])},N._parallel=function(T,e,E){var l=this;return new X.default(function(_){var r=[];if(e<=0||!T){_(r);return}function n(d){return function(){if(d===null)throw new Error("Callback was already called.");var x=d;d=null;for(var R=arguments.length,O=Array(R),w=0;w<R;w++)O[w]=arguments[w];x.apply(this,O)}}function o(d){var x=-1,R=d.length;return function(){return++x<R&&!l.isCancel()?{value:d[x],key:x}:null}}var c=o(T),v=!1,f=0,y=!1;function h(d,x){f-=1,d?(v=!0,r.push(d),_(r)):x==={}||v&&f<=0?(v=!0,_(r)):y||(l.isCancel()?_(r):m())}function b(d,x){E(d).then(function(R){x(null,R)}).catch(function(R){x(R)})}function m(){for(y=!0;f<e&&!v&&!l.isCancel();){var d=c();if(d===null||r.length>0){v=!0,f<=0&&_(r);return}f+=1,b(d.value,n(h))}y=!1}m()})},N.cancel=function(T){this.options.cancelFlag=!0,T&&this.abortMultipartUpload(T.name,T.uploadId,T.options)},N.isCancel=function(){return this.options.cancelFlag},N.resetCancelFlag=function(){this.options.cancelFlag=!1},N._stop=function(){this.options.cancelFlag=!0},N._makeCancelEvent=function(){var T={status:0,name:"cancel"};return T}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(W,ee,L){(function(B){"use strict";var M=W("babel-runtime/core-js/json/stringify"),G=N(M),X=W("babel-runtime/core-js/object/keys"),K=N(X);function N(e){return e&&e.__esModule?e:{default:e}}var i=W("./../../shims/crypto/crypto.js"),T=W("is-type-of");L.buildCanonicalizedResource=function(E,l){var _=""+E,r="?";if(T.string(l)&&l.trim()!=="")_+=r+l;else if(T.array(l))l.sort(),_+=r+l.join("&");else if(l){var n=function(v,f){return v[0]>f[0]?1:v[0]<f[0]?-1:0},o=function(v){_+=r+v,l[v]&&(_+="="+l[v]),r="&"};(0,K.default)(l).sort(n).forEach(o)}return _},L.buildCanonicalString=function(E,l,_,r){_=_||{};var n=_.headers||{},o="x-oss-",c=[],v={},f=[E.toUpperCase(),n["Content-Md5"]||"",n["Content-Type"]||n["Content-Type".toLowerCase()],r||n["x-oss-date"]];return(0,K.default)(n).forEach(function(y){var h=y.toLowerCase();h.indexOf(o)===0&&(v[h]=String(n[y]).trim())}),(0,K.default)(v).sort().forEach(function(y){c.push(y+":"+v[y])}),f=f.concat(c),f.push(this.buildCanonicalizedResource(l,_.parameters)),f.join(`
|
|
|
`)},L.computeSignature=function(E,l){var _=i.createHmac("sha1",E);return _.update(B.from(l,"utf8")).digest("base64")},L.authorization=function(E,l,_){return"OSS "+E+":"+this.computeSignature(l,_)},L._signatureForURL=function(E){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=arguments[2],r=arguments[3],n={},o=l.subResource,c=o===void 0?{}:o;if(l.process){var v="x-oss-process";c[v]=l.process}if(l.trafficLimit){var f="x-oss-traffic-limit";c[f]=l.trafficLimit}if(l.response&&(0,K.default)(l.response).forEach(function(m){var d="response-"+m.toLowerCase();c[d]=l.response[m]}),(0,K.default)(l).forEach(function(m){var d=m.toLowerCase(),x=l[m];d.indexOf("x-oss-")===0?n[d]=x:(d.indexOf("content-md5")===0||d.indexOf("content-type")===0)&&(n[m]=x)}),Object.prototype.hasOwnProperty.call(l,"security-token")&&(c["security-token"]=l["security-token"]),Object.prototype.hasOwnProperty.call(l,"callback")){var y={callbackUrl:encodeURI(l.callback.url),callbackBody:l.callback.body};if(l.callback.host&&(y.callbackHost=l.callback.host),l.callback.contentType&&(y.callbackBodyType=l.callback.contentType),c.callback=B.from((0,G.default)(y)).toString("base64"),l.callback.customValue){var h={};(0,K.default)(l.callback.customValue).forEach(function(m){h["x:"+m]=l.callback.customValue[m]}),c["callback-var"]=B.from((0,G.default)(h)).toString("base64")}}var b=this.buildCanonicalString(l.method,_,{headers:n,parameters:c},r.toString());return{Signature:this.computeSignature(E,b),subResource:c}}}).call(this,W("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(W,ee,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.checkBucketName=void 0,L.checkBucketName=function(B,M){var G=M?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!G.test(B))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/entries"),M=G(B);function G(l){return l&&l.__esModule?l:{default:l}}Object.defineProperty(L,"__esModule",{value:!0}),L.checkObjectTag=void 0;var X=W("./checkValid"),K=X.checkValid,N=W("./isObject"),i=N.isObject,T=[{validator:function(_){if(typeof _!="string")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 (/)"}],e={key:[].concat(T,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(T,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function E(l){if(!i(l))throw new Error("tag must be Object");var _=(0,M.default)(l);if(_.length>10)throw new Error("maximum of 10 tags for a object");var r=["key","value"];_.forEach(function(n){n.forEach(function(o,c){K(o,e[r[c]])})})}L.checkObjectTag=E},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(W,ee,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.checkValid=void 0;function B(M,G){G.forEach(function(X){if(X.validator)X.validator(M);else if(X.pattern&&!X.pattern.test(M))throw new Error(X.msg)})}L.checkValid=B},{}],38:[function(W,ee,L){(function(B){"use strict";var M=W("babel-runtime/core-js/object/assign"),G=X(M);function X(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(L,"__esModule",{value:!0}),L.createRequest=void 0;var K=W("./../../../shims/crypto/crypto.js"),N=W("debug")("ali-oss"),i=W("mime"),T=W("dateformat"),e=W("copy-to"),E=W("path");function l(n,o){return n[o]||n[o.toLowerCase()]}function _(n,o){delete n[o],delete n[o.toLowerCase()]}function r(n){var o=new Date;this.options.amendTimeSkewed&&(o=+new Date+this.options.amendTimeSkewed);var c={"x-oss-date":T(o,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(c["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,G.default)(c,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(c["x-oss-security-token"]=this.options.stsToken),e(n.headers).to(c),l(c,"Content-Type")||(n.mime&&n.mime.indexOf("/")>0?c["Content-Type"]=n.mime:c["Content-Type"]=i.getType(n.mime||E.extname(n.object||""))),l(c,"Content-Type")||_(c,"Content-Type"),n.content&&(c["Content-Md5"]=K.createHash("md5").update(B.from(n.content,"utf8")).digest("base64"),c["Content-Length"]||(c["Content-Length"]=n.content.length));var v=this._getResource(n);c.authorization=this.authorization(n.method,v,n.subres,c);var f=this._getReqUrl(n);N("request %s %s, with headers %j, !!stream: %s",n.method,f,c,!!n.stream);var y=n.timeout||this.options.timeout,h={method:n.method,content:n.content,stream:n.stream,headers:c,timeout:y,writeStream:n.writeStream,customResponse:n.customResponse,ctx:n.ctx||this.ctx};return this.agent&&(h.agent=this.agent),this.httpsAgent&&(h.httpsAgent=this.httpsAgent),{url:f,params:h}}L.createRequest=r}).call(this,W("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(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/keys"),M=K(B),G=W("babel-runtime/helpers/typeof"),X=K(G);function K(N){return N&&N.__esModule?N:{default:N}}Object.defineProperty(L,"__esModule",{value:!0}),L.deepCopy=void 0,L.deepCopy=function(N){if(N===null||(typeof N=="undefined"?"undefined":(0,X.default)(N))!=="object")return N;var i=Array.isArray(N)?[]:{};return(0,M.default)(N).forEach(function(T){i[T]=L.deepCopy(N[T])}),i}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/keys"),M=K(B),G=W("babel-runtime/helpers/typeof"),X=K(G);function K(T){return T&&T.__esModule?T:{default:T}}Object.defineProperty(L,"__esModule",{value:!0}),L.formatObjKey=void 0;function N(T,e){if(T===null||(typeof T=="undefined"?"undefined":(0,X.default)(T))!=="object")return T;var E=void 0;if(Array.isArray(T)){E=[];for(var l=0;l<T.length;l++)E.push(N(T[l],e))}else E={},(0,M.default)(T).forEach(function(_){E[i(_,e)]=N(T[_],e)});return E}L.formatObjKey=N;function i(T,e){return e==="firstUpperCase"?T=T.replace(/^./,function(E){return E.toUpperCase()}):e==="firstLowerCase"&&(T=T.replace(/^./,function(E){return E.toLowerCase()})),T}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(W,ee,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.getStrBytesCount=void 0;function B(M){for(var G=0,X=0;X<M.length;X++){var K=M.charAt(X);/^[\u00-\uff]$/.test(K)?G+=1:G+=2}return G}L.getStrBytesCount=B},{}],42:[function(W,ee,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.isArray=void 0,L.isArray=function(B){return Object.prototype.toString.call(B)==="[object Array]"}},{}],43:[function(W,ee,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.isBlob=void 0;function B(M){return typeof Blob!="undefined"&&M instanceof Blob}L.isBlob=B},{}],44:[function(W,ee,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.isFile=void 0,L.isFile=function(B){return typeof File!="undefined"&&B instanceof File}},{}],45:[function(W,ee,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.isIP=void 0,L.isIP=function(B){var M=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,G=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return M.test(B)||G.test(B)}},{}],46:[function(W,ee,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.isObject=void 0,L.isObject=function(B){return Object.prototype.toString.call(B)==="[object Object]"}},{}],47:[function(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/keys"),M=G(B);function G(i){return i&&i.__esModule?i:{default:i}}Object.defineProperty(L,"__esModule",{value:!0}),L.obj2xml=void 0;var X=W("./formatObjKey");function K(i){return Object.prototype.toString.call(i).replace(/(.*? |])/g,"").toLowerCase()}function N(i,T){var e="";return T&&T.headers&&(e=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
`),T&&T.firstUpperCase&&(i=X.formatObjKey(i,"firstUpperCase")),K(i)==="object"?(0,M.default)(i).forEach(function(E){K(i[E])==="string"||K(i[E])==="number"?e+="<"+E+">"+i[E]+"</"+E+">":K(i[E])==="object"?e+="<"+E+">"+N(i[E])+"</"+E+">":K(i[E])==="array"?e+=i[E].map(function(l){return"<"+E+">"+N(l)+"</"+E+">"}).join(""):e+="<"+E+">"+i[E].toString()+"</"+E+">"}):e+=i.toString(),e}L.obj2xml=N},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(W,ee,L){ee.exports=B,ee.exports.HttpsAgent=B;function B(){}},{}],49:[function(W,ee,L){ee.exports=W("./register")().Promise},{"./register":51}],50:[function(W,ee,L){"use strict";var B="@@any-promise/REGISTRATION",M=null;ee.exports=function(G,X){return function(N,i){N=N||null,i=i||{};var T=i.global!==!1;if(M===null&&T&&(M=G[B]||null),M!==null&&N!==null&&M.implementation!==N)throw new Error('any-promise already defined as "'+M.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return M===null&&(N!==null&&typeof i.Promise!="undefined"?M={Promise:i.Promise,implementation:N}:M=X(N),T&&(G[B]=M)),M}}},{}],51:[function(W,ee,L){"use strict";ee.exports=W("./loader")(window,B);function B(){if(typeof window.Promise=="undefined")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(W,ee,L){ee.exports={default:W("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(W,ee,L){ee.exports={default:W("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(W,ee,L){ee.exports={default:W("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(W,ee,L){ee.exports={default:W("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(W,ee,L){ee.exports={default:W("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(W,ee,L){ee.exports={default:W("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(W,ee,L){ee.exports={default:W("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(W,ee,L){ee.exports={default:W("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(W,ee,L){ee.exports={default:W("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(W,ee,L){ee.exports={default:W("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(W,ee,L){ee.exports={default:W("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(W,ee,L){ee.exports={default:W("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(W,ee,L){ee.exports={default:W("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(W,ee,L){ee.exports={default:W("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(W,ee,L){ee.exports={default:W("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(W,ee,L){"use strict";L.__esModule=!0;var B=W("../core-js/symbol/iterator"),M=N(B),G=W("../core-js/symbol"),X=N(G),K=typeof X.default=="function"&&typeof M.default=="symbol"?function(i){return typeof i}:function(i){return i&&typeof X.default=="function"&&i.constructor===X.default&&i!==X.default.prototype?"symbol":typeof i};function N(i){return i&&i.__esModule?i:{default:i}}L.default=typeof X.default=="function"&&K(M.default)==="symbol"?function(i){return typeof i=="undefined"?"undefined":K(i)}:function(i){return i&&typeof X.default=="function"&&i.constructor===X.default&&i!==X.default.prototype?"symbol":typeof i=="undefined"?"undefined":K(i)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(W,ee,L){ee.exports=W("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(W,ee,L){"use strict";L.byteLength=T,L.toByteArray=E,L.fromByteArray=r;for(var B=[],M=[],G=typeof Uint8Array!="undefined"?Uint8Array:Array,X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",K=0,N=X.length;K<N;++K)B[K]=X[K],M[X.charCodeAt(K)]=K;M["-".charCodeAt(0)]=62,M["_".charCodeAt(0)]=63;function i(n){var o=n.length;if(o%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=n.indexOf("=");c===-1&&(c=o);var v=c===o?0:4-c%4;return[c,v]}function T(n){var o=i(n),c=o[0],v=o[1];return(c+v)*3/4-v}function e(n,o,c){return(o+c)*3/4-c}function E(n){var o,c=i(n),v=c[0],f=c[1],y=new G(e(n,v,f)),h=0,b=f>0?v-4:v,m;for(m=0;m<b;m+=4)o=M[n.charCodeAt(m)]<<18|M[n.charCodeAt(m+1)]<<12|M[n.charCodeAt(m+2)]<<6|M[n.charCodeAt(m+3)],y[h++]=o>>16&255,y[h++]=o>>8&255,y[h++]=o&255;return f===2&&(o=M[n.charCodeAt(m)]<<2|M[n.charCodeAt(m+1)]>>4,y[h++]=o&255),f===1&&(o=M[n.charCodeAt(m)]<<10|M[n.charCodeAt(m+1)]<<4|M[n.charCodeAt(m+2)]>>2,y[h++]=o>>8&255,y[h++]=o&255),y}function l(n){return B[n>>18&63]+B[n>>12&63]+B[n>>6&63]+B[n&63]}function _(n,o,c){for(var v,f=[],y=o;y<c;y+=3)v=(n[y]<<16&16711680)+(n[y+1]<<8&65280)+(n[y+2]&255),f.push(l(v));return f.join("")}function r(n){for(var o,c=n.length,v=c%3,f=[],y=16383,h=0,b=c-v;h<b;h+=y)f.push(_(n,h,h+y>b?b:h+y));return v===1?(o=n[c-1],f.push(B[o>>2]+B[o<<4&63]+"==")):v===2&&(o=(n[c-2]<<8)+n[c-1],f.push(B[o>>10]+B[o>>4&63]+B[o<<2&63]+"=")),f.join("")}},{}],70:[function(W,ee,L){/*!
|
|
|
* Bowser - a browser detector
|
|
|
* https://github.com/ded/bowser
|
|
|
* MIT License | (c) Dustin Diaz 2015
|
|
|
*/!function(B,M,G){typeof ee!="undefined"&&ee.exports?ee.exports=G():typeof define=="function"&&define.amd?define(M,G):B[M]=G()}(this,"bowser",function(){var B=!0;function M(e){function E(C){var S=e.match(C);return S&&S.length>1&&S[1]||""}function l(C){var S=e.match(C);return S&&S.length>1&&S[2]||""}var _=E(/(ipod|iphone|ipad)/i).toLowerCase(),r=/like android/i.test(e),n=!r&&/android/i.test(e),o=/nexus\s*[0-6]\s*/i.test(e),c=!o&&/nexus\s*[0-9]+/i.test(e),v=/CrOS/.test(e),f=/silk/i.test(e),y=/sailfish/i.test(e),h=/tizen/i.test(e),b=/(web|hpw)(o|0)s/i.test(e),m=/windows phone/i.test(e),d=/SamsungBrowser/i.test(e),x=!m&&/windows/i.test(e),R=!_&&!f&&/macintosh/i.test(e),O=!n&&!y&&!h&&!b&&/linux/i.test(e),w=l(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),D=E(/version\/(\d+(\.\d+)?)/i),A=/tablet/i.test(e)&&!/tablet pc/i.test(e),P=!A&&/[^-]mobi/i.test(e),I=/xbox/i.test(e),u;/opera/i.test(e)?u={name:"Opera",opera:B,version:D||E(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(e)?u={name:"Opera",opera:B,version:E(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||D}:/SamsungBrowser/i.test(e)?u={name:"Samsung Internet for Android",samsungBrowser:B,version:D||E(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(e)?u={name:"NAVER Whale browser",whale:B,version:E(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(e)?u={name:"MZ Browser",mzbrowser:B,version:E(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(e)?u={name:"Opera Coast",coast:B,version:D||E(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(e)?u={name:"Focus",focus:B,version:E(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(e)?u={name:"Yandex Browser",yandexbrowser:B,version:D||E(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(e)?u={name:"UC Browser",ucbrowser:B,version:E(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(e)?u={name:"Maxthon",maxthon:B,version:E(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(e)?u={name:"Epiphany",epiphany:B,version:E(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(e)?u={name:"Puffin",puffin:B,version:E(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(e)?u={name:"Sleipnir",sleipnir:B,version:E(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(e)?u={name:"K-Meleon",kMeleon:B,version:E(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:m?(u={name:"Windows Phone",osname:"Windows Phone",windowsphone:B},w?(u.msedge=B,u.version=w):(u.msie=B,u.version=E(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(e)?u={name:"Internet Explorer",msie:B,version:E(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:v?u={name:"Chrome",osname:"Chrome OS",chromeos:B,chromeBook:B,chrome:B,version:E(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(e)?u={name:"Microsoft Edge",msedge:B,version:w}:/vivaldi/i.test(e)?u={name:"Vivaldi",vivaldi:B,version:E(/vivaldi\/(\d+(\.\d+)?)/i)||D}:y?u={name:"Sailfish",osname:"Sailfish OS",sailfish:B,version:E(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(e)?u={name:"SeaMonkey",seamonkey:B,version:E(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(e)?(u={name:"Firefox",firefox:B,version:E(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(e)&&(u.firefoxos=B,u.osname="Firefox OS")):f?u={name:"Amazon Silk",silk:B,version:E(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(e)?u={name:"PhantomJS",phantom:B,version:E(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(e)?u={name:"SlimerJS",slimer:B,version:E(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(e)||/rim\stablet/i.test(e)?u={name:"BlackBerry",osname:"BlackBerry OS",blackberry:B,version:D||E(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:b?(u={name:"WebOS",osname:"WebOS",webos:B,version:D||E(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(e)&&(u.touchpad=B)):/bada/i.test(e)?u={name:"Bada",osname:"Bada",bada:B,version:E(/dolfin\/(\d+(\.\d+)?)/i)}:h?u={name:"Tizen",osname:"Tizen",tizen:B,version:E(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||D}:/qupzilla/i.test(e)?u={name:"QupZilla",qupzilla:B,version:E(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||D}:/chromium/i.test(e)?u={name:"Chromium",chromium:B,version:E(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||D}:/chrome|crios|crmo/i.test(e)?u={name:"Chrome",chrome:B,version:E(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:n?u={name:"Android",version:D}:/safari|applewebkit/i.test(e)?(u={name:"Safari",safari:B},D&&(u.version=D)):_?(u={name:_=="iphone"?"iPhone":_=="ipad"?"iPad":"iPod"},D&&(u.version=D)):/googlebot/i.test(e)?u={name:"Googlebot",googlebot:B,version:E(/googlebot\/(\d+(\.\d+))/i)||D}:u={name:E(/^(.*)\/(.*) /),version:l(/^(.*)\/(.*) /)},!u.msedge&&/(apple)?webkit/i.test(e)?(/(apple)?webkit\/537\.36/i.test(e)?(u.name=u.name||"Blink",u.blink=B):(u.name=u.name||"Webkit",u.webkit=B),!u.version&&D&&(u.version=D)):!u.opera&&/gecko\//i.test(e)&&(u.name=u.name||"Gecko",u.gecko=B,u.version=u.version||E(/gecko\/(\d+(\.\d+)?)/i)),!u.windowsphone&&(n||u.silk)?(u.android=B,u.osname="Android"):!u.windowsphone&&_?(u[_]=B,u.ios=B,u.osname="iOS"):R?(u.mac=B,u.osname="macOS"):I?(u.xbox=B,u.osname="Xbox"):x?(u.windows=B,u.osname="Windows"):O&&(u.linux=B,u.osname="Linux");function k(C){switch(C){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}}var g="";u.windows?g=k(E(/Windows ((NT|XP)( \d\d?.\d)?)/i)):u.windowsphone?g=E(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):u.mac?(g=E(/Mac OS X (\d+([_\.\s]\d+)*)/i),g=g.replace(/[_\s]/g,".")):_?(g=E(/os (\d+([_\s]\d+)*) like mac os x/i),g=g.replace(/[_\s]/g,".")):n?g=E(/android[ \/-](\d+(\.\d+)*)/i):u.webos?g=E(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):u.blackberry?g=E(/rim\stablet\sos\s(\d+(\.\d+)*)/i):u.bada?g=E(/bada\/(\d+(\.\d+)*)/i):u.tizen&&(g=E(/tizen[\/\s](\d+(\.\d+)*)/i)),g&&(u.osversion=g);var a=!u.windows&&g.split(".")[0];return A||c||_=="ipad"||n&&(a==3||a>=4&&!P)||u.silk?u.tablet=B:(P||_=="iphone"||_=="ipod"||n||o||u.blackberry||u.webos||u.bada)&&(u.mobile=B),u.msedge||u.msie&&u.version>=10||u.yandexbrowser&&u.version>=15||u.vivaldi&&u.version>=1||u.chrome&&u.version>=20||u.samsungBrowser&&u.version>=4||u.whale&&N([u.version,"1.0"])===1||u.mzbrowser&&N([u.version,"6.0"])===1||u.focus&&N([u.version,"1.0"])===1||u.firefox&&u.version>=20||u.safari&&u.version>=6||u.opera&&u.version>=10||u.ios&&u.osversion&&u.osversion.split(".")[0]>=6||u.blackberry&&u.version>=10.1||u.chromium&&u.version>=20?u.a=B:u.msie&&u.version<10||u.chrome&&u.version<20||u.firefox&&u.version<20||u.safari&&u.version<6||u.opera&&u.version<10||u.ios&&u.osversion&&u.osversion.split(".")[0]<6||u.chromium&&u.version<20?u.c=B:u.x=B,u}var G=M(typeof navigator!="undefined"&&navigator.userAgent||"");G.test=function(e){for(var E=0;E<e.length;++E){var l=e[E];if(typeof l=="string"&&l in G)return!0}return!1};function X(e){return e.split(".").length}function K(e,E){var l=[],_;if(Array.prototype.map)return Array.prototype.map.call(e,E);for(_=0;_<e.length;_++)l.push(E(e[_]));return l}function N(e){for(var E=Math.max(X(e[0]),X(e[1])),l=K(e,function(_){var r=E-X(_);return _=_+new Array(r+1).join(".0"),K(_.split("."),function(n){return new Array(20-n.length).join("0")+n}).reverse()});--E>=0;){if(l[0][E]>l[1][E])return 1;if(l[0][E]===l[1][E]){if(E===0)return 0}else return-1}}function i(e,E,l){var _=G;typeof E=="string"&&(l=E,E=void 0),E===void 0&&(E=!1),l&&(_=M(l));var r=""+_.version;for(var n in e)if(e.hasOwnProperty(n)&&_[n]){if(typeof e[n]!="string")throw new Error("Browser version in the minVersion map should be a string: "+n+": "+String(e));return N([r,e[n]])<0}return E}function T(e,E,l){return!i(e,E,l)}return G.isUnsupportedBrowser=i,G.compareVersions=N,G.check=T,G._detect=M,G.detect=M,G})},{}],71:[function(W,ee,L){},{}],72:[function(W,ee,L){var B=W("buffer").Buffer,M=B.isEncoding||function(T){switch(T&&T.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 G(T){if(T&&!M(T))throw new Error("Unknown encoding: "+T)}var X=L.StringDecoder=function(T){this.encoding=(T||"utf8").toLowerCase().replace(/[-_]/,""),G(T);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=N;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=i;break;default:this.write=K;return}this.charBuffer=new B(6),this.charReceived=0,this.charLength=0};X.prototype.write=function(T){for(var e="";this.charLength;){var E=T.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:T.length;if(T.copy(this.charBuffer,this.charReceived,0,E),this.charReceived+=E,this.charReceived<this.charLength)return"";T=T.slice(E,T.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var _=e.charCodeAt(e.length-1);if(_>=55296&&_<=56319){this.charLength+=this.surrogateSize,e="";continue}if(this.charReceived=this.charLength=0,T.length===0)return e;break}this.detectIncompleteChar(T);var l=T.length;this.charLength&&(T.copy(this.charBuffer,0,T.length-this.charReceived,l),l-=this.charReceived),e+=T.toString(this.encoding,0,l);var l=e.length-1,_=e.charCodeAt(l);if(_>=55296&&_<=56319){var r=this.surrogateSize;return this.charLength+=r,this.charReceived+=r,this.charBuffer.copy(this.charBuffer,r,0,r),T.copy(this.charBuffer,0,0,r),e.substring(0,l)}return e},X.prototype.detectIncompleteChar=function(T){for(var e=T.length>=3?3:T.length;e>0;e--){var E=T[T.length-e];if(e==1&&E>>5==6){this.charLength=2;break}if(e<=2&&E>>4==14){this.charLength=3;break}if(e<=3&&E>>3==30){this.charLength=4;break}}this.charReceived=e},X.prototype.end=function(T){var e="";if(T&&T.length&&(e=this.write(T)),this.charReceived){var E=this.charReceived,l=this.charBuffer,_=this.encoding;e+=l.slice(0,E).toString(_)}return e};function K(T){return T.toString(this.encoding)}function N(T){this.charReceived=T.length%2,this.charLength=this.charReceived?2:0}function i(T){this.charReceived=T.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(W,ee,L){(function(B,M){/*!
|
|
|
* The buffer module from node.js, for the browser.
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
|
* @license MIT
|
|
|
*/"use strict";var G=W("base64-js"),X=W("ieee754"),K=W("isarray");L.Buffer=M,L.SlowBuffer=f,L.INSPECT_MAX_BYTES=50,M.TYPED_ARRAY_SUPPORT=B.TYPED_ARRAY_SUPPORT!==void 0?B.TYPED_ARRAY_SUPPORT:N(),L.kMaxLength=i();function N(){try{var ae=new Uint8Array(1);return ae.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ae.foo()===42&&typeof ae.subarray=="function"&&ae.subarray(1,1).byteLength===0}catch(Q){return!1}}function i(){return M.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function T(ae,Q){if(i()<Q)throw new RangeError("Invalid typed array length");return M.TYPED_ARRAY_SUPPORT?(ae=new Uint8Array(Q),ae.__proto__=M.prototype):(ae===null&&(ae=new M(Q)),ae.length=Q),ae}function M(ae,Q,J){if(!M.TYPED_ARRAY_SUPPORT&&!(this instanceof M))return new M(ae,Q,J);if(typeof ae=="number"){if(typeof Q=="string")throw new Error("If encoding is specified then the first argument must be a string");return _(this,ae)}return e(this,ae,Q,J)}M.poolSize=8192,M._augment=function(ae){return ae.__proto__=M.prototype,ae};function e(ae,Q,J,Z){if(typeof Q=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Q instanceof ArrayBuffer?o(ae,Q,J,Z):typeof Q=="string"?r(ae,Q,J):c(ae,Q)}M.from=function(ae,Q,J){return e(null,ae,Q,J)},M.TYPED_ARRAY_SUPPORT&&(M.prototype.__proto__=Uint8Array.prototype,M.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&M[Symbol.species]===M&&Object.defineProperty(M,Symbol.species,{value:null,configurable:!0}));function E(ae){if(typeof ae!="number")throw new TypeError('"size" argument must be a number');if(ae<0)throw new RangeError('"size" argument must not be negative')}function l(ae,Q,J,Z){return E(Q),Q<=0?T(ae,Q):J!==void 0?typeof Z=="string"?T(ae,Q).fill(J,Z):T(ae,Q).fill(J):T(ae,Q)}M.alloc=function(ae,Q,J){return l(null,ae,Q,J)};function _(ae,Q){if(E(Q),ae=T(ae,Q<0?0:v(Q)|0),!M.TYPED_ARRAY_SUPPORT)for(var J=0;J<Q;++J)ae[J]=0;return ae}M.allocUnsafe=function(ae){return _(null,ae)},M.allocUnsafeSlow=function(ae){return _(null,ae)};function r(ae,Q,J){if((typeof J!="string"||J==="")&&(J="utf8"),!M.isEncoding(J))throw new TypeError('"encoding" must be a valid string encoding');var Z=y(Q,J)|0;ae=T(ae,Z);var pe=ae.write(Q,J);return pe!==Z&&(ae=ae.slice(0,pe)),ae}function n(ae,Q){var J=Q.length<0?0:v(Q.length)|0;ae=T(ae,J);for(var Z=0;Z<J;Z+=1)ae[Z]=Q[Z]&255;return ae}function o(ae,Q,J,Z){if(Q.byteLength,J<0||Q.byteLength<J)throw new RangeError("'offset' is out of bounds");if(Q.byteLength<J+(Z||0))throw new RangeError("'length' is out of bounds");return J===void 0&&Z===void 0?Q=new Uint8Array(Q):Z===void 0?Q=new Uint8Array(Q,J):Q=new Uint8Array(Q,J,Z),M.TYPED_ARRAY_SUPPORT?(ae=Q,ae.__proto__=M.prototype):ae=n(ae,Q),ae}function c(ae,Q){if(M.isBuffer(Q)){var J=v(Q.length)|0;return ae=T(ae,J),ae.length===0||Q.copy(ae,0,0,J),ae}if(Q){if(typeof ArrayBuffer!="undefined"&&Q.buffer instanceof ArrayBuffer||"length"in Q)return typeof Q.length!="number"||Ce(Q.length)?T(ae,0):n(ae,Q);if(Q.type==="Buffer"&&K(Q.data))return n(ae,Q.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function v(ae){if(ae>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return ae|0}function f(ae){return+ae!=ae&&(ae=0),M.alloc(+ae)}M.isBuffer=function(Q){return!!(Q!=null&&Q._isBuffer)},M.compare=function(Q,J){if(!M.isBuffer(Q)||!M.isBuffer(J))throw new TypeError("Arguments must be Buffers");if(Q===J)return 0;for(var Z=Q.length,pe=J.length,le=0,ye=Math.min(Z,pe);le<ye;++le)if(Q[le]!==J[le]){Z=Q[le],pe=J[le];break}return Z<pe?-1:pe<Z?1:0},M.isEncoding=function(Q){switch(String(Q).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}},M.concat=function(Q,J){if(!K(Q))throw new TypeError('"list" argument must be an Array of Buffers');if(Q.length===0)return M.alloc(0);var Z;if(J===void 0)for(J=0,Z=0;Z<Q.length;++Z)J+=Q[Z].length;var pe=M.allocUnsafe(J),le=0;for(Z=0;Z<Q.length;++Z){var ye=Q[Z];if(!M.isBuffer(ye))throw new TypeError('"list" argument must be an Array of Buffers');ye.copy(pe,le),le+=ye.length}return pe};function y(ae,Q){if(M.isBuffer(ae))return ae.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ae)||ae instanceof ArrayBuffer))return ae.byteLength;typeof ae!="string"&&(ae=""+ae);var J=ae.length;if(J===0)return 0;for(var Z=!1;;)switch(Q){case"ascii":case"latin1":case"binary":return J;case"utf8":case"utf-8":case void 0:return se(ae).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J*2;case"hex":return J>>>1;case"base64":return ge(ae).length;default:if(Z)return se(ae).length;Q=(""+Q).toLowerCase(),Z=!0}}M.byteLength=y;function h(ae,Q,J){var Z=!1;if((Q===void 0||Q<0)&&(Q=0),Q>this.length)return"";if((J===void 0||J>this.length)&&(J=this.length),J<=0)return"";if(J>>>=0,Q>>>=0,J<=Q)return"";for(ae||(ae="utf8");;)switch(ae){case"hex":return C(this,Q,J);case"utf8":case"utf-8":return I(this,Q,J);case"ascii":return g(this,Q,J);case"latin1":case"binary":return a(this,Q,J);case"base64":return P(this,Q,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,Q,J);default:if(Z)throw new TypeError("Unknown encoding: "+ae);ae=(ae+"").toLowerCase(),Z=!0}}M.prototype._isBuffer=!0;function b(ae,Q,J){var Z=ae[Q];ae[Q]=ae[J],ae[J]=Z}M.prototype.swap16=function(){var Q=this.length;if(Q%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var J=0;J<Q;J+=2)b(this,J,J+1);return this},M.prototype.swap32=function(){var Q=this.length;if(Q%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var J=0;J<Q;J+=4)b(this,J,J+3),b(this,J+1,J+2);return this},M.prototype.swap64=function(){var Q=this.length;if(Q%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var J=0;J<Q;J+=8)b(this,J,J+7),b(this,J+1,J+6),b(this,J+2,J+5),b(this,J+3,J+4);return this},M.prototype.toString=function(){var Q=this.length|0;return Q===0?"":arguments.length===0?I(this,0,Q):h.apply(this,arguments)},M.prototype.equals=function(Q){if(!M.isBuffer(Q))throw new TypeError("Argument must be a Buffer");return this===Q?!0:M.compare(this,Q)===0},M.prototype.inspect=function(){var Q="",J=L.INSPECT_MAX_BYTES;return this.length>0&&(Q=this.toString("hex",0,J).match(/.{2}/g).join(" "),this.length>J&&(Q+=" ... ")),"<Buffer "+Q+">"},M.prototype.compare=function(Q,J,Z,pe,le){if(!M.isBuffer(Q))throw new TypeError("Argument must be a Buffer");if(J===void 0&&(J=0),Z===void 0&&(Z=Q?Q.length:0),pe===void 0&&(pe=0),le===void 0&&(le=this.length),J<0||Z>Q.length||pe<0||le>this.length)throw new RangeError("out of range index");if(pe>=le&&J>=Z)return 0;if(pe>=le)return-1;if(J>=Z)return 1;if(J>>>=0,Z>>>=0,pe>>>=0,le>>>=0,this===Q)return 0;for(var ye=le-pe,Te=Z-J,Pe=Math.min(ye,Te),He=this.slice(pe,le),Oe=Q.slice(J,Z),Ue=0;Ue<Pe;++Ue)if(He[Ue]!==Oe[Ue]){ye=He[Ue],Te=Oe[Ue];break}return ye<Te?-1:Te<ye?1:0};function m(ae,Q,J,Z,pe){if(ae.length===0)return-1;if(typeof J=="string"?(Z=J,J=0):J>2147483647?J=2147483647:J<-2147483648&&(J=-2147483648),J=+J,isNaN(J)&&(J=pe?0:ae.length-1),J<0&&(J=ae.length+J),J>=ae.length){if(pe)return-1;J=ae.length-1}else if(J<0)if(pe)J=0;else return-1;if(typeof Q=="string"&&(Q=M.from(Q,Z)),M.isBuffer(Q))return Q.length===0?-1:d(ae,Q,J,Z,pe);if(typeof Q=="number")return Q=Q&255,M.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?pe?Uint8Array.prototype.indexOf.call(ae,Q,J):Uint8Array.prototype.lastIndexOf.call(ae,Q,J):d(ae,[Q],J,Z,pe);throw new TypeError("val must be string, number or Buffer")}function d(ae,Q,J,Z,pe){var le=1,ye=ae.length,Te=Q.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(ae.length<2||Q.length<2)return-1;le=2,ye/=2,Te/=2,J/=2}function Pe(Ve,Re){return le===1?Ve[Re]:Ve.readUInt16BE(Re*le)}var He;if(pe){var Oe=-1;for(He=J;He<ye;He++)if(Pe(ae,He)===Pe(Q,Oe===-1?0:He-Oe)){if(Oe===-1&&(Oe=He),He-Oe+1===Te)return Oe*le}else Oe!==-1&&(He-=He-Oe),Oe=-1}else for(J+Te>ye&&(J=ye-Te),He=J;He>=0;He--){for(var Ue=!0,je=0;je<Te;je++)if(Pe(ae,He+je)!==Pe(Q,je)){Ue=!1;break}if(Ue)return He}return-1}M.prototype.includes=function(Q,J,Z){return this.indexOf(Q,J,Z)!==-1},M.prototype.indexOf=function(Q,J,Z){return m(this,Q,J,Z,!0)},M.prototype.lastIndexOf=function(Q,J,Z){return m(this,Q,J,Z,!1)};function x(ae,Q,J,Z){J=Number(J)||0;var pe=ae.length-J;Z?(Z=Number(Z),Z>pe&&(Z=pe)):Z=pe;var le=Q.length;if(le%2!==0)throw new TypeError("Invalid hex string");Z>le/2&&(Z=le/2);for(var ye=0;ye<Z;++ye){var Te=parseInt(Q.substr(ye*2,2),16);if(isNaN(Te))return ye;ae[J+ye]=Te}return ye}function R(ae,Q,J,Z){return fe(se(Q,ae.length-J),ae,J,Z)}function O(ae,Q,J,Z){return fe(_e(Q),ae,J,Z)}function w(ae,Q,J,Z){return O(ae,Q,J,Z)}function D(ae,Q,J,Z){return fe(ge(Q),ae,J,Z)}function A(ae,Q,J,Z){return fe(De(Q,ae.length-J),ae,J,Z)}M.prototype.write=function(Q,J,Z,pe){if(J===void 0)pe="utf8",Z=this.length,J=0;else if(Z===void 0&&typeof J=="string")pe=J,Z=this.length,J=0;else if(isFinite(J))J=J|0,isFinite(Z)?(Z=Z|0,pe===void 0&&(pe="utf8")):(pe=Z,Z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var le=this.length-J;if((Z===void 0||Z>le)&&(Z=le),Q.length>0&&(Z<0||J<0)||J>this.length)throw new RangeError("Attempt to write outside buffer bounds");pe||(pe="utf8");for(var ye=!1;;)switch(pe){case"hex":return x(this,Q,J,Z);case"utf8":case"utf-8":return R(this,Q,J,Z);case"ascii":return O(this,Q,J,Z);case"latin1":case"binary":return w(this,Q,J,Z);case"base64":return D(this,Q,J,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,Q,J,Z);default:if(ye)throw new TypeError("Unknown encoding: "+pe);pe=(""+pe).toLowerCase(),ye=!0}},M.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(ae,Q,J){return Q===0&&J===ae.length?G.fromByteArray(ae):G.fromByteArray(ae.slice(Q,J))}function I(ae,Q,J){J=Math.min(ae.length,J);for(var Z=[],pe=Q;pe<J;){var le=ae[pe],ye=null,Te=le>239?4:le>223?3:le>191?2:1;if(pe+Te<=J){var Pe,He,Oe,Ue;switch(Te){case 1:le<128&&(ye=le);break;case 2:Pe=ae[pe+1],(Pe&192)===128&&(Ue=(le&31)<<6|Pe&63,Ue>127&&(ye=Ue));break;case 3:Pe=ae[pe+1],He=ae[pe+2],(Pe&192)===128&&(He&192)===128&&(Ue=(le&15)<<12|(Pe&63)<<6|He&63,Ue>2047&&(Ue<55296||Ue>57343)&&(ye=Ue));break;case 4:Pe=ae[pe+1],He=ae[pe+2],Oe=ae[pe+3],(Pe&192)===128&&(He&192)===128&&(Oe&192)===128&&(Ue=(le&15)<<18|(Pe&63)<<12|(He&63)<<6|Oe&63,Ue>65535&&Ue<1114112&&(ye=Ue))}}ye===null?(ye=65533,Te=1):ye>65535&&(ye-=65536,Z.push(ye>>>10&1023|55296),ye=56320|ye&1023),Z.push(ye),pe+=Te}return k(Z)}var u=4096;function k(ae){var Q=ae.length;if(Q<=u)return String.fromCharCode.apply(String,ae);for(var J="",Z=0;Z<Q;)J+=String.fromCharCode.apply(String,ae.slice(Z,Z+=u));return J}function g(ae,Q,J){var Z="";J=Math.min(ae.length,J);for(var pe=Q;pe<J;++pe)Z+=String.fromCharCode(ae[pe]&127);return Z}function a(ae,Q,J){var Z="";J=Math.min(ae.length,J);for(var pe=Q;pe<J;++pe)Z+=String.fromCharCode(ae[pe]);return Z}function C(ae,Q,J){var Z=ae.length;(!Q||Q<0)&&(Q=0),(!J||J<0||J>Z)&&(J=Z);for(var pe="",le=Q;le<J;++le)pe+=he(ae[le]);return pe}function S(ae,Q,J){for(var Z=ae.slice(Q,J),pe="",le=0;le<Z.length;le+=2)pe+=String.fromCharCode(Z[le]+Z[le+1]*256);return pe}M.prototype.slice=function(Q,J){var Z=this.length;Q=~~Q,J=J===void 0?Z:~~J,Q<0?(Q+=Z,Q<0&&(Q=0)):Q>Z&&(Q=Z),J<0?(J+=Z,J<0&&(J=0)):J>Z&&(J=Z),J<Q&&(J=Q);var pe;if(M.TYPED_ARRAY_SUPPORT)pe=this.subarray(Q,J),pe.__proto__=M.prototype;else{var le=J-Q;pe=new M(le,void 0);for(var ye=0;ye<le;++ye)pe[ye]=this[ye+Q]}return pe};function p(ae,Q,J){if(ae%1!==0||ae<0)throw new RangeError("offset is not uint");if(ae+Q>J)throw new RangeError("Trying to access beyond buffer length")}M.prototype.readUIntLE=function(Q,J,Z){Q=Q|0,J=J|0,Z||p(Q,J,this.length);for(var pe=this[Q],le=1,ye=0;++ye<J&&(le*=256);)pe+=this[Q+ye]*le;return pe},M.prototype.readUIntBE=function(Q,J,Z){Q=Q|0,J=J|0,Z||p(Q,J,this.length);for(var pe=this[Q+--J],le=1;J>0&&(le*=256);)pe+=this[Q+--J]*le;return pe},M.prototype.readUInt8=function(Q,J){return J||p(Q,1,this.length),this[Q]},M.prototype.readUInt16LE=function(Q,J){return J||p(Q,2,this.length),this[Q]|this[Q+1]<<8},M.prototype.readUInt16BE=function(Q,J){return J||p(Q,2,this.length),this[Q]<<8|this[Q+1]},M.prototype.readUInt32LE=function(Q,J){return J||p(Q,4,this.length),(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+this[Q+3]*16777216},M.prototype.readUInt32BE=function(Q,J){return J||p(Q,4,this.length),this[Q]*16777216+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])},M.prototype.readIntLE=function(Q,J,Z){Q=Q|0,J=J|0,Z||p(Q,J,this.length);for(var pe=this[Q],le=1,ye=0;++ye<J&&(le*=256);)pe+=this[Q+ye]*le;return le*=128,pe>=le&&(pe-=Math.pow(2,8*J)),pe},M.prototype.readIntBE=function(Q,J,Z){Q=Q|0,J=J|0,Z||p(Q,J,this.length);for(var pe=J,le=1,ye=this[Q+--pe];pe>0&&(le*=256);)ye+=this[Q+--pe]*le;return le*=128,ye>=le&&(ye-=Math.pow(2,8*J)),ye},M.prototype.readInt8=function(Q,J){return J||p(Q,1,this.length),this[Q]&128?(255-this[Q]+1)*-1:this[Q]},M.prototype.readInt16LE=function(Q,J){J||p(Q,2,this.length);var Z=this[Q]|this[Q+1]<<8;return Z&32768?Z|4294901760:Z},M.prototype.readInt16BE=function(Q,J){J||p(Q,2,this.length);var Z=this[Q+1]|this[Q]<<8;return Z&32768?Z|4294901760:Z},M.prototype.readInt32LE=function(Q,J){return J||p(Q,4,this.length),this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24},M.prototype.readInt32BE=function(Q,J){return J||p(Q,4,this.length),this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]},M.prototype.readFloatLE=function(Q,J){return J||p(Q,4,this.length),X.read(this,Q,!0,23,4)},M.prototype.readFloatBE=function(Q,J){return J||p(Q,4,this.length),X.read(this,Q,!1,23,4)},M.prototype.readDoubleLE=function(Q,J){return J||p(Q,8,this.length),X.read(this,Q,!0,52,8)},M.prototype.readDoubleBE=function(Q,J){return J||p(Q,8,this.length),X.read(this,Q,!1,52,8)};function U(ae,Q,J,Z,pe,le){if(!M.isBuffer(ae))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>pe||Q<le)throw new RangeError('"value" argument is out of bounds');if(J+Z>ae.length)throw new RangeError("Index out of range")}M.prototype.writeUIntLE=function(Q,J,Z,pe){if(Q=+Q,J=J|0,Z=Z|0,!pe){var le=Math.pow(2,8*Z)-1;U(this,Q,J,Z,le,0)}var ye=1,Te=0;for(this[J]=Q&255;++Te<Z&&(ye*=256);)this[J+Te]=Q/ye&255;return J+Z},M.prototype.writeUIntBE=function(Q,J,Z,pe){if(Q=+Q,J=J|0,Z=Z|0,!pe){var le=Math.pow(2,8*Z)-1;U(this,Q,J,Z,le,0)}var ye=Z-1,Te=1;for(this[J+ye]=Q&255;--ye>=0&&(Te*=256);)this[J+ye]=Q/Te&255;return J+Z},M.prototype.writeUInt8=function(Q,J,Z){return Q=+Q,J=J|0,Z||U(this,Q,J,1,255,0),M.TYPED_ARRAY_SUPPORT||(Q=Math.floor(Q)),this[J]=Q&255,J+1};function z(ae,Q,J,Z){Q<0&&(Q=65535+Q+1);for(var pe=0,le=Math.min(ae.length-J,2);pe<le;++pe)ae[J+pe]=(Q&255<<8*(Z?pe:1-pe))>>>(Z?pe:1-pe)*8}M.prototype.writeUInt16LE=function(Q,J,Z){return Q=+Q,J=J|0,Z||U(this,Q,J,2,65535,0),M.TYPED_ARRAY_SUPPORT?(this[J]=Q&255,this[J+1]=Q>>>8):z(this,Q,J,!0),J+2},M.prototype.writeUInt16BE=function(Q,J,Z){return Q=+Q,J=J|0,Z||U(this,Q,J,2,65535,0),M.TYPED_ARRAY_SUPPORT?(this[J]=Q>>>8,this[J+1]=Q&255):z(this,Q,J,!1),J+2};function q(ae,Q,J,Z){Q<0&&(Q=4294967295+Q+1);for(var pe=0,le=Math.min(ae.length-J,4);pe<le;++pe)ae[J+pe]=Q>>>(Z?pe:3-pe)*8&255}M.prototype.writeUInt32LE=function(Q,J,Z){return Q=+Q,J=J|0,Z||U(this,Q,J,4,4294967295,0),M.TYPED_ARRAY_SUPPORT?(this[J+3]=Q>>>24,this[J+2]=Q>>>16,this[J+1]=Q>>>8,this[J]=Q&255):q(this,Q,J,!0),J+4},M.prototype.writeUInt32BE=function(Q,J,Z){return Q=+Q,J=J|0,Z||U(this,Q,J,4,4294967295,0),M.TYPED_ARRAY_SUPPORT?(this[J]=Q>>>24,this[J+1]=Q>>>16,this[J+2]=Q>>>8,this[J+3]=Q&255):q(this,Q,J,!1),J+4},M.prototype.writeIntLE=function(Q,J,Z,pe){if(Q=+Q,J=J|0,!pe){var le=Math.pow(2,8*Z-1);U(this,Q,J,Z,le-1,-le)}var ye=0,Te=1,Pe=0;for(this[J]=Q&255;++ye<Z&&(Te*=256);)Q<0&&Pe===0&&this[J+ye-1]!==0&&(Pe=1),this[J+ye]=(Q/Te>>0)-Pe&255;return J+Z},M.prototype.writeIntBE=function(Q,J,Z,pe){if(Q=+Q,J=J|0,!pe){var le=Math.pow(2,8*Z-1);U(this,Q,J,Z,le-1,-le)}var ye=Z-1,Te=1,Pe=0;for(this[J+ye]=Q&255;--ye>=0&&(Te*=256);)Q<0&&Pe===0&&this[J+ye+1]!==0&&(Pe=1),this[J+ye]=(Q/Te>>0)-Pe&255;return J+Z},M.prototype.writeInt8=function(Q,J,Z){return Q=+Q,J=J|0,Z||U(this,Q,J,1,127,-128),M.TYPED_ARRAY_SUPPORT||(Q=Math.floor(Q)),Q<0&&(Q=255+Q+1),this[J]=Q&255,J+1},M.prototype.writeInt16LE=function(Q,J,Z){return Q=+Q,J=J|0,Z||U(this,Q,J,2,32767,-32768),M.TYPED_ARRAY_SUPPORT?(this[J]=Q&255,this[J+1]=Q>>>8):z(this,Q,J,!0),J+2},M.prototype.writeInt16BE=function(Q,J,Z){return Q=+Q,J=J|0,Z||U(this,Q,J,2,32767,-32768),M.TYPED_ARRAY_SUPPORT?(this[J]=Q>>>8,this[J+1]=Q&255):z(this,Q,J,!1),J+2},M.prototype.writeInt32LE=function(Q,J,Z){return Q=+Q,J=J|0,Z||U(this,Q,J,4,2147483647,-2147483648),M.TYPED_ARRAY_SUPPORT?(this[J]=Q&255,this[J+1]=Q>>>8,this[J+2]=Q>>>16,this[J+3]=Q>>>24):q(this,Q,J,!0),J+4},M.prototype.writeInt32BE=function(Q,J,Z){return Q=+Q,J=J|0,Z||U(this,Q,J,4,2147483647,-2147483648),Q<0&&(Q=4294967295+Q+1),M.TYPED_ARRAY_SUPPORT?(this[J]=Q>>>24,this[J+1]=Q>>>16,this[J+2]=Q>>>8,this[J+3]=Q&255):q(this,Q,J,!1),J+4};function $(ae,Q,J,Z,pe,le){if(J+Z>ae.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("Index out of range")}function re(ae,Q,J,Z,pe){return pe||$(ae,Q,J,4,34028234663852886e22,-34028234663852886e22),X.write(ae,Q,J,Z,23,4),J+4}M.prototype.writeFloatLE=function(Q,J,Z){return re(this,Q,J,!0,Z)},M.prototype.writeFloatBE=function(Q,J,Z){return re(this,Q,J,!1,Z)};function ce(ae,Q,J,Z,pe){return pe||$(ae,Q,J,8,17976931348623157e292,-17976931348623157e292),X.write(ae,Q,J,Z,52,8),J+8}M.prototype.writeDoubleLE=function(Q,J,Z){return ce(this,Q,J,!0,Z)},M.prototype.writeDoubleBE=function(Q,J,Z){return ce(this,Q,J,!1,Z)},M.prototype.copy=function(Q,J,Z,pe){if(Z||(Z=0),!pe&&pe!==0&&(pe=this.length),J>=Q.length&&(J=Q.length),J||(J=0),pe>0&&pe<Z&&(pe=Z),pe===Z)return 0;if(Q.length===0||this.length===0)return 0;if(J<0)throw new RangeError("targetStart out of bounds");if(Z<0||Z>=this.length)throw new RangeError("sourceStart out of bounds");if(pe<0)throw new RangeError("sourceEnd out of bounds");pe>this.length&&(pe=this.length),Q.length-J<pe-Z&&(pe=Q.length-J+Z);var le=pe-Z,ye;if(this===Q&&Z<J&&J<pe)for(ye=le-1;ye>=0;--ye)Q[ye+J]=this[ye+Z];else if(le<1e3||!M.TYPED_ARRAY_SUPPORT)for(ye=0;ye<le;++ye)Q[ye+J]=this[ye+Z];else Uint8Array.prototype.set.call(Q,this.subarray(Z,Z+le),J);return le},M.prototype.fill=function(Q,J,Z,pe){if(typeof Q=="string"){if(typeof J=="string"?(pe=J,J=0,Z=this.length):typeof Z=="string"&&(pe=Z,Z=this.length),Q.length===1){var le=Q.charCodeAt(0);le<256&&(Q=le)}if(pe!==void 0&&typeof pe!="string")throw new TypeError("encoding must be a string");if(typeof pe=="string"&&!M.isEncoding(pe))throw new TypeError("Unknown encoding: "+pe)}else typeof Q=="number"&&(Q=Q&255);if(J<0||this.length<J||this.length<Z)throw new RangeError("Out of range index");if(Z<=J)return this;J=J>>>0,Z=Z===void 0?this.length:Z>>>0,Q||(Q=0);var ye;if(typeof Q=="number")for(ye=J;ye<Z;++ye)this[ye]=Q;else{var Te=M.isBuffer(Q)?Q:se(new M(Q,pe).toString()),Pe=Te.length;for(ye=0;ye<Z-J;++ye)this[ye+J]=Te[ye%Pe]}return this};var ne=/[^+\/0-9A-Za-z-_]/g;function me(ae){if(ae=be(ae).replace(ne,""),ae.length<2)return"";for(;ae.length%4!==0;)ae=ae+"=";return ae}function be(ae){return ae.trim?ae.trim():ae.replace(/^\s+|\s+$/g,"")}function he(ae){return ae<16?"0"+ae.toString(16):ae.toString(16)}function se(ae,Q){Q=Q||Infinity;for(var J,Z=ae.length,pe=null,le=[],ye=0;ye<Z;++ye){if(J=ae.charCodeAt(ye),J>55295&&J<57344){if(!pe){if(J>56319){(Q-=3)>-1&&le.push(239,191,189);continue}else if(ye+1===Z){(Q-=3)>-1&&le.push(239,191,189);continue}pe=J;continue}if(J<56320){(Q-=3)>-1&&le.push(239,191,189),pe=J;continue}J=(pe-55296<<10|J-56320)+65536}else pe&&((Q-=3)>-1&&le.push(239,191,189));if(pe=null,J<128){if((Q-=1)<0)break;le.push(J)}else if(J<2048){if((Q-=2)<0)break;le.push(J>>6|192,J&63|128)}else if(J<65536){if((Q-=3)<0)break;le.push(J>>12|224,J>>6&63|128,J&63|128)}else if(J<1114112){if((Q-=4)<0)break;le.push(J>>18|240,J>>12&63|128,J>>6&63|128,J&63|128)}else throw new Error("Invalid code point")}return le}function _e(ae){for(var Q=[],J=0;J<ae.length;++J)Q.push(ae.charCodeAt(J)&255);return Q}function De(ae,Q){for(var J,Z,pe,le=[],ye=0;ye<ae.length&&!((Q-=2)<0);++ye)J=ae.charCodeAt(ye),Z=J>>8,pe=J%256,le.push(pe),le.push(Z);return le}function ge(ae){return G.toByteArray(me(ae))}function fe(ae,Q,J,Z){for(var pe=0;pe<Z&&!(pe+J>=Q.length||pe>=ae.length);++pe)Q[pe+J]=ae[pe];return pe}function Ce(ae){return ae!==ae}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},W("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(W,ee,L){ee.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(W,ee,L){ee.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(W,ee,L){/*!
|
|
|
* copy-to - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var B=Array.prototype.slice;ee.exports=M;function M(X,K){if(!(this instanceof M))return new M(X,K);this.src=X,this._withAccess=K}M.prototype.withAccess=function(X){return this._withAccess=X!==!1,this},M.prototype.pick=function(X){return Array.isArray(X)||(X=B.call(arguments)),X.length&&(this.keys=X),this},M.prototype.to=function(X){if(X=X||{},!this.src)return X;var K=this.keys||Object.keys(this.src);if(!this._withAccess){for(var N=0;N<K.length;N++){if(i=K[N],X[i]!==void 0)continue;X[i]=this.src[i]}return X}for(var N=0;N<K.length;N++){var i=K[N];if(!G(X,i))continue;var T=this.src.__lookupGetter__(i),e=this.src.__lookupSetter__(i);T&&X.__defineGetter__(i,T),e&&X.__defineSetter__(i,e),!T&&!e&&(X[i]=this.src[i])}return X},M.prototype.toCover=function(X){for(var K=this.keys||Object.keys(this.src),N=0;N<K.length;N++){var i=K[N];delete X[i];var T=this.src.__lookupGetter__(i),e=this.src.__lookupSetter__(i);T&&X.__defineGetter__(i,T),e&&X.__defineSetter__(i,e),!T&&!e&&(X[i]=this.src[i])}},M.prototype.override=M.prototype.toCover,M.prototype.and=function(X){var K={};return this.to(K),this.src=X,this.to(K),this.src=K,this};function G(X,K){return X[K]===void 0&&X.__lookupGetter__(K)===void 0&&X.__lookupSetter__(K)===void 0}},{}],77:[function(W,ee,L){W("../../modules/es6.string.iterator"),W("../../modules/es6.array.from"),ee.exports=W("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(W,ee,L){var B=W("../../modules/_core"),M=B.JSON||(B.JSON={stringify:JSON.stringify});ee.exports=function(X){return M.stringify.apply(M,arguments)}},{"../../modules/_core":99}],79:[function(W,ee,L){W("../../modules/es6.object.assign"),ee.exports=W("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(W,ee,L){W("../../modules/es6.object.create");var B=W("../../modules/_core").Object;ee.exports=function(G,X){return B.create(G,X)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(W,ee,L){W("../../modules/es6.object.define-property");var B=W("../../modules/_core").Object;ee.exports=function(G,X,K){return B.defineProperty(G,X,K)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(W,ee,L){W("../../modules/es7.object.entries"),ee.exports=W("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(W,ee,L){W("../../modules/es6.object.get-own-property-names");var B=W("../../modules/_core").Object;ee.exports=function(G){return B.getOwnPropertyNames(G)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(W,ee,L){W("../../modules/es6.object.get-prototype-of"),ee.exports=W("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(W,ee,L){W("../../modules/es6.object.keys"),ee.exports=W("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(W,ee,L){W("../modules/es6.object.to-string"),W("../modules/es6.string.iterator"),W("../modules/web.dom.iterable"),W("../modules/es6.promise"),W("../modules/es7.promise.finally"),W("../modules/es7.promise.try"),ee.exports=W("../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(W,ee,L){W("../modules/web.immediate"),ee.exports=W("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(W,ee,L){W("../../modules/es6.string.from-code-point"),ee.exports=W("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(W,ee,L){W("../../modules/es6.function.has-instance"),ee.exports=W("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(W,ee,L){W("../../modules/es6.symbol"),W("../../modules/es6.object.to-string"),W("../../modules/es7.symbol.async-iterator"),W("../../modules/es7.symbol.observable"),ee.exports=W("../../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(W,ee,L){W("../../modules/es6.string.iterator"),W("../../modules/web.dom.iterable"),ee.exports=W("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(W,ee,L){ee.exports=function(B){if(typeof B!="function")throw TypeError(B+" is not a function!");return B}},{}],93:[function(W,ee,L){ee.exports=function(){}},{}],94:[function(W,ee,L){ee.exports=function(B,M,G,X){if(!(B instanceof M)||X!==void 0&&X in B)throw TypeError(G+": incorrect invocation!");return B}},{}],95:[function(W,ee,L){var B=W("./_is-object");ee.exports=function(M){if(!B(M))throw TypeError(M+" is not an object!");return M}},{"./_is-object":119}],96:[function(W,ee,L){var B=W("./_to-iobject"),M=W("./_to-length"),G=W("./_to-absolute-index");ee.exports=function(X){return function(K,N,i){var T=B(K),e=M(T.length),E=G(i,e),l;if(X&&N!=N){for(;e>E;)if(l=T[E++],l!=l)return!0}else for(;e>E;E++)if((X||E in T)&&T[E]===N)return X||E||0;return!X&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(W,ee,L){var B=W("./_cof"),M=W("./_wks")("toStringTag"),G=B(function(){return arguments}())=="Arguments",X=function(K,N){try{return K[N]}catch(i){}};ee.exports=function(K){var N,i,T;return K===void 0?"Undefined":K===null?"Null":typeof(i=X(N=Object(K),M))=="string"?i:G?B(N):(T=B(N))=="Object"&&typeof N.callee=="function"?"Arguments":T}},{"./_cof":98,"./_wks":166}],98:[function(W,ee,L){var B={}.toString;ee.exports=function(M){return B.call(M).slice(8,-1)}},{}],99:[function(W,ee,L){var B=ee.exports={version:"2.6.11"};typeof __e=="number"&&(__e=B)},{}],100:[function(W,ee,L){"use strict";var B=W("./_object-dp"),M=W("./_property-desc");ee.exports=function(G,X,K){X in G?B.f(G,X,M(0,K)):G[X]=K}},{"./_object-dp":132,"./_property-desc":146}],101:[function(W,ee,L){var B=W("./_a-function");ee.exports=function(M,G,X){if(B(M),G===void 0)return M;switch(X){case 1:return function(K){return M.call(G,K)};case 2:return function(K,N){return M.call(G,K,N)};case 3:return function(K,N,i){return M.call(G,K,N,i)}}return function(){return M.apply(G,arguments)}}},{"./_a-function":92}],102:[function(W,ee,L){ee.exports=function(B){if(B==null)throw TypeError("Can't call method on "+B);return B}},{}],103:[function(W,ee,L){ee.exports=!W("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(W,ee,L){var B=W("./_is-object"),M=W("./_global").document,G=B(M)&&B(M.createElement);ee.exports=function(X){return G?M.createElement(X):{}}},{"./_global":110,"./_is-object":119}],105:[function(W,ee,L){ee.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(W,ee,L){var B=W("./_object-keys"),M=W("./_object-gops"),G=W("./_object-pie");ee.exports=function(X){var K=B(X),N=M.f;if(N)for(var i=N(X),T=G.f,e=0,E;i.length>e;)T.call(X,E=i[e++])&&K.push(E);return K}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(W,ee,L){var B=W("./_global"),M=W("./_core"),G=W("./_ctx"),X=W("./_hide"),K=W("./_has"),N="prototype",i=function(T,e,E){var l=T&i.F,_=T&i.G,r=T&i.S,n=T&i.P,o=T&i.B,c=T&i.W,v=_?M:M[e]||(M[e]={}),f=v[N],y=_?B:r?B[e]:(B[e]||{})[N],h,b,m;_&&(E=e);for(h in E){if(b=!l&&y&&y[h]!==void 0,b&&K(v,h))continue;m=b?y[h]:E[h],v[h]=_&&typeof y[h]!="function"?E[h]:o&&b?G(m,B):c&&y[h]==m?function(d){var x=function(R,O,w){if(this instanceof d){switch(arguments.length){case 0:return new d;case 1:return new d(R);case 2:return new d(R,O)}return new d(R,O,w)}return d.apply(this,arguments)};return x[N]=d[N],x}(m):n&&typeof m=="function"?G(Function.call,m):m,n&&((v.virtual||(v.virtual={}))[h]=m,T&i.R&&f&&!f[h]&&X(f,h,m))}};i.F=1,i.G=2,i.S=4,i.P=8,i.B=16,i.W=32,i.U=64,i.R=128,ee.exports=i},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(W,ee,L){ee.exports=function(B){try{return!!B()}catch(M){return!0}}},{}],109:[function(W,ee,L){var B=W("./_ctx"),M=W("./_iter-call"),G=W("./_is-array-iter"),X=W("./_an-object"),K=W("./_to-length"),N=W("./core.get-iterator-method"),i={},T={},L=ee.exports=function(e,E,l,_,r){var n=r?function(){return e}:N(e),o=B(l,_,E?2:1),c=0,v,f,y,h;if(typeof n!="function")throw TypeError(e+" is not iterable!");if(G(n)){for(v=K(e.length);v>c;c++)if(h=E?o(X(f=e[c])[0],f[1]):o(e[c]),h===i||h===T)return h}else for(y=n.call(e);!(f=y.next()).done;)if(h=M(y,o,f.value,E),h===i||h===T)return h};L.BREAK=i,L.RETURN=T},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(W,ee,L){var B=ee.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=B)},{}],111:[function(W,ee,L){var B={}.hasOwnProperty;ee.exports=function(M,G){return B.call(M,G)}},{}],112:[function(W,ee,L){var B=W("./_object-dp"),M=W("./_property-desc");ee.exports=W("./_descriptors")?function(G,X,K){return B.f(G,X,M(1,K))}:function(G,X,K){return G[X]=K,G}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(W,ee,L){var B=W("./_global").document;ee.exports=B&&B.documentElement},{"./_global":110}],114:[function(W,ee,L){ee.exports=!W("./_descriptors")&&!W("./_fails")(function(){return Object.defineProperty(W("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(W,ee,L){ee.exports=function(B,M,G){var X=G===void 0;switch(M.length){case 0:return X?B():B.call(G);case 1:return X?B(M[0]):B.call(G,M[0]);case 2:return X?B(M[0],M[1]):B.call(G,M[0],M[1]);case 3:return X?B(M[0],M[1],M[2]):B.call(G,M[0],M[1],M[2]);case 4:return X?B(M[0],M[1],M[2],M[3]):B.call(G,M[0],M[1],M[2],M[3])}return B.apply(G,M)}},{}],116:[function(W,ee,L){var B=W("./_cof");ee.exports=Object("z").propertyIsEnumerable(0)?Object:function(M){return B(M)=="String"?M.split(""):Object(M)}},{"./_cof":98}],117:[function(W,ee,L){var B=W("./_iterators"),M=W("./_wks")("iterator"),G=Array.prototype;ee.exports=function(X){return X!==void 0&&(B.Array===X||G[M]===X)}},{"./_iterators":125,"./_wks":166}],118:[function(W,ee,L){var B=W("./_cof");ee.exports=Array.isArray||function(G){return B(G)=="Array"}},{"./_cof":98}],119:[function(W,ee,L){ee.exports=function(B){return typeof B=="object"?B!==null:typeof B=="function"}},{}],120:[function(W,ee,L){var B=W("./_an-object");ee.exports=function(M,G,X,K){try{return K?G(B(X)[0],X[1]):G(X)}catch(i){var N=M.return;throw N!==void 0&&B(N.call(M)),i}}},{"./_an-object":95}],121:[function(W,ee,L){"use strict";var B=W("./_object-create"),M=W("./_property-desc"),G=W("./_set-to-string-tag"),X={};W("./_hide")(X,W("./_wks")("iterator"),function(){return this}),ee.exports=function(K,N,i){K.prototype=B(X,{next:M(1,i)}),G(K,N+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(W,ee,L){"use strict";var B=W("./_library"),M=W("./_export"),G=W("./_redefine"),X=W("./_hide"),K=W("./_iterators"),N=W("./_iter-create"),i=W("./_set-to-string-tag"),T=W("./_object-gpo"),e=W("./_wks")("iterator"),E=!([].keys&&"next"in[].keys()),l="@@iterator",_="keys",r="values",n=function(){return this};ee.exports=function(o,c,v,f,y,h,b){N(v,c,f);var m=function(g){if(!E&&g in O)return O[g];switch(g){case _:return function(){return new v(this,g)};case r:return function(){return new v(this,g)}}return function(){return new v(this,g)}},d=c+" Iterator",x=y==r,R=!1,O=o.prototype,w=O[e]||O[l]||y&&O[y],D=w||m(y),A=y?x?m("entries"):D:void 0,P=c=="Array"&&O.entries||w,I,u,k;if(P&&(k=T(P.call(new o)),k!==Object.prototype&&k.next&&(i(k,d,!0),!B&&typeof k[e]!="function"&&X(k,e,n))),x&&w&&w.name!==r&&(R=!0,D=function(){return w.call(this)}),(!B||b)&&(E||R||!O[e])&&X(O,e,D),K[c]=D,K[d]=n,y)if(I={values:x?D:m(r),keys:h?D:m(_),entries:A},b)for(u in I)u in O||G(O,u,I[u]);else M(M.P+M.F*(E||R),c,I);return I}},{"./_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(W,ee,L){var B=W("./_wks")("iterator"),M=!1;try{var G=[7][B]();G.return=function(){M=!0},Array.from(G,function(){throw 2})}catch(X){}ee.exports=function(X,K){if(!K&&!M)return!1;var N=!1;try{var i=[7],T=i[B]();T.next=function(){return{done:N=!0}},i[B]=function(){return T},X(i)}catch(e){}return N}},{"./_wks":166}],124:[function(W,ee,L){ee.exports=function(B,M){return{value:M,done:!!B}}},{}],125:[function(W,ee,L){ee.exports={}},{}],126:[function(W,ee,L){ee.exports=!0},{}],127:[function(W,ee,L){var B=W("./_uid")("meta"),M=W("./_is-object"),G=W("./_has"),X=W("./_object-dp").f,K=0,N=Object.isExtensible||function(){return!0},i=!W("./_fails")(function(){return N(Object.preventExtensions({}))}),T=function(r){X(r,B,{value:{i:"O"+ ++K,w:{}}})},e=function(r,n){if(!M(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!G(r,B)){if(!N(r))return"F";if(!n)return"E";T(r)}return r[B].i},E=function(r,n){if(!G(r,B)){if(!N(r))return!0;if(!n)return!1;T(r)}return r[B].w},l=function(r){return i&&_.NEED&&N(r)&&!G(r,B)&&T(r),r},_=ee.exports={KEY:B,NEED:!1,fastKey:e,getWeak:E,onFreeze:l}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(W,ee,L){var B=W("./_global"),M=W("./_task").set,G=B.MutationObserver||B.WebKitMutationObserver,X=B.process,K=B.Promise,N=W("./_cof")(X)=="process";ee.exports=function(){var i,T,e,E=function(){var n,o;for(N&&(n=X.domain)&&n.exit();i;){o=i.fn,i=i.next;try{o()}catch(c){throw i?e():T=void 0,c}}T=void 0,n&&n.enter()};if(N)e=function(){X.nextTick(E)};else if(G&&!(B.navigator&&B.navigator.standalone)){var l=!0,_=document.createTextNode("");new G(E).observe(_,{characterData:!0}),e=function(){_.data=l=!l}}else if(K&&K.resolve){var r=K.resolve(void 0);e=function(){r.then(E)}}else e=function(){M.call(B,E)};return function(n){var o={fn:n,next:void 0};T&&(T.next=o),i||(i=o,e()),T=o}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(W,ee,L){"use strict";var B=W("./_a-function");function M(G){var X,K;this.promise=new G(function(N,i){if(X!==void 0||K!==void 0)throw TypeError("Bad Promise constructor");X=N,K=i}),this.resolve=B(X),this.reject=B(K)}ee.exports.f=function(G){return new M(G)}},{"./_a-function":92}],130:[function(W,ee,L){"use strict";var B=W("./_descriptors"),M=W("./_object-keys"),G=W("./_object-gops"),X=W("./_object-pie"),K=W("./_to-object"),N=W("./_iobject"),i=Object.assign;ee.exports=!i||W("./_fails")(function(){var T={},e={},E=Symbol(),l="abcdefghijklmnopqrst";return T[E]=7,l.split("").forEach(function(_){e[_]=_}),i({},T)[E]!=7||Object.keys(i({},e)).join("")!=l})?function(e,E){for(var l=K(e),_=arguments.length,r=1,n=G.f,o=X.f;_>r;)for(var c=N(arguments[r++]),v=n?M(c).concat(n(c)):M(c),f=v.length,y=0,h;f>y;)h=v[y++],(!B||o.call(c,h))&&(l[h]=c[h]);return l}:i},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(W,ee,L){var B=W("./_an-object"),M=W("./_object-dps"),G=W("./_enum-bug-keys"),X=W("./_shared-key")("IE_PROTO"),K=function(){},N="prototype",i=function(){var T=W("./_dom-create")("iframe"),e=G.length,E="<",l=">",_;for(T.style.display="none",W("./_html").appendChild(T),T.src="javascript:",_=T.contentWindow.document,_.open(),_.write(E+"script"+l+"document.F=Object"+E+"/script"+l),_.close(),i=_.F;e--;)delete i[N][G[e]];return i()};ee.exports=Object.create||function(e,E){var l;return e!==null?(K[N]=B(e),l=new K,K[N]=null,l[X]=e):l=i(),E===void 0?l:M(l,E)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(W,ee,L){var B=W("./_an-object"),M=W("./_ie8-dom-define"),G=W("./_to-primitive"),X=Object.defineProperty;L.f=W("./_descriptors")?Object.defineProperty:function(N,i,T){if(B(N),i=G(i,!0),B(T),M)try{return X(N,i,T)}catch(e){}if("get"in T||"set"in T)throw TypeError("Accessors not supported!");return"value"in T&&(N[i]=T.value),N}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(W,ee,L){var B=W("./_object-dp"),M=W("./_an-object"),G=W("./_object-keys");ee.exports=W("./_descriptors")?Object.defineProperties:function(K,N){M(K);for(var i=G(N),T=i.length,e=0,E;T>e;)B.f(K,E=i[e++],N[E]);return K}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(W,ee,L){var B=W("./_object-pie"),M=W("./_property-desc"),G=W("./_to-iobject"),X=W("./_to-primitive"),K=W("./_has"),N=W("./_ie8-dom-define"),i=Object.getOwnPropertyDescriptor;L.f=W("./_descriptors")?i:function(e,E){if(e=G(e),E=X(E,!0),N)try{return i(e,E)}catch(l){}if(K(e,E))return M(!B.f.call(e,E),e[E])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(W,ee,L){var B=W("./_to-iobject"),M=W("./_object-gopn").f,G={}.toString,X=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],K=function(N){try{return M(N)}catch(i){return X.slice()}};ee.exports.f=function(i){return X&&G.call(i)=="[object Window]"?K(i):M(B(i))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(W,ee,L){var B=W("./_object-keys-internal"),M=W("./_enum-bug-keys").concat("length","prototype");L.f=Object.getOwnPropertyNames||function(X){return B(X,M)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(W,ee,L){L.f=Object.getOwnPropertySymbols},{}],138:[function(W,ee,L){var B=W("./_has"),M=W("./_to-object"),G=W("./_shared-key")("IE_PROTO"),X=Object.prototype;ee.exports=Object.getPrototypeOf||function(K){return K=M(K),B(K,G)?K[G]:typeof K.constructor=="function"&&K instanceof K.constructor?K.constructor.prototype:K instanceof Object?X:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(W,ee,L){var B=W("./_has"),M=W("./_to-iobject"),G=W("./_array-includes")(!1),X=W("./_shared-key")("IE_PROTO");ee.exports=function(K,N){var i=M(K),T=0,e=[],E;for(E in i)E!=X&&(B(i,E)&&e.push(E));for(;N.length>T;)B(i,E=N[T++])&&(~G(e,E)||e.push(E));return e}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(W,ee,L){var B=W("./_object-keys-internal"),M=W("./_enum-bug-keys");ee.exports=Object.keys||function(X){return B(X,M)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(W,ee,L){L.f={}.propertyIsEnumerable},{}],142:[function(W,ee,L){var B=W("./_export"),M=W("./_core"),G=W("./_fails");ee.exports=function(X,K){var N=(M.Object||{})[X]||Object[X],i={};i[X]=K(N),B(B.S+B.F*G(function(){N(1)}),"Object",i)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(W,ee,L){var B=W("./_descriptors"),M=W("./_object-keys"),G=W("./_to-iobject"),X=W("./_object-pie").f;ee.exports=function(K){return function(N){for(var i=G(N),T=M(i),e=T.length,E=0,l=[],_;e>E;)_=T[E++],(!B||X.call(i,_))&&l.push(K?[_,i[_]]:i[_]);return l}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(W,ee,L){ee.exports=function(B){try{return{e:!1,v:B()}}catch(M){return{e:!0,v:M}}}},{}],145:[function(W,ee,L){var B=W("./_an-object"),M=W("./_is-object"),G=W("./_new-promise-capability");ee.exports=function(X,K){if(B(X),M(K)&&K.constructor===X)return K;var N=G.f(X),i=N.resolve;return i(K),N.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(W,ee,L){ee.exports=function(B,M){return{enumerable:!(B&1),configurable:!(B&2),writable:!(B&4),value:M}}},{}],147:[function(W,ee,L){var B=W("./_hide");ee.exports=function(M,G,X){for(var K in G)X&&M[K]?M[K]=G[K]:B(M,K,G[K]);return M}},{"./_hide":112}],148:[function(W,ee,L){ee.exports=W("./_hide")},{"./_hide":112}],149:[function(W,ee,L){"use strict";var B=W("./_global"),M=W("./_core"),G=W("./_object-dp"),X=W("./_descriptors"),K=W("./_wks")("species");ee.exports=function(N){var i=typeof M[N]=="function"?M[N]:B[N];X&&i&&!i[K]&&G.f(i,K,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(W,ee,L){var B=W("./_object-dp").f,M=W("./_has"),G=W("./_wks")("toStringTag");ee.exports=function(X,K,N){X&&!M(X=N?X:X.prototype,G)&&B(X,G,{configurable:!0,value:K})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(W,ee,L){var B=W("./_shared")("keys"),M=W("./_uid");ee.exports=function(G){return B[G]||(B[G]=M(G))}},{"./_shared":152,"./_uid":162}],152:[function(W,ee,L){var B=W("./_core"),M=W("./_global"),G="__core-js_shared__",X=M[G]||(M[G]={});(ee.exports=function(K,N){return X[K]||(X[K]=N!==void 0?N:{})})("versions",[]).push({version:B.version,mode:W("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(W,ee,L){var B=W("./_an-object"),M=W("./_a-function"),G=W("./_wks")("species");ee.exports=function(X,K){var N=B(X).constructor,i;return N===void 0||(i=B(N)[G])==null?K:M(i)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(W,ee,L){var B=W("./_to-integer"),M=W("./_defined");ee.exports=function(G){return function(X,K){var N=String(M(X)),i=B(K),T=N.length,e,E;return i<0||i>=T?G?"":void 0:(e=N.charCodeAt(i),e<55296||e>56319||i+1===T||(E=N.charCodeAt(i+1))<56320||E>57343?G?N.charAt(i):e:G?N.slice(i,i+2):(e-55296<<10)+(E-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(W,ee,L){var B=W("./_ctx"),M=W("./_invoke"),G=W("./_html"),X=W("./_dom-create"),K=W("./_global"),N=K.process,i=K.setImmediate,T=K.clearImmediate,e=K.MessageChannel,E=K.Dispatch,l=0,_={},r="onreadystatechange",n,o,c,v=function(){var y=+this;if(_.hasOwnProperty(y)){var h=_[y];delete _[y],h()}},f=function(y){v.call(y.data)};(!i||!T)&&(i=function(h){for(var b=[],m=1;arguments.length>m;)b.push(arguments[m++]);return _[++l]=function(){M(typeof h=="function"?h:Function(h),b)},n(l),l},T=function(h){delete _[h]},W("./_cof")(N)=="process"?n=function(y){N.nextTick(B(v,y,1))}:E&&E.now?n=function(y){E.now(B(v,y,1))}:e?(o=new e,c=o.port2,o.port1.onmessage=f,n=B(c.postMessage,c,1)):K.addEventListener&&typeof postMessage=="function"&&!K.importScripts?(n=function(y){K.postMessage(y+"","*")},K.addEventListener("message",f,!1)):r in X("script")?n=function(y){G.appendChild(X("script"))[r]=function(){G.removeChild(this),v.call(y)}}:n=function(y){setTimeout(B(v,y,1),0)}),ee.exports={set:i,clear:T}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(W,ee,L){var B=W("./_to-integer"),M=Math.max,G=Math.min;ee.exports=function(X,K){return X=B(X),X<0?M(X+K,0):G(X,K)}},{"./_to-integer":157}],157:[function(W,ee,L){var B=Math.ceil,M=Math.floor;ee.exports=function(G){return isNaN(G=+G)?0:(G>0?M:B)(G)}},{}],158:[function(W,ee,L){var B=W("./_iobject"),M=W("./_defined");ee.exports=function(G){return B(M(G))}},{"./_defined":102,"./_iobject":116}],159:[function(W,ee,L){var B=W("./_to-integer"),M=Math.min;ee.exports=function(G){return G>0?M(B(G),9007199254740991):0}},{"./_to-integer":157}],160:[function(W,ee,L){var B=W("./_defined");ee.exports=function(M){return Object(B(M))}},{"./_defined":102}],161:[function(W,ee,L){var B=W("./_is-object");ee.exports=function(M,G){if(!B(M))return M;var X,K;if(G&&typeof(X=M.toString)=="function"&&!B(K=X.call(M)))return K;if(typeof(X=M.valueOf)=="function"&&!B(K=X.call(M)))return K;if(!G&&typeof(X=M.toString)=="function"&&!B(K=X.call(M)))return K;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(W,ee,L){var B=0,M=Math.random();ee.exports=function(G){return"Symbol(".concat(G===void 0?"":G,")_",(++B+M).toString(36))}},{}],163:[function(W,ee,L){var B=W("./_global"),M=B.navigator;ee.exports=M&&M.userAgent||""},{"./_global":110}],164:[function(W,ee,L){var B=W("./_global"),M=W("./_core"),G=W("./_library"),X=W("./_wks-ext"),K=W("./_object-dp").f;ee.exports=function(N){var i=M.Symbol||(M.Symbol=G?{}:B.Symbol||{});N.charAt(0)!="_"&&!(N in i)&&K(i,N,{value:X.f(N)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(W,ee,L){L.f=W("./_wks")},{"./_wks":166}],166:[function(W,ee,L){var B=W("./_shared")("wks"),M=W("./_uid"),G=W("./_global").Symbol,X=typeof G=="function",K=ee.exports=function(N){return B[N]||(B[N]=X&&G[N]||(X?G:M)("Symbol."+N))};K.store=B},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(W,ee,L){var B=W("./_classof"),M=W("./_wks")("iterator"),G=W("./_iterators");ee.exports=W("./_core").getIteratorMethod=function(X){if(X!=null)return X[M]||X["@@iterator"]||G[B(X)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(W,ee,L){"use strict";var B=W("./_ctx"),M=W("./_export"),G=W("./_to-object"),X=W("./_iter-call"),K=W("./_is-array-iter"),N=W("./_to-length"),i=W("./_create-property"),T=W("./core.get-iterator-method");M(M.S+M.F*!W("./_iter-detect")(function(e){Array.from(e)}),"Array",{from:function(E){var l=G(E),_=typeof this=="function"?this:Array,r=arguments.length,n=r>1?arguments[1]:void 0,o=n!==void 0,c=0,v=T(l),f,y,h,b;if(o&&(n=B(n,r>2?arguments[2]:void 0,2)),v!=null&&!(_==Array&&K(v)))for(b=v.call(l),y=new _;!(h=b.next()).done;c++)i(y,c,o?X(b,n,[h.value,c],!0):h.value);else for(f=N(l.length),y=new _(f);f>c;c++)i(y,c,o?n(l[c],c):l[c]);return y.length=c,y}})},{"./_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(W,ee,L){"use strict";var B=W("./_add-to-unscopables"),M=W("./_iter-step"),G=W("./_iterators"),X=W("./_to-iobject");ee.exports=W("./_iter-define")(Array,"Array",function(K,N){this._t=X(K),this._i=0,this._k=N},function(){var K=this._t,N=this._k,i=this._i++;return!K||i>=K.length?(this._t=void 0,M(1)):N=="keys"?M(0,i):N=="values"?M(0,K[i]):M(0,[i,K[i]])},"values"),G.Arguments=G.Array,B("keys"),B("values"),B("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(W,ee,L){"use strict";var B=W("./_is-object"),M=W("./_object-gpo"),G=W("./_wks")("hasInstance"),X=Function.prototype;G in X||W("./_object-dp").f(X,G,{value:function(K){if(typeof this!="function"||!B(K))return!1;if(!B(this.prototype))return K instanceof this;for(;K=M(K);)if(this.prototype===K)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(W,ee,L){var B=W("./_export");B(B.S+B.F,"Object",{assign:W("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(W,ee,L){var B=W("./_export");B(B.S,"Object",{create:W("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(W,ee,L){var B=W("./_export");B(B.S+B.F*!W("./_descriptors"),"Object",{defineProperty:W("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(W,ee,L){W("./_object-sap")("getOwnPropertyNames",function(){return W("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(W,ee,L){var B=W("./_to-object"),M=W("./_object-gpo");W("./_object-sap")("getPrototypeOf",function(){return function(X){return M(B(X))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(W,ee,L){var B=W("./_to-object"),M=W("./_object-keys");W("./_object-sap")("keys",function(){return function(X){return M(B(X))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(W,ee,L){arguments[4][71][0].apply(L,arguments)},{dup:71}],178:[function(W,ee,L){"use strict";var B=W("./_library"),M=W("./_global"),G=W("./_ctx"),X=W("./_classof"),K=W("./_export"),N=W("./_is-object"),i=W("./_a-function"),T=W("./_an-instance"),e=W("./_for-of"),E=W("./_species-constructor"),l=W("./_task").set,_=W("./_microtask")(),r=W("./_new-promise-capability"),n=W("./_perform"),o=W("./_user-agent"),c=W("./_promise-resolve"),v="Promise",f=M.TypeError,y=M.process,h=y&&y.versions,b=h&&h.v8||"",m=M[v],d=X(y)=="process",x=function(){},R,O,w,D,A=O=r.f,P=!!function(){try{var p=m.resolve(1),U=(p.constructor={})[W("./_wks")("species")]=function(z){z(x,x)};return(d||typeof PromiseRejectionEvent=="function")&&p.then(x)instanceof U&&b.indexOf("6.6")!==0&&o.indexOf("Chrome/66")===-1}catch(z){}}(),I=function(p){var U;return N(p)&&typeof(U=p.then)=="function"?U:!1},u=function(p,U){if(p._n)return;p._n=!0;var z=p._c;_(function(){for(var q=p._v,$=p._s==1,re=0,ce=function(ne){var me=$?ne.ok:ne.fail,be=ne.resolve,he=ne.reject,se=ne.domain,_e,De,ge;try{me?($||(p._h==2&&a(p),p._h=1),me===!0?_e=q:(se&&se.enter(),_e=me(q),se&&(se.exit(),ge=!0)),_e===ne.promise?he(f("Promise-chain cycle")):(De=I(_e))?De.call(_e,be,he):be(_e)):he(q)}catch(fe){se&&!ge&&se.exit(),he(fe)}};z.length>re;)ce(z[re++]);p._c=[],p._n=!1,U&&!p._h&&k(p)})},k=function(p){l.call(M,function(){var U=p._v,z=g(p),q,$,re;if(z&&(q=n(function(){d?y.emit("unhandledRejection",U,p):($=M.onunhandledrejection)?$({promise:p,reason:U}):(re=M.console)&&re.error&&re.error("Unhandled promise rejection",U)}),p._h=d||g(p)?2:1),p._a=void 0,z&&q.e)throw q.v})},g=function(p){return p._h!==1&&(p._a||p._c).length===0},a=function(p){l.call(M,function(){var U;d?y.emit("rejectionHandled",p):(U=M.onrejectionhandled)&&U({promise:p,reason:p._v})})},C=function(p){var U=this;if(U._d)return;U._d=!0,U=U._w||U,U._v=p,U._s=2,U._a||(U._a=U._c.slice()),u(U,!0)},S=function(p){var U=this,z;if(U._d)return;U._d=!0,U=U._w||U;try{if(U===p)throw f("Promise can't be resolved itself");(z=I(p))?_(function(){var q={_w:U,_d:!1};try{z.call(p,G(S,q,1),G(C,q,1))}catch($){C.call(q,$)}}):(U._v=p,U._s=1,u(U,!1))}catch(q){C.call({_w:U,_d:!1},q)}};P||(m=function(U){T(this,m,v,"_h"),i(U),R.call(this);try{U(G(S,this,1),G(C,this,1))}catch(z){C.call(this,z)}},R=function(U){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},R.prototype=W("./_redefine-all")(m.prototype,{then:function(U,z){var q=A(E(this,m));return q.ok=typeof U=="function"?U:!0,q.fail=typeof z=="function"&&z,q.domain=d?y.domain:void 0,this._c.push(q),this._a&&this._a.push(q),this._s&&u(this,!1),q.promise},catch:function(p){return this.then(void 0,p)}}),w=function(){var p=new R;this.promise=p,this.resolve=G(S,p,1),this.reject=G(C,p,1)},r.f=A=function(p){return p===m||p===D?new w(p):O(p)}),K(K.G+K.W+K.F*!P,{Promise:m}),W("./_set-to-string-tag")(m,v),W("./_set-species")(v),D=W("./_core")[v],K(K.S+K.F*!P,v,{reject:function(U){var z=A(this),q=z.reject;return q(U),z.promise}}),K(K.S+K.F*(B||!P),v,{resolve:function(U){return c(B&&this===D?m:this,U)}}),K(K.S+K.F*!(P&&W("./_iter-detect")(function(p){m.all(p).catch(x)})),v,{all:function(U){var z=this,q=A(z),$=q.resolve,re=q.reject,ce=n(function(){var ne=[],me=0,be=1;e(U,!1,function(he){var se=me++,_e=!1;ne.push(void 0),be++,z.resolve(he).then(function(De){if(_e)return;_e=!0,ne[se]=De,--be||$(ne)},re)}),--be||$(ne)});return ce.e&&re(ce.v),q.promise},race:function(U){var z=this,q=A(z),$=q.reject,re=n(function(){e(U,!1,function(ce){z.resolve(ce).then(q.resolve,$)})});return re.e&&$(re.v),q.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(W,ee,L){var B=W("./_export"),M=W("./_to-absolute-index"),G=String.fromCharCode,X=String.fromCodePoint;B(B.S+B.F*(!!X&&X.length!=1),"String",{fromCodePoint:function(N){for(var i=[],T=arguments.length,e=0,E;T>e;){if(E=+arguments[e++],M(E,1114111)!==E)throw RangeError(E+" is not a valid code point");i.push(E<65536?G(E):G(((E-=65536)>>10)+55296,E%1024+56320))}return i.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(W,ee,L){"use strict";var B=W("./_string-at")(!0);W("./_iter-define")(String,"String",function(M){this._t=String(M),this._i=0},function(){var M=this._t,G=this._i,X;return G>=M.length?{value:void 0,done:!0}:(X=B(M,G),this._i+=X.length,{value:X,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(W,ee,L){"use strict";var B=W("./_global"),M=W("./_has"),G=W("./_descriptors"),X=W("./_export"),K=W("./_redefine"),N=W("./_meta").KEY,i=W("./_fails"),T=W("./_shared"),e=W("./_set-to-string-tag"),E=W("./_uid"),l=W("./_wks"),_=W("./_wks-ext"),r=W("./_wks-define"),n=W("./_enum-keys"),o=W("./_is-array"),c=W("./_an-object"),v=W("./_is-object"),f=W("./_to-object"),y=W("./_to-iobject"),h=W("./_to-primitive"),b=W("./_property-desc"),m=W("./_object-create"),d=W("./_object-gopn-ext"),x=W("./_object-gopd"),R=W("./_object-gops"),O=W("./_object-dp"),w=W("./_object-keys"),D=x.f,A=O.f,P=d.f,I=B.Symbol,u=B.JSON,k=u&&u.stringify,g="prototype",a=l("_hidden"),C=l("toPrimitive"),S={}.propertyIsEnumerable,p=T("symbol-registry"),U=T("symbols"),z=T("op-symbols"),q=Object[g],$=typeof I=="function"&&!!R.f,re=B.QObject,ce=!re||!re[g]||!re[g].findChild,ne=G&&i(function(){return m(A({},"a",{get:function(){return A(this,"a",{value:7}).a}})).a!=7})?function(le,ye,Te){var Pe=D(q,ye);Pe&&delete q[ye],A(le,ye,Te),Pe&&le!==q&&A(q,ye,Pe)}:A,me=function(le){var ye=U[le]=m(I[g]);return ye._k=le,ye},be=$&&typeof I.iterator=="symbol"?function(le){return typeof le=="symbol"}:function(le){return le instanceof I},he=function(ye,Te,Pe){return ye===q&&he(z,Te,Pe),c(ye),Te=h(Te,!0),c(Pe),M(U,Te)?(Pe.enumerable?(M(ye,a)&&ye[a][Te]&&(ye[a][Te]=!1),Pe=m(Pe,{enumerable:b(0,!1)})):(M(ye,a)||A(ye,a,b(1,{})),ye[a][Te]=!0),ne(ye,Te,Pe)):A(ye,Te,Pe)},se=function(ye,Te){c(ye);for(var Pe=n(Te=y(Te)),He=0,Oe=Pe.length,Ue;Oe>He;)he(ye,Ue=Pe[He++],Te[Ue]);return ye},_e=function(ye,Te){return Te===void 0?m(ye):se(m(ye),Te)},De=function(ye){var Te=S.call(this,ye=h(ye,!0));return this===q&&M(U,ye)&&!M(z,ye)?!1:Te||!M(this,ye)||!M(U,ye)||M(this,a)&&this[a][ye]?Te:!0},ge=function(ye,Te){if(ye=y(ye),Te=h(Te,!0),ye===q&&M(U,Te)&&!M(z,Te))return;var Pe=D(ye,Te);return Pe&&M(U,Te)&&!(M(ye,a)&&ye[a][Te])&&(Pe.enumerable=!0),Pe},fe=function(ye){for(var Te=P(y(ye)),Pe=[],He=0,Oe;Te.length>He;)!M(U,Oe=Te[He++])&&Oe!=a&&Oe!=N&&Pe.push(Oe);return Pe},Ce=function(ye){for(var Te=ye===q,Pe=P(Te?z:y(ye)),He=[],Oe=0,Ue;Pe.length>Oe;)M(U,Ue=Pe[Oe++])&&(Te?M(q,Ue):!0)&&He.push(U[Ue]);return He};$||(I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var ye=E(arguments.length>0?arguments[0]:void 0),Te=function(Pe){this===q&&Te.call(z,Pe),M(this,a)&&M(this[a],ye)&&(this[a][ye]=!1),ne(this,ye,b(1,Pe))};return G&&ce&&ne(q,ye,{configurable:!0,set:Te}),me(ye)},K(I[g],"toString",function(){return this._k}),x.f=ge,O.f=he,W("./_object-gopn").f=d.f=fe,W("./_object-pie").f=De,R.f=Ce,G&&!W("./_library")&&K(q,"propertyIsEnumerable",De,!0),_.f=function(le){return me(l(le))}),X(X.G+X.W+X.F*!$,{Symbol:I});for(var ae="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Q=0;ae.length>Q;)l(ae[Q++]);for(var J=w(l.store),Z=0;J.length>Z;)r(J[Z++]);X(X.S+X.F*!$,"Symbol",{for:function(le){return M(p,le+="")?p[le]:p[le]=I(le)},keyFor:function(ye){if(!be(ye))throw TypeError(ye+" is not a symbol!");for(var Te in p)if(p[Te]===ye)return Te},useSetter:function(){ce=!0},useSimple:function(){ce=!1}}),X(X.S+X.F*!$,"Object",{create:_e,defineProperty:he,defineProperties:se,getOwnPropertyDescriptor:ge,getOwnPropertyNames:fe,getOwnPropertySymbols:Ce});var pe=i(function(){R.f(1)});X(X.S+X.F*pe,"Object",{getOwnPropertySymbols:function(ye){return R.f(f(ye))}}),u&&X(X.S+X.F*(!$||i(function(){var le=I();return k([le])!="[null]"||k({a:le})!="{}"||k(Object(le))!="{}"})),"JSON",{stringify:function(ye){for(var Te=[ye],Pe=1,He,Oe;arguments.length>Pe;)Te.push(arguments[Pe++]);return Oe=He=Te[1],!v(He)&&ye===void 0||be(ye)?void 0:(o(He)||(He=function(Ue,je){if(typeof Oe=="function"&&(je=Oe.call(this,Ue,je)),!be(je))return je}),Te[1]=He,k.apply(u,Te))}}),I[g][C]||W("./_hide")(I[g],C,I[g].valueOf),e(I,"Symbol"),e(Math,"Math",!0),e(B.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(W,ee,L){var B=W("./_export"),M=W("./_object-to-array")(!0);B(B.S,"Object",{entries:function(X){return M(X)}})},{"./_export":107,"./_object-to-array":143}],183:[function(W,ee,L){"use strict";var B=W("./_export"),M=W("./_core"),G=W("./_global"),X=W("./_species-constructor"),K=W("./_promise-resolve");B(B.P+B.R,"Promise",{finally:function(N){var i=X(this,M.Promise||G.Promise),T=typeof N=="function";return this.then(T?function(e){return K(i,N()).then(function(){return e})}:N,T?function(e){return K(i,N()).then(function(){throw e})}:N)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(W,ee,L){"use strict";var B=W("./_export"),M=W("./_new-promise-capability"),G=W("./_perform");B(B.S,"Promise",{try:function(X){var K=M.f(this),N=G(X);return(N.e?K.reject:K.resolve)(N.v),K.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(W,ee,L){W("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(W,ee,L){W("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(W,ee,L){W("./es6.array.iterator");for(var B=W("./_global"),M=W("./_hide"),G=W("./_iterators"),X=W("./_wks")("toStringTag"),K="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(","),N=0;N<K.length;N++){var i=K[N],T=B[i],e=T&&T.prototype;e&&!e[X]&&M(e,X,i),G[i]=G.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(W,ee,L){var B=W("./_export"),M=W("./_task");B(B.G+B.B,{setImmediate:M.set,clearImmediate:M.clear})},{"./_export":107,"./_task":155}],189:[function(W,ee,L){(function(B){"use strict";var M=W("babel-runtime/helpers/typeof"),G=X(M);function X(h){return h&&h.__esModule?h:{default:h}}function K(h){return Array.isArray?Array.isArray(h):y(h)==="[object Array]"}L.isArray=K;function N(h){return typeof h=="boolean"}L.isBoolean=N;function i(h){return h===null}L.isNull=i;function T(h){return h==null}L.isNullOrUndefined=T;function e(h){return typeof h=="number"}L.isNumber=e;function E(h){return typeof h=="string"}L.isString=E;function l(h){return(typeof h=="undefined"?"undefined":(0,G.default)(h))==="symbol"}L.isSymbol=l;function _(h){return h===void 0}L.isUndefined=_;function r(h){return y(h)==="[object RegExp]"}L.isRegExp=r;function n(h){return(typeof h=="undefined"?"undefined":(0,G.default)(h))==="object"&&h!==null}L.isObject=n;function o(h){return y(h)==="[object Date]"}L.isDate=o;function c(h){return y(h)==="[object Error]"||h instanceof Error}L.isError=c;function v(h){return typeof h=="function"}L.isFunction=v;function f(h){return h===null||typeof h=="boolean"||typeof h=="number"||typeof h=="string"||(typeof h=="undefined"?"undefined":(0,G.default)(h))==="symbol"||typeof h=="undefined"}L.isPrimitive=f,L.isBuffer=B.isBuffer;function y(h){return Object.prototype.toString.call(h)}}).call(this,{isBuffer:W("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(W,ee,L){"use strict";var B=W("babel-runtime/helpers/typeof"),M=G(B);function G(X){return X&&X.__esModule?X:{default:X}}(function(X){"use strict";var K=function(){var E=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,l=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,_=/[^-+\dA-Z]/g;return function(r,n,o,c){if(arguments.length===1&&e(r)==="string"&&!/\d/.test(r)&&(n=r,r=void 0),r=r||new Date,r instanceof Date||(r=new Date(r)),isNaN(r))throw TypeError("Invalid date");n=String(K.masks[n]||n||K.masks.default);var v=n.slice(0,4);(v==="UTC:"||v==="GMT:")&&(n=n.slice(4),o=!0,v==="GMT:"&&(c=!0));var f=o?"getUTC":"get",y=r[f+"Date"](),h=r[f+"Day"](),b=r[f+"Month"](),m=r[f+"FullYear"](),d=r[f+"Hours"](),x=r[f+"Minutes"](),R=r[f+"Seconds"](),O=r[f+"Milliseconds"](),w=o?0:r.getTimezoneOffset(),D=i(r),A=T(r),P={d:y,dd:N(y),ddd:K.i18n.dayNames[h],dddd:K.i18n.dayNames[h+7],m:b+1,mm:N(b+1),mmm:K.i18n.monthNames[b],mmmm:K.i18n.monthNames[b+12],yy:String(m).slice(2),yyyy:m,h:d%12||12,hh:N(d%12||12),H:d,HH:N(d),M:x,MM:N(x),s:R,ss:N(R),l:N(O,3),L:N(Math.round(O/10)),t:d<12?"a":"p",tt:d<12?"am":"pm",T:d<12?"A":"P",TT:d<12?"AM":"PM",Z:c?"GMT":o?"UTC":(String(r).match(l)||[""]).pop().replace(_,""),o:(w>0?"-":"+")+N(Math.floor(Math.abs(w)/60)*100+Math.abs(w)%60,4),S:["th","st","nd","rd"][y%10>3?0:(y%100-y%10!=10)*y%10],W:D,N:A};return n.replace(E,function(I){return I in P?P[I]:I.slice(1,I.length-1)})}}();K.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"},K.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 N(E,l){for(E=String(E),l=l||2;E.length<l;)E="0"+E;return E}function i(E){var l=new Date(E.getFullYear(),E.getMonth(),E.getDate());l.setDate(l.getDate()-(l.getDay()+6)%7+3);var _=new Date(l.getFullYear(),0,4);_.setDate(_.getDate()-(_.getDay()+6)%7+3);var r=l.getTimezoneOffset()-_.getTimezoneOffset();l.setHours(l.getHours()-r);var n=(l-_)/(864e5*7);return 1+Math.floor(n)}function T(E){var l=E.getDay();return l===0&&(l=7),l}function e(E){return E===null?"null":E===void 0?"undefined":(typeof E=="undefined"?"undefined":(0,M.default)(E))!=="object"?typeof E=="undefined"?"undefined":(0,M.default)(E):Array.isArray(E)?"array":{}.toString.call(E).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return K}):(typeof L=="undefined"?"undefined":(0,M.default)(L))==="object"?ee.exports=K:X.dateFormat=K})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(W,ee,L){/*!
|
|
|
* escape-html
|
|
|
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
|
* Copyright(c) 2015 Andreas Lubbe
|
|
|
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var B=/["'&<>]/;ee.exports=M;function M(G){var X=""+G,K=B.exec(X);if(!K)return X;var N,i="",T=0,e=0;for(T=K.index;T<X.length;T++){switch(X.charCodeAt(T)){case 34:N=""";break;case 38:N="&";break;case 39:N="'";break;case 60:N="<";break;case 62:N=">";break;default:continue}e!==T&&(i+=X.substring(e,T)),e=T+1,i+=N}return e!==T?i+X.substring(e,T):i}},{}],192:[function(W,ee,L){function B(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}ee.exports=B,B.EventEmitter=B,B.prototype._events=void 0,B.prototype._maxListeners=void 0,B.defaultMaxListeners=10,B.prototype.setMaxListeners=function(N){if(!G(N)||N<0||isNaN(N))throw TypeError("n must be a positive number");return this._maxListeners=N,this},B.prototype.emit=function(N){var i,T,e,E,l,_;if(this._events||(this._events={}),N==="error"&&(!this._events.error||X(this._events.error)&&!this._events.error.length)){if(i=arguments[1],i instanceof Error)throw i;var r=new Error('Uncaught, unspecified "error" event. ('+i+")");throw r.context=i,r}if(T=this._events[N],K(T))return!1;if(M(T))switch(arguments.length){case 1:T.call(this);break;case 2:T.call(this,arguments[1]);break;case 3:T.call(this,arguments[1],arguments[2]);break;default:E=Array.prototype.slice.call(arguments,1),T.apply(this,E)}else if(X(T))for(E=Array.prototype.slice.call(arguments,1),_=T.slice(),e=_.length,l=0;l<e;l++)_[l].apply(this,E);return!0},B.prototype.addListener=function(N,i){var T;if(!M(i))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",N,M(i.listener)?i.listener:i),this._events[N]?X(this._events[N])?this._events[N].push(i):this._events[N]=[this._events[N],i]:this._events[N]=i,X(this._events[N])&&!this._events[N].warned&&(K(this._maxListeners)?T=B.defaultMaxListeners:T=this._maxListeners,T&&T>0&&this._events[N].length>T&&(this._events[N].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[N].length),typeof console.trace=="function"&&console.trace())),this},B.prototype.on=B.prototype.addListener,B.prototype.once=function(N,i){if(!M(i))throw TypeError("listener must be a function");var T=!1;function e(){this.removeListener(N,e),T||(T=!0,i.apply(this,arguments))}return e.listener=i,this.on(N,e),this},B.prototype.removeListener=function(N,i){var T,e,E,l;if(!M(i))throw TypeError("listener must be a function");if(!this._events||!this._events[N])return this;if(T=this._events[N],E=T.length,e=-1,T===i||M(T.listener)&&T.listener===i)delete this._events[N],this._events.removeListener&&this.emit("removeListener",N,i);else if(X(T)){for(l=E;l-- >0;)if(T[l]===i||T[l].listener&&T[l].listener===i){e=l;break}if(e<0)return this;T.length===1?(T.length=0,delete this._events[N]):T.splice(e,1),this._events.removeListener&&this.emit("removeListener",N,i)}return this},B.prototype.removeAllListeners=function(N){var i,T;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[N]&&delete this._events[N],this;if(arguments.length===0){for(i in this._events){if(i==="removeListener")continue;this.removeAllListeners(i)}return this.removeAllListeners("removeListener"),this._events={},this}if(T=this._events[N],M(T))this.removeListener(N,T);else if(T)for(;T.length;)this.removeListener(N,T[T.length-1]);return delete this._events[N],this},B.prototype.listeners=function(N){var i;return!this._events||!this._events[N]?i=[]:M(this._events[N])?i=[this._events[N]]:i=this._events[N].slice(),i},B.prototype.listenerCount=function(N){if(this._events){var i=this._events[N];if(M(i))return 1;if(i)return i.length}return 0},B.listenerCount=function(N,i){return N.listenerCount(i)};function M(N){return typeof N=="function"}function G(N){return typeof N=="number"}function X(N){return typeof N=="object"&&N!==null}function K(N){return N===void 0}},{}],193:[function(W,ee,L){var B=W("http"),M=ee.exports;for(var G in B)B.hasOwnProperty(G)&&(M[G]=B[G]);M.request=function(X,K){return X||(X={}),X.scheme="https",X.protocol="https:",B.request.call(this,X,K)}},{http:231}],194:[function(W,ee,L){/*!
|
|
|
* humanize-ms - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var B=W("util"),M=W("ms");ee.exports=function(G){if(typeof G=="number")return G;var X=M(G);if(X===void 0){var K=new Error(B.format("humanize-ms(%j) result undefined",G));console.warn(K.stack)}return X}},{ms:204,util:243}],195:[function(W,ee,L){L.read=function(B,M,G,X,K){var N,i,T=K*8-X-1,e=(1<<T)-1,E=e>>1,l=-7,_=G?K-1:0,r=G?-1:1,n=B[M+_];for(_+=r,N=n&(1<<-l)-1,n>>=-l,l+=T;l>0;N=N*256+B[M+_],_+=r,l-=8);for(i=N&(1<<-l)-1,N>>=-l,l+=X;l>0;i=i*256+B[M+_],_+=r,l-=8);if(N===0)N=1-E;else{if(N===e)return i?NaN:(n?-1:1)*Infinity;i=i+Math.pow(2,X),N=N-E}return(n?-1:1)*i*Math.pow(2,N-X)},L.write=function(B,M,G,X,K,N){var i,T,e,E=N*8-K-1,l=(1<<E)-1,_=l>>1,r=K===23?Math.pow(2,-24)-Math.pow(2,-77):0,n=X?0:N-1,o=X?1:-1,c=M<0||M===0&&1/M<0?1:0;for(M=Math.abs(M),isNaN(M)||M===Infinity?(T=isNaN(M)?1:0,i=l):(i=Math.floor(Math.log(M)/Math.LN2),M*(e=Math.pow(2,-i))<1&&(i--,e*=2),i+_>=1?M+=r/e:M+=r*Math.pow(2,1-_),M*e>=2&&(i++,e/=2),i+_>=l?(T=0,i=l):i+_>=1?(T=(M*e-1)*Math.pow(2,K),i=i+_):(T=M*Math.pow(2,_-1)*Math.pow(2,K),i=0));K>=8;B[G+n]=T&255,n+=o,T/=256,K-=8);for(i=i<<K|T,E+=K;E>0;B[G+n]=i&255,n+=o,i/=256,E-=8);B[G+n-o]|=c*128}},{}],196:[function(W,ee,L){typeof Object.create=="function"?ee.exports=function(M,G){G&&(M.super_=G,M.prototype=Object.create(G.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}))}:ee.exports=function(M,G){if(G){M.super_=G;var X=function(){};X.prototype=G.prototype,M.prototype=new X,M.prototype.constructor=M}}},{}],197:[function(W,ee,L){/*!
|
|
|
* Determine if an object is a Buffer
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
|
* @license MIT
|
|
|
*/ee.exports=function(G){return G!=null&&(B(G)||M(G)||!!G._isBuffer)};function B(G){return!!G.constructor&&typeof G.constructor.isBuffer=="function"&&G.constructor.isBuffer(G)}function M(G){return typeof G.readFloatLE=="function"&&typeof G.slice=="function"&&B(G.slice(0,0))}},{}],198:[function(W,ee,L){var B={}.toString;ee.exports=Array.isArray||function(M){return B.call(M)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(W,ee){typeof exports=="object"&&typeof module!="undefined"?module.exports=ee(W):typeof define=="function"&&define.amd?define(ee):ee(W)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:this,function(global){"use strict";global=global||{};var _Base64=global.Base64,version="2.5.2",buffer;if(typeof module!="undefined"&&module.exports)try{buffer=eval("require('buffer').Buffer")}catch(W){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(W){for(var ee={},L=0,B=W.length;L<B;L++)ee[W.charAt(L)]=L;return ee}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(W){if(W.length<2){var ee=W.charCodeAt(0);return ee<128?W:ee<2048?fromCharCode(192|ee>>>6)+fromCharCode(128|ee&63):fromCharCode(224|ee>>>12&15)+fromCharCode(128|ee>>>6&63)+fromCharCode(128|ee&63)}else{var ee=65536+(W.charCodeAt(0)-55296)*1024+(W.charCodeAt(1)-56320);return fromCharCode(240|ee>>>18&7)+fromCharCode(128|ee>>>12&63)+fromCharCode(128|ee>>>6&63)+fromCharCode(128|ee&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(W){return W.replace(re_utob,cb_utob)},cb_encode=function(W){var ee=[0,2,1][W.length%3],L=W.charCodeAt(0)<<16|(W.length>1?W.charCodeAt(1):0)<<8|(W.length>2?W.charCodeAt(2):0),B=[b64chars.charAt(L>>>18),b64chars.charAt(L>>>12&63),ee>=2?"=":b64chars.charAt(L>>>6&63),ee>=1?"=":b64chars.charAt(L&63)];return B.join("")},btoa=global.btoa?function(W){return global.btoa(W)}:function(W){return W.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(W){var ee=Object.prototype.toString.call(W)==="[object Uint8Array]";return ee?W.toString("base64"):btoa(utob(String(W)))},encode=function(W,ee){return ee?_encode(String(W)).replace(/[+\/]/g,function(L){return L=="+"?"-":"_"}).replace(/=/g,""):_encode(W)},encodeURI=function(W){return encode(W,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(W){switch(W.length){case 4:var ee=(7&W.charCodeAt(0))<<18|(63&W.charCodeAt(1))<<12|(63&W.charCodeAt(2))<<6|63&W.charCodeAt(3),L=ee-65536;return fromCharCode((L>>>10)+55296)+fromCharCode((L&1023)+56320);case 3:return fromCharCode((15&W.charCodeAt(0))<<12|(63&W.charCodeAt(1))<<6|63&W.charCodeAt(2));default:return fromCharCode((31&W.charCodeAt(0))<<6|63&W.charCodeAt(1))}},btou=function(W){return W.replace(re_btou,cb_btou)},cb_decode=function(W){var ee=W.length,L=ee%4,B=(ee>0?b64tab[W.charAt(0)]<<18:0)|(ee>1?b64tab[W.charAt(1)]<<12:0)|(ee>2?b64tab[W.charAt(2)]<<6:0)|(ee>3?b64tab[W.charAt(3)]:0),M=[fromCharCode(B>>>16),fromCharCode(B>>>8&255),fromCharCode(B&255)];return M.length-=[0,0,2,1][L],M.join("")},_atob=global.atob?function(W){return global.atob(W)}:function(W){return W.replace(/\S{1,4}/g,cb_decode)},atob=function(W){return _atob(String(W).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(W){return(W.constructor===buffer.constructor?W:buffer.from(W,"base64")).toString()}:function(W){return(W.constructor===buffer.constructor?W:new buffer(W,"base64")).toString()}:function(W){return btou(_atob(W))},decode=function(W){return _decode(String(W).replace(/[-_]/g,function(ee){return ee=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var W=global.Base64;return global.Base64=_Base64,W};if(global.Base64={VERSION:version,atob,btoa,fromBase64:decode,toBase64:encode,utob,encode,encodeURI,btou,decode,noConflict,__buffer__:buffer},typeof Object.defineProperty=="function"){var noEnum=function(W){return{value:W,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(W){return encode(this,W)})),Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,!0)}))}}return global.Meteor&&(Base64=global.Base64),typeof module!="undefined"&&module.exports?module.exports.Base64=global.Base64:typeof define=="function"&&define.amd&&define([],function(){return global.Base64}),{Base64:global.Base64}})}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],200:[function(W,ee,L){/*!
|
|
|
* merge-descriptors
|
|
|
* Copyright(c) 2014 Jonathan Ong
|
|
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
|
* MIT Licensed
|
|
|
*/"use strict";ee.exports=M;var B=Object.prototype.hasOwnProperty;function M(G,X,K){if(!G)throw new TypeError("argument dest is required");if(!X)throw new TypeError("argument src is required");return K===void 0&&(K=!0),Object.getOwnPropertyNames(X).forEach(function(i){if(!K&&B.call(G,i))return;var T=Object.getOwnPropertyDescriptor(X,i);Object.defineProperty(G,i,T)}),G}},{}],201:[function(W,ee,L){"use strict";function B(){this._types=Object.create(null),this._extensions=Object.create(null);for(var M=0;M<arguments.length;M++)this.define(arguments[M]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}B.prototype.define=function(M,G){for(var X in M){var K=M[X].map(function(T){return T.toLowerCase()});X=X.toLowerCase();for(var N=0;N<K.length;N++){var i=K[N];if(i[0]=="*")continue;if(!G&&i in this._types)throw new Error('Attempt to change mapping for "'+i+'" extension from "'+this._types[i]+'" to "'+X+'". Pass `force=true` to allow this, otherwise remove "'+i+'" from the list of extensions for "'+X+'".');this._types[i]=X}if(G||!this._extensions[X]){var i=K[0];this._extensions[X]=i[0]!="*"?i:i.substr(1)}}},B.prototype.getType=function(M){M=String(M);var G=M.replace(/^.*[/\\]/,"").toLowerCase(),X=G.replace(/^.*\./,"").toLowerCase(),K=G.length<M.length,N=X.length<G.length-1;return(N||!K)&&this._types[X]||null},B.prototype.getExtension=function(M){return M=/^\s*([^;\s]*)/.test(M)&&RegExp.$1,M&&this._extensions[M.toLowerCase()]||null},ee.exports=B},{}],202:[function(W,ee,L){"use strict";var B=W("./Mime");ee.exports=new B(W("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(W,ee,L){ee.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(W,ee,L){var B=1e3,M=B*60,G=M*60,X=G*24,K=X*7,N=X*365.25;ee.exports=function(l,_){_=_||{};var r=typeof l;if(r==="string"&&l.length>0)return i(l);if(r==="number"&&isFinite(l))return _.long?e(l):T(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))};function i(l){if(l=String(l),l.length>100)return;var _=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(!_)return;var r=parseFloat(_[1]),n=(_[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*N;case"weeks":case"week":case"w":return r*K;case"days":case"day":case"d":return r*X;case"hours":case"hour":case"hrs":case"hr":case"h":return r*G;case"minutes":case"minute":case"mins":case"min":case"m":return r*M;case"seconds":case"second":case"secs":case"sec":case"s":return r*B;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}function T(l){var _=Math.abs(l);return _>=X?Math.round(l/X)+"d":_>=G?Math.round(l/G)+"h":_>=M?Math.round(l/M)+"m":_>=B?Math.round(l/B)+"s":l+"ms"}function e(l){var _=Math.abs(l);return _>=X?E(l,_,X,"day"):_>=G?E(l,_,G,"hour"):_>=M?E(l,_,M,"minute"):_>=B?E(l,_,B,"second"):l+" ms"}function E(l,_,r,n){var o=_>=r*1.5;return Math.round(l/r)+" "+n+(o?"s":"")}},{}],205:[function(W,ee,L){(function(B){function M(N,i){for(var T=0,e=N.length-1;e>=0;e--){var E=N[e];E==="."?N.splice(e,1):E===".."?(N.splice(e,1),T++):T&&(N.splice(e,1),T--)}if(i)for(;T--;T)N.unshift("..");return N}L.resolve=function(){for(var N="",i=!1,T=arguments.length-1;T>=-1&&!i;T--){var e=T>=0?arguments[T]:B.cwd();if(typeof e!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!e)continue;N=e+"/"+N,i=e.charAt(0)==="/"}return N=M(X(N.split("/"),function(E){return!!E}),!i).join("/"),(i?"/":"")+N||"."},L.normalize=function(N){var i=L.isAbsolute(N),T=K(N,-1)==="/";return N=M(X(N.split("/"),function(e){return!!e}),!i).join("/"),!N&&!i&&(N="."),N&&T&&(N+="/"),(i?"/":"")+N},L.isAbsolute=function(N){return N.charAt(0)==="/"},L.join=function(){var N=Array.prototype.slice.call(arguments,0);return L.normalize(X(N,function(i,T){if(typeof i!="string")throw new TypeError("Arguments to path.join must be strings");return i}).join("/"))},L.relative=function(N,i){N=L.resolve(N).substr(1),i=L.resolve(i).substr(1);function T(o){for(var c=0;c<o.length&&!(o[c]!=="");c++);for(var v=o.length-1;v>=0&&!(o[v]!=="");v--);return c>v?[]:o.slice(c,v-c+1)}for(var e=T(N.split("/")),E=T(i.split("/")),l=Math.min(e.length,E.length),_=l,r=0;r<l;r++)if(e[r]!==E[r]){_=r;break}for(var n=[],r=_;r<e.length;r++)n.push("..");return n=n.concat(E.slice(_)),n.join("/")},L.sep="/",L.delimiter=":",L.dirname=function(N){if(typeof N!="string"&&(N=N+""),N.length===0)return".";for(var i=N.charCodeAt(0),T=i===47,e=-1,E=!0,l=N.length-1;l>=1;--l)if(i=N.charCodeAt(l),i===47){if(!E){e=l;break}}else E=!1;return e===-1?T?"/":".":T&&e===1?"/":N.slice(0,e)};function G(N){typeof N!="string"&&(N=N+"");var i=0,T=-1,e=!0,E;for(E=N.length-1;E>=0;--E)if(N.charCodeAt(E)===47){if(!e){i=E+1;break}}else T===-1&&(e=!1,T=E+1);return T===-1?"":N.slice(i,T)}L.basename=function(N,i){var T=G(N);return i&&T.substr(-1*i.length)===i&&(T=T.substr(0,T.length-i.length)),T},L.extname=function(N){typeof N!="string"&&(N=N+"");for(var i=-1,T=0,e=-1,E=!0,l=0,_=N.length-1;_>=0;--_){var r=N.charCodeAt(_);if(r===47){if(!E){T=_+1;break}continue}e===-1&&(E=!1,e=_+1),r===46?i===-1?i=_:l!==1&&(l=1):i!==-1&&(l=-1)}return i===-1||e===-1||l===0||l===1&&i===e-1&&i===T+1?"":N.slice(i,e)};function X(N,i){if(N.filter)return N.filter(i);for(var T=[],e=0;e<N.length;e++)i(N[e],e,N)&&T.push(N[e]);return T}var K="ab".substr(-1)==="b"?function(N,i,T){return N.substr(i,T)}:function(N,i,T){return i<0&&(i=N.length+i),N.substr(i,T)}}).call(this,W("_process"))},{_process:208}],206:[function(W,ee,L){(function(B){/*!
|
|
|
* Platform.js <https://mths.be/platform>
|
|
|
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
|
|
|
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
|
|
|
* Available under MIT license <https://mths.be/mit>
|
|
|
*/(function(){"use strict";var M={function:!0,object:!0},G=M[typeof window]&&window||this,X=G,K=M[typeof L]&&L,N=M[typeof ee]&&ee&&!ee.nodeType&&ee,i=K&&N&&typeof B=="object"&&B;i&&(i.global===i||i.window===i||i.self===i)&&(G=i);var T=Math.pow(2,53)-1,e=/\bOpera/,E=this,l=Object.prototype,_=l.hasOwnProperty,r=l.toString;function n(O){return O=String(O),O.charAt(0).toUpperCase()+O.slice(1)}function o(O,w,D){var A={"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 w&&D&&/^Win/i.test(O)&&!/^Windows Phone /i.test(O)&&(A=A[/[\d.]+$/.exec(O)])&&(O="Windows "+A),O=String(O),w&&D&&(O=O.replace(RegExp(w,"i"),D)),O=v(O.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]),O}function c(O,w){var D=-1,A=O?O.length:0;if(typeof A=="number"&&A>-1&&A<=T)for(;++D<A;)w(O[D],D,O);else f(O,w)}function v(O){return O=d(O),/^(?:webOS|i(?:OS|P))/.test(O)?O:n(O)}function f(O,w){for(var D in O)_.call(O,D)&&w(O[D],D,O)}function y(O){return O==null?n(O):r.call(O).slice(8,-1)}function h(O,w){var D=O!=null?typeof O[w]:"number";return!/^(?:boolean|number|string|undefined)$/.test(D)&&(D=="object"?!!O[w]:!0)}function b(O){return String(O).replace(/([ -])(?!$)/g,"$1?")}function m(O,w){var D=null;return c(O,function(A,P){D=w(D,A,P,O)}),D}function d(O){return String(O).replace(/^ +| +$/g,"")}function x(O){var w=G,D=O&&typeof O=="object"&&y(O)!="String";D&&(w=O,O=null);var A=w.navigator||{},P=A.userAgent||"";O||(O=P);var I=D||E==X,u=D?!!A.likeChrome:/\bChrome\b/.test(O)&&!/internal|\n/i.test(r.toString()),k="Object",g=D?k:"ScriptBridgingProxyObject",a=D?k:"Environment",C=D&&w.java?"JavaPackage":y(w.java),S=D?k:"RuntimeObject",p=/\bJava/.test(C)&&w.java,U=p&&y(w.environment)==a,z=p?"a":"\u03B1",q=p?"b":"\u03B2",$=w.document||{},re=w.operamini||w.opera,ce=e.test(ce=D&&re?re["[[Class]]"]:y(re))?ce:re=null,ne,me=O,be=[],he=null,se=O==P,_e=se&&re&&typeof re.version=="function"&&re.version(),De,ge=J([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),fe=pe(["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"]),Ce=ye([{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"]),ae=Z({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}}),Q=le(["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 J(Oe){return m(Oe,function(Ue,je){return Ue||RegExp("\\b"+(je.pattern||b(je))+"\\b","i").exec(O)&&(je.label||je)})}function Z(Oe){return m(Oe,function(Ue,je,Ve){return Ue||(je[Ce]||je[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Ce)]||RegExp("\\b"+b(Ve)+"(?:\\b|\\w*\\d)","i").exec(O))&&Ve})}function pe(Oe){return m(Oe,function(Ue,je){return Ue||RegExp("\\b"+(je.pattern||b(je))+"\\b","i").exec(O)&&(je.label||je)})}function le(Oe){return m(Oe,function(Ue,je){var Ve=je.pattern||b(je);return!Ue&&(Ue=RegExp("\\b"+Ve+"(?:/[\\d.]+|[ \\w.]*)","i").exec(O))&&(Ue=o(Ue,Ve,je.label||je)),Ue})}function ye(Oe){return m(Oe,function(Ue,je){var Ve=je.pattern||b(je);return!Ue&&(Ue=RegExp("\\b"+Ve+" *\\d+[.\\w_]*","i").exec(O)||RegExp("\\b"+Ve+" *\\w+-[\\w]*","i").exec(O)||RegExp("\\b"+Ve+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(O))&&((Ue=String(je.label&&!RegExp(Ve,"i").test(je.label)?je.label:Ue).split("/"))[1]&&!/[\d.]+/.test(Ue[0])&&(Ue[0]+=" "+Ue[1]),je=je.label||je,Ue=v(Ue[0].replace(RegExp(Ve,"i"),je).replace(RegExp("; *(?:"+je+"[_-])?","i")," ").replace(RegExp("("+je+")[-_.]?(\\w)","i"),"$1 $2"))),Ue})}function Te(Oe){return m(Oe,function(Ue,je){return Ue||(RegExp(je+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(O)||0)[1]||null})}function Pe(){return this.description||""}if(ge&&(ge=[ge]),ae&&!Ce&&(Ce=ye([ae])),(ne=/\bGoogle TV\b/.exec(Ce))&&(Ce=ne[0]),/\bSimulator\b/i.test(O)&&(Ce=(Ce?Ce+" ":"")+"Simulator"),fe=="Opera Mini"&&/\bOPiOS\b/.test(O)&&be.push("running in Turbo/Uncompressed mode"),fe=="IE"&&/\blike iPhone OS\b/.test(O)?(ne=x(O.replace(/like iPhone OS/,"")),ae=ne.manufacturer,Ce=ne.product):/^iP/.test(Ce)?(fe||(fe="Safari"),Q="iOS"+((ne=/ OS ([\d_]+)/i.exec(O))?" "+ne[1].replace(/_/g,"."):"")):fe=="Konqueror"&&!/buntu/i.test(Q)?Q="Kubuntu":ae&&ae!="Google"&&(/Chrome/.test(fe)&&!/\bMobile Safari\b/i.test(O)||/\bVita\b/.test(Ce))||/\bAndroid\b/.test(Q)&&/^Chrome/.test(fe)&&/\bVersion\//i.test(O)?(fe="Android Browser",Q=/\bAndroid\b/.test(Q)?Q:"Android"):fe=="Silk"?(/\bMobi/i.test(O)||(Q="Android",be.unshift("desktop mode")),/Accelerated *= *true/i.test(O)&&be.unshift("accelerated")):fe=="PaleMoon"&&(ne=/\bFirefox\/([\d.]+)\b/.exec(O))?be.push("identifying as Firefox "+ne[1]):fe=="Firefox"&&(ne=/\b(Mobile|Tablet|TV)\b/i.exec(O))?(Q||(Q="Firefox OS"),Ce||(Ce=ne[1])):!fe||(ne=!/\bMinefield\b/i.test(O)&&/\b(?:Firefox|Safari)\b/.exec(fe))?(fe&&!Ce&&/[\/,]|^[^(]+?\)/.test(O.slice(O.indexOf(ne+"/")+8))&&(fe=null),(ne=Ce||ae||Q)&&(Ce||ae||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Q))&&(fe=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Q)?Q:ne)+" Browser")):fe=="Electron"&&(ne=(/\bChrome\/([\d.]+)\b/.exec(O)||0)[1])&&be.push("Chromium "+ne),_e||(_e=Te(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",b(fe),"(?:Firefox|Minefield|NetFront)"])),(ne=ge=="iCab"&&parseFloat(_e)>3&&"WebKit"||/\bOpera\b/.test(fe)&&(/\bOPR\b/.test(O)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(O)&&!/^(?:Trident|EdgeHTML)$/.test(ge)&&"WebKit"||!ge&&/\bMSIE\b/i.test(O)&&(Q=="Mac OS"?"Tasman":"Trident")||ge=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(fe)&&"NetFront")&&(ge=[ne]),fe=="IE"&&(ne=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(O)||0)[1])?(fe+=" Mobile",Q="Windows Phone "+(/\+$/.test(ne)?ne:ne+".x"),be.unshift("desktop mode")):/\bWPDesktop\b/i.test(O)?(fe="IE Mobile",Q="Windows Phone 8.x",be.unshift("desktop mode"),_e||(_e=(/\brv:([\d.]+)/.exec(O)||0)[1])):fe!="IE"&&ge=="Trident"&&(ne=/\brv:([\d.]+)/.exec(O))&&(fe&&be.push("identifying as "+fe+(_e?" "+_e:"")),fe="IE",_e=ne[1]),se){if(h(w,"global"))if(p&&(ne=p.lang.System,me=ne.getProperty("os.arch"),Q=Q||ne.getProperty("os.name")+" "+ne.getProperty("os.version")),U){try{_e=w.require("ringo/engine").version.join("."),fe="RingoJS"}catch(Oe){(ne=w.system)&&ne.global.system==w.system&&(fe="Narwhal",Q||(Q=ne[0].os||null))}fe||(fe="Rhino")}else typeof w.process=="object"&&!w.process.browser&&(ne=w.process)&&(typeof ne.versions=="object"&&(typeof ne.versions.electron=="string"?(be.push("Node "+ne.versions.node),fe="Electron",_e=ne.versions.electron):typeof ne.versions.nw=="string"&&(be.push("Chromium "+_e,"Node "+ne.versions.node),fe="NW.js",_e=ne.versions.nw)),fe||(fe="Node.js",me=ne.arch,Q=ne.platform,_e=/[\d.]+/.exec(ne.version),_e=_e?_e[0]:null));else y(ne=w.runtime)==g?(fe="Adobe AIR",Q=ne.flash.system.Capabilities.os):y(ne=w.phantom)==S?(fe="PhantomJS",_e=(ne=ne.version||null)&&ne.major+"."+ne.minor+"."+ne.patch):typeof $.documentMode=="number"&&(ne=/\bTrident\/(\d+)/i.exec(O))?(_e=[_e,$.documentMode],(ne=+ne[1]+4)!=_e[1]&&(be.push("IE "+_e[1]+" mode"),ge&&(ge[1]=""),_e[1]=ne),_e=fe=="IE"?String(_e[1].toFixed(1)):_e[0]):typeof $.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(fe)&&(be.push("masking as "+fe+" "+_e),fe="IE",_e="11.0",ge=["Trident"],Q="Windows");Q=Q&&v(Q)}if(_e&&(ne=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(_e)||/(?:alpha|beta)(?: ?\d)?/i.exec(O+";"+(se&&A.appMinorVersion))||/\bMinefield\b/i.test(O)&&"a")&&(he=/b/i.test(ne)?"beta":"alpha",_e=_e.replace(RegExp(ne+"\\+?$"),"")+(he=="beta"?q:z)+(/\d+\+?/.exec(ne)||"")),fe=="Fennec"||fe=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Q))fe="Firefox Mobile";else if(fe=="Maxthon"&&_e)_e=_e.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ce))Ce=="Xbox 360"&&(Q=null),Ce=="Xbox 360"&&/\bIEMobile\b/.test(O)&&be.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(fe)||fe&&!Ce&&!/Browser|Mobi/.test(fe))&&(Q=="Windows CE"||/Mobi/i.test(O)))fe+=" Mobile";else if(fe=="IE"&&se)try{w.external===null&&be.unshift("platform preview")}catch(Oe){be.unshift("embedded")}else(/\bBlackBerry\b/.test(Ce)||/\bBB10\b/.test(O))&&(ne=(RegExp(Ce.replace(/ +/g," *")+"/([.\\d]+)","i").exec(O)||0)[1]||_e)?(ne=[ne,/BB10/.test(O)],Q=(ne[1]?(Ce=null,ae="BlackBerry"):"Device Software")+" "+ne[0],_e=null):this!=f&&Ce!="Wii"&&(se&&re||/Opera/.test(fe)&&/\b(?:MSIE|Firefox)\b/i.test(O)||fe=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Q)||fe=="IE"&&(Q&&!/^Win/.test(Q)&&_e>5.5||/\bWindows XP\b/.test(Q)&&_e>8||_e==8&&!/\bTrident\b/.test(O)))&&!e.test(ne=x.call(f,O.replace(e,"")+";"))&&ne.name&&(ne="ing as "+ne.name+((ne=ne.version)?" "+ne:""),e.test(fe)?(/\bIE\b/.test(ne)&&Q=="Mac OS"&&(Q=null),ne="identify"+ne):(ne="mask"+ne,ce?fe=v(ce.replace(/([a-z])([A-Z])/g,"$1 $2")):fe="Opera",/\bIE\b/.test(ne)&&(Q=null),se||(_e=null)),ge=["Presto"],be.push(ne));(ne=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(O)||0)[1])&&(ne=[parseFloat(ne.replace(/\.(\d)$/,".0$1")),ne],fe=="Safari"&&ne[1].slice(-1)=="+"?(fe="WebKit Nightly",he="alpha",_e=ne[1].slice(0,-1)):(_e==ne[1]||_e==(ne[2]=(/\bSafari\/([\d.]+\+?)/i.exec(O)||0)[1]))&&(_e=null),ne[1]=(/\bChrome\/([\d.]+)/i.exec(O)||0)[1],ne[0]==537.36&&ne[2]==537.36&&parseFloat(ne[1])>=28&&ge=="WebKit"&&(ge=["Blink"]),!se||!u&&!ne[1]?(ge&&(ge[1]="like Safari"),ne=(ne=ne[0],ne<400?1:ne<500?2:ne<526?3:ne<533?4:ne<534?"4+":ne<535?5:ne<537?6:ne<538?7:ne<601?8:"8")):(ge&&(ge[1]="like Chrome"),ne=ne[1]||(ne=ne[0],ne<530?1:ne<532?2:ne<532.05?3:ne<533?4:ne<534.03?5:ne<534.07?6:ne<534.1?7:ne<534.13?8:ne<534.16?9:ne<534.24?10:ne<534.3?11:ne<535.01?12:ne<535.02?"13+":ne<535.07?15:ne<535.11?16:ne<535.19?17:ne<536.05?18:ne<536.1?19:ne<537.01?20:ne<537.11?"21+":ne<537.13?23:ne<537.18?24:ne<537.24?25:ne<537.36?26:ge!="Blink"?"27":"28")),ge&&(ge[1]+=" "+(ne+=typeof ne=="number"?".x":/[.+]/.test(ne)?"":"+")),fe=="Safari"&&(!_e||parseInt(_e)>45)&&(_e=ne)),fe=="Opera"&&(ne=/\bzbov|zvav$/.exec(Q))?(fe+=" ",be.unshift("desktop mode"),ne=="zvav"?(fe+="Mini",_e=null):fe+="Mobile",Q=Q.replace(RegExp(" *"+ne+"$"),"")):fe=="Safari"&&/\bChrome\b/.exec(ge&&ge[1])&&(be.unshift("desktop mode"),fe="Chrome Mobile",_e=null,/\bOS X\b/.test(Q)?(ae="Apple",Q="iOS 4.3+"):Q=null),_e&&_e.indexOf(ne=/[\d.]+$/.exec(Q))==0&&O.indexOf("/"+ne+"-")>-1&&(Q=d(Q.replace(ne,""))),ge&&!/\b(?:Avant|Nook)\b/.test(fe)&&(/Browser|Lunascape|Maxthon/.test(fe)||fe!="Safari"&&/^iOS/.test(Q)&&/\bSafari\b/.test(ge[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(fe)&&ge[1])&&((ne=ge[ge.length-1])&&be.push(ne)),be.length&&(be=["("+be.join("; ")+")"]),ae&&Ce&&Ce.indexOf(ae)<0&&be.push("on "+ae),Ce&&be.push((/^on /.test(be[be.length-1])?"":"on ")+Ce),Q&&(ne=/ ([\d.+]+)$/.exec(Q),De=ne&&Q.charAt(Q.length-ne[0].length-1)=="/",Q={architecture:32,family:ne&&!De?Q.replace(ne[0],""):Q,version:ne?ne[1]:null,toString:function(){var Oe=this.version;return this.family+(Oe&&!De?" "+Oe:"")+(this.architecture==64?" 64-bit":"")}}),(ne=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(me))&&!/\bi686\b/i.test(me)?(Q&&(Q.architecture=64,Q.family=Q.family.replace(RegExp(" *"+ne),"")),fe&&(/\bWOW64\b/i.test(O)||se&&/\w(?:86|32)$/.test(A.cpuClass||A.platform)&&!/\bWin64; x64\b/i.test(O))&&be.unshift("32-bit")):Q&&/^OS X/.test(Q.family)&&fe=="Chrome"&&parseFloat(_e)>=39&&(Q.architecture=64),O||(O=null);var He={};return He.description=O,He.layout=ge&&ge[0],He.manufacturer=ae,He.name=fe,He.prerelease=he,He.product=Ce,He.ua=O,He.version=fe&&_e,He.os=Q||{architecture:null,family:null,version:null,toString:function(){return"null"}},He.parse=x,He.toString=Pe,He.version&&be.unshift(_e),He.name&&be.unshift(fe),Q&&fe&&!(Q==String(Q).split(" ")[0]&&(Q==fe.split(" ")[0]||Ce))&&be.push(Ce?"("+Q+")":"on "+Q),be.length&&(He.description=be.join(" ")),He}var R=x();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(G.platform=R,define(function(){return R})):K&&N?f(R,function(O,w){K[w]=O}):G.platform=R}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(W,ee,L){(function(B){"use strict";typeof B=="undefined"||!B.version||B.version.indexOf("v0.")===0||B.version.indexOf("v1.")===0&&B.version.indexOf("v1.8.")!==0?ee.exports={nextTick:M}:ee.exports=B;function M(G,X,K,N){if(typeof G!="function")throw new TypeError('"callback" argument must be a function');var i=arguments.length,T,e;switch(i){case 0:case 1:return B.nextTick(G);case 2:return B.nextTick(function(){G.call(null,X)});case 3:return B.nextTick(function(){G.call(null,X,K)});case 4:return B.nextTick(function(){G.call(null,X,K,N)});default:for(T=new Array(i-1),e=0;e<T.length;)T[e++]=arguments[e];return B.nextTick(function(){G.apply(null,T)})}}}).call(this,W("_process"))},{_process:208}],208:[function(W,ee,L){var B=ee.exports={},M,G;function X(){throw new Error("setTimeout has not been defined")}function K(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?M=setTimeout:M=X}catch(c){M=X}try{typeof clearTimeout=="function"?G=clearTimeout:G=K}catch(c){G=K}})();function N(c){if(M===setTimeout)return setTimeout(c,0);if((M===X||!M)&&setTimeout)return M=setTimeout,setTimeout(c,0);try{return M(c,0)}catch(v){try{return M.call(null,c,0)}catch(f){return M.call(this,c,0)}}}function i(c){if(G===clearTimeout)return clearTimeout(c);if((G===K||!G)&&clearTimeout)return G=clearTimeout,clearTimeout(c);try{return G(c)}catch(v){try{return G.call(null,c)}catch(f){return G.call(this,c)}}}var T=[],e=!1,E,l=-1;function _(){if(!e||!E)return;e=!1,E.length?T=E.concat(T):l=-1,T.length&&r()}function r(){if(e)return;var c=N(_);e=!0;for(var v=T.length;v;){for(E=T,T=[];++l<v;)E&&E[l].run();l=-1,v=T.length}E=null,e=!1,i(c)}B.nextTick=function(c){var v=new Array(arguments.length-1);if(arguments.length>1)for(var f=1;f<arguments.length;f++)v[f-1]=arguments[f];T.push(new n(c,v)),T.length===1&&!e&&N(r)};function n(c,v){this.fun=c,this.array=v}n.prototype.run=function(){this.fun.apply(null,this.array)},B.title="browser",B.browser=!0,B.env={},B.argv=[],B.version="",B.versions={};function o(){}B.on=o,B.addListener=o,B.once=o,B.off=o,B.removeListener=o,B.removeAllListeners=o,B.emit=o,B.prependListener=o,B.prependOnceListener=o,B.listeners=function(c){return[]},B.binding=function(c){throw new Error("process.binding is not supported")},B.cwd=function(){return"/"},B.chdir=function(c){throw new Error("process.chdir is not supported")},B.umask=function(){return 0}},{}],209:[function(W,ee,L){(function(B){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(M){var G=typeof L=="object"&&L&&!L.nodeType&&L,X=typeof ee=="object"&&ee&&!ee.nodeType&&ee,K=typeof B=="object"&&B;(K.global===K||K.window===K||K.self===K)&&(M=K);var N,i=2147483647,T=36,e=1,E=26,l=38,_=700,r=72,n=128,o="-",c=/^xn--/,v=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=T-e,b=Math.floor,m=String.fromCharCode,d;function x(C){throw new RangeError(y[C])}function R(C,S){for(var p=C.length,U=[];p--;)U[p]=S(C[p]);return U}function O(C,S){var p=C.split("@"),U="";p.length>1&&(U=p[0]+"@",C=p[1]),C=C.replace(f,".");var z=C.split("."),q=R(z,S).join(".");return U+q}function w(C){for(var S=[],p=0,U=C.length,z,q;p<U;)z=C.charCodeAt(p++),z>=55296&&z<=56319&&p<U?(q=C.charCodeAt(p++),(q&64512)==56320?S.push(((z&1023)<<10)+(q&1023)+65536):(S.push(z),p--)):S.push(z);return S}function D(C){return R(C,function(S){var p="";return S>65535&&(S-=65536,p+=m(S>>>10&1023|55296),S=56320|S&1023),p+=m(S),p}).join("")}function A(C){return C-48<10?C-22:C-65<26?C-65:C-97<26?C-97:T}function P(C,S){return C+22+75*(C<26)-((S!=0)<<5)}function I(C,S,p){var U=0;for(C=p?b(C/_):C>>1,C+=b(C/S);C>h*E>>1;U+=T)C=b(C/h);return b(U+(h+1)*C/(C+l))}function u(C){var S=[],p=C.length,U,z=0,q=n,$=r,re,ce,ne,me,be,he,se,_e,De;for(re=C.lastIndexOf(o),re<0&&(re=0),ce=0;ce<re;++ce)C.charCodeAt(ce)>=128&&x("not-basic"),S.push(C.charCodeAt(ce));for(ne=re>0?re+1:0;ne<p;){for(me=z,be=1,he=T;!(ne>=p&&x("invalid-input"),se=A(C.charCodeAt(ne++)),(se>=T||se>b((i-z)/be))&&x("overflow"),z+=se*be,_e=he<=$?e:he>=$+E?E:he-$,se<_e);he+=T)De=T-_e,be>b(i/De)&&x("overflow"),be*=De;U=S.length+1,$=I(z-me,U,me==0),b(z/U)>i-q&&x("overflow"),q+=b(z/U),z%=U,S.splice(z++,0,q)}return D(S)}function k(C){var S,p,U,z,q,$,re,ce,ne,me,be,he=[],se,_e,De,ge;for(C=w(C),se=C.length,S=n,p=0,q=r,$=0;$<se;++$)be=C[$],be<128&&he.push(m(be));for(U=z=he.length,z&&he.push(o);U<se;){for(re=i,$=0;$<se;++$)be=C[$],be>=S&&be<re&&(re=be);for(_e=U+1,re-S>b((i-p)/_e)&&x("overflow"),p+=(re-S)*_e,S=re,$=0;$<se;++$)if(be=C[$],be<S&&++p>i&&x("overflow"),be==S){for(ce=p,ne=T;!(me=ne<=q?e:ne>=q+E?E:ne-q,ce<me);ne+=T)ge=ce-me,De=T-me,he.push(m(P(me+ge%De,0))),ce=b(ge/De);he.push(m(P(ce,0))),q=I(p,_e,U==z),p=0,++U}++p,++S}return he.join("")}function g(C){return O(C,function(S){return c.test(S)?u(S.slice(4).toLowerCase()):S})}function a(C){return O(C,function(S){return v.test(S)?"xn--"+k(S):S})}if(N={version:"1.4.1",ucs2:{decode:w,encode:D},decode:u,encode:k,toASCII:a,toUnicode:g},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return N});else if(G&&X)if(ee.exports==G)X.exports=N;else for(d in N)N.hasOwnProperty(d)&&(G[d]=N[d]);else M.punycode=N})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(W,ee,L){"use strict";function B(G,X){return Object.prototype.hasOwnProperty.call(G,X)}ee.exports=function(G,X,K,N){X=X||"&",K=K||"=";var i={};if(typeof G!="string"||G.length===0)return i;var T=/\+/g;G=G.split(X);var e=1e3;N&&typeof N.maxKeys=="number"&&(e=N.maxKeys);var E=G.length;e>0&&E>e&&(E=e);for(var l=0;l<E;++l){var _=G[l].replace(T,"%20"),r=_.indexOf(K),n,o,c,v;r>=0?(n=_.substr(0,r),o=_.substr(r+1)):(n=_,o=""),c=decodeURIComponent(n),v=decodeURIComponent(o),B(i,c)?M(i[c])?i[c].push(v):i[c]=[i[c],v]:i[c]=v}return i};var M=Array.isArray||function(G){return Object.prototype.toString.call(G)==="[object Array]"}},{}],211:[function(W,ee,L){"use strict";var B=function(K){switch(typeof K){case"string":return K;case"boolean":return K?"true":"false";case"number":return isFinite(K)?K:"";default:return""}};ee.exports=function(K,N,i,T){return N=N||"&",i=i||"=",K===null&&(K=void 0),typeof K=="object"?G(X(K),function(e){var E=encodeURIComponent(B(e))+i;return M(K[e])?G(K[e],function(l){return E+encodeURIComponent(B(l))}).join(N):E+encodeURIComponent(B(K[e]))}).join(N):T?encodeURIComponent(B(T))+i+encodeURIComponent(B(K)):""};var M=Array.isArray||function(K){return Object.prototype.toString.call(K)==="[object Array]"};function G(K,N){if(K.map)return K.map(N);for(var i=[],T=0;T<K.length;T++)i.push(N(K[T],T));return i}var X=Object.keys||function(K){var N=[];for(var i in K)Object.prototype.hasOwnProperty.call(K,i)&&N.push(i);return N}},{}],212:[function(W,ee,L){"use strict";L.decode=L.parse=W("./decode"),L.encode=L.stringify=W("./encode")},{"./decode":210,"./encode":211}],213:[function(W,ee,L){ee.exports=W("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/create"),M=K(B),G=W("babel-runtime/core-js/object/keys"),X=K(G);function K(v){return v&&v.__esModule?v:{default:v}}var N=W("process-nextick-args"),i=X.default||function(v){var f=[];for(var y in v)f.push(y);return f};ee.exports=n;var T=(0,M.default)(W("core-util-is"));T.inherits=W("inherits");var e=W("./_stream_readable"),E=W("./_stream_writable");T.inherits(n,e);for(var l=i(E.prototype),_=0;_<l.length;_++){var r=l[_];n.prototype[r]||(n.prototype[r]=E.prototype[r])}function n(v){if(!(this instanceof n))return new n(v);e.call(this,v),E.call(this,v),v&&v.readable===!1&&(this.readable=!1),v&&v.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,v&&v.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",o)}Object.defineProperty(n.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function o(){if(this.allowHalfOpen||this._writableState.ended)return;N.nextTick(c,this)}function c(v){v.end()}Object.defineProperty(n.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(f){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=f,this._writableState.destroyed=f}}),n.prototype._destroy=function(v,f){this.push(null),this.end(),N.nextTick(f,v)}},{"./_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(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/create"),M=G(B);function G(i){return i&&i.__esModule?i:{default:i}}ee.exports=N;var X=W("./_stream_transform"),K=(0,M.default)(W("core-util-is"));K.inherits=W("inherits"),K.inherits(N,X);function N(i){if(!(this instanceof N))return new N(i);X.call(this,i)}N.prototype._transform=function(i,T,e){e(null,i)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(W,ee,L){(function(B,M){"use strict";var G=W("babel-runtime/core-js/object/get-prototype-of"),X=i(G),K=W("babel-runtime/core-js/object/create"),N=i(K);function i(ge){return ge&&ge.__esModule?ge:{default:ge}}var T=W("process-nextick-args");ee.exports=w;var e=W("isarray"),E;w.ReadableState=O;var l=W("events").EventEmitter,_=function(fe,Ce){return fe.listeners(Ce).length},r=W("./internal/streams/stream"),n=W("safe-buffer").Buffer,o=M.Uint8Array||function(){};function c(ge){return n.from(ge)}function v(ge){return n.isBuffer(ge)||ge instanceof o}var f=(0,N.default)(W("core-util-is"));f.inherits=W("inherits");var y=W("util"),h=void 0;y&&y.debuglog?h=y.debuglog("stream"):h=function(){};var b=W("./internal/streams/BufferList"),m=W("./internal/streams/destroy"),d;f.inherits(w,r);var x=["error","close","destroy","pause","resume"];function R(ge,fe,Ce){if(typeof ge.prependListener=="function")return ge.prependListener(fe,Ce);!ge._events||!ge._events[fe]?ge.on(fe,Ce):e(ge._events[fe])?ge._events[fe].unshift(Ce):ge._events[fe]=[Ce,ge._events[fe]]}function O(ge,fe){E=E||W("./_stream_duplex"),ge=ge||{};var Ce=fe instanceof E;this.objectMode=!!ge.objectMode,Ce&&(this.objectMode=this.objectMode||!!ge.readableObjectMode);var ae=ge.highWaterMark,Q=ge.readableHighWaterMark,J=this.objectMode?16:16*1024;ae||ae===0?this.highWaterMark=ae:Ce&&(Q||Q===0)?this.highWaterMark=Q:this.highWaterMark=J,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=ge.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ge.encoding&&(d||(d=W("string_decoder/").StringDecoder),this.decoder=new d(ge.encoding),this.encoding=ge.encoding)}function w(ge){if(E=E||W("./_stream_duplex"),!(this instanceof w))return new w(ge);this._readableState=new O(ge,this),this.readable=!0,ge&&(typeof ge.read=="function"&&(this._read=ge.read),typeof ge.destroy=="function"&&(this._destroy=ge.destroy)),r.call(this)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(fe){if(!this._readableState)return;this._readableState.destroyed=fe}}),w.prototype.destroy=m.destroy,w.prototype._undestroy=m.undestroy,w.prototype._destroy=function(ge,fe){this.push(null),fe(ge)},w.prototype.push=function(ge,fe){var Ce=this._readableState,ae;return Ce.objectMode?ae=!0:typeof ge=="string"&&(fe=fe||Ce.defaultEncoding,fe!==Ce.encoding&&(ge=n.from(ge,fe),fe=""),ae=!0),D(this,ge,fe,!1,ae)},w.prototype.unshift=function(ge){return D(this,ge,null,!0,!1)};function D(ge,fe,Ce,ae,Q){var J=ge._readableState;if(fe===null)J.reading=!1,a(ge,J);else{var Z;Q||(Z=P(J,fe)),Z?ge.emit("error",Z):J.objectMode||fe&&fe.length>0?(typeof fe!="string"&&!J.objectMode&&(0,X.default)(fe)!==n.prototype&&(fe=c(fe)),ae?J.endEmitted?ge.emit("error",new Error("stream.unshift() after end event")):A(ge,J,fe,!0):J.ended?ge.emit("error",new Error("stream.push() after EOF")):(J.reading=!1,J.decoder&&!Ce?(fe=J.decoder.write(fe),J.objectMode||fe.length!==0?A(ge,J,fe,!1):p(ge,J)):A(ge,J,fe,!1))):ae||(J.reading=!1)}return I(J)}function A(ge,fe,Ce,ae){fe.flowing&&fe.length===0&&!fe.sync?(ge.emit("data",Ce),ge.read(0)):(fe.length+=fe.objectMode?1:Ce.length,ae?fe.buffer.unshift(Ce):fe.buffer.push(Ce),fe.needReadable&&C(ge)),p(ge,fe)}function P(ge,fe){var Ce;return!v(fe)&&typeof fe!="string"&&fe!==void 0&&!ge.objectMode&&(Ce=new TypeError("Invalid non-string/buffer chunk")),Ce}function I(ge){return!ge.ended&&(ge.needReadable||ge.length<ge.highWaterMark||ge.length===0)}w.prototype.isPaused=function(){return this._readableState.flowing===!1},w.prototype.setEncoding=function(ge){return d||(d=W("string_decoder/").StringDecoder),this._readableState.decoder=new d(ge),this._readableState.encoding=ge,this};var u=8388608;function k(ge){return ge>=u?ge=u:(ge--,ge|=ge>>>1,ge|=ge>>>2,ge|=ge>>>4,ge|=ge>>>8,ge|=ge>>>16,ge++),ge}function g(ge,fe){return ge<=0||fe.length===0&&fe.ended?0:fe.objectMode?1:ge!==ge?fe.flowing&&fe.length?fe.buffer.head.data.length:fe.length:(ge>fe.highWaterMark&&(fe.highWaterMark=k(ge)),ge<=fe.length?ge:fe.ended?fe.length:(fe.needReadable=!0,0))}w.prototype.read=function(ge){h("read",ge),ge=parseInt(ge,10);var fe=this._readableState,Ce=ge;if(ge!==0&&(fe.emittedReadable=!1),ge===0&&fe.needReadable&&(fe.length>=fe.highWaterMark||fe.ended))return h("read: emitReadable",fe.length,fe.ended),fe.length===0&&fe.ended?se(this):C(this),null;if(ge=g(ge,fe),ge===0&&fe.ended)return fe.length===0&&se(this),null;var ae=fe.needReadable;h("need readable",ae),(fe.length===0||fe.length-ge<fe.highWaterMark)&&(ae=!0,h("length less than watermark",ae)),fe.ended||fe.reading?(ae=!1,h("reading or ended",ae)):ae&&(h("do read"),fe.reading=!0,fe.sync=!0,fe.length===0&&(fe.needReadable=!0),this._read(fe.highWaterMark),fe.sync=!1,fe.reading||(ge=g(Ce,fe)));var Q;return ge>0?Q=ne(ge,fe):Q=null,Q===null?(fe.needReadable=!0,ge=0):fe.length-=ge,fe.length===0&&(fe.ended||(fe.needReadable=!0),Ce!==ge&&fe.ended&&se(this)),Q!==null&&this.emit("data",Q),Q};function a(ge,fe){if(fe.ended)return;if(fe.decoder){var Ce=fe.decoder.end();Ce&&Ce.length&&(fe.buffer.push(Ce),fe.length+=fe.objectMode?1:Ce.length)}fe.ended=!0,C(ge)}function C(ge){var fe=ge._readableState;fe.needReadable=!1,fe.emittedReadable||(h("emitReadable",fe.flowing),fe.emittedReadable=!0,fe.sync?T.nextTick(S,ge):S(ge))}function S(ge){h("emit readable"),ge.emit("readable"),ce(ge)}function p(ge,fe){fe.readingMore||(fe.readingMore=!0,T.nextTick(U,ge,fe))}function U(ge,fe){for(var Ce=fe.length;!fe.reading&&!fe.flowing&&!fe.ended&&fe.length<fe.highWaterMark&&!(h("maybeReadMore read 0"),ge.read(0),Ce===fe.length);)Ce=fe.length;fe.readingMore=!1}w.prototype._read=function(ge){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(ge,fe){var Ce=this,ae=this._readableState;switch(ae.pipesCount){case 0:ae.pipes=ge;break;case 1:ae.pipes=[ae.pipes,ge];break;default:ae.pipes.push(ge);break}ae.pipesCount+=1,h("pipe count=%d opts=%j",ae.pipesCount,fe);var Q=(!fe||fe.end!==!1)&&ge!==B.stdout&&ge!==B.stderr,J=Q?pe:Ve;ae.endEmitted?T.nextTick(J):Ce.once("end",J),ge.on("unpipe",Z);function Z(Re,Xe){h("onunpipe"),Re===Ce&&(Xe&&Xe.hasUnpiped===!1&&(Xe.hasUnpiped=!0,Te()))}function pe(){h("onend"),ge.end()}var le=z(Ce);ge.on("drain",le);var ye=!1;function Te(){h("cleanup"),ge.removeListener("close",Ue),ge.removeListener("finish",je),ge.removeListener("drain",le),ge.removeListener("error",Oe),ge.removeListener("unpipe",Z),Ce.removeListener("end",pe),Ce.removeListener("end",Ve),Ce.removeListener("data",He),ye=!0,ae.awaitDrain&&(!ge._writableState||ge._writableState.needDrain)&&le()}var Pe=!1;Ce.on("data",He);function He(Re){h("ondata"),Pe=!1;var Xe=ge.write(Re);Xe===!1&&!Pe&&((ae.pipesCount===1&&ae.pipes===ge||ae.pipesCount>1&&De(ae.pipes,ge)!==-1)&&!ye&&(h("false write response, pause",Ce._readableState.awaitDrain),Ce._readableState.awaitDrain++,Pe=!0),Ce.pause())}function Oe(Re){h("onerror",Re),Ve(),ge.removeListener("error",Oe),_(ge,"error")===0&&ge.emit("error",Re)}R(ge,"error",Oe);function Ue(){ge.removeListener("finish",je),Ve()}ge.once("close",Ue);function je(){h("onfinish"),ge.removeListener("close",Ue),Ve()}ge.once("finish",je);function Ve(){h("unpipe"),Ce.unpipe(ge)}return ge.emit("pipe",Ce),ae.flowing||(h("pipe resume"),Ce.resume()),ge};function z(ge){return function(){var fe=ge._readableState;h("pipeOnDrain",fe.awaitDrain),fe.awaitDrain&&fe.awaitDrain--,fe.awaitDrain===0&&_(ge,"data")&&(fe.flowing=!0,ce(ge))}}w.prototype.unpipe=function(ge){var fe=this._readableState,Ce={hasUnpiped:!1};if(fe.pipesCount===0)return this;if(fe.pipesCount===1)return ge&&ge!==fe.pipes?this:(ge||(ge=fe.pipes),fe.pipes=null,fe.pipesCount=0,fe.flowing=!1,ge&&ge.emit("unpipe",this,Ce),this);if(!ge){var ae=fe.pipes,Q=fe.pipesCount;fe.pipes=null,fe.pipesCount=0,fe.flowing=!1;for(var J=0;J<Q;J++)ae[J].emit("unpipe",this,Ce);return this}var Z=De(fe.pipes,ge);return Z===-1?this:(fe.pipes.splice(Z,1),fe.pipesCount-=1,fe.pipesCount===1&&(fe.pipes=fe.pipes[0]),ge.emit("unpipe",this,Ce),this)},w.prototype.on=function(ge,fe){var Ce=r.prototype.on.call(this,ge,fe);if(ge==="data")this._readableState.flowing!==!1&&this.resume();else if(ge==="readable"){var ae=this._readableState;!ae.endEmitted&&!ae.readableListening&&(ae.readableListening=ae.needReadable=!0,ae.emittedReadable=!1,ae.reading?ae.length&&C(this):T.nextTick(q,this))}return Ce},w.prototype.addListener=w.prototype.on;function q(ge){h("readable nexttick read 0"),ge.read(0)}w.prototype.resume=function(){var ge=this._readableState;return ge.flowing||(h("resume"),ge.flowing=!0,$(this,ge)),this};function $(ge,fe){fe.resumeScheduled||(fe.resumeScheduled=!0,T.nextTick(re,ge,fe))}function re(ge,fe){fe.reading||(h("resume read 0"),ge.read(0)),fe.resumeScheduled=!1,fe.awaitDrain=0,ge.emit("resume"),ce(ge),fe.flowing&&!fe.reading&&ge.read(0)}w.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function ce(ge){var fe=ge._readableState;for(h("flow",fe.flowing);fe.flowing&&ge.read()!==null;);}w.prototype.wrap=function(ge){var fe=this,Ce=this._readableState,ae=!1;ge.on("end",function(){if(h("wrapped end"),Ce.decoder&&!Ce.ended){var Z=Ce.decoder.end();Z&&Z.length&&fe.push(Z)}fe.push(null)}),ge.on("data",function(Z){if(h("wrapped data"),Ce.decoder&&(Z=Ce.decoder.write(Z)),Ce.objectMode&&Z==null)return;if(!Ce.objectMode&&(!Z||!Z.length))return;var pe=fe.push(Z);pe||(ae=!0,ge.pause())});for(var Q in ge)this[Q]===void 0&&typeof ge[Q]=="function"&&(this[Q]=function(Z){return function(){return ge[Z].apply(ge,arguments)}}(Q));for(var J=0;J<x.length;J++)ge.on(x[J],this.emit.bind(this,x[J]));return this._read=function(Z){h("wrapped _read",Z),ae&&(ae=!1,ge.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=ne;function ne(ge,fe){if(fe.length===0)return null;var Ce;return fe.objectMode?Ce=fe.buffer.shift():!ge||ge>=fe.length?(fe.decoder?Ce=fe.buffer.join(""):fe.buffer.length===1?Ce=fe.buffer.head.data:Ce=fe.buffer.concat(fe.length),fe.buffer.clear()):Ce=me(ge,fe.buffer,fe.decoder),Ce}function me(ge,fe,Ce){var ae;return ge<fe.head.data.length?(ae=fe.head.data.slice(0,ge),fe.head.data=fe.head.data.slice(ge)):ge===fe.head.data.length?ae=fe.shift():ae=Ce?be(ge,fe):he(ge,fe),ae}function be(ge,fe){var Ce=fe.head,ae=1,Q=Ce.data;for(ge-=Q.length;Ce=Ce.next;){var J=Ce.data,Z=ge>J.length?J.length:ge;if(Z===J.length?Q+=J:Q+=J.slice(0,ge),ge-=Z,ge===0){Z===J.length?(++ae,Ce.next?fe.head=Ce.next:fe.head=fe.tail=null):(fe.head=Ce,Ce.data=J.slice(Z));break}++ae}return fe.length-=ae,Q}function he(ge,fe){var Ce=n.allocUnsafe(ge),ae=fe.head,Q=1;for(ae.data.copy(Ce),ge-=ae.data.length;ae=ae.next;){var J=ae.data,Z=ge>J.length?J.length:ge;if(J.copy(Ce,Ce.length-ge,0,Z),ge-=Z,ge===0){Z===J.length?(++Q,ae.next?fe.head=ae.next:fe.head=fe.tail=null):(fe.head=ae,ae.data=J.slice(Z));break}++Q}return fe.length-=Q,Ce}function se(ge){var fe=ge._readableState;if(fe.length>0)throw new Error('"endReadable()" called on non-empty stream');fe.endEmitted||(fe.ended=!0,T.nextTick(_e,fe,ge))}function _e(ge,fe){!ge.endEmitted&&ge.length===0&&(ge.endEmitted=!0,fe.readable=!1,fe.emit("end"))}function De(ge,fe){for(var Ce=0,ae=ge.length;Ce<ae;Ce++)if(ge[Ce]===fe)return Ce;return-1}}).call(this,W("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?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(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/create"),M=G(B);function G(E){return E&&E.__esModule?E:{default:E}}ee.exports=i;var X=W("./_stream_duplex"),K=(0,M.default)(W("core-util-is"));K.inherits=W("inherits"),K.inherits(i,X);function N(E,l){var _=this._transformState;_.transforming=!1;var r=_.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));_.writechunk=null,_.writecb=null,l!=null&&this.push(l),r(E);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function i(E){if(!(this instanceof i))return new i(E);X.call(this,E),this._transformState={afterTransform:N.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,E&&(typeof E.transform=="function"&&(this._transform=E.transform),typeof E.flush=="function"&&(this._flush=E.flush)),this.on("prefinish",T)}function T(){var E=this;typeof this._flush=="function"?this._flush(function(l,_){e(E,l,_)}):e(this,null,null)}i.prototype.push=function(E,l){return this._transformState.needTransform=!1,X.prototype.push.call(this,E,l)},i.prototype._transform=function(E,l,_){throw new Error("_transform() is not implemented")},i.prototype._write=function(E,l,_){var r=this._transformState;if(r.writecb=_,r.writechunk=E,r.writeencoding=l,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},i.prototype._read=function(E){var l=this._transformState;l.writechunk!==null&&l.writecb&&!l.transforming?(l.transforming=!0,this._transform(l.writechunk,l.writeencoding,l.afterTransform)):l.needTransform=!0},i.prototype._destroy=function(E,l){var _=this;X.prototype._destroy.call(this,E,function(r){l(r),_.emit("close")})};function e(E,l,_){if(l)return E.emit("error",l);if(_!=null&&E.push(_),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)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(W,ee,L){(function(B,M){"use strict";var G=W("babel-runtime/core-js/object/define-property"),X=r(G),K=W("babel-runtime/core-js/symbol/has-instance"),N=r(K),i=W("babel-runtime/core-js/symbol"),T=r(i),e=W("babel-runtime/core-js/object/create"),E=r(e),l=W("babel-runtime/core-js/set-immediate"),_=r(l);function r(he){return he&&he.__esModule?he:{default:he}}var n=W("process-nextick-args");ee.exports=P;function o(he,se,_e){this.chunk=he,this.encoding=se,this.callback=_e,this.next=null}function c(he){var se=this;this.next=null,this.entry=null,this.finish=function(){be(se,he)}}var v=!B.browser&&["v0.10","v0.9."].indexOf(B.version.slice(0,5))>-1?_.default:n.nextTick,f;P.WritableState=D;var y=(0,E.default)(W("core-util-is"));y.inherits=W("inherits");var h={deprecate:W("util-deprecate")},b=W("./internal/streams/stream"),m=W("safe-buffer").Buffer,d=M.Uint8Array||function(){};function x(he){return m.from(he)}function R(he){return m.isBuffer(he)||he instanceof d}var O=W("./internal/streams/destroy");y.inherits(P,b);function w(){}function D(he,se){f=f||W("./_stream_duplex"),he=he||{};var _e=se instanceof f;this.objectMode=!!he.objectMode,_e&&(this.objectMode=this.objectMode||!!he.writableObjectMode);var De=he.highWaterMark,ge=he.writableHighWaterMark,fe=this.objectMode?16:16*1024;De||De===0?this.highWaterMark=De:_e&&(ge||ge===0)?this.highWaterMark=ge:this.highWaterMark=fe,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 Ce=he.decodeStrings===!1;this.decodeStrings=!Ce,this.defaultEncoding=he.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ae){p(se,ae)},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 c(this)}D.prototype.getBuffer=function(){for(var se=this.bufferedRequest,_e=[];se;)_e.push(se),se=se.next;return _e},function(){try{Object.defineProperty(D.prototype,"buffer",{get:h.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(he){}}();var A;typeof T.default=="function"&&N.default&&typeof Function.prototype[N.default]=="function"?(A=Function.prototype[N.default],(0,X.default)(P,N.default,{value:function(se){return A.call(this,se)?!0:this!==P?!1:se&&se._writableState instanceof D}})):A=function(se){return se instanceof this};function P(he){if(f=f||W("./_stream_duplex"),!A.call(P,this)&&!(this instanceof f))return new P(he);this._writableState=new D(he,this),this.writable=!0,he&&(typeof he.write=="function"&&(this._write=he.write),typeof he.writev=="function"&&(this._writev=he.writev),typeof he.destroy=="function"&&(this._destroy=he.destroy),typeof he.final=="function"&&(this._final=he.final)),b.call(this)}P.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function I(he,se){var _e=new Error("write after end");he.emit("error",_e),n.nextTick(se,_e)}function u(he,se,_e,De){var ge=!0,fe=!1;return _e===null?fe=new TypeError("May not write null values to stream"):typeof _e!="string"&&_e!==void 0&&!se.objectMode&&(fe=new TypeError("Invalid non-string/buffer chunk")),fe&&(he.emit("error",fe),n.nextTick(De,fe),ge=!1),ge}P.prototype.write=function(he,se,_e){var De=this._writableState,ge=!1,fe=!De.objectMode&&R(he);return fe&&!m.isBuffer(he)&&(he=x(he)),typeof se=="function"&&(_e=se,se=null),fe?se="buffer":se||(se=De.defaultEncoding),typeof _e!="function"&&(_e=w),De.ended?I(this,_e):(fe||u(this,De,he,_e))&&(De.pendingcb++,ge=g(this,De,fe,he,se,_e)),ge},P.prototype.cork=function(){var he=this._writableState;he.corked++},P.prototype.uncork=function(){var he=this._writableState;he.corked&&(he.corked--,!he.writing&&!he.corked&&!he.finished&&!he.bufferProcessing&&he.bufferedRequest&&q(this,he))},P.prototype.setDefaultEncoding=function(se){if(typeof se=="string"&&(se=se.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((se+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+se);return this._writableState.defaultEncoding=se,this};function k(he,se,_e){return!he.objectMode&&he.decodeStrings!==!1&&typeof se=="string"&&(se=m.from(se,_e)),se}Object.defineProperty(P.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function g(he,se,_e,De,ge,fe){if(!_e){var Ce=k(se,De,ge);De!==Ce&&(_e=!0,ge="buffer",De=Ce)}var ae=se.objectMode?1:De.length;se.length+=ae;var Q=se.length<se.highWaterMark;if(Q||(se.needDrain=!0),se.writing||se.corked){var J=se.lastBufferedRequest;se.lastBufferedRequest={chunk:De,encoding:ge,isBuf:_e,callback:fe,next:null},J?J.next=se.lastBufferedRequest:se.bufferedRequest=se.lastBufferedRequest,se.bufferedRequestCount+=1}else a(he,se,!1,ae,De,ge,fe);return Q}function a(he,se,_e,De,ge,fe,Ce){se.writelen=De,se.writecb=Ce,se.writing=!0,se.sync=!0,_e?he._writev(ge,se.onwrite):he._write(ge,fe,se.onwrite),se.sync=!1}function C(he,se,_e,De,ge){--se.pendingcb,_e?(n.nextTick(ge,De),n.nextTick(ne,he,se),he._writableState.errorEmitted=!0,he.emit("error",De)):(ge(De),he._writableState.errorEmitted=!0,he.emit("error",De),ne(he,se))}function S(he){he.writing=!1,he.writecb=null,he.length-=he.writelen,he.writelen=0}function p(he,se){var _e=he._writableState,De=_e.sync,ge=_e.writecb;if(S(_e),se)C(he,_e,De,se,ge);else{var fe=$(_e);!fe&&!_e.corked&&!_e.bufferProcessing&&_e.bufferedRequest&&q(he,_e),De?v(U,he,_e,fe,ge):U(he,_e,fe,ge)}}function U(he,se,_e,De){_e||z(he,se),se.pendingcb--,De(),ne(he,se)}function z(he,se){se.length===0&&se.needDrain&&(se.needDrain=!1,he.emit("drain"))}function q(he,se){se.bufferProcessing=!0;var _e=se.bufferedRequest;if(he._writev&&_e&&_e.next){var De=se.bufferedRequestCount,ge=new Array(De),fe=se.corkedRequestsFree;fe.entry=_e;for(var Ce=0,ae=!0;_e;)ge[Ce]=_e,_e.isBuf||(ae=!1),_e=_e.next,Ce+=1;ge.allBuffers=ae,a(he,se,!0,se.length,ge,"",fe.finish),se.pendingcb++,se.lastBufferedRequest=null,fe.next?(se.corkedRequestsFree=fe.next,fe.next=null):se.corkedRequestsFree=new c(se),se.bufferedRequestCount=0}else{for(;_e;){var Q=_e.chunk,J=_e.encoding,Z=_e.callback,pe=se.objectMode?1:Q.length;if(a(he,se,!1,pe,Q,J,Z),_e=_e.next,se.bufferedRequestCount--,se.writing)break}_e===null&&(se.lastBufferedRequest=null)}se.bufferedRequest=_e,se.bufferProcessing=!1}P.prototype._write=function(he,se,_e){_e(new Error("_write() is not implemented"))},P.prototype._writev=null,P.prototype.end=function(he,se,_e){var De=this._writableState;typeof he=="function"?(_e=he,he=null,se=null):typeof se=="function"&&(_e=se,se=null),he!=null&&this.write(he,se),De.corked&&(De.corked=1,this.uncork()),!De.ending&&!De.finished&&me(this,De,_e)};function $(he){return he.ending&&he.length===0&&he.bufferedRequest===null&&!he.finished&&!he.writing}function re(he,se){he._final(function(_e){se.pendingcb--,_e&&he.emit("error",_e),se.prefinished=!0,he.emit("prefinish"),ne(he,se)})}function ce(he,se){!se.prefinished&&!se.finalCalled&&(typeof he._final=="function"?(se.pendingcb++,se.finalCalled=!0,n.nextTick(re,he,se)):(se.prefinished=!0,he.emit("prefinish")))}function ne(he,se){var _e=$(se);return _e&&(ce(he,se),se.pendingcb===0&&(se.finished=!0,he.emit("finish"))),_e}function me(he,se,_e){se.ending=!0,ne(he,se),_e&&(se.finished?n.nextTick(_e):he.once("finish",_e)),se.ended=!0,he.writable=!1}function be(he,se,_e){var De=he.entry;for(he.entry=null;De;){var ge=De.callback;se.pendingcb--,ge(_e),De=De.next}se.corkedRequestsFree?se.corkedRequestsFree.next=he:se.corkedRequestsFree=he}Object.defineProperty(P.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(se){if(!this._writableState)return;this._writableState.destroyed=se}}),P.prototype.destroy=O.destroy,P.prototype._undestroy=O.undestroy,P.prototype._destroy=function(he,se){this.end(),se(he)}}).call(this,W("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?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(W,ee,L){"use strict";function B(K,N){if(!(K instanceof N))throw new TypeError("Cannot call a class as a function")}var M=W("safe-buffer").Buffer,G=W("util");function X(K,N,i){K.copy(N,i)}ee.exports=function(){function K(){B(this,K),this.head=null,this.tail=null,this.length=0}return K.prototype.push=function(i){var T={data:i,next:null};this.length>0?this.tail.next=T:this.head=T,this.tail=T,++this.length},K.prototype.unshift=function(i){var T={data:i,next:this.head};this.length===0&&(this.tail=T),this.head=T,++this.length},K.prototype.shift=function(){if(this.length===0)return;var i=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,i},K.prototype.clear=function(){this.head=this.tail=null,this.length=0},K.prototype.join=function(i){if(this.length===0)return"";for(var T=this.head,e=""+T.data;T=T.next;)e+=i+T.data;return e},K.prototype.concat=function(i){if(this.length===0)return M.alloc(0);if(this.length===1)return this.head.data;for(var T=M.allocUnsafe(i>>>0),e=this.head,E=0;e;)X(e.data,T,E),E+=e.data.length,e=e.next;return T},K}(),G&&G.inspect&&G.inspect.custom&&(ee.exports.prototype[G.inspect.custom]=function(){var K=G.inspect({length:this.length});return this.constructor.name+" "+K})},{"safe-buffer":228,util:71}],220:[function(W,ee,L){"use strict";var B=W("process-nextick-args");function M(K,N){var i=this,T=this._readableState&&this._readableState.destroyed,e=this._writableState&&this._writableState.destroyed;return T||e?(N?N(K):K&&(!this._writableState||!this._writableState.errorEmitted)&&B.nextTick(X,this,K),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(K||null,function(E){!N&&E?(B.nextTick(X,i,E),i._writableState&&(i._writableState.errorEmitted=!0)):N&&N(E)}),this)}function G(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function X(K,N){K.emit("error",N)}ee.exports={destroy:M,undestroy:G}},{"process-nextick-args":207}],221:[function(W,ee,L){"use strict";ee.exports=W("events").EventEmitter},{events:192}],222:[function(W,ee,L){ee.exports=W("./readable").PassThrough},{"./readable":223}],223:[function(W,ee,L){L=ee.exports=W("./lib/_stream_readable.js"),L.Stream=L,L.Readable=L,L.Writable=W("./lib/_stream_writable.js"),L.Duplex=W("./lib/_stream_duplex.js"),L.Transform=W("./lib/_stream_transform.js"),L.PassThrough=W("./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(W,ee,L){ee.exports=W("./readable").Transform},{"./readable":223}],225:[function(W,ee,L){ee.exports=W("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(W,ee,L){var B=function(){return this}()||Function("return this")(),M=B.regeneratorRuntime&&Object.getOwnPropertyNames(B).indexOf("regeneratorRuntime")>=0,G=M&&B.regeneratorRuntime;if(B.regeneratorRuntime=void 0,ee.exports=W("./runtime"),M)B.regeneratorRuntime=G;else try{delete B.regeneratorRuntime}catch(X){B.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(W,ee,L){!function(B){"use strict";var M=Object.prototype,G=M.hasOwnProperty,X,K=typeof Symbol=="function"?Symbol:{},N=K.iterator||"@@iterator",i=K.asyncIterator||"@@asyncIterator",T=K.toStringTag||"@@toStringTag",e=typeof ee=="object",E=B.regeneratorRuntime;if(E){e&&(ee.exports=E);return}E=B.regeneratorRuntime=e?ee.exports:{};function l(g,a,C,S){var p=a&&a.prototype instanceof f?a:f,U=Object.create(p.prototype),z=new I(S||[]);return U._invoke=w(g,C,z),U}E.wrap=l;function _(g,a,C){try{return{type:"normal",arg:g.call(a,C)}}catch(S){return{type:"throw",arg:S}}}var r="suspendedStart",n="suspendedYield",o="executing",c="completed",v={};function f(){}function y(){}function h(){}var b={};b[N]=function(){return this};var m=Object.getPrototypeOf,d=m&&m(m(u([])));d&&d!==M&&G.call(d,N)&&(b=d);var x=h.prototype=f.prototype=Object.create(b);y.prototype=x.constructor=h,h.constructor=y,h[T]=y.displayName="GeneratorFunction";function R(g){["next","throw","return"].forEach(function(a){g[a]=function(C){return this._invoke(a,C)}})}E.isGeneratorFunction=function(g){var a=typeof g=="function"&&g.constructor;return a?a===y||(a.displayName||a.name)==="GeneratorFunction":!1},E.mark=function(g){return Object.setPrototypeOf?Object.setPrototypeOf(g,h):(g.__proto__=h,T in g||(g[T]="GeneratorFunction")),g.prototype=Object.create(x),g},E.awrap=function(g){return{__await:g}};function O(g){function a(p,U,z,q){var $=_(g[p],g,U);if($.type==="throw")q($.arg);else{var re=$.arg,ce=re.value;return ce&&typeof ce=="object"&&G.call(ce,"__await")?Promise.resolve(ce.__await).then(function(ne){a("next",ne,z,q)},function(ne){a("throw",ne,z,q)}):Promise.resolve(ce).then(function(ne){re.value=ne,z(re)},q)}}var C;function S(p,U){function z(){return new Promise(function(q,$){a(p,U,q,$)})}return C=C?C.then(z,z):z()}this._invoke=S}R(O.prototype),O.prototype[i]=function(){return this},E.AsyncIterator=O,E.async=function(g,a,C,S){var p=new O(l(g,a,C,S));return E.isGeneratorFunction(a)?p:p.next().then(function(U){return U.done?U.value:p.next()})};function w(g,a,C){var S=r;return function(U,z){if(S===o)throw new Error("Generator is already running");if(S===c){if(U==="throw")throw z;return k()}for(C.method=U,C.arg=z;;){var q=C.delegate;if(q){var $=D(q,C);if($){if($===v)continue;return $}}if(C.method==="next")C.sent=C._sent=C.arg;else if(C.method==="throw"){if(S===r)throw S=c,C.arg;C.dispatchException(C.arg)}else C.method==="return"&&C.abrupt("return",C.arg);S=o;var re=_(g,a,C);if(re.type==="normal"){if(S=C.done?c:n,re.arg===v)continue;return{value:re.arg,done:C.done}}else re.type==="throw"&&(S=c,C.method="throw",C.arg=re.arg)}}}function D(g,a){var C=g.iterator[a.method];if(C===X){if(a.delegate=null,a.method==="throw"){if(g.iterator.return&&(a.method="return",a.arg=X,D(g,a),a.method==="throw"))return v;a.method="throw",a.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var S=_(C,g.iterator,a.arg);if(S.type==="throw")return a.method="throw",a.arg=S.arg,a.delegate=null,v;var p=S.arg;if(!p)return a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,v;if(p.done)a[g.resultName]=p.value,a.next=g.nextLoc,a.method!=="return"&&(a.method="next",a.arg=X);else return p;return a.delegate=null,v}R(x),x[T]="Generator",x[N]=function(){return this},x.toString=function(){return"[object Generator]"};function A(g){var a={tryLoc:g[0]};1 in g&&(a.catchLoc=g[1]),2 in g&&(a.finallyLoc=g[2],a.afterLoc=g[3]),this.tryEntries.push(a)}function P(g){var a=g.completion||{};a.type="normal",delete a.arg,g.completion=a}function I(g){this.tryEntries=[{tryLoc:"root"}],g.forEach(A,this),this.reset(!0)}E.keys=function(g){var a=[];for(var C in g)a.push(C);return a.reverse(),function S(){for(;a.length;){var p=a.pop();if(p in g)return S.value=p,S.done=!1,S}return S.done=!0,S}};function u(g){if(g){var a=g[N];if(a)return a.call(g);if(typeof g.next=="function")return g;if(!isNaN(g.length)){var C=-1,S=function p(){for(;++C<g.length;)if(G.call(g,C))return p.value=g[C],p.done=!1,p;return p.value=X,p.done=!0,p};return S.next=S}}return{next:k}}E.values=u;function k(){return{value:X,done:!0}}I.prototype={constructor:I,reset:function(g){if(this.prev=0,this.next=0,this.sent=this._sent=X,this.done=!1,this.delegate=null,this.method="next",this.arg=X,this.tryEntries.forEach(P),!g)for(var a in this)a.charAt(0)==="t"&&G.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=X)},stop:function(){this.done=!0;var g=this.tryEntries[0],a=g.completion;if(a.type==="throw")throw a.arg;return this.rval},dispatchException:function(g){if(this.done)throw g;var a=this;function C($,re){return U.type="throw",U.arg=g,a.next=$,re&&(a.method="next",a.arg=X),!!re}for(var S=this.tryEntries.length-1;S>=0;--S){var p=this.tryEntries[S],U=p.completion;if(p.tryLoc==="root")return C("end");if(p.tryLoc<=this.prev){var z=G.call(p,"catchLoc"),q=G.call(p,"finallyLoc");if(z&&q){if(this.prev<p.catchLoc)return C(p.catchLoc,!0);if(this.prev<p.finallyLoc)return C(p.finallyLoc)}else if(z){if(this.prev<p.catchLoc)return C(p.catchLoc,!0)}else if(q){if(this.prev<p.finallyLoc)return C(p.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(g,a){for(var C=this.tryEntries.length-1;C>=0;--C){var S=this.tryEntries[C];if(S.tryLoc<=this.prev&&G.call(S,"finallyLoc")&&this.prev<S.finallyLoc){var p=S;break}}p&&(g==="break"||g==="continue")&&p.tryLoc<=a&&a<=p.finallyLoc&&(p=null);var U=p?p.completion:{};return U.type=g,U.arg=a,p?(this.method="next",this.next=p.finallyLoc,v):this.complete(U)},complete:function(g,a){if(g.type==="throw")throw g.arg;return g.type==="break"||g.type==="continue"?this.next=g.arg:g.type==="return"?(this.rval=this.arg=g.arg,this.method="return",this.next="end"):g.type==="normal"&&a&&(this.next=a),v},finish:function(g){for(var a=this.tryEntries.length-1;a>=0;--a){var C=this.tryEntries[a];if(C.finallyLoc===g)return this.complete(C.completion,C.afterLoc),P(C),v}},catch:function(g){for(var a=this.tryEntries.length-1;a>=0;--a){var C=this.tryEntries[a];if(C.tryLoc===g){var S=C.completion;if(S.type==="throw"){var p=S.arg;P(C)}return p}}throw new Error("illegal catch attempt")},delegateYield:function(g,a,C){return this.delegate={iterator:u(g),resultName:a,nextLoc:C},this.method==="next"&&(this.arg=X),v}}}(function(){return this}()||Function("return this")())},{}],228:[function(W,ee,L){var B=W("buffer"),M=B.Buffer;function G(K,N){for(var i in K)N[i]=K[i]}M.from&&M.alloc&&M.allocUnsafe&&M.allocUnsafeSlow?ee.exports=B:(G(B,L),L.Buffer=X);function X(K,N,i){return M(K,N,i)}G(M,X),X.from=function(K,N,i){if(typeof K=="number")throw new TypeError("Argument must not be a number");return M(K,N,i)},X.alloc=function(K,N,i){if(typeof K!="number")throw new TypeError("Argument must be a number");var T=M(K);return N!==void 0?typeof i=="string"?T.fill(N,i):T.fill(N):T.fill(0),T},X.allocUnsafe=function(K){if(typeof K!="number")throw new TypeError("Argument must be a number");return M(K)},X.allocUnsafeSlow=function(K){if(typeof K!="number")throw new TypeError("Argument must be a number");return B.SlowBuffer(K)}},{buffer:73}],229:[function(W,ee,L){(function(B){"use strict";var M=W("babel-runtime/core-js/string/from-code-point"),G=n(M),X=W("babel-runtime/core-js/json/stringify"),K=n(X),N=W("babel-runtime/helpers/typeof"),i=n(N),T=W("babel-runtime/core-js/object/define-property"),e=n(T),E=W("babel-runtime/core-js/object/keys"),l=n(E),_=W("babel-runtime/core-js/object/create"),r=n(_);function n(o){return o&&o.__esModule?o:{default:o}}(function(o){o.parser=function(J,Z){return new v(J,Z)},o.SAXParser=v,o.SAXStream=x,o.createStream=d,o.MAX_BUFFER_LENGTH=64*1024;var c=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];o.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function v(J,Z){if(!(this instanceof v))return new v(J,Z);var pe=this;y(pe),pe.q=pe.c="",pe.bufferCheckPosition=o.MAX_BUFFER_LENGTH,pe.opt=Z||{},pe.opt.lowercase=pe.opt.lowercase||pe.opt.lowercasetags,pe.looseCase=pe.opt.lowercase?"toLowerCase":"toUpperCase",pe.tags=[],pe.closed=pe.closedRoot=pe.sawRoot=!1,pe.tag=pe.error=null,pe.strict=!!J,pe.noscript=!!(J||pe.opt.noscript),pe.state=U.BEGIN,pe.strictEntities=pe.opt.strictEntities,pe.ENTITIES=pe.strictEntities?(0,r.default)(o.XML_ENTITIES):(0,r.default)(o.ENTITIES),pe.attribList=[],pe.opt.xmlns&&(pe.ns=(0,r.default)(A)),pe.trackPosition=pe.opt.position!==!1,pe.trackPosition&&(pe.position=pe.line=pe.column=0),q(pe,"onready")}r.default||(Object.create=function(J){function Z(){}Z.prototype=J;var pe=new Z;return pe}),l.default||(Object.keys=function(J){var Z=[];for(var pe in J)J.hasOwnProperty(pe)&&Z.push(pe);return Z});function f(J){for(var Z=Math.max(o.MAX_BUFFER_LENGTH,10),pe=0,le=0,ye=c.length;le<ye;le++){var Te=J[c[le]].length;if(Te>Z)switch(c[le]){case"textNode":re(J);break;case"cdata":$(J,"oncdata",J.cdata),J.cdata="";break;case"script":$(J,"onscript",J.script),J.script="";break;default:ne(J,"Max buffer length exceeded: "+c[le])}pe=Math.max(pe,Te)}var Pe=o.MAX_BUFFER_LENGTH-pe;J.bufferCheckPosition=Pe+J.position}function y(J){for(var Z=0,pe=c.length;Z<pe;Z++)J[c[Z]]=""}function h(J){re(J),J.cdata!==""&&($(J,"oncdata",J.cdata),J.cdata=""),J.script!==""&&($(J,"onscript",J.script),J.script="")}v.prototype={end:function(){me(this)},write:Q,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){h(this)}};var b;try{b=W("stream").Stream}catch(J){b=function(){}}var m=o.EVENTS.filter(function(J){return J!=="error"&&J!=="end"});function d(J,Z){return new x(J,Z)}function x(J,Z){if(!(this instanceof x))return new x(J,Z);b.apply(this),this._parser=new v(J,Z),this.writable=!0,this.readable=!0;var pe=this;this._parser.onend=function(){pe.emit("end")},this._parser.onerror=function(le){pe.emit("error",le),pe._parser.error=null},this._decoder=null,m.forEach(function(le){(0,e.default)(pe,"on"+le,{get:function(){return pe._parser["on"+le]},set:function(Te){if(!Te)return pe.removeAllListeners(le),pe._parser["on"+le]=Te,Te;pe.on(le,Te)},enumerable:!0,configurable:!1})})}x.prototype=(0,r.default)(b.prototype,{constructor:{value:x}}),x.prototype.write=function(J){if(typeof B=="function"&&typeof B.isBuffer=="function"&&B.isBuffer(J)){if(!this._decoder){var Z=W("string_decoder").StringDecoder;this._decoder=new Z("utf8")}J=this._decoder.write(J)}return this._parser.write(J.toString()),this.emit("data",J),!0},x.prototype.end=function(J){return J&&J.length&&this.write(J),this._parser.end(),!0},x.prototype.on=function(J,Z){var pe=this;return!pe._parser["on"+J]&&m.indexOf(J)!==-1&&(pe._parser["on"+J]=function(){var le=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);le.splice(0,0,J),pe.emit.apply(pe,le)}),b.prototype.on.call(pe,J,Z)};var R="[CDATA[",O="DOCTYPE",w="http://www.w3.org/XML/1998/namespace",D="http://www.w3.org/2000/xmlns/",A={xml:w,xmlns:D},P=/[:_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]/,I=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,u=/[#:_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]/,k=/[#:_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 g(J){return J===" "||J===`
|
|
|
`||J==="\r"||J===" "}function a(J){return J==='"'||J==="'"}function C(J){return J===">"||g(J)}function S(J,Z){return J.test(Z)}function p(J,Z){return!S(J,Z)}var U=0;o.STATE={BEGIN:U++,BEGIN_WHITESPACE:U++,TEXT:U++,TEXT_ENTITY:U++,OPEN_WAKA:U++,SGML_DECL:U++,SGML_DECL_QUOTED:U++,DOCTYPE:U++,DOCTYPE_QUOTED:U++,DOCTYPE_DTD:U++,DOCTYPE_DTD_QUOTED:U++,COMMENT_STARTING:U++,COMMENT:U++,COMMENT_ENDING:U++,COMMENT_ENDED:U++,CDATA:U++,CDATA_ENDING:U++,CDATA_ENDING_2:U++,PROC_INST:U++,PROC_INST_BODY:U++,PROC_INST_ENDING:U++,OPEN_TAG:U++,OPEN_TAG_SLASH:U++,ATTRIB:U++,ATTRIB_NAME:U++,ATTRIB_NAME_SAW_WHITE:U++,ATTRIB_VALUE:U++,ATTRIB_VALUE_QUOTED:U++,ATTRIB_VALUE_CLOSED:U++,ATTRIB_VALUE_UNQUOTED:U++,ATTRIB_VALUE_ENTITY_Q:U++,ATTRIB_VALUE_ENTITY_U:U++,CLOSE_TAG:U++,CLOSE_TAG_SAW_WHITE:U++,SCRIPT:U++,SCRIPT_ENDING:U++},o.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},o.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,l.default)(o.ENTITIES).forEach(function(J){var Z=o.ENTITIES[J],pe=typeof Z=="number"?String.fromCharCode(Z):Z;o.ENTITIES[J]=pe});for(var z in o.STATE)o.STATE[o.STATE[z]]=z;U=o.STATE;function q(J,Z,pe){J[Z]&&J[Z](pe)}function $(J,Z,pe){J.textNode&&re(J),q(J,Z,pe)}function re(J){J.textNode=ce(J.opt,J.textNode),J.textNode&&q(J,"ontext",J.textNode),J.textNode=""}function ce(J,Z){return J.trim&&(Z=Z.trim()),J.normalize&&(Z=Z.replace(/\s+/g," ")),Z}function ne(J,Z){return re(J),J.trackPosition&&(Z+=`
|
|
|
Line: `+J.line+`
|
|
|
Column: `+J.column+`
|
|
|
Char: `+J.c),Z=new Error(Z),J.error=Z,q(J,"onerror",Z),J}function me(J){return J.sawRoot&&!J.closedRoot&&be(J,"Unclosed root tag"),J.state!==U.BEGIN&&J.state!==U.BEGIN_WHITESPACE&&J.state!==U.TEXT&&ne(J,"Unexpected end"),re(J),J.c="",J.closed=!0,q(J,"onend"),v.call(J,J.strict,J.opt),J}function be(J,Z){if((typeof J=="undefined"?"undefined":(0,i.default)(J))!=="object"||!(J instanceof v))throw new Error("bad call to strictFail");J.strict&&ne(J,Z)}function he(J){J.strict||(J.tagName=J.tagName[J.looseCase]());var Z=J.tags[J.tags.length-1]||J,pe=J.tag={name:J.tagName,attributes:{}};J.opt.xmlns&&(pe.ns=Z.ns),J.attribList.length=0,$(J,"onopentagstart",pe)}function se(J,Z){var pe=J.indexOf(":"),le=pe<0?["",J]:J.split(":"),ye=le[0],Te=le[1];return Z&&J==="xmlns"&&(ye="xmlns",Te=""),{prefix:ye,local:Te}}function _e(J){if(J.strict||(J.attribName=J.attribName[J.looseCase]()),J.attribList.indexOf(J.attribName)!==-1||J.tag.attributes.hasOwnProperty(J.attribName)){J.attribName=J.attribValue="";return}if(J.opt.xmlns){var Z=se(J.attribName,!0),pe=Z.prefix,le=Z.local;if(pe==="xmlns")if(le==="xml"&&J.attribValue!==w)be(J,"xml: prefix must be bound to "+w+`
|
|
|
Actual: `+J.attribValue);else if(le==="xmlns"&&J.attribValue!==D)be(J,"xmlns: prefix must be bound to "+D+`
|
|
|
Actual: `+J.attribValue);else{var ye=J.tag,Te=J.tags[J.tags.length-1]||J;ye.ns===Te.ns&&(ye.ns=(0,r.default)(Te.ns)),ye.ns[le]=J.attribValue}J.attribList.push([J.attribName,J.attribValue])}else J.tag.attributes[J.attribName]=J.attribValue,$(J,"onattribute",{name:J.attribName,value:J.attribValue});J.attribName=J.attribValue=""}function De(J,Z){if(J.opt.xmlns){var pe=J.tag,le=se(J.tagName);pe.prefix=le.prefix,pe.local=le.local,pe.uri=pe.ns[le.prefix]||"",pe.prefix&&!pe.uri&&(be(J,"Unbound namespace prefix: "+(0,K.default)(J.tagName)),pe.uri=le.prefix);var ye=J.tags[J.tags.length-1]||J;pe.ns&&ye.ns!==pe.ns&&(0,l.default)(pe.ns).forEach(function(We){$(J,"onopennamespace",{prefix:We,uri:pe.ns[We]})});for(var Te=0,Pe=J.attribList.length;Te<Pe;Te++){var He=J.attribList[Te],Oe=He[0],Ue=He[1],je=se(Oe,!0),Ve=je.prefix,Re=je.local,Xe=Ve===""?"":pe.ns[Ve]||"",Qe={name:Oe,value:Ue,prefix:Ve,local:Re,uri:Xe};Ve&&Ve!=="xmlns"&&!Xe&&(be(J,"Unbound namespace prefix: "+(0,K.default)(Ve)),Qe.uri=Ve),J.tag.attributes[Oe]=Qe,$(J,"onattribute",Qe)}J.attribList.length=0}J.tag.isSelfClosing=!!Z,J.sawRoot=!0,J.tags.push(J.tag),$(J,"onopentag",J.tag),Z||(!J.noscript&&J.tagName.toLowerCase()==="script"?J.state=U.SCRIPT:J.state=U.TEXT,J.tag=null,J.tagName=""),J.attribName=J.attribValue="",J.attribList.length=0}function ge(J){if(!J.tagName){be(J,"Weird empty close tag."),J.textNode+="</>",J.state=U.TEXT;return}if(J.script){if(J.tagName!=="script"){J.script+="</"+J.tagName+">",J.tagName="",J.state=U.SCRIPT;return}$(J,"onscript",J.script),J.script=""}var Z=J.tags.length,pe=J.tagName;J.strict||(pe=pe[J.looseCase]());for(var le=pe;Z--;){var ye=J.tags[Z];if(ye.name!==le)be(J,"Unexpected close tag");else break}if(Z<0){be(J,"Unmatched closing tag: "+J.tagName),J.textNode+="</"+J.tagName+">",J.state=U.TEXT;return}J.tagName=pe;for(var Te=J.tags.length;Te-- >Z;){var Pe=J.tag=J.tags.pop();J.tagName=J.tag.name,$(J,"onclosetag",J.tagName);var He={};for(var Oe in Pe.ns)He[Oe]=Pe.ns[Oe];var Ue=J.tags[J.tags.length-1]||J;J.opt.xmlns&&Pe.ns!==Ue.ns&&(0,l.default)(Pe.ns).forEach(function(je){var Ve=Pe.ns[je];$(J,"onclosenamespace",{prefix:je,uri:Ve})})}Z===0&&(J.closedRoot=!0),J.tagName=J.attribValue=J.attribName="",J.attribList.length=0,J.state=U.TEXT}function fe(J){var Z=J.entity,pe=Z.toLowerCase(),le,ye="";return J.ENTITIES[Z]?J.ENTITIES[Z]:J.ENTITIES[pe]?J.ENTITIES[pe]:(Z=pe,Z.charAt(0)==="#"&&(Z.charAt(1)==="x"?(Z=Z.slice(2),le=parseInt(Z,16),ye=le.toString(16)):(Z=Z.slice(1),le=parseInt(Z,10),ye=le.toString(10))),Z=Z.replace(/^0+/,""),isNaN(le)||ye.toLowerCase()!==Z?(be(J,"Invalid character entity"),"&"+J.entity+";"):(0,G.default)(le))}function Ce(J,Z){Z==="<"?(J.state=U.OPEN_WAKA,J.startTagPosition=J.position):g(Z)||(be(J,"Non-whitespace before first tag."),J.textNode=Z,J.state=U.TEXT)}function ae(J,Z){var pe="";return Z<J.length&&(pe=J.charAt(Z)),pe}function Q(J){var Z=this;if(this.error)throw this.error;if(Z.closed)return ne(Z,"Cannot write after close. Assign an onready handler.");if(J===null)return me(Z);(typeof J=="undefined"?"undefined":(0,i.default)(J))==="object"&&(J=J.toString());for(var pe=0,le="";!(le=ae(J,pe++),Z.c=le,!le);){Z.trackPosition&&(Z.position++,le===`
|
|
|
`?(Z.line++,Z.column=0):Z.column++);switch(Z.state){case U.BEGIN:if(Z.state=U.BEGIN_WHITESPACE,le==="\uFEFF")continue;Ce(Z,le);continue;case U.BEGIN_WHITESPACE:Ce(Z,le);continue;case U.TEXT:if(Z.sawRoot&&!Z.closedRoot){for(var ye=pe-1;le&&le!=="<"&&le!=="&";)le=ae(J,pe++),le&&Z.trackPosition&&(Z.position++,le===`
|
|
|
`?(Z.line++,Z.column=0):Z.column++);Z.textNode+=J.substring(ye,pe-1)}le==="<"&&!(Z.sawRoot&&Z.closedRoot&&!Z.strict)?(Z.state=U.OPEN_WAKA,Z.startTagPosition=Z.position):(!g(le)&&(!Z.sawRoot||Z.closedRoot)&&be(Z,"Text data outside of root node."),le==="&"?Z.state=U.TEXT_ENTITY:Z.textNode+=le);continue;case U.SCRIPT:le==="<"?Z.state=U.SCRIPT_ENDING:Z.script+=le;continue;case U.SCRIPT_ENDING:le==="/"?Z.state=U.CLOSE_TAG:(Z.script+="<"+le,Z.state=U.SCRIPT);continue;case U.OPEN_WAKA:if(le==="!")Z.state=U.SGML_DECL,Z.sgmlDecl="";else if(!g(le))if(S(P,le))Z.state=U.OPEN_TAG,Z.tagName=le;else if(le==="/")Z.state=U.CLOSE_TAG,Z.tagName="";else if(le==="?")Z.state=U.PROC_INST,Z.procInstName=Z.procInstBody="";else{if(be(Z,"Unencoded <"),Z.startTagPosition+1<Z.position){var Te=Z.position-Z.startTagPosition;le=new Array(Te).join(" ")+le}Z.textNode+="<"+le,Z.state=U.TEXT}continue;case U.SGML_DECL:(Z.sgmlDecl+le).toUpperCase()===R?($(Z,"onopencdata"),Z.state=U.CDATA,Z.sgmlDecl="",Z.cdata=""):Z.sgmlDecl+le==="--"?(Z.state=U.COMMENT,Z.comment="",Z.sgmlDecl=""):(Z.sgmlDecl+le).toUpperCase()===O?(Z.state=U.DOCTYPE,(Z.doctype||Z.sawRoot)&&be(Z,"Inappropriately located doctype declaration"),Z.doctype="",Z.sgmlDecl=""):le===">"?($(Z,"onsgmldeclaration",Z.sgmlDecl),Z.sgmlDecl="",Z.state=U.TEXT):(a(le)&&(Z.state=U.SGML_DECL_QUOTED),Z.sgmlDecl+=le);continue;case U.SGML_DECL_QUOTED:le===Z.q&&(Z.state=U.SGML_DECL,Z.q=""),Z.sgmlDecl+=le;continue;case U.DOCTYPE:le===">"?(Z.state=U.TEXT,$(Z,"ondoctype",Z.doctype),Z.doctype=!0):(Z.doctype+=le,le==="["?Z.state=U.DOCTYPE_DTD:a(le)&&(Z.state=U.DOCTYPE_QUOTED,Z.q=le));continue;case U.DOCTYPE_QUOTED:Z.doctype+=le,le===Z.q&&(Z.q="",Z.state=U.DOCTYPE);continue;case U.DOCTYPE_DTD:Z.doctype+=le,le==="]"?Z.state=U.DOCTYPE:a(le)&&(Z.state=U.DOCTYPE_DTD_QUOTED,Z.q=le);continue;case U.DOCTYPE_DTD_QUOTED:Z.doctype+=le,le===Z.q&&(Z.state=U.DOCTYPE_DTD,Z.q="");continue;case U.COMMENT:le==="-"?Z.state=U.COMMENT_ENDING:Z.comment+=le;continue;case U.COMMENT_ENDING:le==="-"?(Z.state=U.COMMENT_ENDED,Z.comment=ce(Z.opt,Z.comment),Z.comment&&$(Z,"oncomment",Z.comment),Z.comment=""):(Z.comment+="-"+le,Z.state=U.COMMENT);continue;case U.COMMENT_ENDED:le!==">"?(be(Z,"Malformed comment"),Z.comment+="--"+le,Z.state=U.COMMENT):Z.state=U.TEXT;continue;case U.CDATA:le==="]"?Z.state=U.CDATA_ENDING:Z.cdata+=le;continue;case U.CDATA_ENDING:le==="]"?Z.state=U.CDATA_ENDING_2:(Z.cdata+="]"+le,Z.state=U.CDATA);continue;case U.CDATA_ENDING_2:le===">"?(Z.cdata&&$(Z,"oncdata",Z.cdata),$(Z,"onclosecdata"),Z.cdata="",Z.state=U.TEXT):le==="]"?Z.cdata+="]":(Z.cdata+="]]"+le,Z.state=U.CDATA);continue;case U.PROC_INST:le==="?"?Z.state=U.PROC_INST_ENDING:g(le)?Z.state=U.PROC_INST_BODY:Z.procInstName+=le;continue;case U.PROC_INST_BODY:if(!Z.procInstBody&&g(le))continue;le==="?"?Z.state=U.PROC_INST_ENDING:Z.procInstBody+=le;continue;case U.PROC_INST_ENDING:le===">"?($(Z,"onprocessinginstruction",{name:Z.procInstName,body:Z.procInstBody}),Z.procInstName=Z.procInstBody="",Z.state=U.TEXT):(Z.procInstBody+="?"+le,Z.state=U.PROC_INST_BODY);continue;case U.OPEN_TAG:S(I,le)?Z.tagName+=le:(he(Z),le===">"?De(Z):le==="/"?Z.state=U.OPEN_TAG_SLASH:(g(le)||be(Z,"Invalid character in tag name"),Z.state=U.ATTRIB));continue;case U.OPEN_TAG_SLASH:le===">"?(De(Z,!0),ge(Z)):(be(Z,"Forward-slash in opening tag not followed by >"),Z.state=U.ATTRIB);continue;case U.ATTRIB:if(g(le))continue;le===">"?De(Z):le==="/"?Z.state=U.OPEN_TAG_SLASH:S(P,le)?(Z.attribName=le,Z.attribValue="",Z.state=U.ATTRIB_NAME):be(Z,"Invalid attribute name");continue;case U.ATTRIB_NAME:le==="="?Z.state=U.ATTRIB_VALUE:le===">"?(be(Z,"Attribute without value"),Z.attribValue=Z.attribName,_e(Z),De(Z)):g(le)?Z.state=U.ATTRIB_NAME_SAW_WHITE:S(I,le)?Z.attribName+=le:be(Z,"Invalid attribute name");continue;case U.ATTRIB_NAME_SAW_WHITE:if(le==="=")Z.state=U.ATTRIB_VALUE;else{if(g(le))continue;be(Z,"Attribute without value"),Z.tag.attributes[Z.attribName]="",Z.attribValue="",$(Z,"onattribute",{name:Z.attribName,value:""}),Z.attribName="",le===">"?De(Z):S(P,le)?(Z.attribName=le,Z.state=U.ATTRIB_NAME):(be(Z,"Invalid attribute name"),Z.state=U.ATTRIB)}continue;case U.ATTRIB_VALUE:if(g(le))continue;a(le)?(Z.q=le,Z.state=U.ATTRIB_VALUE_QUOTED):(be(Z,"Unquoted attribute value"),Z.state=U.ATTRIB_VALUE_UNQUOTED,Z.attribValue=le);continue;case U.ATTRIB_VALUE_QUOTED:if(le!==Z.q){le==="&"?Z.state=U.ATTRIB_VALUE_ENTITY_Q:Z.attribValue+=le;continue}_e(Z),Z.q="",Z.state=U.ATTRIB_VALUE_CLOSED;continue;case U.ATTRIB_VALUE_CLOSED:g(le)?Z.state=U.ATTRIB:le===">"?De(Z):le==="/"?Z.state=U.OPEN_TAG_SLASH:S(P,le)?(be(Z,"No whitespace between attributes"),Z.attribName=le,Z.attribValue="",Z.state=U.ATTRIB_NAME):be(Z,"Invalid attribute name");continue;case U.ATTRIB_VALUE_UNQUOTED:if(!C(le)){le==="&"?Z.state=U.ATTRIB_VALUE_ENTITY_U:Z.attribValue+=le;continue}_e(Z),le===">"?De(Z):Z.state=U.ATTRIB;continue;case U.CLOSE_TAG:if(Z.tagName)le===">"?ge(Z):S(I,le)?Z.tagName+=le:Z.script?(Z.script+="</"+Z.tagName,Z.tagName="",Z.state=U.SCRIPT):(g(le)||be(Z,"Invalid tagname in closing tag"),Z.state=U.CLOSE_TAG_SAW_WHITE);else{if(g(le))continue;p(P,le)?Z.script?(Z.script+="</"+le,Z.state=U.SCRIPT):be(Z,"Invalid tagname in closing tag."):Z.tagName=le}continue;case U.CLOSE_TAG_SAW_WHITE:if(g(le))continue;le===">"?ge(Z):be(Z,"Invalid characters in closing tag");continue;case U.TEXT_ENTITY:case U.ATTRIB_VALUE_ENTITY_Q:case U.ATTRIB_VALUE_ENTITY_U:var Pe,He;switch(Z.state){case U.TEXT_ENTITY:Pe=U.TEXT,He="textNode";break;case U.ATTRIB_VALUE_ENTITY_Q:Pe=U.ATTRIB_VALUE_QUOTED,He="attribValue";break;case U.ATTRIB_VALUE_ENTITY_U:Pe=U.ATTRIB_VALUE_UNQUOTED,He="attribValue";break}le===";"?(Z[He]+=fe(Z),Z.entity="",Z.state=Pe):S(Z.entity.length?k:u,le)?Z.entity+=le:(be(Z,"Invalid character in entity name"),Z[He]+="&"+Z.entity+le,Z.entity="",Z.state=Pe);continue;default:throw new Error(Z,"Unknown state: "+Z.state)}}return Z.position>=Z.bufferCheckPosition&&f(Z),Z}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */G.default||function(){var J=String.fromCharCode,Z=Math.floor,pe=function(){var ye=16384,Te=[],Pe,He,Oe=-1,Ue=arguments.length;if(!Ue)return"";for(var je="";++Oe<Ue;){var Ve=Number(arguments[Oe]);if(!isFinite(Ve)||Ve<0||Ve>1114111||Z(Ve)!==Ve)throw RangeError("Invalid code point: "+Ve);Ve<=65535?Te.push(Ve):(Ve-=65536,Pe=(Ve>>10)+55296,He=Ve%1024+56320,Te.push(Pe,He)),(Oe+1===Ue||Te.length>ye)&&(je+=J.apply(null,Te),Te.length=0)}return je};e.default?Object.defineProperty(String,"fromCodePoint",{value:pe,configurable:!0,writable:!0}):String.fromCodePoint=pe}()})(typeof L=="undefined"?(void 0).sax={}:L)}).call(this,W("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(W,ee,L){ee.exports=G;var B=W("events").EventEmitter,M=W("inherits");M(G,B),G.Readable=W("readable-stream/readable.js"),G.Writable=W("readable-stream/writable.js"),G.Duplex=W("readable-stream/duplex.js"),G.Transform=W("readable-stream/transform.js"),G.PassThrough=W("readable-stream/passthrough.js"),G.Stream=G;function G(){B.call(this)}G.prototype.pipe=function(X,K){var N=this;function i(n){X.writable&&(X.write(n)===!1&&N.pause&&N.pause())}N.on("data",i);function T(){N.readable&&N.resume&&N.resume()}X.on("drain",T),!X._isStdio&&(!K||K.end!==!1)&&(N.on("end",E),N.on("close",l));var e=!1;function E(){if(e)return;e=!0,X.end()}function l(){if(e)return;e=!0,typeof X.destroy=="function"&&X.destroy()}function _(n){if(r(),B.listenerCount(this,"error")===0)throw n}N.on("error",_),X.on("error",_);function r(){N.removeListener("data",i),X.removeListener("drain",T),N.removeListener("end",E),N.removeListener("close",l),N.removeListener("error",_),X.removeListener("error",_),N.removeListener("end",r),N.removeListener("close",r),X.removeListener("close",r)}return N.on("end",r),N.on("close",r),X.on("close",r),X.emit("pipe",N),X}},{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(W,ee,L){(function(B){var M=W("./lib/request"),G=W("./lib/response"),X=W("xtend"),K=W("builtin-status-codes"),N=W("url"),i=L;i.request=function(T,e){typeof T=="string"?T=N.parse(T):T=X(T);var E=B.location.protocol.search(/^https?:$/)===-1?"http:":"",l=T.protocol||E,_=T.hostname||T.host,r=T.port,n=T.path||"/";_&&_.indexOf(":")!==-1&&(_="["+_+"]"),T.url=(_?l+"//"+_:"")+(r?":"+r:"")+n,T.method=(T.method||"GET").toUpperCase(),T.headers=T.headers||{};var o=new M(T);return e&&o.on("response",e),o},i.get=function(e,E){var l=i.request(e,E);return l.end(),l},i.ClientRequest=M,i.IncomingMessage=G.IncomingMessage,i.Agent=function(){},i.Agent.defaultMaxSockets=4,i.globalAgent=new i.Agent,i.STATUS_CODES=K,i.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":233,"./lib/response":234,"builtin-status-codes":74,url:238,xtend:283}],232:[function(W,ee,L){(function(B){"use strict";L.fetch=i(B.fetch)&&i(B.ReadableStream),L.writableStream=i(B.WritableStream),L.abortController=i(B.AbortController),L.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),L.blobConstructor=!0}catch(T){}var M;function G(){if(M!==void 0)return M;if(B.XMLHttpRequest){M=new B.XMLHttpRequest;try{M.open("GET",B.XDomainRequest?"/":"https://example.com")}catch(T){M=null}}else M=null;return M}function X(T){var e=G();if(!e)return!1;try{return e.responseType=T,e.responseType===T}catch(E){}return!1}var K=typeof B.ArrayBuffer!="undefined",N=K&&i(B.ArrayBuffer.prototype.slice);L.arraybuffer=L.fetch||K&&X("arraybuffer"),L.msstream=!L.fetch&&N&&X("ms-stream"),L.mozchunkedarraybuffer=!L.fetch&&K&&X("moz-chunked-arraybuffer"),L.overrideMimeType=L.fetch||(G()?i(G().overrideMimeType):!1),L.vbArray=i(B.VBArray);function i(T){return typeof T=="function"}M=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(W,ee,L){(function(B,M,G){"use strict";var X=W("babel-runtime/core-js/object/keys"),K=N(X);function N(f){return f&&f.__esModule?f:{default:f}}var i=W("./capability"),T=W("inherits"),e=W("./response"),E=W("readable-stream"),l=W("to-arraybuffer"),_=e.IncomingMessage,r=e.readyStates;function n(f,y){return i.fetch&&y?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&f?"arraybuffer":i.vbArray&&f?"text:vbarray":"text"}var o=ee.exports=function(f){var y=this;E.Writable.call(y),y._opts=f,y._body=[],y._headers={},f.auth&&y.setHeader("Authorization","Basic "+new G(f.auth).toString("base64")),(0,K.default)(f.headers).forEach(function(m){y.setHeader(m,f.headers[m])});var h,b=!0;if(f.mode==="disable-fetch"||"requestTimeout"in f&&!i.abortController)b=!1,h=!0;else if(f.mode==="prefer-streaming")h=!1;else if(f.mode==="allow-wrong-content-type")h=!i.overrideMimeType;else if(!f.mode||f.mode==="default"||f.mode==="prefer-fast")h=!0;else throw new Error("Invalid value for opts.mode");y._mode=n(h,b),y._fetchTimer=null,y.on("finish",function(){y._onFinish()})};T(o,E.Writable),o.prototype.setHeader=function(f,y){var h=this,b=f.toLowerCase();if(v.indexOf(b)!==-1)return;h._headers[b]={name:f,value:y}},o.prototype.getHeader=function(f){var y=this._headers[f.toLowerCase()];return y?y.value:null},o.prototype.removeHeader=function(f){var y=this;delete y._headers[f.toLowerCase()]},o.prototype._onFinish=function(){var f=this;if(f._destroyed)return;var y=f._opts,h=f._headers,b=null;y.method!=="GET"&&y.method!=="HEAD"&&(i.arraybuffer?b=l(G.concat(f._body)):i.blobConstructor?b=new M.Blob(f._body.map(function(w){return l(w)}),{type:(h["content-type"]||{}).value||""}):b=G.concat(f._body).toString());var m=[];if((0,K.default)(h).forEach(function(w){var D=h[w].name,A=h[w].value;Array.isArray(A)?A.forEach(function(P){m.push([D,P])}):m.push([D,A])}),f._mode==="fetch"){var d=null,x=null;if(i.abortController){var R=new AbortController;d=R.signal,f._fetchAbortController=R,"requestTimeout"in y&&y.requestTimeout!==0&&(f._fetchTimer=M.setTimeout(function(){f.emit("requestTimeout"),f._fetchAbortController&&f._fetchAbortController.abort()},y.requestTimeout))}M.fetch(f._opts.url,{method:f._opts.method,headers:m,body:b||void 0,mode:"cors",credentials:y.withCredentials?"include":"same-origin",signal:d}).then(function(w){f._fetchResponse=w,f._connect()},function(w){M.clearTimeout(f._fetchTimer),f._destroyed||f.emit("error",w)})}else{var O=f._xhr=new M.XMLHttpRequest;try{O.open(f._opts.method,f._opts.url,!0)}catch(w){B.nextTick(function(){f.emit("error",w)});return}"responseType"in O&&(O.responseType=f._mode.split(":")[0]),"withCredentials"in O&&(O.withCredentials=!!y.withCredentials),f._mode==="text"&&"overrideMimeType"in O&&O.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in y&&(O.timeout=y.requestTimeout,O.ontimeout=function(){f.emit("requestTimeout")}),m.forEach(function(w){O.setRequestHeader(w[0],w[1])}),f._response=null,O.onreadystatechange=function(){switch(O.readyState){case r.LOADING:case r.DONE:f._onXHRProgress();break}},f._mode==="moz-chunked-arraybuffer"&&(O.onprogress=function(){f._onXHRProgress()}),O.onerror=function(){if(f._destroyed)return;f.emit("error",new Error("XHR error"))};try{O.send(b)}catch(w){B.nextTick(function(){f.emit("error",w)});return}}};function c(f){try{var y=f.status;return y!==null&&y!==0}catch(h){return!1}}o.prototype._onXHRProgress=function(){var f=this;if(!c(f._xhr)||f._destroyed)return;f._response||f._connect(),f._response._onXHRProgress()},o.prototype._connect=function(){var f=this;if(f._destroyed)return;f._response=new _(f._xhr,f._fetchResponse,f._mode,f._fetchTimer),f._response.on("error",function(y){f.emit("error",y)}),f.emit("response",f._response)},o.prototype._write=function(f,y,h){var b=this;b._body.push(f),h()},o.prototype.abort=o.prototype.destroy=function(){var f=this;f._destroyed=!0,M.clearTimeout(f._fetchTimer),f._response&&(f._response._destroyed=!0),f._xhr?f._xhr.abort():f._fetchAbortController&&f._fetchAbortController.abort()},o.prototype.end=function(f,y,h){var b=this;typeof f=="function"&&(h=f,f=void 0),E.Writable.prototype.end.call(b,f,y,h)},o.prototype.flushHeaders=function(){},o.prototype.setTimeout=function(){},o.prototype.setNoDelay=function(){},o.prototype.setSocketKeepAlive=function(){};var v=["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,W("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},W("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(W,ee,L){(function(B,M,G){"use strict";var X=W("babel-runtime/core-js/promise"),K=N(X);function N(_){return _&&_.__esModule?_:{default:_}}var i=W("./capability"),T=W("inherits"),e=W("readable-stream"),E=L.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=L.IncomingMessage=function(_,r,n,o){var c=this;if(e.Readable.call(c),c._mode=n,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){B.nextTick(function(){c.emit("close")})}),n==="fetch"){var v=function d(){y.read().then(function(x){if(c._destroyed)return;if(x.done){M.clearTimeout(o),c.push(null);return}c.push(new G(x.value)),d()}).catch(function(x){M.clearTimeout(o),c._destroyed||c.emit("error",x)})};if(c._fetchResponse=r,c.url=r.url,c.statusCode=r.status,c.statusMessage=r.statusText,r.headers.forEach(function(d,x){c.headers[x.toLowerCase()]=d,c.rawHeaders.push(x,d)}),i.writableStream){var f=new WritableStream({write:function(x){return new K.default(function(R,O){c._destroyed?O():c.push(new G(x))?R():c._resumeFetch=R})},close:function(){M.clearTimeout(o),c._destroyed||c.push(null)},abort:function(x){c._destroyed||c.emit("error",x)}});try{r.body.pipeTo(f).catch(function(d){M.clearTimeout(o),c._destroyed||c.emit("error",d)});return}catch(d){}}var y=r.body.getReader();v()}else{c._xhr=_,c._pos=0,c.url=_.responseURL,c.statusCode=_.status,c.statusMessage=_.statusText;var h=_.getAllResponseHeaders().split(/\r?\n/);if(h.forEach(function(d){var x=d.match(/^([^:]+):\s*(.*)/);if(x){var R=x[1].toLowerCase();R==="set-cookie"?(c.headers[R]===void 0&&(c.headers[R]=[]),c.headers[R].push(x[2])):c.headers[R]!==void 0?c.headers[R]+=", "+x[2]:c.headers[R]=x[2],c.rawHeaders.push(x[1],x[2])}}),c._charset="x-user-defined",!i.overrideMimeType){var b=c.rawHeaders["mime-type"];if(b){var m=b.match(/;\s*charset=([^;])(;|$)/);m&&(c._charset=m[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};T(l,e.Readable),l.prototype._read=function(){var _=this,r=_._resumeFetch;r&&(_._resumeFetch=null,r())},l.prototype._onXHRProgress=function(){var _=this,r=_._xhr,n=null;switch(_._mode){case"text:vbarray":if(r.readyState!==E.DONE)break;try{n=new M.VBArray(r.responseBody).toArray()}catch(y){}if(n!==null){_.push(new G(n));break}case"text":try{n=r.responseText}catch(y){_._mode="text:vbarray";break}if(n.length>_._pos){var o=n.substr(_._pos);if(_._charset==="x-user-defined"){for(var c=new G(o.length),v=0;v<o.length;v++)c[v]=o.charCodeAt(v)&255;_.push(c)}else _.push(o,_._charset);_._pos=n.length}break;case"arraybuffer":if(r.readyState!==E.DONE||!r.response)break;n=r.response,_.push(new G(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=r.response,r.readyState!==E.LOADING||!n)break;_.push(new G(new Uint8Array(n)));break;case"ms-stream":if(n=r.response,r.readyState!==E.LOADING)break;var f=new M.MSStreamReader;f.onprogress=function(){f.result.byteLength>_._pos&&(_.push(new G(new Uint8Array(f.result.slice(_._pos)))),_._pos=f.result.byteLength)},f.onload=function(){_.push(null)},f.readAsArrayBuffer(n);break}_._xhr.readyState===E.DONE&&_._mode!=="ms-stream"&&_.push(null)}}).call(this,W("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},W("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(W,ee,L){"use strict";var B=W("safe-buffer").Buffer,M=B.isEncoding||function(f){f=""+f;switch(f&&f.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 G(f){if(!f)return"utf8";for(var y;;)switch(f){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 f;default:if(y)return;f=(""+f).toLowerCase(),y=!0}}function X(f){var y=G(f);if(typeof y!="string"&&(B.isEncoding===M||!M(f)))throw new Error("Unknown encoding: "+f);return y||f}L.StringDecoder=K;function K(f){this.encoding=X(f);var y;switch(this.encoding){case"utf16le":this.text=_,this.end=r,y=4;break;case"utf8":this.fillLast=e,y=4;break;case"base64":this.text=n,this.end=o,y=3;break;default:this.write=c,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=B.allocUnsafe(y)}K.prototype.write=function(f){if(f.length===0)return"";var y,h;if(this.lastNeed){if(y=this.fillLast(f),y===void 0)return"";h=this.lastNeed,this.lastNeed=0}else h=0;return h<f.length?y?y+this.text(f,h):this.text(f,h):y||""},K.prototype.end=l,K.prototype.text=E,K.prototype.fillLast=function(f){if(this.lastNeed<=f.length)return f.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);f.copy(this.lastChar,this.lastTotal-this.lastNeed,0,f.length),this.lastNeed-=f.length};function N(f){return f<=127?0:f>>5===6?2:f>>4===14?3:f>>3===30?4:f>>6===2?-1:-2}function i(f,y,h){var b=y.length-1;if(b<h)return 0;var m=N(y[b]);return m>=0?(m>0&&(f.lastNeed=m-1),m):--b<h||m===-2?0:(m=N(y[b]),m>=0?(m>0&&(f.lastNeed=m-2),m):--b<h||m===-2?0:(m=N(y[b]),m>=0?(m>0&&(m===2?m=0:f.lastNeed=m-3),m):0))}function T(f,y,h){if((y[0]&192)!==128)return f.lastNeed=0,"\uFFFD";if(f.lastNeed>1&&y.length>1){if((y[1]&192)!==128)return f.lastNeed=1,"\uFFFD";if(f.lastNeed>2&&y.length>2&&(y[2]&192)!==128)return f.lastNeed=2,"\uFFFD"}}function e(f){var y=this.lastTotal-this.lastNeed,h=T(this,f,y);if(h!==void 0)return h;if(this.lastNeed<=f.length)return f.copy(this.lastChar,y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);f.copy(this.lastChar,y,0,f.length),this.lastNeed-=f.length}function E(f,y){var h=i(this,f,y);if(!this.lastNeed)return f.toString("utf8",y);this.lastTotal=h;var b=f.length-(h-this.lastNeed);return f.copy(this.lastChar,0,b),f.toString("utf8",y,b)}function l(f){var y=f&&f.length?this.write(f):"";return this.lastNeed?y+"\uFFFD":y}function _(f,y){if((f.length-y)%2===0){var h=f.toString("utf16le",y);if(h){var b=h.charCodeAt(h.length-1);if(b>=55296&&b<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=f[f.length-2],this.lastChar[1]=f[f.length-1],h.slice(0,-1)}return h}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=f[f.length-1],f.toString("utf16le",y,f.length-1)}function r(f){var y=f&&f.length?this.write(f):"";if(this.lastNeed){var h=this.lastTotal-this.lastNeed;return y+this.lastChar.toString("utf16le",0,h)}return y}function n(f,y){var h=(f.length-y)%3;return h===0?f.toString("base64",y):(this.lastNeed=3-h,this.lastTotal=3,h===1?this.lastChar[0]=f[f.length-1]:(this.lastChar[0]=f[f.length-2],this.lastChar[1]=f[f.length-1]),f.toString("base64",y,f.length-h))}function o(f){var y=f&&f.length?this.write(f):"";return this.lastNeed?y+this.lastChar.toString("base64",0,3-this.lastNeed):y}function c(f){return f.toString(this.encoding)}function v(f){return f&&f.length?this.write(f):""}},{"safe-buffer":228}],236:[function(W,ee,L){(function(B,M){var G=W("process/browser.js").nextTick,X=Function.prototype.apply,K=Array.prototype.slice,N={},i=0;L.setTimeout=function(){return new T(X.call(setTimeout,window,arguments),clearTimeout)},L.setInterval=function(){return new T(X.call(setInterval,window,arguments),clearInterval)},L.clearTimeout=L.clearInterval=function(e){e.close()};function T(e,E){this._id=e,this._clearFn=E}T.prototype.unref=T.prototype.ref=function(){},T.prototype.close=function(){this._clearFn.call(window,this._id)},L.enroll=function(e,E){clearTimeout(e._idleTimeoutId),e._idleTimeout=E},L.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},L._unrefActive=L.active=function(e){clearTimeout(e._idleTimeoutId);var E=e._idleTimeout;E>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},E))},L.setImmediate=typeof B=="function"?B:function(e){var E=i++,l=arguments.length<2?!1:K.call(arguments,1);return N[E]=!0,G(function(){N[E]&&(l?e.apply(null,l):e.call(null),L.clearImmediate(E))}),E},L.clearImmediate=typeof M=="function"?M:function(e){delete N[e]}}).call(this,W("timers").setImmediate,W("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(W,ee,L){var B=W("buffer").Buffer;ee.exports=function(M){if(M instanceof Uint8Array){if(M.byteOffset===0&&M.byteLength===M.buffer.byteLength)return M.buffer;if(typeof M.buffer.slice=="function")return M.buffer.slice(M.byteOffset,M.byteOffset+M.byteLength)}if(B.isBuffer(M)){for(var G=new Uint8Array(M.length),X=M.length,K=0;K<X;K++)G[K]=M[K];return G.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(W,ee,L){"use strict";var B=W("punycode"),M=W("./util");L.parse=y,L.resolve=b,L.resolveObject=m,L.format=h,L.Url=G;function G(){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}var X=/^([a-z0-9.+-]+:)/i,K=/:[0-9]*$/,N=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,i=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],T=["{","}","|","\\","^","`"].concat(i),e=["'"].concat(T),E=["%","/","?",";","#"].concat(e),l=["/","?","#"],_=255,r=/^[+a-z0-9A-Z_-]{0,63}$/,n=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,o={javascript:!0,"javascript:":!0},c={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},f=W("querystring");function y(d,x,R){if(d&&M.isObject(d)&&d instanceof G)return d;var O=new G;return O.parse(d,x,R),O}G.prototype.parse=function(d,x,R){if(!M.isString(d))throw new TypeError("Parameter 'url' must be a string, not "+typeof d);var O=d.indexOf("?"),w=O!==-1&&O<d.indexOf("#")?"?":"#",D=d.split(w),A=/\\/g;D[0]=D[0].replace(A,"/"),d=D.join(w);var P=d;if(P=P.trim(),!R&&d.split("#").length===1){var I=N.exec(P);if(I)return this.path=P,this.href=P,this.pathname=I[1],I[2]?(this.search=I[2],x?this.query=f.parse(this.search.substr(1)):this.query=this.search.substr(1)):x&&(this.search="",this.query={}),this}var u=X.exec(P);if(u){u=u[0];var k=u.toLowerCase();this.protocol=k,P=P.substr(u.length)}if(R||u||P.match(/^\/\/[^@\/]+@[^@\/]+/)){var g=P.substr(0,2)==="//";g&&!(u&&c[u])&&(P=P.substr(2),this.slashes=!0)}if(!c[u]&&(g||u&&!v[u])){for(var a=-1,C=0;C<l.length;C++){var S=P.indexOf(l[C]);S!==-1&&(a===-1||S<a)&&(a=S)}var p,U;a===-1?U=P.lastIndexOf("@"):U=P.lastIndexOf("@",a),U!==-1&&(p=P.slice(0,U),P=P.slice(U+1),this.auth=decodeURIComponent(p)),a=-1;for(var C=0;C<E.length;C++){var S=P.indexOf(E[C]);S!==-1&&(a===-1||S<a)&&(a=S)}a===-1&&(a=P.length),this.host=P.slice(0,a),P=P.slice(a),this.parseHost(),this.hostname=this.hostname||"";var z=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!z)for(var q=this.hostname.split(/\./),C=0,$=q.length;C<$;C++){var re=q[C];if(!re)continue;if(!re.match(r)){for(var ce="",ne=0,me=re.length;ne<me;ne++)re.charCodeAt(ne)>127?ce+="x":ce+=re[ne];if(!ce.match(r)){var be=q.slice(0,C),he=q.slice(C+1),se=re.match(n);se&&(be.push(se[1]),he.unshift(se[2])),he.length&&(P="/"+he.join(".")+P),this.hostname=be.join(".");break}}}this.hostname.length>_?this.hostname="":this.hostname=this.hostname.toLowerCase(),z||(this.hostname=B.toASCII(this.hostname));var _e=this.port?":"+this.port:"",De=this.hostname||"";this.host=De+_e,this.href+=this.host,z&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),P[0]!=="/"&&(P="/"+P))}if(!o[k])for(var C=0,$=e.length;C<$;C++){var ge=e[C];if(P.indexOf(ge)===-1)continue;var fe=encodeURIComponent(ge);fe===ge&&(fe=escape(ge)),P=P.split(ge).join(fe)}var Ce=P.indexOf("#");Ce!==-1&&(this.hash=P.substr(Ce),P=P.slice(0,Ce));var ae=P.indexOf("?");if(ae!==-1?(this.search=P.substr(ae),this.query=P.substr(ae+1),x&&(this.query=f.parse(this.query)),P=P.slice(0,ae)):x&&(this.search="",this.query={}),P&&(this.pathname=P),v[k]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var _e=this.pathname||"",Q=this.search||"";this.path=_e+Q}return this.href=this.format(),this};function h(d){return M.isString(d)&&(d=y(d)),d instanceof G?d.format():G.prototype.format.call(d)}G.prototype.format=function(){var d=this.auth||"";d&&(d=encodeURIComponent(d),d=d.replace(/%3A/i,":"),d+="@");var x=this.protocol||"",R=this.pathname||"",O=this.hash||"",w=!1,D="";this.host?w=d+this.host:this.hostname&&(w=d+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(w+=":"+this.port)),this.query&&M.isObject(this.query)&&Object.keys(this.query).length&&(D=f.stringify(this.query));var A=this.search||D&&"?"+D||"";return x&&x.substr(-1)!==":"&&(x+=":"),this.slashes||(!x||v[x])&&w!==!1?(w="//"+(w||""),R&&R.charAt(0)!=="/"&&(R="/"+R)):w||(w=""),O&&O.charAt(0)!=="#"&&(O="#"+O),A&&A.charAt(0)!=="?"&&(A="?"+A),R=R.replace(/[?#]/g,function(P){return encodeURIComponent(P)}),A=A.replace("#","%23"),x+w+R+A+O};function b(d,x){return y(d,!1,!0).resolve(x)}G.prototype.resolve=function(d){return this.resolveObject(y(d,!1,!0)).format()};function m(d,x){return d?y(d,!1,!0).resolveObject(x):x}G.prototype.resolveObject=function(d){if(M.isString(d)){var x=new G;x.parse(d,!1,!0),d=x}for(var R=new G,O=Object.keys(this),w=0;w<O.length;w++){var D=O[w];R[D]=this[D]}if(R.hash=d.hash,d.href==="")return R.href=R.format(),R;if(d.slashes&&!d.protocol){for(var A=Object.keys(d),P=0;P<A.length;P++){var I=A[P];I!=="protocol"&&(R[I]=d[I])}return v[R.protocol]&&R.hostname&&!R.pathname&&(R.path=R.pathname="/"),R.href=R.format(),R}if(d.protocol&&d.protocol!==R.protocol){if(!v[d.protocol]){for(var u=Object.keys(d),k=0;k<u.length;k++){var g=u[k];R[g]=d[g]}return R.href=R.format(),R}if(R.protocol=d.protocol,!d.host&&!c[d.protocol]){for(var $=(d.pathname||"").split("/");$.length&&!(d.host=$.shift()););d.host||(d.host=""),d.hostname||(d.hostname=""),$[0]!==""&&$.unshift(""),$.length<2&&$.unshift(""),R.pathname=$.join("/")}else R.pathname=d.pathname;if(R.search=d.search,R.query=d.query,R.host=d.host||"",R.auth=d.auth,R.hostname=d.hostname||d.host,R.port=d.port,R.pathname||R.search){var a=R.pathname||"",C=R.search||"";R.path=a+C}return R.slashes=R.slashes||d.slashes,R.href=R.format(),R}var S=R.pathname&&R.pathname.charAt(0)==="/",p=d.host||d.pathname&&d.pathname.charAt(0)==="/",U=p||S||R.host&&d.pathname,z=U,q=R.pathname&&R.pathname.split("/")||[],$=d.pathname&&d.pathname.split("/")||[],re=R.protocol&&!v[R.protocol];if(re&&(R.hostname="",R.port=null,R.host&&(q[0]===""?q[0]=R.host:q.unshift(R.host)),R.host="",d.protocol&&(d.hostname=null,d.port=null,d.host&&($[0]===""?$[0]=d.host:$.unshift(d.host)),d.host=null),U=U&&($[0]===""||q[0]==="")),p)R.host=d.host||d.host===""?d.host:R.host,R.hostname=d.hostname||d.hostname===""?d.hostname:R.hostname,R.search=d.search,R.query=d.query,q=$;else if($.length)q||(q=[]),q.pop(),q=q.concat($),R.search=d.search,R.query=d.query;else if(!M.isNullOrUndefined(d.search)){if(re){R.hostname=R.host=q.shift();var ce=R.host&&R.host.indexOf("@")>0?R.host.split("@"):!1;ce&&(R.auth=ce.shift(),R.host=R.hostname=ce.shift())}return R.search=d.search,R.query=d.query,(!M.isNull(R.pathname)||!M.isNull(R.search))&&(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.href=R.format(),R}if(!q.length)return R.pathname=null,R.search?R.path="/"+R.search:R.path=null,R.href=R.format(),R;for(var ne=q.slice(-1)[0],me=(R.host||d.host||q.length>1)&&(ne==="."||ne==="..")||ne==="",be=0,he=q.length;he>=0;he--)ne=q[he],ne==="."?q.splice(he,1):ne===".."?(q.splice(he,1),be++):be&&(q.splice(he,1),be--);if(!U&&!z)for(;be--;be)q.unshift("..");U&&q[0]!==""&&(!q[0]||q[0].charAt(0)!=="/")&&q.unshift(""),me&&q.join("/").substr(-1)!=="/"&&q.push("");var se=q[0]===""||q[0]&&q[0].charAt(0)==="/";if(re){R.hostname=R.host=se?"":q.length?q.shift():"";var ce=R.host&&R.host.indexOf("@")>0?R.host.split("@"):!1;ce&&(R.auth=ce.shift(),R.host=R.hostname=ce.shift())}return U=U||R.host&&q.length,U&&!se&&q.unshift(""),q.length?R.pathname=q.join("/"):(R.pathname=null,R.path=null),(!M.isNull(R.pathname)||!M.isNull(R.search))&&(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.auth=d.auth||R.auth,R.slashes=R.slashes||d.slashes,R.href=R.format(),R},G.prototype.parseHost=function(){var d=this.host,x=K.exec(d);x&&(x=x[0],x!==":"&&(this.port=x.substr(1)),d=d.substr(0,d.length-x.length)),d&&(this.hostname=d)}},{"./util":239,punycode:209,querystring:212}],239:[function(W,ee,L){"use strict";ee.exports={isString:function(B){return typeof B=="string"},isObject:function(B){return typeof B=="object"&&B!==null},isNull:function(B){return B===null},isNullOrUndefined:function(B){return B==null}}},{}],240:[function(W,ee,L){(function(B){ee.exports=M;function M(X,K){if(G("noDeprecation"))return X;var N=!1;function i(){if(!N){if(G("throwDeprecation"))throw new Error(K);G("traceDeprecation")?console.trace(K):console.warn(K),N=!0}return X.apply(this,arguments)}return i}function G(X){try{if(!B.localStorage)return!1}catch(N){return!1}var K=B.localStorage[X];return K==null?!1:String(K).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(W,ee,L){typeof Object.create=="function"?ee.exports=function(M,G){M.super_=G,M.prototype=Object.create(G.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}})}:ee.exports=function(M,G){M.super_=G;var X=function(){};X.prototype=G.prototype,M.prototype=new X,M.prototype.constructor=M}},{}],242:[function(W,ee,L){ee.exports=function(M){return M&&typeof M=="object"&&typeof M.copy=="function"&&typeof M.fill=="function"&&typeof M.readUInt8=="function"}},{}],243:[function(W,ee,L){(function(B,M){var G=/%[sdj%]/g;L.format=function(a){if(!b(a)){for(var C=[],S=0;S<arguments.length;S++)C.push(N(arguments[S]));return C.join(" ")}for(var S=1,p=arguments,U=p.length,z=String(a).replace(G,function($){if($==="%%")return"%";if(S>=U)return $;switch($){case"%s":return String(p[S++]);case"%d":return Number(p[S++]);case"%j":try{return JSON.stringify(p[S++])}catch(re){return"[Circular]"}default:return $}}),q=p[S];S<U;q=p[++S])f(q)||!R(q)?z+=" "+q:z+=" "+N(q);return z},L.deprecate=function(a,C){if(d(M.process))return function(){return L.deprecate(a,C).apply(this,arguments)};if(B.noDeprecation===!0)return a;var S=!1;function p(){if(!S){if(B.throwDeprecation)throw new Error(C);B.traceDeprecation?console.trace(C):console.error(C),S=!0}return a.apply(this,arguments)}return p};var X={},K;L.debuglog=function(a){if(d(K)&&(K=B.env.NODE_DEBUG||""),a=a.toUpperCase(),!X[a])if(new RegExp("\\b"+a+"\\b","i").test(K)){var C=B.pid;X[a]=function(){var S=L.format.apply(L,arguments);console.error("%s %d: %s",a,C,S)}}else X[a]=function(){};return X[a]};function N(a,C){var S={seen:[],stylize:T};return arguments.length>=3&&(S.depth=arguments[2]),arguments.length>=4&&(S.colors=arguments[3]),v(C)?S.showHidden=C:C&&L._extend(S,C),d(S.showHidden)&&(S.showHidden=!1),d(S.depth)&&(S.depth=2),d(S.colors)&&(S.colors=!1),d(S.customInspect)&&(S.customInspect=!0),S.colors&&(S.stylize=i),E(S,a,S.depth)}L.inspect=N,N.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]},N.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function i(a,C){var S=N.styles[C];return S?"["+N.colors[S][0]+"m"+a+"["+N.colors[S][1]+"m":a}function T(a,C){return a}function e(a){var C={};return a.forEach(function(S,p){C[S]=!0}),C}function E(a,C,S){if(a.customInspect&&C&&D(C.inspect)&&C.inspect!==L.inspect&&!(C.constructor&&C.constructor.prototype===C)){var p=C.inspect(S,a);return b(p)||(p=E(a,p,S)),p}var U=l(a,C);if(U)return U;var z=Object.keys(C),q=e(z);if(a.showHidden&&(z=Object.getOwnPropertyNames(C)),w(C)&&(z.indexOf("message")>=0||z.indexOf("description")>=0))return _(C);if(z.length===0){if(D(C)){var $=C.name?": "+C.name:"";return a.stylize("[Function"+$+"]","special")}if(x(C))return a.stylize(RegExp.prototype.toString.call(C),"regexp");if(O(C))return a.stylize(Date.prototype.toString.call(C),"date");if(w(C))return _(C)}var re="",ce=!1,ne=["{","}"];if(c(C)&&(ce=!0,ne=["[","]"]),D(C)){var me=C.name?": "+C.name:"";re=" [Function"+me+"]"}if(x(C)&&(re=" "+RegExp.prototype.toString.call(C)),O(C)&&(re=" "+Date.prototype.toUTCString.call(C)),w(C)&&(re=" "+_(C)),z.length===0&&(!ce||C.length==0))return ne[0]+re+ne[1];if(S<0)return x(C)?a.stylize(RegExp.prototype.toString.call(C),"regexp"):a.stylize("[Object]","special");a.seen.push(C);var be;return ce?be=r(a,C,S,q,z):be=z.map(function(he){return n(a,C,S,q,he,ce)}),a.seen.pop(),o(be,re,ne)}function l(a,C){if(d(C))return a.stylize("undefined","undefined");if(b(C)){var S="'"+JSON.stringify(C).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(S,"string")}if(h(C))return a.stylize(""+C,"number");if(v(C))return a.stylize(""+C,"boolean");if(f(C))return a.stylize("null","null")}function _(a){return"["+Error.prototype.toString.call(a)+"]"}function r(a,C,S,p,U){for(var z=[],q=0,$=C.length;q<$;++q)g(C,String(q))?z.push(n(a,C,S,p,String(q),!0)):z.push("");return U.forEach(function(re){re.match(/^\d+$/)||z.push(n(a,C,S,p,re,!0))}),z}function n(a,C,S,p,U,z){var q,$,re;if(re=Object.getOwnPropertyDescriptor(C,U)||{value:C[U]},re.get?re.set?$=a.stylize("[Getter/Setter]","special"):$=a.stylize("[Getter]","special"):re.set&&($=a.stylize("[Setter]","special")),g(p,U)||(q="["+U+"]"),$||(a.seen.indexOf(re.value)<0?(f(S)?$=E(a,re.value,null):$=E(a,re.value,S-1),$.indexOf(`
|
|
|
`)>-1&&(z?$=$.split(`
|
|
|
`).map(function(ce){return" "+ce}).join(`
|
|
|
`).substr(2):$=`
|
|
|
`+$.split(`
|
|
|
`).map(function(ce){return" "+ce}).join(`
|
|
|
`))):$=a.stylize("[Circular]","special")),d(q)){if(z&&U.match(/^\d+$/))return $;q=JSON.stringify(""+U),q.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(q=q.substr(1,q.length-2),q=a.stylize(q,"name")):(q=q.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),q=a.stylize(q,"string"))}return q+": "+$}function o(a,C,S){var p=0,U=a.reduce(function(z,q){return p++,q.indexOf(`
|
|
|
`)>=0&&p++,z+q.replace(/\u001b\[\d\d?m/g,"").length+1},0);return U>60?S[0]+(C===""?"":C+`
|
|
|
`)+" "+a.join(`,
|
|
|
`)+" "+S[1]:S[0]+C+" "+a.join(", ")+" "+S[1]}function c(a){return Array.isArray(a)}L.isArray=c;function v(a){return typeof a=="boolean"}L.isBoolean=v;function f(a){return a===null}L.isNull=f;function y(a){return a==null}L.isNullOrUndefined=y;function h(a){return typeof a=="number"}L.isNumber=h;function b(a){return typeof a=="string"}L.isString=b;function m(a){return typeof a=="symbol"}L.isSymbol=m;function d(a){return a===void 0}L.isUndefined=d;function x(a){return R(a)&&P(a)==="[object RegExp]"}L.isRegExp=x;function R(a){return typeof a=="object"&&a!==null}L.isObject=R;function O(a){return R(a)&&P(a)==="[object Date]"}L.isDate=O;function w(a){return R(a)&&(P(a)==="[object Error]"||a instanceof Error)}L.isError=w;function D(a){return typeof a=="function"}L.isFunction=D;function A(a){return a===null||typeof a=="boolean"||typeof a=="number"||typeof a=="string"||typeof a=="symbol"||typeof a=="undefined"}L.isPrimitive=A,L.isBuffer=W("./support/isBuffer");function P(a){return Object.prototype.toString.call(a)}function I(a){return a<10?"0"+a.toString(10):a.toString(10)}var u=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var a=new Date,C=[I(a.getHours()),I(a.getMinutes()),I(a.getSeconds())].join(":");return[a.getDate(),u[a.getMonth()],C].join(" ")}L.log=function(){console.log("%s - %s",k(),L.format.apply(L,arguments))},L.inherits=W("inherits"),L._extend=function(a,C){if(!C||!R(C))return a;for(var S=Object.keys(C),p=S.length;p--;)a[S[p]]=C[S[p]];return a};function g(a,C){return Object.prototype.hasOwnProperty.call(a,C)}}).call(this,W("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(W,ee,L){"use strict";(function(){"use strict";L.stripBOM=function(B){return B[0]==="\uFEFF"?B.substring(1):B}}).call(void 0)},{}],245:[function(W,ee,L){"use strict";var B=W("babel-runtime/helpers/typeof"),M=K(B),G=W("babel-runtime/core-js/object/keys"),X=K(G);function K(N){return N&&N.__esModule?N:{default:N}}(function(){"use strict";var N,i,T,e,E,l={}.hasOwnProperty;N=W("xmlbuilder"),i=W("./defaults").defaults,e=function(r){return typeof r=="string"&&(r.indexOf("&")>=0||r.indexOf(">")>=0||r.indexOf("<")>=0)},E=function(r){return"<![CDATA["+T(r)+"]]>"},T=function(r){return r.replace("]]>","]]]]><![CDATA[>")},L.Builder=function(){function _(r){var n,o,c;this.options={},o=i["0.2"];for(n in o){if(!l.call(o,n))continue;c=o[n],this.options[n]=c}for(n in r){if(!l.call(r,n))continue;c=r[n],this.options[n]=c}}return _.prototype.buildObject=function(r){var n,o,c,v,f;return n=this.options.attrkey,o=this.options.charkey,(0,X.default)(r).length===1&&this.options.rootName===i["0.2"].rootName?(f=(0,X.default)(r)[0],r=r[f]):f=this.options.rootName,c=function(y){return function(h,b){var m,d,x,R,O,w;if((typeof b=="undefined"?"undefined":(0,M.default)(b))!=="object")y.options.cdata&&e(b)?h.raw(E(b)):h.txt(b);else if(Array.isArray(b))for(R in b){if(!l.call(b,R))continue;d=b[R];for(O in d)x=d[O],h=c(h.ele(O),x).up()}else for(O in b){if(!l.call(b,O))continue;if(d=b[O],O===n){if((typeof d=="undefined"?"undefined":(0,M.default)(d))==="object")for(m in d)w=d[m],h=h.att(m,w)}else if(O===o)y.options.cdata&&e(d)?h=h.raw(E(d)):h=h.txt(d);else if(Array.isArray(d))for(R in d){if(!l.call(d,R))continue;x=d[R],typeof x=="string"?y.options.cdata&&e(x)?h=h.ele(O).raw(E(x)).up():h=h.ele(O,x).up():h=c(h.ele(O),x).up()}else(typeof d=="undefined"?"undefined":(0,M.default)(d))==="object"?h=c(h.ele(O),d).up():typeof d=="string"&&y.options.cdata&&e(d)?h=h.ele(O).raw(E(d)).up():(d==null&&(d=""),h=h.ele(O,d.toString()).up())}return h}}(this),v=N.create(f,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),c(v,r).end(this.options.renderOpts)},_}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(W,ee,L){"use strict";(function(){L.defaults={"0.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:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
|
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],247:[function(W,ee,L){"use strict";var B=W("babel-runtime/core-js/promise"),M=e(B),G=W("babel-runtime/core-js/object/get-own-property-names"),X=e(G),K=W("babel-runtime/core-js/object/keys"),N=e(K),i=W("babel-runtime/helpers/typeof"),T=e(i);function e(E){return E&&E.__esModule?E:{default:E}}(function(){"use strict";var E,l,_,r,n,o,c,v,f=function(m,d){return function(){return m.apply(d,arguments)}},y=function(m,d){for(var x in d)h.call(d,x)&&(m[x]=d[x]);function R(){this.constructor=m}return R.prototype=d.prototype,m.prototype=new R,m.__super__=d.prototype,m},h={}.hasOwnProperty;c=W("sax"),_=W("events"),E=W("./bom"),o=W("./processors"),v=W("timers").setImmediate,l=W("./defaults").defaults,r=function(m){return(typeof m=="undefined"?"undefined":(0,T.default)(m))==="object"&&m!=null&&(0,N.default)(m).length===0},n=function(m,d,x){var R,O,w;for(R=0,O=m.length;R<O;R++)w=m[R],d=w(d,x);return d},L.Parser=function(b){y(m,b);function m(d){this.parseStringPromise=f(this.parseStringPromise,this),this.parseString=f(this.parseString,this),this.reset=f(this.reset,this),this.assignOrPush=f(this.assignOrPush,this),this.processAsync=f(this.processAsync,this);var x,R,O;if(!(this instanceof L.Parser))return new L.Parser(d);this.options={},R=l["0.2"];for(x in R){if(!h.call(R,x))continue;O=R[x],this.options[x]=O}for(x in d){if(!h.call(d,x))continue;O=d[x],this.options[x]=O}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(o.normalize)),this.reset()}return m.prototype.processAsync=function(){var d,x;try{return this.remaining.length<=this.options.chunkSize?(d=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(d),this.saxParser.close()):(d=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(d),v(this.processAsync))}catch(R){if(x=R,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(x)}},m.prototype.assignOrPush=function(d,x,R){return x in d?(d[x]instanceof Array||(d[x]=[d[x]]),d[x].push(R)):this.options.explicitArray?d[x]=[R]:d[x]=R},m.prototype.reset=function(){var d,x,R,O;return this.removeAllListeners(),this.saxParser=c.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(w){return function(D){if(w.saxParser.resume(),!w.saxParser.errThrown)return w.saxParser.errThrown=!0,w.emit("error",D)}}(this),this.saxParser.onend=function(w){return function(){if(!w.saxParser.ended)return w.saxParser.ended=!0,w.emit("end",w.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,O=[],d=this.options.attrkey,x=this.options.charkey,this.saxParser.onopentag=function(w){return function(D){var A,P,I,u,k;if(I={},I[x]="",!w.options.ignoreAttrs){k=D.attributes;for(A in k){if(!h.call(k,A))continue;!(d in I)&&!w.options.mergeAttrs&&(I[d]={}),P=w.options.attrValueProcessors?n(w.options.attrValueProcessors,D.attributes[A],A):D.attributes[A],u=w.options.attrNameProcessors?n(w.options.attrNameProcessors,A):A,w.options.mergeAttrs?w.assignOrPush(I,u,P):I[d][u]=P}}return I["#name"]=w.options.tagNameProcessors?n(w.options.tagNameProcessors,D.name):D.name,w.options.xmlns&&(I[w.options.xmlnskey]={uri:D.uri,local:D.local}),O.push(I)}}(this),this.saxParser.onclosetag=function(w){return function(){var D,A,P,I,u,k,g,a,C,S;if(k=O.pop(),u=k["#name"],(!w.options.explicitChildren||!w.options.preserveChildrenOrder)&&delete k["#name"],k.cdata===!0&&(D=k.cdata,delete k.cdata),C=O[O.length-1],k[x].match(/^\s*$/)&&!D?(A=k[x],delete k[x]):(w.options.trim&&(k[x]=k[x].trim()),w.options.normalize&&(k[x]=k[x].replace(/\s{2,}/g," ").trim()),k[x]=w.options.valueProcessors?n(w.options.valueProcessors,k[x],u):k[x],(0,N.default)(k).length===1&&x in k&&!w.EXPLICIT_CHARKEY&&(k=k[x])),r(k)&&(k=w.options.emptyTag!==""?w.options.emptyTag:A),w.options.validator!=null&&(S="/"+function(){var p,U,z;for(z=[],p=0,U=O.length;p<U;p++)I=O[p],z.push(I["#name"]);return z}().concat(u).join("/"),function(){var p;try{return k=w.options.validator(S,C&&C[u],k)}catch(U){return p=U,w.emit("error",p)}}()),w.options.explicitChildren&&!w.options.mergeAttrs&&(typeof k=="undefined"?"undefined":(0,T.default)(k))==="object"){if(!w.options.preserveChildrenOrder)I={},w.options.attrkey in k&&(I[w.options.attrkey]=k[w.options.attrkey],delete k[w.options.attrkey]),!w.options.charsAsChildren&&w.options.charkey in k&&(I[w.options.charkey]=k[w.options.charkey],delete k[w.options.charkey]),(0,X.default)(k).length>0&&(I[w.options.childkey]=k),k=I;else if(C){C[w.options.childkey]=C[w.options.childkey]||[],g={};for(P in k){if(!h.call(k,P))continue;g[P]=k[P]}C[w.options.childkey].push(g),delete k["#name"],(0,N.default)(k).length===1&&x in k&&!w.EXPLICIT_CHARKEY&&(k=k[x])}}return O.length>0?w.assignOrPush(C,u,k):(w.options.explicitRoot&&(a=k,k={},k[u]=a),w.resultObject=k,w.saxParser.ended=!0,w.emit("end",w.resultObject))}}(this),R=function(w){return function(D){var A,P;if(P=O[O.length-1],P)return P[x]+=D,w.options.explicitChildren&&w.options.preserveChildrenOrder&&w.options.charsAsChildren&&(w.options.includeWhiteChars||D.replace(/\\n/g,"").trim()!=="")&&(P[w.options.childkey]=P[w.options.childkey]||[],A={"#name":"__text__"},A[x]=D,w.options.normalize&&(A[x]=A[x].replace(/\s{2,}/g," ").trim()),P[w.options.childkey].push(A)),P}}(this),this.saxParser.ontext=R,this.saxParser.oncdata=function(w){return function(D){var A;if(A=R(D),A)return A.cdata=!0}}(this)},m.prototype.parseString=function(d,x){var R;x!=null&&typeof x=="function"&&(this.on("end",function(O){return this.reset(),x(null,O)}),this.on("error",function(O){return this.reset(),x(O)}));try{return d=d.toString(),d.trim()===""?(this.emit("end",null),!0):(d=E.stripBOM(d),this.options.async?(this.remaining=d,v(this.processAsync),this.saxParser):this.saxParser.write(d).close())}catch(O){if(R=O,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw R}else return this.emit("error",R),this.saxParser.errThrown=!0}},m.prototype.parseStringPromise=function(d){return new M.default(function(x){return function(R,O){return x.parseString(d,function(w,D){return w?O(w):R(D)})}}(this))},m}(_),L.parseString=function(b,m,d){var x,R,O;return d!=null?(typeof d=="function"&&(x=d),(typeof m=="undefined"?"undefined":(0,T.default)(m))==="object"&&(R=m)):(typeof m=="function"&&(x=m),R={}),O=new L.Parser(R),O.parseString(b,x)},L.parseStringPromise=function(b,m){var d,x;return(typeof m=="undefined"?"undefined":(0,T.default)(m))==="object"&&(d=m),x=new L.Parser(d),x.parseStringPromise(b)}}).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(W,ee,L){"use strict";(function(){"use strict";var B;B=new RegExp(/(?!xmlns)^.*:/),L.normalize=function(M){return M.toLowerCase()},L.firstCharLowerCase=function(M){return M.charAt(0).toLowerCase()+M.slice(1)},L.stripPrefix=function(M){return M.replace(B,"")},L.parseNumbers=function(M){return isNaN(M)||(M=M%1===0?parseInt(M,10):parseFloat(M)),M},L.parseBooleans=function(M){return/^(?:true|false)$/i.test(M)&&(M=M.toLowerCase()==="true"),M}}).call(void 0)},{}],249:[function(W,ee,L){"use strict";(function(){"use strict";var B,M,G,X,K=function(T,e){for(var E in e)N.call(e,E)&&(T[E]=e[E]);function l(){this.constructor=T}return l.prototype=e.prototype,T.prototype=new l,T.__super__=e.prototype,T},N={}.hasOwnProperty;M=W("./defaults"),B=W("./builder"),G=W("./parser"),X=W("./processors"),L.defaults=M.defaults,L.processors=X,L.ValidationError=function(i){K(T,i);function T(e){this.message=e}return T}(Error),L.Builder=B.Builder,L.Parser=G.Parser,L.parseString=G.parseString,L.parseStringPromise=G.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(W,ee,L){"use strict";(function(){ee.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(W,ee,L){"use strict";(function(){ee.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(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/get-prototype-of"),M=i(B),G=W("babel-runtime/helpers/typeof"),X=i(G),K=W("babel-runtime/core-js/object/assign"),N=i(K);function i(T){return T&&T.__esModule?T:{default:T}}(function(){var T,e,E,l,_,r,n,o=[].slice,c={}.hasOwnProperty;T=function(){var f,y,h,b,m,d;if(d=arguments[0],m=2<=arguments.length?o.call(arguments,1):[],_(N.default))N.default.apply(null,arguments);else for(f=0,h=m.length;f<h;f++)if(b=m[f],b!=null)for(y in b){if(!c.call(b,y))continue;d[y]=b[y]}return d},_=function(f){return!!f&&Object.prototype.toString.call(f)==="[object Function]"},r=function(f){var y;return!!f&&((y=typeof f=="undefined"?"undefined":(0,X.default)(f))==="function"||y==="object")},E=function(f){return _(Array.isArray)?Array.isArray(f):Object.prototype.toString.call(f)==="[object Array]"},l=function(f){var y;if(E(f))return!f.length;for(y in f){if(!c.call(f,y))continue;return!1}return!0},n=function(f){var y,h;return r(f)&&(h=(0,M.default)(f))&&(y=h.constructor)&&typeof y=="function"&&y instanceof y&&Function.prototype.toString.call(y)===Function.prototype.toString.call(Object)},e=function(f){return _(f.valueOf)?f.valueOf():f},ee.exports.assign=T,ee.exports.isFunction=_,ee.exports.isObject=r,ee.exports.isArray=E,ee.exports.isEmpty=l,ee.exports.isPlainObject=n,ee.exports.getValue=e}).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(W,ee,L){"use strict";(function(){ee.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/create"),M=G(B);function G(X){return X&&X.__esModule?X:{default:X}}(function(){var X,K,N;X=W("./NodeType"),N=W("./XMLNode"),ee.exports=K=function(){function i(T,e,E){if(this.parent=T,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),e==null)throw new Error("Missing attribute name. "+this.debugInfo(e));this.name=this.stringify.name(e),this.value=this.stringify.attValue(E),this.type=X.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(i.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(i.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(i.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}}),Object.defineProperty(i.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(i.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(i.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(i.prototype,"specified",{get:function(){return!0}}),i.prototype.clone=function(){return(0,M.default)(this)},i.prototype.toString=function(T){return this.options.writer.attribute(this,this.options.writer.filterOptions(T))},i.prototype.debugInfo=function(T){return T=T||this.name,T==null?"parent: <"+this.parent.name+">":"attribute: {"+T+"}, parent: <"+this.parent.name+">"},i.prototype.isEqualNode=function(T){return T.namespaceURI!==this.namespaceURI||(T.prefix!==this.prefix||T.localName!==this.localName)?!1:!(T.value!==this.value)},i}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/create"),M=G(B);function G(X){return X&&X.__esModule?X:{default:X}}(function(){var X,K,N,i=function(E,l){for(var _ in l)T.call(l,_)&&(E[_]=l[_]);function r(){this.constructor=E}return r.prototype=l.prototype,E.prototype=new r,E.__super__=l.prototype,E},T={}.hasOwnProperty;X=W("./NodeType"),N=W("./XMLCharacterData"),ee.exports=K=function(e){i(E,e);function E(l,_){if(E.__super__.constructor.call(this,l),_==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=X.CData,this.value=this.stringify.cdata(_)}return E.prototype.clone=function(){return(0,M.default)(this)},E.prototype.toString=function(l){return this.options.writer.cdata(this,this.options.writer.filterOptions(l))},E}(N)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/create"),M=G(B);function G(X){return X&&X.__esModule?X:{default:X}}(function(){var X,K,N=function(e,E){for(var l in E)i.call(E,l)&&(e[l]=E[l]);function _(){this.constructor=e}return _.prototype=E.prototype,e.prototype=new _,e.__super__=E.prototype,e},i={}.hasOwnProperty;K=W("./XMLNode"),ee.exports=X=function(T){N(e,T);function e(E){e.__super__.constructor.call(this,E),this.value=""}return Object.defineProperty(e.prototype,"data",{get:function(){return this.value},set:function(l){return this.value=l||""}}),Object.defineProperty(e.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(e.prototype,"textContent",{get:function(){return this.value},set:function(l){return this.value=l||""}}),e.prototype.clone=function(){return(0,M.default)(this)},e.prototype.substringData=function(E,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.appendData=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.insertData=function(E,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.deleteData=function(E,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.replaceData=function(E,l,_){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(E){return e.__super__.isEqualNode.apply(this,arguments).isEqualNode(E)?!(E.data!==this.data):!1},e}(K)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/create"),M=G(B);function G(X){return X&&X.__esModule?X:{default:X}}(function(){var X,K,N,i=function(E,l){for(var _ in l)T.call(l,_)&&(E[_]=l[_]);function r(){this.constructor=E}return r.prototype=l.prototype,E.prototype=new r,E.__super__=l.prototype,E},T={}.hasOwnProperty;X=W("./NodeType"),K=W("./XMLCharacterData"),ee.exports=N=function(e){i(E,e);function E(l,_){if(E.__super__.constructor.call(this,l),_==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=X.Comment,this.value=this.stringify.comment(_)}return E.prototype.clone=function(){return(0,M.default)(this)},E.prototype.toString=function(l){return this.options.writer.comment(this,this.options.writer.filterOptions(l))},E}(K)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/keys"),M=K(B),G=W("babel-runtime/core-js/object/create"),X=K(G);function K(N){return N&&N.__esModule?N:{default:N}}(function(){var N,i,T;i=W("./XMLDOMErrorHandler"),T=W("./XMLDOMStringList"),ee.exports=N=function(){function e(){var E;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new i,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=E=(0,X.default)(this.defaultParams)}return Object.defineProperty(e.prototype,"parameterNames",{get:function(){return new T((0,M.default)(this.defaultParams))}}),e.prototype.getParameter=function(E){return this.params.hasOwnProperty(E)?this.params[E]:null},e.prototype.canSetParameter=function(E,l){return!0},e.prototype.setParameter=function(E,l){return l!=null?this.params[E]=l: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(W,ee,L){"use strict";(function(){var B;ee.exports=B=function(){function M(){}return M.prototype.handleError=function(G){throw new Error(G)},M}()}).call(void 0)},{}],260:[function(W,ee,L){"use strict";(function(){var B;ee.exports=B=function(){function M(){}return M.prototype.hasFeature=function(G,X){return!0},M.prototype.createDocumentType=function(G,X,K){throw new Error("This DOM method is not implemented.")},M.prototype.createDocument=function(G,X,K){throw new Error("This DOM method is not implemented.")},M.prototype.createHTMLDocument=function(G){throw new Error("This DOM method is not implemented.")},M.prototype.getFeature=function(G,X){throw new Error("This DOM method is not implemented.")},M}()}).call(void 0)},{}],261:[function(W,ee,L){"use strict";(function(){var B;ee.exports=B=function(){function M(G){this.arr=G||[]}return Object.defineProperty(M.prototype,"length",{get:function(){return this.arr.length}}),M.prototype.item=function(G){return this.arr[G]||null},M.prototype.contains=function(G){return this.arr.indexOf(G)!==-1},M}()}).call(void 0)},{}],262:[function(W,ee,L){"use strict";(function(){var B,M,G,X=function(i,T){for(var e in T)K.call(T,e)&&(i[e]=T[e]);function E(){this.constructor=i}return E.prototype=T.prototype,i.prototype=new E,i.__super__=T.prototype,i},K={}.hasOwnProperty;G=W("./XMLNode"),B=W("./NodeType"),ee.exports=M=function(N){X(i,N);function i(T,e,E,l,_,r){if(i.__super__.constructor.call(this,T),e==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(E==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(e));if(!l)throw new Error("Missing DTD attribute type. "+this.debugInfo(e));if(!_)throw new Error("Missing DTD attribute default. "+this.debugInfo(e));if(_.indexOf("#")!==0&&(_="#"+_),!_.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(e));if(r&&!_.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(e));this.elementName=this.stringify.name(e),this.type=B.AttributeDeclaration,this.attributeName=this.stringify.name(E),this.attributeType=this.stringify.dtdAttType(l),r&&(this.defaultValue=this.stringify.dtdAttDefault(r)),this.defaultValueType=_}return i.prototype.toString=function(T){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(T))},i}(G)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(W,ee,L){"use strict";(function(){var B,M,G,X=function(i,T){for(var e in T)K.call(T,e)&&(i[e]=T[e]);function E(){this.constructor=i}return E.prototype=T.prototype,i.prototype=new E,i.__super__=T.prototype,i},K={}.hasOwnProperty;G=W("./XMLNode"),B=W("./NodeType"),ee.exports=M=function(N){X(i,N);function i(T,e,E){if(i.__super__.constructor.call(this,T),e==null)throw new Error("Missing DTD element name. "+this.debugInfo());E||(E="(#PCDATA)"),Array.isArray(E)&&(E="("+E.join(",")+")"),this.name=this.stringify.name(e),this.type=B.ElementDeclaration,this.value=this.stringify.dtdElementValue(E)}return i.prototype.toString=function(T){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(T))},i}(G)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(W,ee,L){"use strict";(function(){var B,M,G,X,K=function(T,e){for(var E in e)N.call(e,E)&&(T[E]=e[E]);function l(){this.constructor=T}return l.prototype=e.prototype,T.prototype=new l,T.__super__=e.prototype,T},N={}.hasOwnProperty;X=W("./Utility").isObject,G=W("./XMLNode"),B=W("./NodeType"),ee.exports=M=function(i){K(T,i);function T(e,E,l,_){if(T.__super__.constructor.call(this,e),l==null)throw new Error("Missing DTD entity name. "+this.debugInfo(l));if(_==null)throw new Error("Missing DTD entity value. "+this.debugInfo(l));if(this.pe=!!E,this.name=this.stringify.name(l),this.type=B.EntityDeclaration,!X(_))this.value=this.stringify.dtdEntityValue(_),this.internal=!0;else{if(!_.pubID&&!_.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(l));if(_.pubID&&!_.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(l));if(this.internal=!1,_.pubID!=null&&(this.pubID=this.stringify.dtdPubID(_.pubID)),_.sysID!=null&&(this.sysID=this.stringify.dtdSysID(_.sysID)),_.nData!=null&&(this.nData=this.stringify.dtdNData(_.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(l))}}return 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}(G)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(W,ee,L){"use strict";(function(){var B,M,G,X=function(i,T){for(var e in T)K.call(T,e)&&(i[e]=T[e]);function E(){this.constructor=i}return E.prototype=T.prototype,i.prototype=new E,i.__super__=T.prototype,i},K={}.hasOwnProperty;G=W("./XMLNode"),B=W("./NodeType"),ee.exports=M=function(N){X(i,N);function i(T,e,E){if(i.__super__.constructor.call(this,T),e==null)throw new Error("Missing DTD notation name. "+this.debugInfo(e));if(!E.pubID&&!E.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(e));this.name=this.stringify.name(e),this.type=B.NotationDeclaration,E.pubID!=null&&(this.pubID=this.stringify.dtdPubID(E.pubID)),E.sysID!=null&&(this.sysID=this.stringify.dtdSysID(E.sysID))}return Object.defineProperty(i.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(i.prototype,"systemId",{get:function(){return this.sysID}}),i.prototype.toString=function(T){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(T))},i}(G)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(W,ee,L){"use strict";(function(){var B,M,G,X,K=function(T,e){for(var E in e)N.call(e,E)&&(T[E]=e[E]);function l(){this.constructor=T}return l.prototype=e.prototype,T.prototype=new l,T.__super__=e.prototype,T},N={}.hasOwnProperty;X=W("./Utility").isObject,G=W("./XMLNode"),B=W("./NodeType"),ee.exports=M=function(i){K(T,i);function T(e,E,l,_){var r;T.__super__.constructor.call(this,e),X(E)&&(r=E,E=r.version,l=r.encoding,_=r.standalone),E||(E="1.0"),this.type=B.Declaration,this.version=this.stringify.xmlVersion(E),l!=null&&(this.encoding=this.stringify.xmlEncoding(l)),_!=null&&(this.standalone=this.stringify.xmlStandalone(_))}return T.prototype.toString=function(e){return this.options.writer.declaration(this,this.options.writer.filterOptions(e))},T}(G)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(W,ee,L){"use strict";(function(){var B,M,G,X,K,N,i,T,e,E=function(r,n){for(var o in n)l.call(n,o)&&(r[o]=n[o]);function c(){this.constructor=r}return c.prototype=n.prototype,r.prototype=new c,r.__super__=n.prototype,r},l={}.hasOwnProperty;e=W("./Utility").isObject,T=W("./XMLNode"),B=W("./NodeType"),M=W("./XMLDTDAttList"),X=W("./XMLDTDEntity"),G=W("./XMLDTDElement"),K=W("./XMLDTDNotation"),i=W("./XMLNamedNodeMap"),ee.exports=N=function(_){E(r,_);function r(n,o,c){var v,f,y,h,b,m;if(r.__super__.constructor.call(this,n),this.type=B.DocType,n.children){for(h=n.children,f=0,y=h.length;f<y;f++)if(v=h[f],v.type===B.Element){this.name=v.name;break}}this.documentObject=n,e(o)&&(b=o,o=b.pubID,c=b.sysID),c==null&&(m=[o,c],c=m[0],o=m[1]),o!=null&&(this.pubID=this.stringify.dtdPubID(o)),c!=null&&(this.sysID=this.stringify.dtdSysID(c))}return Object.defineProperty(r.prototype,"entities",{get:function(){var o,c,v,f,y;for(f={},y=this.children,c=0,v=y.length;c<v;c++)o=y[c],o.type===B.EntityDeclaration&&!o.pe&&(f[o.name]=o);return new i(f)}}),Object.defineProperty(r.prototype,"notations",{get:function(){var o,c,v,f,y;for(f={},y=this.children,c=0,v=y.length;c<v;c++)o=y[c],o.type===B.NotationDeclaration&&(f[o.name]=o);return new i(f)}}),Object.defineProperty(r.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(r.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(r.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),r.prototype.element=function(n,o){var c;return c=new G(this,n,o),this.children.push(c),this},r.prototype.attList=function(n,o,c,v,f){var y;return y=new M(this,n,o,c,v,f),this.children.push(y),this},r.prototype.entity=function(n,o){var c;return c=new X(this,!1,n,o),this.children.push(c),this},r.prototype.pEntity=function(n,o){var c;return c=new X(this,!0,n,o),this.children.push(c),this},r.prototype.notation=function(n,o){var c;return c=new K(this,n,o),this.children.push(c),this},r.prototype.toString=function(n){return this.options.writer.docType(this,this.options.writer.filterOptions(n))},r.prototype.ele=function(n,o){return this.element(n,o)},r.prototype.att=function(n,o,c,v,f){return this.attList(n,o,c,v,f)},r.prototype.ent=function(n,o){return this.entity(n,o)},r.prototype.pent=function(n,o){return this.pEntity(n,o)},r.prototype.not=function(n,o){return this.notation(n,o)},r.prototype.up=function(){return this.root()||this.documentObject},r.prototype.isEqualNode=function(n){return r.__super__.isEqualNode.apply(this,arguments).isEqualNode(n)?n.name!==this.name||n.publicId!==this.publicId?!1:!(n.systemId!==this.systemId):!1},r}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(W,ee,L){"use strict";(function(){var B,M,G,X,K,N,i,T,e=function(_,r){for(var n in r)E.call(r,n)&&(_[n]=r[n]);function o(){this.constructor=_}return o.prototype=r.prototype,_.prototype=new o,_.__super__=r.prototype,_},E={}.hasOwnProperty;T=W("./Utility").isPlainObject,G=W("./XMLDOMImplementation"),M=W("./XMLDOMConfiguration"),K=W("./XMLNode"),B=W("./NodeType"),i=W("./XMLStringifier"),N=W("./XMLStringWriter"),ee.exports=X=function(l){e(_,l);function _(r){_.__super__.constructor.call(this,null),this.name="#document",this.type=B.Document,this.documentURI=null,this.domConfig=new M,r||(r={}),r.writer||(r.writer=new N),this.options=r,this.stringify=new i(r)}return Object.defineProperty(_.prototype,"implementation",{value:new G}),Object.defineProperty(_.prototype,"doctype",{get:function(){var n,o,c,v;for(v=this.children,o=0,c=v.length;o<c;o++)if(n=v[o],n.type===B.DocType)return n;return null}}),Object.defineProperty(_.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(_.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(_.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(_.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===B.Declaration?this.children[0].encoding:null}}),Object.defineProperty(_.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===B.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(_.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===B.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(_.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(_.prototype,"origin",{get:function(){return null}}),Object.defineProperty(_.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(_.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(_.prototype,"contentType",{get:function(){return null}}),_.prototype.end=function(r){var n;return n={},r?T(r)&&(n=r,r=this.options.writer):r=this.options.writer,r.document(this,r.filterOptions(n))},_.prototype.toString=function(r){return this.options.writer.document(this,this.options.writer.filterOptions(r))},_.prototype.createElement=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createTextNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createComment=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createCDATASection=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createProcessingInstruction=function(r,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createAttribute=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createEntityReference=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByTagName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.importNode=function(r,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createElementNS=function(r,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createAttributeNS=function(r,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByTagNameNS=function(r,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementById=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.adoptNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.renameNode=function(r,n,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByClassName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createEvent=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createNodeIterator=function(r,n,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createTreeWalker=function(r,n,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},_}(K)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(W,ee,L){"use strict";(function(){var B,M,G,X,K,N,i,T,e,E,l,_,r,n,o,c,v,f,y,h,b,m,d,x,R={}.hasOwnProperty;x=W("./Utility"),m=x.isObject,b=x.isFunction,d=x.isPlainObject,h=x.getValue,B=W("./NodeType"),_=W("./XMLDocument"),n=W("./XMLElement"),X=W("./XMLCData"),K=W("./XMLComment"),c=W("./XMLRaw"),y=W("./XMLText"),o=W("./XMLProcessingInstruction"),E=W("./XMLDeclaration"),l=W("./XMLDocType"),N=W("./XMLDTDAttList"),T=W("./XMLDTDEntity"),i=W("./XMLDTDElement"),e=W("./XMLDTDNotation"),G=W("./XMLAttribute"),f=W("./XMLStringifier"),v=W("./XMLStringWriter"),M=W("./WriterState"),ee.exports=r=function(){function O(w,D,A){var P;this.name="?xml",this.type=B.Document,w||(w={}),P={},w.writer?d(w.writer)&&(P=w.writer,w.writer=new v):w.writer=new v,this.options=w,this.writer=w.writer,this.writerOptions=this.writer.filterOptions(P),this.stringify=new f(w),this.onDataCallback=D||function(){},this.onEndCallback=A||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return O.prototype.createChildNode=function(w){var D,A,P,I,u,k,g,a;switch(w.type){case B.CData:this.cdata(w.value);break;case B.Comment:this.comment(w.value);break;case B.Element:P={},g=w.attribs;for(A in g){if(!R.call(g,A))continue;D=g[A],P[A]=D.value}this.node(w.name,P);break;case B.Dummy:this.dummy();break;case B.Raw:this.raw(w.value);break;case B.Text:this.text(w.value);break;case B.ProcessingInstruction:this.instruction(w.target,w.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+w.constructor.name)}for(a=w.children,u=0,k=a.length;u<k;u++)I=a[u],this.createChildNode(I),I.type===B.Element&&this.up();return this},O.prototype.dummy=function(){return this},O.prototype.node=function(w,D,A){var P;if(w==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(w));return this.openCurrent(),w=h(w),D==null&&(D={}),D=h(D),m(D)||(P=[D,A],A=P[0],D=P[1]),this.currentNode=new n(this,w,D),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,A!=null&&this.text(A),this},O.prototype.element=function(w,D,A){var P,I,u,k,g,a;if(this.currentNode&&this.currentNode.type===B.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(w)||m(w)||b(w))for(k=this.options.noValidation,this.options.noValidation=!0,a=new _(this.options).element("TEMP_ROOT"),a.element(w),this.options.noValidation=k,g=a.children,I=0,u=g.length;I<u;I++)P=g[I],this.createChildNode(P),P.type===B.Element&&this.up();else this.node(w,D,A);return this},O.prototype.attribute=function(w,D){var A,P;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(w));if(w!=null&&(w=h(w)),m(w))for(A in w){if(!R.call(w,A))continue;P=w[A],this.attribute(A,P)}else b(D)&&(D=D.apply()),this.options.keepNullAttributes&&D==null?this.currentNode.attribs[w]=new G(this,w,""):D!=null&&(this.currentNode.attribs[w]=new G(this,w,D));return this},O.prototype.text=function(w){var D;return this.openCurrent(),D=new y(this,w),this.onData(this.writer.text(D,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},O.prototype.cdata=function(w){var D;return this.openCurrent(),D=new X(this,w),this.onData(this.writer.cdata(D,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},O.prototype.comment=function(w){var D;return this.openCurrent(),D=new K(this,w),this.onData(this.writer.comment(D,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},O.prototype.raw=function(w){var D;return this.openCurrent(),D=new c(this,w),this.onData(this.writer.raw(D,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},O.prototype.instruction=function(w,D){var A,P,I,u,k;if(this.openCurrent(),w!=null&&(w=h(w)),D!=null&&(D=h(D)),Array.isArray(w))for(A=0,u=w.length;A<u;A++)P=w[A],this.instruction(P);else if(m(w))for(P in w){if(!R.call(w,P))continue;I=w[P],this.instruction(P,I)}else b(D)&&(D=D.apply()),k=new o(this,w,D),this.onData(this.writer.processingInstruction(k,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},O.prototype.declaration=function(w,D,A){var P;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return P=new E(this,w,D,A),this.onData(this.writer.declaration(P,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},O.prototype.doctype=function(w,D,A){if(this.openCurrent(),w==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new l(this,D,A),this.currentNode.rootNodeName=w,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},O.prototype.dtdElement=function(w,D){var A;return this.openCurrent(),A=new i(this,w,D),this.onData(this.writer.dtdElement(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},O.prototype.attList=function(w,D,A,P,I){var u;return this.openCurrent(),u=new N(this,w,D,A,P,I),this.onData(this.writer.dtdAttList(u,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},O.prototype.entity=function(w,D){var A;return this.openCurrent(),A=new T(this,!1,w,D),this.onData(this.writer.dtdEntity(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},O.prototype.pEntity=function(w,D){var A;return this.openCurrent(),A=new T(this,!0,w,D),this.onData(this.writer.dtdEntity(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},O.prototype.notation=function(w,D){var A;return this.openCurrent(),A=new e(this,w,D),this.onData(this.writer.dtdNotation(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},O.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},O.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},O.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},O.prototype.openNode=function(w){var D,A,P,I;if(!w.isOpen){if(!this.root&&this.currentLevel===0&&w.type===B.Element&&(this.root=w),A="",w.type===B.Element){this.writerOptions.state=M.OpenTag,A=this.writer.indent(w,this.writerOptions,this.currentLevel)+"<"+w.name,I=w.attribs;for(P in I){if(!R.call(I,P))continue;D=I[P],A+=this.writer.attribute(D,this.writerOptions,this.currentLevel)}A+=(w.children?">":"/>")+this.writer.endline(w,this.writerOptions,this.currentLevel),this.writerOptions.state=M.InsideTag}else this.writerOptions.state=M.OpenTag,A=this.writer.indent(w,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+w.rootNodeName,w.pubID&&w.sysID?A+=' PUBLIC "'+w.pubID+'" "'+w.sysID+'"':w.sysID&&(A+=' SYSTEM "'+w.sysID+'"'),w.children?(A+=" [",this.writerOptions.state=M.InsideTag):(this.writerOptions.state=M.CloseTag,A+=">"),A+=this.writer.endline(w,this.writerOptions,this.currentLevel);return this.onData(A,this.currentLevel),w.isOpen=!0}},O.prototype.closeNode=function(w){var D;if(!w.isClosed)return D="",this.writerOptions.state=M.CloseTag,w.type===B.Element?D=this.writer.indent(w,this.writerOptions,this.currentLevel)+"</"+w.name+">"+this.writer.endline(w,this.writerOptions,this.currentLevel):D=this.writer.indent(w,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(w,this.writerOptions,this.currentLevel),this.writerOptions.state=M.None,this.onData(D,this.currentLevel),w.isClosed=!0},O.prototype.onData=function(w,D){return this.documentStarted=!0,this.onDataCallback(w,D+1)},O.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},O.prototype.debugInfo=function(w){return w==null?"":"node: <"+w+">"},O.prototype.ele=function(){return this.element.apply(this,arguments)},O.prototype.nod=function(w,D,A){return this.node(w,D,A)},O.prototype.txt=function(w){return this.text(w)},O.prototype.dat=function(w){return this.cdata(w)},O.prototype.com=function(w){return this.comment(w)},O.prototype.ins=function(w,D){return this.instruction(w,D)},O.prototype.dec=function(w,D,A){return this.declaration(w,D,A)},O.prototype.dtd=function(w,D,A){return this.doctype(w,D,A)},O.prototype.e=function(w,D,A){return this.element(w,D,A)},O.prototype.n=function(w,D,A){return this.node(w,D,A)},O.prototype.t=function(w){return this.text(w)},O.prototype.d=function(w){return this.cdata(w)},O.prototype.c=function(w){return this.comment(w)},O.prototype.r=function(w){return this.raw(w)},O.prototype.i=function(w,D){return this.instruction(w,D)},O.prototype.att=function(){return this.currentNode&&this.currentNode.type===B.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},O.prototype.a=function(){return this.currentNode&&this.currentNode.type===B.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},O.prototype.ent=function(w,D){return this.entity(w,D)},O.prototype.pent=function(w,D){return this.pEntity(w,D)},O.prototype.not=function(w,D){return this.notation(w,D)},O}()}).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(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/create"),M=G(B);function G(X){return X&&X.__esModule?X:{default:X}}(function(){var X,K,N,i=function(E,l){for(var _ in l)T.call(l,_)&&(E[_]=l[_]);function r(){this.constructor=E}return r.prototype=l.prototype,E.prototype=new r,E.__super__=l.prototype,E},T={}.hasOwnProperty;N=W("./XMLNode"),X=W("./NodeType"),ee.exports=K=function(e){i(E,e);function E(l){E.__super__.constructor.call(this,l),this.type=X.Dummy}return E.prototype.clone=function(){return(0,M.default)(this)},E.prototype.toString=function(l){return""},E}(N)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/create"),M=G(B);function G(X){return X&&X.__esModule?X:{default:X}}(function(){var X,K,N,i,T,e,E,l,_,r=function(c,v){for(var f in v)n.call(v,f)&&(c[f]=v[f]);function y(){this.constructor=c}return y.prototype=v.prototype,c.prototype=new y,c.__super__=v.prototype,c},n={}.hasOwnProperty;_=W("./Utility"),l=_.isObject,E=_.isFunction,e=_.getValue,T=W("./XMLNode"),X=W("./NodeType"),K=W("./XMLAttribute"),i=W("./XMLNamedNodeMap"),ee.exports=N=function(o){r(c,o);function c(v,f,y){var h,b,m,d;if(c.__super__.constructor.call(this,v),f==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(f),this.type=X.Element,this.attribs={},this.schemaTypeInfo=null,y!=null&&this.attribute(y),v.type===X.Document&&(this.isRoot=!0,this.documentObject=v,v.rootObject=this,v.children)){for(d=v.children,b=0,m=d.length;b<m;b++)if(h=d[b],h.type===X.DocType){h.name=this.name;break}}}return Object.defineProperty(c.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(c.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(c.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(c.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(c.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(c.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(c.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(c.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new i(this.attribs)),this.attributeMap}}),c.prototype.clone=function(){var v,f,y,h;y=(0,M.default)(this),y.isRoot&&(y.documentObject=null),y.attribs={},h=this.attribs;for(f in h){if(!n.call(h,f))continue;v=h[f],y.attribs[f]=v.clone()}return y.children=[],this.children.forEach(function(b){var m;return m=b.clone(),m.parent=y,y.children.push(m)}),y},c.prototype.attribute=function(v,f){var y,h;if(v!=null&&(v=e(v)),l(v))for(y in v){if(!n.call(v,y))continue;h=v[y],this.attribute(y,h)}else E(f)&&(f=f.apply()),this.options.keepNullAttributes&&f==null?this.attribs[v]=new K(this,v,""):f!=null&&(this.attribs[v]=new K(this,v,f));return this},c.prototype.removeAttribute=function(v){var f,y,h;if(v==null)throw new Error("Missing attribute name. "+this.debugInfo());if(v=e(v),Array.isArray(v))for(y=0,h=v.length;y<h;y++)f=v[y],delete this.attribs[f];else delete this.attribs[v];return this},c.prototype.toString=function(v){return this.options.writer.element(this,this.options.writer.filterOptions(v))},c.prototype.att=function(v,f){return this.attribute(v,f)},c.prototype.a=function(v,f){return this.attribute(v,f)},c.prototype.getAttribute=function(v){return this.attribs.hasOwnProperty(v)?this.attribs[v].value:null},c.prototype.setAttribute=function(v,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getAttributeNode=function(v){return this.attribs.hasOwnProperty(v)?this.attribs[v]:null},c.prototype.setAttributeNode=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.removeAttributeNode=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagName=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getAttributeNS=function(v,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.setAttributeNS=function(v,f,y){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.removeAttributeNS=function(v,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getAttributeNodeNS=function(v,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.setAttributeNodeNS=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagNameNS=function(v,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.hasAttribute=function(v){return this.attribs.hasOwnProperty(v)},c.prototype.hasAttributeNS=function(v,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.setIdAttribute=function(v,f){return this.attribs.hasOwnProperty(v)?this.attribs[v].isId:f},c.prototype.setIdAttributeNS=function(v,f,y){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.setIdAttributeNode=function(v,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagName=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagNameNS=function(v,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByClassName=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.isEqualNode=function(v){var f,y,h;if(!c.__super__.isEqualNode.apply(this,arguments).isEqualNode(v))return!1;if(v.namespaceURI!==this.namespaceURI)return!1;if(v.prefix!==this.prefix)return!1;if(v.localName!==this.localName)return!1;if(v.attribs.length!==this.attribs.length)return!1;for(f=y=0,h=this.attribs.length-1;0<=h?y<=h:y>=h;f=0<=h?++y:--y)if(!this.attribs[f].isEqualNode(v.attribs[f]))return!1;return!0},c}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/keys"),M=G(B);function G(X){return X&&X.__esModule?X:{default:X}}(function(){var X;ee.exports=X=function(){function K(N){this.nodes=N}return Object.defineProperty(K.prototype,"length",{get:function(){return(0,M.default)(this.nodes).length||0}}),K.prototype.clone=function(){return this.nodes=null},K.prototype.getNamedItem=function(N){return this.nodes[N]},K.prototype.setNamedItem=function(N){var i;return i=this.nodes[N.nodeName],this.nodes[N.nodeName]=N,i||null},K.prototype.removeNamedItem=function(N){var i;return i=this.nodes[N],delete this.nodes[N],i||null},K.prototype.item=function(N){return this.nodes[(0,M.default)(this.nodes)[N]]||null},K.prototype.getNamedItemNS=function(N,i){throw new Error("This DOM method is not implemented.")},K.prototype.setNamedItemNS=function(N){throw new Error("This DOM method is not implemented.")},K.prototype.removeNamedItemNS=function(N,i){throw new Error("This DOM method is not implemented.")},K}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(W,ee,L){"use strict";(function(){var B,M,G,X,K,N,i,T,e,E,l,_,r,n,o,c,v,f,y,h={}.hasOwnProperty;y=W("./Utility"),f=y.isObject,v=y.isFunction,c=y.isEmpty,o=y.getValue,T=null,G=null,X=null,K=null,N=null,r=null,n=null,_=null,i=null,M=null,l=null,e=null,B=null,ee.exports=E=function(){function b(m){this.parent=m,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,T||(T=W("./XMLElement"),G=W("./XMLCData"),X=W("./XMLComment"),K=W("./XMLDeclaration"),N=W("./XMLDocType"),r=W("./XMLRaw"),n=W("./XMLText"),_=W("./XMLProcessingInstruction"),i=W("./XMLDummy"),M=W("./NodeType"),l=W("./XMLNodeList"),e=W("./XMLNamedNodeMap"),B=W("./DocumentPosition"))}return Object.defineProperty(b.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(b.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(b.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(b.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(b.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new l(this.children)),this.childNodeList}}),Object.defineProperty(b.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(b.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(b.prototype,"previousSibling",{get:function(){var d;return d=this.parent.children.indexOf(this),this.parent.children[d-1]||null}}),Object.defineProperty(b.prototype,"nextSibling",{get:function(){var d;return d=this.parent.children.indexOf(this),this.parent.children[d+1]||null}}),Object.defineProperty(b.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(b.prototype,"textContent",{get:function(){var d,x,R,O,w;if(this.nodeType===M.Element||this.nodeType===M.DocumentFragment){for(w="",O=this.children,x=0,R=O.length;x<R;x++)d=O[x],d.textContent&&(w+=d.textContent);return w}else return null},set:function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),b.prototype.setParent=function(m){var d,x,R,O,w;for(this.parent=m,m&&(this.options=m.options,this.stringify=m.stringify),O=this.children,w=[],x=0,R=O.length;x<R;x++)d=O[x],w.push(d.setParent(this));return w},b.prototype.element=function(m,d,x){var R,O,w,D,A,P,I,u,k,g,a;if(P=null,d===null&&x==null&&(k=[{},null],d=k[0],x=k[1]),d==null&&(d={}),d=o(d),f(d)||(g=[d,x],x=g[0],d=g[1]),m!=null&&(m=o(m)),Array.isArray(m))for(w=0,I=m.length;w<I;w++)O=m[w],P=this.element(O);else if(v(m))P=this.element(m.apply());else if(f(m))for(A in m){if(!h.call(m,A))continue;if(a=m[A],v(a)&&(a=a.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&A.indexOf(this.stringify.convertAttKey)===0)P=this.attribute(A.substr(this.stringify.convertAttKey.length),a);else if(!this.options.separateArrayItems&&Array.isArray(a)&&c(a))P=this.dummy();else if(f(a)&&c(a))P=this.element(A);else if(!this.options.keepNullNodes&&a==null)P=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(a))for(D=0,u=a.length;D<u;D++)O=a[D],R={},R[A]=O,P=this.element(R);else f(a)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&A.indexOf(this.stringify.convertTextKey)===0?P=this.element(a):(P=this.element(A),P.element(a)):P=this.element(A,a)}else!this.options.keepNullNodes&&x===null?P=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&m.indexOf(this.stringify.convertTextKey)===0?P=this.text(x):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&m.indexOf(this.stringify.convertCDataKey)===0?P=this.cdata(x):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&m.indexOf(this.stringify.convertCommentKey)===0?P=this.comment(x):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&m.indexOf(this.stringify.convertRawKey)===0?P=this.raw(x):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&m.indexOf(this.stringify.convertPIKey)===0?P=this.instruction(m.substr(this.stringify.convertPIKey.length),x):P=this.node(m,d,x);if(P==null)throw new Error("Could not create any elements with: "+m+". "+this.debugInfo());return P},b.prototype.insertBefore=function(m,d,x){var R,O,w,D,A;if(m!=null?m.type:void 0)return w=m,D=d,w.setParent(this),D?(O=children.indexOf(D),A=children.splice(O),children.push(w),Array.prototype.push.apply(children,A)):children.push(w),w;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(m));return O=this.parent.children.indexOf(this),A=this.parent.children.splice(O),R=this.parent.element(m,d,x),Array.prototype.push.apply(this.parent.children,A),R},b.prototype.insertAfter=function(m,d,x){var R,O,w;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(m));return O=this.parent.children.indexOf(this),w=this.parent.children.splice(O+1),R=this.parent.element(m,d,x),Array.prototype.push.apply(this.parent.children,w),R},b.prototype.remove=function(){var m,d;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return m=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[m,m-m+1].concat(d=[])),this.parent},b.prototype.node=function(m,d,x){var R,O;return m!=null&&(m=o(m)),d||(d={}),d=o(d),f(d)||(O=[d,x],x=O[0],d=O[1]),R=new T(this,m,d),x!=null&&R.text(x),this.children.push(R),R},b.prototype.text=function(m){var d;return f(m)&&this.element(m),d=new n(this,m),this.children.push(d),this},b.prototype.cdata=function(m){var d;return d=new G(this,m),this.children.push(d),this},b.prototype.comment=function(m){var d;return d=new X(this,m),this.children.push(d),this},b.prototype.commentBefore=function(m){var d,x,R;return x=this.parent.children.indexOf(this),R=this.parent.children.splice(x),d=this.parent.comment(m),Array.prototype.push.apply(this.parent.children,R),this},b.prototype.commentAfter=function(m){var d,x,R;return x=this.parent.children.indexOf(this),R=this.parent.children.splice(x+1),d=this.parent.comment(m),Array.prototype.push.apply(this.parent.children,R),this},b.prototype.raw=function(m){var d;return d=new r(this,m),this.children.push(d),this},b.prototype.dummy=function(){var m;return m=new i(this),m},b.prototype.instruction=function(m,d){var x,R,O,w,D;if(m!=null&&(m=o(m)),d!=null&&(d=o(d)),Array.isArray(m))for(w=0,D=m.length;w<D;w++)x=m[w],this.instruction(x);else if(f(m))for(x in m){if(!h.call(m,x))continue;R=m[x],this.instruction(x,R)}else v(d)&&(d=d.apply()),O=new _(this,m,d),this.children.push(O);return this},b.prototype.instructionBefore=function(m,d){var x,R,O;return R=this.parent.children.indexOf(this),O=this.parent.children.splice(R),x=this.parent.instruction(m,d),Array.prototype.push.apply(this.parent.children,O),this},b.prototype.instructionAfter=function(m,d){var x,R,O;return R=this.parent.children.indexOf(this),O=this.parent.children.splice(R+1),x=this.parent.instruction(m,d),Array.prototype.push.apply(this.parent.children,O),this},b.prototype.declaration=function(m,d,x){var R,O;return R=this.document(),O=new K(R,m,d,x),R.children.length===0?R.children.unshift(O):R.children[0].type===M.Declaration?R.children[0]=O:R.children.unshift(O),R.root()||R},b.prototype.dtd=function(m,d){var x,R,O,w,D,A,P,I,u,k;for(R=this.document(),O=new N(R,m,d),u=R.children,w=D=0,P=u.length;D<P;w=++D)if(x=u[w],x.type===M.DocType)return R.children[w]=O,O;for(k=R.children,w=A=0,I=k.length;A<I;w=++A)if(x=k[w],x.isRoot)return R.children.splice(w,0,O),O;return R.children.push(O),O},b.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},b.prototype.root=function(){var m;for(m=this;m;){if(m.type===M.Document)return m.rootObject;if(m.isRoot)return m;m=m.parent}},b.prototype.document=function(){var m;for(m=this;m;){if(m.type===M.Document)return m;m=m.parent}},b.prototype.end=function(m){return this.document().end(m)},b.prototype.prev=function(){var m;if(m=this.parent.children.indexOf(this),m<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[m-1]},b.prototype.next=function(){var m;if(m=this.parent.children.indexOf(this),m===-1||m===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[m+1]},b.prototype.importDocument=function(m){var d;return d=m.root().clone(),d.parent=this,d.isRoot=!1,this.children.push(d),this},b.prototype.debugInfo=function(m){var d,x;return m=m||this.name,m==null&&!((d=this.parent)!=null?d.name:void 0)?"":m==null?"parent: <"+this.parent.name+">":((x=this.parent)!=null?x.name:void 0)?"node: <"+m+">, parent: <"+this.parent.name+">":"node: <"+m+">"},b.prototype.ele=function(m,d,x){return this.element(m,d,x)},b.prototype.nod=function(m,d,x){return this.node(m,d,x)},b.prototype.txt=function(m){return this.text(m)},b.prototype.dat=function(m){return this.cdata(m)},b.prototype.com=function(m){return this.comment(m)},b.prototype.ins=function(m,d){return this.instruction(m,d)},b.prototype.doc=function(){return this.document()},b.prototype.dec=function(m,d,x){return this.declaration(m,d,x)},b.prototype.e=function(m,d,x){return this.element(m,d,x)},b.prototype.n=function(m,d,x){return this.node(m,d,x)},b.prototype.t=function(m){return this.text(m)},b.prototype.d=function(m){return this.cdata(m)},b.prototype.c=function(m){return this.comment(m)},b.prototype.r=function(m){return this.raw(m)},b.prototype.i=function(m,d){return this.instruction(m,d)},b.prototype.u=function(){return this.up()},b.prototype.importXMLBuilder=function(m){return this.importDocument(m)},b.prototype.replaceChild=function(m,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},b.prototype.removeChild=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},b.prototype.appendChild=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},b.prototype.hasChildNodes=function(){return this.children.length!==0},b.prototype.cloneNode=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},b.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},b.prototype.isSupported=function(m,d){return!0},b.prototype.hasAttributes=function(){return this.attribs.length!==0},b.prototype.compareDocumentPosition=function(m){var d,x;return d=this,d===m?0:this.document()!==m.document()?(x=B.Disconnected|B.ImplementationSpecific,Math.random()<.5?x|=B.Preceding:x|=B.Following,x):d.isAncestor(m)?B.Contains|B.Preceding:d.isDescendant(m)?B.Contains|B.Following:d.isPreceding(m)?B.Preceding:B.Following},b.prototype.isSameNode=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},b.prototype.lookupPrefix=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},b.prototype.isDefaultNamespace=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},b.prototype.lookupNamespaceURI=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},b.prototype.isEqualNode=function(m){var d,x,R;if(m.nodeType!==this.nodeType)return!1;if(m.children.length!==this.children.length)return!1;for(d=x=0,R=this.children.length-1;0<=R?x<=R:x>=R;d=0<=R?++x:--x)if(!this.children[d].isEqualNode(m.children[d]))return!1;return!0},b.prototype.getFeature=function(m,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},b.prototype.setUserData=function(m,d,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},b.prototype.getUserData=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},b.prototype.contains=function(m){return m?m===this||this.isDescendant(m):!1},b.prototype.isDescendant=function(m){var d,x,R,O,w;for(w=this.children,R=0,O=w.length;R<O;R++){if(d=w[R],m===d)return!0;if(x=d.isDescendant(m),x)return!0}return!1},b.prototype.isAncestor=function(m){return m.isDescendant(this)},b.prototype.isPreceding=function(m){var d,x;return d=this.treePosition(m),x=this.treePosition(this),d===-1||x===-1?!1:d<x},b.prototype.isFollowing=function(m){var d,x;return d=this.treePosition(m),x=this.treePosition(this),d===-1||x===-1?!1:d>x},b.prototype.treePosition=function(m){var d,x;return x=0,d=!1,this.foreachTreeNode(this.document(),function(R){if(x++,!d&&R===m)return d=!0}),d?x:-1},b.prototype.foreachTreeNode=function(m,d){var x,R,O,w,D;for(m||(m=this.document()),w=m.children,R=0,O=w.length;R<O;R++){if(x=w[R],D=d(x))return D;if(D=this.foreachTreeNode(x,d),D)return D}},b}()}).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(W,ee,L){"use strict";(function(){var B;ee.exports=B=function(){function M(G){this.nodes=G}return Object.defineProperty(M.prototype,"length",{get:function(){return this.nodes.length||0}}),M.prototype.clone=function(){return this.nodes=null},M.prototype.item=function(G){return this.nodes[G]||null},M}()}).call(void 0)},{}],275:[function(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/create"),M=G(B);function G(X){return X&&X.__esModule?X:{default:X}}(function(){var X,K,N,i=function(E,l){for(var _ in l)T.call(l,_)&&(E[_]=l[_]);function r(){this.constructor=E}return r.prototype=l.prototype,E.prototype=new r,E.__super__=l.prototype,E},T={}.hasOwnProperty;X=W("./NodeType"),K=W("./XMLCharacterData"),ee.exports=N=function(e){i(E,e);function E(l,_,r){if(E.__super__.constructor.call(this,l),_==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=X.ProcessingInstruction,this.target=this.stringify.insTarget(_),this.name=this.target,r&&(this.value=this.stringify.insValue(r))}return E.prototype.clone=function(){return(0,M.default)(this)},E.prototype.toString=function(l){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(l))},E.prototype.isEqualNode=function(l){return E.__super__.isEqualNode.apply(this,arguments).isEqualNode(l)?!(l.target!==this.target):!1},E}(K)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/create"),M=G(B);function G(X){return X&&X.__esModule?X:{default:X}}(function(){var X,K,N,i=function(E,l){for(var _ in l)T.call(l,_)&&(E[_]=l[_]);function r(){this.constructor=E}return r.prototype=l.prototype,E.prototype=new r,E.__super__=l.prototype,E},T={}.hasOwnProperty;X=W("./NodeType"),K=W("./XMLNode"),ee.exports=N=function(e){i(E,e);function E(l,_){if(E.__super__.constructor.call(this,l),_==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=X.Raw,this.value=this.stringify.raw(_)}return E.prototype.clone=function(){return(0,M.default)(this)},E.prototype.toString=function(l){return this.options.writer.raw(this,this.options.writer.filterOptions(l))},E}(K)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(W,ee,L){"use strict";(function(){var B,M,G,X,K=function(T,e){for(var E in e)N.call(e,E)&&(T[E]=e[E]);function l(){this.constructor=T}return l.prototype=e.prototype,T.prototype=new l,T.__super__=e.prototype,T},N={}.hasOwnProperty;B=W("./NodeType"),X=W("./XMLWriterBase"),M=W("./WriterState"),ee.exports=G=function(i){K(T,i);function T(e,E){this.stream=e,T.__super__.constructor.call(this,E)}return T.prototype.endline=function(e,E,l){return e.isLastRootNode&&E.state===M.CloseTag?"":T.__super__.endline.call(this,e,E,l)},T.prototype.document=function(e,E){var l,_,r,n,o,c,v,f,y;for(v=e.children,_=r=0,o=v.length;r<o;_=++r)l=v[_],l.isLastRootNode=_===e.children.length-1;for(E=this.filterOptions(E),f=e.children,y=[],n=0,c=f.length;n<c;n++)l=f[n],y.push(this.writeChildNode(l,E,0));return y},T.prototype.attribute=function(e,E,l){return this.stream.write(T.__super__.attribute.call(this,e,E,l))},T.prototype.cdata=function(e,E,l){return this.stream.write(T.__super__.cdata.call(this,e,E,l))},T.prototype.comment=function(e,E,l){return this.stream.write(T.__super__.comment.call(this,e,E,l))},T.prototype.declaration=function(e,E,l){return this.stream.write(T.__super__.declaration.call(this,e,E,l))},T.prototype.docType=function(e,E,l){var _,r,n,o;if(l||(l=0),this.openNode(e,E,l),E.state=M.OpenTag,this.stream.write(this.indent(e,E,l)),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,E,l)),E.state=M.InsideTag,o=e.children,r=0,n=o.length;r<n;r++)_=o[r],this.writeChildNode(_,E,l+1);E.state=M.CloseTag,this.stream.write("]")}return E.state=M.CloseTag,this.stream.write(E.spaceBeforeSlash+">"),this.stream.write(this.endline(e,E,l)),E.state=M.None,this.closeNode(e,E,l)},T.prototype.element=function(e,E,l){var _,r,n,o,c,v,f,y,h,b;l||(l=0),this.openNode(e,E,l),E.state=M.OpenTag,this.stream.write(this.indent(e,E,l)+"<"+e.name),h=e.attribs;for(f in h){if(!N.call(h,f))continue;_=h[f],this.attribute(_,E,l)}if(n=e.children.length,o=n===0?null:e.children[0],n===0||e.children.every(function(m){return(m.type===B.Text||m.type===B.Raw)&&m.value===""}))E.allowEmpty?(this.stream.write(">"),E.state=M.CloseTag,this.stream.write("</"+e.name+">")):(E.state=M.CloseTag,this.stream.write(E.spaceBeforeSlash+"/>"));else if(E.pretty&&n===1&&(o.type===B.Text||o.type===B.Raw)&&o.value!=null)this.stream.write(">"),E.state=M.InsideTag,E.suppressPrettyCount++,y=!0,this.writeChildNode(o,E,l+1),E.suppressPrettyCount--,y=!1,E.state=M.CloseTag,this.stream.write("</"+e.name+">");else{for(this.stream.write(">"+this.endline(e,E,l)),E.state=M.InsideTag,b=e.children,c=0,v=b.length;c<v;c++)r=b[c],this.writeChildNode(r,E,l+1);E.state=M.CloseTag,this.stream.write(this.indent(e,E,l)+"</"+e.name+">")}return this.stream.write(this.endline(e,E,l)),E.state=M.None,this.closeNode(e,E,l)},T.prototype.processingInstruction=function(e,E,l){return this.stream.write(T.__super__.processingInstruction.call(this,e,E,l))},T.prototype.raw=function(e,E,l){return this.stream.write(T.__super__.raw.call(this,e,E,l))},T.prototype.text=function(e,E,l){return this.stream.write(T.__super__.text.call(this,e,E,l))},T.prototype.dtdAttList=function(e,E,l){return this.stream.write(T.__super__.dtdAttList.call(this,e,E,l))},T.prototype.dtdElement=function(e,E,l){return this.stream.write(T.__super__.dtdElement.call(this,e,E,l))},T.prototype.dtdEntity=function(e,E,l){return this.stream.write(T.__super__.dtdEntity.call(this,e,E,l))},T.prototype.dtdNotation=function(e,E,l){return this.stream.write(T.__super__.dtdNotation.call(this,e,E,l))},T}(X)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(W,ee,L){"use strict";(function(){var B,M,G=function(N,i){for(var T in i)X.call(i,T)&&(N[T]=i[T]);function e(){this.constructor=N}return e.prototype=i.prototype,N.prototype=new e,N.__super__=i.prototype,N},X={}.hasOwnProperty;M=W("./XMLWriterBase"),ee.exports=B=function(K){G(N,K);function N(i){N.__super__.constructor.call(this,i)}return N.prototype.document=function(i,T){var e,E,l,_,r;for(T=this.filterOptions(T),_="",r=i.children,E=0,l=r.length;E<l;E++)e=r[E],_+=this.writeChildNode(e,T,0);return T.pretty&&_.slice(-T.newline.length)===T.newline&&(_=_.slice(0,-T.newline.length)),_},N}(M)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(W,ee,L){"use strict";(function(){var B,M=function(K,N){return function(){return K.apply(N,arguments)}},G={}.hasOwnProperty;ee.exports=B=function(){function X(K){this.assertLegalName=M(this.assertLegalName,this),this.assertLegalChar=M(this.assertLegalChar,this);var N,i,T;K||(K={}),this.options=K,this.options.version||(this.options.version="1.0"),i=K.stringify||{};for(N in i){if(!G.call(i,N))continue;T=i[N],this[N]=T}}return X.prototype.name=function(K){return this.options.noValidation?K:this.assertLegalName(""+K||"")},X.prototype.text=function(K){return this.options.noValidation?K:this.assertLegalChar(this.textEscape(""+K||""))},X.prototype.cdata=function(K){return this.options.noValidation?K:(K=""+K||"",K=K.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(K))},X.prototype.comment=function(K){if(this.options.noValidation)return K;if(K=""+K||"",K.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+K);return this.assertLegalChar(K)},X.prototype.raw=function(K){return this.options.noValidation?K:""+K||""},X.prototype.attValue=function(K){return this.options.noValidation?K:this.assertLegalChar(this.attEscape(K=""+K||""))},X.prototype.insTarget=function(K){return this.options.noValidation?K:this.assertLegalChar(""+K||"")},X.prototype.insValue=function(K){if(this.options.noValidation)return K;if(K=""+K||"",K.match(/\?>/))throw new Error("Invalid processing instruction value: "+K);return this.assertLegalChar(K)},X.prototype.xmlVersion=function(K){if(this.options.noValidation)return K;if(K=""+K||"",!K.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+K);return K},X.prototype.xmlEncoding=function(K){if(this.options.noValidation)return K;if(K=""+K||"",!K.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+K);return this.assertLegalChar(K)},X.prototype.xmlStandalone=function(K){return this.options.noValidation?K:K?"yes":"no"},X.prototype.dtdPubID=function(K){return this.options.noValidation?K:this.assertLegalChar(""+K||"")},X.prototype.dtdSysID=function(K){return this.options.noValidation?K:this.assertLegalChar(""+K||"")},X.prototype.dtdElementValue=function(K){return this.options.noValidation?K:this.assertLegalChar(""+K||"")},X.prototype.dtdAttType=function(K){return this.options.noValidation?K:this.assertLegalChar(""+K||"")},X.prototype.dtdAttDefault=function(K){return this.options.noValidation?K:this.assertLegalChar(""+K||"")},X.prototype.dtdEntityValue=function(K){return this.options.noValidation?K:this.assertLegalChar(""+K||"")},X.prototype.dtdNData=function(K){return this.options.noValidation?K:this.assertLegalChar(""+K||"")},X.prototype.convertAttKey="@",X.prototype.convertPIKey="?",X.prototype.convertTextKey="#text",X.prototype.convertCDataKey="#cdata",X.prototype.convertCommentKey="#comment",X.prototype.convertRawKey="#raw",X.prototype.assertLegalChar=function(K){var N,i;if(this.options.noValidation)return K;if(N="",this.options.version==="1.0"){if(N=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,i=K.match(N))throw new Error("Invalid character in string: "+K+" at index "+i.index)}else if(this.options.version==="1.1"&&(N=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,i=K.match(N)))throw new Error("Invalid character in string: "+K+" at index "+i.index);return K},X.prototype.assertLegalName=function(K){var N;if(this.options.noValidation)return K;if(this.assertLegalChar(K),N=/^([: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])*$/,!K.match(N))throw new Error("Invalid character in name");return K},X.prototype.textEscape=function(K){var N;return this.options.noValidation?K:(N=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,K.replace(N,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},X.prototype.attEscape=function(K){var N;return this.options.noValidation?K:(N=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,K.replace(N,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},X}()}).call(void 0)},{}],280:[function(W,ee,L){"use strict";var B=W("babel-runtime/core-js/object/create"),M=G(B);function G(X){return X&&X.__esModule?X:{default:X}}(function(){var X,K,N,i=function(E,l){for(var _ in l)T.call(l,_)&&(E[_]=l[_]);function r(){this.constructor=E}return r.prototype=l.prototype,E.prototype=new r,E.__super__=l.prototype,E},T={}.hasOwnProperty;X=W("./NodeType"),K=W("./XMLCharacterData"),ee.exports=N=function(e){i(E,e);function E(l,_){if(E.__super__.constructor.call(this,l),_==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=X.Text,this.value=this.stringify.text(_)}return Object.defineProperty(E.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(E.prototype,"wholeText",{get:function(){var _,r,n;for(n="",r=this.previousSibling;r;)n=r.data+n,r=r.previousSibling;for(n+=this.data,_=this.nextSibling;_;)n=n+_.data,_=_.nextSibling;return n}}),E.prototype.clone=function(){return(0,M.default)(this)},E.prototype.toString=function(l){return this.options.writer.text(this,this.options.writer.filterOptions(l))},E.prototype.splitText=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.replaceWholeText=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},E}(K)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(W,ee,L){"use strict";(function(){var B,M,G,X,K,N,i,T,e,E,l,_,r,n,o,c,v,f={}.hasOwnProperty;v=W("./Utility").assign,B=W("./NodeType"),e=W("./XMLDeclaration"),E=W("./XMLDocType"),G=W("./XMLCData"),X=W("./XMLComment"),_=W("./XMLElement"),n=W("./XMLRaw"),o=W("./XMLText"),r=W("./XMLProcessingInstruction"),l=W("./XMLDummy"),K=W("./XMLDTDAttList"),N=W("./XMLDTDElement"),i=W("./XMLDTDEntity"),T=W("./XMLDTDNotation"),M=W("./WriterState"),ee.exports=c=function(){function y(h){var b,m,d;h||(h={}),this.options=h,m=h.writer||{};for(b in m){if(!f.call(m,b))continue;d=m[b],this["_"+b]=this[b],this[b]=d}}return y.prototype.filterOptions=function(h){var b,m,d,x,R,O,w,D;return h||(h={}),h=v({},this.options,h),b={writer:this},b.pretty=h.pretty||!1,b.allowEmpty=h.allowEmpty||!1,b.indent=(m=h.indent)!=null?m:" ",b.newline=(d=h.newline)!=null?d:`
|
|
|
`,b.offset=(x=h.offset)!=null?x:0,b.dontPrettyTextNodes=(R=(O=h.dontPrettyTextNodes)!=null?O:h.dontprettytextnodes)!=null?R:0,b.spaceBeforeSlash=(w=(D=h.spaceBeforeSlash)!=null?D:h.spacebeforeslash)!=null?w:"",b.spaceBeforeSlash===!0&&(b.spaceBeforeSlash=" "),b.suppressPrettyCount=0,b.user={},b.state=M.None,b},y.prototype.indent=function(h,b,m){var d;return!b.pretty||b.suppressPrettyCount?"":b.pretty&&(d=(m||0)+b.offset+1,d>0)?new Array(d).join(b.indent):""},y.prototype.endline=function(h,b,m){return!b.pretty||b.suppressPrettyCount?"":b.newline},y.prototype.attribute=function(h,b,m){var d;return this.openAttribute(h,b,m),d=" "+h.name+'="'+h.value+'"',this.closeAttribute(h,b,m),d},y.prototype.cdata=function(h,b,m){var d;return this.openNode(h,b,m),b.state=M.OpenTag,d=this.indent(h,b,m)+"<![CDATA[",b.state=M.InsideTag,d+=h.value,b.state=M.CloseTag,d+="]]>"+this.endline(h,b,m),b.state=M.None,this.closeNode(h,b,m),d},y.prototype.comment=function(h,b,m){var d;return this.openNode(h,b,m),b.state=M.OpenTag,d=this.indent(h,b,m)+"<!-- ",b.state=M.InsideTag,d+=h.value,b.state=M.CloseTag,d+=" -->"+this.endline(h,b,m),b.state=M.None,this.closeNode(h,b,m),d},y.prototype.declaration=function(h,b,m){var d;return this.openNode(h,b,m),b.state=M.OpenTag,d=this.indent(h,b,m)+"<?xml",b.state=M.InsideTag,d+=' version="'+h.version+'"',h.encoding!=null&&(d+=' encoding="'+h.encoding+'"'),h.standalone!=null&&(d+=' standalone="'+h.standalone+'"'),b.state=M.CloseTag,d+=b.spaceBeforeSlash+"?>",d+=this.endline(h,b,m),b.state=M.None,this.closeNode(h,b,m),d},y.prototype.docType=function(h,b,m){var d,x,R,O,w;if(m||(m=0),this.openNode(h,b,m),b.state=M.OpenTag,O=this.indent(h,b,m),O+="<!DOCTYPE "+h.root().name,h.pubID&&h.sysID?O+=' PUBLIC "'+h.pubID+'" "'+h.sysID+'"':h.sysID&&(O+=' SYSTEM "'+h.sysID+'"'),h.children.length>0){for(O+=" [",O+=this.endline(h,b,m),b.state=M.InsideTag,w=h.children,x=0,R=w.length;x<R;x++)d=w[x],O+=this.writeChildNode(d,b,m+1);b.state=M.CloseTag,O+="]"}return b.state=M.CloseTag,O+=b.spaceBeforeSlash+">",O+=this.endline(h,b,m),b.state=M.None,this.closeNode(h,b,m),O},y.prototype.element=function(h,b,m){var d,x,R,O,w,D,A,P,I,u,k,g,a,C;m||(m=0),u=!1,k="",this.openNode(h,b,m),b.state=M.OpenTag,k+=this.indent(h,b,m)+"<"+h.name,g=h.attribs;for(I in g){if(!f.call(g,I))continue;d=g[I],k+=this.attribute(d,b,m)}if(R=h.children.length,O=R===0?null:h.children[0],R===0||h.children.every(function(S){return(S.type===B.Text||S.type===B.Raw)&&S.value===""}))b.allowEmpty?(k+=">",b.state=M.CloseTag,k+="</"+h.name+">"+this.endline(h,b,m)):(b.state=M.CloseTag,k+=b.spaceBeforeSlash+"/>"+this.endline(h,b,m));else if(b.pretty&&R===1&&(O.type===B.Text||O.type===B.Raw)&&O.value!=null)k+=">",b.state=M.InsideTag,b.suppressPrettyCount++,u=!0,k+=this.writeChildNode(O,b,m+1),b.suppressPrettyCount--,u=!1,b.state=M.CloseTag,k+="</"+h.name+">"+this.endline(h,b,m);else{if(b.dontPrettyTextNodes){for(a=h.children,w=0,A=a.length;w<A;w++)if(x=a[w],(x.type===B.Text||x.type===B.Raw)&&x.value!=null){b.suppressPrettyCount++,u=!0;break}}for(k+=">"+this.endline(h,b,m),b.state=M.InsideTag,C=h.children,D=0,P=C.length;D<P;D++)x=C[D],k+=this.writeChildNode(x,b,m+1);b.state=M.CloseTag,k+=this.indent(h,b,m)+"</"+h.name+">",u&&b.suppressPrettyCount--,k+=this.endline(h,b,m),b.state=M.None}return this.closeNode(h,b,m),k},y.prototype.writeChildNode=function(h,b,m){switch(h.type){case B.CData:return this.cdata(h,b,m);case B.Comment:return this.comment(h,b,m);case B.Element:return this.element(h,b,m);case B.Raw:return this.raw(h,b,m);case B.Text:return this.text(h,b,m);case B.ProcessingInstruction:return this.processingInstruction(h,b,m);case B.Dummy:return"";case B.Declaration:return this.declaration(h,b,m);case B.DocType:return this.docType(h,b,m);case B.AttributeDeclaration:return this.dtdAttList(h,b,m);case B.ElementDeclaration:return this.dtdElement(h,b,m);case B.EntityDeclaration:return this.dtdEntity(h,b,m);case B.NotationDeclaration:return this.dtdNotation(h,b,m);default:throw new Error("Unknown XML node type: "+h.constructor.name)}},y.prototype.processingInstruction=function(h,b,m){var d;return this.openNode(h,b,m),b.state=M.OpenTag,d=this.indent(h,b,m)+"<?",b.state=M.InsideTag,d+=h.target,h.value&&(d+=" "+h.value),b.state=M.CloseTag,d+=b.spaceBeforeSlash+"?>",d+=this.endline(h,b,m),b.state=M.None,this.closeNode(h,b,m),d},y.prototype.raw=function(h,b,m){var d;return this.openNode(h,b,m),b.state=M.OpenTag,d=this.indent(h,b,m),b.state=M.InsideTag,d+=h.value,b.state=M.CloseTag,d+=this.endline(h,b,m),b.state=M.None,this.closeNode(h,b,m),d},y.prototype.text=function(h,b,m){var d;return this.openNode(h,b,m),b.state=M.OpenTag,d=this.indent(h,b,m),b.state=M.InsideTag,d+=h.value,b.state=M.CloseTag,d+=this.endline(h,b,m),b.state=M.None,this.closeNode(h,b,m),d},y.prototype.dtdAttList=function(h,b,m){var d;return this.openNode(h,b,m),b.state=M.OpenTag,d=this.indent(h,b,m)+"<!ATTLIST",b.state=M.InsideTag,d+=" "+h.elementName+" "+h.attributeName+" "+h.attributeType,h.defaultValueType!=="#DEFAULT"&&(d+=" "+h.defaultValueType),h.defaultValue&&(d+=' "'+h.defaultValue+'"'),b.state=M.CloseTag,d+=b.spaceBeforeSlash+">"+this.endline(h,b,m),b.state=M.None,this.closeNode(h,b,m),d},y.prototype.dtdElement=function(h,b,m){var d;return this.openNode(h,b,m),b.state=M.OpenTag,d=this.indent(h,b,m)+"<!ELEMENT",b.state=M.InsideTag,d+=" "+h.name+" "+h.value,b.state=M.CloseTag,d+=b.spaceBeforeSlash+">"+this.endline(h,b,m),b.state=M.None,this.closeNode(h,b,m),d},y.prototype.dtdEntity=function(h,b,m){var d;return this.openNode(h,b,m),b.state=M.OpenTag,d=this.indent(h,b,m)+"<!ENTITY",b.state=M.InsideTag,h.pe&&(d+=" %"),d+=" "+h.name,h.value?d+=' "'+h.value+'"':(h.pubID&&h.sysID?d+=' PUBLIC "'+h.pubID+'" "'+h.sysID+'"':h.sysID&&(d+=' SYSTEM "'+h.sysID+'"'),h.nData&&(d+=" NDATA "+h.nData)),b.state=M.CloseTag,d+=b.spaceBeforeSlash+">"+this.endline(h,b,m),b.state=M.None,this.closeNode(h,b,m),d},y.prototype.dtdNotation=function(h,b,m){var d;return this.openNode(h,b,m),b.state=M.OpenTag,d=this.indent(h,b,m)+"<!NOTATION",b.state=M.InsideTag,d+=" "+h.name,h.pubID&&h.sysID?d+=' PUBLIC "'+h.pubID+'" "'+h.sysID+'"':h.pubID?d+=' PUBLIC "'+h.pubID+'"':h.sysID&&(d+=' SYSTEM "'+h.sysID+'"'),b.state=M.CloseTag,d+=b.spaceBeforeSlash+">"+this.endline(h,b,m),b.state=M.None,this.closeNode(h,b,m),d},y.prototype.openNode=function(h,b,m){},y.prototype.closeNode=function(h,b,m){},y.prototype.openAttribute=function(h,b,m){},y.prototype.closeAttribute=function(h,b,m){},y}()}).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(W,ee,L){"use strict";(function(){var B,M,G,X,K,N,i,T,e,E;E=W("./Utility"),T=E.assign,e=E.isFunction,G=W("./XMLDOMImplementation"),X=W("./XMLDocument"),K=W("./XMLDocumentCB"),i=W("./XMLStringWriter"),N=W("./XMLStreamWriter"),B=W("./NodeType"),M=W("./WriterState"),ee.exports.create=function(l,_,r,n){var o,c;if(l==null)throw new Error("Root element needs a name.");return n=T({},_,r,n),o=new X(n),c=o.element(l),n.headless||(o.declaration(n),(n.pubID!=null||n.sysID!=null)&&o.dtd(n)),c},ee.exports.begin=function(l,_,r){var n;return e(l)&&(n=[l,_],_=n[0],r=n[1],l={}),_?new K(l,_,r):new X(l)},ee.exports.stringWriter=function(l){return new i(l)},ee.exports.streamWriter=function(l,_){return new N(l,_)},ee.exports.implementation=new G,ee.exports.nodeType=B,ee.exports.writerState=M}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(W,ee,L){ee.exports=M;var B=Object.prototype.hasOwnProperty;function M(){for(var G={},X=0;X<arguments.length;X++){var K=arguments[X];for(var N in K)B.call(K,N)&&(G[N]=K[N])}return G}},{}],284:[function(W,ee,L){"use strict";var B=W("buffer").Buffer,M=W("./sha"),G=W("./md5"),X={sha1:M,md5:G},K=64,N=B.alloc(K);N.fill(0);function i(E,l,_){B.isBuffer(l)||(l=B.from(l)),B.isBuffer(_)||(_=B.from(_)),l.length>K?l=E(l):l.length<K&&(l=B.concat([l,N],K));for(var r=B.alloc(K),n=B.alloc(K),o=0;o<K;o++)r[o]=l[o]^54,n[o]=l[o]^92;var c=E(B.concat([r,_]));return E(B.concat([n,c]))}function T(E,l){E=E||"sha1";var _=X[E],r=[],n=0;return _||e("algorithm:",E,"is not yet supported"),{update:function(c){return B.isBuffer(c)||(c=B.from(c)),r.push(c),n+=c.length,this},digest:function(c){var v=B.concat(r),f=l?i(_,l,v):_(v);return r=null,c?f.toString(c):f}}}function e(){var E=[].slice.call(arguments).join(" ");throw new Error([E,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}L.createHash=function(E){return T(E)},L.createHmac=function(E,l){return T(E,l)},L.createCredentials=function(){e("sorry,createCredentials is not implemented yet")},L.createCipher=function(){e("sorry,createCipher is not implemented yet")},L.createCipheriv=function(){e("sorry,createCipheriv is not implemented yet")},L.createDecipher=function(){e("sorry,createDecipher is not implemented yet")},L.createDecipheriv=function(){e("sorry,createDecipheriv is not implemented yet")},L.createSign=function(){e("sorry,createSign is not implemented yet")},L.createVerify=function(){e("sorry,createVerify is not implemented yet")},L.createDiffieHellman=function(){e("sorry,createDiffieHellman is not implemented yet")},L.pbkdf2=function(){e("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(W,ee,L){"use strict";var B=W("buffer").Buffer,M=4,G=B.alloc(M);G.fill(0);var X=8;function K(T,e){if(T.length%M!==0){var E=T.length+(M-T.length%M);T=B.concat([T,G],E)}for(var l=[],_=e?T.readInt32BE:T.readInt32LE,r=0;r<T.length;r+=M)l.push(_.call(T,r));return l}function N(T,e,E){for(var l=B.alloc(e),_=E?l.writeInt32BE:l.writeInt32LE,r=0;r<T.length;r++)_.call(l,T[r],r*4,!0);return l}function i(T,e,E,l){B.isBuffer(T)||(T=B.from(T));var _=e(K(T,l),T.length*X);return N(_,E,l)}ee.exports={hash:i}},{buffer:73}],286:[function(W,ee,L){"use strict";var B=W("./helpers");function M(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function G(l,_){l[_>>5]|=128<<_%32,l[(_+64>>>9<<4)+14]=_;for(var r=1732584193,n=-271733879,o=-1732584194,c=271733878,v=0;v<l.length;v+=16){var f=r,y=n,h=o,b=c;r=K(r,n,o,c,l[v+0],7,-680876936),c=K(c,r,n,o,l[v+1],12,-389564586),o=K(o,c,r,n,l[v+2],17,606105819),n=K(n,o,c,r,l[v+3],22,-1044525330),r=K(r,n,o,c,l[v+4],7,-176418897),c=K(c,r,n,o,l[v+5],12,1200080426),o=K(o,c,r,n,l[v+6],17,-1473231341),n=K(n,o,c,r,l[v+7],22,-45705983),r=K(r,n,o,c,l[v+8],7,1770035416),c=K(c,r,n,o,l[v+9],12,-1958414417),o=K(o,c,r,n,l[v+10],17,-42063),n=K(n,o,c,r,l[v+11],22,-1990404162),r=K(r,n,o,c,l[v+12],7,1804603682),c=K(c,r,n,o,l[v+13],12,-40341101),o=K(o,c,r,n,l[v+14],17,-1502002290),n=K(n,o,c,r,l[v+15],22,1236535329),r=N(r,n,o,c,l[v+1],5,-165796510),c=N(c,r,n,o,l[v+6],9,-1069501632),o=N(o,c,r,n,l[v+11],14,643717713),n=N(n,o,c,r,l[v+0],20,-373897302),r=N(r,n,o,c,l[v+5],5,-701558691),c=N(c,r,n,o,l[v+10],9,38016083),o=N(o,c,r,n,l[v+15],14,-660478335),n=N(n,o,c,r,l[v+4],20,-405537848),r=N(r,n,o,c,l[v+9],5,568446438),c=N(c,r,n,o,l[v+14],9,-1019803690),o=N(o,c,r,n,l[v+3],14,-187363961),n=N(n,o,c,r,l[v+8],20,1163531501),r=N(r,n,o,c,l[v+13],5,-1444681467),c=N(c,r,n,o,l[v+2],9,-51403784),o=N(o,c,r,n,l[v+7],14,1735328473),n=N(n,o,c,r,l[v+12],20,-1926607734),r=i(r,n,o,c,l[v+5],4,-378558),c=i(c,r,n,o,l[v+8],11,-2022574463),o=i(o,c,r,n,l[v+11],16,1839030562),n=i(n,o,c,r,l[v+14],23,-35309556),r=i(r,n,o,c,l[v+1],4,-1530992060),c=i(c,r,n,o,l[v+4],11,1272893353),o=i(o,c,r,n,l[v+7],16,-155497632),n=i(n,o,c,r,l[v+10],23,-1094730640),r=i(r,n,o,c,l[v+13],4,681279174),c=i(c,r,n,o,l[v+0],11,-358537222),o=i(o,c,r,n,l[v+3],16,-722521979),n=i(n,o,c,r,l[v+6],23,76029189),r=i(r,n,o,c,l[v+9],4,-640364487),c=i(c,r,n,o,l[v+12],11,-421815835),o=i(o,c,r,n,l[v+15],16,530742520),n=i(n,o,c,r,l[v+2],23,-995338651),r=T(r,n,o,c,l[v+0],6,-198630844),c=T(c,r,n,o,l[v+7],10,1126891415),o=T(o,c,r,n,l[v+14],15,-1416354905),n=T(n,o,c,r,l[v+5],21,-57434055),r=T(r,n,o,c,l[v+12],6,1700485571),c=T(c,r,n,o,l[v+3],10,-1894986606),o=T(o,c,r,n,l[v+10],15,-1051523),n=T(n,o,c,r,l[v+1],21,-2054922799),r=T(r,n,o,c,l[v+8],6,1873313359),c=T(c,r,n,o,l[v+15],10,-30611744),o=T(o,c,r,n,l[v+6],15,-1560198380),n=T(n,o,c,r,l[v+13],21,1309151649),r=T(r,n,o,c,l[v+4],6,-145523070),c=T(c,r,n,o,l[v+11],10,-1120210379),o=T(o,c,r,n,l[v+2],15,718787259),n=T(n,o,c,r,l[v+9],21,-343485551),r=e(r,f),n=e(n,y),o=e(o,h),c=e(c,b)}return Array(r,n,o,c)}function X(l,_,r,n,o,c){return e(E(e(e(_,l),e(n,c)),o),r)}function K(l,_,r,n,o,c,v){return X(_&r|~_&n,l,_,o,c,v)}function N(l,_,r,n,o,c,v){return X(_&n|r&~n,l,_,o,c,v)}function i(l,_,r,n,o,c,v){return X(_^r^n,l,_,o,c,v)}function T(l,_,r,n,o,c,v){return X(r^(_|~n),l,_,o,c,v)}function e(l,_){var r=(l&65535)+(_&65535),n=(l>>16)+(_>>16)+(r>>16);return n<<16|r&65535}function E(l,_){return l<<_|l>>>32-_}ee.exports=function(_){return B.hash(_,G,16)}},{"./helpers":285}],287:[function(W,ee,L){"use strict";var B=W("./helpers");function M(i,T){i[T>>5]|=128<<24-T%32,i[(T+64>>9<<4)+15]=T;for(var e=Array(80),E=1732584193,l=-271733879,_=-1732584194,r=271733878,n=-1009589776,o=0;o<i.length;o+=16){for(var c=E,v=l,f=_,y=r,h=n,b=0;b<80;b++){b<16?e[b]=i[o+b]:e[b]=N(e[b-3]^e[b-8]^e[b-14]^e[b-16],1);var m=K(K(N(E,5),G(b,l,_,r)),K(K(n,e[b]),X(b)));n=r,r=_,_=N(l,30),l=E,E=m}E=K(E,c),l=K(l,v),_=K(_,f),r=K(r,y),n=K(n,h)}return Array(E,l,_,r,n)}function G(i,T,e,E){return i<20?T&e|~T&E:i<40?T^e^E:i<60?T&e|T&E|e&E:T^e^E}function X(i){return i<20?1518500249:i<40?1859775393:i<60?-1894007588:-899497514}function K(i,T){var e=(i&65535)+(T&65535),E=(i>>16)+(T>>16)+(e>>16);return E<<16|e&65535}function N(i,T){return i<<T|i>>>32-T}ee.exports=function(T){return B.hash(T,M,20,!0)}},{"./helpers":285}],288:[function(W,ee,L){"use strict";ee.exports=function(){return function(){}}},{}],289:[function(W,ee,L){(function(B){"use strict";var M=W("babel-runtime/helpers/typeof"),G=X(M);function X(E){return E&&E.__esModule?E:{default:E}}var K=W("stream"),N=K.Stream,i=W("../lib/common/utils/isArray"),T=i.isArray;ee.exports.string=function(l){return typeof l=="string"},ee.exports.array=T,ee.exports.buffer=B.isBuffer;function e(E){return E instanceof N}ee.exports.writableStream=function(l){return e(l)&&typeof l._write=="function"&&(0,G.default)(l._writableState)==="object"}}).call(this,{isBuffer:W("../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(W,ee,L){"use strict";L.encodeURIComponent=function(B){try{return encodeURIComponent(B)}catch(M){return B}},L.escape=W("escape-html"),L.timestamp=function(M){if(M){var G=M;return typeof G=="string"&&(G=Number(G)),String(M).length===10&&(G*=1e3),new Date(G)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(W,ee,L){(function(B,M){"use strict";var G=W("babel-runtime/core-js/json/stringify"),X=i(G),K=W("babel-runtime/helpers/typeof"),N=i(K);function i(b){return b&&b.__esModule?b:{default:b}}var T=W("util"),e=W("url"),E=W("http"),l=W("https"),_=W("debug")("urllib"),r=W("humanize-ms"),n,o=0,c=Math.pow(2,31)-10,v=/^https?:\/\//i;function f(b,m){return b===void 0?m:b}function y(b,m){return function(d,x,R){if(d)return m(d);b({data:x,status:R.statusCode,headers:R.headers,res:R})}}L.TIMEOUTS=[r("300s"),r("300s")];var h=["json","text"];L.request=function(m,d,x){return arguments.length===2&&typeof d=="function"&&(x=d,d=null),typeof x=="function"?L.requestWithCallback(m,d,x):(n||(n=W("any-promise")),new n(function(R,O){L.requestWithCallback(m,d,y(R,O))}))},L.requestWithCallback=function(m,d,x){if(!m||typeof m!="string"&&(typeof m=="undefined"?"undefined":(0,N.default)(m))!=="object"){var R=T.format("expect request url to be a string or a http request options, but got %j",m);throw new Error(R)}arguments.length===2&&typeof d=="function"&&(x=d,d=null),d=d||{},o>=c&&(o=0);var O=++o;d.requestUrls=d.requestUrls||[];var w={requestId:O,url:m,args:d,ctx:d.ctx};d.emitter&&d.emitter.emit("request",w),d.timeout=d.timeout||L.TIMEOUTS,d.maxRedirects=d.maxRedirects||10,d.streaming=d.streaming||d.customResponse;var D=Date.now(),A;typeof m=="string"?(v.test(m)||(m="http://"+m),A=e.parse(m)):A=m;var P=(d.type||d.method||A.method||"GET").toUpperCase(),I=A.port||80,u=E,k=f(d.agent,L.agent),g=d.fixJSONCtlChars;A.protocol==="https:"&&(u=l,k=f(d.httpsAgent,L.httpsAgent),A.port||(I=443));var a={host:A.hostname||A.host||"localhost",path:A.path||"/",method:P,port:I,agent:k,headers:d.headers||{},lookup:d.lookup};Array.isArray(d.timeout)?a.requestTimeout=d.timeout[d.timeout.length-1]:typeof d.timeout!="undefined"&&(a.requestTimeout=d.timeout);for(var C=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],S=0;S<C.length;S++){var p=C[S];d.hasOwnProperty(p)&&(a[p]=d[p])}a.rejectUnauthorized===!1&&!a.hasOwnProperty("secureOptions")&&(a.secureOptions=W("constants").SSL_OP_NO_TLSv1_2);var U=d.auth||A.auth;U&&(a.auth=U);var z=d.content||d.data,q=P==="GET"||P==="HEAD"||d.dataAsQueryString;if(!d.content&&(z&&!(typeof z=="string"||M.isBuffer(z))))if(q)z=d.nestedQuerystring?qs.stringify(z):querystring.stringify(z);else{var $=a.headers["Content-Type"]||a.headers["content-type"];$||(d.contentType==="json"?$="application/json":$="application/x-www-form-urlencoded",a.headers["Content-Type"]=$),parseContentType($).type==="application/json"?z=(0,X.default)(z):z=d.nestedQuerystring?qs.stringify(z):querystring.stringify(z)}q&&z&&(a.path+=(A.query?"&":"?")+z,z=null);var re=0;if(z){var ce=z.length;M.isBuffer(z)||(ce=M.byteLength(z)),re=a.headers["Content-Length"]=ce}d.dataType==="json"&&(a.headers.Accept="application/json"),typeof d.beforeRequest=="function"&&d.beforeRequest(a);var ne=null,me=null,be=null,he=!1,se=!1,_e=0,De=-1,ge=!1,fe="",Ce="",ae=null;d.timing&&(ae={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function Q(){ne&&(clearTimeout(ne),ne=null)}function J(){me&&(clearTimeout(me),me=null)}function Z(Re,Xe,Qe){if(J(),!x){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),O,B.pid,a.method,m),Re&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),O,B.pid,Re.name,Re.message,Re.stack);return}var We=x;x=null;var ze={};if(Qe&&(De=Qe.statusCode,ze=Qe.headers),De===401&&ze["www-authenticate"]&&(!d.headers||!d.headers.Authorization)&&d.digestAuth){var Me=ze["www-authenticate"];if(Me.indexOf("Digest ")>=0)return _("Request#%d %s: got digest auth header WWW-Authenticate: %s",O,m,Me),d.headers=d.headers||{},d.headers.Authorization=digestAuthHeader(a.method,a.path,Me,d.digestAuth),_("Request#%d %s: auth with digest header: %s",O,m,d.headers.Authorization),Qe.headers["set-cookie"]&&(d.headers.Cookie=Qe.headers["set-cookie"].join(";")),L.requestWithCallback(m,d,We)}var Ie=Date.now()-D;ae&&(ae.contentDownload=Ie),_("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Ie,_e,De,a.method,a.host,a.path,se,ae);var Be={status:De,statusCode:De,headers:ze,size:_e,aborted:ge,rt:Ie,keepAliveSocket:se,data:Xe,requestUrls:d.requestUrls,timing:ae,remoteAddress:fe,remotePort:Ce};if(Re){var we="";k&&typeof k.getCurrentStatus=="function"&&(we=", agent status: "+(0,X.default)(k.getCurrentStatus())),Re.message+=", "+a.method+" "+m+" "+De+" (connected: "+he+", keepalive socket: "+se+we+`)
|
|
|
headers: `+(0,X.default)(ze),Re.data=Xe,Re.path=a.path,Re.status=De,Re.headers=ze,Re.res=Be}We(Re,Xe,d.streaming?Qe:Be),d.emitter&&(w.url=m,w.socket=je&&je.connection,w.options=a,w.size=re,d.emitter.emit("response",{requestId:O,error:Re,ctx:d.ctx,req:w,res:Be}))}function pe(Re){var Xe=null;if(d.followRedirect&&statuses.redirect[Re.statusCode]){d._followRedirectCount=(d._followRedirectCount||0)+1;var Qe=Re.headers.location;if(!Qe)Xe=new Error("Got statusCode "+Re.statusCode+" but cannot resolve next location from headers"),Xe.name="FollowRedirectError";else if(d._followRedirectCount>d.maxRedirects)Xe=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+m),Xe.name="MaxRedirectError";else{var We=d.formatRedirectUrl?d.formatRedirectUrl(m,Qe):e.resolve(m,Qe);_("Request#%d %s: `redirected` from %s to %s",O,a.path,m,We),J(),d.headers&&d.headers.Host&&v.test(Qe)&&(d.headers.Host=null);var ze=x;return x=null,L.requestWithCallback(We,d,ze),{redirect:!0,error:null}}}return{redirect:!1,error:Xe}}!a.headers["User-Agent"]&&!a.headers["user-agent"]&&(a.headers["User-Agent"]=navigator.userAgent),d.gzip&&(!a.headers["Accept-Encoding"]&&!a.headers["accept-encoding"]&&(a.headers["Accept-Encoding"]="gzip"));function le(Re,Xe,Qe){var We=Re.headers["content-encoding"];return Qe(null,Xe,We)}var ye=d.writeStream;_("Request#%d %s %s with headers %j, options.path: %s",O,P,m,a.headers,a.path),d.requestUrls.push(m);function Te(Re){if(ae&&(ae.waiting=Date.now()-D),_("Request#%d %s `req response` event emit: status %d, headers: %j",O,m,Re.statusCode,Re.headers),d.streaming){var Xe=pe(Re);if(Xe.redirect){Re.resume();return}return Xe.error?(Re.resume(),Z(Xe.error,null,Re)):Z(null,null,Re)}if(Re.on("close",function(){_("Request#%d %s: `res close` event emit, total size %d",O,m,_e)}),Re.on("error",function(){_("Request#%d %s: `res error` event emit, total size %d",O,m,_e)}),Re.on("aborted",function(){ge=!0,_("Request#%d %s: `res aborted` event emit, total size %d",O,m,_e)}),ye){var Xe=pe(Re);if(Xe.redirect){Re.resume();return}return Xe.error?(Re.resume(),ye.end(),Z(Xe.error,null,Re)):(d.consumeWriteStream===!1?Re.on("end",Z.bind(null,null,null,Re)):isNode010||isNode012?first([[ye,"close"],[Re,"aborted"]],function(ze,Me,Ie){_("Request#%d %s: writeStream or res %s event emitted",O,m,Ie),Z(be||null,null,Re)}):ye.on("close",function(){_("Request#%d %s: writeStream close event emitted",O,m),Z(be||null,null,Re)}),Re.pipe(ye))}var Qe=[];Re.on("data",function(We){_("Request#%d %s: `res data` event emit, size %d",O,m,We.length),_e+=We.length,Qe.push(We)}),Re.on("end",function(){var We=M.concat(Qe,_e);if(_("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",O,m,_e,Re._dumped),be)return Z(be,We,Re);var ze=pe(Re);if(ze.error)return Z(ze.error,We,Re);if(ze.redirect)return;le(Re,We,function(Me,Ie,Be){if(Me)return Z(Me,We,Re);if(!Be&&h.indexOf(d.dataType)>=0){try{Ie=decodeBodyByCharset(Ie,Re)}catch(Ae){return _("decodeBodyByCharset error: %s",Ae),Z(null,Ie,Re)}if(d.dataType==="json")if(_e===0)Ie=null;else{var we=parseJSON(Ie,g);we.error?Me=we.error:Ie=we.data}}ge&&_("Request#%d %s: Remote socket was terminated before `response.end()` was called",O,m),Z(Me,Ie,Re)})})}var Pe,He;Array.isArray(d.timeout)?(Pe=r(d.timeout[0]),He=r(d.timeout[1])):Pe=He=r(d.timeout),_("ConnectTimeout: %d, ResponseTimeout: %d",Pe,He);function Oe(){_("Connect timer ticking, timeout: %d",Pe),ne=setTimeout(function(){ne=null,De===-1&&(De=-2);var Re="Connect timeout for "+Pe+"ms",Xe="ConnectionTimeoutError";je.socket||(Xe="SocketAssignTimeoutError",Re+=", working sockets is full"),be=new Error(Re),be.name=Xe,be.requestId=O,_("ConnectTimeout: Request#%d %s %s: %s, connected: %s",O,m,be.name,Re,he),Ve()},Pe)}function Ue(){_("Response timer ticking, timeout: %d",He),me=setTimeout(function(){me=null;var Re="Response timeout for "+He+"ms",Xe="ResponseTimeoutError";be=new Error(Re),be.name=Xe,be.requestId=O,_("ResponseTimeout: Request#%d %s %s: %s, connected: %s",O,m,be.name,Re,he),Ve()},He)}var je;a.mode=d.mode?d.mode:"";try{je=u.request(a,Te)}catch(Re){return Z(Re)}typeof window=="undefined"?Oe():je.on("requestTimeout",function(){De===-1&&(De=-2);var Re="Connect timeout for "+Pe+"ms",Xe="ConnectionTimeoutError";be=new Error(Re),be.name=Xe,be.requestId=O,Ve()});function Ve(){_("Request#%d %s abort, connected: %s",O,m,he),je.socket||(be.noSocket=!0,Z(be)),je.abort()}return ae&&je.on("finish",function(){ae.requestSent=Date.now()-D}),je.once("socket",function(Re){ae&&(ae.queuing=Date.now()-D),isNode010&&Re.socket&&(Re=Re.socket);var Xe=Re.readyState;if(Xe==="opening"){Re.once("lookup",function(Qe,We,ze){_("Request#%d %s lookup: %s, %s, %s",O,m,Qe,We,ze),ae&&(ae.dnslookup=Date.now()-D),We&&(fe=We)}),Re.once("connect",function(){ae&&(ae.connected=Date.now()-D),Q(),Ue(),_("Request#%d %s new socket connected",O,m),he=!0,fe||(fe=Re.remoteAddress),Ce=Re.remotePort});return}_("Request#%d %s reuse socket connected, readyState: %s",O,m,Xe),he=!0,se=!0,fe||(fe=Re.remoteAddress),Ce=Re.remotePort,Q(),Ue()}),je.on("error",function(Re){(Re.name==="Error"||Re.name==="TypeError")&&(Re.name=he?"ResponseError":"RequestError"),Re.message+=' (req "error")',_("Request#%d %s `req error` event emit, %s: %s",O,m,Re.name,Re.message),Z(be||Re)}),ye&&ye.once("error",function(Re){Re.message+=' (writeStream "error")',be=Re,_("Request#%d %s `writeStream error` event emit, %s: %s",O,m,Re.name,Re.message),Ve()}),d.stream?(d.stream.pipe(je),d.stream.once("error",function(Re){Re.message+=' (stream "error")',be=Re,_("Request#%d %s `readStream error` event emit, %s: %s",O,m,Re.name,Re.message),Ve()})):je.end(z),je.requestId=O,je}}).call(this,W("_process"),W("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)})}).call(this,__webpack_require__("IGO8"))},nEHx:function(W,ee,L){"use strict";L.d(ee,"a",function(){return B});var B;(function(M){M.DARK="dark",M.LIGHT="light",M.HIGH_CONTRAST="hc"})(B||(B={}))},nj2k:function(W,ee,L){W.exports=L.p+"static/nodata.8f2d5135.svg"},nnTU:function(W,ee,L){"use strict";L.d(ee,"b",function(){return i}),L.d(ee,"a",function(){return T});var B=L("MI8n"),M=L("JYp7"),G=L("pmY6"),X=L("24hK"),K=L("746U"),N=L("Cg/j");const i=Object(N.c)("commandService"),T=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new B.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,E){if(!e)throw new Error("invalid command");if(typeof e=="string"){if(!E)throw new Error("invalid command");return this.registerCommand({id:e,handler:E})}if(e.description){const o=[];for(let v of e.description.args)o.push(v.constraint);const c=e.handler;e.handler=function(v,...f){return Object(K.o)(f,o),c(v,...f)}}const{id:l}=e;let _=this._commands.get(l);_||(_=new X.a,this._commands.set(l,_));let r=_.unshift(e),n=Object(G.i)(()=>{r();const o=this._commands.get(l);(o==null?void 0:o.isEmpty())&&this._commands.delete(l)});return this._onDidRegisterCommand.fire(l),n}registerCommandAlias(e,E){return T.registerCommand(e,(l,..._)=>l.get(i).executeCommand(E,..._))}getCommand(e){const E=this._commands.get(e);return!E||E.isEmpty()?void 0:M.a.first(E)}getCommands(){const e=new Map;for(const E of this._commands.keys()){const l=this.getCommand(E);l&&e.set(E,l)}return e}};T.registerCommand("noop",()=>{})},o46R:function(W,ee,L){"use strict";L.d(ee,"a",function(){return G});var B=L("U8pU");function M(X,K){if(Object(B.a)(X)!=="object"||X===null)return X;var N=X[Symbol.toPrimitive];if(N!==void 0){var i=N.call(X,K||"default");if(Object(B.a)(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(K==="string"?String:Number)(X)}function G(X){var K=M(X,"string");return Object(B.a)(K)==="symbol"?K:String(K)}},oRuE:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("OLod"))})(this,function(B){return B.pad.Iso10126={pad:function(M,G){var X=G*4,K=X-M.sigBytes%X;M.concat(B.lib.WordArray.random(K-1)).concat(B.lib.WordArray.create([K<<24],1))},unpad:function(M){var G=M.words[M.sigBytes-1>>>2]&255;M.sigBytes-=G}},B.pad.Iso10126})},osHv:function(W,ee,L){(function(B){B(L("VrN/"))})(function(B){"use strict";var M=B.Pos;function G(v,f){return v.line-f.line||v.ch-f.ch}var X="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",K=X+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",N=new RegExp("<(/?)(["+X+"]["+K+"]*)","g");function i(v,f,y,h){this.line=f,this.ch=y,this.cm=v,this.text=v.getLine(f),this.min=h?Math.max(h.from,v.firstLine()):v.firstLine(),this.max=h?Math.min(h.to-1,v.lastLine()):v.lastLine()}function T(v,f){var y=v.cm.getTokenTypeAt(M(v.line,f));return y&&/\btag\b/.test(y)}function e(v){return v.line>=v.max?void 0:(v.ch=0,v.text=v.cm.getLine(++v.line),!0)}function E(v){return v.line<=v.min?void 0:(v.text=v.cm.getLine(--v.line),v.ch=v.text.length,!0)}function l(v){for(;;){var f=v.text.indexOf(">",v.ch);if(f==-1){if(e(v))continue;return}if(!T(v,f+1)){v.ch=f+1;continue}var y=v.text.lastIndexOf("/",f),h=y>-1&&!/\S/.test(v.text.slice(y+1,f));return v.ch=f+1,h?"selfClose":"regular"}}function _(v){for(;;){var f=v.ch?v.text.lastIndexOf("<",v.ch-1):-1;if(f==-1){if(E(v))continue;return}if(!T(v,f+1)){v.ch=f;continue}N.lastIndex=f,v.ch=f;var y=N.exec(v.text);if(y&&y.index==f)return y}}function r(v){for(;;){N.lastIndex=v.ch;var f=N.exec(v.text);if(!f){if(e(v))continue;return}if(!T(v,f.index+1)){v.ch=f.index+1;continue}return v.ch=f.index+f[0].length,f}}function n(v){for(;;){var f=v.ch?v.text.lastIndexOf(">",v.ch-1):-1;if(f==-1){if(E(v))continue;return}if(!T(v,f+1)){v.ch=f;continue}var y=v.text.lastIndexOf("/",f),h=y>-1&&!/\S/.test(v.text.slice(y+1,f));return v.ch=f+1,h?"selfClose":"regular"}}function o(v,f){for(var y=[];;){var h=r(v),b,m=v.line,d=v.ch-(h?h[0].length:0);if(!h||!(b=l(v)))return;if(b=="selfClose")continue;if(h[1]){for(var x=y.length-1;x>=0;--x)if(y[x]==h[2]){y.length=x;break}if(x<0&&(!f||f==h[2]))return{tag:h[2],from:M(m,d),to:M(v.line,v.ch)}}else y.push(h[2])}}function c(v,f){for(var y=[];;){var h=n(v);if(!h)return;if(h=="selfClose"){_(v);continue}var b=v.line,m=v.ch,d=_(v);if(!d)return;if(d[1])y.push(d[2]);else{for(var x=y.length-1;x>=0;--x)if(y[x]==d[2]){y.length=x;break}if(x<0&&(!f||f==d[2]))return{tag:d[2],from:M(v.line,v.ch),to:M(b,m)}}}}B.registerHelper("fold","xml",function(v,f){for(var y=new i(v,f.line,0);;){var h=r(y);if(!h||y.line!=f.line)return;var b=l(y);if(!b)return;if(!h[1]&&b!="selfClose"){var m=M(y.line,y.ch),d=o(y,h[2]);return d&&G(d.from,m)>0?{from:m,to:d.from}:null}}}),B.findMatchingTag=function(v,f,y){var h=new i(v,f.line,f.ch,y);if(h.text.indexOf(">")==-1&&h.text.indexOf("<")==-1)return;var b=l(h),m=b&&M(h.line,h.ch),d=b&&_(h);if(!b||!d||G(h,f)>0)return;var x={from:M(h.line,h.ch),to:m,tag:d[2]};return b=="selfClose"?{open:x,close:null,at:"open"}:d[1]?{open:c(h,d[2]),close:x,at:"close"}:(h=new i(v,m.line,m.ch,y),{open:x,close:o(h,d[2]),at:"open"})},B.findEnclosingTag=function(v,f,y,h){for(var b=new i(v,f.line,f.ch,y);;){var m=c(b,h);if(!m)break;var d=new i(v,f.line,f.ch,y),x=o(d,m.tag);if(x)return{open:m,close:x}}},B.scanForClosingTag=function(v,f,y,h){var b=new i(v,f.line,f.ch,h?{from:0,to:h}:null);return o(b,y)}})},"p/hR":function(W,ee,L){"use strict";var B=L("XjgL"),M=L("aVTQ"),G=L("eA01"),X=L("fXDJ"),K=L("BPTR"),N=L("udol"),i=L("kxoy"),T=L("27eb"),e=L.n(T),E=L("qoVz"),l=L("T/Jt"),_=L("1HCi"),r=L.n(_),n=L("yuO0"),o=L("fNpE"),c=L("J5No"),v=L("36hc"),f=l.forwardRef(function(D,A){var P,I=D.prefixCls,u=D.forceRender,k=D.className,g=D.style,a=D.children,C=D.isActive,S=D.role,p=l.useState(C||u),U=Object(v.a)(p,2),z=U[0],q=U[1];return l.useEffect(function(){(u||C)&&q(!0)},[u,C]),z?l.createElement("div",{ref:A,className:e()("".concat(I,"-content"),(P={},Object(B.a)(P,"".concat(I,"-content-active"),C),Object(B.a)(P,"".concat(I,"-content-inactive"),!C),P),k),style:g,role:S},l.createElement("div",{className:"".concat(I,"-content-box")},a)):null});f.displayName="PanelContent";var y=f,h=["className","id","style","prefixCls","headerClass","children","isActive","destroyInactivePanel","accordion","forceRender","openMotion","extra","collapsible"],b=function(D){Object(K.a)(P,D);var A=Object(N.a)(P);function P(){var I;Object(G.a)(this,P);for(var u=arguments.length,k=new Array(u),g=0;g<u;g++)k[g]=arguments[g];return I=A.call.apply(A,[this].concat(k)),I.onItemClick=function(){var a=I.props,C=a.onItemClick,S=a.panelKey;typeof C=="function"&&C(S)},I.handleKeyPress=function(a){(a.key==="Enter"||a.keyCode===13||a.which===13)&&I.onItemClick()},I.renderIcon=function(){var a=I.props,C=a.showArrow,S=a.expandIcon,p=a.prefixCls,U=a.collapsible;if(!C)return null;var z=typeof S=="function"?S(I.props):l.createElement("i",{className:"arrow"});return z&&l.createElement("div",{className:"".concat(p,"-expand-icon"),onClick:U==="header"||U==="icon"?I.onItemClick:null},z)},I.renderTitle=function(){var a=I.props,C=a.header,S=a.prefixCls,p=a.collapsible;return l.createElement("span",{className:"".concat(S,"-header-text"),onClick:p==="header"?I.onItemClick:null},C)},I}return Object(X.a)(P,[{key:"shouldComponentUpdate",value:function(u){return!r()(this.props,u)}},{key:"render",value:function(){var u,k,g=this.props,a=g.className,C=g.id,S=g.style,p=g.prefixCls,U=g.headerClass,z=g.children,q=g.isActive,$=g.destroyInactivePanel,re=g.accordion,ce=g.forceRender,ne=g.openMotion,me=g.extra,be=g.collapsible,he=Object(o.a)(g,h),se=be==="disabled",_e=be==="header",De=be==="icon",ge=e()((u={},Object(B.a)(u,"".concat(p,"-item"),!0),Object(B.a)(u,"".concat(p,"-item-active"),q),Object(B.a)(u,"".concat(p,"-item-disabled"),se),u),a),fe=e()("".concat(p,"-header"),(k={},Object(B.a)(k,U,U),Object(B.a)(k,"".concat(p,"-header-collapsible-only"),_e),Object(B.a)(k,"".concat(p,"-icon-collapsible-only"),De),k)),Ce={className:fe,"aria-expanded":q,"aria-disabled":se,onKeyPress:this.handleKeyPress};!_e&&!De&&(Ce.onClick=this.onItemClick,Ce.role=re?"tab":"button",Ce.tabIndex=se?-1:0);var ae=me!=null&&typeof me!="boolean";return delete he.header,delete he.panelKey,delete he.onItemClick,delete he.showArrow,delete he.expandIcon,l.createElement("div",Object(n.a)({},he,{className:ge,style:S,id:C}),l.createElement("div",Ce,this.renderIcon(),this.renderTitle(),ae&&l.createElement("div",{className:"".concat(p,"-extra")},me)),l.createElement(c.default,Object(n.a)({visible:q,leavedClassName:"".concat(p,"-content-hidden")},ne,{forceRender:ce,removeOnLeave:$}),function(Q,J){var Z=Q.className,pe=Q.style;return l.createElement(y,{ref:J,prefixCls:p,className:Z,style:pe,isActive:q,forceRender:ce,role:re?"tabpanel":null},z)}))}}]),P}(l.Component);b.defaultProps={showArrow:!0,isActive:!1,onItemClick:function(){},headerClass:"",forceRender:!1};var m=b;function d(D){var A=D;if(!Array.isArray(A)){var P=Object(i.a)(A);A=P==="number"||P==="string"?[A]:[]}return A.map(function(I){return String(I)})}var x=function(D){Object(K.a)(P,D);var A=Object(N.a)(P);function P(I){var u;Object(G.a)(this,P),u=A.call(this,I),u.onClickItem=function(C){var S=u.state.activeKey;if(u.props.accordion)S=S[0]===C?[]:[C];else{S=Object(M.a)(S);var p=S.indexOf(C),U=p>-1;U?S.splice(p,1):S.push(C)}u.setActiveKey(S)},u.getNewChild=function(C,S){if(!C)return null;var p=u.state.activeKey,U=u.props,z=U.prefixCls,q=U.openMotion,$=U.accordion,re=U.destroyInactivePanel,ce=U.expandIcon,ne=U.collapsible,me=C.key||String(S),be=C.props,he=be.header,se=be.headerClass,_e=be.destroyInactivePanel,De=be.collapsible,ge=!1;$?ge=p[0]===me:ge=p.indexOf(me)>-1;var fe=De!=null?De:ne,Ce={key:me,panelKey:me,header:he,headerClass:se,isActive:ge,prefixCls:z,destroyInactivePanel:_e!=null?_e:re,openMotion:q,accordion:$,children:C.props.children,onItemClick:fe==="disabled"?null:u.onClickItem,expandIcon:ce,collapsible:fe};return typeof C.type=="string"?C:(Object.keys(Ce).forEach(function(ae){typeof Ce[ae]=="undefined"&&delete Ce[ae]}),l.cloneElement(C,Ce))},u.getItems=function(){var C=u.props.children;return Object(E.a)(C).map(u.getNewChild)},u.setActiveKey=function(C){"activeKey"in u.props||u.setState({activeKey:C}),u.props.onChange(u.props.accordion?C[0]:C)};var k=I.activeKey,g=I.defaultActiveKey,a=g;return"activeKey"in I&&(a=k),u.state={activeKey:d(a)},u}return Object(X.a)(P,[{key:"shouldComponentUpdate",value:function(u,k){return!r()(this.props,u)||!r()(this.state,k)}},{key:"render",value:function(){var u,k=this.props,g=k.prefixCls,a=k.className,C=k.style,S=k.accordion,p=e()((u={},Object(B.a)(u,g,!0),Object(B.a)(u,a,!!a),u));return l.createElement("div",{className:p,style:C,role:S?"tablist":null},this.getItems())}}],[{key:"getDerivedStateFromProps",value:function(u){var k={};return"activeKey"in u&&(k.activeKey=d(u.activeKey)),k}}]),P}(l.Component);x.defaultProps={prefixCls:"rc-collapse",onChange:function(){},accordion:!1,destroyInactivePanel:!1},x.Panel=m;var R=x,O=ee.a=R,w=R.Panel},p5ED:function(W,ee,L){"use strict";var B=L("dLI4"),M=L("4d5L"),G=L("YfA7"),X=L("e4Gi"),K=L("YaWb"),N=L("IYef"),i=L("Hqw+"),T=L("XXmO"),e=L.n(T),E=L("T/Jt"),l=L.n(E),_=L("vHTk"),r=L.n(_),n=L("yEEn"),o=L("ZW9T"),c=L("1vsH"),v=L("V0Rq"),f=L("m3rI");ee.a=function(y){var h,b,m,d,x,R,O,w=y.editOffice,D=w===void 0?"view":w,A=y.data,P=y.theme,I=y.type,u=y.filename,k=y.monacoEditor,g=y.className,a=y.style,C=y.close,S=y.onClose,p=y.hasMask,U=y.disabledDownload,z=Object(E.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),q=Object(i.a)(z,2),$=q[0],re=q[1],ce=Object(E.useState)(""),ne=Object(i.a)(ce,2),me=ne[0],be=ne[1],he=Object(E.useState)(),se=Object(i.a)(he,2),_e=se[0],De=se[1],ge=window.ENV==="build"?"/react/build":"",fe=f.a.PROXY_SERVER||location.origin,Ce,ae=1024*1024,Q=10*ae,J=Object(E.useRef)();(h=A)!==null&&h!==void 0&&h.startsWith("/api")&&I!=="txt"&&(A=f.a.API_SERVER+A),I==="office"&&(Ce=Object(c.U)(A).filesize,Ce>Q&&(I="other")),u&&k&&(k.filename=u),Object(E.useEffect)(function(){var ye,Te,Pe=(ye=document.cookie)===null||ye===void 0||((Te=ye.replace(/\s/g,""))===null||Te===void 0)?void 0:Te.split(";");Pe==null||Pe.map(function(He){var Oe=He.split("=");Oe[0]==="_educoder_session"&&be(Oe[1])})},[]),Object(E.useEffect)(function(){I==="office"&&Z()},[I,A]);var Z=function(){var ye=Object(N.a)(e.a.mark(function Te(){var Pe,He,Oe;return e.a.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return console.log("data:",A),Pe=A,A.startsWith("http")||(Pe=location.origin+Pe),He=new URL(Pe).pathname.split("/").pop(),je.next=6,Object(v.V)({attachment_id:He});case 6:Oe=je.sent,De(Oe);case 8:case"end":return je.stop()}},Te)}));return function(){return ye.apply(this,arguments)}}(),pe=function(){if(A.startsWith("http")||A.startsWith("blob:")){le();return}Object(c.z)(u||"educoder",A,u)},le=function(){Object(c.x)(u||"educoder",decodeURIComponent(A))};return l.a.createElement("div",{style:Object(K.a)({},a||{}),className:"".concat(p&&r.a.bgBlack," ").concat(I?r.a.wrp:"hide")},C&&l.a.createElement("div",{className:r.a.close,ref:J},!U&&l.a.createElement(X.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return J.current}},l.a.createElement("span",{onClick:le},l.a.createElement("i",{className:"icon-quxiaozhiding"}))),l.a.createElement(X.a,{title:"\u5173\u95ED",getPopupContainer:function(){return J.current}},l.a.createElement("span",{className:"",onClick:S},l.a.createElement("i",{className:"icon-guanbi1"})))),l.a.createElement("div",{className:"".concat(r.a[g]," ").concat(g," ").concat(r.a.monaco," ").concat(I==="txt"?"show":"hide")},I==="txt"&&l.a.createElement(o.b,k)),I==="audio"&&l.a.createElement("audio",{src:"".concat(((b=A)===null||b===void 0?void 0:b.indexOf("http://"))>-1||((m=A)===null||m===void 0?void 0:m.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(A),autoPlay:!0}),I==="video"&&l.a.createElement(l.a.Fragment,null,((d=A)===null||d===void 0?void 0:d.indexOf("http"))>-1?l.a.createElement("video",{controls:!0,src:"".concat(A),autoPlay:!0}):l.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(A),autoPlay:!0})),I==="office"&&_e&&l.a.createElement("iframe",{src:"".concat(ge,"/office.html?key=").concat(_e.key,"&url=").concat(fe+_e.url,"&callbackUrl=").concat(fe+_e.callbackUrl,"&fileType=").concat(_e.fileType,"&title=").concat(_e.title,"&model=").concat(D,"&officeServer=").concat(f.a.OFFICE_SERVER,"&disabledDownload=").concat(!!U)}),I==="html"&&l.a.createElement("iframe",{src:A+"&disposition=inline"}),I==="pdf"&&l.a.createElement("iframe",{src:"".concat(ge,"/js/pdfview/index.html?url=").concat(A,"&disabledDownload=").concat(!!U)}),I==="image"&&l.a.createElement("img",{src:"".concat(((x=A)===null||x===void 0?void 0:x.indexOf("http://"))>-1||((R=A)===null||R===void 0?void 0:R.indexOf("https://"))>-1||(O=A)!==null&&O!==void 0&&O.startsWith("/api")?"":"data:image/png;base64,").concat(A)}),I==="other"&&l.a.createElement("div",null,l.a.createElement(M.a,{type:"primary",size:"large",onClick:pe},l.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),I==="download"&&l.a.createElement(M.a,{type:"primary",size:"large",onClick:pe},l.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(W,ee,L){},pA7S:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(B){return function(){var M=B,G=M.lib,X=G.WordArray,K=G.BlockCipher,N=M.algo,i=[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],T=[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],e=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],E=[{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}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],_=N.DES=K.extend({_doReset:function(){for(var c=this._key,v=c.words,f=[],y=0;y<56;y++){var h=i[y]-1;f[y]=v[h>>>5]>>>31-h%32&1}for(var b=this._subKeys=[],m=0;m<16;m++){for(var d=b[m]=[],x=e[m],y=0;y<24;y++)d[y/6|0]|=f[(T[y]-1+x)%28]<<31-y%6,d[4+(y/6|0)]|=f[28+(T[y+24]-1+x)%28]<<31-y%6;d[0]=d[0]<<1|d[0]>>>31;for(var y=1;y<7;y++)d[y]=d[y]>>>(y-1)*4+3;d[7]=d[7]<<5|d[7]>>>27}for(var R=this._invSubKeys=[],y=0;y<16;y++)R[y]=b[15-y]},encryptBlock:function(c,v){this._doCryptBlock(c,v,this._subKeys)},decryptBlock:function(c,v){this._doCryptBlock(c,v,this._invSubKeys)},_doCryptBlock:function(c,v,f){this._lBlock=c[v],this._rBlock=c[v+1],r.call(this,4,252645135),r.call(this,16,65535),n.call(this,2,858993459),n.call(this,8,16711935),r.call(this,1,1431655765);for(var y=0;y<16;y++){for(var h=f[y],b=this._lBlock,m=this._rBlock,d=0,x=0;x<8;x++)d|=E[x][((m^h[x])&l[x])>>>0];this._lBlock=m,this._rBlock=b^d}var R=this._lBlock;this._lBlock=this._rBlock,this._rBlock=R,r.call(this,1,1431655765),n.call(this,8,16711935),n.call(this,2,858993459),r.call(this,16,65535),r.call(this,4,252645135),c[v]=this._lBlock,c[v+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function r(c,v){var f=(this._lBlock>>>c^this._rBlock)&v;this._rBlock^=f,this._lBlock^=f<<c}function n(c,v){var f=(this._rBlock>>>c^this._lBlock)&v;this._lBlock^=f,this._rBlock^=f<<c}M.DES=K._createHelper(_);var o=N.TripleDES=K.extend({_doReset:function(){var c=this._key,v=c.words;if(v.length!==2&&v.length!==4&&v.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var f=v.slice(0,2),y=v.length<4?v.slice(0,2):v.slice(2,4),h=v.length<6?v.slice(0,2):v.slice(4,6);this._des1=_.createEncryptor(X.create(f)),this._des2=_.createEncryptor(X.create(y)),this._des3=_.createEncryptor(X.create(h))},encryptBlock:function(c,v){this._des1.encryptBlock(c,v),this._des2.decryptBlock(c,v),this._des3.encryptBlock(c,v)},decryptBlock:function(c,v){this._des3.decryptBlock(c,v),this._des2.encryptBlock(c,v),this._des1.decryptBlock(c,v)},keySize:192/32,ivSize:64/32,blockSize:64/32});M.TripleDES=K._createHelper(o)}(),B.TripleDES})},pmY6:function(W,ee,L){"use strict";L.d(ee,"h",function(){return E}),L.d(ee,"g",function(){return _}),L.d(ee,"f",function(){return r}),L.d(ee,"e",function(){return n}),L.d(ee,"i",function(){return o}),L.d(ee,"b",function(){return c}),L.d(ee,"a",function(){return v}),L.d(ee,"d",function(){return f}),L.d(ee,"c",function(){return y});var B=L("C/vA"),M=L("JYp7");const G=!1;let X=null;function K(h){X=h}if(G){const h="__is_disposable_tracked__";K(new class{trackDisposable(b){const m=new Error("Potentially leaked disposable").stack;setTimeout(()=>{b[h]||console.log(m)},3e3)}setParent(b,m){if(b&&b!==v.None)try{b[h]=!0}catch(d){}}markAsDisposed(b){if(b&&b!==v.None)try{b[h]=!0}catch(m){}}markAsSingleton(b){}})}function N(h){return X==null||X.trackDisposable(h),h}function i(h){X==null||X.markAsDisposed(h)}function T(h,b){X==null||X.setParent(h,b)}function e(h,b){if(!X)return;for(const m of h)X.setParent(m,b)}function E(h){return X==null||X.markAsSingleton(h),h}class l extends Error{constructor(h){super(`Encountered errors while disposing of store. Errors: [${h.join(", ")}]`);this.errors=h}}function _(h){return typeof h.dispose=="function"&&h.dispose.length===0}function r(h){if(M.a.is(h)){let b=[];for(const m of h)if(m)try{m.dispose()}catch(d){b.push(d)}if(b.length===1)throw b[0];if(b.length>1)throw new l(b);return Array.isArray(h)?[]:h}else if(h)return h.dispose(),h}function n(...h){const b=o(()=>r(h));return e(h,b),b}function o(h){const b=N({dispose:Object(B.a)(()=>{i(b),h()})});return b}class c{constructor(){this._toDispose=new Set,this._isDisposed=!1,N(this)}dispose(){if(this._isDisposed)return;i(this),this._isDisposed=!0,this.clear()}clear(){try{r(this._toDispose.values())}finally{this._toDispose.clear()}}add(h){if(!h)return h;if(h===this)throw new Error("Cannot register a disposable on itself!");return T(h,this),this._isDisposed?c.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(h),h}}c.DISABLE_DISPOSED_WARNING=!1;class v{constructor(){this._store=new c,N(this),T(this._store,this)}dispose(){i(this),this._store.dispose()}_register(h){if(h===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(h)}}v.None=Object.freeze({dispose(){}});class f{constructor(){this._isDisposed=!1,N(this)}get value(){return this._isDisposed?void 0:this._value}set value(h){var b;if(this._isDisposed||h===this._value)return;(b=this._value)===null||b===void 0||b.dispose(),h&&T(h,this),this._value=h}clear(){this.value=void 0}dispose(){var h;this._isDisposed=!0,i(this),(h=this._value)===null||h===void 0||h.dispose(),this._value=void 0}clearAndLeak(){const h=this._value;return this._value=void 0,h&&T(h,null),h}}class y{constructor(h){this.object=h}dispose(){}}},psGv:function(W,ee,L){var B,M;(function(){var G;(function(){"use strict";var i=[,,function(l){function _(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}_.prototype.clone_empty=function(){var o=new _(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},_.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},_.prototype.has_match=function(o){for(var c=this.__items.length-1;c>=0;c--)if(this.__items[c].match(o))return!0;return!1},_.prototype.set_indent=function(o,c){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},_.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},_.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},_.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},_.prototype.is_empty=function(){return this.__items.length===0},_.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},_.prototype.push=function(o){this.__items.push(o);var c=o.lastIndexOf(`
|
|
|
`);c!==-1?this.__character_count=o.length-c:this.__character_count+=o.length},_.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},_.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},_.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},_.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},_.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function r(o,c){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),c=c||"",o.indent_level>0&&(c=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}r.prototype.get_indent_size=function(o,c){var v=this.__base_string_length;return c=c||0,o<0&&(v=0),v+=o*this.__indent_size,v+=c,v},r.prototype.get_indent_string=function(o,c){var v=this.__base_string;return c=c||0,o<0&&(o=0,v=""),c+=o*this.__indent_size,this.__ensure_cache(c),v+=this.__cache[c],v},r.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var o=this.__cache.length,c=0,v="";this.__indent_size&&o>=this.__indent_size&&(c=Math.floor(o/this.__indent_size),o-=c*this.__indent_size,v=new Array(c+1).join(this.__indent_string)),o&&(v+=new Array(o+1).join(" ")),this.__cache.push(v)};function n(o,c){this.__indent_cache=new r(o,c),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new _(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}n.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},n.prototype.get_line_number=function(){return this.__lines.length},n.prototype.get_indent_string=function(o,c){return this.__indent_cache.get_indent_string(o,c)},n.prototype.get_indent_size=function(o,c){return this.__indent_cache.get_indent_size(o,c)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},n.prototype.get_code=function(o){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===`
|
|
|
`&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var v=this.__lines.join(`
|
|
|
`);return o!==`
|
|
|
`&&(v=v.replace(/[\n]/g,o)),v},n.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},n.prototype.set_indent=function(o,c){return o=o||0,c=c||0,this.next_line.set_indent(o,c),this.__lines.length>1?(this.current_line.set_indent(o,c),!0):(this.current_line.set_indent(),!1)},n.prototype.add_raw_token=function(o){for(var c=0;c<o.newlines;c++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},n.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},n.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},n.prototype.remove_indent=function(o){for(var c=this.__lines.length;o<c;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},n.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},n.prototype.just_added_newline=function(){return this.current_line.is_empty()},n.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},n.prototype.ensure_empty_line_above=function(o,c){for(var v=this.__lines.length-2;v>=0;){var f=this.__lines[v];if(f.is_empty())break;if(f.item(0).indexOf(o)!==0&&f.item(-1)!==c){this.__lines.splice(v+1,0,new _(this)),this.previous_line=this.__lines[this.__lines.length-2];break}v--}},l.exports.Output=n},function(l){function _(r,n,o,c){this.type=r,this.text=n,this.comments_before=null,this.newlines=o||0,this.whitespace_before=c||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}l.exports.Token=_},,,function(l){function _(o,c){this.raw_options=r(o,c),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}_.prototype._get_array=function(o,c){var v=this.raw_options[o],f=c||[];return typeof v=="object"?v!==null&&typeof v.concat=="function"&&(f=v.concat()):typeof v=="string"&&(f=v.split(/[^a-zA-Z0-9_\/\-]+/)),f},_.prototype._get_boolean=function(o,c){var v=this.raw_options[o],f=v===void 0?!!c:!!v;return f},_.prototype._get_characters=function(o,c){var v=this.raw_options[o],f=c||"";return typeof v=="string"&&(f=v.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),f},_.prototype._get_number=function(o,c){var v=this.raw_options[o];c=parseInt(c,10),isNaN(c)&&(c=0);var f=parseInt(v,10);return isNaN(f)&&(f=c),f},_.prototype._get_selection=function(o,c,v){var f=this._get_selection_list(o,c,v);if(f.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
|
|
|
`+c+`
|
|
|
You passed in: '`+this.raw_options[o]+"'");return f[0]},_.prototype._get_selection_list=function(o,c,v){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(v=v||[c[0]],!this._is_valid_selection(v,c))throw new Error("Invalid Default Value!");var f=this._get_array(o,v);if(!this._is_valid_selection(f,c))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
|
|
|
`+c+`
|
|
|
You passed in: '`+this.raw_options[o]+"'");return f},_.prototype._is_valid_selection=function(o,c){return o.length&&c.length&&!o.some(function(v){return c.indexOf(v)===-1})};function r(o,c){var v={};o=n(o);var f;for(f in o)f!==c&&(v[f]=o[f]);if(c&&o[c])for(f in o[c])v[f]=o[c][f];return v}function n(o){var c={},v;for(v in o){var f=v.replace(/-/g,"_");c[f]=o[v]}return c}l.exports.Options=_,l.exports.normalizeOpts=n,l.exports.mergeOpts=r},,function(l){var _=RegExp.prototype.hasOwnProperty("sticky");function r(n){this.__input=n||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position<this.__input_length},r.prototype.next=function(){var n=null;return this.hasNext()&&(n=this.__input.charAt(this.__position),this.__position+=1),n},r.prototype.peek=function(n){var o=null;return n=n||0,n+=this.__position,n>=0&&n<this.__input_length&&(o=this.__input.charAt(n)),o},r.prototype.__match=function(n,o){n.lastIndex=o;var c=n.exec(this.__input);return c&&!(_&&n.sticky)&&(c.index!==o&&(c=null)),c},r.prototype.test=function(n,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(n,o):!1},r.prototype.testChar=function(n,o){var c=this.peek(o);return n.lastIndex=0,c!==null&&n.test(c)},r.prototype.match=function(n){var o=this.__match(n,this.__position);return o?this.__position+=o[0].length:o=null,o},r.prototype.read=function(n,o,c){var v="",f;return n&&(f=this.match(n),f&&(v+=f[0])),o&&(f||!n)&&(v+=this.readUntil(o,c)),v},r.prototype.readUntil=function(n,o){var c="",v=this.__position;n.lastIndex=this.__position;var f=n.exec(this.__input);return f?(v=f.index,o&&(v+=f[0].length)):v=this.__input_length,c=this.__input.substring(this.__position,v),this.__position=v,c},r.prototype.readUntilAfter=function(n){return this.readUntil(n,!0)},r.prototype.get_regexp=function(n,o){var c=null,v="g";return o&&_&&(v="y"),typeof n=="string"&&n!==""?c=new RegExp(n,v):n&&(c=new RegExp(n.source,v)),c},r.prototype.get_literal_regexp=function(n){return RegExp(n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},r.prototype.peekUntilAfter=function(n){var o=this.__position,c=this.readUntilAfter(n);return this.__position=o,c},r.prototype.lookBack=function(n){var o=this.__position-1;return o>=n.length&&this.__input.substring(o-n.length,o).toLowerCase()===n},l.exports.InputScanner=r},function(l,_,r){var n=r(8).InputScanner,o=r(3).Token,c=r(10).TokenStream,v=r(11).WhitespacePattern,f={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},y=function(h,b){this._input=new n(h),this._options=b||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new v(this._input)};y.prototype.tokenize=function(){this._input.restart(),this.__tokens=new c,this._reset();for(var h,b=new o(f.START,""),m=null,d=[],x=new c;b.type!==f.EOF;){for(h=this._get_next_token(b,m);this._is_comment(h);)x.add(h),h=this._get_next_token(b,m);x.isEmpty()||(h.comments_before=x,x=new c),h.parent=m,this._is_opening(h)?(d.push(m),m=h):m&&this._is_closing(h,m)&&(h.opened=m,m.closed=h,m=d.pop(),h.parent=m),h.previous=b,b.next=h,this.__tokens.add(h),b=h}return this.__tokens},y.prototype._is_first_token=function(){return this.__tokens.isEmpty()},y.prototype._reset=function(){},y.prototype._get_next_token=function(h,b){this._readWhitespace();var m=this._input.read(/.+/g);return m?this._create_token(f.RAW,m):this._create_token(f.EOF,"")},y.prototype._is_comment=function(h){return!1},y.prototype._is_opening=function(h){return!1},y.prototype._is_closing=function(h,b){return!1},y.prototype._create_token=function(h,b){var m=new o(h,b,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return m},y.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},l.exports.Tokenizer=y,l.exports.TOKEN=f},function(l){function _(r){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=r}_.prototype.restart=function(){this.__position=0},_.prototype.isEmpty=function(){return this.__tokens_length===0},_.prototype.hasNext=function(){return this.__position<this.__tokens_length},_.prototype.next=function(){var r=null;return this.hasNext()&&(r=this.__tokens[this.__position],this.__position+=1),r},_.prototype.peek=function(r){var n=null;return r=r||0,r+=this.__position,r>=0&&r<this.__tokens_length&&(n=this.__tokens[r]),n},_.prototype.add=function(r){this.__parent_token&&(r.parent=this.__parent_token),this.__tokens.push(r),this.__tokens_length+=1},l.exports.TokenStream=_},function(l,_,r){var n=r(12).Pattern;function o(c,v){n.call(this,c,v),v?this._line_regexp=this._input.get_regexp(v._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}o.prototype=new n,o.prototype.__set_whitespace_patterns=function(c,v){c+="\\t ",v+="\\n\\r",this._match_pattern=this._input.get_regexp("["+c+v+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+v+"]")},o.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var c=this._input.read(this._match_pattern);if(c===" ")this.whitespace_before_token=" ";else if(c){var v=this.__split(this._newline_regexp,c);this.newline_count=v.length-1,this.whitespace_before_token=v[this.newline_count]}return c},o.prototype.matching=function(c,v){var f=this._create();return f.__set_whitespace_patterns(c,v),f._update(),f},o.prototype._create=function(){return new o(this._input,this)},o.prototype.__split=function(c,v){c.lastIndex=0;for(var f=0,y=[],h=c.exec(v);h;)y.push(v.substring(f,h.index)),f=h.index+h[0].length,h=c.exec(v);return f<v.length?y.push(v.substring(f,v.length)):y.push(""),y},l.exports.WhitespacePattern=o},function(l){function _(r,n){this._input=r,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,n&&(this._starting_pattern=this._input.get_regexp(n._starting_pattern,!0),this._match_pattern=this._input.get_regexp(n._match_pattern,!0),this._until_pattern=this._input.get_regexp(n._until_pattern),this._until_after=n._until_after)}_.prototype.read=function(){var r=this._input.read(this._starting_pattern);return(!this._starting_pattern||r)&&(r+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),r},_.prototype.read_match=function(){return this._input.match(this._match_pattern)},_.prototype.until_after=function(r){var n=this._create();return n._until_after=!0,n._until_pattern=this._input.get_regexp(r),n._update(),n},_.prototype.until=function(r){var n=this._create();return n._until_after=!1,n._until_pattern=this._input.get_regexp(r),n._update(),n},_.prototype.starting_with=function(r){var n=this._create();return n._starting_pattern=this._input.get_regexp(r,!0),n._update(),n},_.prototype.matching=function(r){var n=this._create();return n._match_pattern=this._input.get_regexp(r,!0),n._update(),n},_.prototype._create=function(){return new _(this._input,this)},_.prototype._update=function(){},l.exports.Pattern=_},function(l){function _(r,n){r=typeof r=="string"?r:r.source,n=typeof n=="string"?n:n.source,this.__directives_block_pattern=new RegExp(r+/ beautify( \w+[:]\w+)+ /.source+n,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(r+/\sbeautify\signore:end\s/.source+n,"g")}_.prototype.get_directives=function(r){if(!r.match(this.__directives_block_pattern))return null;var n={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(r);o;)n[o[1]]=o[2],o=this.__directive_pattern.exec(r);return n},_.prototype.readIgnored=function(r){return r.readUntilAfter(this.__directives_end_ignore_pattern)},l.exports.Directives=_},function(l,_,r){var n=r(12).Pattern,o={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function c(v,f){n.call(this,v,f),this.__template_pattern=null,this._disabled=Object.assign({},o),this._excluded=Object.assign({},o),f&&(this.__template_pattern=this._input.get_regexp(f.__template_pattern),this._excluded=Object.assign(this._excluded,f._excluded),this._disabled=Object.assign(this._disabled,f._disabled));var y=new n(v);this.__patterns={handlebars_comment:y.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:y.starting_with(/{{{/).until_after(/}}}/),handlebars:y.starting_with(/{{/).until_after(/}}/),php:y.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:y.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:y.starting_with(/{%/).until_after(/%}/),django_value:y.starting_with(/{{/).until_after(/}}/),django_comment:y.starting_with(/{#/).until_after(/#}/),smarty:y.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:y.starting_with(/{\*/).until_after(/\*}/),smarty_literal:y.starting_with(/{literal}/).until_after(/{\/literal}/)}}c.prototype=new n,c.prototype._create=function(){return new c(this._input,this)},c.prototype._update=function(){this.__set_templated_pattern()},c.prototype.disable=function(v){var f=this._create();return f._disabled[v]=!0,f._update(),f},c.prototype.read_options=function(v){var f=this._create();for(var y in o)f._disabled[y]=v.templating.indexOf(y)===-1;return f._update(),f},c.prototype.exclude=function(v){var f=this._create();return f._excluded[v]=!0,f._update(),f},c.prototype.read=function(){var v="";this._match_pattern?v=this._input.read(this._starting_pattern):v=this._input.read(this._starting_pattern,this.__template_pattern);for(var f=this._read_template();f;)this._match_pattern?f+=this._input.read(this._match_pattern):f+=this._input.readUntil(this.__template_pattern),v+=f,f=this._read_template();return this._until_after&&(v+=this._input.readUntilAfter(this._until_pattern)),v},c.prototype.__set_templated_pattern=function(){var v=[];this._disabled.php||v.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||v.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||v.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(v.push(this.__patterns.django._starting_pattern.source),v.push(this.__patterns.django_value._starting_pattern.source),v.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||v.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&v.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+v.join("|")+")")},c.prototype._read_template=function(){var v="",f=this._input.peek();if(f==="<"){var y=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&y==="?"&&(v=v||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&y==="%"&&(v=v||this.__patterns.erb.read())}else f==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(v=v||this.__patterns.handlebars_comment.read(),v=v||this.__patterns.handlebars_unescaped.read(),v=v||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(v=v||this.__patterns.django_value.read()),this._excluded.django||(v=v||this.__patterns.django_comment.read(),v=v||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(v=v||this.__patterns.smarty_comment.read(),v=v||this.__patterns.smarty_literal.read(),v=v||this.__patterns.smarty.read()));return v},l.exports.TemplatablePattern=c},,,,function(l,_,r){var n=r(19).Beautifier,o=r(20).Options;function c(v,f,y,h){var b=new n(v,f,y,h);return b.beautify()}l.exports=c,l.exports.defaultOptions=function(){return new o}},function(l,_,r){var n=r(20).Options,o=r(2).Output,c=r(21).Tokenizer,v=r(21).TOKEN,f=/\r\n|[\r\n]/,y=/\r\n|[\r\n]/g,h=function(P,I){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=P.max_preserve_newlines,this.preserve_newlines=P.preserve_newlines,this._output=new o(P,I)};h.prototype.current_line_has_match=function(P){return this._output.current_line.has_match(P)},h.prototype.set_space_before_token=function(P,I){this._output.space_before_token=P,this._output.non_breaking_space=I},h.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},h.prototype.add_raw_token=function(P){this._output.add_raw_token(P)},h.prototype.print_preserved_newlines=function(P){var I=0;P.type!==v.TEXT&&P.previous.type!==v.TEXT&&(I=P.newlines?1:0),this.preserve_newlines&&(I=P.newlines<this.max_preserve_newlines+1?P.newlines:this.max_preserve_newlines+1);for(var u=0;u<I;u++)this.print_newline(u>0);return I!==0},h.prototype.traverse_whitespace=function(P){return P.whitespace_before||P.newlines?(this.print_preserved_newlines(P)||(this._output.space_before_token=!0),!0):!1},h.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},h.prototype.print_newline=function(P){this._output.add_new_line(P)},h.prototype.print_token=function(P){P.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(P.text))},h.prototype.indent=function(){this.indent_level++},h.prototype.get_full_indent=function(P){return P=this.indent_level+(P||0),P<1?"":this._output.get_indent_string(P)};var b=function(P){for(var I=null,u=P.next;u.type!==v.EOF&&P.closed!==u;){if(u.type===v.ATTRIBUTE&&u.text==="type"){u.next&&u.next.type===v.EQUALS&&u.next.next&&u.next.next.type===v.VALUE&&(I=u.next.next.text);break}u=u.next}return I},m=function(P,I){var u=null,k=null;return I.closed?(P==="script"?u="text/javascript":P==="style"&&(u="text/css"),u=b(I)||u,u.search("text/css")>-1?k="css":u.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?k="javascript":u.search(/(text|application|dojo)\/(x-)?(html)/)>-1?k="html":u.search(/test\/null/)>-1&&(k="null"),k):null};function d(P,I){return I.indexOf(P)!==-1}function x(P,I,u){this.parent=P||null,this.tag=I?I.tag_name:"",this.indent_level=u||0,this.parser_token=I||null}function R(P){this._printer=P,this._current_frame=null}R.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},R.prototype.record_tag=function(P){var I=new x(this._current_frame,P,this._printer.indent_level);this._current_frame=I},R.prototype._try_pop_frame=function(P){var I=null;return P&&(I=P.parser_token,this._printer.indent_level=P.indent_level,this._current_frame=P.parent),I},R.prototype._get_frame=function(P,I){for(var u=this._current_frame;u&&!(P.indexOf(u.tag)!==-1);){if(I&&I.indexOf(u.tag)!==-1){u=null;break}u=u.parent}return u},R.prototype.try_pop=function(P,I){var u=this._get_frame([P],I);return this._try_pop_frame(u)},R.prototype.indent_to_tag=function(P){var I=this._get_frame(P);I&&(this._printer.indent_level=I.indent_level)};function O(P,I,u,k){this._source_text=P||"",I=I||{},this._js_beautify=u,this._css_beautify=k,this._tag_stack=null;var g=new n(I,"html");this._options=g,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}O.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var P=this._source_text,I=this._options.eol;this._options.eol==="auto"&&(I=`
|
|
|
`,P&&f.test(P)&&(I=P.match(f)[0])),P=P.replace(y,`
|
|
|
`);var u=P.match(/^[\t ]*/)[0],k={text:"",type:""},g=new w,a=new h(this._options,u),C=new c(P,this._options).tokenize();this._tag_stack=new R(a);for(var S=null,p=C.next();p.type!==v.EOF;)p.type===v.TAG_OPEN||p.type===v.COMMENT?(S=this._handle_tag_open(a,p,g,k),g=S):p.type===v.ATTRIBUTE||p.type===v.EQUALS||p.type===v.VALUE||p.type===v.TEXT&&!g.tag_complete?S=this._handle_inside_tag(a,p,g,C):p.type===v.TAG_CLOSE?S=this._handle_tag_close(a,p,g):p.type===v.TEXT?S=this._handle_text(a,p,g):a.add_raw_token(p),k=S,p=C.next();var U=a._output.get_code(I);return U},O.prototype._handle_tag_close=function(P,I,u){var k={text:I.text,type:I.type};return P.alignment_size=0,u.tag_complete=!0,P.set_space_before_token(I.newlines||I.whitespace_before!=="",!0),u.is_unformatted?P.add_raw_token(I):(u.tag_start_char==="<"&&(P.set_space_before_token(I.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&u.has_wrapped_attrs&&P.print_newline(!1)),P.print_token(I)),u.indent_content&&!(u.is_unformatted||u.is_content_unformatted)&&(P.indent(),u.indent_content=!1),!u.is_inline_element&&!(u.is_unformatted||u.is_content_unformatted)&&P.set_wrap_point(),k},O.prototype._handle_inside_tag=function(P,I,u,k){var g=u.has_wrapped_attrs,a={text:I.text,type:I.type};if(P.set_space_before_token(I.newlines||I.whitespace_before!=="",!0),u.is_unformatted)P.add_raw_token(I);else if(u.tag_start_char==="{"&&I.type===v.TEXT)P.print_preserved_newlines(I)?(I.newlines=0,P.add_raw_token(I)):P.print_token(I);else{if(I.type===v.ATTRIBUTE?(P.set_space_before_token(!0),u.attr_count+=1):(I.type===v.EQUALS||I.type===v.VALUE&&I.previous.type===v.EQUALS)&&P.set_space_before_token(!1),I.type===v.ATTRIBUTE&&u.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(P.traverse_whitespace(I),g=g||I.newlines!==0),this._is_wrap_attributes_force)){var C=u.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&u.attr_count===1){var S=!0,p=0,U;do{if(U=k.peek(p),U.type===v.ATTRIBUTE){S=!1;break}p+=1}while(p<4&&U.type!==v.EOF&&U.type!==v.TAG_CLOSE);C=!S}C&&(P.print_newline(!1),g=!0)}P.print_token(I),g=g||P.previous_token_wrapped(),u.has_wrapped_attrs=g}return a},O.prototype._handle_text=function(P,I,u){var k={text:I.text,type:"TK_CONTENT"};return u.custom_beautifier_name?this._print_custom_beatifier_text(P,I,u):u.is_unformatted||u.is_content_unformatted?P.add_raw_token(I):(P.traverse_whitespace(I),P.print_token(I)),k},O.prototype._print_custom_beatifier_text=function(P,I,u){var k=this;if(I.text!==""){var g=I.text,a,C=1,S="",p="";u.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?a=this._js_beautify:u.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?a=this._css_beautify:u.custom_beautifier_name==="html"&&(a=function(ce,ne){var me=new O(ce,ne,k._js_beautify,k._css_beautify);return me.beautify()}),this._options.indent_scripts==="keep"?C=0:this._options.indent_scripts==="separate"&&(C=-P.indent_level);var U=P.get_full_indent(C);if(g=g.replace(/\n[ \t]*$/,""),u.custom_beautifier_name!=="html"&&g[0]==="<"&&g.match(/^(<!--|<!\[CDATA\[)/)){var z=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(g);if(!z){P.add_raw_token(I);return}S=U+z[1]+`
|
|
|
`,g=z[4],z[5]&&(p=U+z[5]),g=g.replace(/\n[ \t]*$/,""),(z[2]||z[3].indexOf(`
|
|
|
`)!==-1)&&(z=z[3].match(/[ \t]+$/),z&&(I.whitespace_before=z[0]))}if(g)if(a){var q=function(){this.eol=`
|
|
|
`};q.prototype=this._options.raw_options;var $=new q;g=a(U+g,$)}else{var re=I.whitespace_before;re&&(g=g.replace(new RegExp(`
|
|
|
(`+re+")?","g"),`
|
|
|
`)),g=U+g.replace(/\n/g,`
|
|
|
`+U)}S&&(g?g=S+g+`
|
|
|
`+p:g=S+p),P.print_newline(!1),g&&(I.text=g,I.whitespace_before="",I.newlines=0,P.add_raw_token(I),P.print_newline(!0))}},O.prototype._handle_tag_open=function(P,I,u,k){var g=this._get_tag_open_token(I);return(u.is_unformatted||u.is_content_unformatted)&&!u.is_empty_element&&I.type===v.TAG_OPEN&&I.text.indexOf("</")===0?(P.add_raw_token(I),g.start_tag_token=this._tag_stack.try_pop(g.tag_name)):(P.traverse_whitespace(I),this._set_tag_position(P,I,g,u,k),g.is_inline_element||P.set_wrap_point(),P.print_token(I)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(g.alignment_size=I.text.length+1),!g.tag_complete&&!g.is_unformatted&&(P.alignment_size=g.alignment_size),g};var w=function(P,I){if(this.parent=P||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!I)this.tag_complete=!0;else{var u;this.tag_start_char=I.text[0],this.text=I.text,this.tag_start_char==="<"?(u=I.text.match(/^<([^\s>]*)/),this.tag_check=u?u[1]:""):(u=I.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=u?u[1]:"",(I.text.startsWith("{{#>")||I.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&I.next!==null?this.tag_check=I.next.text.split(" ")[0]:this.tag_check=I.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),I.type===v.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||I.closed&&I.closed.text==="/>";var k=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(k=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(k)))}};O.prototype._get_tag_open_token=function(P){var I=new w(this._tag_stack.get_parser_token(),P);return I.alignment_size=this._options.wrap_attributes_indent_size,I.is_end_tag=I.is_end_tag||d(I.tag_check,this._options.void_elements),I.is_empty_element=I.tag_complete||I.is_start_tag&&I.is_end_tag,I.is_unformatted=!I.tag_complete&&d(I.tag_check,this._options.unformatted),I.is_content_unformatted=!I.is_empty_element&&d(I.tag_check,this._options.content_unformatted),I.is_inline_element=d(I.tag_name,this._options.inline)||I.tag_name.includes("-")||I.tag_start_char==="{",I},O.prototype._set_tag_position=function(P,I,u,k,g){if(u.is_empty_element||(u.is_end_tag?u.start_tag_token=this._tag_stack.try_pop(u.tag_name):(this._do_optional_end_element(u)&&(u.is_inline_element||P.print_newline(!1)),this._tag_stack.record_tag(u),(u.tag_name==="script"||u.tag_name==="style")&&!(u.is_unformatted||u.is_content_unformatted)&&(u.custom_beautifier_name=m(u.tag_check,I)))),d(u.tag_check,this._options.extra_liners)&&(P.print_newline(!1),P._output.just_added_blankline()||P.print_newline(!0)),u.is_empty_element){if(u.tag_start_char==="{"&&u.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),u.indent_content=!0;var a=P.current_line_has_match(/{{#if/);a||P.print_newline(!1)}u.tag_name==="!--"&&g.type===v.TAG_CLOSE&&k.is_end_tag&&u.text.indexOf(`
|
|
|
`)===-1||(u.is_inline_element||u.is_unformatted||P.print_newline(!1),this._calcluate_parent_multiline(P,u))}else if(u.is_end_tag){var C=!1;C=u.start_tag_token&&u.start_tag_token.multiline_content,C=C||!u.is_inline_element&&!(k.is_inline_element||k.is_unformatted)&&!(g.type===v.TAG_CLOSE&&u.start_tag_token===k)&&g.type!=="TK_CONTENT",(u.is_content_unformatted||u.is_unformatted)&&(C=!1),C&&P.print_newline(!1)}else u.indent_content=!u.custom_beautifier_name,u.tag_start_char==="<"&&(u.tag_name==="html"?u.indent_content=this._options.indent_inner_html:u.tag_name==="head"?u.indent_content=this._options.indent_head_inner_html:u.tag_name==="body"&&(u.indent_content=this._options.indent_body_inner_html)),!(u.is_inline_element||u.is_unformatted)&&(g.type!=="TK_CONTENT"||u.is_content_unformatted)&&P.print_newline(!1),this._calcluate_parent_multiline(P,u)},O.prototype._calcluate_parent_multiline=function(P,I){I.parent&&P._output.just_added_newline()&&!((I.is_inline_element||I.is_unformatted)&&I.parent.is_inline_element)&&(I.parent.multiline_content=!0)};var D=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],A=["a","audio","del","ins","map","noscript","video"];O.prototype._do_optional_end_element=function(P){var I=null;if(P.is_empty_element||!P.is_start_tag||!P.parent)return;if(P.tag_name==="body")I=I||this._tag_stack.try_pop("head");else if(P.tag_name==="li")I=I||this._tag_stack.try_pop("li",["ol","ul"]);else if(P.tag_name==="dd"||P.tag_name==="dt")I=I||this._tag_stack.try_pop("dt",["dl"]),I=I||this._tag_stack.try_pop("dd",["dl"]);else if(P.parent.tag_name==="p"&&D.indexOf(P.tag_name)!==-1){var u=P.parent.parent;(!u||A.indexOf(u.tag_name)===-1)&&(I=I||this._tag_stack.try_pop("p"))}else P.tag_name==="rp"||P.tag_name==="rt"?(I=I||this._tag_stack.try_pop("rt",["ruby","rtc"]),I=I||this._tag_stack.try_pop("rp",["ruby","rtc"])):P.tag_name==="optgroup"?I=I||this._tag_stack.try_pop("optgroup",["select"]):P.tag_name==="option"?I=I||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):P.tag_name==="colgroup"?I=I||this._tag_stack.try_pop("caption",["table"]):P.tag_name==="thead"?(I=I||this._tag_stack.try_pop("caption",["table"]),I=I||this._tag_stack.try_pop("colgroup",["table"])):P.tag_name==="tbody"||P.tag_name==="tfoot"?(I=I||this._tag_stack.try_pop("caption",["table"]),I=I||this._tag_stack.try_pop("colgroup",["table"]),I=I||this._tag_stack.try_pop("thead",["table"]),I=I||this._tag_stack.try_pop("tbody",["table"])):P.tag_name==="tr"?(I=I||this._tag_stack.try_pop("caption",["table"]),I=I||this._tag_stack.try_pop("colgroup",["table"]),I=I||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(P.tag_name==="th"||P.tag_name==="td")&&(I=I||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),I=I||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return P.parent=this._tag_stack.get_parser_token(),I},l.exports.Beautifier=O},function(l,_,r){var n=r(6).Options;function o(c){n.call(this,c,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}o.prototype=new n,l.exports.Options=o},function(l,_,r){var n=r(9).Tokenizer,o=r(9).TOKEN,c=r(13).Directives,v=r(14).TemplatablePattern,f=r(12).Pattern,y={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:o.START,RAW:o.RAW,EOF:o.EOF},h=new c(/<\!--/,/-->/),b=function(m,d){n.call(this,m,d),this._current_tag_name="";var x=new v(this._input).read_options(this._options),R=new f(this._input);if(this.__patterns={word:x.until(/[\n\r\t <]/),single_quote:x.until_after(/'/),double_quote:x.until_after(/"/),attribute:x.until(/[\n\r\t =>]|\/>/),element_name:x.until(/[\n\r\t >\/]/),handlebars_comment:R.starting_with(/{{!--/).until_after(/--}}/),handlebars:R.starting_with(/{{/).until_after(/}}/),handlebars_open:R.until(/[\n\r\t }]/),handlebars_raw_close:R.until(/}}/),comment:R.starting_with(/<!--/).until_after(/-->/),cdata:R.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:R.starting_with(/<!\[/).until_after(/]>/),processing:R.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var O=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=R.matching(O).until_after(O)}};b.prototype=new n,b.prototype._is_comment=function(m){return!1},b.prototype._is_opening=function(m){return m.type===y.TAG_OPEN},b.prototype._is_closing=function(m,d){return m.type===y.TAG_CLOSE&&d&&((m.text===">"||m.text==="/>")&&d.text[0]==="<"||m.text==="}}"&&d.text[0]==="{"&&d.text[1]==="{")},b.prototype._reset=function(){this._current_tag_name=""},b.prototype._get_next_token=function(m,d){var x=null;this._readWhitespace();var R=this._input.peek();return R===null?this._create_token(y.EOF,""):(x=x||this._read_open_handlebars(R,d),x=x||this._read_attribute(R,m,d),x=x||this._read_close(R,d),x=x||this._read_raw_content(R,m,d),x=x||this._read_content_word(R),x=x||this._read_comment_or_cdata(R),x=x||this._read_processing(R),x=x||this._read_open(R,d),x=x||this._create_token(y.UNKNOWN,this._input.next()),x)},b.prototype._read_comment_or_cdata=function(m){var d=null,x=null,R=null;if(m==="<"){var O=this._input.peek(1);O==="!"&&(x=this.__patterns.comment.read(),x?(R=h.get_directives(x),R&&R.ignore==="start"&&(x+=h.readIgnored(this._input))):x=this.__patterns.cdata.read()),x&&(d=this._create_token(y.COMMENT,x),d.directives=R)}return d},b.prototype._read_processing=function(m){var d=null,x=null,R=null;if(m==="<"){var O=this._input.peek(1);(O==="!"||O==="?")&&(x=this.__patterns.conditional_comment.read(),x=x||this.__patterns.processing.read()),x&&(d=this._create_token(y.COMMENT,x),d.directives=R)}return d},b.prototype._read_open=function(m,d){var x=null,R=null;return d||m==="<"&&(x=this._input.next(),this._input.peek()==="/"&&(x+=this._input.next()),x+=this.__patterns.element_name.read(),R=this._create_token(y.TAG_OPEN,x)),R},b.prototype._read_open_handlebars=function(m,d){var x=null,R=null;return d||this._options.indent_handlebars&&m==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(x=this.__patterns.handlebars_comment.read(),x=x||this.__patterns.handlebars.read(),R=this._create_token(y.COMMENT,x)):(x=this.__patterns.handlebars_open.read(),R=this._create_token(y.TAG_OPEN,x))),R},b.prototype._read_close=function(m,d){var x=null,R=null;return d&&(d.text[0]==="<"&&(m===">"||m==="/"&&this._input.peek(1)===">")?(x=this._input.next(),m==="/"&&(x+=this._input.next()),R=this._create_token(y.TAG_CLOSE,x)):d.text[0]==="{"&&m==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),R=this._create_token(y.TAG_CLOSE,"}}"))),R},b.prototype._read_attribute=function(m,d,x){var R=null,O="";if(x&&x.text[0]==="<")if(m==="=")R=this._create_token(y.EQUALS,this._input.next());else if(m==='"'||m==="'"){var w=this._input.next();m==='"'?w+=this.__patterns.double_quote.read():w+=this.__patterns.single_quote.read(),R=this._create_token(y.VALUE,w)}else O=this.__patterns.attribute.read(),O&&(d.type===y.EQUALS?R=this._create_token(y.VALUE,O):R=this._create_token(y.ATTRIBUTE,O));return R},b.prototype._is_content_unformatted=function(m){return this._options.void_elements.indexOf(m)===-1&&(this._options.content_unformatted.indexOf(m)!==-1||this._options.unformatted.indexOf(m)!==-1)},b.prototype._read_raw_content=function(m,d,x){var R="";if(x&&x.text[0]==="{")R=this.__patterns.handlebars_raw_close.read();else if(d.type===y.TAG_CLOSE&&d.opened.text[0]==="<"&&d.text[0]!=="/"){var O=d.opened.text.substr(1).toLowerCase();if(O==="script"||O==="style"){var w=this._read_comment_or_cdata(m);if(w)return w.type=y.TEXT,w;R=this._input.readUntil(new RegExp("</"+O+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(O)&&(R=this._input.readUntil(new RegExp("</"+O+"[\\n\\r\\t ]*?>","ig")))}return R?this._create_token(y.TEXT,R):null},b.prototype._read_content_word=function(m){var d="";if(this._options.unformatted_content_delimiter&&(m===this._options.unformatted_content_delimiter[0]&&(d=this.__patterns.unformatted_content_delimiter.read())),d||(d=this.__patterns.word.read()),d)return this._create_token(y.TEXT,d)},l.exports.Tokenizer=b,l.exports.TOKEN=y}],T={};function e(l){var _=T[l];if(_!==void 0)return _.exports;var r=T[l]={exports:{}};return i[l](r,r.exports,e),r.exports}var E=e(18);G=E})();var X=G;if(!0)!(B=[L,L("6UM0"),L("TXwP")],M=function(i){var T=L("6UM0"),e=L("TXwP");return{html_beautify:function(E,l){return X(E,l,T.js_beautify,e.css_beautify)}}}.apply(ee,B),M!==void 0&&(W.exports=M));else var K,N})()},qBft:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("OLod"))})(this,function(B){return B.pad.AnsiX923={pad:function(M,G){var X=M.sigBytes,K=G*4,N=K-X%K,i=X+N-1;M.clamp(),M.words[i>>>2]|=N<<24-i%4*8,M.sigBytes+=N},unpad:function(M){var G=M.words[M.sigBytes-1>>>2]&255;M.sigBytes-=G}},B.pad.Ansix923})},qM6L:function(W,ee,L){(function(B,M){W.exports=ee=M(L("Ib8C"))})(this,function(B){return function(){var M=B,G=M.lib,X=G.WordArray,K=M.enc,N=K.Utf16=K.Utf16BE={stringify:function(T){for(var e=T.words,E=T.sigBytes,l=[],_=0;_<E;_+=2){var r=e[_>>>2]>>>16-_%4*8&65535;l.push(String.fromCharCode(r))}return l.join("")},parse:function(T){for(var e=T.length,E=[],l=0;l<e;l++)E[l>>>1]|=T.charCodeAt(l)<<16-l%2*16;return X.create(E,e*2)}};K.Utf16LE={stringify:function(T){for(var e=T.words,E=T.sigBytes,l=[],_=0;_<E;_+=2){var r=i(e[_>>>2]>>>16-_%4*8&65535);l.push(String.fromCharCode(r))}return l.join("")},parse:function(T){for(var e=T.length,E=[],l=0;l<e;l++)E[l>>>1]|=i(T.charCodeAt(l)<<16-l%2*16);return X.create(E,e*2)}};function i(T){return T<<8&4278255360|T>>>8&16711935}}(),B.enc.Utf16})},qu8F:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("OLod"))})(this,function(B){/** @preserve
|
|
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
|
* derived from CryptoJS.mode.CTR
|
|
|
* Jan Hruby jhruby.web@gmail.com
|
|
|
*/return B.mode.CTRGladman=function(){var M=B.lib.BlockCipherMode.extend();function G(N){if((N>>24&255)===255){var i=N>>16&255,T=N>>8&255,e=N&255;i===255?(i=0,T===255?(T=0,e===255?e=0:++e):++T):++i,N=0,N+=i<<16,N+=T<<8,N+=e}else N+=1<<24;return N}function X(N){return(N[0]=G(N[0]))===0&&(N[1]=G(N[1])),N}var K=M.Encryptor=M.extend({processBlock:function(N,i){var T=this._cipher,e=T.blockSize,E=this._iv,l=this._counter;E&&(l=this._counter=E.slice(0),this._iv=void 0),X(l);var _=l.slice(0);T.encryptBlock(_,0);for(var r=0;r<e;r++)N[i+r]^=_[r]}});return M.Decryptor=K,M}(),B.mode.CTRGladman})},rSU8:function(W,ee,L){"use strict";function B(l){return typeof l=="object"&&l!=null&&l.nodeType===1}function M(l,_){return(!_||l!=="hidden")&&l!=="visible"&&l!=="clip"}function G(l,_){if(l.clientHeight<l.scrollHeight||l.clientWidth<l.scrollWidth){var r=getComputedStyle(l,null);return M(r.overflowY,_)||M(r.overflowX,_)||function(n){var o=function(c){if(!c.ownerDocument||!c.ownerDocument.defaultView)return null;try{return c.ownerDocument.defaultView.frameElement}catch(v){return null}}(n);return!!o&&(o.clientHeight<n.scrollHeight||o.clientWidth<n.scrollWidth)}(l)}return!1}function X(l,_,r,n,o,c,v,f){return c<l&&v>_||c>l&&v<_?0:c<=l&&f<=r||v>=_&&f>=r?c-l-n:v>_&&f<r||c<l&&f>r?v-_+o:0}var K=function(l,_){var r=window,n=_.scrollMode,o=_.block,c=_.inline,v=_.boundary,f=_.skipOverflowHiddenElements,y=typeof v=="function"?v:function(ye){return ye!==v};if(!B(l))throw new TypeError("Invalid target");for(var h,b,m=document.scrollingElement||document.documentElement,d=[],x=l;B(x)&&y(x);){if((x=(b=(h=x).parentElement)==null?h.getRootNode().host||null:b)===m){d.push(x);break}x!=null&&x===document.body&&G(x)&&!G(document.documentElement)||x!=null&&G(x,f)&&d.push(x)}for(var R=r.visualViewport?r.visualViewport.width:innerWidth,O=r.visualViewport?r.visualViewport.height:innerHeight,w=window.scrollX||pageXOffset,D=window.scrollY||pageYOffset,A=l.getBoundingClientRect(),P=A.height,I=A.width,u=A.top,k=A.right,g=A.bottom,a=A.left,C=o==="start"||o==="nearest"?u:o==="end"?g:u+P/2,S=c==="center"?a+I/2:c==="end"?k:a,p=[],U=0;U<d.length;U++){var z=d[U],q=z.getBoundingClientRect(),$=q.height,re=q.width,ce=q.top,ne=q.right,me=q.bottom,be=q.left;if(n==="if-needed"&&u>=0&&a>=0&&g<=O&&k<=R&&u>=ce&&g<=me&&a>=be&&k<=ne)return p;var he=getComputedStyle(z),se=parseInt(he.borderLeftWidth,10),_e=parseInt(he.borderTopWidth,10),De=parseInt(he.borderRightWidth,10),ge=parseInt(he.borderBottomWidth,10),fe=0,Ce=0,ae="offsetWidth"in z?z.offsetWidth-z.clientWidth-se-De:0,Q="offsetHeight"in z?z.offsetHeight-z.clientHeight-_e-ge:0,J="offsetWidth"in z?z.offsetWidth===0?0:re/z.offsetWidth:0,Z="offsetHeight"in z?z.offsetHeight===0?0:$/z.offsetHeight:0;if(m===z)fe=o==="start"?C:o==="end"?C-O:o==="nearest"?X(D,D+O,O,_e,ge,D+C,D+C+P,P):C-O/2,Ce=c==="start"?S:c==="center"?S-R/2:c==="end"?S-R:X(w,w+R,R,se,De,w+S,w+S+I,I),fe=Math.max(0,fe+D),Ce=Math.max(0,Ce+w);else{fe=o==="start"?C-ce-_e:o==="end"?C-me+ge+Q:o==="nearest"?X(ce,me,$,_e,ge+Q,C,C+P,P):C-(ce+$/2)+Q/2,Ce=c==="start"?S-be-se:c==="center"?S-(be+re/2)+ae/2:c==="end"?S-ne+De+ae:X(be,ne,re,se,De+ae,S,S+I,I);var pe=z.scrollLeft,le=z.scrollTop;C+=le-(fe=Math.max(0,Math.min(le+fe/Z,z.scrollHeight-$/Z+Q))),S+=pe-(Ce=Math.max(0,Math.min(pe+Ce/J,z.scrollWidth-re/J+ae)))}p.push({el:z,top:fe,left:Ce})}return p};function N(l){return l===Object(l)&&Object.keys(l).length!==0}function i(l,_){_===void 0&&(_="auto");var r="scrollBehavior"in document.body.style;l.forEach(function(n){var o=n.el,c=n.top,v=n.left;o.scroll&&r?o.scroll({top:c,left:v,behavior:_}):(o.scrollTop=c,o.scrollLeft=v)})}function T(l){return l===!1?{block:"end",inline:"nearest"}:N(l)?l:{block:"start",inline:"nearest"}}function e(l,_){var r=l.isConnected||l.ownerDocument.documentElement.contains(l);if(N(_)&&typeof _.behavior=="function")return _.behavior(r?K(l,_):[]);if(!r)return;var n=T(_);return i(K(l,n),n.behavior)}var E=ee.a=e},rWjI:function(W,ee,L){"use strict";L.r(ee),L.d(ee,"Types",function(){return wt});var B=L("MYqI"),M=L("RRII"),G=L("tpbu"),X=L("CDKA"),K=L("d7ih"),N=L("P6vI"),i=L("N082"),T=L("2yBE"),e=L("5LYH"),E=L("XlT3"),l=L("e7Hv"),_=L("FrBR"),r=L("SCzF"),n=L("nc60"),o=L("sh+1"),c=L("VUml"),v=L("RCAX"),f=L("eFXf"),y=L("v6r8"),h=L("dLI4"),b=L("4d5L"),m=L("6NPb"),d=L("o3AU"),x=L("EOh4"),R=L("V/dS"),O=L("8OG5"),w=L("mgsT"),D=L("IYef"),A=L("y6Ii"),P=L("Wuip"),I=L("Hqw+"),u=L("YaWb"),k=L("f0PT"),g=L("5CFD"),a=L("c3Iv"),C=L("rBQ5"),S=L("47JS"),p=L("TOZL"),U=L("XXmO"),z=L.n(U),q=L("T/Jt"),$=L.n(q),re=L("eRFJ"),ce=L.n(re),ne=L("Hbia"),me,be=r.a.Option,he;(function(ct){ct[ct.language=0]="language",ct[ct.difficulty=1]="difficulty",ct[ct.category=2]="category",ct[ct.openOrNot=3]="openOrNot"})(he||(he={}));var se=(me={},Object(ne.a)(me,he.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(ne.a)(me,he.difficulty,[{title:"\u7B80\u5355",key:1},{title:"\u9002\u4E2D",key:2},{title:"\u56F0\u96BE",key:3}]),Object(ne.a)(me,he.category,[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}]),Object(ne.a)(me,he.openOrNot,[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]),me);function _e(ct){return se[ct].map(function(bt){return $.a.createElement(be,{key:bt.title,value:bt.key}," ",bt.title," ")})}function De(ct,bt){ct.map(function(gt){var Ut=gt.id,Lt=gt.name,It=gt.sub_disciplines,St={value:Ut,label:Lt};bt.push(St),It&&It.length>0&&(St.children=[],De(It,St.children))})}function ge(ct,bt){for(var gt=[],Ut=0;Ut<ct.length;Ut++){var Lt,It=ct[Ut];if(((Lt=It.sub_disciplines)===null||Lt===void 0?void 0:Lt.length)>0){gt[0]=It.id;for(var St=0;St<It.sub_disciplines.length;St++){var Jt=It.sub_disciplines[St];if(Jt.id===bt)return gt[1]=Jt.id,[gt,Jt.tag_disciplines||Jt.sub_disciplines||[]]}}}return[gt,[]]}var fe=L("3ptp"),Ce=L("9kvl"),ae=L("J66h"),Q=L("GIiI"),J=L("2BaD"),Z=L("Ot1p"),pe=L("ErOA");function le(ct){return Object(pe.f)("practices.json",ct)}function ye(){return Object(pe.c)("problems/new.json")}function Te(ct){return Object(pe.c)("practices/".concat(ct,"/edit.json"))}function Pe(ct,bt){return Object(pe.g)("practices/".concat(ct),bt)}function He(ct,bt){return Object(pe.f)("exercises/".concat(ct,"/exercise_questions.json"),bt)}function Oe(ct,bt){return Object(pe.g)("exercise_questions/".concat(ct,".json"),bt)}var Ue=L("cDPC"),je=L("GCqv"),Ve=L("VHWp"),Re=L("HPgX"),Xe=L("ZW9T"),Qe=L("ZD9Y"),We=L("M8RZ"),ze=L("bCnd"),Me=L("1T2W"),Ie=L.n(Me),Be={theme:Object(ze.a)("cmCodeMode","vs-dark"),fontSize:Object(ze.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(ze.a)("cmTabToSpace",!0)},we;(function(ct){ct[ct.set_font_size=0]="set_font_size",ct[ct.set_theme=1]="set_theme",ct[ct.on_tab_to_space=2]="on_tab_to_space",ct[ct.set_show_editor_setting=3]="set_show_editor_setting"})(we||(we={}));function Ae(ct,bt){switch(bt.type){case we.set_show_editor_setting:return Object(u.a)(Object(u.a)({},ct),{},{showEditorSetting:bt.payload});case we.set_theme:return Object(u.a)(Object(u.a)({},ct),{},{theme:bt.payload});case we.set_font_size:return Object(u.a)(Object(u.a)({},ct),{},{fontSize:bt.payload});case we.on_tab_to_space:return Object(u.a)(Object(u.a)({},ct),{},{tabToSpace:bt.payload});default:throw new Error}}var ke=function(ct){var bt=ct.value,gt=ct.onChange,Ut=ct.language,Lt=ct.onLanguage,It=ct.languageItems,St=ct.ActionBarRender,Jt=St===void 0?function(Y){return $.a.createElement(Le,{languageItems:It,onLanguage:Lt,language:Ut,onShowCodeSetting:Y})}:St,kt=Object(q.useReducer)(Ae,Be),zt=Object(I.a)(kt,2),st=zt[0],pt=zt[1],Ct=st.theme,Dt=st.fontSize,Tt=st.showEditorSetting,tr=st.tabToSpace;console.log(bt,Ut,"value");var yr={onFontSizeChange:function(ie){pt({type:we.set_font_size,payload:ie}),Object(ze.b)("cmFontSize",ie)},tabToSpace:tr,cmFontSize:Dt,className:"oj",cmCodeMode:Ct,onTabToSpace:function(ie){pt({type:we.on_tab_to_space,payload:ie}),Object(ze.b)("cmTabToSpace",ie)},onCodeModeChange:function(ie){pt({type:we.set_theme,payload:ie}),Object(ze.b)("cmCodeMode",ie)}};function Kt(){pt({type:we.set_show_editor_setting,payload:!1})}function ue(){pt({type:we.set_show_editor_setting,payload:!0})}var V={value:bt,language:Ut,onChange:gt,theme:Ct,height:"calc(100% - 56px)",options:{fontSize:Dt,insertSpaces:tr}};return $.a.createElement(q.Fragment,null,$.a.createElement("div",{className:Ie.a["code-panel-container"]},Jt(ue),$.a.createElement(Xe.b,Object(Re.a)({key:Ut},V))),$.a.createElement(We.a,null,$.a.createElement(Ve.a,{className:"oj",title:null,placement:"right",closable:!1,visible:Tt,onClose:Kt},$.a.createElement(Qe.a,yr))))};function Le(ct){var bt=ct.languageItems,gt=ct.language,Ut=ct.onShowCodeSetting,Lt=ct.onLanguage;return $.a.createElement("div",{className:Ie.a["action-oj-bar"]},bt==null?void 0:bt.map(function(It){return $.a.createElement("div",{className:gt===(It==null?void 0:It.language)?Ie.a.active:"",onClick:function(){return Lt(It==null?void 0:It.language)},key:It==null?void 0:It.language},It==null?void 0:It.language)}),$.a.createElement("a",{onClick:Ut},$.a.createElement("i",{className:"iconfont icon-shezhi"})))}var Ke=L("wd39"),Ze=L("szcH"),Ne=L("L9qf"),$e=L.n(Ne),Je=function(bt){var gt=bt.visible,Ut=bt.onOK,Lt=bt.onCancel,It=Object(q.useState)(!1),St=Object(I.a)(It,2),Jt=St[0],kt=St[1],zt=Object(q.useState)(!1),st=Object(I.a)(zt,2),pt=st[0],Ct=st[1],Dt=Object(q.useState)("1"),Tt=Object(I.a)(Dt,2),tr=Tt[0],yr=Tt[1],Kt=Object(q.useState)(""),ue=Object(I.a)(Kt,2),V=ue[0],Y=ue[1],ie=Object(q.useState)([]),Ee=Object(I.a)(ie,2),oe=Ee[0],Fe=Ee[1],tt=function(){var er=Object(D.a)(z.a.mark(function nr(){var ur;return z.a.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:if(V){Pt.next=3;break}return w.b.warn("\u9898\u76EE".concat(Xt,"\u4E0D\u80FD\u4E3A\u7A7A")),Pt.abrupt("return");case 3:return Ct(!0),Pt.next=6,Object(pe.a)("/api/tag_disciplines.json",{method:"post",body:{target:gt,name:V}});case 6:if(ur=Pt.sent,!((ur==null?void 0:ur.status)===0)){Pt.next=10;break}return Ut(),Pt.abrupt("return");case 10:Ct(!1);case 11:case"end":return Pt.stop()}},nr)}));return function(){return er.apply(this,arguments)}}(),xt=function(){var er=Object(D.a)(z.a.mark(function nr(){var ur,fr,Pt=arguments;return z.a.wrap(function(lr){for(;;)switch(lr.prev=lr.next){case 0:return ur=Pt.length>0&&Pt[0]!==void 0?Pt[0]:"",kt(!0),lr.next=4,Object(pe.a)("/api/tag_disciplines.json",{method:"get",params:{target:gt,search:ur}});case 4:fr=lr.sent,Fe(fr.tag_disciplines||[]),kt(!1);case 7:case"end":return lr.stop()}},nr)}));return function(){return er.apply(this,arguments)}}(),Ot=function(nr){var ur=nr.name;C.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:$.a.createElement("div",null,$.a.createElement(p.a,{defaultValue:ur,placeholder:"\u8BF7\u8F93\u5165".concat(Xt,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20,onChange:function(Pt){ur=Pt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var fr=Object(D.a)(z.a.mark(function sr(){var lr;return z.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:if(ur){$t.next=3;break}return w.b.warn("\u9898\u76EE".concat(Xt,"\u4E0D\u80FD\u4E3A\u7A7A")),$t.abrupt("return",Promise.reject());case 3:return $t.next=5,Object(pe.a)("/api/tag_disciplines/".concat(nr.id,"/rename.json"),{method:"post",body:{id:nr.id,name:ur}});case 5:lr=$t.sent,(lr==null?void 0:lr.status)===0&&xt();case 7:case"end":return $t.stop()}},sr)}));function Pt(){return fr.apply(this,arguments)}return Pt}()})},ut=function(nr){C.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:gt==="practice"?$.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",$.a.createElement("span",{className:"c-light-primary"},nr.name),"\u201D\u5220\u9664\u5417\uFF1F",$.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):$.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",$.a.createElement("span",{className:"c-light-primary"},nr.name),"\u201D\u5220\u9664\u5417\uFF1F",$.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u77E5\u8BC6\u70B9\u8FDB\u884C\u6E05\u9664\u3002"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var ur=Object(D.a)(z.a.mark(function Pt(){var sr;return z.a.wrap(function(br){for(;;)switch(br.prev=br.next){case 0:return br.next=2,Object(pe.a)("/api/tag_disciplines/".concat(nr.id,".json"),{method:"delete",body:{id:nr.id}});case 2:sr=br.sent,(sr==null?void 0:sr.status)===0&&xt();case 4:case"end":return br.stop()}},Pt)}));function fr(){return ur.apply(this,arguments)}return fr}()})},Ft=function(nr){xt(nr)},Xt=gt==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return $.a.createElement(C.a,{afterClose:function(){Ct(!1),kt(!1),Y(""),yr("1"),Fe([])},centered:!0,keyboard:!1,width:600,title:"".concat(Xt,"\u7BA1\u7406"),visible:!!gt,className:$e.a.customModal,footer:null,onCancel:Lt},$.a.createElement("section",{className:$e.a.wrap},$.a.createElement(Ze.a,{activeKey:tr,onChange:function(nr){Y(""),yr(nr),xt()}},$.a.createElement(Ze.a.TabPane,{tab:"\u65B0\u589E".concat(Xt),key:"1"},$.a.createElement(p.a,{value:V,onChange:function(nr){return Y(nr.target.value)},className:$e.a.in,placeholder:"\u8F93\u5165".concat(Xt,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20}),$.a.createElement("div",{className:$e.a.btns},$.a.createElement(b.a,{onClick:Lt,className:"mr20"},"\u53D6\u6D88"," "),$.a.createElement(b.a,{loading:pt,onClick:tt,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),$.a.createElement(Ze.a.TabPane,{tab:"\u5DF2\u6709".concat(Xt),key:"2"},$.a.createElement(p.a.Search,{allowClear:!0,onSearch:Ft,value:V,onChange:function(nr){return Y(nr.target.value)},className:$e.a.in,placeholder:"\u8F93\u5165".concat(Xt,"\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2")}),$.a.createElement(y.a,{dataSource:oe,bordered:!1,loading:Jt,scroll:oe.length>7?{y:300}:{},style:{padding:"0 40px 20px 40px"},columns:[{title:"".concat(Xt,"\u540D\u79F0"),dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:function(nr,ur){return $.a.createElement("span",null,$.a.createElement("span",{onClick:function(){return Ot(ur)},className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),$.a.createElement("span",{onClick:function(){return ut(ur)},className:"current c-grey-666"},"\u5220\u9664"))}}],pagination:!1})))))},qe=Je,ot=L("m3rI"),at=L("B7Ph"),rt=L("wd/R"),dt=L.n(rt),nt=L("1vsH"),mt=L("9Bee"),yt=L("xKgJ"),ft=p.a.TextArea,ht=C.a.confirm,Rt=g.a.Panel,Wt={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0},wt;(function(ct){ct[ct.SET_INITAL_DATA=0]="SET_INITAL_DATA",ct[ct.SET_LOADING=1]="SET_LOADING",ct[ct.SET_STATUS=2]="SET_STATUS"})(wt||(wt={}));var lt="#### \u9898\u76EE\u63CF\u8FF0\n\u73B0\u6709\u4E00\u4E2A\u6574\u578B\u6570\u7EC4 `nums`\uFF0C\u8BF7\u7F16\u5199\u7A0B\u5E8F\u5C06\u6570\u7EC4 `nums` \u4E2D\u7684\u6240\u6709 `$$0$$` \u79FB\u52A8\u5230\u6570\u7EC4\u7684\u672B\u5C3E\uFF0C\u4F46\u4E0D\u6539\u53D8\u975E\u96F6\u5143\u7D20\u5728\u6570\u7EC4\u4E2D\u7684\u76F8\u5BF9\u4F4D\u7F6E\u3002\u8BF7\u5728\u539F\u6570\u7EC4 `nums` \u4E0A\u8FDB\u884C\u64CD\u4F5C\u3002\n#### \u8F93\u5165\u8F93\u51FA\u683C\u5F0F\n**\u8F93\u5165\u683C\u5F0F**\n\u7B2C\u4E00\u884C\u6709\u4E00\u4E2A\u6574\u6570 `numsSize`\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u5927\u5C0F\uFF1B\n\u7B2C\u4E8C\u884C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n**\u8F93\u51FA\u683C\u5F0F**\n\u4E00\u884C\u8F93\u51FA\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B1\n**\u8F93\u5165**\n`4`\n`0 1 2 3`\n**\u8F93\u51FA**\n`1 2 3 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B2\n**\u8F93\u5165**\n`5`\n`1 1 0 1 0`\n**\u8F93\u51FA**\n`1 1 1 0 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8BF4\u660E\u63D0\u793A\n-`1\u2264n\u2264100`";function _t(ct,bt){switch(bt.type){case wt.SET_INITAL_DATA:return Object(u.a)(Object(u.a)({},ct),bt.payload);case wt.SET_LOADING:return Object(u.a)(Object(u.a)({},ct),{},{loading:bt.payload});case wt.SET_STATUS:return Object(u.a)(Object(u.a)({},ct),{},{status:bt.payload});default:throw new Error}}var jt=ee.default=function(){var ct,bt,gt,Ut=Object(fe.h)(),Lt=Object(fe.g)(),It=Object(fe.i)(),St=It.id,Jt=P.a.useForm(),kt=Object(I.a)(Jt,1),zt=kt[0],st=Object(q.useState)(),pt=Object(I.a)(st,2),Ct=pt[0],Dt=pt[1],Tt=Object(q.useState)(!1),tr=Object(I.a)(Tt,2),yr=tr[0],Kt=tr[1],ue=Object(q.useState)([]),V=Object(I.a)(ue,2),Y=V[0],ie=V[1],Ee=Object(q.useState)([]),oe=Object(I.a)(Ee,2),Fe=oe[0],tt=oe[1],xt=Object(q.useState)([]),Ot=Object(I.a)(xt,2),ut=Ot[0],Ft=Ot[1],Xt=Object(q.useState)([]),er=Object(I.a)(Xt,2),nr=er[0],ur=er[1],fr=Object(q.useState)([]),Pt=Object(I.a)(fr,2),sr=Pt[0],lr=Pt[1],br=Object(q.useState)("C"),$t=Object(I.a)(br,2),$r=$t[0],jr=$t[1],Kn=Object(q.useReducer)(_t,Wt),Xr=Object(I.a)(Kn,2),pn=Xr[0],rn=Xr[1],Nn=pn.loading,Cr=pn.data,nn=pn.user,Tn=pn.status,an=Cr==null?void 0:Cr.hack_sets,Pr=Cr==null||((ct=Cr.hack)===null||ct===void 0)?void 0:ct.test_set_average,cr=Object(q.useState)(!1),Nr=Object(I.a)(cr,2),mr=Nr[0],zr=Nr[1],Or=Object(q.useRef)([]),Vr=Object(q.useState)(!1),Wr=Object(I.a)(Vr,2),vn=Wr[0],Dn=Wr[1],hr=Object(q.useState)(!1),rr=Object(I.a)(hr,2),Ar=rr[0],Dr=rr[1],Jr=Object(q.useRef)(!0),Qr=Object(q.useState)({}),cn=Object(I.a)(Qr,2),kr=cn[0],Yt=cn[1];Object(q.useEffect)(function(){return Object(Ce.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(Ce.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(Ce.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(Ce.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}},[]),Object(q.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)});var ir=function(){var ar=Object(D.a)(z.a.mark(function Bt(){var dr,pr;return z.a.wrap(function(_r){for(;;)switch(_r.prev=_r.next){case 0:return _r.next=2,Object(pe.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}});case 2:return dr=_r.sent,_r.next=5,Object(pe.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});case 5:pr=_r.sent,tt(dr.tag_disciplines||[]),Ft(pr.tag_disciplines||[]);case 8:case"end":return _r.stop()}},Bt)}));return function(){return ar.apply(this,arguments)}}(),Zt=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}],Er=Object(q.useCallback)(Object(D.a)(z.a.mark(function ar(){var Bt,dr,pr,Lr,_r,Hr,Ur,On,en,sn,ln,Gn,Sn,Ln,mn,An,$n,Jn,Mn,ai,vr,Qt,Tr,Kr,ci,zn,_i;return z.a.wrap(function(jn){for(;;)switch(jn.prev=jn.next){case 0:if(rn({type:wt.SET_LOADING,payload:!0}),!St){jn.next=19;break}return jn.next=4,Te(St);case 4:Bt=jn.sent,dr=Bt.user,pr=Bt.language,Lr=Bt.practice_sets,_r=Bt.practice_codes,Hr=Bt.description,Ur=Bt.difficulty,On=Bt.name,en=Bt.open_or_not,sn=Bt.time_limit,ln=Bt.test_set_average,Gn=Bt.test_set_score,Sn=Bt.status,Ln=Bt.tag_discipline_ids,mn=Bt.source_discipline_ids,An=Bt.item_banks_group_id,$n=Bt.is_file,Jn=$n===void 0?!1:$n,Mn=Bt.hide_actual_output,ai=Bt.review_privilege,vr=Bt.review_description,Qt={review_privilege:ai,status:Sn,review_description:vr,name:On},Yt(Qt),zr(Mn),Tr=Jn?[{input:"",output:"",score:100,position:1}]:Lr,Jn?(ie(Lr),zt.setFieldsValue({hack_sets:Tr})):ie([]),Kr={loading:!0,user:dr,status:Sn,data:{hack:{difficulty:Ur,name:On,description:Hr,open_or_not:en,time_limit:sn,test_set_average:ln,test_set_score:Gn,tag_discipline_ids:Ln,source_discipline_ids:mn,is_file:Jn},hack_sets:Tr}},rn({type:wt.SET_INITAL_DATA,payload:Kr}),Dt({hack:{difficulty:Ur,name:On,description:Hr,open_or_not:en,time_limit:sn,test_set_average:ln,test_set_score:Gn,tag_discipline_ids:Ln,source_discipline_ids:mn,is_file:Jn}}),ci=_r==null?void 0:_r.map(function(ei){return Object(u.a)(Object(u.a)({},ei),{},{code:ae.Base64.decode(ei==null?void 0:ei.code)})}),lr(ci),Or.current=ci,jn.next=27;break;case 19:return jn.next=21,ye();case 21:zn=jn.sent,_i=zn.user,rn({type:wt.SET_INITAL_DATA,payload:{loading:!0,status:0,user:_i,data:{hack:{difficulty:"",time_limit:3,description:lt,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),Dt({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),lr(Zt),Or.current=Zt;case 27:rn({type:wt.SET_LOADING,payload:!1});case 28:case"end":return jn.stop()}},ar)})),[St]);Object(q.useEffect)(function(){try{Er(),ir()}catch(ar){console.log(ar,"----")}},[]);function gr(ar,Bt){return Rr.apply(this,arguments)}function Rr(){return Rr=Object(D.a)(z.a.mark(function ar(Bt,dr){var pr,Lr,_r,Hr,Ur,On,en,sn,ln,Gn,Sn,Ln,mn,An,$n,Jn,Mn,ai;return z.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:Lr=Object(u.a)({},Bt),_r=Lr.hack_sets,Hr=Lr.hack,Hr.hide_actual_output=mr,Ur=[],On=[],en=0,sn=Hr!=null&&Hr.is_file?Y.map(function(Tr,Kr){return Object(u.a)(Object(u.a)({},Tr),{},{position:Kr+1})}):_r.map(function(Tr){return Object(u.a)(Object(u.a)({},Tr),{},{is_file:!1})}),ln=Object(o.a)(sn);try{for(ln.s();!(Gn=ln.n()).done;)Sn=Gn.value,en+=Sn.score,Sn.id&&Sn.id>=0?Ur.push(Sn):On.push(Sn)}catch(Tr){ln.e(Tr)}finally{ln.f()}if(sn!=null&&sn.length){Qt.next=11;break}return w.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),Qt.abrupt("return");case 11:if(!(en!==100&&!Hr.test_set_score)){Qt.next=14;break}return w.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),Qt.abrupt("return");case 14:if(!(sn!=null&&sn.some(function(Tr){return!Tr.output}))){Qt.next=17;break}return w.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),Qt.abrupt("return");case 17:if(Jr.current?Dn(!0):Dr(!0),mn=sr==null?void 0:sr.map(function(Tr){return Object(u.a)(Object(u.a)({},Tr),{},{code:ae.Base64.encode(Tr==null?void 0:Tr.code)})}),!St){Qt.next=25;break}return Qt.next=22,Pe(St,{practice:Hr,practice_codes:mn,practice_sets:On,update_practice_sets:Ur});case 22:Ln=Qt.sent,Qt.next=28;break;case 25:return Qt.next=27,le({practice:Hr,practice_codes:mn,practice_sets:sn,publish:!Jr.current});case 27:Ln=Qt.sent;case 28:if(Dn(!1),Dr(!1),!(((pr=Ln)===null||pr===void 0?void 0:pr.status)===0)){Qt.next=46;break}if(!((An=Ln)!==null&&An!==void 0&&($n=An.similar_practice)!==null&&$n!==void 0&&$n.length)){Qt.next=35;break}return Kt(!0),ur((Jn=Ln)===null||Jn===void 0?void 0:Jn.similar_practice),Qt.abrupt("return");case 35:if(!St){Qt.next=44;break}if(w.b.success("\u4FDD\u5B58\u6210\u529F"),Jr.current){Qt.next=42;break}return Qt.next=40,Object(pe.a)("/api/practices/".concat(St,"/start"),{method:"get"});case 40:Mn=Qt.sent,(Mn==null?void 0:Mn.status)===0&&Lt.push("/problems/".concat(Mn==null?void 0:Mn.identifier,"/oj/").concat(St));case 42:Qt.next=46;break;case 44:w.b.success("\u65B0\u5EFA\u6210\u529F"),Lt.replace("/problems/".concat((ai=Ln)===null||ai===void 0?void 0:ai.identifier,"/ojedit"));case 46:case"end":return Qt.stop()}},ar)})),Rr.apply(this,arguments)}function xr(){Lt.replace("/problems")}var Br=function(Bt){var dr=Math.floor(100/Bt.length),pr=dr+100%Bt.length;Bt=Bt.map(function(Lr,_r){return _r===Bt.length-1?Object(u.a)(Object(u.a)({},Lr),{},{score:pr}):Object(u.a)(Object(u.a)({},Lr),{},{score:dr})}),ie(Bt)};function dn(ar){ar.target.value||Br(Y),rn({type:wt.SET_INITAL_DATA,payload:{data:Object(u.a)(Object(u.a)({},Cr),{},{hack:Object(u.a)(Object(u.a)({},Cr.hack),{},{test_set_score:ar.target.value})})}})}function wr(ar){rn({type:wt.SET_INITAL_DATA,payload:{data:Object(u.a)(Object(u.a)({},Cr),{},{hack:Object(u.a)(Object(u.a)({},Cr.hack),{},{is_file:ar.target.value})})}})}function Yn(ar){zr(ar.target.checked)}function Ir(ar){var Bt=ar.target.value;Bt&&Br(Y),rn({type:wt.SET_INITAL_DATA,payload:{data:Object(u.a)(Object(u.a)({},Cr),{},{hack:Object(u.a)(Object(u.a)({},Cr.hack),{},{test_set_average:Bt})})}})}function yn(){var ar=zt.getFieldValue("hack_sets"),Bt=ar.length+1,dr=Math.floor(100/Bt),pr=100%Bt;ar.map(function(Lr,_r){return Pr&&(Lr.score=dr),Lr.position=_r+1,Lr}),ar.push({input:"",output:"",position:Bt,score:Pr?dr+pr:0}),zt.setFieldsValue({hack_sets:ar}),rn({type:wt.SET_INITAL_DATA,payload:{data:Object(u.a)(Object(u.a)({},Cr),{},{hack_sets:ar})}})}Object(q.useEffect)(function(){if(Pr){var ar=an==null?void 0:an.length,Bt=Math.floor(100/ar),dr=100%ar;an==null||an.map(function(pr,Lr){return pr.score=Bt,pr.position=Lr+1,Lr===ar-1&&(pr.score=Bt+dr),pr}),rn({type:wt.SET_INITAL_DATA,payload:{data:Object(u.a)(Object(u.a)({},Cr),{},{hack_sets:an})}}),zt.setFieldsValue({hack_sets:an})}},[Pr]);function on(ar){var Bt=zt.getFieldValue("hack_sets"),dr=(Bt==null?void 0:Bt.length)-1,pr=Math.ceil(100/dr),Lr=100%dr;Bt.splice(ar,1),Bt==null||Bt.map(function(_r,Hr){return Pr&&(_r.score=pr,Hr===dr-1&&(_r.score=pr+Lr)),_r.position=Hr+1,_r}),rn({type:wt.SET_INITAL_DATA,payload:{data:Object(u.a)(Object(u.a)({},Cr),{},{hack_sets:Bt})}}),zt.setFieldsValue({hack_sets:Bt})}function bn(ar){jr(ar)}var ii=function(Bt){var dr,pr=(dr=Or.current)===null||dr===void 0?void 0:dr.findIndex(function(Lr){return Lr.language===$r});Or.current[pr].code=Bt,lr(Or.current)},Ii=function(Bt){Dt(Object(u.a)({},zt.getFieldsValue()))},si=function(){var ar=Object(D.a)(z.a.mark(function Bt(dr){var pr;return z.a.wrap(function(_r){for(;;)switch(_r.prev=_r.next){case 0:return _r.next=2,Object(pe.a)("/api/practices/".concat(dr,"/start"),{method:"get"});case 2:pr=_r.sent,(pr==null?void 0:pr.status)===0&&Object(nt.T)("/problems/".concat(pr==null?void 0:pr.identifier,"/oj/").concat(dr));case 4:case"end":return _r.stop()}},Bt)}));return function(dr){return ar.apply(this,arguments)}}(),Zr=function(){var ar=Object(D.a)(z.a.mark(function Bt(){var dr,pr,Lr,_r,Hr,Ur;return z.a.wrap(function(en){for(;;)switch(en.prev=en.next){case 0:return en.next=2,Te(St);case 2:dr=en.sent,pr=dr.name,Lr=dr.status,_r=dr.review_privilege,Hr=dr.review_description,Ur={review_privilege:_r,status:Lr,review_description:Hr,name:pr},Yt(Ur);case 6:case"end":return en.stop()}},Bt)}));return function(){return ar.apply(this,arguments)}}(),Yi=function(){var Bt="";C.a.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:$.a.createElement("div",{className:"mt20"},$.a.createElement(Z.a,{className:ce.a.MdEditor,defaultValue:Bt,onChange:function(pr){Bt=pr}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var dr=Object(D.a)(z.a.mark(function Lr(){var _r;return z.a.wrap(function(Ur){for(;;)switch(Ur.prev=Ur.next){case 0:if(Bt){Ur.next=3;break}return w.b.warn("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),Ur.abrupt("return",Promise.reject());case 3:return Ur.next=5,Object(pe.a)("/api/practices/".concat(St,"/review.json"),{method:"post",body:{op:"fail",description:Bt}});case 5:_r=Ur.sent,(_r==null?void 0:_r.status)===0&&(w.b.success("\u63D0\u4EA4\u6210\u529F"),Zr());case 7:case"end":return Ur.stop()}},Lr)}));function pr(){return dr.apply(this,arguments)}return pr}()})},bi=function(){var ar=Object(D.a)(z.a.mark(function Bt(){return z.a.wrap(function(pr){for(;;)switch(pr.prev=pr.next){case 0:C.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u63D0\u793A",content:"\u786E\u8BA4\u5C06\u9898\u76EE\u300A".concat(kr==null?void 0:kr.name,"\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Lr=Object(D.a)(z.a.mark(function Hr(){var Ur;return z.a.wrap(function(en){for(;;)switch(en.prev=en.next){case 0:return en.next=2,Object(pe.a)("/api/practices/".concat(St,"/review.json"),{method:"post",body:{op:"pass"}});case 2:Ur=en.sent,(Ur==null?void 0:Ur.status)===0&&(w.b.success("\u63D0\u4EA4\u6210\u529F"),Zr());case 4:case"end":return en.stop()}},Hr)}));function _r(){return Lr.apply(this,arguments)}return _r}()});case 1:case"end":return pr.stop()}},Bt)}));return function(){return ar.apply(this,arguments)}}(),qn=function(){var Bt=C.a.confirm({icon:null,width:700,className:"".concat(ce.a.cusModal," custom-modal-divider"),centered:!0,title:$.a.createElement(d.a,null,$.a.createElement(R.a,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),$.a.createElement(R.a,null,$.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return Bt.destroy()}}))),content:$.a.createElement("div",null,$.a.createElement(mt.a,{className:"mt20",value:(kr==null?void 0:kr.review_description)||""}))})};return $.a.createElement(v.a,{spinning:Nn,size:"large",className:ce.a["oj-custom-large-spin"]},Cr?$.a.createElement(q.Fragment,null,$.a.createElement("header",{className:ce.a.header},$.a.createElement("div",null,$.a.createElement("img",{src:"".concat(ot.a.IMG_SERVER,"/images/").concat(nn==null?void 0:nn.image_url),alt:"user",width:30}),$.a.createElement("span",null,nn==null?void 0:nn.name)),$.a.createElement("h2",null," ",Cr==null||((bt=Cr.hack)===null||bt===void 0)?void 0:bt.name," "),St?$.a.createElement("a",{className:ce.a.btn_back,onClick:xr}," ",$.a.createElement(Q.a,null),"\u9000\u51FA"):null),$.a.createElement(P.a,{form:zt,initialValues:Cr,layout:"vertical",className:ce.a["oj-form-container"],onValuesChange:Ii,onFinish:gr},$.a.createElement(Ue.a,{hideResize:!0,className:ce.a["oj-problems"],leftChild:$.a.createElement(Ht,{formValue:Ct,onRemoveTestCase:on,onAddTestCase:yn,hack:Cr.hack,onChangeScore:dn,onChangehide:Yn,onChangeAverage:Ir,onChangeFile:wr,uploadData:Y,setUploadData:ie,handleUploadRatio:Br,ischecked:mr,pointData:Fe,sourceData:ut,getPointData:ir,id:St}),rightChild:$.a.createElement(ke,{value:sr==null||((gt=sr.find(function(ar){return ar.language===$r}))===null||gt===void 0)?void 0:gt.code,onChange:ii,onLanguage:bn,languageItems:sr,language:$r})}),$.a.createElement("div",{className:ce.a.footer},!!St&&$.a.createElement("div",{className:ce.a.result},$.a.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),kr!=null&&kr.review_privilege?$.a.createElement($.a.Fragment,null,$.a.createElement("div",{onClick:bi,className:ce.a.pass},"\u901A\u8FC7"),$.a.createElement("div",{onClick:Yi,className:ce.a.noPass},"\u4E0D\u901A\u8FC7")):$.a.createElement($.a.Fragment,null,(kr==null?void 0:kr.status)===0&&$.a.createElement("div",{className:ce.a.passText},$.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(kr==null?void 0:kr.status)===1&&$.a.createElement("div",{className:ce.a.passText},$.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(kr==null?void 0:kr.status)===2&&$.a.createElement("div",{className:ce.a.passText},$.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(kr==null?void 0:kr.status)===3&&$.a.createElement("div",{className:ce.a.passText},$.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(kr==null?void 0:kr.status)===4&&$.a.createElement("div",{className:ce.a.passText},$.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(kr==null?void 0:kr.status)===5&&$.a.createElement("div",{className:ce.a.noPassText},$.a.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",$.a.createElement("span",{onClick:qn},"\u67E5\u770B\u539F\u56E0")))),$.a.createElement(b.a,{type:"primary",ghost:!0,onClick:xr},"\u9000\u51FA\u7F16\u8F91"),$.a.createElement(b.a,{disabled:Ar,loading:vn,type:"primary",onClick:function(){Jr.current=!0,zt.submit()}},"\u4FDD\u5B58"," "),St?$.a.createElement(b.a,{disabled:vn,loading:Ar,style:{background:"#2FC25B",border:0},type:"primary",onClick:function(){Jr.current=!1,zt.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):$.a.createElement(b.a,{disabled:vn,loading:Ar,type:"primary",onClick:function(){Jr.current=!1,zt.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,$.a.createElement(C.a,{centered:!0,destroyOnClose:!0,footer:null,visible:yr,onCancel:function(){return Kt(!1)},title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},$.a.createElement("div",null,$.a.createElement("p",{className:"font14"},"\u7ECF\u7CFB\u7EDF\u68C0\u6D4B\u53D1\u73B0\uFF0C\u672C\u9898\u76EE\u4E0E\u7CFB\u7EDF\u4E2D\u5DF2\u521B\u5EFA\u7684\u9898\u76EE\u9AD8\u5EA6\u96F7\u540C\uFF0C\u8BF7\u8C03\u6574\u9898\u76EE\u540E\u518D\u8FDB\u884C\u4FDD\u5B58"),$.a.createElement(y.a,{dataSource:nr,bordered:!1,scroll:nr.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:function(Bt,dr){return $.a.createElement("span",{onClick:function(){return si(dr==null?void 0:dr.identifier)},style:{textDecorationLine:"underline"},className:"current c-light-primary"},Bt)}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:function(Bt){var dr;return(dr=dt()(Bt))===null||dr===void 0?void 0:dr.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function Ht(ct){var bt,gt,Ut=ct.ischecked,Lt=ct.formValue,It=ct.hack,St=ct.onChangeAverage,Jt=ct.onChangeScore,kt=ct.onChangehide,zt=ct.onChangeFile,st=ct.onAddTestCase,pt=ct.onRemoveTestCase,Ct=ct.uploadData,Dt=ct.setUploadData,Tt=ct.handleUploadRatio,tr=ct.pointData,yr=ct.sourceData,Kt=ct.getPointData,ue=ct.id,V=It.test_set_average,Y=It.test_set_score,ie=Object(q.useState)(!1),Ee=Object(I.a)(ie,2),oe=Ee[0],Fe=Ee[1],tt=Object(q.useState)(!1),xt=Object(I.a)(tt,2),Ot=xt[0],ut=xt[1],Ft=function(sr,lr){var br=Object(n.a)(Ct);br.splice(lr,1),V?Tt(br):Dt(br)},Xt=function(sr,lr){console.log(sr,lr);var br=Ct.map(function($t,$r){return $r===lr?Object(u.a)(Object(u.a)({},$t),{},{score:sr.target.value?Number(sr.target.value):0}):$t});Dt(br)},er=function(sr){var lr=Ct.concat(sr);It.test_set_average?Tt(lr):Dt(lr)};function nr(Pt){Pt.stopPropagation()}function ur(){if(Object(yt.v)()){ut("practice");return}var Pt="";C.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:$.a.createElement("div",null,$.a.createElement(p.a,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(lr){Pt=lr.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var sr=Object(D.a)(z.a.mark(function br(){var $t;return z.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:return jr.next=2,Object(pe.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:Pt}});case 2:$t=jr.sent,($t==null?void 0:$t.status)===0&&Kt();case 4:case"end":return jr.stop()}},br)}));function lr(){return sr.apply(this,arguments)}return lr}()})}function fr(){if(Object(yt.v)()){ut("practice_source");return}var Pt="";C.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:$.a.createElement("div",null,$.a.createElement(p.a,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(lr){Pt=lr.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var sr=Object(D.a)(z.a.mark(function br(){var $t;return z.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:return jr.next=2,Object(pe.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:Pt}});case 2:$t=jr.sent,($t==null?void 0:$t.status)===0&&Kt();case 4:case"end":return jr.stop()}},br)}));function lr(){return sr.apply(this,arguments)}return lr}()})}return $.a.createElement("div",{className:ce.a["oj-left-panel"]},$.a.createElement("div",{className:ce.a["oj-form-info"]},$.a.createElement(P.a.Item,{label:"\u9898\u76EE\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0"}],className:ce.a.inputOne},$.a.createElement(p.a,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:$.a.createElement("span",null,(Lt==null||((bt=Lt.hack)===null||bt===void 0||((gt=bt.name)===null||gt===void 0))?void 0:gt.length)||0,"/",$.a.createElement("span",{className:"c-grey-999"},"60"))})),$.a.createElement(P.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},$.a.createElement(Z.a,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),$.a.createElement("div",{className:ce.a.row},$.a.createElement("div",{className:ce.a.a},$.a.createElement(P.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},$.a.createElement(r.a,null,_e(he.difficulty)))),$.a.createElement("div",{className:ce.a.b},$.a.createElement(P.a.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},$.a.createElement(r.a,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(sr){return sr.parentNode}},yr.map(function(Pt){return $.a.createElement(r.a.Option,{key:Pt.id,value:Pt.id},Pt.name)}))),$.a.createElement(b.a,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:function(){return fr()}},Object(yt.v)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),$.a.createElement("div",{className:ce.a.row},$.a.createElement("div",{className:ce.a.b,style:{width:"100%",marginLeft:0}},$.a.createElement(P.a.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},$.a.createElement(r.a,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(sr){return sr.parentNode}},tr.map(function(Pt){return $.a.createElement(r.a.Option,{key:Pt.id,value:Pt.id},Pt.name)}))),$.a.createElement(b.a,{type:"primary",ghost:!0,onClick:function(){return ur()}},Object(yt.v)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),$.a.createElement("div",{className:ce.a.field},$.a.createElement(P.a.Item,{label:"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236",name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],className:ce.a.inputTwo,extra:$.a.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",$.a.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},$.a.createElement(l.a,{style:{width:185},min:3}))),$.a.createElement("div",{className:"tst-case-info"},$.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!It.is_file&&$.a.createElement(b.a,{style:{height:40},type:"primary",ghost:!0,onClick:st},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),$.a.createElement(P.a.Item,{name:["hack","test_set_score"]},$.a.createElement(e.a.Group,{onChange:Jt},$.a.createElement(e.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",$.a.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u4EC5\u5F53\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u83B7\u5F97\u4E00\u6B21\u6027\u5956\u52B1\uFF09")),$.a.createElement(e.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",$.a.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u901A\u8FC7\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5BF9\u5E94\u5956\u52B1\uFF09")))),$.a.createElement(i.a,{style:{marginBottom:"5px"},checked:Ut,onChange:kt},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u505A\u9898\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),$.a.createElement(P.a.Item,{className:ce.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},$.a.createElement(e.a.Group,{onChange:zt},$.a.createElement(K.b,{direction:"horizontal"},$.a.createElement(e.a,{value:!1},"\u6587\u672C"),$.a.createElement(e.a,{value:!0},"\u6587\u4EF6")))),!It.test_set_score&&$.a.createElement(P.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},$.a.createElement(e.a.Group,{onChange:St},$.a.createElement(e.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),$.a.createElement(e.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),It.is_file&&$.a.createElement("div",{className:ce.a.upBtn},$.a.createElement(b.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return Fe(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),$.a.createElement(at.a,{disabled:It==null?void 0:It.test_set_average,inputChange:Xt,showScore:!It.test_set_score,data:Ct,onRemove:Ft})),!It.is_file&&$.a.createElement(P.a.List,{name:"hack_sets"},function(Pt,sr){return Object(G.a)(sr),$.a.createElement(g.a,{accordion:!0},Pt.map(function(lr,br){return $.a.createElement(Rt,{key:"".concat(lr.key,"--").concat(br),header:$.a.createElement("a",{className:ce.a["test-case-name"]},$.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",br+1),Y?null:$.a.createElement($.a.Fragment,null,$.a.createElement(P.a.Item,{name:[lr.name,"score"],fieldKey:[lr.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(br+1,"\u8BC4\u5206")}]},$.a.createElement(l.a,{onClick:nr,min:0,max:100,disabled:V})),$.a.createElement("span",null,"%"))),extra:br>0?$.a.createElement("div",{onClick:nr},$.a.createElement(M.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(br+1),onConfirm:function(){pt(br)}},$.a.createElement(J.a,{className:ce.a["btn-remove-case"]}))):null},$.a.createElement(P.a.Item,{label:"\u8F93\u5165",name:[lr.name,"input"],fieldKey:[lr.fieldKey,"input"]},$.a.createElement(ft,null)),$.a.createElement(P.a.Item,{label:"\u8F93\u51FA",name:[lr.name,"output"],fieldKey:[lr.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},$.a.createElement(ft,null)))}))}))),$.a.createElement(at.b,{rootIdentifier:ue,visible:oe,onClose:function(){return Fe(!1)},onOK:er}),$.a.createElement(qe,{visible:Ot,onCancel:function(){ut(!1),Kt()},onOK:function(){ut(!1),Kt()}}))}},rd1n:function(W,ee,L){"use strict";var B=L("XjgL"),M=L("36hc"),G=L("fNpE"),X=L("T/Jt"),K=L.n(X),N=L("27eb"),i=L.n(N),T=L("8wWb"),e=L("sg8A"),E=X.forwardRef(function(l,_){var r,n=l.prefixCls,o=n===void 0?"rc-switch":n,c=l.className,v=l.checked,f=l.defaultChecked,y=l.disabled,h=l.loadingIcon,b=l.checkedChildren,m=l.unCheckedChildren,d=l.onClick,x=l.onChange,R=l.onKeyDown,O=Object(G.a)(l,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),w=Object(T.a)(!1,{value:v,defaultValue:f}),D=Object(M.a)(w,2),A=D[0],P=D[1];function I(a,C){var S=A;return y||(S=a,P(S),x==null||x(S,C)),S}function u(a){a.which===e.a.LEFT?I(!1,a):a.which===e.a.RIGHT&&I(!0,a),R==null||R(a)}function k(a){var C=I(!A,a);d==null||d(C,a)}var g=i()(o,c,(r={},Object(B.a)(r,"".concat(o,"-checked"),A),Object(B.a)(r,"".concat(o,"-disabled"),y),r));return X.createElement("button",Object.assign({},O,{type:"button",role:"switch","aria-checked":A,disabled:y,className:g,ref:_,onKeyDown:u,onClick:k}),h,X.createElement("span",{className:"".concat(o,"-inner")},A?b:m))});E.displayName="Switch",ee.a=E},rdUC:function(W,ee,L){var B=L("MFOe"),M=B.Global;W.exports={name:"localStorage",read:X,write:K,each:N,remove:i,clearAll:T};function G(){return M.localStorage}function X(e){return G().getItem(e)}function K(e,E){return G().setItem(e,E)}function N(e){for(var E=G().length-1;E>=0;E--){var l=G().key(E);e(X(l),l)}}function i(e){return G().removeItem(e)}function T(){return G().clear()}},rePB:function(W,ee,L){"use strict";L.d(ee,"a",function(){return M});var B=L("o46R");function M(G,X,K){return X=Object(B.a)(X),X in G?Object.defineProperty(G,X,{value:K,enumerable:!0,configurable:!0,writable:!0}):G[X]=K,G}},rgEC:function(W,ee,L){"use strict";L.d(ee,"f",function(){return _}),L.d(ee,"d",function(){return r}),L.d(ee,"c",function(){return o}),L.d(ee,"e",function(){return c}),L.d(ee,"a",function(){return f}),L.d(ee,"g",function(){return y}),L.d(ee,"b",function(){return h});var B=L("kxoy"),M=L("aVTQ"),G=L("6ASS"),X=L("fNpE"),K=L("qoVz"),N=L("N7A4"),i=L("B/uU"),T=L("El5i"),e=["children"];function E(b,m){return"".concat(b,"-").concat(m)}function l(b){return b&&b.type&&b.type.isTreeNode}function _(b,m){return b!=null?b:m}function r(b){var m=b||{},d=m.title,x=m._title,R=m.key,O=m.children,w=d||"title";return{title:w,_title:x||[w],key:R||"key",children:O||"children"}}function n(b,m){var d=new Map;function x(R){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(R||[]).forEach(function(w){var D=w[m.key],A=w[m.children];Object(i.a)(D!=null,"Tree node must have a certain key: [".concat(O).concat(D,"]"));var P=String(D);Object(i.a)(!d.has(P)||D===null||D===void 0,"Same 'key' exist in the Tree: ".concat(P)),d.set(P,!0),x(A,"".concat(O).concat(P," > "))})}x(b)}function o(b){function m(d){var x=Object(K.a)(d);return x.map(function(R){if(!l(R))return Object(i.a)(!R,"Tree/TreeNode can only accept TreeNode as children."),null;var O=R.key,w=R.props,D=w.children,A=Object(X.a)(w,e),P=Object(G.a)({key:O},A),I=m(D);return I.length&&(P.children=I),P}).filter(function(R){return R})}return m(b)}function c(b,m,d){var x=r(d),R=x._title,O=x.key,w=x.children,D=new Set(m===!0?[]:m),A=[];function P(I){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return I.map(function(k,g){for(var a=E(u?u.pos:"0",g),C=_(k[O],a),S,p=0;p<R.length;p+=1){var U=R[p];if(k[U]!==void 0){S=k[U];break}}var z=Object(G.a)(Object(G.a)({},Object(N.a)(k,[].concat(Object(M.a)(R),[O,w]))),{},{title:S,key:C,parent:u,pos:a,children:null,data:k,isStart:[].concat(Object(M.a)(u?u.isStart:[]),[g===0]),isEnd:[].concat(Object(M.a)(u?u.isEnd:[]),[g===I.length-1])});return A.push(z),m===!0||D.has(C)?z.children=P(k[w]||[],z):z.children=[],z})}return P(b),A}function v(b,m,d){var x={};Object(B.a)(d)==="object"?x=d:x={externalGetKey:d},x=x||{};var R=x,O=R.childrenPropName,w=R.externalGetKey,D=R.fieldNames,A=r(D),P=A.key,I=A.children,u=O||I,k;w?typeof w=="string"?k=function(C){return C[w]}:typeof w=="function"&&(k=function(C){return w(C)}):k=function(C,S){return _(C[P],S)};function g(a,C,S,p){var U=a?a[u]:b,z=a?E(S.pos,C):"0",q=a?[].concat(Object(M.a)(p),[a]):[];if(a){var $=k(a,z),re={node:a,index:C,pos:z,key:$,parentPos:S.node?S.pos:null,level:S.level+1,nodes:q};m(re)}U&&U.forEach(function(ce,ne){g(ce,ne,{node:a,pos:z,level:S?S.level+1:-1},q)})}g(null)}function f(b){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=m.initWrapper,x=m.processEntity,R=m.onProcessFinished,O=m.externalGetKey,w=m.childrenPropName,D=m.fieldNames,A=arguments.length>2?arguments[2]:void 0,P=O||A,I={},u={},k={posEntities:I,keyEntities:u};return d&&(k=d(k)||k),v(b,function(g){var a=g.node,C=g.index,S=g.pos,p=g.key,U=g.parentPos,z=g.level,q=g.nodes,$={node:a,nodes:q,index:C,key:p,pos:S,level:z},re=_(p,S);I[S]=$,u[re]=$,$.parent=I[U],$.parent&&($.parent.children=$.parent.children||[],$.parent.children.push($)),x&&x($,k)},{externalGetKey:P,childrenPropName:w,fieldNames:D}),R&&R(k),k}function y(b,m){var d=m.expandedKeys,x=m.selectedKeys,R=m.loadedKeys,O=m.loadingKeys,w=m.checkedKeys,D=m.halfCheckedKeys,A=m.dragOverNodeKey,P=m.dropPosition,I=m.keyEntities,u=Object(T.a)(I,b),k={eventKey:b,expanded:d.indexOf(b)!==-1,selected:x.indexOf(b)!==-1,loaded:R.indexOf(b)!==-1,loading:O.indexOf(b)!==-1,checked:w.indexOf(b)!==-1,halfChecked:D.indexOf(b)!==-1,pos:String(u?u.pos:""),dragOver:A===b&&P===0,dragOverGapTop:A===b&&P===-1,dragOverGapBottom:A===b&&P===1};return k}function h(b){var m=b.data,d=b.expanded,x=b.selected,R=b.checked,O=b.loaded,w=b.loading,D=b.halfChecked,A=b.dragOver,P=b.dragOverGapTop,I=b.dragOverGapBottom,u=b.pos,k=b.active,g=b.eventKey,a=Object(G.a)(Object(G.a)({},m),{},{expanded:d,selected:x,checked:R,loaded:O,loading:w,halfChecked:D,dragOver:A,dragOverGapTop:P,dragOverGapBottom:I,pos:u,active:k,key:g});return"props"in a||Object.defineProperty(a,"props",{get:function(){return Object(i.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),b}}),a}},"sh+1":function(W,ee,L){"use strict";L.d(ee,"a",function(){return M});var B=L("a247");function M(G,X){var K;if(typeof Symbol=="undefined"||G[Symbol.iterator]==null){if(Array.isArray(G)||(K=Object(B.a)(G))||X&&G&&typeof G.length=="number"){K&&(G=K);var N=0,i=function(){};return{s:i,n:function(){return N>=G.length?{done:!0}:{done:!1,value:G[N++]}},e:function(_){throw _},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var T=!0,e=!1,E;return{s:function(){K=G[Symbol.iterator]()},n:function(){var _=K.next();return T=_.done,_},e:function(_){e=!0,E=_},f:function(){try{!T&&K.return!=null&&K.return()}finally{if(e)throw E}}}}},t9D7:function(W,ee,L){"use strict";L.d(ee,"b",function(){return i}),L.d(ee,"g",function(){return e}),L.d(ee,"d",function(){return E}),L.d(ee,"e",function(){return l}),L.d(ee,"a",function(){return _}),L.d(ee,"f",function(){return o}),L.d(ee,"c",function(){return c});var B=L("Vhoy"),M=L("MI8n"),G=L("pmY6"),X=L("Cg/j"),K=L("ic2d"),N=L("nEHx");const i=Object(X.c)("themeService");var T;(function(v){function f(y){return y&&typeof y=="object"&&typeof y.id=="string"}v.isThemeColor=f})(T||(T={}));function e(v){return{id:v}}var E;(function(v){function f(x){return x&&typeof x=="object"&&typeof x.id=="string"&&(typeof x.color=="undefined"||T.isThemeColor(x.color))}v.isThemeIcon=f;const y=new RegExp(`^\\$\\((${B.a.iconNameExpression}(?:${B.a.iconModifierExpression})?)\\)$`);function h(x){const R=y.exec(x);if(!R)return;let[,O]=R;return{id:O}}v.fromString=h;function b(x,R){let O=x.id;const w=O.lastIndexOf("~");return w!==-1&&(O=O.substring(0,w)),R&&(O=`${O}~${R}`),{id:O}}v.modify=b;function m(x,R){var O,w;return x.id===R.id&&((O=x.color)===null||O===void 0?void 0:O.id)===((w=R.color)===null||w===void 0?void 0:w.id)}v.isEqual=m;function d(x,R){return{id:x.id,color:R?e(R):void 0}}v.asThemeIcon=d,v.asClassNameArray=B.a.asClassNameArray,v.asClassName=B.a.asClassName,v.asCSSSelector=B.a.asCSSSelector})(E||(E={}));function l(v){switch(v){case N.a.DARK:return"vs-dark";case N.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const _={ThemingContribution:"base.contributions.theming"};class r{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new M.b}onColorThemeChange(v){return this.themingParticipants.push(v),this.onThemingParticipantAddedEmitter.fire(v),Object(G.i)(()=>{const f=this.themingParticipants.indexOf(v);this.themingParticipants.splice(f,1)})}getThemingParticipants(){return this.themingParticipants}}let n=new r;K.a.add(_.ThemingContribution,n);function o(v){return n.onColorThemeChange(v)}class c extends G.a{constructor(v){super();this.themeService=v,this.theme=v.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(f=>this.onThemeChange(f)))}onThemeChange(v){this.theme=v,this.updateStyles()}updateStyles(){}}},"tty/":function(W,ee,L){"use strict";L.d(ee,"a",function(){return l}),L.d(ee,"b",function(){return r});var B=/margin|padding|width|height|max|min|offset/,M={left:!0,top:!0},G={cssFloat:1,styleFloat:1,float:1};function X(n){return n.nodeType===1?n.ownerDocument.defaultView.getComputedStyle(n,null):{}}function K(n,o,c){if(o=o.toLowerCase(),c==="auto"){if(o==="height")return n.offsetHeight;if(o==="width")return n.offsetWidth}return o in M||(M[o]=B.test(o)),M[o]?parseFloat(c)||0:c}function N(n,o){var c=arguments.length,v=X(n);return o=G[o]?"cssFloat"in n.style?"cssFloat":"styleFloat":o,c===1?v:K(n,o,v[o]||n.style[o])}function i(n,o,c){var v=arguments.length;if(o=G[o]?"cssFloat"in n.style?"cssFloat":"styleFloat":o,v===3)return typeof c=="number"&&B.test(o)&&(c="".concat(c,"px")),n.style[o]=c,c;for(var f in o)o.hasOwnProperty(f)&&i(n,f,o[f]);return X(n)}function T(n){return n===document.body?document.documentElement.clientWidth:n.offsetWidth}function e(n){return n===document.body?window.innerHeight||document.documentElement.clientHeight:n.offsetHeight}function E(){var n=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),o=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:n,height:o}}function l(){var n=document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight;return{width:n,height:o}}function _(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function r(n){var o=n.getBoundingClientRect(),c=document.documentElement;return{left:o.left+(window.pageXOffset||c.scrollLeft)-(c.clientLeft||document.body.clientLeft||0),top:o.top+(window.pageYOffset||c.scrollTop)-(c.clientTop||document.body.clientTop||0)}}},uGsb:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("MlIO"),L("1uat"))})(this,function(B){return function(){var M=B,G=M.x64,X=G.Word,K=G.WordArray,N=M.algo,i=N.SHA512,T=N.SHA384=i.extend({_doReset:function(){this._hash=new K.init([new X.init(3418070365,3238371032),new X.init(1654270250,914150663),new X.init(2438529370,812702999),new X.init(355462360,4144912697),new X.init(1731405415,4290775857),new X.init(2394180231,1750603025),new X.init(3675008525,1694076839),new X.init(1203062813,3204075428)])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=16,e}});M.SHA384=i._createHelper(T),M.HmacSHA384=i._createHmacHelper(T)}(),B.SHA384})},uGxW:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("OLod"))})(this,function(B){return B.pad.NoPadding={pad:function(){},unpad:function(){}},B.pad.NoPadding})},uQRt:function(W,ee,L){W.exports=B;function B(){return L("gaXo"),{}}},ulZh:function(W,ee,L){typeof window!="undefined"&&function(M,G){W.exports=G()}(this,()=>(()=>{var B={"./src/config.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{enableStreamingMode:()=>k,hlsDefaultConfig:()=>P,mergeConfig:()=>u});var T=i("./src/controller/abr-controller.ts"),e=i("./src/controller/audio-stream-controller.ts"),E=i("./src/controller/audio-track-controller.ts"),l=i("./src/controller/subtitle-stream-controller.ts"),_=i("./src/controller/subtitle-track-controller.ts"),r=i("./src/controller/buffer-controller.ts"),n=i("./src/controller/timeline-controller.ts"),o=i("./src/controller/cap-level-controller.ts"),c=i("./src/controller/fps-controller.ts"),v=i("./src/controller/eme-controller.ts"),f=i("./src/controller/cmcd-controller.ts"),y=i("./src/utils/xhr-loader.ts"),h=i("./src/utils/fetch-loader.ts"),b=i("./src/utils/cues.ts"),m=i("./src/utils/mediakeys-helper.ts"),d=i("./src/utils/logger.ts");function x(){return x=Object.assign?Object.assign.bind():function(g){for(var a=1;a<arguments.length;a++){var C=arguments[a];for(var S in C)Object.prototype.hasOwnProperty.call(C,S)&&(g[S]=C[S])}return g},x.apply(this,arguments)}function R(g,a){var C=Object.keys(g);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(g);a&&(S=S.filter(function(p){return Object.getOwnPropertyDescriptor(g,p).enumerable})),C.push.apply(C,S)}return C}function O(g){for(var a=1;a<arguments.length;a++){var C=arguments[a]!=null?arguments[a]:{};a%2?R(Object(C),!0).forEach(function(S){w(g,S,C[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(C)):R(Object(C)).forEach(function(S){Object.defineProperty(g,S,Object.getOwnPropertyDescriptor(C,S))})}return g}function w(g,a,C){return a=D(a),a in g?Object.defineProperty(g,a,{value:C,enumerable:!0,configurable:!0,writable:!0}):g[a]=C,g}function D(g){var a=A(g,"string");return typeof a=="symbol"?a:String(a)}function A(g,a){if(typeof g!="object"||g===null)return g;var C=g[Symbol.toPrimitive];if(C!==void 0){var S=C.call(g,a||"default");if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(g)}var P=O(O({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,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:y.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:T.default,bufferController:r.default,capLevelController:o.default,fpsController:c.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,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:m.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0},I()),{},{subtitleStreamController:l.SubtitleStreamController,subtitleTrackController:_.default,timelineController:n.TimelineController,audioStreamController:e.default,audioTrackController:E.default,emeController:v.default,cmcdController:f.default});function I(){return{cueHandler:b.default,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function u(g,a){if((a.liveSyncDurationCount||a.liveMaxLatencyDurationCount)&&(a.liveSyncDuration||a.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(a.liveMaxLatencyDurationCount!==void 0&&(a.liveSyncDurationCount===void 0||a.liveMaxLatencyDurationCount<=a.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(a.liveMaxLatencyDuration!==void 0&&(a.liveSyncDuration===void 0||a.liveMaxLatencyDuration<=a.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return x({},g,a)}function k(g){var a=g.loader;if(a!==h.default&&a!==y.default)d.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),g.progressive=!1;else{var C=(0,h.fetchSupported)();C&&(g.loader=h.default,g.progressive=!0,g.enableSoftwareAES=!0,d.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>y});var T=i("./src/polyfills/number.ts"),e=i("./src/utils/ewma-bandwidth-estimator.ts"),E=i("./src/events.ts"),l=i("./src/errors.ts"),_=i("./src/types/loader.ts"),r=i("./src/utils/logger.ts");function n(h,b){for(var m=0;m<b.length;m++){var d=b[m];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,c(d.key),d)}}function o(h,b,m){return b&&n(h.prototype,b),m&&n(h,m),Object.defineProperty(h,"prototype",{writable:!1}),h}function c(h){var b=v(h,"string");return typeof b=="symbol"?b:String(b)}function v(h,b){if(typeof h!="object"||h===null)return h;var m=h[Symbol.toPrimitive];if(m!==void 0){var d=m.call(h,b||"default");if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(h)}var f=function(){function h(m){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=m;var d=m.config;this.bwEstimator=new e.default(d.abrEwmaSlowVoD,d.abrEwmaFastVoD,d.abrEwmaDefaultEstimate),this.registerListeners()}var b=h.prototype;return b.registerListeners=function(){var d=this.hls;d.on(E.Events.FRAG_LOADING,this.onFragLoading,this),d.on(E.Events.FRAG_LOADED,this.onFragLoaded,this),d.on(E.Events.FRAG_BUFFERED,this.onFragBuffered,this),d.on(E.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.on(E.Events.ERROR,this.onError,this)},b.unregisterListeners=function(){var d=this.hls;d.off(E.Events.FRAG_LOADING,this.onFragLoading,this),d.off(E.Events.FRAG_LOADED,this.onFragLoaded,this),d.off(E.Events.FRAG_BUFFERED,this.onFragBuffered,this),d.off(E.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.off(E.Events.ERROR,this.onError,this)},b.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},b.onFragLoading=function(d,x){var R=x.frag;if(R.type===_.PlaylistLevelType.MAIN&&!this.timer){var O;this.fragCurrent=R,this.partCurrent=(O=x.part)!=null?O:null,this.timer=self.setInterval(this.onCheck,100)}},b.onLevelLoaded=function(d,x){var R=this.hls.config;x.details.live?this.bwEstimator.update(R.abrEwmaSlowLive,R.abrEwmaFastLive):this.bwEstimator.update(R.abrEwmaSlowVoD,R.abrEwmaFastVoD)},b._abandonRulesCheck=function(){var d=this.fragCurrent,x=this.partCurrent,R=this.hls,O=R.autoLevelEnabled,w=R.media;if(!d||!w)return;var D=x?x.stats:d.stats,A=x?x.duration:d.duration;if(D.aborted||D.loaded&&D.loaded===D.total||d.level===0){this.clearTimer(),this._nextAutoLevel=-1;return}if(!O||w.paused||!w.playbackRate||!w.readyState)return;var P=R.mainForwardBufferInfo;if(P===null)return;var I=performance.now()-D.loading.start,u=Math.abs(w.playbackRate);if(I<=500*A/u)return;var k=D.loaded&&D.loading.first,g=this.bwEstimator.getEstimate(),a=R.levels,C=R.minAutoLevel,S=a[d.level],p=D.total||Math.max(D.loaded,Math.round(A*S.maxBitrate/8)),U=k?D.loaded*1e3/I:0,z=U?(p-D.loaded)/U:p*8/g,q=P.len/u;if(z<=q)return;var $=Number.POSITIVE_INFINITY,re;for(re=d.level-1;re>C;re--){var ce=a[re].maxBitrate;if($=U?A*ce/(8*.8*U):A*ce/g,$<q)break}if($>=z)return;r.logger.warn("Fragment "+d.sn+(x?" part "+x.index:"")+" of level "+d.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+re+`
|
|
|
Current BW estimate: `+((0,T.isFiniteNumber)(g)?(g/1024).toFixed(3):"Unknown")+` Kb/s
|
|
|
Estimated load time for current fragment: `+z.toFixed(3)+` s
|
|
|
Estimated load time for the next fragment: `+$.toFixed(3)+` s
|
|
|
Time to underbuffer: `+q.toFixed(3)+" s"),R.nextLoadLevel=re,k&&this.bwEstimator.sample(I,D.loaded),this.clearTimer(),(d.loader||d.keyLoader)&&(this.fragCurrent=this.partCurrent=null,d.abortRequests()),R.trigger(E.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:d,part:x,stats:D})},b.onFragLoaded=function(d,x){var R=x.frag,O=x.part;if(R.type===_.PlaylistLevelType.MAIN&&(0,T.isFiniteNumber)(R.sn)){var w=O?O.stats:R.stats,D=O?O.duration:R.duration;if(this.clearTimer(),this.lastLoadedFragLevel=R.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var A=this.hls.levels[R.level],P=(A.loaded?A.loaded.bytes:0)+w.loaded,I=(A.loaded?A.loaded.duration:0)+D;A.loaded={bytes:P,duration:I},A.realBitrate=Math.round(8*P/I)}if(R.bitrateTest){var u={stats:w,frag:R,part:O,id:R.type};this.onFragBuffered(E.Events.FRAG_BUFFERED,u)}}},b.onFragBuffered=function(d,x){var R=x.frag,O=x.part,w=O?O.stats:R.stats;if(w.aborted)return;if(R.type!==_.PlaylistLevelType.MAIN||R.sn==="initSegment")return;var D=w.parsing.end-w.loading.start;this.bwEstimator.sample(D,w.loaded),w.bwEstimate=this.bwEstimator.getEstimate(),R.bitrateTest?this.bitrateTestDelay=D/1e3:this.bitrateTestDelay=0},b.onError=function(d,x){var R;if(((R=x.frag)===null||R===void 0?void 0:R.type)===_.PlaylistLevelType.MAIN){if(x.type===l.ErrorTypes.KEY_SYSTEM_ERROR){this.clearTimer();return}switch(x.details){case l.ErrorDetails.FRAG_LOAD_ERROR:case l.ErrorDetails.FRAG_LOAD_TIMEOUT:case l.ErrorDetails.KEY_LOAD_ERROR:case l.ErrorDetails.KEY_LOAD_TIMEOUT:this.clearTimer();break;default:break}}},b.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},b.getNextABRAutoLevel=function(){var d=this.fragCurrent,x=this.partCurrent,R=this.hls,O=R.maxAutoLevel,w=R.config,D=R.minAutoLevel,A=R.media,P=x?x.duration:d?d.duration:0,I=A&&A.playbackRate!==0?Math.abs(A.playbackRate):1,u=this.bwEstimator?this.bwEstimator.getEstimate():w.abrEwmaDefaultEstimate,k=R.mainForwardBufferInfo,g=(k?k.len:0)/I,a=this.findBestLevel(u,D,O,g,w.abrBandWidthFactor,w.abrBandWidthUpFactor);if(a>=0)return a;r.logger.trace((g?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var C=P?Math.min(P,w.maxStarvationDelay):w.maxStarvationDelay,S=w.abrBandWidthFactor,p=w.abrBandWidthUpFactor;if(!g){var U=this.bitrateTestDelay;if(U){var z=P?Math.min(P,w.maxLoadingDelay):w.maxLoadingDelay;C=z-U,r.logger.trace("bitrate test took "+Math.round(1e3*U)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*C)+" ms"),S=p=1}}return a=this.findBestLevel(u,D,O,g+C,S,p),Math.max(a,0)},b.findBestLevel=function(d,x,R,O,w,D){for(var A,P=this.fragCurrent,I=this.partCurrent,u=this.lastLoadedFragLevel,k=this.hls.levels,g=k[u],a=!!(g!=null&&(A=g.details)!==null&&A!==void 0&&A.live),C=g==null?void 0:g.codecSet,S=I?I.duration:P?P.duration:0,p=R;p>=x;p--){var U=k[p];if(!U||C&&U.codecSet!==C)continue;var z=U.details,q=(I?z==null?void 0:z.partTarget:z==null?void 0:z.averagetargetduration)||S,$=void 0;p<=u?$=w*d:$=D*d;var re=k[p].maxBitrate,ce=re*q/$;if(r.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+p+"/"+Math.round($)+"/"+re+"/"+q+"/"+O+"/"+ce),$>re&&(ce===0||!(0,T.isFiniteNumber)(ce)||a&&!this.bitrateTestDelay||ce<O))return p}return-1},o(h,[{key:"nextAutoLevel",get:function(){var d=this._nextAutoLevel,x=this.bwEstimator;if(d!==-1&&!x.canEstimate())return d;var R=this.getNextABRAutoLevel();return d!==-1&&this.hls.levels[R].loadError?d:(d!==-1&&(R=Math.min(d,R)),R)},set:function(d){this._nextAutoLevel=d}}]),h}();const y=f},"./src/controller/audio-stream-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>w});var T=i("./src/polyfills/number.ts"),e=i("./src/controller/base-stream-controller.ts"),E=i("./src/events.ts"),l=i("./src/utils/buffer-helper.ts"),_=i("./src/controller/fragment-tracker.ts"),r=i("./src/types/level.ts"),n=i("./src/types/loader.ts"),o=i("./src/loader/fragment.ts"),c=i("./src/demux/chunk-cache.ts"),v=i("./src/demux/transmuxer-interface.ts"),f=i("./src/types/transmuxer.ts"),y=i("./src/controller/fragment-finders.ts"),h=i("./src/utils/discontinuities.ts"),b=i("./src/errors.ts");function m(){return m=Object.assign?Object.assign.bind():function(D){for(var A=1;A<arguments.length;A++){var P=arguments[A];for(var I in P)Object.prototype.hasOwnProperty.call(P,I)&&(D[I]=P[I])}return D},m.apply(this,arguments)}function d(D,A){D.prototype=Object.create(A.prototype),D.prototype.constructor=D,x(D,A)}function x(D,A){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(I,u){return I.__proto__=u,I},x(D,A)}var R=100,O=function(D){d(A,D);function A(I,u,k){var g;return g=D.call(this,I,u,k,"[audio-stream-controller]")||this,g.videoBuffer=null,g.videoTrackCC=-1,g.waitingVideoCC=-1,g.audioSwitch=!1,g.trackId=-1,g.waitingData=null,g.mainDetails=null,g.bufferFlushed=!1,g.cachedTrackLoadedData=null,g._registerListeners(),g}var P=A.prototype;return P.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},P._registerListeners=function(){var u=this.hls;u.on(E.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(E.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(E.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(E.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.on(E.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),u.on(E.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),u.on(E.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),u.on(E.Events.ERROR,this.onError,this),u.on(E.Events.BUFFER_RESET,this.onBufferReset,this),u.on(E.Events.BUFFER_CREATED,this.onBufferCreated,this),u.on(E.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),u.on(E.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),u.on(E.Events.FRAG_BUFFERED,this.onFragBuffered,this)},P._unregisterListeners=function(){var u=this.hls;u.off(E.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(E.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(E.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(E.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.off(E.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),u.off(E.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),u.off(E.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),u.off(E.Events.ERROR,this.onError,this),u.off(E.Events.BUFFER_RESET,this.onBufferReset,this),u.off(E.Events.BUFFER_CREATED,this.onBufferCreated,this),u.off(E.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),u.off(E.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),u.off(E.Events.FRAG_BUFFERED,this.onFragBuffered,this)},P.onInitPtsFound=function(u,k){var g=k.frag,a=k.id,C=k.initPTS;if(a==="main"){var S=g.cc;this.initPTS[g.cc]=C,this.log("InitPTS for cc: "+S+" found from main: "+C),this.videoTrackCC=S,this.state===e.State.WAITING_INIT_PTS&&this.tick()}},P.startLoad=function(u){if(!this.levels){this.startPosition=u,this.state=e.State.STOPPED;return}var k=this.lastCurrentTime;this.stopLoad(),this.setInterval(R),this.fragLoadError=0,k>0&&u===-1?(this.log("Override startPosition with lastCurrentTime @"+k.toFixed(3)),u=k,this.state=e.State.IDLE):(this.loadedmetadata=!1,this.state=e.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=u,this.tick()},P.doTick=function(){switch(this.state){case e.State.IDLE:this.doTickIdle();break;case e.State.WAITING_TRACK:{var u,k=this.levels,g=this.trackId,a=k==null||((u=k[g])===null||u===void 0)?void 0:u.details;if(a){if(this.waitForCdnTuneIn(a))break;this.state=e.State.WAITING_INIT_PTS}break}case e.State.FRAG_LOADING_WAITING_RETRY:{var C,S=performance.now(),p=this.retryDate;(!p||S>=p||(C=this.media)!==null&&C!==void 0&&C.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.trackId),this.state=e.State.IDLE);break}case e.State.WAITING_INIT_PTS:{var U=this.waitingData;if(U){var z=U.frag,q=U.part,$=U.cache,re=U.complete;if(this.initPTS[z.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=e.State.FRAG_LOADING;var ce=$.flush(),ne={frag:z,part:q,payload:ce,networkDetails:null};this._handleFragmentLoadProgress(ne),re&&D.prototype._handleFragmentLoadComplete.call(this,ne)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log("Waiting fragment cc ("+z.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var me=this.getLoadPosition(),be=l.BufferHelper.bufferInfo(this.mediaBuffer,me,this.config.maxBufferHole),he=(0,y.fragmentWithinToleranceTest)(be.end,this.config.maxFragLookUpTolerance,z);he<0&&(this.log("Waiting fragment cc ("+z.cc+") @ "+z.start+" cancelled because another fragment at "+be.end+" is needed"),this.clearWaitingFragment())}}else this.state=e.State.IDLE}}this.onTickEnd()},P.clearWaitingFragment=function(){var u=this.waitingData;u&&(this.fragmentTracker.removeFragment(u.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=e.State.IDLE)},P.resetLoadingState=function(){this.clearWaitingFragment(),D.prototype.resetLoadingState.call(this)},P.onTickEnd=function(){var u=this.media;if(!u||!u.readyState)return;this.lastCurrentTime=u.currentTime},P.doTickIdle=function(){var u=this.hls,k=this.levels,g=this.media,a=this.trackId,C=u.config;if(!k||!k[a])return;if(!g&&(this.startFragRequested||!C.startFragPrefetch))return;var S=k[a],p=S.details;if(!p||p.live&&this.levelLastLoaded!==a||this.waitForCdnTuneIn(p)){this.state=e.State.WAITING_TRACK;return}var U=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&U&&(this.bufferFlushed=!1,this.afterBufferFlushed(U,o.ElementaryStreamTypes.AUDIO,n.PlaylistLevelType.AUDIO));var z=this.getFwdBufferInfo(U,n.PlaylistLevelType.AUDIO);if(z===null)return;var q=this.audioSwitch;if(!q&&this._streamEnded(z,p)){u.trigger(E.Events.BUFFER_EOS,{type:"audio"}),this.state=e.State.ENDED;return}var $=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,n.PlaylistLevelType.MAIN),re=z.len,ce=this.getMaxBufferLength($==null?void 0:$.len);if(re>=ce&&!q)return;var ne=p.fragments,me=ne[0].start,be=z.end;if(q&&g){var he=this.getLoadPosition();be=he,p.PTSKnown&&he<me&&((z.end>me||z.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),g.currentTime=me+.05))}if($&&be>$.end+p.targetduration)return;if((!$||!$.len)&&z.len)return;var se=this.getNextFragment(be,p);if(!se){this.bufferFlushed=!0;return}this.loadFragment(se,p,be)},P.getMaxBufferLength=function(u){var k=D.prototype.getMaxBufferLength.call(this);return u?Math.max(k,u):k},P.onMediaDetaching=function(){this.videoBuffer=null,D.prototype.onMediaDetaching.call(this)},P.onAudioTracksUpdated=function(u,k){var g=k.audioTracks;this.resetTransmuxer(),this.levels=g.map(function(a){return new r.Level(a)})},P.onAudioTrackSwitching=function(u,k){var g=!!k.url;this.trackId=k.id;var a=this.fragCurrent;a&&a.abortRequests(),this.fragCurrent=null,this.clearWaitingFragment(),g?this.setInterval(R):this.resetTransmuxer(),g?(this.audioSwitch=!0,this.state=e.State.IDLE):this.state=e.State.STOPPED,this.tick()},P.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},P.onLevelLoaded=function(u,k){this.mainDetails=k.details,this.cachedTrackLoadedData!==null&&(this.hls.trigger(E.Events.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)},P.onAudioTrackLoaded=function(u,k){var g;if(this.mainDetails==null){this.cachedTrackLoadedData=k;return}var a=this.levels,C=k.details,S=k.id;if(!a){this.warn("Audio tracks were reset while loading level "+S);return}this.log("Track "+S+" loaded ["+C.startSN+","+C.endSN+"],duration:"+C.totalduration);var p=a[S],U=0;if(C.live||(g=p.details)!==null&&g!==void 0&&g.live){var z=this.mainDetails;if(C.fragments[0]||(C.deltaUpdateFailed=!0),C.deltaUpdateFailed||!z)return;!p.details&&C.hasProgramDateTime&&z.hasProgramDateTime?((0,h.alignMediaPlaylistByPDT)(C,z),U=C.fragments[0].start):U=this.alignPlaylists(C,p.details)}p.details=C,this.levelLastLoaded=S,!this.startFragRequested&&(this.mainDetails||!C.live)&&this.setStartPosition(p.details,U),this.state===e.State.WAITING_TRACK&&!this.waitForCdnTuneIn(C)&&(this.state=e.State.IDLE),this.tick()},P._handleFragmentLoadProgress=function(u){var k,g=u.frag,a=u.part,C=u.payload,S=this.config,p=this.trackId,U=this.levels;if(!U){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+g.sn+" of level "+g.level+" will not be buffered");return}var z=U[p];console.assert(z,"Audio track is defined on fragment load progress");var q=z.details;console.assert(q,"Audio track details are defined on fragment load progress");var $=S.defaultAudioCodec||z.audioCodec||"mp4a.40.2",re=this.transmuxer;re||(re=this.transmuxer=new v.default(this.hls,n.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ce=this.initPTS[g.cc],ne=(k=g.initSegment)===null||k===void 0?void 0:k.data;if(ce!==void 0){var me=!1,be=a?a.index:-1,he=be!==-1,se=new f.ChunkMetadata(g.level,g.sn,g.stats.chunkCount,C.byteLength,be,he);re.push(C,ne,$,"",g,a,q.totalduration,me,se,ce)}else{this.log("Unknown video PTS for cc "+g.cc+", waiting for video PTS before demuxing audio frag "+g.sn+" of ["+q.startSN+" ,"+q.endSN+"],track "+p);var _e=this.waitingData=this.waitingData||{frag:g,part:a,cache:new c.default,complete:!1},De=_e.cache;De.push(new Uint8Array(C)),this.waitingVideoCC=this.videoTrackCC,this.state=e.State.WAITING_INIT_PTS}},P._handleFragmentLoadComplete=function(u){if(this.waitingData){this.waitingData.complete=!0;return}D.prototype._handleFragmentLoadComplete.call(this,u)},P.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},P.onBufferCreated=function(u,k){var g=k.tracks.audio;g&&(this.mediaBuffer=g.buffer||null),k.tracks.video&&(this.videoBuffer=k.tracks.video.buffer||null)},P.onFragBuffered=function(u,k){var g=k.frag,a=k.part;if(g.type!==n.PlaylistLevelType.AUDIO){if(!this.loadedmetadata&&g.type===n.PlaylistLevelType.MAIN){var C;(C=this.videoBuffer||this.media)!==null&&C!==void 0&&C.buffered.length&&(this.loadedmetadata=!0)}return}if(this.fragContextChanged(g)){this.warn("Fragment "+g.sn+(a?" p: "+a.index:"")+" of level "+g.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}g.sn!=="initSegment"&&(this.fragPrevious=g,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(E.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(g,a)},P.onError=function(u,k){if(k.type===b.ErrorTypes.KEY_SYSTEM_ERROR){this.onFragmentOrKeyLoadError(n.PlaylistLevelType.AUDIO,k);return}switch(k.details){case b.ErrorDetails.FRAG_LOAD_ERROR:case b.ErrorDetails.FRAG_LOAD_TIMEOUT:case b.ErrorDetails.FRAG_PARSING_ERROR:case b.ErrorDetails.KEY_LOAD_ERROR:case b.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(n.PlaylistLevelType.AUDIO,k);break;case b.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case b.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==e.State.ERROR&&this.state!==e.State.STOPPED&&(this.state=k.fatal?e.State.ERROR:e.State.IDLE,this.warn(k.details+" while loading frag, switching to "+this.state+" state"));break;case b.ErrorDetails.BUFFER_FULL_ERROR:if(k.parent==="audio"&&(this.state===e.State.PARSING||this.state===e.State.PARSED)){var g=!0,a=this.getFwdBufferInfo(this.mediaBuffer,n.PlaylistLevelType.AUDIO);a&&a.len>.5&&(g=!this.reduceMaxBufferLength(a.len)),g&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},P.onBufferFlushed=function(u,k){var g=k.type;g===o.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0,this.state===e.State.ENDED&&(this.state=e.State.IDLE))},P._handleTransmuxComplete=function(u){var k,g="audio",a=this.hls,C=u.remuxResult,S=u.chunkMeta,p=this.getCurrentContext(S);if(!p){this.warn("The loading context changed while buffering fragment "+S.sn+" of level "+S.level+". This chunk will not be buffered."),this.resetStartWhenNotLoaded(S.level);return}var U=p.frag,z=p.part,q=p.level.details,$=C.audio,re=C.text,ce=C.id3,ne=C.initSegment;if(this.fragContextChanged(U)||!q)return;if(this.state=e.State.PARSING,this.audioSwitch&&$&&this.completeAudioSwitch(),ne!=null&&ne.tracks&&(this._bufferInitSegment(ne.tracks,U,S),a.trigger(E.Events.FRAG_PARSING_INIT_SEGMENT,{frag:U,id:g,tracks:ne.tracks})),$){var me=$.startPTS,be=$.endPTS,he=$.startDTS,se=$.endDTS;z&&(z.elementaryStreams[o.ElementaryStreamTypes.AUDIO]={startPTS:me,endPTS:be,startDTS:he,endDTS:se}),U.setElementaryStreamInfo(o.ElementaryStreamTypes.AUDIO,me,be,he,se),this.bufferFragmentData($,U,z,S)}if(ce!=null&&(k=ce.samples)!==null&&k!==void 0&&k.length){var _e=m({id:g,frag:U,details:q},ce);a.trigger(E.Events.FRAG_PARSING_METADATA,_e)}if(re){var De=m({id:g,frag:U,details:q},re);a.trigger(E.Events.FRAG_PARSING_USERDATA,De)}},P._bufferInitSegment=function(u,k,g){if(this.state!==e.State.PARSING)return;u.video&&delete u.video;var a=u.audio;if(!a)return;a.levelCodec=a.codec,a.id="audio",this.log("Init audio buffer, container:"+a.container+", codecs[parsed]=["+a.codec+"]"),this.hls.trigger(E.Events.BUFFER_CODECS,u);var C=a.initSegment;if(C!=null&&C.byteLength){var S={type:"audio",frag:k,part:null,chunkMeta:g,parent:k.type,data:C};this.hls.trigger(E.Events.BUFFER_APPENDING,S)}this.tick()},P.loadFragment=function(u,k,g){var a=this.fragmentTracker.getState(u);this.fragCurrent=u,(this.audioSwitch||a===_.FragmentState.NOT_LOADED||a===_.FragmentState.PARTIAL)&&(u.sn==="initSegment"?this._loadInitSegment(u,k):k.live&&!(0,T.isFiniteNumber)(this.initPTS[u.cc])?(this.log("Waiting for video PTS in continuity counter "+u.cc+" of live stream before loading audio fragment "+u.sn+" of level "+this.trackId),this.state=e.State.WAITING_INIT_PTS):(this.startFragRequested=!0,D.prototype.loadFragment.call(this,u,k,g)))},P.completeAudioSwitch=function(){var u=this.hls,k=this.media,g=this.trackId;k&&(this.log("Switching audio track : flushing all audio"),D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,u.trigger(E.Events.AUDIO_TRACK_SWITCHED,{id:g})},A}(e.default);const w=O},"./src/controller/audio-track-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>y});var T=i("./src/events.ts"),e=i("./src/errors.ts"),E=i("./src/controller/base-playlist-controller.ts"),l=i("./src/types/loader.ts");function _(h,b){for(var m=0;m<b.length;m++){var d=b[m];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,n(d.key),d)}}function r(h,b,m){return b&&_(h.prototype,b),m&&_(h,m),Object.defineProperty(h,"prototype",{writable:!1}),h}function n(h){var b=o(h,"string");return typeof b=="symbol"?b:String(b)}function o(h,b){if(typeof h!="object"||h===null)return h;var m=h[Symbol.toPrimitive];if(m!==void 0){var d=m.call(h,b||"default");if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(h)}function c(h,b){h.prototype=Object.create(b.prototype),h.prototype.constructor=h,v(h,b)}function v(h,b){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,x){return d.__proto__=x,d},v(h,b)}var f=function(h){c(b,h);function b(d){var x;return x=h.call(this,d,"[audio-track-controller]")||this,x.tracks=[],x.groupId=null,x.tracksInGroup=[],x.trackId=-1,x.trackName="",x.selectDefaultTrack=!0,x.registerListeners(),x}var m=b.prototype;return m.registerListeners=function(){var x=this.hls;x.on(T.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(T.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.on(T.Events.LEVEL_LOADING,this.onLevelLoading,this),x.on(T.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),x.on(T.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),x.on(T.Events.ERROR,this.onError,this)},m.unregisterListeners=function(){var x=this.hls;x.off(T.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(T.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.off(T.Events.LEVEL_LOADING,this.onLevelLoading,this),x.off(T.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),x.off(T.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),x.off(T.Events.ERROR,this.onError,this)},m.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,h.prototype.destroy.call(this)},m.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},m.onManifestParsed=function(x,R){this.tracks=R.audioTracks||[]},m.onAudioTrackLoaded=function(x,R){var O=R.id,w=R.details,D=this.tracksInGroup[O];if(!D){this.warn("Invalid audio track id "+O);return}var A=D.details;D.details=R.details,this.log("audioTrack "+O+" loaded ["+w.startSN+"-"+w.endSN+"]"),O===this.trackId&&(this.retryCount=0,this.playlistLoaded(O,R,A))},m.onLevelLoading=function(x,R){this.switchLevel(R.level)},m.onLevelSwitching=function(x,R){this.switchLevel(R.level)},m.switchLevel=function(x){var R=this.hls.levels[x];if(!(R!=null&&R.audioGroupIds))return;var O=R.audioGroupIds[R.urlId];if(this.groupId!==O){this.groupId=O;var w=this.tracks.filter(function(A){return!O||A.groupId===O});this.selectDefaultTrack&&!w.some(function(A){return A.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=w;var D={audioTracks:w};this.log("Updating audio tracks, "+w.length+' track(s) found in "'+O+'" group-id'),this.hls.trigger(T.Events.AUDIO_TRACKS_UPDATED,D),this.selectInitialTrack()}},m.onError=function(x,R){if(h.prototype.onError.call(this,x,R),R.fatal||!R.context)return;R.context.type===l.PlaylistContextType.AUDIO_TRACK&&R.context.id===this.trackId&&R.context.groupId===this.groupId&&this.retryLoadingOrFail(R)},m.setAudioTrack=function(x){var R=this.tracksInGroup;if(x<0||x>=R.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var O=R[this.trackId];this.log("Now switching to audio-track index "+x);var w=R[x],D=w.id,A=w.groupId,P=A===void 0?"":A,I=w.name,u=w.type,k=w.url;if(this.trackId=x,this.trackName=I,this.selectDefaultTrack=!1,this.hls.trigger(T.Events.AUDIO_TRACK_SWITCHING,{id:D,groupId:P,name:I,type:u,url:k}),w.details&&!w.details.live)return;var g=this.switchParams(w.url,O==null?void 0:O.details);this.loadPlaylist(g)},m.selectInitialTrack=function(){var x=this.tracksInGroup;console.assert(x.length,"Initial audio track should be selected when tracks are known");var R=this.trackName,O=this.findTrackId(R)||this.findTrackId();O!==-1?this.setAudioTrack(O):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(T.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},m.findTrackId=function(x){for(var R=this.tracksInGroup,O=0;O<R.length;O++){var w=R[O];if((!this.selectDefaultTrack||w.default)&&(!x||x===w.name))return w.id}return-1},m.loadPlaylist=function(x){h.prototype.loadPlaylist.call(this);var R=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(R)){var O=R.id,w=R.groupId,D=R.url;if(x)try{D=x.addDirectives(D)}catch(A){this.warn("Could not construct new URL with HLS Delivery Directives: "+A)}this.log("loading audio-track playlist for id: "+O),this.clearTimer(),this.hls.trigger(T.Events.AUDIO_TRACK_LOADING,{url:D,id:O,groupId:w,deliveryDirectives:x||null})}},r(b,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(x){this.selectDefaultTrack=!1,this.setAudioTrack(x)}}]),b}(E.default);const y=f},"./src/controller/base-playlist-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>_});var T=i("./src/types/level.ts"),e=i("./src/controller/level-helper.ts"),E=i("./src/utils/logger.ts"),l=i("./src/errors.ts"),_=function(){function r(o,c){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=E.logger.log.bind(E.logger,c+":"),this.warn=E.logger.warn.bind(E.logger,c+":"),this.hls=o}var n=r.prototype;return n.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},n.onError=function(c,v){v.fatal&&(v.type===l.ErrorTypes.NETWORK_ERROR||v.type===l.ErrorTypes.KEY_SYSTEM_ERROR)&&this.stopLoad()},n.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},n.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.requestScheduled=-1,this.loadPlaylist()},n.stopLoad=function(){this.canLoad=!1,this.clearTimer()},n.switchParams=function(c,v){var f=v==null?void 0:v.renditionReports;if(f)for(var y=0;y<f.length;y++){var h=f[y],b=void 0;try{b=new self.URL(h.URI,v.url).href}catch(R){E.logger.warn("Could not construct new URL for Rendition Report: "+R),b=h.URI||""}if(b===c.slice(-b.length)){var m=parseInt(h["LAST-MSN"])||(v==null?void 0:v.lastPartSn),d=parseInt(h["LAST-PART"])||(v==null?void 0:v.lastPartIndex);if(this.hls.config.lowLatencyMode){var x=Math.min(v.age-v.partTarget,v.targetduration);d>=0&&x>v.partTarget&&(d+=1)}return new T.HlsUrlParameters(m,d>=0?d:void 0,T.HlsSkip.No)}}},n.loadPlaylist=function(c){this.requestScheduled===-1&&(this.requestScheduled=self.performance.now())},n.shouldLoadTrack=function(c){return this.canLoad&&c&&!!c.url&&(!c.details||c.details.live)},n.playlistLoaded=function(c,v,f){var y=this,h=v.details,b=v.stats,m=self.performance.now(),d=b.loading.first?Math.max(0,m-b.loading.first):0;if(h.advancedDateTime=Date.now()-d,h.live||f!=null&&f.live){if(h.reloaded(f),f&&this.log("live playlist "+c+" "+(h.advanced?"REFRESHED "+h.lastPartSn+"-"+h.lastPartIndex:"MISSED")),f&&h.fragments.length>0&&(0,e.mergeDetails)(f,h),!this.canLoad||!h.live)return;var x,R=void 0,O=void 0;if(h.canBlockReload&&h.endSN&&h.advanced){var w=this.hls.config.lowLatencyMode,D=h.lastPartSn,A=h.endSN,P=h.lastPartIndex,I=P!==-1,u=D===A,k=w?0:P;I?(R=u?A+1:D,O=u?k:P+1):R=A+1;var g=h.age,a=g+h.ageHeader,C=Math.min(a-h.partTarget,h.targetduration*1.5);if(C>0){if(f&&C>f.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+f.tuneInGoal+" to: "+C+" with playlist age: "+h.age),C=0;else{var S=Math.floor(C/h.targetduration);if(R+=S,O!==void 0){var p=Math.round(C%h.targetduration/h.partTarget);O+=p}this.log("CDN Tune-in age: "+h.ageHeader+"s last advanced "+g.toFixed(2)+"s goal: "+C+" skip sn "+S+" to part "+O)}h.tuneInGoal=C}if(x=this.getDeliveryDirectives(h,v.deliveryDirectives,R,O),w||!u){this.loadPlaylist(x);return}}else x=this.getDeliveryDirectives(h,v.deliveryDirectives,R,O);var U=this.hls.mainForwardBufferInfo,z=U?U.end-U.len:0,q=(h.edge-z)*1e3,$=(0,e.computeReloadInterval)(h,q);h.updated?m>this.requestScheduled+$&&(this.requestScheduled=b.loading.start):this.requestScheduled=-1,R!==void 0&&h.canBlockReload?this.requestScheduled=b.loading.first+$-(h.partTarget*1e3||1e3):this.requestScheduled=(this.requestScheduled===-1?m:this.requestScheduled)+$;var re=this.requestScheduled-m;re=Math.max(0,re),this.log("reload live playlist "+c+" in "+Math.round(re)+" ms"),this.timer=self.setTimeout(function(){return y.loadPlaylist(x)},re)}else this.clearTimer()},n.getDeliveryDirectives=function(c,v,f,y){var h=(0,T.getSkipValue)(c,f);return v!=null&&v.skip&&c.deltaUpdateFailed&&(f=v.msn,y=v.part,h=T.HlsSkip.No),new T.HlsUrlParameters(f,y,h)},n.retryLoadingOrFail=function(c){var v=this,f=this.hls.config,y=this.retryCount<f.levelLoadingMaxRetry;if(y){var h;if(this.requestScheduled=-1,this.retryCount++,c.details.indexOf("LoadTimeOut")>-1&&(h=c.context)!==null&&h!==void 0&&h.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+c.details+'"'),this.loadPlaylist();else{var b=Math.min(Math.pow(2,this.retryCount)*f.levelLoadingRetryDelay,f.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return v.loadPlaylist()},b),this.warn("retry playlist loading #"+this.retryCount+" in "+b+' ms after "'+c.details+'"')}}else this.warn('cannot recover from error "'+c.details+'"'),this.clearTimer(),c.fatal=!0;return y},r}()},"./src/controller/base-stream-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{State:()=>I,default:()=>u});var T=i("./src/polyfills/number.ts"),e=i("./src/task-loop.ts"),E=i("./src/controller/fragment-tracker.ts"),l=i("./src/utils/buffer-helper.ts"),_=i("./src/utils/logger.ts"),r=i("./src/events.ts"),n=i("./src/errors.ts"),o=i("./src/types/transmuxer.ts"),c=i("./src/utils/mp4-tools.ts"),v=i("./src/utils/discontinuities.ts"),f=i("./src/controller/fragment-finders.ts"),y=i("./src/controller/level-helper.ts"),h=i("./src/loader/fragment-loader.ts"),b=i("./src/crypt/decrypter.ts"),m=i("./src/utils/time-ranges.ts"),d=i("./src/types/loader.ts");function x(k,g){for(var a=0;a<g.length;a++){var C=g[a];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(k,O(C.key),C)}}function R(k,g,a){return g&&x(k.prototype,g),a&&x(k,a),Object.defineProperty(k,"prototype",{writable:!1}),k}function O(k){var g=w(k,"string");return typeof g=="symbol"?g:String(g)}function w(k,g){if(typeof k!="object"||k===null)return k;var a=k[Symbol.toPrimitive];if(a!==void 0){var C=a.call(k,g||"default");if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(k)}function D(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function A(k,g){k.prototype=Object.create(g.prototype),k.prototype.constructor=k,P(k,g)}function P(k,g){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(C,S){return C.__proto__=S,C},P(k,g)}var I={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",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},u=function(k){A(g,k);function g(C,S,p,U){var z;return z=k.call(this)||this,z.hls=void 0,z.fragPrevious=null,z.fragCurrent=null,z.fragmentTracker=void 0,z.transmuxer=null,z._state=I.STOPPED,z.media=null,z.mediaBuffer=null,z.config=void 0,z.bitrateTest=!1,z.lastCurrentTime=0,z.nextLoadPosition=0,z.startPosition=0,z.loadedmetadata=!1,z.fragLoadError=0,z.retryDate=0,z.levels=null,z.fragmentLoader=void 0,z.keyLoader=void 0,z.levelLastLoaded=null,z.startFragRequested=!1,z.decrypter=void 0,z.initPTS=[],z.onvseeking=null,z.onvended=null,z.logPrefix="",z.log=void 0,z.warn=void 0,z.logPrefix=U,z.log=_.logger.log.bind(_.logger,U+":"),z.warn=_.logger.warn.bind(_.logger,U+":"),z.hls=C,z.fragmentLoader=new h.default(C.config),z.keyLoader=p,z.fragmentTracker=S,z.config=C.config,z.decrypter=new b.default(C.config),C.on(r.Events.LEVEL_SWITCHING,z.onLevelSwitching,D(z)),z}var a=g.prototype;return a.doTick=function(){this.onTickEnd()},a.onTickEnd=function(){},a.startLoad=function(S){},a.stopLoad=function(){this.fragmentLoader.abort(),this.keyLoader.abort();var S=this.fragCurrent;S&&(S.abortRequests(),this.fragmentTracker.removeFragment(S)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=I.STOPPED},a._streamEnded=function(S,p){if(p.live||S.nextStart||!S.end||!this.media)return!1;var U=p.partList;if(U!=null&&U.length){var z=U[U.length-1],q=l.BufferHelper.isBuffered(this.media,z.start+z.duration/2);return q}var $=p.fragments[p.fragments.length-1].type;return this.fragmentTracker.isEndListAppended($)},a.getLevelDetails=function(){if(this.levels&&this.levelLastLoaded!==null){var S;return(S=this.levels[this.levelLastLoaded])===null||S===void 0?void 0:S.details}},a.onMediaAttached=function(S,p){var U=this.media=this.mediaBuffer=p.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),U.addEventListener("seeking",this.onvseeking),U.addEventListener("ended",this.onvended);var z=this.config;this.levels&&z.autoStartLoad&&this.state===I.STOPPED&&this.startLoad(z.startPosition)},a.onMediaDetaching=function(){var S=this.media;S!=null&&S.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),S&&this.onvseeking&&this.onvended&&(S.removeEventListener("seeking",this.onvseeking),S.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},a.onMediaSeeking=function(){var S=this.config,p=this.fragCurrent,U=this.media,z=this.mediaBuffer,q=this.state,$=U?U.currentTime:0,re=l.BufferHelper.bufferInfo(z||U,$,S.maxBufferHole);if(this.log("media seeking to "+((0,T.isFiniteNumber)($)?$.toFixed(3):$)+", state: "+q),this.state===I.ENDED)this.resetLoadingState();else if(p){var ce=S.maxFragLookUpTolerance,ne=p.start-ce,me=p.start+p.duration+ce;if(!re.len||me<re.start||ne>re.end){var be=$>me;($<ne||be)&&(be&&p.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),p.abortRequests()),this.resetLoadingState())}}U&&(this.lastCurrentTime=$),!this.loadedmetadata&&!re.len&&(this.nextLoadPosition=this.startPosition=$),this.tickImmediate()},a.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},a.onLevelSwitching=function(S,p){this.fragLoadError=0},a.onHandlerDestroying=function(){this.stopLoad(),k.prototype.onHandlerDestroying.call(this)},a.onHandlerDestroyed=function(){this.state=I.STOPPED,this.hls.off(r.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,k.prototype.onHandlerDestroyed.call(this)},a.loadFragment=function(S,p,U){this._loadFragForPlayback(S,p,U)},a._loadFragForPlayback=function(S,p,U){var z=this,q=function(re){if(z.fragContextChanged(S)){z.warn("Fragment "+S.sn+(re.part?" p: "+re.part.index:"")+" of level "+S.level+" was dropped during download."),z.fragmentTracker.removeFragment(S);return}S.stats.chunkCount++,z._handleFragmentLoadProgress(re)};this._doFragLoad(S,p,U,q).then(function($){if(!$)return;z.fragLoadError=0;var re=z.state;if(z.fragContextChanged(S)){(re===I.FRAG_LOADING||!z.fragCurrent&&re===I.PARSING)&&(z.fragmentTracker.removeFragment(S),z.state=I.IDLE);return}"payload"in $&&(z.log("Loaded fragment "+S.sn+" of level "+S.level),z.hls.trigger(r.Events.FRAG_LOADED,$)),z._handleFragmentLoadComplete($)}).catch(function($){if(z.state===I.STOPPED||z.state===I.ERROR)return;z.warn($),z.resetFragmentLoading(S)})},a.flushMainBuffer=function(S,p,U){if(U===void 0&&(U=null),!(S-p))return;var z={startOffset:S,endOffset:p,type:U};this.fragLoadError=0,this.hls.trigger(r.Events.BUFFER_FLUSHING,z)},a._loadInitSegment=function(S,p){var U=this;this._doFragLoad(S,p).then(function(z){if(!z||U.fragContextChanged(S)||!U.levels)throw new Error("init load aborted");return z}).then(function(z){var q=U.hls,$=z.payload,re=S.decryptdata;if($&&$.byteLength>0&&re&&re.key&&re.iv&&re.method==="AES-128"){var ce=self.performance.now();return U.decrypter.decrypt(new Uint8Array($),re.key.buffer,re.iv.buffer).then(function(ne){var me=self.performance.now();return q.trigger(r.Events.FRAG_DECRYPTED,{frag:S,payload:ne,stats:{tstart:ce,tdecrypt:me}}),z.payload=ne,z})}return z}).then(function(z){var q=U.fragCurrent,$=U.hls,re=U.levels;if(!re)throw new Error("init load aborted, missing levels");var ce=re[S.level].details;console.assert(ce,"Level details are defined when init segment is loaded");var ne=S.stats;U.state=I.IDLE,U.fragLoadError=0,S.data=new Uint8Array(z.payload),ne.parsing.start=ne.buffering.start=self.performance.now(),ne.parsing.end=ne.buffering.end=self.performance.now(),z.frag===q&&$.trigger(r.Events.FRAG_BUFFERED,{stats:ne,frag:q,part:null,id:S.type}),U.tick()}).catch(function(z){if(U.state===I.STOPPED||U.state===I.ERROR)return;U.warn(z),U.resetFragmentLoading(S)})},a.fragContextChanged=function(S){var p=this.fragCurrent;return!S||!p||S.level!==p.level||S.sn!==p.sn||S.urlId!==p.urlId},a.fragBufferedComplete=function(S,p){var U,z,q,$,re=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log("Buffered "+S.type+" sn: "+S.sn+(p?" part: "+p.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+S.level+" (frag:["+((U=S.startPTS)!=null?U:NaN).toFixed(3)+"-"+((z=S.endPTS)!=null?z:NaN).toFixed(3)+"] > buffer:"+(re?m.default.toString(l.BufferHelper.getBuffered(re)):"(detached)")+")"),this.state=I.IDLE,!re)return;!this.loadedmetadata&&S.type==d.PlaylistLevelType.MAIN&&re.buffered.length&&((q=this.fragCurrent)===null||q===void 0?void 0:q.sn)===(($=this.fragPrevious)===null||$===void 0?void 0:$.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick()},a.seekToStartPos=function(){},a._handleFragmentLoadComplete=function(S){var p=this.transmuxer;if(!p)return;var U=S.frag,z=S.part,q=S.partsLoaded,$=!q||q.length===0||q.some(function(ce){return!ce}),re=new o.ChunkMetadata(U.level,U.sn,U.stats.chunkCount+1,0,z?z.index:-1,!$);p.flush(re)},a._handleFragmentLoadProgress=function(S){},a._doFragLoad=function(S,p,U,z){var q,$=this;if(U===void 0&&(U=null),!this.levels)throw new Error("frag load aborted, missing levels");var re=null;if(S.encrypted&&!((q=S.decryptdata)!==null&&q!==void 0&&q.key)?(this.log("Loading key for "+S.sn+" of ["+p.startSN+"-"+p.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+S.level),this.state=I.KEY_LOADING,this.fragCurrent=S,re=this.keyLoader.load(S).then(function(he){if(!$.fragContextChanged(he.frag))return $.hls.trigger(r.Events.KEY_LOADED,he),$.state===I.KEY_LOADING&&($.state=I.IDLE),he}),this.hls.trigger(r.Events.KEY_LOADING,{frag:S}),this.throwIfFragContextChanged("KEY_LOADING")):!S.encrypted&&p.encryptedFragments.length&&this.keyLoader.loadClear(S,p.encryptedFragments),U=Math.max(S.start,U||0),this.config.lowLatencyMode&&p){var ce=p.partList;if(ce&&z){U>S.end&&p.fragmentHint&&(S=p.fragmentHint);var ne=this.getNextPart(ce,S,U);if(ne>-1){var me=ce[ne];return this.log("Loading part sn: "+S.sn+" p: "+me.index+" cc: "+S.cc+" of playlist ["+p.startSN+"-"+p.endSN+"] parts [0-"+ne+"-"+(ce.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+S.level+", target: "+parseFloat(U.toFixed(3))),this.nextLoadPosition=me.start+me.duration,this.state=I.FRAG_LOADING,this.hls.trigger(r.Events.FRAG_LOADING,{frag:S,part:ce[ne],targetBufferTime:U}),this.throwIfFragContextChanged("FRAG_LOADING parts"),re?re.then(function(he){return!he||$.fragContextChanged(he.frag)?null:$.doFragPartsLoad(S,ce,ne,z)}).catch(function(he){return $.handleFragLoadError(he)}):this.doFragPartsLoad(S,ce,ne,z).catch(function(he){return $.handleFragLoadError(he)})}else if(!S.url||this.loadedEndOfParts(ce,U))return Promise.resolve(null)}}this.log("Loading fragment "+S.sn+" cc: "+S.cc+" "+(p?"of ["+p.startSN+"-"+p.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+S.level+", target: "+parseFloat(U.toFixed(3))),(0,T.isFiniteNumber)(S.sn)&&!this.bitrateTest&&(this.nextLoadPosition=S.start+S.duration),this.state=I.FRAG_LOADING,this.hls.trigger(r.Events.FRAG_LOADING,{frag:S,targetBufferTime:U}),this.throwIfFragContextChanged("FRAG_LOADING");var be=this.config.progressive;return be&&re?re.then(function(he){return!he||$.fragContextChanged(he==null?void 0:he.frag)?null:$.fragmentLoader.load(S,z)}).catch(function(he){return $.handleFragLoadError(he)}):Promise.all([this.fragmentLoader.load(S,be?z:void 0),re]).then(function(he){var se=he[0];return!be&&se&&z&&z(se),se}).catch(function(he){return $.handleFragLoadError(he)})},a.throwIfFragContextChanged=function(S){if(this.fragCurrent===null)throw new Error("frag load aborted, context changed in "+S)},a.doFragPartsLoad=function(S,p,U,z){var q=this;return new Promise(function($,re){var ce=[],ne=function me(be){var he=p[be];q.fragmentLoader.loadPart(S,he,z).then(function(se){ce[he.index]=se;var _e=se.part;q.hls.trigger(r.Events.FRAG_LOADED,se);var De=p[be+1];if(De&&De.fragment===S)me(be+1);else return $({frag:S,part:_e,partsLoaded:ce})}).catch(re)};ne(U)})},a.handleFragLoadError=function(S){if("data"in S){var p=S.data;S.data&&p.details===n.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(p.frag,p.part):this.hls.trigger(r.Events.ERROR,p)}else this.hls.trigger(r.Events.ERROR,{type:n.ErrorTypes.OTHER_ERROR,details:n.ErrorDetails.INTERNAL_EXCEPTION,err:S,fatal:!0});return null},a._handleTransmuxerFlush=function(S){var p=this.getCurrentContext(S);if(!p||this.state!==I.PARSING){!this.fragCurrent&&this.state!==I.STOPPED&&this.state!==I.ERROR&&(this.state=I.IDLE);return}var U=p.frag,z=p.part,q=p.level,$=self.performance.now();U.stats.parsing.end=$,z&&(z.stats.parsing.end=$),this.updateLevelTiming(U,z,q,S.partial)},a.getCurrentContext=function(S){var p=this.levels,U=S.level,z=S.sn,q=S.part;if(!p||!p[U])return this.warn("Levels object was unset while buffering fragment "+z+" of level "+U+". The current chunk will not be buffered."),null;var $=p[U],re=q>-1?(0,y.getPartWith)($,z,q):null,ce=re?re.fragment:(0,y.getFragmentWithSN)($,z,this.fragCurrent);return ce?{frag:ce,part:re,level:$}:null},a.bufferFragmentData=function(S,p,U,z){if(!S||this.state!==I.PARSING)return;var q=S.data1,$=S.data2,re=q;if(q&&$&&(re=(0,c.appendUint8Array)(q,$)),!re||!re.length)return;var ce={type:S.type,frag:p,part:U,chunkMeta:z,parent:p.type,data:re};this.hls.trigger(r.Events.BUFFER_APPENDING,ce),S.dropped&&S.independent&&!U&&this.flushBufferGap(p)},a.flushBufferGap=function(S){var p=this.media;if(!p)return;if(!l.BufferHelper.isBuffered(p,p.currentTime)){this.flushMainBuffer(0,S.start);return}var U=p.currentTime,z=l.BufferHelper.bufferInfo(p,U,0),q=S.duration,$=Math.min(this.config.maxFragLookUpTolerance*2,q*.25),re=Math.max(Math.min(S.start-$,z.end-$),U+$);S.start-re>$&&this.flushMainBuffer(re,S.start)},a.getFwdBufferInfo=function(S,p){var U=this.config,z=this.getLoadPosition();if(!(0,T.isFiniteNumber)(z))return null;var q=l.BufferHelper.bufferInfo(S,z,U.maxBufferHole);if(q.len===0&&q.nextStart!==void 0){var $=this.fragmentTracker.getBufferedFrag(z,p);if($&&q.nextStart<$.end)return l.BufferHelper.bufferInfo(S,z,Math.max(q.nextStart,U.maxBufferHole))}return q},a.getMaxBufferLength=function(S){var p=this.config,U;return S?U=Math.max(8*p.maxBufferSize/S,p.maxBufferLength):U=p.maxBufferLength,Math.min(U,p.maxMaxBufferLength)},a.reduceMaxBufferLength=function(S){var p=this.config,U=S||p.maxBufferLength;return p.maxMaxBufferLength>=U?(p.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+p.maxMaxBufferLength+"s"),!0):!1},a.getNextFragment=function(S,p){var U=p.fragments,z=U.length;if(!z)return null;var q=this.config,$=U[0].start,re;if(p.live){var ce=q.initialLiveManifestSize;if(z<ce)return this.warn("Not enough fragments to start playback (have: "+z+", need: "+ce+")"),null;!p.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(re=this.getInitialLiveFragment(p,U),this.startPosition=re?this.hls.liveSyncPosition||re.start:S)}else S<=$&&(re=U[0]);if(!re){var ne=q.lowLatencyMode?p.partEnd:p.fragmentEnd;re=this.getFragmentAtPosition(S,ne,p)}return this.mapToInitFragWhenRequired(re)},a.mapToInitFragWhenRequired=function(S){return S!=null&&S.initSegment&&!(S!=null&&S.initSegment.data)&&!this.bitrateTest?S.initSegment:S},a.getNextPart=function(S,p,U){for(var z=-1,q=!1,$=!0,re=0,ce=S.length;re<ce;re++){var ne=S[re];if($=$&&!ne.independent,z>-1&&U<ne.start)break;var me=ne.loaded;me?z=-1:(q||ne.independent||$)&&ne.fragment===p&&(z=re),q=me}return z},a.loadedEndOfParts=function(S,p){var U=S[S.length-1];return U&&p>U.start&&U.loaded},a.getInitialLiveFragment=function(S,p){var U=this.fragPrevious,z=null;if(U){if(S.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+U.programDateTime),z=(0,f.findFragmentByPDT)(p,U.endProgramDateTime,this.config.maxFragLookUpTolerance)),!z){var q=U.sn+1;if(q>=S.startSN&&q<=S.endSN){var $=p[q-S.startSN];U.cc===$.cc&&(z=$,this.log("Live playlist, switching playlist, load frag with next SN: "+z.sn))}z||(z=(0,f.findFragWithCC)(p,U.cc),z&&this.log("Live playlist, switching playlist, load frag with same CC: "+z.sn))}}else{var re=this.hls.liveSyncPosition;re!==null&&(z=this.getFragmentAtPosition(re,this.bitrateTest?S.fragmentEnd:S.edge,S))}return z},a.getFragmentAtPosition=function(S,p,U){var z=this.config,q=this.fragPrevious,$=U.fragments,re=U.endSN,ce=U.fragmentHint,ne=z.maxFragLookUpTolerance,me=!!(z.lowLatencyMode&&U.partList&&ce);me&&ce&&!this.bitrateTest&&($=$.concat(ce),re=ce.sn);var be;if(S<p){var he=S>p-ne?0:ne;be=(0,f.findFragmentByPTS)(q,$,S,he)}else be=$[$.length-1];if(be){var se=be.sn-U.startSN;if(this.fragmentTracker.getState(be)===E.FragmentState.OK&&(q=be),q&&be.sn===q.sn&&!me){var _e=q&&be.level===q.level;if(_e){var De=$[se+1];be.sn<re&&this.fragmentTracker.getState(De)!==E.FragmentState.OK?(this.log("SN "+be.sn+" just loaded, load next one: "+De.sn),be=De):be=null}}}return be},a.synchronizeToLiveEdge=function(S){var p=this.config,U=this.media;if(!U)return;var z=this.hls.liveSyncPosition,q=U.currentTime,$=S.fragments[0].start,re=S.edge,ce=q>=$-p.maxFragLookUpTolerance&&q<=re;if(z!==null&&U.duration>z&&(q<z||!ce)){var ne=p.liveMaxLatencyDuration!==void 0?p.liveMaxLatencyDuration:p.liveMaxLatencyDurationCount*S.targetduration;(!ce&&U.readyState<4||q<re-ne)&&(this.loadedmetadata||(this.nextLoadPosition=z),U.readyState&&(this.warn("Playback: "+q.toFixed(3)+" is located too far from the end of live sliding playlist: "+re+", reset currentTime to : "+z.toFixed(3)),U.currentTime=z))}},a.alignPlaylists=function(S,p){var U=this.levels,z=this.levelLastLoaded,q=this.fragPrevious,$=z!==null?U[z]:null,re=S.fragments.length;if(!re)return this.warn("No fragments in live playlist"),0;var ce=S.fragments[0].start,ne=!p,me=S.alignedSliding&&(0,T.isFiniteNumber)(ce);if(ne||!me&&!ce){(0,v.alignStream)(q,$,S);var be=S.fragments[0].start;return this.log("Live playlist sliding: "+be.toFixed(2)+" start-sn: "+(p?p.startSN:"na")+"->"+S.startSN+" prev-sn: "+(q?q.sn:"na")+" fragments: "+re),be}return ce},a.waitForCdnTuneIn=function(S){var p=3;return S.live&&S.canBlockReload&&S.partTarget&&S.tuneInGoal>Math.max(S.partHoldBack,S.partTarget*p)},a.setStartPosition=function(S,p){var U=this.startPosition;if(U<p&&(U=-1),U===-1||this.lastCurrentTime===-1){var z=S.startTimeOffset;(0,T.isFiniteNumber)(z)?(U=p+z,z<0&&(U+=S.totalduration),U=Math.min(Math.max(p,U),p+S.totalduration),this.log("Start time offset "+z+" found in playlist, adjust startPosition to "+U),this.startPosition=U):S.live?U=this.hls.liveSyncPosition||p:this.startPosition=U=0,this.lastCurrentTime=U}this.nextLoadPosition=U},a.getLoadPosition=function(){var S=this.media,p=0;return this.loadedmetadata&&S?p=S.currentTime:this.nextLoadPosition&&(p=this.nextLoadPosition),p},a.handleFragLoadAborted=function(S,p){this.transmuxer&&S.sn!=="initSegment"&&S.stats.aborted&&(this.warn("Fragment "+S.sn+(p?" part"+p.index:"")+" of level "+S.level+" was aborted"),this.resetFragmentLoading(S))},a.resetFragmentLoading=function(S){(!this.fragCurrent||!this.fragContextChanged(S)&&this.state!==I.FRAG_LOADING_WAITING_RETRY)&&(this.state=I.IDLE)},a.onFragmentOrKeyLoadError=function(S,p){if(p.fatal){this.stopLoad(),this.state=I.ERROR;return}var U=this.config;if(p.chunkMeta){var z=this.getCurrentContext(p.chunkMeta);z&&(p.frag=z.frag,p.levelRetry=!0,this.fragLoadError=U.fragLoadingMaxRetry)}var q=p.frag;if(!q||q.type!==S)return;var $=this.fragCurrent;if(console.assert($&&q.sn===$.sn&&q.level===$.level&&q.urlId===$.urlId,"Frag load error must match current frag to retry"),this.fragLoadError+1<=U.fragLoadingMaxRetry){this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition);var re=Math.min(Math.pow(2,this.fragLoadError)*U.fragLoadingRetryDelay,U.fragLoadingMaxRetryTimeout);this.warn("Fragment "+q.sn+" of "+S+" "+q.level+" failed to load, retrying in "+re+"ms"),this.retryDate=self.performance.now()+re,this.fragLoadError++,this.state=I.FRAG_LOADING_WAITING_RETRY}else p.levelRetry?(S===d.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=I.IDLE):(_.logger.error(p.details+" reaches max retry, redispatch as fatal ..."),p.fatal=!0,this.hls.stopLoad(),this.state=I.ERROR)},a.afterBufferFlushed=function(S,p,U){if(!S)return;var z=l.BufferHelper.getBuffered(S);this.fragmentTracker.detectEvictedFragments(p,z,U),this.state===I.ENDED&&this.resetLoadingState()},a.resetLoadingState=function(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=I.IDLE},a.resetStartWhenNotLoaded=function(S){if(!this.loadedmetadata){this.startFragRequested=!1;var p=this.levels?this.levels[S].details:null;p!=null&&p.live?(this.startPosition=-1,this.setStartPosition(p,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}},a.updateLevelTiming=function(S,p,U,z){var q=this,$=U.details;console.assert(!!$,"level.details must be defined");var re=Object.keys(S.elementaryStreams).reduce(function(ce,ne){var me=S.elementaryStreams[ne];if(me){var be=me.endPTS-me.startPTS;if(be<=0)return q.warn("Could not parse fragment "+S.sn+" "+ne+" duration reliably ("+be+")"),ce||!1;var he=z?0:(0,y.updateFragPTSDTS)($,S,me.startPTS,me.endPTS,me.startDTS,me.endDTS);return q.hls.trigger(r.Events.LEVEL_PTS_UPDATED,{details:$,level:U,drift:he,type:ne,frag:S,start:me.startPTS,end:me.endPTS}),!0}return ce},!1);re||(this.warn("Found no media in fragment "+S.sn+" of level "+U.id+" resetting transmuxer to fallback to playlist timing"),this.resetTransmuxer()),this.state=I.PARSED,this.hls.trigger(r.Events.FRAG_PARSED,{frag:S,part:p})},a.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},R(g,[{key:"state",get:function(){return this._state},set:function(S){var p=this._state;p!==S&&(this._state=S,this.log(p+"->"+S))}}]),g}(e.default)},"./src/controller/buffer-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>f});var T=i("./src/polyfills/number.ts"),e=i("./src/events.ts"),E=i("./src/utils/logger.ts"),l=i("./src/errors.ts"),_=i("./src/utils/buffer-helper.ts"),r=i("./src/utils/mediasource-helper.ts"),n=i("./src/loader/fragment.ts"),o=i("./src/controller/buffer-operation-queue.ts"),c=(0,r.getMediaSource)(),v=/([ha]vc.)(?:\.[^.,]+)+/,f=function(){function y(b){var m=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.lastMpegAudioChunk=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var d=m.media,x=m.mediaSource;E.logger.log("[buffer-controller]: Media source opened"),d&&(d.removeEventListener("emptied",m._onMediaEmptied),m.updateMediaElementDuration(),m.hls.trigger(e.Events.MEDIA_ATTACHED,{media:d})),x&&x.removeEventListener("sourceopen",m._onMediaSourceOpen),m.checkPendingTracks()},this._onMediaSourceClose=function(){E.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){E.logger.log("[buffer-controller]: Media source ended")},this._onMediaEmptied=function(){var d=m.media,x=m._objectUrl;d&&d.src!==x&&E.logger.error("Media element src was set while attaching MediaSource ("+x+" > "+d.src+")")},this.hls=b,this._initSourceBuffer(),this.registerListeners()}var h=y.prototype;return h.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},h.destroy=function(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null},h.registerListeners=function(){var m=this.hls;m.on(e.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),m.on(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.on(e.Events.MANIFEST_PARSED,this.onManifestParsed,this),m.on(e.Events.BUFFER_RESET,this.onBufferReset,this),m.on(e.Events.BUFFER_APPENDING,this.onBufferAppending,this),m.on(e.Events.BUFFER_CODECS,this.onBufferCodecs,this),m.on(e.Events.BUFFER_EOS,this.onBufferEos,this),m.on(e.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),m.on(e.Events.LEVEL_UPDATED,this.onLevelUpdated,this),m.on(e.Events.FRAG_PARSED,this.onFragParsed,this),m.on(e.Events.FRAG_CHANGED,this.onFragChanged,this)},h.unregisterListeners=function(){var m=this.hls;m.off(e.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),m.off(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.off(e.Events.MANIFEST_PARSED,this.onManifestParsed,this),m.off(e.Events.BUFFER_RESET,this.onBufferReset,this),m.off(e.Events.BUFFER_APPENDING,this.onBufferAppending,this),m.off(e.Events.BUFFER_CODECS,this.onBufferCodecs,this),m.off(e.Events.BUFFER_EOS,this.onBufferEos,this),m.off(e.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),m.off(e.Events.LEVEL_UPDATED,this.onLevelUpdated,this),m.off(e.Events.FRAG_PARSED,this.onFragParsed,this),m.off(e.Events.FRAG_CHANGED,this.onFragChanged,this)},h._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new o.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null},h.onManifestParsed=function(m,d){var x=2;(d.audio&&!d.video||!d.altAudio)&&(x=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=x,this.details=null,E.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},h.onMediaAttaching=function(m,d){var x=this.media=d.media;if(x&&c){var R=this.mediaSource=new c;R.addEventListener("sourceopen",this._onMediaSourceOpen),R.addEventListener("sourceended",this._onMediaSourceEnded),R.addEventListener("sourceclose",this._onMediaSourceClose),x.src=self.URL.createObjectURL(R),this._objectUrl=x.src,x.addEventListener("emptied",this._onMediaEmptied)}},h.onMediaDetaching=function(){var m=this.media,d=this.mediaSource,x=this._objectUrl;if(d){if(E.logger.log("[buffer-controller]: media source detaching"),d.readyState==="open")try{d.endOfStream()}catch(R){E.logger.warn("[buffer-controller]: onMediaDetaching: "+R.message+" while calling endOfStream")}this.onBufferReset(),d.removeEventListener("sourceopen",this._onMediaSourceOpen),d.removeEventListener("sourceended",this._onMediaSourceEnded),d.removeEventListener("sourceclose",this._onMediaSourceClose),m&&(m.removeEventListener("emptied",this._onMediaEmptied),x&&self.URL.revokeObjectURL(x),m.src===x?(m.removeAttribute("src"),m.load()):E.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(e.Events.MEDIA_DETACHED,void 0)},h.onBufferReset=function(){var m=this;this.getSourceBufferTypes().forEach(function(d){var x=m.sourceBuffer[d];try{x&&(m.removeBufferListeners(d),m.mediaSource&&m.mediaSource.removeSourceBuffer(x),m.sourceBuffer[d]=void 0)}catch(R){E.logger.warn("[buffer-controller]: Failed to reset the "+d+" buffer",R)}}),this._initSourceBuffer()},h.onBufferCodecs=function(m,d){var x=this,R=this.getSourceBufferTypes().length;if(Object.keys(d).forEach(function(O){if(R){var w=x.tracks[O];if(w&&typeof w.buffer.changeType=="function"){var D=d[O],A=D.id,P=D.codec,I=D.levelCodec,u=D.container,k=D.metadata,g=(w.levelCodec||w.codec).replace(v,"$1"),a=(I||P).replace(v,"$1");if(g!==a){var C=u+";codecs="+(I||P);x.appendChangeType(O,C),E.logger.log("[buffer-controller]: switching codec "+g+" to "+a),x.tracks[O]={buffer:w.buffer,codec:P,container:u,levelCodec:I,metadata:k,id:A}}}}else x.pendingTracks[O]=d[O]}),R)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},h.appendChangeType=function(m,d){var x=this,R=this.operationQueue,O={execute:function(){var D=x.sourceBuffer[m];D&&(E.logger.log("[buffer-controller]: changing "+m+" sourceBuffer type to "+d),D.changeType(d)),R.shiftAndExecuteNext(m)},onStart:function(){},onComplete:function(){},onError:function(D){E.logger.warn("[buffer-controller]: Failed to change "+m+" SourceBuffer type",D)}};R.append(O,m)},h.onBufferAppending=function(m,d){var x=this,R=this.hls,O=this.operationQueue,w=this.tracks,D=d.data,A=d.type,P=d.frag,I=d.part,u=d.chunkMeta,k=u.buffering[A],g=self.performance.now();k.start=g;var a=P.stats.buffering,C=I?I.stats.buffering:null;a.start===0&&(a.start=g),C&&C.start===0&&(C.start=g);var S=w.audio,p=!1;A==="audio"&&(S==null?void 0:S.container)==="audio/mpeg"&&(p=!this.lastMpegAudioChunk||u.id===1||this.lastMpegAudioChunk.sn!==u.sn,this.lastMpegAudioChunk=u);var U=P.start,z={execute:function(){if(k.executeStart=self.performance.now(),p){var $=x.sourceBuffer[A];if($){var re=U-$.timestampOffset;Math.abs(re)>=.1&&(E.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+U+" (delta: "+re+") sn: "+P.sn+")"),$.timestampOffset=U)}}x.appendExecutor(D,A)},onStart:function(){},onComplete:function(){var $=self.performance.now();k.executeEnd=k.end=$,a.first===0&&(a.first=$),C&&C.first===0&&(C.first=$);var re=x.sourceBuffer,ce={};for(var ne in re)ce[ne]=_.BufferHelper.getBuffered(re[ne]);x.appendError=0,x.hls.trigger(e.Events.BUFFER_APPENDED,{type:A,frag:P,part:I,chunkMeta:u,parent:P.type,timeRanges:ce})},onError:function($){E.logger.error("[buffer-controller]: Error encountered while trying to append to the "+A+" SourceBuffer",$);var re={type:l.ErrorTypes.MEDIA_ERROR,parent:P.type,details:l.ErrorDetails.BUFFER_APPEND_ERROR,err:$,fatal:!1};$.code===DOMException.QUOTA_EXCEEDED_ERR?re.details=l.ErrorDetails.BUFFER_FULL_ERROR:(x.appendError++,re.details=l.ErrorDetails.BUFFER_APPEND_ERROR,x.appendError>R.config.appendErrorMaxRetry&&(E.logger.error("[buffer-controller]: Failed "+R.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),re.fatal=!0,R.stopLoad())),R.trigger(e.Events.ERROR,re)}};O.append(z,A)},h.onBufferFlushing=function(m,d){var x=this,R=this.operationQueue,O=function(D){return{execute:x.removeExecutor.bind(x,D,d.startOffset,d.endOffset),onStart:function(){},onComplete:function(){x.hls.trigger(e.Events.BUFFER_FLUSHED,{type:D})},onError:function(P){E.logger.warn("[buffer-controller]: Failed to remove from "+D+" SourceBuffer",P)}}};d.type?R.append(O(d.type),d.type):this.getSourceBufferTypes().forEach(function(w){R.append(O(w),w)})},h.onFragParsed=function(m,d){var x=this,R=d.frag,O=d.part,w=[],D=O?O.elementaryStreams:R.elementaryStreams;D[n.ElementaryStreamTypes.AUDIOVIDEO]?w.push("audiovideo"):(D[n.ElementaryStreamTypes.AUDIO]&&w.push("audio"),D[n.ElementaryStreamTypes.VIDEO]&&w.push("video"));var A=function(){var I=self.performance.now();R.stats.buffering.end=I,O&&(O.stats.buffering.end=I);var u=O?O.stats:R.stats;x.hls.trigger(e.Events.FRAG_BUFFERED,{frag:R,part:O,stats:u,id:R.type})};w.length===0&&E.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+R.type+" level: "+R.level+" sn: "+R.sn),this.blockBuffers(A,w)},h.onFragChanged=function(m,d){this.flushBackBuffer()},h.onBufferEos=function(m,d){var x=this,R=this.getSourceBufferTypes().reduce(function(O,w){var D=x.sourceBuffer[w];return D&&(!d.type||d.type===w)&&(D.ending=!0,D.ended||(D.ended=!0,E.logger.log("[buffer-controller]: "+w+" sourceBuffer now EOS"))),O&&!!(!D||D.ended)},!0);R&&(E.logger.log("[buffer-controller]: Queueing mediaSource.endOfStream()"),this.blockBuffers(function(){x.getSourceBufferTypes().forEach(function(w){var D=x.sourceBuffer[w];D&&(D.ending=!1)});var O=x.mediaSource;if(!O||O.readyState!=="open"){O&&E.logger.info("[buffer-controller]: Could not call mediaSource.endOfStream(). mediaSource.readyState: "+O.readyState);return}E.logger.log("[buffer-controller]: Calling mediaSource.endOfStream()"),O.endOfStream()}))},h.onLevelUpdated=function(m,d){var x=d.details;if(!x.fragments.length)return;this.details=x,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},h.flushBackBuffer=function(){var m=this.hls,d=this.details,x=this.media,R=this.sourceBuffer;if(!x||d===null)return;var O=this.getSourceBufferTypes();if(!O.length)return;var w=d.live&&m.config.liveBackBufferLength!==null?m.config.liveBackBufferLength:m.config.backBufferLength;if(!(0,T.isFiniteNumber)(w)||w<0)return;var D=x.currentTime,A=d.levelTargetDuration,P=Math.max(w,A),I=Math.floor(D/A)*A-P;O.forEach(function(u){var k=R[u];if(k){var g=_.BufferHelper.getBuffered(k);if(g.length>0&&I>g.start(0)){if(m.trigger(e.Events.BACK_BUFFER_REACHED,{bufferEnd:I}),d.live)m.trigger(e.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:I});else if(k.ended&&g.end(g.length-1)-D<A*2){E.logger.info("[buffer-controller]: Cannot flush "+u+" back buffer while SourceBuffer is in ended state");return}m.trigger(e.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:I,type:u})}}})},h.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var m=this.details,d=this.hls,x=this.media,R=this.mediaSource,O=m.fragments[0].start+m.totalduration,w=x.duration,D=(0,T.isFiniteNumber)(R.duration)?R.duration:0;m.live&&d.config.liveDurationInfinity?(E.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),R.duration=Infinity,this.updateSeekableRange(m)):(O>D&&O>w||!(0,T.isFiniteNumber)(w))&&(E.logger.log("[buffer-controller]: Updating Media Source duration to "+O.toFixed(3)),R.duration=O)},h.updateSeekableRange=function(m){var d=this.mediaSource,x=m.fragments,R=x.length;if(R&&m.live&&d!==null&&d!==void 0&&d.setLiveSeekableRange){var O=Math.max(0,x[0].start),w=Math.max(O,O+m.totalduration);d.setLiveSeekableRange(O,w)}},h.checkPendingTracks=function(){var m=this.bufferCodecEventsExpected,d=this.operationQueue,x=this.pendingTracks,R=Object.keys(x).length;if(R&&!m||R===2){this.createSourceBuffers(x),this.pendingTracks={};var O=this.getSourceBufferTypes();if(O.length===0){this.hls.trigger(e.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}O.forEach(function(w){d.executeNext(w)})}},h.createSourceBuffers=function(m){var d=this.sourceBuffer,x=this.mediaSource;if(!x)throw Error("createSourceBuffers called when mediaSource was null");var R=0;for(var O in m)if(!d[O]){var w=m[O];if(!w)throw Error("source buffer exists for track "+O+", however track does not");var D=w.levelCodec||w.codec,A=w.container+";codecs="+D;E.logger.log("[buffer-controller]: creating sourceBuffer("+A+")");try{var P=d[O]=x.addSourceBuffer(A),I=O;this.addBufferListener(I,"updatestart",this._onSBUpdateStart),this.addBufferListener(I,"updateend",this._onSBUpdateEnd),this.addBufferListener(I,"error",this._onSBUpdateError),this.tracks[O]={buffer:P,codec:D,container:w.container,levelCodec:w.levelCodec,metadata:w.metadata,id:w.id},R++}catch(u){E.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+u.message),this.hls.trigger(e.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:u,mimeType:A})}}R&&this.hls.trigger(e.Events.BUFFER_CREATED,{tracks:this.tracks})},h._onSBUpdateStart=function(m){var d=this.operationQueue,x=d.current(m);x.onStart()},h._onSBUpdateEnd=function(m){var d=this.operationQueue,x=d.current(m);x.onComplete(),d.shiftAndExecuteNext(m)},h._onSBUpdateError=function(m,d){E.logger.error("[buffer-controller]: "+m+" SourceBuffer error",d),this.hls.trigger(e.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var x=this.operationQueue.current(m);x&&x.onError(d)},h.removeExecutor=function(m,d,x){var R=this.media,O=this.mediaSource,w=this.operationQueue,D=this.sourceBuffer,A=D[m];if(!R||!O||!A){E.logger.warn("[buffer-controller]: Attempting to remove from the "+m+" SourceBuffer, but it does not exist"),w.shiftAndExecuteNext(m);return}var P=(0,T.isFiniteNumber)(R.duration)?R.duration:Infinity,I=(0,T.isFiniteNumber)(O.duration)?O.duration:Infinity,u=Math.max(0,d),k=Math.min(x,P,I);k>u&&!A.ending?(A.ended=!1,E.logger.log("[buffer-controller]: Removing ["+u+","+k+"] from the "+m+" SourceBuffer"),console.assert(!A.updating,m+" sourceBuffer must not be updating"),A.remove(u,k)):w.shiftAndExecuteNext(m)},h.appendExecutor=function(m,d){var x=this.operationQueue,R=this.sourceBuffer,O=R[d];if(!O){E.logger.warn("[buffer-controller]: Attempting to append to the "+d+" SourceBuffer, but it does not exist"),x.shiftAndExecuteNext(d);return}O.ended=!1,console.assert(!O.updating,d+" sourceBuffer must not be updating"),O.appendBuffer(m)},h.blockBuffers=function(m,d){var x=this;if(d===void 0&&(d=this.getSourceBufferTypes()),!d.length){E.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(m);return}var R=this.operationQueue,O=d.map(function(w){return R.appendBlocker(w)});Promise.all(O).then(function(){m(),d.forEach(function(w){var D=x.sourceBuffer[w];(!D||!D.updating)&&R.shiftAndExecuteNext(w)})})},h.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},h.addBufferListener=function(m,d,x){var R=this.sourceBuffer[m];if(!R)return;var O=x.bind(this,m);this.listeners[m].push({event:d,listener:O}),R.addEventListener(d,O)},h.removeBufferListeners=function(m){var d=this.sourceBuffer[m];if(!d)return;this.listeners[m].forEach(function(x){d.removeEventListener(x.event,x.listener)})},y}()},"./src/controller/buffer-operation-queue.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>e});var T=i("./src/utils/logger.ts"),e=function(){function E(_){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=_}var l=E.prototype;return l.append=function(r,n){var o=this.queues[n];o.push(r),o.length===1&&this.buffers[n]&&this.executeNext(n)},l.insertAbort=function(r,n){var o=this.queues[n];o.unshift(r),this.executeNext(n)},l.appendBlocker=function(r){var n,o=new Promise(function(v){n=v}),c={execute:n,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(c,r),o},l.executeNext=function(r){var n=this.buffers,o=this.queues,c=n[r],v=o[r];if(v.length){var f=v[0];try{f.execute()}catch(y){T.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),f.onError(y),(!c||!c.updating)&&(v.shift(),this.executeNext(r))}}},l.shiftAndExecuteNext=function(r){this.queues[r].shift(),this.executeNext(r)},l.current=function(r){return this.queues[r][0]},E}()},"./src/controller/cap-level-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>n});var T=i("./src/events.ts");function e(o,c){for(var v=0;v<c.length;v++){var f=c[v];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(o,l(f.key),f)}}function E(o,c,v){return c&&e(o.prototype,c),v&&e(o,v),Object.defineProperty(o,"prototype",{writable:!1}),o}function l(o){var c=_(o,"string");return typeof c=="symbol"?c:String(c)}function _(o,c){if(typeof o!="object"||o===null)return o;var v=o[Symbol.toPrimitive];if(v!==void 0){var f=v.call(o,c||"default");if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(o)}var r=function(){function o(v){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=v,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var c=o.prototype;return c.setStreamController=function(f){this.streamController=f},c.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},c.registerListeners=function(){var f=this.hls;f.on(T.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),f.on(T.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),f.on(T.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.on(T.Events.BUFFER_CODECS,this.onBufferCodecs,this),f.on(T.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},c.unregisterListener=function(){var f=this.hls;f.off(T.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),f.off(T.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),f.off(T.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.off(T.Events.BUFFER_CODECS,this.onBufferCodecs,this),f.off(T.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},c.onFpsDropLevelCapping=function(f,y){o.isLevelAllowed(y.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(y.droppedLevel)},c.onMediaAttaching=function(f,y){this.media=y.media instanceof HTMLVideoElement?y.media:null,this.clientRect=null},c.onManifestParsed=function(f,y){var h=this.hls;this.restrictedLevels=[],this.firstLevel=y.firstLevel,h.config.capLevelToPlayerSize&&y.video&&this.startCapping()},c.onBufferCodecs=function(f,y){var h=this.hls;h.config.capLevelToPlayerSize&&y.video&&this.startCapping()},c.onMediaDetaching=function(){this.stopCapping()},c.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var f=this.hls.levels;if(f.length){var y=this.hls;y.autoLevelCapping=this.getMaxLevel(f.length-1),y.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=y.autoLevelCapping}}},c.getMaxLevel=function(f){var y=this,h=this.hls.levels;if(!h.length)return-1;var b=h.filter(function(m,d){return o.isLevelAllowed(d,y.restrictedLevels)&&d<=f});return this.clientRect=null,o.getMaxLevelByMediaSize(b,this.mediaWidth,this.mediaHeight)},c.startCapping=function(){if(this.timer)return;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()},c.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},c.getDimensions=function(){if(this.clientRect)return this.clientRect;var f=this.media,y={width:0,height:0};if(f){var h=f.getBoundingClientRect();y.width=h.width,y.height=h.height,!y.width&&!y.height&&(y.width=h.right-h.left||f.width||0,y.height=h.bottom-h.top||f.height||0)}return this.clientRect=y,y},o.isLevelAllowed=function(f,y){return y===void 0&&(y=[]),y.indexOf(f)===-1},o.getMaxLevelByMediaSize=function(f,y,h){if(!f||!f.length)return-1;for(var b=function(O,w){return w?O.width!==w.width||O.height!==w.height:!0},m=f.length-1,d=0;d<f.length;d+=1){var x=f[d];if((x.width>=y||x.height>=h)&&b(x,f[d+1])){m=d;break}}return m},E(o,[{key:"mediaWidth",get:function(){return this.getDimensions().width*this.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*this.contentScaleFactor}},{key:"contentScaleFactor",get:function(){var f=1;if(!this.hls.config.ignoreDevicePixelRatio)try{f=self.devicePixelRatio}catch(y){}return f}}]),o}();const n=r},"./src/controller/cmcd-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>h});var T=i("./src/events.ts"),e=i("./src/types/cmcd.ts"),E=i("./src/utils/buffer-helper.ts"),l=i("./src/utils/logger.ts");function _(b,m){for(var d=0;d<m.length;d++){var x=m[d];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(b,n(x.key),x)}}function r(b,m,d){return m&&_(b.prototype,m),d&&_(b,d),Object.defineProperty(b,"prototype",{writable:!1}),b}function n(b){var m=o(b,"string");return typeof m=="symbol"?m:String(m)}function o(b,m){if(typeof b!="object"||b===null)return b;var d=b[Symbol.toPrimitive];if(d!==void 0){var x=d.call(b,m||"default");if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(b)}function c(b,m){var d=typeof Symbol!="undefined"&&b[Symbol.iterator]||b["@@iterator"];if(d)return(d=d.call(b)).next.bind(d);if(Array.isArray(b)||(d=v(b))||m&&b&&typeof b.length=="number"){d&&(b=d);var x=0;return function(){return x>=b.length?{done:!0}:{done:!1,value:b[x++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v(b,m){if(!b)return;if(typeof b=="string")return f(b,m);var d=Object.prototype.toString.call(b).slice(8,-1);if(d==="Object"&&b.constructor&&(d=b.constructor.name),d==="Map"||d==="Set")return Array.from(b);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return f(b,m)}function f(b,m){(m==null||m>b.length)&&(m=b.length);for(var d=0,x=new Array(m);d<m;d++)x[d]=b[d];return x}function y(){return y=Object.assign?Object.assign.bind():function(b){for(var m=1;m<arguments.length;m++){var d=arguments[m];for(var x in d)Object.prototype.hasOwnProperty.call(d,x)&&(b[x]=d[x])}return b},y.apply(this,arguments)}var h=function(){function b(d){var x=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(){x.initialized&&(x.starved=!0),x.buffering=!0},this.onPlaying=function(){x.initialized||(x.initialized=!0),x.buffering=!1},this.applyPlaylistData=function(w){try{x.apply(w,{ot:e.CMCDObjectType.MANIFEST,su:!x.initialized})}catch(D){l.logger.warn("Could not generate manifest CMCD data.",D)}},this.applyFragmentData=function(w){try{var D=w.frag,A=x.hls.levels[D.level],P=x.getObjectType(D),I={d:D.duration*1e3,ot:P};(P===e.CMCDObjectType.VIDEO||P===e.CMCDObjectType.AUDIO||P==e.CMCDObjectType.MUXED)&&(I.br=A.bitrate/1e3,I.tb=x.getTopBandwidth(P)/1e3,I.bl=x.getBufferLength(P)),x.apply(w,I)}catch(u){l.logger.warn("Could not generate segment CMCD data.",u)}},this.hls=d;var R=this.config=d.config,O=R.cmcd;O!=null&&(R.pLoader=this.createPlaylistLoader(),R.fLoader=this.createFragmentLoader(),this.sid=O.sessionId||b.uuid(),this.cid=O.contentId,this.useHeaders=O.useHeaders===!0,this.registerListeners())}var m=b.prototype;return m.registerListeners=function(){var x=this.hls;x.on(T.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(T.Events.MEDIA_DETACHED,this.onMediaDetached,this),x.on(T.Events.BUFFER_CREATED,this.onBufferCreated,this)},m.unregisterListeners=function(){var x=this.hls;x.off(T.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(T.Events.MEDIA_DETACHED,this.onMediaDetached,this),x.off(T.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},m.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},m.onMediaAttached=function(x,R){this.media=R.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},m.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},m.onBufferCreated=function(x,R){var O,w;this.audioBuffer=(O=R.tracks.audio)===null||O===void 0?void 0:O.buffer,this.videoBuffer=(w=R.tracks.video)===null||w===void 0?void 0:w.buffer},m.createData=function(){var x;return{v:e.CMCDVersion,sf:e.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(x=this.media)===null||x===void 0?void 0:x.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},m.apply=function(x,R){R===void 0&&(R={}),y(R,this.createData());var O=R.ot===e.CMCDObjectType.INIT||R.ot===e.CMCDObjectType.VIDEO||R.ot===e.CMCDObjectType.MUXED;if(this.starved&&O&&(R.bs=!0,R.su=!0,this.starved=!1),R.su==null&&(R.su=this.buffering),this.useHeaders){var w=b.toHeaders(R);if(!Object.keys(w).length)return;x.headers||(x.headers={}),y(x.headers,w)}else{var D=b.toQuery(R);if(!D)return;x.url=b.appendQueryToUri(x.url,D)}},m.getObjectType=function(x){var R=x.type;return R==="subtitle"?e.CMCDObjectType.TIMED_TEXT:x.sn==="initSegment"?e.CMCDObjectType.INIT:R==="audio"?e.CMCDObjectType.AUDIO:R==="main"?this.hls.audioTracks.length?e.CMCDObjectType.VIDEO:e.CMCDObjectType.MUXED:void 0},m.getTopBandwidth=function(x){var R=0,O,w=this.hls;if(x===e.CMCDObjectType.AUDIO)O=w.audioTracks;else{var D=w.maxAutoLevel,A=D>-1?D+1:w.levels.length;O=w.levels.slice(0,A)}for(var P=c(O),I;!(I=P()).done;){var u=I.value;u.bitrate>R&&(R=u.bitrate)}return R>0?R:NaN},m.getBufferLength=function(x){var R=this.hls.media,O=x===e.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!O||!R)return NaN;var w=E.BufferHelper.bufferInfo(O,R.currentTime,this.config.maxBufferHole);return w.len*1e3},m.createPlaylistLoader=function(){var x=this.config.pLoader,R=this.applyPlaylistData,O=x||this.config.loader;return function(){function w(A){this.loader=void 0,this.loader=new O(A)}var D=w.prototype;return D.destroy=function(){this.loader.destroy()},D.abort=function(){this.loader.abort()},D.load=function(P,I,u){R(P),this.loader.load(P,I,u)},r(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},m.createFragmentLoader=function(){var x=this.config.fLoader,R=this.applyFragmentData,O=x||this.config.loader;return function(){function w(A){this.loader=void 0,this.loader=new O(A)}var D=w.prototype;return D.destroy=function(){this.loader.destroy()},D.abort=function(){this.loader.abort()},D.load=function(P,I,u){R(P),this.loader.load(P,I,u)},r(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},b.uuid=function(){var x=URL.createObjectURL(new Blob),R=x.toString();return URL.revokeObjectURL(x),R.slice(R.lastIndexOf("/")+1)},b.serialize=function(x){for(var R=[],O=function(z){return!Number.isNaN(z)&&z!=null&&z!==""&&z!==!1},w=function(z){return Math.round(z)},D=function(z){return w(z/100)*100},A=function(z){return encodeURIComponent(z)},P={br:w,d:w,bl:D,dl:D,mtp:D,nor:A,rtp:D,tb:w},I=Object.keys(x||{}).sort(),u=c(I),k;!(k=u()).done;){var g=k.value,a=x[g];if(!O(a))continue;if(g==="v"&&a===1)continue;if(g=="pr"&&a===1)continue;var C=P[g];C&&(a=C(a));var S=typeof a,p=void 0;g==="ot"||g==="sf"||g==="st"?p=g+"="+a:S==="boolean"?p=g:S==="number"?p=g+"="+a:p=g+"="+JSON.stringify(a),R.push(p)}return R.join(",")},b.toHeaders=function(x){for(var R=Object.keys(x),O={},w=["Object","Request","Session","Status"],D=[{},{},{},{}],A={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},P=0,I=R;P<I.length;P++){var u=I[P],k=A[u]!=null?A[u]:1;D[k][u]=x[u]}for(var g=0;g<D.length;g++){var a=b.serialize(D[g]);a&&(O["CMCD-"+w[g]]=a)}return O},b.toQuery=function(x){return"CMCD="+encodeURIComponent(b.serialize(x))},b.appendQueryToUri=function(x,R){if(!R)return x;var O=x.includes("?")?"&":"?";return""+x+O+R},b}()},"./src/controller/eme-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>P});var T=i("./src/events.ts"),e=i("./src/errors.ts"),E=i("./src/utils/logger.ts"),l=i("./src/utils/mediakeys-helper.ts"),_=i("./src/utils/keysystem-util.ts"),r=i("./src/utils/numeric-encoding-utils.ts"),n=i("./src/loader/level-key.ts"),o=i("./src/utils/hex.ts"),c=i("./src/utils/mp4-tools.ts"),v=i("./node_modules/eventemitter3/index.js"),f=i.n(v);function y(I,u){I.prototype=Object.create(u.prototype),I.prototype.constructor=I,x(I,u)}function h(I){var u=typeof Map=="function"?new Map:void 0;return h=function(g){if(g===null||!d(g))return g;if(typeof g!="function")throw new TypeError("Super expression must either be null or a function");if(typeof u!="undefined"){if(u.has(g))return u.get(g);u.set(g,a)}function a(){return b(g,arguments,R(this).constructor)}return a.prototype=Object.create(g.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),x(a,g)},h(I)}function b(I,u,k){return m()?b=Reflect.construct.bind():b=function(a,C,S){var p=[null];p.push.apply(p,C);var U=Function.bind.apply(a,p),z=new U;return S&&x(z,S.prototype),z},b.apply(null,arguments)}function m(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(I){return!1}}function d(I){return Function.toString.call(I).indexOf("[native code]")!==-1}function x(I,u){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,a){return g.__proto__=a,g},x(I,u)}function R(I){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(k){return k.__proto__||Object.getPrototypeOf(k)},R(I)}var O=3,w="[eme]",D=function(){function I(k){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=I.CDMCleanupPromise?[I.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=E.logger.debug.bind(E.logger,w),this.log=E.logger.log.bind(E.logger,w),this.warn=E.logger.warn.bind(E.logger,w),this.error=E.logger.error.bind(E.logger,w),this.hls=k,this.config=k.config,this.registerListeners()}var u=I.prototype;return u.destroy=function(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null},u.registerListeners=function(){this.hls.on(T.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(T.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(T.Events.MANIFEST_LOADED,this.onManifestLoaded,this)},u.unregisterListeners=function(){this.hls.off(T.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(T.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(T.Events.MANIFEST_LOADED,this.onManifestLoaded,this)},u.getLicenseServerUrl=function(g){var a=this.config,C=a.drmSystems,S=a.widevineLicenseUrl,p=C[g];if(p)return p.licenseUrl;if(g===l.KeySystems.WIDEVINE&&S)return S;throw new Error('no license server URL configured for key-system "'+g+'"')},u.getServerCertificateUrl=function(g){var a=this.config.drmSystems,C=a[g];if(C)return C.serverCertificateUrl;this.log('No Server Certificate in config.drmSystems["'+g+'"]')},u.attemptKeySystemAccess=function(g){var a=this,C=this.hls.levels,S=function(q,$,re){return!!q&&re.indexOf(q)===$},p=C.map(function(z){return z.audioCodec}).filter(S),U=C.map(function(z){return z.videoCodec}).filter(S);return p.length+U.length===0&&U.push("avc1.42e01e"),new Promise(function(z,q){var $=function re(ce){var ne=ce.shift();a.getMediaKeysPromise(ne,p,U).then(function(me){return z({keySystem:ne,mediaKeys:me})}).catch(function(me){ce.length?re(ce):me instanceof A?q(me):q(new A({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_NO_ACCESS,error:me,fatal:!0},me.message))})};$(g)})},u.requestMediaKeySystemAccess=function(g,a){var C=this.config.requestMediaKeySystemAccessFunc;if(!(typeof C=="function")){var S="Configured requestMediaKeySystemAccess is not a function "+C;return l.requestMediaKeySystemAccess===null&&self.location.protocol==="http:"&&(S="navigator.requestMediaKeySystemAccess is not available over insecure protocol "+location.protocol),Promise.reject(new Error(S))}return C(g,a)},u.getMediaKeysPromise=function(g,a,C){var S=this,p=(0,l.getSupportedMediaKeySystemConfigurations)(g,a,C,this.config.drmSystemOptions),U=this.keySystemAccessPromises[g],z=U==null?void 0:U.keySystemAccess;if(!z){this.log('Requesting encrypted media "'+g+'" key-system access with config: '+JSON.stringify(p)),z=this.requestMediaKeySystemAccess(g,p);var q=this.keySystemAccessPromises[g]={keySystemAccess:z};return z.catch(function($){S.log('Failed to obtain access to key-system "'+g+'": '+$)}),z.then(function($){S.log('Access for key-system "'+$.keySystem+'" obtained');var re=S.fetchServerCertificate(g);return S.log('Create media-keys for "'+g+'"'),q.mediaKeys=$.createMediaKeys().then(function(ce){return S.log('Media-keys created for "'+g+'"'),re.then(function(ne){return ne?S.setMediaKeysServerCertificate(ce,g,ne):ce})}),q.mediaKeys.catch(function(ce){S.error('Failed to create media-keys for "'+g+'"}: '+ce)}),q.mediaKeys})}return z.then(function(){return U.mediaKeys})},u.createMediaKeySessionContext=function(g){var a=g.decryptdata,C=g.keySystem,S=g.mediaKeys;console.assert(!!S,"mediaKeys is defined"),this.log('Creating key-system session "'+C+'" keyId: '+o.default.hexDump(a.keyId||[]));var p=S.createSession(),U={decryptdata:a,keySystem:C,mediaKeys:S,mediaKeysSession:p,keyStatus:"status-pending"};return this.mediaKeySessions.push(U),U},u.renewKeySession=function(g){var a=g.decryptdata;if(a.pssh){var C=this.createMediaKeySessionContext(g),S=this.getKeyIdString(a),p="cenc";this.keyIdToKeySessionPromise[S]=this.generateRequestWithPreferredKeySession(C,p,a.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(g)},u.getKeyIdString=function(g){if(!g)throw new Error("Could not read keyId of undefined decryptdata");if(g.keyId===null)throw new Error("keyId is null");return o.default.hexDump(g.keyId)},u.updateKeySession=function(g,a){var C,S=g.mediaKeysSession;return this.log('Updating key-session "'+S.sessionId+'" for keyID '+o.default.hexDump(((C=g.decryptdata)===null||C===void 0?void 0:C.keyId)||[])+`
|
|
|
} (data length: `+(a&&a.byteLength)+")"),S.update(a)},u.selectKeySystemFormat=function(g){var a=Object.keys(g.levelkeys||{});return this.keyFormatPromise||(this.log("Selecting key-system from fragment (sn: "+g.sn+" "+g.type+": "+g.level+") key formats "+a.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(a)),this.keyFormatPromise},u.getKeyFormatPromise=function(g){var a=this;return new Promise(function(C,S){var p=(0,l.getKeySystemsForConfig)(a.config),U=g.map(l.keySystemFormatToKeySystemDomain).filter(function(z){return!!z&&p.indexOf(z)!==-1});return a.getKeySystemSelectionPromise(U).then(function(z){var q=z.keySystem,$=(0,l.keySystemDomainToKeySystemFormat)(q);$?C($):S(new Error('Unable to find format for key-system "'+q+'"'))}).catch(S)})},u.loadKey=function(g){var a=this,C=g.keyInfo.decryptdata,S=this.getKeyIdString(C),p="(keyId: "+S+' format: "'+C.keyFormat+'" method: '+C.method+" uri: "+C.uri+")";this.log("Starting session for key "+p);var U=this.keyIdToKeySessionPromise[S];return U||(U=this.keyIdToKeySessionPromise[S]=this.getKeySystemForKeyPromise(C).then(function(z){var q=z.keySystem,$=z.mediaKeys;return a.throwIfDestroyed(),a.log("Handle encrypted media sn: "+g.frag.sn+" "+g.frag.type+": "+g.frag.level+" using key "+p),a.attemptSetMediaKeys(q,$).then(function(){a.throwIfDestroyed();var re=a.createMediaKeySessionContext({keySystem:q,mediaKeys:$,decryptdata:C}),ce="cenc";return a.generateRequestWithPreferredKeySession(re,ce,C.pssh,"playlist-key")})}),U.catch(function(z){return a.handleError(z)})),U},u.throwIfDestroyed=function(g){if(g===void 0&&(g="Invalid state"),!this.hls)throw new Error("invalid state")},u.handleError=function(g){if(!this.hls)return;this.error(g.message),g instanceof A?this.hls.trigger(T.Events.ERROR,g.data):this.hls.trigger(T.Events.ERROR,{type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_NO_KEYS,error:g,fatal:!0})},u.getKeySystemForKeyPromise=function(g){var a=this.getKeyIdString(g),C=this.keyIdToKeySessionPromise[a];if(!C){var S=(0,l.keySystemFormatToKeySystemDomain)(g.keyFormat),p=S?[S]:(0,l.getKeySystemsForConfig)(this.config);return this.attemptKeySystemAccess(p)}return C},u.getKeySystemSelectionPromise=function(g){if(g.length||(g=(0,l.getKeySystemsForConfig)(this.config)),g.length===0)throw new A({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},"Missing key-system license configuration options "+JSON.stringify({drmSystems:this.config.drmSystems}));return this.attemptKeySystemAccess(g)},u._onMediaEncrypted=function(g){var a=this,C=g.initDataType,S=g.initData;if(this.debug('"'+g.type+'" event: init data type: "'+C+'"'),S===null)return;var p,U;if(C==="sinf"&&this.config.drmSystems[l.KeySystems.FAIRPLAY]){var z=(0,c.bin2str)(new Uint8Array(S));try{var q=(0,r.base64Decode)(JSON.parse(z).sinf),$=(0,c.parseSinf)(new Uint8Array(q));if(!$)return;p=$.subarray(8,24),U=l.KeySystems.FAIRPLAY}catch(De){this.warn('Failed to parse sinf "encrypted" event message initData');return}}else{var re=(0,c.parsePssh)(S);if(re===null)return;re.version===0&&re.systemId===l.KeySystemIds.WIDEVINE&&re.data&&(p=re.data.subarray(8,24)),U=(0,l.keySystemIdToKeySystemDomain)(re.systemId)}if(!U||!p)return;for(var ce=o.default.hexDump(p),ne=this.keyIdToKeySessionPromise,me=this.mediaKeySessions,be=ne[ce],he=function(ge){var fe=me[ge],Ce=fe.decryptdata;if(Ce.pssh||!Ce.keyId)return"continue";var ae=o.default.hexDump(Ce.keyId);if(ce===ae||Ce.uri.replace(/-/g,"").indexOf(ce)!==-1)return be=ne[ae],delete ne[ae],Ce.pssh=new Uint8Array(S),Ce.keyId=p,be=ne[ce]=be.then(function(){return a.generateRequestWithPreferredKeySession(fe,C,S,"encrypted-event-key-match")}),"break"},se=0;se<me.length;se++){var _e=he(se);if(_e==="continue")continue;if(_e==="break")break}be||(be=ne[ce]=this.getKeySystemSelectionPromise([U]).then(function(De){var ge,fe=De.keySystem,Ce=De.mediaKeys;a.throwIfDestroyed();var ae=new n.LevelKey("ISO-23001-7",ce,(ge=(0,l.keySystemDomainToKeySystemFormat)(fe))!=null?ge:"");return ae.pssh=new Uint8Array(S),ae.keyId=p,a.attemptSetMediaKeys(fe,Ce).then(function(){a.throwIfDestroyed();var Q=a.createMediaKeySessionContext({decryptdata:ae,keySystem:fe,mediaKeys:Ce});return a.generateRequestWithPreferredKeySession(Q,C,S,"encrypted-event-no-match")})})),be.catch(function(De){return a.handleError(De)})},u._onWaitingForKey=function(g){this.log('"'+g.type+'" event')},u.attemptSetMediaKeys=function(g,a){var C=this,S=this.setMediaKeysQueue.slice();this.log('Setting media-keys for "'+g+'"');var p=Promise.all(S).then(function(){if(!C.media)throw new Error("Attempted to set mediaKeys without media element attached");return C.media.setMediaKeys(a)});return this.setMediaKeysQueue.push(p),p.then(function(){C.log('Media-keys set for "'+g+'"'),S.push(p),C.setMediaKeysQueue=C.setMediaKeysQueue.filter(function(U){return S.indexOf(U)===-1})})},u.generateRequestWithPreferredKeySession=function(g,a,C,S){var p,U,z=this,q=(p=this.config.drmSystems)===null||p===void 0||((U=p[g.keySystem])===null||U===void 0)?void 0:U.generateRequest;if(q)try{var $=q.call(this.hls,a,C,g);if(!$)throw new Error("Invalid response from configured generateRequest filter");a=$.initDataType,C=g.decryptdata.pssh=$.initData?new Uint8Array($.initData):null}catch(be){var re;if(this.warn(be.message),(re=this.hls)!==null&&re!==void 0&&re.config.debug)throw be}if(C===null)return this.log('Skipping key-session request for "'+S+'" (no initData)'),Promise.resolve(g);var ce=this.getKeyIdString(g.decryptdata);this.log('Generating key-session request for "'+S+'": '+ce+" (init data type: "+a+" length: "+(C?C.byteLength:null)+")");var ne=new(f());g.mediaKeysSession.onmessage=function(be){var he=g.mediaKeysSession;if(!he){ne.emit("error",new Error("invalid state"));return}var se=be.messageType,_e=be.message;z.log('"'+se+'" message event for session "'+he.sessionId+'" message size: '+_e.byteLength),se==="license-request"||se==="license-renewal"?z.renewLicense(g,_e).catch(function(De){z.handleError(De),ne.emit("error",De)}):se==="license-release"?g.keySystem===l.KeySystems.FAIRPLAY&&(z.updateKeySession(g,(0,_.strToUtf8array)("acknowledged")),z.removeSession(g)):z.warn('unhandled media key message type "'+se+'"')},g.mediaKeysSession.onkeystatuseschange=function(be){var he=g.mediaKeysSession;if(!he){ne.emit("error",new Error("invalid state"));return}z.onKeyStatusChange(g);var se=g.keyStatus;ne.emit("keyStatus",se),se==="expired"&&(z.warn(g.keySystem+" expired for key "+ce),z.renewKeySession(g))};var me=new Promise(function(be,he){ne.on("error",he),ne.on("keyStatus",function(se){se.startsWith("usable")?be():se==="output-restricted"?he(new A({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):se==="internal-error"?he(new A({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},'key status changed to "'+se+'"')):se==="expired"?he(new Error("key expired while generating request")):z.warn('unhandled key status change "'+se+'"')})});return g.mediaKeysSession.generateRequest(a,C).then(function(){var be;z.log('Request generated for key-session "'+((be=g.mediaKeysSession)===null||be===void 0?void 0:be.sessionId)+'" keyId: '+ce)}).catch(function(be){throw new A({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_NO_SESSION,error:be,fatal:!1},"Error generating key-session request: "+be)}).then(function(){return me}).catch(function(be){throw ne.removeAllListeners(),z.removeSession(g),be}).then(function(){return ne.removeAllListeners(),g})},u.onKeyStatusChange=function(g){var a=this;g.mediaKeysSession.keyStatuses.forEach(function(C,S){a.log('key status change "'+C+'" for keyStatuses keyId: '+o.default.hexDump("buffer"in S?new Uint8Array(S.buffer,S.byteOffset,S.byteLength):new Uint8Array(S))+" session keyId: "+o.default.hexDump(new Uint8Array(g.decryptdata.keyId||[]))+" uri: "+g.decryptdata.uri),g.keyStatus=C})},u.fetchServerCertificate=function(g){var a=this;return new Promise(function(C,S){var p=a.getServerCertificateUrl(g);if(!p)return C();a.log('Fetching serverCertificate for "'+g+'"');var U=new XMLHttpRequest;U.open("GET",p,!0),U.responseType="arraybuffer",U.onreadystatechange=function(){U.readyState===XMLHttpRequest.DONE&&(U.status===200?C(U.response):S(new A({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:U},'"'+g+'" certificate request XHR failed ('+p+"). Status: "+U.status+" ("+U.statusText+")")))},U.send()})},u.setMediaKeysServerCertificate=function(g,a,C){var S=this;return new Promise(function(p,U){g.setServerCertificate(C).then(function(z){S.log("setServerCertificate "+(z?"success":"not supported by CDM")+" ("+(C==null?void 0:C.byteLength)+') on "'+a+'"'),p(g)}).catch(function(z){U(new A({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:z,fatal:!0},z.message))})})},u.renewLicense=function(g,a){var C=this;return this.requestLicense(g,new Uint8Array(a)).then(function(S){return C.updateKeySession(g,new Uint8Array(S)).catch(function(p){throw new A({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:p,fatal:!0},p.message)})})},u.setupLicenseXHR=function(g,a,C,S){var p=this,U=this.config.licenseXhrSetup;return U?Promise.resolve().then(function(){if(!C.decryptdata)throw new Error("Key removed");return U.call(p.hls,g,a,C,S)}).catch(function(z){if(!C.decryptdata)throw z;return g.open("POST",a,!0),U.call(p.hls,g,a,C,S)}).then(function(z){g.readyState||g.open("POST",a,!0);var q=z||S;return{xhr:g,licenseChallenge:q}}):(g.open("POST",a,!0),Promise.resolve({xhr:g,licenseChallenge:S}))},u.requestLicense=function(g,a){var C=this;return new Promise(function(S,p){var U=C.getLicenseServerUrl(g.keySystem);C.log("Sending license request to URL: "+U);var z=new XMLHttpRequest;z.responseType="arraybuffer",z.onreadystatechange=function(){if(!C.hls||!g.mediaKeysSession)return p(new Error("invalid state"));if(z.readyState===4)if(z.status===200){C._requestLicenseFailureCount=0;var q=z.response;C.log("License received "+(q instanceof ArrayBuffer?q.byteLength:q));var $=C.config.licenseResponseCallback;if($)try{q=$.call(C.hls,z,U,g)}catch(ce){C.error(ce)}S(q)}else if(C._requestLicenseFailureCount++,C._requestLicenseFailureCount>O||z.status>=400&&z.status<500)p(new A({type:e.ErrorTypes.KEY_SYSTEM_ERROR,details:e.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:z},"License Request XHR failed ("+U+"). Status: "+z.status+" ("+z.statusText+")"));else{var re=O-C._requestLicenseFailureCount+1;C.warn("Retrying license request, "+re+" attempts left"),C.requestLicense(g,a).then(S,p)}},g.licenseXhr&&g.licenseXhr.readyState!==XMLHttpRequest.DONE&&g.licenseXhr.abort(),g.licenseXhr=z,C.setupLicenseXHR(z,U,g,a).then(function(q){var $=q.xhr,re=q.licenseChallenge;$.send(re)})})},u.onMediaAttached=function(g,a){if(!this.config.emeEnabled)return;var C=a.media;this.media=C,C.addEventListener("encrypted",this.onMediaEncrypted),C.addEventListener("waitingforkey",this.onWaitingForKey)},u.onMediaDetached=function(){var g=this,a=this.media,C=this.mediaKeySessions;a&&(a.removeEventListener("encrypted",this.onMediaEncrypted),a.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},n.LevelKey.clearKeyUriToKeyIdMap();var S=C.length;I.CDMCleanupPromise=Promise.all(C.map(function(p){return g.removeSession(p)}).concat(a==null?void 0:a.setMediaKeys(null).catch(function(p){g.log("Could not clear media keys: "+p+". media.src: "+(a==null?void 0:a.src))}))).then(function(){S&&(g.log("finished closing key sessions and clearing media keys"),C.length=0)}).catch(function(p){g.log("Could not close sessions and clear media keys: "+p+". media.src: "+(a==null?void 0:a.src))})},u.onManifestLoaded=function(g,a){var C=a.sessionKeys;if(!C||!this.config.emeEnabled)return;if(!this.keyFormatPromise){var S=C.reduce(function(p,U){return p.indexOf(U.keyFormat)===-1&&p.push(U.keyFormat),p},[]);this.log("Selecting key-system from session-keys "+S.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(S)}},u.removeSession=function(g){var a=this,C=g.mediaKeysSession,S=g.licenseXhr;if(C){this.log("Remove licenses and keys and close session "+C.sessionId),C.onmessage=null,C.onkeystatuseschange=null,S&&S.readyState!==XMLHttpRequest.DONE&&S.abort(),g.mediaKeysSession=g.decryptdata=g.licenseXhr=void 0;var p=this.mediaKeySessions.indexOf(g);return p>-1&&this.mediaKeySessions.splice(p,1),C.remove().catch(function(U){a.log("Could not remove session: "+U)}).then(function(){return C.close()}).catch(function(U){a.log("Could not close session: "+U)})}},I}();D.CDMCleanupPromise=void 0;var A=function(I){y(u,I);function u(k,g){var a;return a=I.call(this,g)||this,a.data=void 0,a.data=k,k.err=k.error,a}return u}(h(Error));const P=D},"./src/controller/fps-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>l});var T=i("./src/events.ts"),e=i("./src/utils/logger.ts"),E=function(){function _(n){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=n,this.registerListeners()}var r=_.prototype;return r.setStreamController=function(o){this.streamController=o},r.registerListeners=function(){this.hls.on(T.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},r.unregisterListeners=function(){this.hls.off(T.Events.MEDIA_ATTACHING,this.onMediaAttaching)},r.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},r.onMediaAttaching=function(o,c){var v=this.hls.config;if(v.capLevelOnFPSDrop){var f=c.media instanceof self.HTMLVideoElement?c.media:null;this.media=f,f&&typeof f.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),v.fpsDroppedMonitoringPeriod)}},r.checkFPS=function(o,c,v){var f=performance.now();if(c){if(this.lastTime){var y=f-this.lastTime,h=v-this.lastDroppedFrames,b=c-this.lastDecodedFrames,m=1e3*h/y,d=this.hls;if(d.trigger(T.Events.FPS_DROP,{currentDropped:h,currentDecoded:b,totalDroppedFrames:v}),m>0&&h>d.config.fpsDroppedMonitoringThreshold*b){var x=d.currentLevel;e.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+x),x>0&&(d.autoLevelCapping===-1||d.autoLevelCapping>=x)&&(x=x-1,d.trigger(T.Events.FPS_DROP_LEVEL_CAPPING,{level:x,droppedLevel:d.currentLevel}),d.autoLevelCapping=x,this.streamController.nextLevelSwitch())}}this.lastTime=f,this.lastDroppedFrames=v,this.lastDecodedFrames=c}},r.checkFPSInterval=function(){var o=this.media;if(o)if(this.isVideoPlaybackQualityAvailable){var c=o.getVideoPlaybackQuality();this.checkFPS(o,c.totalVideoFrames,c.droppedVideoFrames)}else this.checkFPS(o,o.webkitDecodedFrameCount,o.webkitDroppedFrameCount)},_}();const l=E},"./src/controller/fragment-finders.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{findFragWithCC:()=>n,findFragmentByPDT:()=>E,findFragmentByPTS:()=>l,fragmentWithinToleranceTest:()=>_,pdtWithinToleranceTest:()=>r});var T=i("./src/polyfills/number.ts"),e=i("./src/utils/binary-search.ts");function E(o,c,v){if(c===null||!Array.isArray(o)||!o.length||!(0,T.isFiniteNumber)(c))return null;var f=o[0].programDateTime;if(c<(f||0))return null;var y=o[o.length-1].endProgramDateTime;if(c>=(y||0))return null;v=v||0;for(var h=0;h<o.length;++h){var b=o[h];if(r(c,v,b))return b}return null}function l(o,c,v,f){v===void 0&&(v=0),f===void 0&&(f=0);var y=null;if(o?y=c[o.sn-c[0].sn+1]||null:v===0&&c[0].start===0&&(y=c[0]),y&&_(v,f,y)===0)return y;var h=e.default.search(c,_.bind(null,v,f));return h&&(h!==o||!y)?h:y}function _(o,c,v){if(o===void 0&&(o=0),c===void 0&&(c=0),v.start<=o&&v.start+v.duration>o)return 0;var f=Math.min(c,v.duration+(v.deltaPTS?v.deltaPTS:0));return v.start+v.duration-f<=o?1:v.start-f>o&&v.start?-1:0}function r(o,c,v){var f=Math.min(c,v.duration+(v.deltaPTS?v.deltaPTS:0))*1e3,y=v.endProgramDateTime||0;return y-f>o}function n(o,c){return e.default.search(o,function(v){return v.cc<c?1:v.cc>c?-1:0})}},"./src/controller/fragment-tracker.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{FragmentState:()=>E,FragmentTracker:()=>l});var T=i("./src/events.ts"),e=i("./src/types/loader.ts"),E;(function(n){n.NOT_LOADED="NOT_LOADED",n.APPENDING="APPENDING",n.PARTIAL="PARTIAL",n.OK="OK"})(E||(E={}));var l=function(){function n(c){this.activeFragment=null,this.activeParts=null,this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=c,this._registerListeners()}var o=n.prototype;return o._registerListeners=function(){var v=this.hls;v.on(T.Events.BUFFER_APPENDED,this.onBufferAppended,this),v.on(T.Events.FRAG_BUFFERED,this.onFragBuffered,this),v.on(T.Events.FRAG_LOADED,this.onFragLoaded,this)},o._unregisterListeners=function(){var v=this.hls;v.off(T.Events.BUFFER_APPENDED,this.onBufferAppended,this),v.off(T.Events.FRAG_BUFFERED,this.onFragBuffered,this),v.off(T.Events.FRAG_LOADED,this.onFragLoaded,this)},o.destroy=function(){this._unregisterListeners(),this.fragments=this.endListFragments=this.timeRanges=this.activeFragment=this.activeParts=null},o.getAppendedFrag=function(v,f){if(f===e.PlaylistLevelType.MAIN){var y=this.activeFragment,h=this.activeParts;if(!y)return null;if(h)for(var b=h.length;b--;){var m=h[b],d=m?m.end:y.appendedPTS;if(m.start<=v&&d!==void 0&&v<=d)return b>9&&(this.activeParts=h.slice(b-9)),m}else if(y.start<=v&&y.appendedPTS!==void 0&&v<=y.appendedPTS)return y}return this.getBufferedFrag(v,f)},o.getBufferedFrag=function(v,f){for(var y=this.fragments,h=Object.keys(y),b=h.length;b--;){var m=y[h[b]];if((m==null?void 0:m.body.type)===f&&m.buffered){var d=m.body;if(d.start<=v&&v<=d.end)return d}}return null},o.detectEvictedFragments=function(v,f,y){var h=this;this.timeRanges&&(this.timeRanges[v]=f),Object.keys(this.fragments).forEach(function(b){var m=h.fragments[b];if(!m)return;if(!m.buffered&&!m.loaded){m.body.type===y&&h.removeFragment(m.body);return}var d=m.range[v];if(!d)return;d.time.some(function(x){var R=!h.isTimeBuffered(x.startPTS,x.endPTS,f);return R&&h.removeFragment(m.body),R})})},o.detectPartialFragments=function(v){var f=this,y=this.timeRanges,h=v.frag,b=v.part;if(!y||h.sn==="initSegment")return;var m=r(h),d=this.fragments[m];if(!d)return;Object.keys(y).forEach(function(x){var R=h.elementaryStreams[x];if(!R)return;var O=y[x],w=b!==null||R.partial===!0;d.range[x]=f.getBufferedTimes(h,b,w,O)}),d.loaded=null,Object.keys(d.range).length?(d.buffered=!0,d.body.endList&&(this.endListFragments[d.body.type]=d)):this.removeFragment(d.body)},o.fragBuffered=function(v){var f=r(v),y=this.fragments[f];y&&(y.loaded=null,y.buffered=!0)},o.getBufferedTimes=function(v,f,y,h){for(var b={time:[],partial:y},m=f?f.start:v.start,d=f?f.end:v.end,x=v.minEndPTS||d,R=v.maxStartPTS||m,O=0;O<h.length;O++){var w=h.start(O)-this.bufferPadding,D=h.end(O)+this.bufferPadding;if(R>=w&&x<=D){b.time.push({startPTS:Math.max(m,h.start(O)),endPTS:Math.min(d,h.end(O))});break}else if(m<D&&d>w)b.partial=!0,b.time.push({startPTS:Math.max(m,h.start(O)),endPTS:Math.min(d,h.end(O))});else if(d<=w)break}return b},o.getPartialFragment=function(v){var f=null,y,h,b,m=0,d=this.bufferPadding,x=this.fragments;return Object.keys(x).forEach(function(R){var O=x[R];if(!O)return;_(O)&&(h=O.body.start-d,b=O.body.end+d,v>=h&&v<=b&&(y=Math.min(v-h,b-v),m<=y&&(f=O.body,m=y)))}),f},o.isEndListAppended=function(v){var f=this.endListFragments[v];return f!==void 0&&(f.buffered||_(f))},o.getState=function(v){var f=r(v),y=this.fragments[f];return y?y.buffered?_(y)?E.PARTIAL:E.OK:E.APPENDING:E.NOT_LOADED},o.isTimeBuffered=function(v,f,y){for(var h,b,m=0;m<y.length;m++){if(h=y.start(m)-this.bufferPadding,b=y.end(m)+this.bufferPadding,v>=h&&f<=b)return!0;if(f<=h)return!1}return!1},o.onFragLoaded=function(v,f){var y=f.frag,h=f.part;if(y.sn==="initSegment"||y.bitrateTest||h)return;var b=r(y);this.fragments[b]={body:y,loaded:f,buffered:!1,range:Object.create(null)}},o.onBufferAppended=function(v,f){var y=this,h=f.frag,b=f.part,m=f.timeRanges;if(h.type===e.PlaylistLevelType.MAIN)if(this.activeFragment!==h&&(this.activeFragment=h,h.appendedPTS=void 0),b){var d=this.activeParts;d||(this.activeParts=d=[]),d.push(b)}else this.activeParts=null;this.timeRanges=m,Object.keys(m).forEach(function(x){var R=m[x];if(y.detectEvictedFragments(x,R),!b&&h.type===e.PlaylistLevelType.MAIN){var O=h.elementaryStreams[x];if(!O)return;for(var w=0;w<R.length;w++){var D=R.end(w);D<=O.endPTS&&D>O.startPTS?h.appendedPTS=Math.max(D,h.appendedPTS||0):h.appendedPTS=O.endPTS}}})},o.onFragBuffered=function(v,f){this.detectPartialFragments(f)},o.hasFragment=function(v){var f=r(v);return!!this.fragments[f]},o.removeFragmentsInRange=function(v,f,y){var h=this;Object.keys(this.fragments).forEach(function(b){var m=h.fragments[b];if(!m)return;if(m.buffered){var d=m.body;d.type===y&&d.start<f&&d.end>v&&h.removeFragment(d)}})},o.removeFragment=function(v){var f=r(v);v.stats.loaded=0,v.clearElementaryStreamInfo(),v.appendedPTS=void 0,delete this.fragments[f],v.endList&&delete this.endListFragments[v.type]},o.removeAllFragments=function(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activeFragment=null,this.activeParts=null},n}();function _(n){var o,c;return n.buffered&&(((o=n.range.video)===null||o===void 0?void 0:o.partial)||((c=n.range.audio)===null||c===void 0?void 0:c.partial))}function r(n){return n.type+"_"+n.level+"_"+n.urlId+"_"+n.sn}},"./src/controller/gap-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{MAX_START_GAP_JUMP:()=>r,SKIP_BUFFER_HOLE_STEP_SECONDS:()=>n,SKIP_BUFFER_RANGE_START:()=>o,STALL_MINIMUM_DURATION_MS:()=>_,default:()=>c});var T=i("./src/utils/buffer-helper.ts"),e=i("./src/errors.ts"),E=i("./src/events.ts"),l=i("./src/utils/logger.ts"),_=250,r=2,n=.1,o=.05,c=function(){function v(y,h,b,m){this.config=void 0,this.media=null,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=y,this.media=h,this.fragmentTracker=b,this.hls=m}var f=v.prototype;return f.destroy=function(){this.media=null,this.hls=this.fragmentTracker=null},f.poll=function(h,b){var m=this.config,d=this.media,x=this.stalled;if(d===null)return;var R=d.currentTime,O=d.seeking,w=this.seeking&&!O,D=!this.seeking&&O;if(this.seeking=O,R!==h){if(this.moved=!0,x!==null){if(this.stallReported){var A=self.performance.now()-x;l.logger.warn("playback not stuck anymore @"+R+", after "+Math.round(A)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((D||w)&&(this.stalled=null),d.paused&&!O||d.ended||d.playbackRate===0||!T.BufferHelper.getBuffered(d).length)return;var P=T.BufferHelper.bufferInfo(d,R,0),I=P.len>0,u=P.nextStart||0;if(!I&&!u)return;if(O){var k=P.len>r,g=!u||b&&b.start<=R||u-R>r&&!this.fragmentTracker.getPartialFragment(R);if(k||g)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var a,C=Math.max(u,P.start||0)-R,S=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,p=S==null||((a=S.details)===null||a===void 0)?void 0:a.live,U=p?S.details.targetduration*2:r;if(C>0&&C<=U){this._trySkipBufferHole(null);return}}var z=self.performance.now();if(x===null){this.stalled=z;return}var q=z-x;if(!O&&q>=_&&(this._reportStall(P),!this.media))return;var $=T.BufferHelper.bufferInfo(d,R,m.maxBufferHole);this._tryFixBufferStall($,q)},f._tryFixBufferStall=function(h,b){var m=this.config,d=this.fragmentTracker,x=this.media;if(x===null)return;var R=x.currentTime,O=d.getPartialFragment(R);if(O){var w=this._trySkipBufferHole(O);if(w||!this.media)return}h.len>m.maxBufferHole&&b>m.highBufferWatchdogPeriod*1e3&&(l.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},f._reportStall=function(h){var b=this.hls,m=this.media,d=this.stallReported;!d&&m&&(this.stallReported=!0,l.logger.warn("Playback stalling at @"+m.currentTime+" due to low buffer ("+JSON.stringify(h)+")"),b.trigger(E.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:h.len}))},f._trySkipBufferHole=function(h){var b=this.config,m=this.hls,d=this.media;if(d===null)return 0;for(var x=d.currentTime,R=0,O=T.BufferHelper.getBuffered(d),w=0;w<O.length;w++){var D=O.start(w);if(x+b.maxBufferHole>=R&&x<D){var A=Math.max(D+o,d.currentTime+n);return l.logger.warn("skipping hole, adjusting currentTime from "+x+" to "+A),this.moved=!0,this.stalled=null,d.currentTime=A,h&&m.trigger(E.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+x+" to "+A,frag:h}),A}R=O.end(w)}return 0},f._tryNudgeBuffer=function(){var h=this.config,b=this.hls,m=this.media,d=this.nudgeRetry;if(m===null)return;var x=m.currentTime;if(this.nudgeRetry++,d<h.nudgeMaxRetry){var R=x+(d+1)*h.nudgeOffset;l.logger.warn("Nudging 'currentTime' from "+x+" to "+R),m.currentTime=R,b.trigger(E.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else l.logger.error("Playhead still not moving while enough data buffered @"+x+" after "+h.nudgeMaxRetry+" nudges"),b.trigger(E.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},v}()},"./src/controller/id3-track-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>h});var T=i("./src/polyfills/number.ts"),e=i("./src/events.ts"),E=i("./src/utils/texttrack-utils.ts"),l=i("./src/demux/id3.ts"),_=i("./src/loader/date-range.ts"),r=i("./src/types/demuxer.ts"),n=.25;function o(){return self.WebKitDataCue||self.VTTCue||self.TextTrackCue}var c=function(){var b=o();try{new b(0,Number.POSITIVE_INFINITY,"")}catch(m){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY}();function v(b,m){return b.getTime()/1e3-m}function f(b){return Uint8Array.from(b.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}var y=function(){function b(d){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=d,this._registerListeners()}var m=b.prototype;return m.destroy=function(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null},m._registerListeners=function(){var x=this.hls;x.on(e.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(e.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),x.on(e.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),x.on(e.Events.LEVEL_UPDATED,this.onLevelUpdated,this)},m._unregisterListeners=function(){var x=this.hls;x.off(e.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(e.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),x.off(e.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),x.off(e.Events.LEVEL_UPDATED,this.onLevelUpdated,this)},m.onMediaAttached=function(x,R){this.media=R.media},m.onMediaDetaching=function(){if(!this.id3Track)return;(0,E.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={}},m.onManifestLoading=function(){this.dateRangeCuesAppended={}},m.createTrack=function(x){var R=this.getID3Track(x.textTracks);return R.mode="hidden",R},m.getID3Track=function(x){if(!this.media)return;for(var R=0;R<x.length;R++){var O=x[R];if(O.kind==="metadata"&&O.label==="id3")return(0,E.sendAddTrackEvent)(O,this.media),O}return this.media.addTextTrack("metadata","id3")},m.onFragParsingMetadata=function(x,R){if(!this.media)return;var O=this.hls.config,w=O.enableEmsgMetadataCues,D=O.enableID3MetadataCues;if(!w&&!D)return;var A=R.samples;this.id3Track||(this.id3Track=this.createTrack(this.media));for(var P=o(),I=0;I<A.length;I++){var u=A[I].type;if(u===r.MetadataSchema.emsg&&!w||!D)continue;var k=l.getID3Frames(A[I].data);if(k){var g=A[I].pts,a=g+A[I].duration;a>c&&(a=c);var C=a-g;C<=0&&(a=g+n);for(var S=0;S<k.length;S++){var p=k[S];if(!l.isTimeStampFrame(p)){this.updateId3CueEnds(g);var U=new P(g,a,"");U.value=p,u&&(U.type=u),this.id3Track.addCue(U)}}}}},m.updateId3CueEnds=function(x){var R,O=(R=this.id3Track)===null||R===void 0?void 0:R.cues;if(O)for(var w=O.length;w--;){var D=O[w];D.startTime<x&&D.endTime===c&&(D.endTime=x)}},m.onBufferFlushing=function(x,R){var O=R.startOffset,w=R.endOffset,D=R.type,A=this.id3Track,P=this.hls;if(!P)return;var I=P.config,u=I.enableEmsgMetadataCues,k=I.enableID3MetadataCues;if(A&&(u||k)){var g;D==="audio"?g=function(C){return C.type===r.MetadataSchema.audioId3&&k}:D==="video"?g=function(C){return C.type===r.MetadataSchema.emsg&&u}:g=function(C){return C.type===r.MetadataSchema.audioId3&&k||C.type===r.MetadataSchema.emsg&&u},(0,E.removeCuesInRange)(A,O,w,g)}},m.onLevelUpdated=function(x,R){var O=this,w=R.details;if(!this.media||!w.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;var D=this.dateRangeCuesAppended,A=this.id3Track,P=w.dateRanges,I=Object.keys(P);if(A)for(var u=Object.keys(D).filter(function(z){return!I.includes(z)}),k=function(q){var $=u[q];Object.keys(D[$].cues).forEach(function(re){A.removeCue(D[$].cues[re])}),delete D[$]},g=u.length;g--;)k(g);var a=w.fragments[w.fragments.length-1];if(I.length===0||!(0,T.isFiniteNumber)(a==null?void 0:a.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));for(var C=a.programDateTime/1e3-a.start,S=o(),p=function(q){var $=I[q],re=P[$],ce=D[$],ne=(ce==null?void 0:ce.cues)||{},me=(ce==null?void 0:ce.durationKnown)||!1,be=v(re.startDate,C),he=c,se=re.endDate;if(se)he=v(se,C),me=!0;else if(re.endOnNext&&!me){var _e=I.reduce(function(Q,J){var Z=P[J];return Z.class===re.class&&Z.id!==J&&Z.startDate>re.startDate&&Q.push(Z),Q},[]).sort(function(Q,J){return Q.startDate.getTime()-J.startDate.getTime()})[0];_e&&(he=v(_e.startDate,C),me=!0)}for(var De=Object.keys(re.attr),ge=0;ge<De.length;ge++){var fe=De[ge];if(fe===_.DateRangeAttribute.ID||fe===_.DateRangeAttribute.CLASS||fe===_.DateRangeAttribute.START_DATE||fe===_.DateRangeAttribute.DURATION||fe===_.DateRangeAttribute.END_DATE||fe===_.DateRangeAttribute.END_ON_NEXT)continue;var Ce=ne[fe];if(Ce)me&&!ce.durationKnown&&(Ce.endTime=he);else{var ae=re.attr[fe];Ce=new S(be,he,""),(fe===_.DateRangeAttribute.SCTE35_OUT||fe===_.DateRangeAttribute.SCTE35_IN)&&(ae=f(ae)),Ce.value={key:fe,data:ae},Ce.type=r.MetadataSchema.dateRange,O.id3Track.addCue(Ce),ne[fe]=Ce}}D[$]={cues:ne,dateRange:re,durationKnown:me}},U=0;U<I.length;U++)p(U)},b}();const h=y},"./src/controller/latency-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>o});var T=i("./src/errors.ts"),e=i("./src/events.ts"),E=i("./src/utils/logger.ts");function l(c,v){for(var f=0;f<v.length;f++){var y=v[f];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(c,r(y.key),y)}}function _(c,v,f){return v&&l(c.prototype,v),f&&l(c,f),Object.defineProperty(c,"prototype",{writable:!1}),c}function r(c){var v=n(c,"string");return typeof v=="symbol"?v:String(v)}function n(c,v){if(typeof c!="object"||c===null)return c;var f=c[Symbol.toPrimitive];if(f!==void 0){var y=f.call(c,v||"default");if(typeof y!="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(c)}var o=function(){function c(f){var y=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 y.timeupdate()},this.hls=f,this.config=f.config,this.registerListeners()}var v=c.prototype;return v.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},v.registerListeners=function(){this.hls.on(e.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(e.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(e.Events.ERROR,this.onError,this)},v.unregisterListeners=function(){this.hls.off(e.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(e.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(e.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(e.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(e.Events.ERROR,this.onError)},v.onMediaAttached=function(y,h){this.media=h.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},v.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},v.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},v.onLevelUpdated=function(y,h){var b=h.details;this.levelDetails=b,b.advanced&&this.timeupdate(),!b.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},v.onError=function(y,h){if(h.details!==T.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,E.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},v.timeupdate=function(){var y=this.media,h=this.levelDetails;if(!y||!h)return;this.currentTime=y.currentTime;var b=this.computeLatency();if(b===null)return;this._latency=b;var m=this.config,d=m.lowLatencyMode,x=m.maxLiveSyncPlaybackRate;if(!d||x===1)return;var R=this.targetLatency;if(R===null)return;var O=b-R,w=Math.min(this.maxLatency,R+h.targetduration),D=O<w;if(h.live&&D&&O>.05&&this.forwardBufferLength>1){var A=Math.min(2,Math.max(1,x)),P=Math.round(2/(1+Math.exp(-.75*O-this.edgeStalled))*20)/20;y.playbackRate=Math.min(A,Math.max(1,P))}else y.playbackRate!==1&&y.playbackRate!==0&&(y.playbackRate=1)},v.estimateLiveEdge=function(){var y=this.levelDetails;return y===null?null:y.edge+y.age},v.computeLatency=function(){var y=this.estimateLiveEdge();return y===null?null:y-this.currentTime},_(c,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var y=this.config,h=this.levelDetails;return y.liveMaxLatencyDuration!==void 0?y.liveMaxLatencyDuration:h?y.liveMaxLatencyDurationCount*h.targetduration:0}},{key:"targetLatency",get:function(){var y=this.levelDetails;if(y===null)return null;var h=y.holdBack,b=y.partHoldBack,m=y.targetduration,d=this.config,x=d.liveSyncDuration,R=d.liveSyncDurationCount,O=d.lowLatencyMode,w=this.hls.userConfig,D=O&&b||h;(w.liveSyncDuration||w.liveSyncDurationCount||D===0)&&(D=x!==void 0?x:R*m);var A=m,P=1;return D+Math.min(this.stallCount*P,A)}},{key:"liveSyncPosition",get:function(){var y=this.estimateLiveEdge(),h=this.targetLatency,b=this.levelDetails;if(y===null||h===null||b===null)return null;var m=b.edge,d=y-h-this.edgeStalled,x=m-b.totalduration,R=m-(this.config.lowLatencyMode&&b.partTarget||b.targetduration);return Math.min(Math.max(x,d),R)}},{key:"drift",get:function(){var y=this.levelDetails;return y===null?1:y.drift}},{key:"edgeStalled",get:function(){var y=this.levelDetails;if(y===null)return 0;var h=(this.config.lowLatencyMode&&y.partTarget||y.targetduration)*3;return Math.max(y.age-h,0)}},{key:"forwardBufferLength",get:function(){var y=this.media,h=this.levelDetails;if(!y||!h)return 0;var b=y.buffered.length;return(b?y.buffered.end(b-1):h.edge)-this.currentTime}}]),c}()},"./src/controller/level-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>d});var T=i("./src/types/level.ts"),e=i("./src/events.ts"),E=i("./src/errors.ts"),l=i("./src/utils/codecs.ts"),_=i("./src/controller/level-helper.ts"),r=i("./src/controller/base-playlist-controller.ts"),n=i("./src/types/loader.ts");function o(){return o=Object.assign?Object.assign.bind():function(x){for(var R=1;R<arguments.length;R++){var O=arguments[R];for(var w in O)Object.prototype.hasOwnProperty.call(O,w)&&(x[w]=O[w])}return x},o.apply(this,arguments)}function c(x,R){for(var O=0;O<R.length;O++){var w=R[O];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(x,f(w.key),w)}}function v(x,R,O){return R&&c(x.prototype,R),O&&c(x,O),Object.defineProperty(x,"prototype",{writable:!1}),x}function f(x){var R=y(x,"string");return typeof R=="symbol"?R:String(R)}function y(x,R){if(typeof x!="object"||x===null)return x;var O=x[Symbol.toPrimitive];if(O!==void 0){var w=O.call(x,R||"default");if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(R==="string"?String:Number)(x)}function h(x,R){x.prototype=Object.create(R.prototype),x.prototype.constructor=x,b(x,R)}function b(x,R){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,D){return w.__proto__=D,w},b(x,R)}var m=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),d=function(x){h(R,x);function R(w){var D;return D=x.call(this,w,"[level-controller]")||this,D._levels=[],D._firstLevel=-1,D._startLevel=void 0,D.currentLevelIndex=-1,D.manualLevelIndex=-1,D.onParsedComplete=void 0,D._registerListeners(),D}var O=R.prototype;return O._registerListeners=function(){var D=this.hls;D.on(e.Events.MANIFEST_LOADED,this.onManifestLoaded,this),D.on(e.Events.LEVEL_LOADED,this.onLevelLoaded,this),D.on(e.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),D.on(e.Events.FRAG_LOADED,this.onFragLoaded,this),D.on(e.Events.ERROR,this.onError,this)},O._unregisterListeners=function(){var D=this.hls;D.off(e.Events.MANIFEST_LOADED,this.onManifestLoaded,this),D.off(e.Events.LEVEL_LOADED,this.onLevelLoaded,this),D.off(e.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),D.off(e.Events.FRAG_LOADED,this.onFragLoaded,this),D.off(e.Events.ERROR,this.onError,this)},O.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,x.prototype.destroy.call(this)},O.startLoad=function(){var D=this._levels;D.forEach(function(A){A.loadError=0}),x.prototype.startLoad.call(this)},O.onManifestLoaded=function(D,A){var P=[],I=[],u=[],k,g={},a,C=!1,S=!1,p=!1;if(A.levels.forEach(function($){var re=$.attrs;C=C||!!($.width&&$.height),S=S||!!$.videoCodec,p=p||!!$.audioCodec,m&&$.audioCodec&&$.audioCodec.indexOf("mp4a.40.34")!==-1&&($.audioCodec=void 0);var ce=$.bitrate+"-"+$.attrs.RESOLUTION+"-"+$.attrs.CODECS;a=g[ce],a?a.url.push($.url):(a=new T.Level($),g[ce]=a,P.push(a)),re&&(re.AUDIO&&(0,_.addGroupId)(a,"audio",re.AUDIO),re.SUBTITLES&&(0,_.addGroupId)(a,"text",re.SUBTITLES))}),(C||S)&&p&&(P=P.filter(function($){var re=$.videoCodec,ce=$.width,ne=$.height;return!!re||!!(ce&&ne)})),P=P.filter(function($){var re=$.audioCodec,ce=$.videoCodec;return(!re||(0,l.isCodecSupportedInMp4)(re,"audio"))&&(!ce||(0,l.isCodecSupportedInMp4)(ce,"video"))}),A.audioTracks&&(I=A.audioTracks.filter(function($){return!$.audioCodec||(0,l.isCodecSupportedInMp4)($.audioCodec,"audio")}),(0,_.assignTrackIdsByGroup)(I)),A.subtitles&&(u=A.subtitles,(0,_.assignTrackIdsByGroup)(u)),P.length>0){k=P[0].bitrate,P.sort(function($,re){return $.attrs["HDCP-LEVEL"]!==re.attrs["HDCP-LEVEL"]?($.attrs["HDCP-LEVEL"]||"")>(re.attrs["HDCP-LEVEL"]||"")?1:-1:$.bitrate!==re.bitrate?$.bitrate-re.bitrate:$.attrs.SCORE!==re.attrs.SCORE?$.attrs.decimalFloatingPoint("SCORE")-re.attrs.decimalFloatingPoint("SCORE"):C&&$.height!==re.height?$.height-re.height:0}),this._levels=P;for(var U=0;U<P.length;U++)if(P[U].bitrate===k){this._firstLevel=U,this.log("manifest loaded, "+P.length+" level(s) found, first bitrate: "+k);break}var z=p&&!S,q={levels:P,audioTracks:I,subtitleTracks:u,sessionData:A.sessionData,sessionKeys:A.sessionKeys,firstLevel:this._firstLevel,stats:A.stats,audio:p,video:S,altAudio:!z&&I.some(function($){return!!$.url})};this.hls.trigger(e.Events.MANIFEST_PARSED,q),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(e.Events.ERROR,{type:E.ErrorTypes.MEDIA_ERROR,details:E.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:A.url,reason:"no level with compatible codecs found in manifest"})},O.onError=function(D,A){var P,I;if(x.prototype.onError.call(this,D,A),A.fatal)return;var u=A.context,k=this._levels[this.currentLevelIndex];if(u&&(u.type===n.PlaylistContextType.AUDIO_TRACK&&k.audioGroupIds&&u.groupId===k.audioGroupIds[k.urlId]||u.type===n.PlaylistContextType.SUBTITLE_TRACK&&k.textGroupIds&&u.groupId===k.textGroupIds[k.urlId])){this.redundantFailover(this.currentLevelIndex);return}var g=!1,a=!0,C;switch(A.details){case E.ErrorDetails.FRAG_LOAD_ERROR:case E.ErrorDetails.FRAG_LOAD_TIMEOUT:case E.ErrorDetails.KEY_LOAD_ERROR:case E.ErrorDetails.KEY_LOAD_TIMEOUT:if(A.frag){var S=A.frag.type===n.PlaylistLevelType.MAIN?A.frag.level:this.currentLevelIndex,p=this._levels[S];p?(p.fragmentError++,p.fragmentError>this.hls.config.fragLoadingMaxRetry&&(C=S)):C=S}break;case E.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{var U=k.attrs["HDCP-LEVEL"];U&&(this.hls.maxHdcpLevel=T.HdcpLevels[T.HdcpLevels.indexOf(U)-1],this.warn('Restricting playback to HDCP-LEVEL of "'+this.hls.maxHdcpLevel+'" or lower'))}case E.ErrorDetails.FRAG_PARSING_ERROR:case E.ErrorDetails.KEY_SYSTEM_NO_SESSION:C=((P=A.frag)===null||P===void 0?void 0:P.type)===n.PlaylistLevelType.MAIN?A.frag.level:this.currentLevelIndex,A.levelRetry=!1;break;case E.ErrorDetails.LEVEL_LOAD_ERROR:case E.ErrorDetails.LEVEL_LOAD_TIMEOUT:u&&(u.deliveryDirectives&&(a=!1),C=u.level),g=!0;break;case E.ErrorDetails.REMUX_ALLOC_ERROR:C=(I=A.level)!=null?I:this.currentLevelIndex,g=!0;break}C!==void 0&&this.recoverLevel(A,C,g,a)},O.recoverLevel=function(D,A,P,I){var u=D.details,k=this._levels[A];if(k.loadError++,P){var g=this.retryLoadingOrFail(D);if(g)D.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(I){var a=k.url.length;if(a>1&&k.loadError<a)D.levelRetry=!0,this.redundantFailover(A);else if(this.manualLevelIndex===-1){for(var C=-1,S=this._levels,p=S.length;p--;){var U=(p+this.currentLevelIndex)%S.length;if(U!==this.currentLevelIndex&&S[U].loadError===0){C=U;break}}C>-1&&this.currentLevelIndex!==C?(this.warn(u+": switch to "+C),D.levelRetry=!0,this.hls.nextAutoLevel=C):D.levelRetry===!1&&(D.fatal=!0)}}},O.redundantFailover=function(D){var A=this._levels[D],P=A.url.length;if(P>1){var I=(A.urlId+1)%P;this.warn("Switching to redundant URL-id "+I),this._levels.forEach(function(u){u.urlId=I}),this.level=D}},O.onFragLoaded=function(D,A){var P=A.frag;if(P!==void 0&&P.type===n.PlaylistLevelType.MAIN){var I=this._levels[P.level];I!==void 0&&(I.fragmentError=0,I.loadError=0)}},O.onLevelLoaded=function(D,A){var P,I=A.level,u=A.details,k=this._levels[I];if(!k){var g;this.warn("Invalid level index "+I),(g=A.deliveryDirectives)!==null&&g!==void 0&&g.skip&&(u.deltaUpdateFailed=!0);return}I===this.currentLevelIndex?(k.fragmentError===0&&(k.loadError=0,this.retryCount=0),this.playlistLoaded(I,A,k.details)):(P=A.deliveryDirectives)!==null&&P!==void 0&&P.skip&&(u.deltaUpdateFailed=!0)},O.onAudioTrackSwitched=function(D,A){var P=this.hls.levels[this.currentLevelIndex];if(!P)return;if(P.audioGroupIds){for(var I=-1,u=this.hls.audioTracks[A.id].groupId,k=0;k<P.audioGroupIds.length;k++)if(P.audioGroupIds[k]===u){I=k;break}I!==P.urlId&&(P.urlId=I,this.startLoad())}},O.loadPlaylist=function(D){x.prototype.loadPlaylist.call(this);var A=this.currentLevelIndex,P=this._levels[A];if(this.canLoad&&P&&P.url.length>0){var I=P.urlId,u=P.url[I];if(D)try{u=D.addDirectives(u)}catch(k){this.warn("Could not construct new URL with HLS Delivery Directives: "+k)}this.log("Attempt loading level index "+A+((D==null?void 0:D.msn)!==void 0?" at sn "+D.msn+" part "+D.part:"")+" with URL-id "+I+" "+u),this.clearTimer(),this.hls.trigger(e.Events.LEVEL_LOADING,{url:u,level:A,id:I,deliveryDirectives:D||null})}},O.removeLevel=function(D,A){var P=function(k,g){return g!==A},I=this._levels.filter(function(u,k){return k!==D?!0:u.url.length>1&&A!==void 0?(u.url=u.url.filter(P),u.audioGroupIds&&(u.audioGroupIds=u.audioGroupIds.filter(P)),u.textGroupIds&&(u.textGroupIds=u.textGroupIds.filter(P)),u.urlId=0,!0):!1}).map(function(u,k){var g=u.details;return g!=null&&g.fragments&&g.fragments.forEach(function(a){a.level=k}),u});this._levels=I,this.hls.trigger(e.Events.LEVELS_UPDATED,{levels:I})},v(R,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(D){var A,P=this._levels;if(P.length===0)return;if(this.currentLevelIndex===D&&(A=P[D])!==null&&A!==void 0&&A.details)return;if(D<0||D>=P.length){var I=D<0;if(this.hls.trigger(e.Events.ERROR,{type:E.ErrorTypes.OTHER_ERROR,details:E.ErrorDetails.LEVEL_SWITCH_ERROR,level:D,fatal:I,reason:"invalid level idx"}),I)return;D=Math.min(D,P.length-1)}this.clearTimer();var u=this.currentLevelIndex,k=P[u],g=P[D];this.log("switching to level "+D+" from "+u),this.currentLevelIndex=D;var a=o({},g,{level:D,maxBitrate:g.maxBitrate,uri:g.uri,urlId:g.urlId});delete a._urlId,this.hls.trigger(e.Events.LEVEL_SWITCHING,a);var C=g.details;if(!C||C.live){var S=this.switchParams(g.uri,k==null?void 0:k.details);this.loadPlaylist(S)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(D){this.manualLevelIndex=D,this._startLevel===void 0&&(this._startLevel=D),D!==-1&&(this.level=D)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(D){this._firstLevel=D}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var D=this.hls.config.startLevel;return D!==void 0?D:this._firstLevel}else return this._startLevel},set:function(D){this._startLevel=D}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(D){this.level=D,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=D)}}]),R}(r.default)},"./src/controller/level-helper.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{addGroupId:()=>_,addSliding:()=>m,adjustSliding:()=>b,assignTrackIdsByGroup:()=>r,computeReloadInterval:()=>d,getFragmentWithSN:()=>x,getPartWith:()=>R,mapFragmentIntersection:()=>h,mapPartIntersection:()=>y,mergeDetails:()=>v,updateFragPTSDTS:()=>c,updatePTS:()=>n});var T=i("./src/polyfills/number.ts"),e=i("./src/utils/logger.ts"),E=i("./src/loader/date-range.ts");function l(){return l=Object.assign?Object.assign.bind():function(O){for(var w=1;w<arguments.length;w++){var D=arguments[w];for(var A in D)Object.prototype.hasOwnProperty.call(D,A)&&(O[A]=D[A])}return O},l.apply(this,arguments)}function _(O,w,D){switch(w){case"audio":O.audioGroupIds||(O.audioGroupIds=[]),O.audioGroupIds.push(D);break;case"text":O.textGroupIds||(O.textGroupIds=[]),O.textGroupIds.push(D);break}}function r(O){var w={};O.forEach(function(D){var A=D.groupId||"";D.id=w[A]=w[A]||0,w[A]++})}function n(O,w,D){var A=O[w],P=O[D];o(A,P)}function o(O,w){var D=w.startPTS;if((0,T.isFiniteNumber)(D)){var A=0,P;w.sn>O.sn?(A=D-O.start,P=O):(A=O.start-D,P=w),P.duration!==A&&(P.duration=A)}else if(w.sn>O.sn){var I=O.cc===w.cc;I&&O.minEndPTS?w.start=O.start+(O.minEndPTS-O.start):w.start=O.start+O.duration}else w.start=Math.max(O.start-w.duration,0)}function c(O,w,D,A,P,I){var u=A-D;u<=0&&(e.logger.warn("Fragment should have a positive duration",w),A=D+w.duration,I=P+w.duration);var k=D,g=A,a=w.startPTS,C=w.endPTS;if((0,T.isFiniteNumber)(a)){var S=Math.abs(a-D);(0,T.isFiniteNumber)(w.deltaPTS)?w.deltaPTS=Math.max(S,w.deltaPTS):w.deltaPTS=S,k=Math.max(D,a),D=Math.min(D,a),P=Math.min(P,w.startDTS),g=Math.min(A,C),A=Math.max(A,C),I=Math.max(I,w.endDTS)}w.duration=A-D;var p=D-w.start;w.start=w.startPTS=D,w.maxStartPTS=k,w.startDTS=P,w.endPTS=A,w.minEndPTS=g,w.endDTS=I;var U=w.sn;if(!O||U<O.startSN||U>O.endSN)return 0;var z,q=U-O.startSN,$=O.fragments;for($[q]=w,z=q;z>0;z--)o($[z],$[z-1]);for(z=q;z<$.length-1;z++)o($[z],$[z+1]);return O.fragmentHint&&o($[$.length-1],O.fragmentHint),O.PTSKnown=O.alignedSliding=!0,p}function v(O,w){for(var D=null,A=O.fragments,P=A.length-1;P>=0;P--){var I=A[P].initSegment;if(I){D=I;break}}O.fragmentHint&&delete O.fragmentHint.endPTS;var u=0,k;if(h(O,w,function(z,q){z.relurl&&(u=z.cc-q.cc),(0,T.isFiniteNumber)(z.startPTS)&&(0,T.isFiniteNumber)(z.endPTS)&&(q.start=q.startPTS=z.startPTS,q.startDTS=z.startDTS,q.appendedPTS=z.appendedPTS,q.maxStartPTS=z.maxStartPTS,q.endPTS=z.endPTS,q.endDTS=z.endDTS,q.minEndPTS=z.minEndPTS,q.duration=z.endPTS-z.startPTS,q.duration&&(k=q),w.PTSKnown=w.alignedSliding=!0),q.elementaryStreams=z.elementaryStreams,q.loader=z.loader,q.stats=z.stats,q.urlId=z.urlId,z.initSegment&&(q.initSegment=z.initSegment,D=z.initSegment)}),D){var g=w.fragmentHint?w.fragments.concat(w.fragmentHint):w.fragments;g.forEach(function(z){var q;(!z.initSegment||z.initSegment.relurl===((q=D)===null||q===void 0?void 0:q.relurl))&&(z.initSegment=D)})}if(w.skippedSegments)if(w.deltaUpdateFailed=w.fragments.some(function(z){return!z}),w.deltaUpdateFailed){e.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var a=w.skippedSegments;a--;)w.fragments.shift();w.startSN=w.fragments[0].sn,w.startCC=w.fragments[0].cc}else w.canSkipDateRanges&&(w.dateRanges=f(O.dateRanges,w.dateRanges,w.recentlyRemovedDateranges));var C=w.fragments;if(u){e.logger.warn("discontinuity sliding from playlist, take drift into account");for(var S=0;S<C.length;S++)C[S].cc+=u}w.skippedSegments&&(w.startCC=w.fragments[0].cc),y(O.partList,w.partList,function(z,q){q.elementaryStreams=z.elementaryStreams,q.stats=z.stats}),k?c(w,k,k.startPTS,k.endPTS,k.startDTS,k.endDTS):b(O,w),C.length&&(w.totalduration=w.edge-C[0].start),w.driftStartTime=O.driftStartTime,w.driftStart=O.driftStart;var p=w.advancedDateTime;if(w.advanced&&p){var U=w.edge;w.driftStart||(w.driftStartTime=p,w.driftStart=U),w.driftEndTime=p,w.driftEnd=U}else w.driftEndTime=O.driftEndTime,w.driftEnd=O.driftEnd,w.advancedDateTime=O.advancedDateTime}function f(O,w,D){var A=l({},O);return D&&D.forEach(function(P){delete A[P]}),Object.keys(w).forEach(function(P){var I=new E.DateRange(w[P].attr,A[P]);I.isValid?A[P]=I:e.logger.warn('Ignoring invalid Playlist Delta Update DATERANGE tag: "'+JSON.stringify(w[P].attr)+'"')}),A}function y(O,w,D){if(O&&w)for(var A=0,P=0,I=O.length;P<=I;P++){var u=O[P],k=w[P+A];u&&k&&u.index===k.index&&u.fragment.sn===k.fragment.sn?D(u,k):A--}}function h(O,w,D){for(var A=w.skippedSegments,P=Math.max(O.startSN,w.startSN)-w.startSN,I=(O.fragmentHint?1:0)+(A?w.endSN:Math.min(O.endSN,w.endSN))-w.startSN,u=w.startSN-O.startSN,k=w.fragmentHint?w.fragments.concat(w.fragmentHint):w.fragments,g=O.fragmentHint?O.fragments.concat(O.fragmentHint):O.fragments,a=P;a<=I;a++){var C=g[u+a],S=k[a];A&&!S&&a<A&&(S=w.fragments[a]=C),C&&S&&D(C,S)}}function b(O,w){var D=w.startSN+w.skippedSegments-O.startSN,A=O.fragments;if(D<0||D>=A.length)return;m(w,A[D].start)}function m(O,w){if(w){for(var D=O.fragments,A=O.skippedSegments;A<D.length;A++)D[A].start+=w;O.fragmentHint&&(O.fragmentHint.start+=w)}}function d(O,w){w===void 0&&(w=Infinity);var D=1e3*O.targetduration;if(O.updated){var A=O.fragments,P=4;if(A.length&&D*P>w){var I=A[A.length-1].duration*1e3;I<D&&(D=I)}}else D/=2;return Math.round(D)}function x(O,w,D){if(!O||!O.details)return null;var A=O.details,P=A.fragments[w-A.startSN];return P||(P=A.fragmentHint,P&&P.sn===w?P:w<A.startSN&&D&&D.sn===w?D:null)}function R(O,w,D){if(!O||!O.details)return null;var A=O.details.partList;if(A)for(var P=A.length;P--;){var I=A[P];if(I.index===D&&I.fragment.sn===w)return I}return null}},"./src/controller/stream-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>w});var T=i("./src/polyfills/number.ts"),e=i("./src/controller/base-stream-controller.ts"),E=i("./src/is-supported.ts"),l=i("./src/events.ts"),_=i("./src/utils/buffer-helper.ts"),r=i("./src/controller/fragment-tracker.ts"),n=i("./src/types/loader.ts"),o=i("./src/loader/fragment.ts"),c=i("./src/demux/transmuxer-interface.ts"),v=i("./src/types/transmuxer.ts"),f=i("./src/controller/gap-controller.ts"),y=i("./src/errors.ts");function h(D,A){for(var P=0;P<A.length;P++){var I=A[P];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(D,m(I.key),I)}}function b(D,A,P){return A&&h(D.prototype,A),P&&h(D,P),Object.defineProperty(D,"prototype",{writable:!1}),D}function m(D){var A=d(D,"string");return typeof A=="symbol"?A:String(A)}function d(D,A){if(typeof D!="object"||D===null)return D;var P=D[Symbol.toPrimitive];if(P!==void 0){var I=P.call(D,A||"default");if(typeof I!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(D)}function x(D,A){D.prototype=Object.create(A.prototype),D.prototype.constructor=D,R(D,A)}function R(D,A){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(I,u){return I.__proto__=u,I},R(D,A)}var O=100,w=function(D){x(A,D);function A(I,u,k){var g;return g=D.call(this,I,u,k,"[stream-controller]")||this,g.audioCodecSwap=!1,g.gapController=null,g.level=-1,g._forceStartLoad=!1,g.altAudio=!1,g.audioOnly=!1,g.fragPlaying=null,g.onvplaying=null,g.onvseeked=null,g.fragLastKbps=0,g.couldBacktrack=!1,g.backtrackFragment=null,g.audioCodecSwitch=!1,g.videoBuffer=null,g._registerListeners(),g}var P=A.prototype;return P._registerListeners=function(){var u=this.hls;u.on(l.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(l.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(l.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(l.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(l.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(l.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.on(l.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),u.on(l.Events.ERROR,this.onError,this),u.on(l.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),u.on(l.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),u.on(l.Events.BUFFER_CREATED,this.onBufferCreated,this),u.on(l.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),u.on(l.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),u.on(l.Events.FRAG_BUFFERED,this.onFragBuffered,this)},P._unregisterListeners=function(){var u=this.hls;u.off(l.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(l.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(l.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(l.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(l.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.off(l.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),u.off(l.Events.ERROR,this.onError,this),u.off(l.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),u.off(l.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),u.off(l.Events.BUFFER_CREATED,this.onBufferCreated,this),u.off(l.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),u.off(l.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),u.off(l.Events.FRAG_BUFFERED,this.onFragBuffered,this)},P.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},P.startLoad=function(u){if(this.levels){var k=this.lastCurrentTime,g=this.hls;if(this.stopLoad(),this.setInterval(O),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var a=g.startLevel;a===-1&&(g.config.testBandwidth&&this.levels.length>1?(a=0,this.bitrateTest=!0):a=g.nextAutoLevel),this.level=g.nextLoadLevel=a,this.loadedmetadata=!1}k>0&&u===-1&&(this.log("Override startPosition with lastCurrentTime @"+k.toFixed(3)),u=k),this.state=e.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=u,this.tick()}else this._forceStartLoad=!0,this.state=e.State.STOPPED},P.stopLoad=function(){this._forceStartLoad=!1,D.prototype.stopLoad.call(this)},P.doTick=function(){switch(this.state){case e.State.IDLE:this.doTickIdle();break;case e.State.WAITING_LEVEL:{var u,k=this.levels,g=this.level,a=k==null||((u=k[g])===null||u===void 0)?void 0:u.details;if(a&&(!a.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(a))break;this.state=e.State.IDLE;break}break}case e.State.FRAG_LOADING_WAITING_RETRY:{var C,S=self.performance.now(),p=this.retryDate;(!p||S>=p||(C=this.media)!==null&&C!==void 0&&C.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.level),this.state=e.State.IDLE)}break;default:break}this.onTickEnd()},P.onTickEnd=function(){D.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},P.doTickIdle=function(){var u=this.hls,k=this.levelLastLoaded,g=this.levels,a=this.media,C=u.config,S=u.nextLoadLevel;if(k===null||!a&&(this.startFragRequested||!C.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!g||!g[S])return;var p=g[S],U=this.getMainFwdBufferInfo();if(U===null)return;var z=this.getLevelDetails();if(z&&this._streamEnded(U,z)){var q={};this.altAudio&&(q.type="video"),this.hls.trigger(l.Events.BUFFER_EOS,q),this.state=e.State.ENDED;return}this.level=u.nextLoadLevel=S;var $=p.details;if(!$||this.state===e.State.WAITING_LEVEL||$.live&&this.levelLastLoaded!==S){this.level=S,this.state=e.State.WAITING_LEVEL;return}var re=U.len,ce=this.getMaxBufferLength(p.maxBitrate);if(re>=ce)return;this.backtrackFragment&&this.backtrackFragment.start>U.end&&(this.backtrackFragment=null);var ne=this.backtrackFragment?this.backtrackFragment.start:U.end,me=this.getNextFragment(ne,$);if(this.couldBacktrack&&!this.fragPrevious&&me&&me.sn!=="initSegment"&&this.fragmentTracker.getState(me)!==r.FragmentState.OK){var be,he=((be=this.backtrackFragment)!=null?be:me).sn,se=he-$.startSN,_e=$.fragments[se-1];_e&&me.cc===_e.cc&&(me=_e,this.fragmentTracker.removeFragment(_e))}else this.backtrackFragment&&U.len&&(this.backtrackFragment=null);if(me&&this.fragmentTracker.getState(me)===r.FragmentState.OK&&this.nextLoadPosition>ne){var De=this.audioOnly&&!this.altAudio?o.ElementaryStreamTypes.AUDIO:o.ElementaryStreamTypes.VIDEO,ge=(De===o.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;ge&&this.afterBufferFlushed(ge,De,n.PlaylistLevelType.MAIN),me=this.getNextFragment(this.nextLoadPosition,$)}if(!me)return;me.initSegment&&!me.initSegment.data&&!this.bitrateTest&&(me=me.initSegment),this.loadFragment(me,$,ne)},P.loadFragment=function(u,k,g){var a,C=this.fragmentTracker.getState(u);this.fragCurrent=u,C===r.FragmentState.NOT_LOADED?u.sn==="initSegment"?this._loadInitSegment(u,k):this.bitrateTest?(this.log("Fragment "+u.sn+" of level "+u.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(u,k)):(this.startFragRequested=!0,D.prototype.loadFragment.call(this,u,k,g)):C===r.FragmentState.APPENDING?this.reduceMaxBufferLength(u.duration)&&this.fragmentTracker.removeFragment(u):((a=this.media)===null||a===void 0?void 0:a.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},P.getAppendedFrag=function(u){var k=this.fragmentTracker.getAppendedFrag(u,n.PlaylistLevelType.MAIN);return k&&"fragment"in k?k.fragment:k},P.getBufferedFrag=function(u){return this.fragmentTracker.getBufferedFrag(u,n.PlaylistLevelType.MAIN)},P.followingBufferedFrag=function(u){return u?this.getBufferedFrag(u.end+.5):null},P.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},P.nextLevelSwitch=function(){var u=this.levels,k=this.media;if(k!=null&&k.readyState){var g,a=this.getAppendedFrag(k.currentTime);if(a&&a.start>1&&this.flushMainBuffer(0,a.start-1),!k.paused&&u){var C=this.hls.nextLoadLevel,S=u[C],p=this.fragLastKbps;p&&this.fragCurrent?g=this.fragCurrent.duration*S.maxBitrate/(1e3*p)+1:g=0}else g=0;var U=this.getBufferedFrag(k.currentTime+g);if(U){var z=this.followingBufferedFrag(U);if(z){this.abortCurrentFrag();var q=z.maxStartPTS?z.maxStartPTS:z.start,$=z.duration,re=Math.max(U.end,q+Math.min(Math.max($-this.config.maxFragLookUpTolerance,$*.5),$*.75));this.flushMainBuffer(re,Number.POSITIVE_INFINITY)}}}},P.abortCurrentFrag=function(){var u=this.fragCurrent;this.fragCurrent=null,this.backtrackFragment=null,u&&u.abortRequests();switch(this.state){case e.State.KEY_LOADING:case e.State.FRAG_LOADING:case e.State.FRAG_LOADING_WAITING_RETRY:case e.State.PARSING:case e.State.PARSED:this.state=e.State.IDLE;break}this.nextLoadPosition=this.getLoadPosition()},P.flushMainBuffer=function(u,k){D.prototype.flushMainBuffer.call(this,u,k,this.altAudio?"video":null)},P.onMediaAttached=function(u,k){D.prototype.onMediaAttached.call(this,u,k);var g=k.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),g.addEventListener("playing",this.onvplaying),g.addEventListener("seeked",this.onvseeked),this.gapController=new f.default(this.config,g,this.fragmentTracker,this.hls)},P.onMediaDetaching=function(){var u=this.media;u&&this.onvplaying&&this.onvseeked&&(u.removeEventListener("playing",this.onvplaying),u.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),D.prototype.onMediaDetaching.call(this)},P.onMediaPlaying=function(){this.tick()},P.onMediaSeeked=function(){var u=this.media,k=u?u.currentTime:null;(0,T.isFiniteNumber)(k)&&this.log("Media seeked to "+k.toFixed(3)),this.tick()},P.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(l.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null,this.backtrackFragment=null},P.onManifestParsed=function(u,k){var g=!1,a=!1,C;k.levels.forEach(function(S){C=S.audioCodec,C&&(C.indexOf("mp4a.40.2")!==-1&&(g=!0),C.indexOf("mp4a.40.5")!==-1&&(a=!0))}),this.audioCodecSwitch=g&&a&&!(0,E.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=k.levels,this.startFragRequested=!1},P.onLevelLoading=function(u,k){var g=this.levels;if(!g||this.state!==e.State.IDLE)return;var a=g[k.level];(!a.details||a.details.live&&this.levelLastLoaded!==k.level||this.waitForCdnTuneIn(a.details))&&(this.state=e.State.WAITING_LEVEL)},P.onLevelLoaded=function(u,k){var g,a=this.levels,C=k.level,S=k.details,p=S.totalduration;if(!a){this.warn("Levels were reset while loading level "+C);return}this.log("Level "+C+" loaded ["+S.startSN+","+S.endSN+"], cc ["+S.startCC+", "+S.endCC+"] duration:"+p);var U=this.fragCurrent;U&&(this.state===e.State.FRAG_LOADING||this.state===e.State.FRAG_LOADING_WAITING_RETRY)&&(U.level!==k.level&&U.loader&&(this.state=e.State.IDLE,this.backtrackFragment=null,U.abortRequests()));var z=a[C],q=0;if(S.live||(g=z.details)!==null&&g!==void 0&&g.live){if(S.fragments[0]||(S.deltaUpdateFailed=!0),S.deltaUpdateFailed)return;q=this.alignPlaylists(S,z.details)}if(z.details=S,this.levelLastLoaded=C,this.hls.trigger(l.Events.LEVEL_UPDATED,{details:S,level:C}),this.state===e.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(S))return;this.state=e.State.IDLE}this.startFragRequested?S.live&&this.synchronizeToLiveEdge(S):this.setStartPosition(S,q),this.tick()},P._handleFragmentLoadProgress=function(u){var k,g=u.frag,a=u.part,C=u.payload,S=this.levels;if(!S){this.warn("Levels were reset while fragment load was in progress. Fragment "+g.sn+" of level "+g.level+" will not be buffered");return}var p=S[g.level],U=p.details;if(!U){this.warn("Dropping fragment "+g.sn+" of level "+g.level+" after level details were reset");return}var z=p.videoCodec,q=U.PTSKnown||!U.live,$=(k=g.initSegment)===null||k===void 0?void 0:k.data,re=this._getAudioCodec(p),ce=this.transmuxer=this.transmuxer||new c.default(this.hls,n.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ne=a?a.index:-1,me=ne!==-1,be=new v.ChunkMetadata(g.level,g.sn,g.stats.chunkCount,C.byteLength,ne,me),he=this.initPTS[g.cc];ce.push(C,$,re,z,g,a,U.totalduration,q,be,he)},P.onAudioTrackSwitching=function(u,k){var g=this.altAudio,a=!!k.url,C=k.id;if(!a){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var S=this.fragCurrent;S&&(this.log("Switching to main audio track, cancel main fragment load"),S.abortRequests()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var p=this.hls;g&&p.trigger(l.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),p.trigger(l.Events.AUDIO_TRACK_SWITCHED,{id:C})}},P.onAudioTrackSwitched=function(u,k){var g=k.id,a=!!this.hls.audioTracks[g].url;if(a){var C=this.videoBuffer;C&&this.mediaBuffer!==C&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=C)}this.altAudio=a,this.tick()},P.onBufferCreated=function(u,k){var g=k.tracks,a,C,S=!1;for(var p in g){var U=g[p];if(U.id==="main"){if(C=p,a=U,p==="video"){var z=g[p];z&&(this.videoBuffer=z.buffer)}}else S=!0}S&&a?(this.log("Alternate track found, use "+C+".buffered to schedule main fragment loading"),this.mediaBuffer=a.buffer):this.mediaBuffer=this.media},P.onFragBuffered=function(u,k){var g=k.frag,a=k.part;if(g&&g.type!==n.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(g)){this.warn("Fragment "+g.sn+(a?" p: "+a.index:"")+" of level "+g.level+" finished buffering, but was aborted. state: "+this.state),this.state===e.State.PARSED&&(this.state=e.State.IDLE);return}var C=a?a.stats:g.stats;this.fragLastKbps=Math.round(8*C.total/(C.buffering.end-C.loading.first)),g.sn!=="initSegment"&&(this.fragPrevious=g),this.fragBufferedComplete(g,a)},P.onError=function(u,k){if(k.type===y.ErrorTypes.KEY_SYSTEM_ERROR){this.onFragmentOrKeyLoadError(n.PlaylistLevelType.MAIN,k);return}switch(k.details){case y.ErrorDetails.FRAG_LOAD_ERROR:case y.ErrorDetails.FRAG_LOAD_TIMEOUT:case y.ErrorDetails.FRAG_PARSING_ERROR:case y.ErrorDetails.KEY_LOAD_ERROR:case y.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(n.PlaylistLevelType.MAIN,k);break;case y.ErrorDetails.LEVEL_LOAD_ERROR:case y.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==e.State.ERROR&&(k.fatal?(this.warn(""+k.details),this.state=e.State.ERROR):!k.levelRetry&&this.state===e.State.WAITING_LEVEL&&(this.state=e.State.IDLE));break;case y.ErrorDetails.BUFFER_FULL_ERROR:if(k.parent==="main"&&(this.state===e.State.PARSING||this.state===e.State.PARSED)){var g=!0,a=this.getFwdBufferInfo(this.media,n.PlaylistLevelType.MAIN);a&&a.len>.5&&(g=!this.reduceMaxBufferLength(a.len)),g&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},P.checkBuffer=function(){var u=this.media,k=this.gapController;if(!u||!k||!u.readyState)return;if(this.loadedmetadata||!_.BufferHelper.getBuffered(u).length){var g=this.state!==e.State.IDLE?this.fragCurrent:null;k.poll(this.lastCurrentTime,g)}this.lastCurrentTime=u.currentTime},P.onFragLoadEmergencyAborted=function(){this.state=e.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},P.onBufferFlushed=function(u,k){var g=k.type;if(g!==o.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var a=(g===o.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(a,g,n.PlaylistLevelType.MAIN)}},P.onLevelsUpdated=function(u,k){this.levels=k.levels},P.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},P.seekToStartPos=function(){var u=this.media;if(!u)return;var k=u.currentTime,g=this.startPosition;if(g>=0&&k<g){if(u.seeking){this.log("could not seek to "+g+", already seeking at "+k);return}var a=_.BufferHelper.getBuffered(u),C=a.length?a.start(0):0,S=C-g;S>0&&(S<this.config.maxBufferHole||S<this.config.maxFragLookUpTolerance)&&(this.log("adjusting start position by "+S+" to match buffer start"),g+=S,this.startPosition=g),this.log("seek to target start position "+g+" from current time "+k),u.currentTime=g}},P._getAudioCodec=function(u){var k=this.config.defaultAudioCodec||u.audioCodec;return this.audioCodecSwap&&k&&(this.log("Swapping audio codec"),k.indexOf("mp4a.40.5")!==-1?k="mp4a.40.2":k="mp4a.40.5"),k},P._loadBitrateTestFrag=function(u,k){var g=this;u.bitrateTest=!0,this._doFragLoad(u,k).then(function(a){var C=g.hls;if(!a||g.fragContextChanged(u))return;g.fragLoadError=0,g.state=e.State.IDLE,g.startFragRequested=!1,g.bitrateTest=!1;var S=u.stats;S.parsing.start=S.parsing.end=S.buffering.start=S.buffering.end=self.performance.now(),C.trigger(l.Events.FRAG_LOADED,a),u.bitrateTest=!1})},P._handleTransmuxComplete=function(u){var k,g="main",a=this.hls,C=u.remuxResult,S=u.chunkMeta,p=this.getCurrentContext(S);if(!p){this.warn("The loading context changed while buffering fragment "+S.sn+" of level "+S.level+". This chunk will not be buffered."),this.resetStartWhenNotLoaded(S.level);return}var U=p.frag,z=p.part,q=p.level,$=C.video,re=C.text,ce=C.id3,ne=C.initSegment,me=q.details,be=this.altAudio?void 0:C.audio;if(this.fragContextChanged(U))return;if(this.state=e.State.PARSING,ne){ne.tracks&&(this._bufferInitSegment(q,ne.tracks,U,S),a.trigger(l.Events.FRAG_PARSING_INIT_SEGMENT,{frag:U,id:g,tracks:ne.tracks}));var he=ne.initPTS,se=ne.timescale;(0,T.isFiniteNumber)(he)&&(this.initPTS[U.cc]=he,a.trigger(l.Events.INIT_PTS_FOUND,{frag:U,id:g,initPTS:he,timescale:se}))}if($&&C.independent!==!1){if(me){var _e=$.startPTS,De=$.endPTS,ge=$.startDTS,fe=$.endDTS;if(z)z.elementaryStreams[$.type]={startPTS:_e,endPTS:De,startDTS:ge,endDTS:fe};else if($.firstKeyFrame&&$.independent&&S.id===1&&(this.couldBacktrack=!0),$.dropped&&$.independent){var Ce=this.getMainFwdBufferInfo(),ae=(Ce?Ce.end:this.getLoadPosition())+this.config.maxBufferHole,Q=$.firstKeyFramePTS?$.firstKeyFramePTS:_e;if(ae<Q-this.config.maxBufferHole){this.backtrack(U);return}U.setElementaryStreamInfo($.type,U.start,De,U.start,fe,!0)}U.setElementaryStreamInfo($.type,_e,De,ge,fe),this.backtrackFragment&&(this.backtrackFragment=U),this.bufferFragmentData($,U,z,S)}}else if(C.independent===!1){this.backtrack(U);return}if(be){var J=be.startPTS,Z=be.endPTS,pe=be.startDTS,le=be.endDTS;z&&(z.elementaryStreams[o.ElementaryStreamTypes.AUDIO]={startPTS:J,endPTS:Z,startDTS:pe,endDTS:le}),U.setElementaryStreamInfo(o.ElementaryStreamTypes.AUDIO,J,Z,pe,le),this.bufferFragmentData(be,U,z,S)}if(me&&ce!==null&&ce!==void 0&&(k=ce.samples)!==null&&k!==void 0&&k.length){var ye={id:g,frag:U,details:me,samples:ce.samples};a.trigger(l.Events.FRAG_PARSING_METADATA,ye)}if(me&&re){var Te={id:g,frag:U,details:me,samples:re.samples};a.trigger(l.Events.FRAG_PARSING_USERDATA,Te)}},P._bufferInitSegment=function(u,k,g,a){var C=this;if(this.state!==e.State.PARSING)return;this.audioOnly=!!k.audio&&!k.video,this.altAudio&&!this.audioOnly&&delete k.audio;var S=k.audio,p=k.video,U=k.audiovideo;if(S){var z=u.audioCodec,q=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(z&&(z.indexOf("mp4a.40.5")!==-1?z="mp4a.40.2":z="mp4a.40.5"),S.metadata.channelCount!==1&&q.indexOf("firefox")===-1&&(z="mp4a.40.5")),q.indexOf("android")!==-1&&S.container!=="audio/mpeg"&&(z="mp4a.40.2",this.log("Android: force audio codec to "+z)),u.audioCodec&&u.audioCodec!==z&&this.log('Swapping manifest audio codec "'+u.audioCodec+'" for "'+z+'"'),S.levelCodec=z,S.id="main",this.log("Init audio buffer, container:"+S.container+", codecs[selected/level/parsed]=["+(z||"")+"/"+(u.audioCodec||"")+"/"+S.codec+"]")}p&&(p.levelCodec=u.videoCodec,p.id="main",this.log("Init video buffer, container:"+p.container+", codecs[level/parsed]=["+(u.videoCodec||"")+"/"+p.codec+"]")),U&&this.log("Init audiovideo buffer, container:"+U.container+", codecs[level/parsed]=["+(u.attrs.CODECS||"")+"/"+U.codec+"]"),this.hls.trigger(l.Events.BUFFER_CODECS,k),Object.keys(k).forEach(function($){var re=k[$],ce=re.initSegment;ce!=null&&ce.byteLength&&C.hls.trigger(l.Events.BUFFER_APPENDING,{type:$,data:ce,frag:g,part:null,chunkMeta:a,parent:g.type})}),this.tick()},P.getMainFwdBufferInfo=function(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,n.PlaylistLevelType.MAIN)},P.backtrack=function(u){this.couldBacktrack=!0,this.backtrackFragment=u,this.resetTransmuxer(),this.flushBufferGap(u),this.fragmentTracker.removeFragment(u),this.fragPrevious=null,this.nextLoadPosition=u.start,this.state=e.State.IDLE},P.checkFragmentChanged=function(){var u=this.media,k=null;if(u&&u.readyState>1&&u.seeking===!1){var g=u.currentTime;if(_.BufferHelper.isBuffered(u,g)?k=this.getAppendedFrag(g):_.BufferHelper.isBuffered(u,g+.1)&&(k=this.getAppendedFrag(g+.1)),k){this.backtrackFragment=null;var a=this.fragPlaying,C=k.level;(!a||k.sn!==a.sn||a.level!==C||k.urlId!==a.urlId)&&(this.fragPlaying=k,this.hls.trigger(l.Events.FRAG_CHANGED,{frag:k}),(!a||a.level!==C)&&this.hls.trigger(l.Events.LEVEL_SWITCHED,{level:C}))}}},b(A,[{key:"nextLevel",get:function(){var u=this.nextBufferedFrag;return u?u.level:-1}},{key:"currentFrag",get:function(){var u=this.media;return u?this.fragPlaying||this.getAppendedFrag(u.currentTime):null}},{key:"currentProgramDateTime",get:function(){var u=this.media;if(u){var k=u.currentTime,g=this.currentFrag;if(g&&(0,T.isFiniteNumber)(k)&&(0,T.isFiniteNumber)(g.programDateTime)){var a=g.programDateTime+(k-g.start)*1e3;return new Date(a)}}return null}},{key:"currentLevel",get:function(){var u=this.currentFrag;return u?u.level:-1}},{key:"nextBufferedFrag",get:function(){var u=this.currentFrag;return u?this.followingBufferedFrag(u):null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),A}(e.default)},"./src/controller/subtitle-stream-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{SubtitleStreamController:()=>x});var T=i("./src/events.ts"),e=i("./src/utils/buffer-helper.ts"),E=i("./src/controller/fragment-finders.ts"),l=i("./src/utils/discontinuities.ts"),_=i("./src/controller/level-helper.ts"),r=i("./src/controller/fragment-tracker.ts"),n=i("./src/controller/base-stream-controller.ts"),o=i("./src/types/loader.ts"),c=i("./src/types/level.ts");function v(O,w){for(var D=0;D<w.length;D++){var A=w[D];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(O,y(A.key),A)}}function f(O,w,D){return w&&v(O.prototype,w),D&&v(O,D),Object.defineProperty(O,"prototype",{writable:!1}),O}function y(O){var w=h(O,"string");return typeof w=="symbol"?w:String(w)}function h(O,w){if(typeof O!="object"||O===null)return O;var D=O[Symbol.toPrimitive];if(D!==void 0){var A=D.call(O,w||"default");if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(O)}function b(O,w){O.prototype=Object.create(w.prototype),O.prototype.constructor=O,m(O,w)}function m(O,w){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(A,P){return A.__proto__=P,A},m(O,w)}var d=500,x=function(O){b(w,O);function w(A,P,I){var u;return u=O.call(this,A,P,I,"[subtitle-stream-controller]")||this,u.levels=[],u.currentTrackId=-1,u.tracksBuffered=[],u.mainDetails=null,u._registerListeners(),u}var D=w.prototype;return D.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},D._registerListeners=function(){var P=this.hls;P.on(T.Events.MEDIA_ATTACHED,this.onMediaAttached,this),P.on(T.Events.MEDIA_DETACHING,this.onMediaDetaching,this),P.on(T.Events.MANIFEST_LOADING,this.onManifestLoading,this),P.on(T.Events.LEVEL_LOADED,this.onLevelLoaded,this),P.on(T.Events.ERROR,this.onError,this),P.on(T.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),P.on(T.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),P.on(T.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),P.on(T.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),P.on(T.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),P.on(T.Events.FRAG_BUFFERED,this.onFragBuffered,this)},D._unregisterListeners=function(){var P=this.hls;P.off(T.Events.MEDIA_ATTACHED,this.onMediaAttached,this),P.off(T.Events.MEDIA_DETACHING,this.onMediaDetaching,this),P.off(T.Events.MANIFEST_LOADING,this.onManifestLoading,this),P.off(T.Events.LEVEL_LOADED,this.onLevelLoaded,this),P.off(T.Events.ERROR,this.onError,this),P.off(T.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),P.off(T.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),P.off(T.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),P.off(T.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),P.off(T.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),P.off(T.Events.FRAG_BUFFERED,this.onFragBuffered,this)},D.startLoad=function(P){this.stopLoad(),this.state=n.State.IDLE,this.setInterval(d),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=P,this.tick()},D.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},D.onLevelLoaded=function(P,I){this.mainDetails=I.details},D.onSubtitleFragProcessed=function(P,I){var u=I.frag,k=I.success;if(this.fragPrevious=u,this.state=n.State.IDLE,!k)return;var g=this.tracksBuffered[this.currentTrackId];if(!g)return;for(var a,C=u.start,S=0;S<g.length;S++)if(C>=g[S].start&&C<=g[S].end){a=g[S];break}var p=u.start+u.duration;a?a.end=p:(a={start:C,end:p},g.push(a)),this.fragmentTracker.fragBuffered(u)},D.onBufferFlushing=function(P,I){var u=I.startOffset,k=I.endOffset;if(u===0&&k!==Number.POSITIVE_INFINITY){var g=this.currentTrackId,a=this.levels;if(!a.length||!a[g]||!a[g].details)return;var C=a[g].details,S=C.targetduration,p=k-S;if(p<=0)return;I.endOffsetSubtitles=Math.max(0,p),this.tracksBuffered.forEach(function(U){for(var z=0;z<U.length;){if(U[z].end<=p){U.shift();continue}else if(U[z].start<p)U[z].start=p;else break;z++}}),this.fragmentTracker.removeFragmentsInRange(u,p,o.PlaylistLevelType.SUBTITLE)}},D.onFragBuffered=function(P,I){if(!this.loadedmetadata&&I.frag.type===o.PlaylistLevelType.MAIN){var u;(u=this.media)!==null&&u!==void 0&&u.buffered.length&&(this.loadedmetadata=!0)}},D.onError=function(P,I){var u=I.frag;if(!u||u.type!==o.PlaylistLevelType.SUBTITLE)return;this.fragCurrent&&this.fragCurrent.abortRequests(),this.state=n.State.IDLE},D.onSubtitleTracksUpdated=function(P,I){var u=this,k=I.subtitleTracks;this.tracksBuffered=[],this.levels=k.map(function(g){return new c.Level(g)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(g){u.tracksBuffered[g.id]=[]}),this.mediaBuffer=null},D.onSubtitleTrackSwitch=function(P,I){if(this.currentTrackId=I.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var u=this.levels[this.currentTrackId];u!=null&&u.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,u&&this.setInterval(d)},D.onSubtitleTrackLoaded=function(P,I){var u,k=I.details,g=I.id,a=this.currentTrackId,C=this.levels;if(!C.length)return;var S=C[a];if(g>=C.length||g!==a||!S)return;this.mediaBuffer=this.mediaBufferTimeRanges;var p=0;if(k.live||(u=S.details)!==null&&u!==void 0&&u.live){var U=this.mainDetails;if(k.deltaUpdateFailed||!U)return;var z=U.fragments[0];S.details?(p=this.alignPlaylists(k,S.details),p===0&&z&&(p=z.start,(0,_.addSliding)(k,p))):k.hasProgramDateTime&&U.hasProgramDateTime?((0,l.alignMediaPlaylistByPDT)(k,U),p=k.fragments[0].start):z&&(p=z.start,(0,_.addSliding)(k,p))}if(S.details=k,this.levelLastLoaded=g,!this.startFragRequested&&(this.mainDetails||!k.live)&&this.setStartPosition(S.details,p),this.tick(),k.live&&!this.fragCurrent&&this.media&&this.state===n.State.IDLE){var q=(0,E.findFragmentByPTS)(null,k.fragments,this.media.currentTime,0);q||(this.warn("Subtitle playlist not aligned with playback"),S.details=void 0)}},D._handleFragmentLoadComplete=function(P){var I=this,u=P.frag,k=P.payload,g=u.decryptdata,a=this.hls;if(this.fragContextChanged(u))return;if(k&&k.byteLength>0&&g&&g.key&&g.iv&&g.method==="AES-128"){var C=performance.now();this.decrypter.decrypt(new Uint8Array(k),g.key.buffer,g.iv.buffer).then(function(S){var p=performance.now();a.trigger(T.Events.FRAG_DECRYPTED,{frag:u,payload:S,stats:{tstart:C,tdecrypt:p}})}).catch(function(S){I.warn(S.name+": "+S.message),I.state=n.State.IDLE})}},D.doTick=function(){if(!this.media){this.state=n.State.IDLE;return}if(this.state===n.State.IDLE){var P=this.currentTrackId,I=this.levels;if(!I.length||!I[P]||!I[P].details)return;var u=I[P].details,k=u.targetduration,g=this.config,a=this.getLoadPosition(),C=e.BufferHelper.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],a-k,g.maxBufferHole),S=C.end,p=C.len,U=this.getFwdBufferInfo(this.media,o.PlaylistLevelType.MAIN),z=this.getMaxBufferLength(U==null?void 0:U.len)+k;if(p>z)return;console.assert(u,"Subtitle track details are defined on idle subtitle stream controller tick");var q=u.fragments,$=q.length,re=u.edge,ce=null,ne=this.fragPrevious;if(S<re){var me=g.maxFragLookUpTolerance;ce=(0,E.findFragmentByPTS)(ne,q,Math.max(q[0].start,S),me),!ce&&ne&&ne.start<q[0].start&&(ce=q[0])}else ce=q[$-1];if(!ce)return;ce=this.mapToInitFragWhenRequired(ce),this.fragmentTracker.getState(ce)===r.FragmentState.NOT_LOADED&&this.loadFragment(ce,u,S)}},D.getMaxBufferLength=function(P){var I=O.prototype.getMaxBufferLength.call(this);return P?Math.max(I,P):I},D.loadFragment=function(P,I,u){this.fragCurrent=P,P.sn==="initSegment"?this._loadInitSegment(P,I):(this.startFragRequested=!0,O.prototype.loadFragment.call(this,P,I,u))},f(w,[{key:"mediaBufferTimeRanges",get:function(){return new R(this.tracksBuffered[this.currentTrackId]||[])}}]),w}(n.default),R=function(w){this.buffered=void 0;var D=function(P,I,u){if(I=I>>>0,I>u-1)throw new DOMException("Failed to execute '"+P+"' on 'TimeRanges': The index provided ("+I+") is greater than the maximum bound ("+u+")");return w[I][P]};this.buffered={get length(){return w.length},end:function(P){return D("end",P,w.length)},start:function(P){return D("start",P,w.length)}}}},"./src/controller/subtitle-track-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>h});var T=i("./src/events.ts"),e=i("./src/utils/texttrack-utils.ts"),E=i("./src/controller/base-playlist-controller.ts"),l=i("./src/types/loader.ts");function _(b,m){for(var d=0;d<m.length;d++){var x=m[d];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(b,n(x.key),x)}}function r(b,m,d){return m&&_(b.prototype,m),d&&_(b,d),Object.defineProperty(b,"prototype",{writable:!1}),b}function n(b){var m=o(b,"string");return typeof m=="symbol"?m:String(m)}function o(b,m){if(typeof b!="object"||b===null)return b;var d=b[Symbol.toPrimitive];if(d!==void 0){var x=d.call(b,m||"default");if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(b)}function c(b,m){b.prototype=Object.create(m.prototype),b.prototype.constructor=b,v(b,m)}function v(b,m){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(x,R){return x.__proto__=R,x},v(b,m)}var f=function(b){c(m,b);function m(x){var R;return R=b.call(this,x,"[subtitle-track-controller]")||this,R.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}var d=m.prototype;return d.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,b.prototype.destroy.call(this)},d.registerListeners=function(){var R=this.hls;R.on(T.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.on(T.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.on(T.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.on(T.Events.MANIFEST_PARSED,this.onManifestParsed,this),R.on(T.Events.LEVEL_LOADING,this.onLevelLoading,this),R.on(T.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),R.on(T.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.on(T.Events.ERROR,this.onError,this)},d.unregisterListeners=function(){var R=this.hls;R.off(T.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.off(T.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.off(T.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.off(T.Events.MANIFEST_PARSED,this.onManifestParsed,this),R.off(T.Events.LEVEL_LOADING,this.onLevelLoading,this),R.off(T.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),R.off(T.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.off(T.Events.ERROR,this.onError,this)},d.onMediaAttached=function(R,O){if(this.media=O.media,!this.media)return;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)},d.pollTrackChange=function(R){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,R)},d.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var R=y(this.media.textTracks);R.forEach(function(O){(0,e.clearCurrentCues)(O)}),this.subtitleTrack=-1,this.media=null},d.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},d.onManifestParsed=function(R,O){this.tracks=O.subtitleTracks},d.onSubtitleTrackLoaded=function(R,O){var w=O.id,D=O.details,A=this.trackId,P=this.tracksInGroup[A];if(!P){this.warn("Invalid subtitle track id "+w);return}var I=P.details;P.details=O.details,this.log("subtitle track "+w+" loaded ["+D.startSN+"-"+D.endSN+"]"),w===this.trackId&&(this.retryCount=0,this.playlistLoaded(w,O,I))},d.onLevelLoading=function(R,O){this.switchLevel(O.level)},d.onLevelSwitching=function(R,O){this.switchLevel(O.level)},d.switchLevel=function(R){var O=this.hls.levels[R];if(!(O!=null&&O.textGroupIds))return;var w=O.textGroupIds[O.urlId];if(this.groupId!==w){var D=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,A=this.tracks.filter(function(u){return!w||u.groupId===w});this.tracksInGroup=A;var P=this.findTrackId(D==null?void 0:D.name)||this.findTrackId();this.groupId=w;var I={subtitleTracks:A};this.log("Updating subtitle tracks, "+A.length+' track(s) found in "'+w+'" group-id'),this.hls.trigger(T.Events.SUBTITLE_TRACKS_UPDATED,I),P!==-1&&this.setSubtitleTrack(P,D)}},d.findTrackId=function(R){for(var O=this.tracksInGroup,w=0;w<O.length;w++){var D=O[w];if((!this.selectDefaultTrack||D.default)&&(!R||R===D.name))return D.id}return-1},d.onError=function(R,O){if(b.prototype.onError.call(this,R,O),O.fatal||!O.context)return;O.context.type===l.PlaylistContextType.SUBTITLE_TRACK&&O.context.id===this.trackId&&O.context.groupId===this.groupId&&this.retryLoadingOrFail(O)},d.loadPlaylist=function(R){b.prototype.loadPlaylist.call(this);var O=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(O)){var w=O.id,D=O.groupId,A=O.url;if(R)try{A=R.addDirectives(A)}catch(P){this.warn("Could not construct new URL with HLS Delivery Directives: "+P)}this.log("Loading subtitle playlist for id "+w),this.hls.trigger(T.Events.SUBTITLE_TRACK_LOADING,{url:A,id:w,groupId:D,deliveryDirectives:R||null})}},d.toggleTrackModes=function(R){var O=this,w=this.media,D=this.trackId;if(!w)return;var A=y(w.textTracks),P=A.filter(function(k){return k.groupId===O.groupId});if(R===-1)[].slice.call(A).forEach(function(k){k.mode="disabled"});else{var I=P[D];I&&(I.mode="disabled")}var u=P[R];u&&(u.mode=this.subtitleDisplay?"showing":"hidden")},d.setSubtitleTrack=function(R,O){var w,D=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=R;return}if(this.trackId!==R&&this.toggleTrackModes(R),this.trackId===R&&(R===-1||(w=D[R])!==null&&w!==void 0&&w.details)||R<-1||R>=D.length)return;this.clearTimer();var A=D[R];if(this.log("Switching to subtitle track "+R),this.trackId=R,A){var P=A.id,I=A.groupId,u=I===void 0?"":I,k=A.name,g=A.type,a=A.url;this.hls.trigger(T.Events.SUBTITLE_TRACK_SWITCH,{id:P,groupId:u,name:k,type:g,url:a});var C=this.switchParams(A.url,O==null?void 0:O.details);this.loadPlaylist(C)}else this.hls.trigger(T.Events.SUBTITLE_TRACK_SWITCH,{id:R})},d.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var R=-1,O=y(this.media.textTracks),w=0;w<O.length;w++)if(O[w].mode==="hidden")R=w;else if(O[w].mode==="showing"){R=w;break}this.subtitleTrack!==R&&(this.subtitleTrack=R)},r(m,[{key:"subtitleDisplay",get:function(){return this._subtitleDisplay},set:function(R){this._subtitleDisplay=R,this.trackId>-1&&this.toggleTrackModes(this.trackId)}},{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(R){this.selectDefaultTrack=!1;var O=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(R,O)}}]),m}(E.default);function y(b){for(var m=[],d=0;d<b.length;d++){var x=b[d];(x.kind==="subtitles"||x.kind==="captions")&&x.label&&m.push(b[d])}return m}const h=f},"./src/controller/timeline-controller.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{TimelineController:()=>f});var T=i("./src/polyfills/number.ts"),e=i("./src/events.ts"),E=i("./src/utils/cea-608-parser.ts"),l=i("./src/utils/output-filter.ts"),_=i("./src/utils/webvtt-parser.ts"),r=i("./src/utils/texttrack-utils.ts"),n=i("./src/utils/imsc1-ttml-parser.ts"),o=i("./src/utils/mp4-tools.ts"),c=i("./src/types/loader.ts"),v=i("./src/utils/logger.ts"),f=function(){function m(x){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=b(),this.captionsProperties=void 0,this.hls=x,this.config=x.config,this.Cues=x.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 R=new l.default(this,"textTrack1"),O=new l.default(this,"textTrack2"),w=new l.default(this,"textTrack3"),D=new l.default(this,"textTrack4");this.cea608Parser1=new E.default(1,R,O),this.cea608Parser2=new E.default(3,w,D)}x.on(e.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),x.on(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(e.Events.MANIFEST_LOADED,this.onManifestLoaded,this),x.on(e.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),x.on(e.Events.FRAG_LOADING,this.onFragLoading,this),x.on(e.Events.FRAG_LOADED,this.onFragLoaded,this),x.on(e.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),x.on(e.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),x.on(e.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),x.on(e.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),x.on(e.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var d=m.prototype;return d.destroy=function(){var R=this.hls;R.off(e.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),R.off(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.off(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.off(e.Events.MANIFEST_LOADED,this.onManifestLoaded,this),R.off(e.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),R.off(e.Events.FRAG_LOADING,this.onFragLoading,this),R.off(e.Events.FRAG_LOADED,this.onFragLoaded,this),R.off(e.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),R.off(e.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),R.off(e.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),R.off(e.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),R.off(e.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},d.addCues=function(R,O,w,D,A){for(var P=!1,I=A.length;I--;){var u=A[I],k=h(u[0],u[1],O,w);if(k>=0&&(u[0]=Math.min(u[0],O),u[1]=Math.max(u[1],w),P=!0,k/(w-O)>.5))return}if(P||A.push([O,w]),this.config.renderTextTracksNatively){var g=this.captionsTracks[R];this.Cues.newCue(g,O,w,D)}else{var a=this.Cues.newCue(null,O,w,D);this.hls.trigger(e.Events.CUES_PARSED,{type:"captions",cues:a,track:R})}},d.onInitPtsFound=function(R,O){var w=this,D=O.frag,A=O.id,P=O.initPTS,I=O.timescale,u=this.unparsedVttFrags;A==="main"&&(this.initPTS[D.cc]=P,this.timescale[D.cc]=I),u.length&&(this.unparsedVttFrags=[],u.forEach(function(k){w.onFragLoaded(e.Events.FRAG_LOADED,k)}))},d.getExistingTrack=function(R){var O=this.media;if(O)for(var w=0;w<O.textTracks.length;w++){var D=O.textTracks[w];if(D[R])return D}return null},d.createCaptionsTrack=function(R){this.config.renderTextTracksNatively?this.createNativeTrack(R):this.createNonNativeTrack(R)},d.createNativeTrack=function(R){if(this.captionsTracks[R])return;var O=this.captionsProperties,w=this.captionsTracks,D=this.media,A=O[R],P=A.label,I=A.languageCode,u=this.getExistingTrack(R);if(u)w[R]=u,(0,r.clearCurrentCues)(w[R]),(0,r.sendAddTrackEvent)(w[R],D);else{var k=this.createTextTrack("captions",P,I);k&&(k[R]=!0,w[R]=k)}},d.createNonNativeTrack=function(R){if(this.nonNativeCaptionsTracks[R])return;var O=this.captionsProperties[R];if(!O)return;var w=O.label,D={_id:R,label:w,kind:"captions",default:O.media?!!O.media.default:!1,closedCaptions:O.media};this.nonNativeCaptionsTracks[R]=D,this.hls.trigger(e.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[D]})},d.createTextTrack=function(R,O,w){var D=this.media;return D?D.addTextTrack(R,O,w):void 0},d.onMediaAttaching=function(R,O){this.media=O.media,this._cleanTracks()},d.onMediaDetaching=function(){var R=this.captionsTracks;Object.keys(R).forEach(function(O){(0,r.clearCurrentCues)(R[O]),delete R[O]}),this.nonNativeCaptionsTracks={}},d.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=b(),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())},d._cleanTracks=function(){var R=this.media;if(!R)return;var O=R.textTracks;if(O)for(var w=0;w<O.length;w++)(0,r.clearCurrentCues)(O[w])},d.onSubtitleTracksUpdated=function(R,O){var w=this;this.textTracks=[];var D=O.subtitleTracks||[],A=D.some(function(k){return k.textCodec===n.IMSC1_CODEC});if(this.config.enableWebVTT||A&&this.config.enableIMSC1){var P=this.tracks&&D&&this.tracks.length===D.length;if(this.tracks=D||[],this.config.renderTextTracksNatively){var I=this.media?this.media.textTracks:[];this.tracks.forEach(function(k,g){var a;if(g<I.length){for(var C=null,S=0;S<I.length;S++)if(y(I[S],k)){C=I[S];break}C&&(a=C)}if(a)(0,r.clearCurrentCues)(a);else{var p=w._captionsOrSubtitlesFromCharacteristics(k);a=w.createTextTrack(p,k.name,k.lang),a&&(a.mode="disabled")}a&&(a.groupId=k.groupId,w.textTracks.push(a))})}else if(!P&&this.tracks&&this.tracks.length){var u=this.tracks.map(function(k){return{label:k.name,kind:k.type.toLowerCase(),default:k.default,subtitleTrack:k}});this.hls.trigger(e.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:u})}}},d._captionsOrSubtitlesFromCharacteristics=function(R){var O;if((O=R.attrs)!==null&&O!==void 0&&O.CHARACTERISTICS){var w=/transcribes-spoken-dialog/gi.test(R.attrs.CHARACTERISTICS),D=/describes-music-and-sound/gi.test(R.attrs.CHARACTERISTICS);if(w&&D)return"captions"}return"subtitles"},d.onManifestLoaded=function(R,O){var w=this;this.config.enableCEA708Captions&&O.captions&&O.captions.forEach(function(D){var A=/(?:CC|SERVICE)([1-4])/.exec(D.instreamId);if(!A)return;var P="textTrack"+A[1],I=w.captionsProperties[P];if(!I)return;I.label=D.name,D.lang&&(I.languageCode=D.lang),I.media=D})},d.closedCaptionsForLevel=function(R){var O=this.hls.levels[R.level];return O==null?void 0:O.attrs["CLOSED-CAPTIONS"]},d.onFragLoading=function(R,O){var w=this.cea608Parser1,D=this.cea608Parser2,A=this.lastSn,P=this.lastPartIndex;if(!this.enabled||!(w&&D))return;if(O.frag.type===c.PlaylistLevelType.MAIN){var I,u,k=O.frag.sn,g=(I=O==null||((u=O.part)===null||u===void 0)?void 0:u.index)!=null?I:-1;k===A+1||k===A&&g===P+1||(w.reset(),D.reset()),this.lastSn=k,this.lastPartIndex=g}},d.onFragLoaded=function(R,O){var w=O.frag,D=O.payload,A=this.initPTS,P=this.unparsedVttFrags;if(w.type===c.PlaylistLevelType.SUBTITLE)if(D.byteLength){if(!(0,T.isFiniteNumber)(A[w.cc])){P.push(O),A.length&&this.hls.trigger(e.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:w,error:new Error("Missing initial subtitle PTS")});return}var I=w.decryptdata,u="stats"in O;if(I==null||!I.encrypted||u){var k=this.tracks[w.level],g=this.vttCCs;g[w.cc]||(g[w.cc]={start:w.start,prevCC:this.prevCC,new:!0},this.prevCC=w.cc),k&&k.textCodec===n.IMSC1_CODEC?this._parseIMSC1(w,D):this._parseVTTs(w,D,g)}}else this.hls.trigger(e.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:w,error:new Error("Empty subtitle payload")})},d._parseIMSC1=function(R,O){var w=this,D=this.hls;(0,n.parseIMSC1)(O,this.initPTS[R.cc],this.timescale[R.cc],function(A){w._appendCues(A,R.level),D.trigger(e.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:R})},function(A){v.logger.log("Failed to parse IMSC1: "+A),D.trigger(e.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:R,error:A})})},d._parseVTTs=function(R,O,w){var D,A=this,P=this.hls,I=(D=R.initSegment)!==null&&D!==void 0&&D.data?(0,o.appendUint8Array)(R.initSegment.data,new Uint8Array(O)):O;(0,_.parseWebVTT)(I,this.initPTS[R.cc],this.timescale[R.cc],w,R.cc,R.start,function(u){A._appendCues(u,R.level),P.trigger(e.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:R})},function(u){A._fallbackToIMSC1(R,O),v.logger.log("Failed to parse VTT cue: "+u),P.trigger(e.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:R,error:u})})},d._fallbackToIMSC1=function(R,O){var w=this,D=this.tracks[R.level];D.textCodec||(0,n.parseIMSC1)(O,this.initPTS[R.cc],this.timescale[R.cc],function(){D.textCodec=n.IMSC1_CODEC,w._parseIMSC1(R,O)},function(){D.textCodec="wvtt"})},d._appendCues=function(R,O){var w=this.hls;if(this.config.renderTextTracksNatively){var D=this.textTracks[O];if(!D||D.mode==="disabled")return;R.forEach(function(I){return(0,r.addCueToTrack)(D,I)})}else{var A=this.tracks[O];if(!A)return;var P=A.default?"default":"subtitles"+O;w.trigger(e.Events.CUES_PARSED,{type:"subtitles",cues:R,track:P})}},d.onFragDecrypted=function(R,O){var w=O.frag;if(w.type===c.PlaylistLevelType.SUBTITLE){if(!(0,T.isFiniteNumber)(this.initPTS[w.cc])){this.unparsedVttFrags.push(O);return}this.onFragLoaded(e.Events.FRAG_LOADED,O)}},d.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},d.onFragParsingUserdata=function(R,O){var w=this.cea608Parser1,D=this.cea608Parser2;if(!this.enabled||!(w&&D))return;var A=O.frag,P=O.samples;if(A.type===c.PlaylistLevelType.MAIN&&this.closedCaptionsForLevel(A)==="NONE")return;for(var I=0;I<P.length;I++){var u=P[I].bytes;if(u){var k=this.extractCea608Data(u);w.addData(P[I].pts,k[0]),D.addData(P[I].pts,k[1])}}},d.onBufferFlushing=function(R,O){var w=O.startOffset,D=O.endOffset,A=O.endOffsetSubtitles,P=O.type,I=this.media;if(!I||I.currentTime<D)return;if(!P||P==="video"){var u=this.captionsTracks;Object.keys(u).forEach(function(g){return(0,r.removeCuesInRange)(u[g],w,D)})}if(this.config.renderTextTracksNatively&&(w===0&&A!==void 0)){var k=this.textTracks;Object.keys(k).forEach(function(g){return(0,r.removeCuesInRange)(k[g],w,A)})}},d.extractCea608Data=function(R){for(var O=[[],[]],w=R[0]&31,D=2,A=0;A<w;A++){var P=R[D++],I=127&R[D++],u=127&R[D++];if(I===0&&u===0)continue;var k=(4&P)!==0;if(k){var g=3&P;(g===0||g===1)&&(O[g].push(I),O[g].push(u))}}return O},m}();function y(m,d){return m&&m.label===d.name&&!(m.textTrack1||m.textTrack2)}function h(m,d,x,R){return Math.min(d,R)-Math.max(m,x)}function b(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}},"./src/crypt/aes-crypto.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>T});var T=function(){function e(l,_){this.subtle=void 0,this.aesIV=void 0,this.subtle=l,this.aesIV=_}var E=e.prototype;return E.decrypt=function(_,r){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},r,_)},e}()},"./src/crypt/aes-decryptor.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>E,removePadding:()=>e});var T=i("./src/utils/typed-array.ts");function e(l){var _=l.byteLength,r=_&&new DataView(l.buffer).getUint8(_-1);return r?(0,T.sliceUint8)(l,0,_-r):l}var E=function(){function l(){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 _=l.prototype;return _.uint8ArrayToUint32Array_=function(n){for(var o=new DataView(n),c=new Uint32Array(4),v=0;v<4;v++)c[v]=o.getUint32(v*4);return c},_.initTable=function(){var n=this.sBox,o=this.invSBox,c=this.subMix,v=c[0],f=c[1],y=c[2],h=c[3],b=this.invSubMix,m=b[0],d=b[1],x=b[2],R=b[3],O=new Uint32Array(256),w=0,D=0,A=0;for(A=0;A<256;A++)A<128?O[A]=A<<1:O[A]=A<<1^283;for(A=0;A<256;A++){var P=D^D<<1^D<<2^D<<3^D<<4;P=P>>>8^P&255^99,n[w]=P,o[P]=w;var I=O[w],u=O[I],k=O[u],g=O[P]*257^P*16843008;v[w]=g<<24|g>>>8,f[w]=g<<16|g>>>16,y[w]=g<<8|g>>>24,h[w]=g,g=k*16843009^u*65537^I*257^w*16843008,m[P]=g<<24|g>>>8,d[P]=g<<16|g>>>16,x[P]=g<<8|g>>>24,R[P]=g,w?(w=I^O[O[O[k^I]]],D^=O[O[D]]):w=D=1}},_.expandKey=function(n){for(var o=this.uint8ArrayToUint32Array_(n),c=!0,v=0;v<o.length&&c;)c=o[v]===this.key[v],v++;if(c)return;this.key=o;var f=this.keySize=o.length;if(f!==4&&f!==6&&f!==8)throw new Error("Invalid aes key size="+f);var y=this.ksRows=(f+6+1)*4,h,b,m=this.keySchedule=new Uint32Array(y),d=this.invKeySchedule=new Uint32Array(y),x=this.sBox,R=this.rcon,O=this.invSubMix,w=O[0],D=O[1],A=O[2],P=O[3],I,u;for(h=0;h<y;h++){if(h<f){I=m[h]=o[h];continue}u=I,h%f===0?(u=u<<8|u>>>24,u=x[u>>>24]<<24|x[u>>>16&255]<<16|x[u>>>8&255]<<8|x[u&255],u^=R[h/f|0]<<24):f>6&&h%f===4&&(u=x[u>>>24]<<24|x[u>>>16&255]<<16|x[u>>>8&255]<<8|x[u&255]),m[h]=I=(m[h-f]^u)>>>0}for(b=0;b<y;b++)h=y-b,b&3?u=m[h]:u=m[h-4],b<4||h<=4?d[b]=u:d[b]=w[x[u>>>24]]^D[x[u>>>16&255]]^A[x[u>>>8&255]]^P[x[u&255]],d[b]=d[b]>>>0},_.networkToHostOrderSwap=function(n){return n<<24|(n&65280)<<8|(n&16711680)>>8|n>>>24},_.decrypt=function(n,o,c){for(var v=this.keySize+6,f=this.invKeySchedule,y=this.invSBox,h=this.invSubMix,b=h[0],m=h[1],d=h[2],x=h[3],R=this.uint8ArrayToUint32Array_(c),O=R[0],w=R[1],D=R[2],A=R[3],P=new Int32Array(n),I=new Int32Array(P.length),u,k,g,a,C,S,p,U,z,q,$,re,ce,ne,me=this.networkToHostOrderSwap;o<P.length;){for(z=me(P[o]),q=me(P[o+1]),$=me(P[o+2]),re=me(P[o+3]),C=z^f[0],S=re^f[1],p=$^f[2],U=q^f[3],ce=4,ne=1;ne<v;ne++)u=b[C>>>24]^m[S>>16&255]^d[p>>8&255]^x[U&255]^f[ce],k=b[S>>>24]^m[p>>16&255]^d[U>>8&255]^x[C&255]^f[ce+1],g=b[p>>>24]^m[U>>16&255]^d[C>>8&255]^x[S&255]^f[ce+2],a=b[U>>>24]^m[C>>16&255]^d[S>>8&255]^x[p&255]^f[ce+3],C=u,S=k,p=g,U=a,ce=ce+4;u=y[C>>>24]<<24^y[S>>16&255]<<16^y[p>>8&255]<<8^y[U&255]^f[ce],k=y[S>>>24]<<24^y[p>>16&255]<<16^y[U>>8&255]<<8^y[C&255]^f[ce+1],g=y[p>>>24]<<24^y[U>>16&255]<<16^y[C>>8&255]<<8^y[S&255]^f[ce+2],a=y[U>>>24]<<24^y[C>>16&255]<<16^y[S>>8&255]<<8^y[p&255]^f[ce+3],I[o]=me(u^O),I[o+1]=me(a^w),I[o+2]=me(g^D),I[o+3]=me(k^A),O=z,w=q,D=$,A=re,o=o+4}return I.buffer},l}()},"./src/crypt/decrypter.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>o});var T=i("./src/crypt/aes-crypto.ts"),e=i("./src/crypt/fast-aes-key.ts"),E=i("./src/crypt/aes-decryptor.ts"),l=i("./src/utils/logger.ts"),_=i("./src/utils/mp4-tools.ts"),r=i("./src/utils/typed-array.ts"),n=16,o=function(){function c(f,y){var h=y===void 0?{}:y,b=h.removePKCS7Padding,m=b===void 0?!0:b;if(this.logEnabled=!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.useSoftware=void 0,this.useSoftware=f.enableSoftwareAES,this.removePKCS7Padding=m,m)try{var d=self.crypto;d&&(this.subtle=d.subtle||d.webkitSubtle)}catch(x){}this.subtle===null&&(this.useSoftware=!0)}var v=c.prototype;return v.destroy=function(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null},v.isSync=function(){return this.useSoftware},v.flush=function(){var y=this.currentResult,h=this.remainderData;if(!y||h)return this.reset(),null;var b=new Uint8Array(y);return this.reset(),this.removePKCS7Padding?(0,E.removePadding)(b):b},v.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},v.decrypt=function(y,h,b){var m=this;return this.useSoftware?new Promise(function(d,x){m.softwareDecrypt(new Uint8Array(y),h,b);var R=m.flush();R?d(R.buffer):x(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(y),h,b)},v.softwareDecrypt=function(y,h,b){var m=this.currentIV,d=this.currentResult,x=this.remainderData;this.logOnce("JS AES decrypt"),x&&(y=(0,_.appendUint8Array)(x,y),this.remainderData=null);var R=this.getValidChunk(y);if(!R.length)return null;m&&(b=m);var O=this.softwareDecrypter;O||(O=this.softwareDecrypter=new E.default),O.expandKey(h);var w=d;return this.currentResult=O.decrypt(R.buffer,0,b),this.currentIV=(0,r.sliceUint8)(R,-16).buffer,w||null},v.webCryptoDecrypt=function(y,h,b){var m=this,d=this.subtle;return(this.key!==h||!this.fastAesKey)&&(this.key=h,this.fastAesKey=new e.default(d,h)),this.fastAesKey.expandKey().then(function(x){if(!d)return Promise.reject(new Error("web crypto not initialized"));m.logOnce("WebCrypto AES decrypt");var R=new T.default(d,new Uint8Array(b));return R.decrypt(y.buffer,x)}).catch(function(x){return l.logger.warn("[decrypter]: WebCrypto Error, disable WebCrypto API, "+x.name+": "+x.message),m.onWebCryptoError(y,h,b)})},v.onWebCryptoError=function(y,h,b){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(y,h,b);var m=this.flush();if(m)return m.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")},v.getValidChunk=function(y){var h=y,b=y.length-y.length%n;return b!==y.length&&(h=(0,r.sliceUint8)(y,0,b),this.remainderData=(0,r.sliceUint8)(y,b)),h},v.logOnce=function(y){if(!this.logEnabled)return;l.logger.log("[decrypter]: "+y),this.logEnabled=!1},c}()},"./src/crypt/fast-aes-key.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>T});var T=function(){function e(l,_){this.subtle=void 0,this.key=void 0,this.subtle=l,this.key=_}var E=e.prototype;return E.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}()},"./src/demux/aacdemuxer.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>o});var T=i("./src/demux/base-audio-demuxer.ts"),e=i("./src/demux/adts.ts"),E=i("./src/utils/logger.ts"),l=i("./src/demux/id3.ts");function _(c,v){c.prototype=Object.create(v.prototype),c.prototype.constructor=c,r(c,v)}function r(c,v){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(y,h){return y.__proto__=h,y},r(c,v)}var n=function(c){_(v,c);function v(y,h){var b;return b=c.call(this)||this,b.observer=void 0,b.config=void 0,b.observer=y,b.config=h,b}var f=v.prototype;return f.resetInitSegment=function(h,b,m,d){c.prototype.resetInitSegment.call(this,h,b,m,d),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:b,duration:d,inputTimeScale:9e4,dropped:0}},v.probe=function(h){if(!h)return!1;for(var b=l.getID3Data(h,0)||[],m=b.length,d=h.length;m<d;m++)if(e.probe(h,m))return E.logger.log("ADTS sync word found !"),!0;return!1},f.canParse=function(h,b){return e.canParse(h,b)},f.appendFrame=function(h,b,m){e.initTrackConfig(h,this.observer,b,m,h.manifestCodec);var d=e.appendFrame(h,b,m,this.basePTS,this.frameIndex);if(d&&d.missing===0)return d},v}(T.default);const o=n},"./src/demux/adts.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{appendFrame:()=>m,canGetFrameLength:()=>o,canParse:()=>v,getAudioConfig:()=>l,getFrameDuration:()=>h,getFullFrameLength:()=>n,getHeaderLength:()=>r,initTrackConfig:()=>y,isHeader:()=>c,isHeaderPattern:()=>_,parseFrameHeader:()=>b,probe:()=>f});var T=i("./src/utils/logger.ts"),e=i("./src/errors.ts"),E=i("./src/events.ts");function l(d,x,R,O){var w,D,A,P,I=navigator.userAgent.toLowerCase(),u=O,k=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];w=((x[R+2]&192)>>>6)+1;var g=(x[R+2]&60)>>>2;if(g>k.length-1){d.trigger(E.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+g});return}return A=(x[R+2]&1)<<2,A|=(x[R+3]&192)>>>6,T.logger.log("manifest codec:"+O+", ADTS type:"+w+", samplingIndex:"+g),/firefox/i.test(I)?g>=6?(w=5,P=new Array(4),D=g-3):(w=2,P=new Array(2),D=g):I.indexOf("android")!==-1?(w=2,P=new Array(2),D=g):(w=5,P=new Array(4),O&&(O.indexOf("mp4a.40.29")!==-1||O.indexOf("mp4a.40.5")!==-1)||!O&&g>=6?D=g-3:((O&&O.indexOf("mp4a.40.2")!==-1&&(g>=6&&A===1||/vivaldi/i.test(I))||!O&&A===1)&&(w=2,P=new Array(2)),D=g)),P[0]=w<<3,P[0]|=(g&14)>>1,P[1]|=(g&1)<<7,P[1]|=A<<3,w===5&&(P[1]|=(D&14)>>1,P[2]=(D&1)<<7,P[2]|=2<<2,P[3]=0),{config:P,samplerate:k[g],channelCount:A,codec:"mp4a.40."+w,manifestCodec:u}}function _(d,x){return d[x]===255&&(d[x+1]&246)===240}function r(d,x){return d[x+1]&1?7:9}function n(d,x){return(d[x+3]&3)<<11|d[x+4]<<3|(d[x+5]&224)>>>5}function o(d,x){return x+5<d.length}function c(d,x){return x+1<d.length&&_(d,x)}function v(d,x){return o(d,x)&&_(d,x)&&n(d,x)<=d.length-x}function f(d,x){if(c(d,x)){var R=r(d,x);if(x+R>=d.length)return!1;var O=n(d,x);if(O<=R)return!1;var w=x+O;return w===d.length||c(d,w)}return!1}function y(d,x,R,O,w){if(!d.samplerate){var D=l(x,R,O,w);if(!D)return;d.config=D.config,d.samplerate=D.samplerate,d.channelCount=D.channelCount,d.codec=D.codec,d.manifestCodec=D.manifestCodec,T.logger.log("parsed codec:"+d.codec+", rate:"+D.samplerate+", channels:"+D.channelCount)}}function h(d){return 1024*9e4/d}function b(d,x){var R=r(d,x);if(x+R<=d.length){var O=n(d,x)-R;if(O>0)return{headerLength:R,frameLength:O}}}function m(d,x,R,O,w){var D=h(d.samplerate),A=O+w*D,P=b(x,R),I;if(P){var u=P.frameLength,k=P.headerLength,g=k+u,a=Math.max(0,R+g-x.length);a?(I=new Uint8Array(g-k),I.set(x.subarray(R+k,x.length),0)):I=x.subarray(R+k,R+g);var C={unit:I,pts:A};return a||d.samples.push(C),{sample:C,length:g,missing:a}}var S=x.length-R;I=new Uint8Array(S),I.set(x.subarray(R,x.length),0);var p={unit:I,pts:A};return{sample:p,length:S,missing:-1}}},"./src/demux/base-audio-demuxer.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>c,initPTSFn:()=>o});var T=i("./src/polyfills/number.ts"),e=i("./src/demux/id3.ts"),E=i("./src/types/demuxer.ts"),l=i("./src/demux/dummy-demuxed-track.ts"),_=i("./src/utils/mp4-tools.ts"),r=i("./src/utils/typed-array.ts"),n=function(){function v(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}var f=v.prototype;return f.resetInitSegment=function(h,b,m,d){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},f.resetTimeStamp=function(h){this.initPTS=h,this.resetContiguity()},f.resetContiguity=function(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0},f.canParse=function(h,b){return!1},f.appendFrame=function(h,b,m){},f.demux=function(h,b){this.cachedData&&(h=(0,_.appendUint8Array)(this.cachedData,h),this.cachedData=null);var m=e.getID3Data(h,0),d=m?m.length:0,x,R=this._audioTrack,O=this._id3Track,w=m?e.getTimeStamp(m):void 0,D=h.length;for((this.basePTS===null||this.frameIndex===0&&(0,T.isFiniteNumber)(w))&&(this.basePTS=o(w,b,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),m&&m.length>0&&O.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:m,type:E.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY});d<D;){if(this.canParse(h,d)){var A=this.appendFrame(R,h,d);A?(this.frameIndex++,this.lastPTS=A.sample.pts,d+=A.length,x=d):d=D}else e.canParse(h,d)?(m=e.getID3Data(h,d),O.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:m,type:E.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY}),d+=m.length,x=d):d++;if(d===D&&x!==D){var P=(0,r.sliceUint8)(h,x);this.cachedData?this.cachedData=(0,_.appendUint8Array)(this.cachedData,P):this.cachedData=P}}return{audioTrack:R,videoTrack:(0,l.dummyTrack)(),id3Track:O,textTrack:(0,l.dummyTrack)()}},f.demuxSampleAes=function(h,b,m){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},f.flush=function(h){var b=this.cachedData;return b&&(this.cachedData=null,this.demux(b,0)),{audioTrack:this._audioTrack,videoTrack:(0,l.dummyTrack)(),id3Track:this._id3Track,textTrack:(0,l.dummyTrack)()}},f.destroy=function(){},v}(),o=function(f,y,h){return(0,T.isFiniteNumber)(f)?f*90:y*9e4+(h||0)};const c=n},"./src/demux/chunk-cache.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>T});var T=function(){function E(){this.chunks=[],this.dataLength=0}var l=E.prototype;return l.push=function(r){this.chunks.push(r),this.dataLength+=r.length},l.flush=function(){var r=this.chunks,n=this.dataLength,o;if(r.length)r.length===1?o=r[0]:o=e(r,n);else return new Uint8Array(0);return this.reset(),o},l.reset=function(){this.chunks.length=0,this.dataLength=0},E}();function e(E,l){for(var _=new Uint8Array(l),r=0,n=0;n<E.length;n++){var o=E[n];_.set(o,r),r+=o.length}return _}},"./src/demux/dummy-demuxed-track.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{dummyTrack:()=>T});function T(e,E){return e===void 0&&(e=""),E===void 0&&(E=9e4),{type:e,id:-1,pid:-1,inputTimeScale:E,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>E});var T=i("./src/utils/logger.ts"),e=function(){function l(r){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=r,this.bytesAvailable=r.byteLength,this.word=0,this.bitsAvailable=0}var _=l.prototype;return _.loadWord=function(){var n=this.data,o=this.bytesAvailable,c=n.byteLength-o,v=new Uint8Array(4),f=Math.min(4,o);if(f===0)throw new Error("no bytes available");v.set(n.subarray(c,c+f)),this.word=new DataView(v.buffer).getUint32(0),this.bitsAvailable=f*8,this.bytesAvailable-=f},_.skipBits=function(n){var o;n=Math.min(n,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>n?(this.word<<=n,this.bitsAvailable-=n):(n-=this.bitsAvailable,o=n>>3,n-=o<<3,this.bytesAvailable-=o,this.loadWord(),this.word<<=n,this.bitsAvailable-=n)},_.readBits=function(n){var o=Math.min(this.bitsAvailable,n),c=this.word>>>32-o;if(n>32&&T.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=o,this.bitsAvailable>0)this.word<<=o;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return o=n-o,o>0&&this.bitsAvailable?c<<o|this.readBits(o):c},_.skipLZ=function(){var n;for(n=0;n<this.bitsAvailable;++n)if((this.word&2147483648>>>n)!==0)return this.word<<=n,this.bitsAvailable-=n,n;return this.loadWord(),n+this.skipLZ()},_.skipUEG=function(){this.skipBits(1+this.skipLZ())},_.skipEG=function(){this.skipBits(1+this.skipLZ())},_.readUEG=function(){var n=this.skipLZ();return this.readBits(n+1)-1},_.readEG=function(){var n=this.readUEG();return 1&n?1+n>>>1:-1*(n>>>1)},_.readBoolean=function(){return this.readBits(1)===1},_.readUByte=function(){return this.readBits(8)},_.readUShort=function(){return this.readBits(16)},_.readUInt=function(){return this.readBits(32)},_.skipScalingList=function(n){for(var o=8,c=8,v,f=0;f<n;f++)c!==0&&(v=this.readEG(),c=(o+v+256)%256),o=c===0?o:c},_.readSPS=function(){var n=0,o=0,c=0,v=0,f,y,h,b=this.readUByte.bind(this),m=this.readBits.bind(this),d=this.readUEG.bind(this),x=this.readBoolean.bind(this),R=this.skipBits.bind(this),O=this.skipEG.bind(this),w=this.skipUEG.bind(this),D=this.skipScalingList.bind(this);b();var A=b();if(m(5),R(3),b(),w(),A===100||A===110||A===122||A===244||A===44||A===83||A===86||A===118||A===128){var P=d();if(P===3&&R(1),w(),w(),R(1),x())for(y=P!==3?8:12,h=0;h<y;h++)x()&&(h<6?D(16):D(64))}w();var I=d();if(I===0)d();else if(I===1)for(R(1),O(),O(),f=d(),h=0;h<f;h++)O();w(),R(1);var u=d(),k=d(),g=m(1);g===0&&R(1),R(1),x()&&(n=d(),o=d(),c=d(),v=d());var a=[1,1];if(x()&&x()){var C=b();switch(C){case 1:a=[1,1];break;case 2:a=[12,11];break;case 3:a=[10,11];break;case 4:a=[16,11];break;case 5:a=[40,33];break;case 6:a=[24,11];break;case 7:a=[20,11];break;case 8:a=[32,11];break;case 9:a=[80,33];break;case 10:a=[18,11];break;case 11:a=[15,11];break;case 12:a=[64,33];break;case 13:a=[160,99];break;case 14:a=[4,3];break;case 15:a=[3,2];break;case 16:a=[2,1];break;case 255:{a=[b()<<8|b(),b()<<8|b()];break}}}return{width:Math.ceil((u+1)*16-n*2-o*2),height:(2-g)*(k+1)*16-(g?2:4)*(c+v),pixelRatio:a}},_.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},l}();const E=e},"./src/demux/id3.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{canParse:()=>_,decodeFrame:()=>v,getID3Data:()=>E,getID3Frames:()=>c,getTimeStamp:()=>r,isFooter:()=>e,isHeader:()=>T,isTimeStampFrame:()=>n,testables:()=>d,utf8ArrayToStr:()=>m});var T=function(w,D){return D+10<=w.length&&(w[D]===73&&w[D+1]===68&&w[D+2]===51&&(w[D+3]<255&&w[D+4]<255&&(w[D+6]<128&&w[D+7]<128&&w[D+8]<128&&w[D+9]<128)))},e=function(w,D){return D+10<=w.length&&(w[D]===51&&w[D+1]===68&&w[D+2]===73&&(w[D+3]<255&&w[D+4]<255&&(w[D+6]<128&&w[D+7]<128&&w[D+8]<128&&w[D+9]<128)))},E=function(w,D){for(var A=D,P=0;T(w,D);){P+=10;var I=l(w,D+6);P+=I,e(w,D+10)&&(P+=10),D+=P}return P>0?w.subarray(A,A+P):void 0},l=function(w,D){var A=0;return A=(w[D]&127)<<21,A|=(w[D+1]&127)<<14,A|=(w[D+2]&127)<<7,A|=w[D+3]&127,A},_=function(w,D){return T(w,D)&&l(w,D+6)+10<=w.length-D},r=function(w){for(var D=c(w),A=0;A<D.length;A++){var P=D[A];if(n(P))return b(P)}return},n=function(w){return w&&w.key==="PRIV"&&w.info==="com.apple.streaming.transportStreamTimestamp"},o=function(w){var D=String.fromCharCode(w[0],w[1],w[2],w[3]),A=l(w,4),P=10;return{type:D,size:A,data:w.subarray(P,P+A)}},c=function(w){for(var D=0,A=[];T(w,D);){var P=l(w,D+6);D+=10;for(var I=D+P;D+8<I;){var u=o(w.subarray(D)),k=v(u);k&&A.push(k),D+=u.size+10}e(w,D)&&(D+=10)}return A},v=function(w){return w.type==="PRIV"?f(w):w.type[0]==="W"?h(w):y(w)},f=function(w){if(w.size<2)return;var D=m(w.data,!0),A=new Uint8Array(w.data.subarray(D.length+1));return{key:w.type,info:D,data:A.buffer}},y=function(w){if(w.size<2)return;if(w.type==="TXXX"){var D=1,A=m(w.data.subarray(D),!0);D+=A.length+1;var P=m(w.data.subarray(D));return{key:w.type,info:A,data:P}}var I=m(w.data.subarray(1));return{key:w.type,data:I}},h=function(w){if(w.type==="WXXX"){if(w.size<2)return;var D=1,A=m(w.data.subarray(D),!0);D+=A.length+1;var P=m(w.data.subarray(D));return{key:w.type,info:A,data:P}}var I=m(w.data);return{key:w.type,data:I}},b=function(w){if(w.data.byteLength===8){var D=new Uint8Array(w.data),A=D[3]&1,P=(D[4]<<23)+(D[5]<<15)+(D[6]<<7)+D[7];return P/=45,A&&(P+=4772185884e-2),Math.round(P)}return},m=function(w,D){D===void 0&&(D=!1);var A=R();if(A){var P=A.decode(w);if(D){var I=P.indexOf("\0");return I!==-1?P.substring(0,I):P}return P.replace(/\0/g,"")}for(var u=w.length,k,g,a,C="",S=0;S<u;){if(k=w[S++],k===0&&D)return C;if(k===0||k===3)continue;switch(k>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:C+=String.fromCharCode(k);break;case 12:case 13:g=w[S++],C+=String.fromCharCode((k&31)<<6|g&63);break;case 14:g=w[S++],a=w[S++],C+=String.fromCharCode((k&15)<<12|(g&63)<<6|(a&63)<<0);break;default:}}return C},d={decodeTextFrame:y},x;function R(){return!x&&typeof self.TextDecoder!="undefined"&&(x=new self.TextDecoder("utf-8")),x}},"./src/demux/mp3demuxer.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>o});var T=i("./src/demux/base-audio-demuxer.ts"),e=i("./src/demux/id3.ts"),E=i("./src/utils/logger.ts"),l=i("./src/demux/mpegaudio.ts");function _(c,v){c.prototype=Object.create(v.prototype),c.prototype.constructor=c,r(c,v)}function r(c,v){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(y,h){return y.__proto__=h,y},r(c,v)}var n=function(c){_(v,c);function v(){return c.apply(this,arguments)||this}var f=v.prototype;return f.resetInitSegment=function(h,b,m,d){c.prototype.resetInitSegment.call(this,h,b,m,d),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:b,duration:d,inputTimeScale:9e4,dropped:0}},v.probe=function(h){if(!h)return!1;for(var b=e.getID3Data(h,0)||[],m=b.length,d=h.length;m<d;m++)if(l.probe(h,m))return E.logger.log("MPEG Audio sync word found !"),!0;return!1},f.canParse=function(h,b){return l.canParse(h,b)},f.appendFrame=function(h,b,m){return this.basePTS===null?void 0:l.appendFrame(h,b,m,this.basePTS,this.frameIndex)},v}(T.default);const o=n},"./src/demux/mp4demuxer.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>n});var T=i("./src/polyfills/number.ts"),e=i("./src/types/demuxer.ts"),E=i("./src/utils/mp4-tools.ts"),l=i("./src/demux/dummy-demuxed-track.ts"),_=/\/emsg[-/]ID3/i,r=function(){function o(v,f){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=f}var c=o.prototype;return c.resetTimeStamp=function(){},c.resetInitSegment=function(f,y,h,b){var m=this.videoTrack=(0,l.dummyTrack)("video",1),d=this.audioTrack=(0,l.dummyTrack)("audio",1),x=this.txtTrack=(0,l.dummyTrack)("text",1);if(this.id3Track=(0,l.dummyTrack)("id3",1),this.timeOffset=0,!f||!f.byteLength)return;var R=(0,E.parseInitSegment)(f);if(R.video){var O=R.video,w=O.id,D=O.timescale,A=O.codec;m.id=w,m.timescale=x.timescale=D,m.codec=A}if(R.audio){var P=R.audio,I=P.id,u=P.timescale,k=P.codec;d.id=I,d.timescale=u,d.codec=k}x.id=E.RemuxerTrackIdConfig.text,m.sampleDuration=0,m.duration=d.duration=b},c.resetContiguity=function(){},o.probe=function(f){return f=f.length>16384?f.subarray(0,16384):f,(0,E.findBox)(f,["moof"]).length>0},c.demux=function(f,y){this.timeOffset=y;var h=f,b=this.videoTrack,m=this.txtTrack;if(this.config.progressive){this.remainderData&&(h=(0,E.appendUint8Array)(this.remainderData,f));var d=(0,E.segmentValidRange)(h);this.remainderData=d.remainder,b.samples=d.valid||new Uint8Array}else b.samples=h;var x=this.extractID3Track(b,y);return m.samples=(0,E.parseSamples)(y,b),{videoTrack:b,audioTrack:this.audioTrack,id3Track:x,textTrack:this.txtTrack}},c.flush=function(){var f=this.timeOffset,y=this.videoTrack,h=this.txtTrack;y.samples=this.remainderData||new Uint8Array,this.remainderData=null;var b=this.extractID3Track(y,this.timeOffset);return h.samples=(0,E.parseSamples)(f,y),{videoTrack:y,audioTrack:(0,l.dummyTrack)(),id3Track:b,textTrack:(0,l.dummyTrack)()}},c.extractID3Track=function(f,y){var h=this.id3Track;if(f.samples.length){var b=(0,E.findBox)(f.samples,["emsg"]);b&&b.forEach(function(m){var d=(0,E.parseEmsg)(m);if(_.test(d.schemeIdUri)){var x=(0,T.isFiniteNumber)(d.presentationTime)?d.presentationTime/d.timeScale:y+d.presentationTimeDelta/d.timeScale,R=d.eventDuration===4294967295?Number.POSITIVE_INFINITY:d.eventDuration/d.timeScale;R<=.001&&(R=Number.POSITIVE_INFINITY);var O=d.payload;h.samples.push({data:O,len:O.byteLength,dts:x,pts:x,type:e.MetadataSchema.emsg,duration:R})}})}return h},c.demuxSampleAes=function(f,y,h){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},c.destroy=function(){},o}();const n=r},"./src/demux/mpegaudio.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{appendFrame:()=>r,canParse:()=>v,isHeader:()=>c,isHeaderPattern:()=>o,parseHeader:()=>n,probe:()=>f});var T=null,e=[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],E=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],l=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],_=[0,1,1,4];function r(y,h,b,m,d){if(b+24>h.length)return;var x=n(h,b);if(x&&b+x.frameLength<=h.length){var R=x.samplesPerFrame*9e4/x.sampleRate,O=m+d*R,w={unit:h.subarray(b,b+x.frameLength),pts:O,dts:O};return y.config=[],y.channelCount=x.channelCount,y.samplerate=x.sampleRate,y.samples.push(w),{sample:w,length:x.frameLength,missing:0}}}function n(y,h){var b=y[h+1]>>3&3,m=y[h+1]>>1&3,d=y[h+2]>>4&15,x=y[h+2]>>2&3;if(b!==1&&d!==0&&d!==15&&x!==3){var R=y[h+2]>>1&1,O=y[h+3]>>6,w=b===3?3-m:m===3?3:4,D=e[w*14+d-1]*1e3,A=b===3?0:b===2?1:2,P=E[A*3+x],I=O===3?1:2,u=l[b][m],k=_[m],g=u*8*k,a=Math.floor(u*D/P+R)*k;if(T===null){var C=navigator.userAgent||"",S=C.match(/Chrome\/(\d+)/i);T=S?parseInt(S[1]):0}var p=!!T&&T<=87;return p&&m===2&&D>=224e3&&O===0&&(y[h+3]=y[h+3]|128),{sampleRate:P,channelCount:I,frameLength:a,samplesPerFrame:g}}}function o(y,h){return y[h]===255&&(y[h+1]&224)===224&&(y[h+1]&6)!==0}function c(y,h){return h+1<y.length&&o(y,h)}function v(y,h){var b=4;return o(y,h)&&b<=y.length-h}function f(y,h){if(h+1<y.length&&o(y,h)){var b=4,m=n(y,h),d=b;m!=null&&m.frameLength&&(d=m.frameLength);var x=h+d;return x===y.length||c(y,x)}return!1}},"./src/demux/sample-aes.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>l});var T=i("./src/crypt/decrypter.ts"),e=i("./src/utils/mp4-tools.ts"),E=function(){function _(n,o,c){this.keyData=void 0,this.decrypter=void 0,this.keyData=c,this.decrypter=new T.default(o,{removePKCS7Padding:!1})}var r=_.prototype;return r.decryptBuffer=function(o){return this.decrypter.decrypt(o,this.keyData.key.buffer,this.keyData.iv.buffer)},r.decryptAacSample=function(o,c,v){var f=this,y=o[c].unit;if(y.length<=16)return;var h=y.subarray(16,y.length-y.length%16),b=h.buffer.slice(h.byteOffset,h.byteOffset+h.length);this.decryptBuffer(b).then(function(m){var d=new Uint8Array(m);y.set(d,16),f.decrypter.isSync()||f.decryptAacSamples(o,c+1,v)})},r.decryptAacSamples=function(o,c,v){for(;;c++){if(c>=o.length){v();return}if(o[c].unit.length<32)continue;if(this.decryptAacSample(o,c,v),!this.decrypter.isSync())return}},r.getAvcEncryptedData=function(o){for(var c=Math.floor((o.length-48)/160)*16+16,v=new Int8Array(c),f=0,y=32;y<o.length-16;y+=160,f+=16)v.set(o.subarray(y,y+16),f);return v},r.getAvcDecryptedUnit=function(o,c){for(var v=new Uint8Array(c),f=0,y=32;y<o.length-16;y+=160,f+=16)o.set(v.subarray(f,f+16),y);return o},r.decryptAvcSample=function(o,c,v,f,y){var h=this,b=(0,e.discardEPB)(y.data),m=this.getAvcEncryptedData(b);this.decryptBuffer(m.buffer).then(function(d){y.data=h.getAvcDecryptedUnit(b,d),h.decrypter.isSync()||h.decryptAvcSamples(o,c,v+1,f)})},r.decryptAvcSamples=function(o,c,v,f){if(o instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;c++,v=0){if(c>=o.length){f();return}for(var y=o[c].units;!(v>=y.length);v++){var h=y[v];if(h.data.length<=48||h.type!==1&&h.type!==5)continue;if(this.decryptAvcSample(o,c,v,f,h),!this.decrypter.isSync())return}}},_}();const l=E},"./src/demux/transmuxer-interface.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>v});var T=i("./src/demux/webworkify-webpack.js"),e=i("./src/events.ts"),E=i("./src/demux/transmuxer.ts"),l=i("./src/utils/logger.ts"),_=i("./src/errors.ts"),r=i("./src/utils/mediasource-helper.ts"),n=i("./node_modules/eventemitter3/index.js"),o=i.n(n),c=(0,r.getMediaSource)()||{isTypeSupported:function(){return!1}},v=function(){function f(h,b,m,d){var x=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;var R=h.config;this.hls=h,this.id=b,this.useWorker=!!R.enableWorker,this.onTransmuxComplete=m,this.onFlush=d;var O=function(I,u){u=u||{},u.frag=x.frag,u.id=x.id,x.hls.trigger(I,u)};this.observer=new n.EventEmitter,this.observer.on(e.Events.FRAG_DECRYPTED,O),this.observer.on(e.Events.ERROR,O);var w={mp4:c.isTypeSupported("video/mp4"),mpeg:c.isTypeSupported("audio/mpeg"),mp3:c.isTypeSupported('audio/mp4; codecs="mp3"')},D=navigator.vendor;if(this.useWorker&&typeof Worker!="undefined"){l.logger.log("demuxing in webworker");var A;try{A=this.worker=(0,T.default)("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),A.addEventListener("message",this.onwmsg),A.onerror=function(P){x.useWorker=!1,l.logger.warn("Exception in webworker, fallback to inline"),x.hls.trigger(e.Events.ERROR,{type:_.ErrorTypes.OTHER_ERROR,details:_.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:new Error(P.message+" ("+P.filename+":"+P.lineno+")")})},A.postMessage({cmd:"init",typeSupported:w,vendor:D,id:b,config:JSON.stringify(R)})}catch(P){l.logger.warn("Error in worker:",P),l.logger.error("Error while initializing DemuxerWorker, fallback to inline"),A&&self.URL.revokeObjectURL(A.objectURL),this.transmuxer=new E.default(this.observer,w,R,D,b),this.worker=null}}else this.transmuxer=new E.default(this.observer,w,R,D,b)}var y=f.prototype;return y.destroy=function(){var b=this.worker;if(b)b.removeEventListener("message",this.onwmsg),b.terminate(),this.worker=null,this.onwmsg=void 0;else{var m=this.transmuxer;m&&(m.destroy(),this.transmuxer=null)}var d=this.observer;d&&d.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null},y.push=function(b,m,d,x,R,O,w,D,A,P){var I,u,k=this;A.transmuxing.start=self.performance.now();var g=this.transmuxer,a=this.worker,C=O?O.start:R.start,S=R.decryptdata,p=this.frag,U=!(p&&R.cc===p.cc),z=!(p&&A.level===p.level),q=p?A.sn-p.sn:-1,$=this.part?A.part-this.part.index:-1,re=q===0&&A.id>1&&A.id===(p==null?void 0:p.stats.chunkCount),ce=!z&&(q===1||q===0&&($===1||re&&$<=0)),ne=self.performance.now();(z||q||R.stats.parsing.start===0)&&(R.stats.parsing.start=ne),O&&($||!ce)&&(O.stats.parsing.start=ne);var me=!(p&&((I=R.initSegment)===null||I===void 0?void 0:I.url)===((u=p.initSegment)===null||u===void 0?void 0:u.url)),be=new E.TransmuxState(U,ce,D,z,C,me);if(!ce||U||me){l.logger.log("[transmuxer-interface, "+R.type+"]: Starting new transmux session for sn: "+A.sn+" p: "+A.part+" level: "+A.level+" id: "+A.id+`
|
|
|
discontinuity: `+U+`
|
|
|
trackSwitch: `+z+`
|
|
|
contiguous: `+ce+`
|
|
|
accurateTimeOffset: `+D+`
|
|
|
timeOffset: `+C+`
|
|
|
initSegmentChange: `+me);var he=new E.TransmuxConfig(d,x,m,w,P);this.configureTransmuxer(he)}if(this.frag=R,this.part=O,a)a.postMessage({cmd:"demux",data:b,decryptdata:S,chunkMeta:A,state:be},b instanceof ArrayBuffer?[b]:[]);else if(g){var se=g.push(b,S,A,be);(0,E.isPromise)(se)?(g.async=!0,se.then(function(_e){k.handleTransmuxComplete(_e)}).catch(function(_e){k.transmuxerError(_e,A,"transmuxer-interface push error")})):(g.async=!1,this.handleTransmuxComplete(se))}},y.flush=function(b){var m=this;b.transmuxing.start=self.performance.now();var d=this.transmuxer,x=this.worker;if(x)x.postMessage({cmd:"flush",chunkMeta:b});else if(d){var R=d.flush(b),O=(0,E.isPromise)(R);O||d.async?((0,E.isPromise)(R)||(R=Promise.resolve(R)),R.then(function(w){m.handleFlushResult(w,b)}).catch(function(w){m.transmuxerError(w,b,"transmuxer-interface flush error")})):this.handleFlushResult(R,b)}},y.transmuxerError=function(b,m,d){if(!this.hls)return;this.hls.trigger(e.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:m,fatal:!1,error:b,err:b,reason:d})},y.handleFlushResult=function(b,m){var d=this;b.forEach(function(x){d.handleTransmuxComplete(x)}),this.onFlush(m)},y.onWorkerMessage=function(b){var m=b.data,d=this.hls;switch(m.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(m.data);break}case"flush":{this.onFlush(m.data);break}case"workerLog":l.logger[m.data.logType]&&l.logger[m.data.logType](m.data.message);break;default:{m.data=m.data||{},m.data.frag=this.frag,m.data.id=this.id,d.trigger(m.event,m.data);break}}},y.configureTransmuxer=function(b){var m=this.worker,d=this.transmuxer;m?m.postMessage({cmd:"configure",config:b}):d&&d.configure(b)},y.handleTransmuxComplete=function(b){b.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(b)},f}()},"./src/demux/transmuxer-worker.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>n});var T=i("./src/demux/transmuxer.ts"),e=i("./src/events.ts"),E=i("./src/utils/logger.ts"),l=i("./node_modules/eventemitter3/index.js"),_=i.n(l),r=i("./src/errors.ts");function n(y){var h=new l.EventEmitter,b=function(x,R){y.postMessage({event:x,data:R})};h.on(e.Events.FRAG_DECRYPTED,b),h.on(e.Events.ERROR,b);var m=function(){var x=function(w){var D=function(P){b("workerLog",{logType:w,message:P})};E.logger[w]=D};for(var R in E.logger)x(R)};y.addEventListener("message",function(d){var x=d.data;switch(x.cmd){case"init":{var R=JSON.parse(x.config);y.transmuxer=new T.default(h,x.typeSupported,R,x.vendor,x.id),(0,E.enableLogs)(R.debug,x.id),m(),b("init",null);break}case"configure":{y.transmuxer.configure(x.config);break}case"demux":{var O=y.transmuxer.push(x.data,x.decryptdata,x.chunkMeta,x.state);(0,T.isPromise)(O)?(y.transmuxer.async=!0,O.then(function(P){o(y,P)}).catch(function(P){b(e.Events.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:x.chunkMeta,fatal:!1,error:P,err:P,reason:"transmuxer-worker push error"})})):(y.transmuxer.async=!1,o(y,O));break}case"flush":{var w=x.chunkMeta,D=y.transmuxer.flush(w),A=(0,T.isPromise)(D);A||y.transmuxer.async?((0,T.isPromise)(D)||(D=Promise.resolve(D)),D.then(function(P){v(y,P,w)}).catch(function(P){b(e.Events.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:x.chunkMeta,fatal:!1,error:P,err:P,reason:"transmuxer-worker flush error"})})):v(y,D,w);break}default:break}})}function o(y,h){if(f(h.remuxResult))return!1;var b=[],m=h.remuxResult,d=m.audio,x=m.video;return d&&c(b,d),x&&c(b,x),y.postMessage({event:"transmuxComplete",data:h},b),!0}function c(y,h){h.data1&&y.push(h.data1.buffer),h.data2&&y.push(h.data2.buffer)}function v(y,h,b){var m=h.reduce(function(d,x){return o(y,x)||d},!1);m||y.postMessage({event:"transmuxComplete",data:h[0]}),y.postMessage({event:"flush",data:b})}function f(y){return!y.audio&&!y.video&&!y.text&&!y.id3&&!y.initSegment}},"./src/demux/transmuxer.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{TransmuxConfig:()=>x,TransmuxState:()=>R,default:()=>h,isPromise:()=>d});var T=i("./src/events.ts"),e=i("./src/errors.ts"),E=i("./src/crypt/decrypter.ts"),l=i("./src/demux/aacdemuxer.ts"),_=i("./src/demux/mp4demuxer.ts"),r=i("./src/demux/tsdemuxer.ts"),n=i("./src/demux/mp3demuxer.ts"),o=i("./src/remux/mp4-remuxer.ts"),c=i("./src/remux/passthrough-remuxer.ts"),v=i("./src/utils/logger.ts"),f;try{f=self.performance.now.bind(self.performance)}catch(O){v.logger.debug("Unable to use Performance API on this environment"),f=self.Date.now}var y=[{demux:_.default,remux:c.default},{demux:r.default,remux:o.default},{demux:l.default,remux:o.default},{demux:n.default,remux:o.default}],h=function(){function O(D,A,P,I,u){this.async=!1,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.observer=D,this.typeSupported=A,this.config=P,this.vendor=I,this.id=u}var w=O.prototype;return w.configure=function(A){this.transmuxConfig=A,this.decrypter&&this.decrypter.reset()},w.push=function(A,P,I,u){var k=this,g=I.transmuxing;g.executeStart=f();var a=new Uint8Array(A),C=this.currentTransmuxState,S=this.transmuxConfig;u&&(this.currentTransmuxState=u);var p=u||C,U=p.contiguous,z=p.discontinuity,q=p.trackSwitch,$=p.accurateTimeOffset,re=p.timeOffset,ce=p.initSegmentChange,ne=S.audioCodec,me=S.videoCodec,be=S.defaultInitPts,he=S.duration,se=S.initSegmentData,_e=b(a,P);if(_e&&_e.method==="AES-128"){var De=this.getDecrypter();if(De.isSync()){var ge=De.softwareDecrypt(a,_e.key.buffer,_e.iv.buffer),fe=I.part>-1;if(fe&&(ge=De.flush()),!ge)return g.executeEnd=f(),m(I);a=new Uint8Array(ge)}else return this.decryptionPromise=De.webCryptoDecrypt(a,_e.key.buffer,_e.iv.buffer).then(function(J){var Z=k.push(J,null,I);return k.decryptionPromise=null,Z}),this.decryptionPromise}var Ce=this.needsProbing(z,q);Ce&&this.configureTransmuxer(a),(z||q||ce||Ce)&&this.resetInitSegment(se,ne,me,he,P),(z||ce||Ce)&&this.resetInitialTimestamp(be),U||this.resetContiguity();var ae=this.transmux(a,_e,re,$,I),Q=this.currentTransmuxState;return Q.contiguous=!0,Q.discontinuity=!1,Q.trackSwitch=!1,g.executeEnd=f(),ae},w.flush=function(A){var P=this,I=A.transmuxing;I.executeStart=f();var u=this.decrypter,k=this.currentTransmuxState,g=this.decryptionPromise;if(g)return g.then(function(){return P.flush(A)});var a=[],C=k.timeOffset;if(u){var S=u.flush();S&&a.push(this.push(S,null,A))}var p=this.demuxer,U=this.remuxer;if(!p||!U)return this.observer.emit(T.Events.ERROR,T.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),I.executeEnd=f(),[m(A)];var z=p.flush(C);return d(z)?z.then(function(q){return P.flushRemux(a,q,A),a}):(this.flushRemux(a,z,A),a)},w.flushRemux=function(A,P,I){var u=P.audioTrack,k=P.videoTrack,g=P.id3Track,a=P.textTrack,C=this.currentTransmuxState,S=C.accurateTimeOffset,p=C.timeOffset;v.logger.log("[transmuxer.ts]: Flushed fragment "+I.sn+(I.part>-1?" p: "+I.part:"")+" of level "+I.level);var U=this.remuxer.remux(u,k,g,a,p,S,!0,this.id);A.push({remuxResult:U,chunkMeta:I}),I.transmuxing.executeEnd=f()},w.resetInitialTimestamp=function(A){var P=this.demuxer,I=this.remuxer;if(!P||!I)return;P.resetTimeStamp(A),I.resetTimeStamp(A)},w.resetContiguity=function(){var A=this.demuxer,P=this.remuxer;if(!A||!P)return;A.resetContiguity(),P.resetNextTimestamp()},w.resetInitSegment=function(A,P,I,u,k){var g=this.demuxer,a=this.remuxer;if(!g||!a)return;g.resetInitSegment(A,P,I,u),a.resetInitSegment(A,P,I,k)},w.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},w.transmux=function(A,P,I,u,k){var g;return P&&P.method==="SAMPLE-AES"?g=this.transmuxSampleAes(A,P,I,u,k):g=this.transmuxUnencrypted(A,I,u,k),g},w.transmuxUnencrypted=function(A,P,I,u){var k=this.demuxer.demux(A,P,!1,!this.config.progressive),g=k.audioTrack,a=k.videoTrack,C=k.id3Track,S=k.textTrack,p=this.remuxer.remux(g,a,C,S,P,I,!1,this.id);return{remuxResult:p,chunkMeta:u}},w.transmuxSampleAes=function(A,P,I,u,k){var g=this;return this.demuxer.demuxSampleAes(A,P,I).then(function(a){var C=g.remuxer.remux(a.audioTrack,a.videoTrack,a.id3Track,a.textTrack,I,u,!1,g.id);return{remuxResult:C,chunkMeta:k}})},w.configureTransmuxer=function(A){for(var P=this.config,I=this.observer,u=this.typeSupported,k=this.vendor,g,a=0,C=y.length;a<C;a++)if(y[a].demux.probe(A)){g=y[a];break}g||(v.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),g={demux:_.default,remux:c.default});var S=this.demuxer,p=this.remuxer,U=g.remux,z=g.demux;(!p||!(p instanceof U))&&(this.remuxer=new U(I,P,u,k)),(!S||!(S instanceof z))&&(this.demuxer=new z(I,P,u),this.probe=z.probe)},w.needsProbing=function(A,P){return!this.demuxer||!this.remuxer||A||P},w.getDecrypter=function(){var A=this.decrypter;return A||(A=this.decrypter=new E.default(this.config)),A},O}();function b(O,w){var D=null;return O.byteLength>0&&w!=null&&w.key!=null&&w.iv!==null&&w.method!=null&&(D=w),D}var m=function(w){return{remuxResult:{},chunkMeta:w}};function d(O){return"then"in O&&O.then instanceof Function}var x=function(w,D,A,P,I){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=w,this.videoCodec=D,this.initSegmentData=A,this.duration=P,this.defaultInitPts=I},R=function(w,D,A,P,I,u){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=w,this.contiguous=D,this.accurateTimeOffset=A,this.trackSwitch=P,this.timeOffset=I,this.initSegmentChange=u}},"./src/demux/tsdemuxer.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>O});var T=i("./src/demux/adts.ts"),e=i("./src/demux/mpegaudio.ts"),E=i("./src/demux/exp-golomb.ts"),l=i("./src/demux/sample-aes.ts"),_=i("./src/events.ts"),r=i("./src/utils/mp4-tools.ts"),n=i("./src/utils/logger.ts"),o=i("./src/errors.ts"),c=i("./src/types/demuxer.ts");function v(){return v=Object.assign?Object.assign.bind():function(w){for(var D=1;D<arguments.length;D++){var A=arguments[D];for(var P in A)Object.prototype.hasOwnProperty.call(A,P)&&(w[P]=A[P])}return w},v.apply(this,arguments)}var f=188,y=function(){function w(A,P,I){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._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=A,this.config=P,this.typeSupported=I}w.probe=function(P){var I=w.syncOffset(P);return I>0&&n.logger.warn("MPEG2-TS detected but first sync word found @ offset "+I),I!==-1},w.syncOffset=function(P){for(var I=P.length,u=Math.min(f*5,P.length-f)+1,k=0;k<u;){for(var g=!1,a=k;a<I&&P[a]===71;a+=f)if(!g&&b(P,a)===0&&(g=!0),g&&a+f>u)return k;k++}return-1},w.createTrack=function(P,I){return{container:P==="video"||P==="audio"?"video/mp2t":void 0,type:P,id:r.RemuxerTrackIdConfig[P],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:P==="audio"?I:void 0}};var D=w.prototype;return D.resetInitSegment=function(P,I,u,k){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=w.createTrack("video"),this._audioTrack=w.createTrack("audio",k),this._id3Track=w.createTrack("id3"),this._txtTrack=w.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.audioCodec=I,this.videoCodec=u,this._duration=k},D.resetTimeStamp=function(){},D.resetContiguity=function(){var P=this._audioTrack,I=this._avcTrack,u=this._id3Track;P&&(P.pesData=null),I&&(I.pesData=null),u&&(u.pesData=null),this.aacOverFlow=null,this.avcSample=null,this.remainderData=null},D.demux=function(P,I,u,k){u===void 0&&(u=!1),k===void 0&&(k=!1),u||(this.sampleAes=null);var g,a=this._avcTrack,C=this._audioTrack,S=this._id3Track,p=this._txtTrack,U=a.pid,z=a.pesData,q=C.pid,$=S.pid,re=C.pesData,ce=S.pesData,ne=null,me=this.pmtParsed,be=this._pmtId,he=P.length;if(this.remainderData&&(P=(0,r.appendUint8Array)(this.remainderData,P),he=P.length,this.remainderData=null),he<f&&!k)return this.remainderData=P,{audioTrack:C,videoTrack:a,id3Track:S,textTrack:p};var se=Math.max(0,w.syncOffset(P));he-=(he-se)%f,he<P.byteLength&&!k&&(this.remainderData=new Uint8Array(P.buffer,he,P.buffer.byteLength-he));for(var _e=0,De=se;De<he;De+=f)if(P[De]===71){var ge=!!(P[De+1]&64),fe=b(P,De),Ce=(P[De+3]&48)>>4,ae=void 0;if(Ce>1){if(ae=De+5+P[De+4],ae===De+f)continue}else ae=De+4;switch(fe){case U:ge&&(z&&(g=x(z))&&this.parseAVCPES(a,p,g,!1),z={data:[],size:0}),z&&(z.data.push(P.subarray(ae,De+f)),z.size+=De+f-ae);break;case q:if(ge){if(re&&(g=x(re)))switch(C.segmentCodec){case"aac":this.parseAACPES(C,g);break;case"mp3":this.parseMPEGPES(C,g);break}re={data:[],size:0}}re&&(re.data.push(P.subarray(ae,De+f)),re.size+=De+f-ae);break;case $:ge&&(ce&&(g=x(ce))&&this.parseID3PES(S,g),ce={data:[],size:0}),ce&&(ce.data.push(P.subarray(ae,De+f)),ce.size+=De+f-ae);break;case 0:ge&&(ae+=P[ae]+1),be=this._pmtId=m(P,ae);break;case be:{ge&&(ae+=P[ae]+1);var Q=d(P,ae,this.typeSupported,u);U=Q.avc,U>0&&(a.pid=U),q=Q.audio,q>0&&(C.pid=q,C.segmentCodec=Q.segmentCodec),$=Q.id3,$>0&&(S.pid=$),ne!==null&&!me&&(n.logger.warn("MPEG-TS PMT found at "+De+" after unknown PID '"+ne+"'. Backtracking to sync byte @"+se+" to parse all TS packets."),ne=null,De=se-188),me=this.pmtParsed=!0;break}case 17:case 8191:break;default:ne=fe;break}}else _e++;_e>0&&this.observer.emit(_.Events.ERROR,_.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"Found "+_e+" TS packet/s that do not start with 0x47"}),a.pesData=z,C.pesData=re,S.pesData=ce;var J={audioTrack:C,videoTrack:a,id3Track:S,textTrack:p};return k&&this.extractRemainingSamples(J),J},D.flush=function(){var P=this.remainderData;this.remainderData=null;var I;return P?I=this.demux(P,-1,!1,!0):I={videoTrack:this._avcTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(I),this.sampleAes?this.decrypt(I,this.sampleAes):I},D.extractRemainingSamples=function(P){var I=P.audioTrack,u=P.videoTrack,k=P.id3Track,g=P.textTrack,a=u.pesData,C=I.pesData,S=k.pesData,p;if(a&&(p=x(a))?(this.parseAVCPES(u,g,p,!0),u.pesData=null):u.pesData=a,C&&(p=x(C))){switch(I.segmentCodec){case"aac":this.parseAACPES(I,p);break;case"mp3":this.parseMPEGPES(I,p);break}I.pesData=null}else C!=null&&C.size&&n.logger.log("last AAC PES packet truncated,might overlap between fragments"),I.pesData=C;S&&(p=x(S))?(this.parseID3PES(k,p),k.pesData=null):k.pesData=S},D.demuxSampleAes=function(P,I,u){var k=this.demux(P,u,!0,!this.config.progressive),g=this.sampleAes=new l.default(this.observer,this.config,I);return this.decrypt(k,g)},D.decrypt=function(P,I){return new Promise(function(u){var k=P.audioTrack,g=P.videoTrack;k.samples&&k.segmentCodec==="aac"?I.decryptAacSamples(k.samples,0,function(){g.samples?I.decryptAvcSamples(g.samples,0,0,function(){u(P)}):u(P)}):g.samples&&I.decryptAvcSamples(g.samples,0,0,function(){u(P)})})},D.destroy=function(){this._duration=0},D.parseAVCPES=function(P,I,u,k){var g=this,a=this.parseAVCNALu(P,u.data),C=!1,S=this.avcSample,p,U=!1;u.data=null,S&&a.length&&!P.audFound&&(R(S,P),S=this.avcSample=h(!1,u.pts,u.dts,"")),a.forEach(function(z){switch(z.type){case 1:{p=!0,S||(S=g.avcSample=h(!0,u.pts,u.dts,"")),C&&(S.debug+="NDR "),S.frame=!0;var q=z.data;if(U&&q.length>4){var $=new E.default(q).readSliceType();($===2||$===4||$===7||$===9)&&(S.key=!0)}break}case 5:p=!0,S||(S=g.avcSample=h(!0,u.pts,u.dts,"")),C&&(S.debug+="IDR "),S.key=!0,S.frame=!0;break;case 6:{p=!0,C&&S&&(S.debug+="SEI "),(0,r.parseSEIMessageFromNALu)(z.data,1,u.pts,I.samples);break}case 7:if(p=!0,U=!0,C&&S&&(S.debug+="SPS "),!P.sps){var re=new E.default(z.data),ce=re.readSPS();P.width=ce.width,P.height=ce.height,P.pixelRatio=ce.pixelRatio,P.sps=[z.data],P.duration=g._duration;for(var ne=z.data.subarray(1,4),me="avc1.",be=0;be<3;be++){var he=ne[be].toString(16);he.length<2&&(he="0"+he),me+=he}P.codec=me}break;case 8:p=!0,C&&S&&(S.debug+="PPS "),P.pps||(P.pps=[z.data]);break;case 9:p=!1,P.audFound=!0,S&&R(S,P),S=g.avcSample=h(!1,u.pts,u.dts,C?"AUD ":"");break;case 12:p=!0;break;default:p=!1,S&&(S.debug+="unknown NAL "+z.type+" ");break}if(S&&p){var se=S.units;se.push(z)}}),k&&S&&(R(S,P),this.avcSample=null)},D.getLastNalUnit=function(P){var I,u=this.avcSample,k;if((!u||u.units.length===0)&&(u=P[P.length-1]),(I=u)!==null&&I!==void 0&&I.units){var g=u.units;k=g[g.length-1]}return k},D.parseAVCNALu=function(P,I){var u=I.byteLength,k=P.naluState||0,g=k,a=[],C=0,S,p,U,z=-1,q=0;for(k===-1&&(z=0,q=I[0]&31,k=0,C=1);C<u;){if(S=I[C++],!k){k=S?0:1;continue}if(k===1){k=S?0:2;continue}if(!S)k=3;else if(S===1){if(z>=0){var $={data:I.subarray(z,C-k-1),type:q};a.push($)}else{var re=this.getLastNalUnit(P.samples);if(re&&(g&&C<=4-g&&(re.state&&(re.data=re.data.subarray(0,re.data.byteLength-g))),p=C-k-1,p>0)){var ce=new Uint8Array(re.data.byteLength+p);ce.set(re.data,0),ce.set(I.subarray(0,p),re.data.byteLength),re.data=ce,re.state=0}}C<u?(U=I[C]&31,z=C,q=U,k=0):k=-1}else k=0}if(z>=0&&k>=0){var ne={data:I.subarray(z,u),type:q,state:k};a.push(ne)}if(a.length===0){var me=this.getLastNalUnit(P.samples);if(me){var be=new Uint8Array(me.data.byteLength+I.byteLength);be.set(me.data,0),be.set(I,me.data.byteLength),me.data=be}}return P.naluState=k,a},D.parseAACPES=function(P,I){var u=0,k=this.aacOverFlow,g=I.data;if(k){this.aacOverFlow=null;var a=k.missing,C=k.sample.unit.byteLength;if(a===-1){var S=new Uint8Array(C+g.byteLength);S.set(k.sample.unit,0),S.set(g,C),g=S}else{var p=C-a;k.sample.unit.set(g.subarray(0,a),p),P.samples.push(k.sample),u=k.missing}}var U,z;for(U=u,z=g.length;U<z-1&&!T.isHeader(g,U);U++);if(U!==u){var q,$;if(U<z-1?(q="AAC PES did not start with ADTS header,offset:"+U,$=!1):(q="no ADTS header found in AAC PES",$=!0),n.logger.warn("parsing error:"+q),this.observer.emit(_.Events.ERROR,_.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_PARSING_ERROR,fatal:$,reason:q}),$)return}T.initTrackConfig(P,this.observer,g,U,this.audioCodec);var re;if(I.pts!==void 0)re=I.pts;else if(k){var ce=T.getFrameDuration(P.samplerate);re=k.sample.pts+ce}else{n.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var ne=0,me;U<z;)if(me=T.appendFrame(P,g,U,re,ne),U+=me.length,me.missing){this.aacOverFlow=me;break}else for(ne++;U<z-1&&!T.isHeader(g,U);U++);},D.parseMPEGPES=function(P,I){var u=I.data,k=u.length,g=0,a=0,C=I.pts;if(C===void 0){n.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;a<k;)if(e.isHeader(u,a)){var S=e.appendFrame(P,u,a,C,g);if(S)a+=S.length,g++;else break}else a++},D.parseID3PES=function(P,I){if(I.pts===void 0){n.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}var u=v({},I,{type:this._avcTrack?c.MetadataSchema.emsg:c.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY});P.samples.push(u)},w}();function h(w,D,A,P){return{key:w,frame:!1,pts:D,dts:A,units:[],debug:P,length:0}}function b(w,D){return((w[D+1]&31)<<8)+w[D+2]}function m(w,D){return(w[D+10]&31)<<8|w[D+11]}function d(w,D,A,P){var I={audio:-1,avc:-1,id3:-1,segmentCodec:"aac"},u=(w[D+1]&15)<<8|w[D+2],k=D+3+u-4,g=(w[D+10]&15)<<8|w[D+11];for(D+=12+g;D<k;){var a=b(w,D);switch(w[D]){case 207:if(!P){n.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:I.audio===-1&&(I.audio=a);break;case 21:I.id3===-1&&(I.id3=a);break;case 219:if(!P){n.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:I.avc===-1&&(I.avc=a);break;case 3:case 4:A.mpeg!==!0&&A.mp3!==!0?n.logger.log("MPEG audio found, not supported in this browser"):I.audio===-1&&(I.audio=a,I.segmentCodec="mp3");break;case 36:n.logger.warn("Unsupported HEVC stream type found");break;default:break}D+=((w[D+3]&15)<<8|w[D+4])+5}return I}function x(w){var D=0,A,P,I,u,k,g=w.data;if(!w||w.size===0)return null;for(;g[0].length<19&&g.length>1;){var a=new Uint8Array(g[0].length+g[1].length);a.set(g[0]),a.set(g[1],g[0].length),g[0]=a,g.splice(1,1)}A=g[0];var C=(A[0]<<16)+(A[1]<<8)+A[2];if(C===1){if(P=(A[4]<<8)+A[5],P&&P>w.size-6)return null;var S=A[7];S&192&&(u=(A[9]&14)*536870912+(A[10]&255)*4194304+(A[11]&254)*16384+(A[12]&255)*128+(A[13]&254)/2,S&64?(k=(A[14]&14)*536870912+(A[15]&255)*4194304+(A[16]&254)*16384+(A[17]&255)*128+(A[18]&254)/2,u-k>60*9e4&&(n.logger.warn(Math.round((u-k)/9e4)+"s delta between PTS and DTS, align them"),u=k)):k=u),I=A[8];var p=I+9;if(w.size<=p)return null;w.size-=p;for(var U=new Uint8Array(w.size),z=0,q=g.length;z<q;z++){A=g[z];var $=A.byteLength;if(p)if(p>$){p-=$;continue}else A=A.subarray(p),$-=p,p=0;U.set(A,D),D+=$}return P&&(P-=I+3),{data:U,pts:u,dts:k,len:P}}return null}function R(w,D){if(w.units.length&&w.frame){if(w.pts===void 0){var A=D.samples,P=A.length;if(P){var I=A[P-1];w.pts=I.pts,w.dts=I.dts}else{D.dropped++;return}}D.samples.push(w)}w.debug.length&&n.logger.log(w.pts+"/"+w.dts+":"+w.debug)}const O=y},"./src/demux/webworkify-webpack.js":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>f});var T=function(){var h=ENTRY_MODULE,b={},m=function x(R){var O=b[R];if(O!==void 0)return O.exports;var w=b[R]={exports:{}};return h[R].call(w.exports,w,w.exports,x),w.exports};m.m=h,function(){m.n=function(x){var R=x&&x.__esModule?function(){return x.default}:function(){return x};return m.d(R,{a:R}),R}}(),function(){m.d=function(x,R){for(var O in R)m.o(R,O)&&!m.o(x,O)&&Object.defineProperty(x,O,{enumerable:!0,get:R[O]})}}(),function(){m.o=function(x,R){return Object.prototype.hasOwnProperty.call(x,R)}}(),function(){m.r=function(x){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(x,"__esModule",{value:!0})}}();var d=m(ENTRY_MODULE);return d.default||d},e=T.toString().split("ENTRY_MODULE"),E="[\\.|\\-|\\+|\\w|/|@]+",l="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+E+").*?\\)";function _(y){return(y+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function r(y){return!isNaN(1*y)}function n(y,h,b){var m={};m[b]=[];var d=h.toString().replace(/^"[^"]+"/,"function"),x=d.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/)||d.match(/^\(\w+,\s*\w+,\s*(\w+)\)\s?\=\s?\>/);if(!x)return m;for(var R=x[1],O=new RegExp("(\\\\n|\\W)"+_(R)+l,"g"),w;w=O.exec(d);){if(w[3]==="dll-reference")continue;m[b].push(w[3])}for(O=new RegExp("\\("+_(R)+'\\("(dll-reference\\s('+E+'))"\\)\\)'+l,"g");w=O.exec(d);)y[w[2]]||(m[b].push(w[1]),y[w[2]]=i(w[1]).m),m[w[2]]=m[w[2]]||[],m[w[2]].push(w[4]);for(var D=Object.keys(m),A=0;A<D.length;A++)for(var P=0;P<m[D[A]].length;P++)r(m[D[A]][P])&&(m[D[A]][P]=1*m[D[A]][P]);return m}function o(y){var h=Object.keys(y);return h.reduce(function(b,m){return b||y[m].length>0},!1)}function c(y,h){for(var b={main:[h]},m={main:[]},d={main:{}};o(b);)for(var x=Object.keys(b),R=0;R<x.length;R++){var O=x[R],w=b[O],D=w.pop();if(d[O]=d[O]||{},d[O][D]||!y[O][D])continue;d[O][D]=!0,m[O]=m[O]||[],m[O].push(D);for(var A=n(y,y[O][D],O),P=Object.keys(A),I=0;I<P.length;I++)b[P[I]]=b[P[I]]||[],b[P[I]]=b[P[I]].concat(A[P[I]])}return m}function v(y,h,b,m){var d=y[m].map(function(x){return'"'+x+'": '+h[m][x].toString().replace(/^"[^"]+"/,"function")}).join(",");return e[0]+"{"+d+"}"+e[1]+'"'+b+'"'+e[2]}function f(y,h){h=h||{};var b={main:i.m},m=h.all?{main:Object.keys(b.main)}:c(b,y),d="";Object.keys(m).filter(function(D){return D!=="main"}).forEach(function(D){for(var A=0;m[D][A];)A++;m[D].push(A),b[D][A]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",d=d+("var "+D+" = ("+v(m,b,A,modules)+`)();
|
|
|
`)}),d=d+("new (("+v(m,b,y,"main")+")())(self);");var x=new window.Blob([d],{type:"text/javascript"}),R=window.URL||window.webkitURL||window.mozURL||window.msURL,O=R.createObjectURL(x),w=new window.Worker(O);return w.objectURL=O,w}},"./src/errors.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{ErrorDetails:()=>e,ErrorTypes:()=>T});var T;(function(E){E.NETWORK_ERROR="networkError",E.MEDIA_ERROR="mediaError",E.KEY_SYSTEM_ERROR="keySystemError",E.MUX_ERROR="muxError",E.OTHER_ERROR="otherError"})(T||(T={}));var e;(function(E){E.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",E.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",E.KEY_SYSTEM_NO_SESSION="keySystemNoSession",E.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",E.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",E.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",E.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",E.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",E.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",E.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",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"})(e||(e={}))},"./src/events.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{Events:()=>T});var T;(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"})(T||(T={}))},"./src/hls.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>A});var T=i("./node_modules/url-toolkit/src/url-toolkit.js"),e=i.n(T),E=i("./src/loader/playlist-loader.ts"),l=i("./src/controller/id3-track-controller.ts"),_=i("./src/controller/latency-controller.ts"),r=i("./src/controller/level-controller.ts"),n=i("./src/controller/fragment-tracker.ts"),o=i("./src/loader/key-loader.ts"),c=i("./src/controller/stream-controller.ts"),v=i("./src/is-supported.ts"),f=i("./src/utils/logger.ts"),y=i("./src/config.ts"),h=i("./node_modules/eventemitter3/index.js"),b=i.n(h),m=i("./src/events.ts"),d=i("./src/errors.ts"),x=i("./src/types/level.ts");function R(P,I){for(var u=0;u<I.length;u++){var k=I[u];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(P,w(k.key),k)}}function O(P,I,u){return I&&R(P.prototype,I),u&&R(P,u),Object.defineProperty(P,"prototype",{writable:!1}),P}function w(P){var I=D(P,"string");return typeof I=="symbol"?I:String(I)}function D(P,I){if(typeof P!="object"||P===null)return P;var u=P[Symbol.toPrimitive];if(u!==void 0){var k=u.call(P,I||"default");if(typeof k!="object")return k;throw new TypeError("@@toPrimitive must return a primitive value.")}return(I==="string"?String:Number)(P)}var A=function(){P.isSupported=function(){return(0,v.isSupported)()};function P(u){u===void 0&&(u={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new h.EventEmitter,this._autoLevelCapping=void 0,this._maxHdcpLevel=null,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 k=this.config=(0,y.mergeConfig)(P.DefaultConfig,u);this.userConfig=u,(0,f.enableLogs)(k.debug,"Hls instance"),this._autoLevelCapping=-1,k.progressive&&(0,y.enableStreamingMode)(k);var g=k.abrController,a=k.bufferController,C=k.capLevelController,S=k.fpsController,p=this.abrController=new g(this),U=this.bufferController=new a(this),z=this.capLevelController=new C(this),q=new S(this),$=new E.default(this),re=new l.default(this),ce=this.levelController=new r.default(this),ne=new n.FragmentTracker(this),me=new o.default(this.config),be=this.streamController=new c.default(this,ne,me);z.setStreamController(be),q.setStreamController(be);var he=[$,ce,be];this.networkControllers=he;var se=[p,U,z,q,re,ne];this.audioTrackController=this.createController(k.audioTrackController,he);var _e=k.audioStreamController;_e&&he.push(new _e(this,ne,me)),this.subtitleTrackController=this.createController(k.subtitleTrackController,he);var De=k.subtitleStreamController;De&&he.push(new De(this,ne,me)),this.createController(k.timelineController,se),me.emeController=this.emeController=this.createController(k.emeController,se),this.cmcdController=this.createController(k.cmcdController,se),this.latencyController=this.createController(_.default,se),this.coreComponents=se}var I=P.prototype;return I.createController=function(k,g){if(k){var a=new k(this);return g&&g.push(a),a}return null},I.on=function(k,g,a){a===void 0&&(a=this),this._emitter.on(k,g,a)},I.once=function(k,g,a){a===void 0&&(a=this),this._emitter.once(k,g,a)},I.removeAllListeners=function(k){this._emitter.removeAllListeners(k)},I.off=function(k,g,a,C){a===void 0&&(a=this),this._emitter.off(k,g,a,C)},I.listeners=function(k){return this._emitter.listeners(k)},I.emit=function(k,g,a){return this._emitter.emit(k,g,a)},I.trigger=function(k,g){if(this.config.debug)return this.emit(k,k,g);try{return this.emit(k,k,g)}catch(a){f.logger.error("An internal error happened while handling event "+k+'. Error message: "'+a.message+'". Here is a stacktrace:',a),this.trigger(m.Events.ERROR,{type:d.ErrorTypes.OTHER_ERROR,details:d.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:k,error:a})}return!1},I.listenerCount=function(k){return this._emitter.listenerCount(k)},I.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(k){return k.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(k){return k.destroy()}),this.coreComponents.length=0},I.attachMedia=function(k){f.logger.log("attachMedia"),this._media=k,this.trigger(m.Events.MEDIA_ATTACHING,{media:k})},I.detachMedia=function(){f.logger.log("detachMedia"),this.trigger(m.Events.MEDIA_DETACHING,void 0),this._media=null},I.loadSource=function(k){this.stopLoad();var g=this.media,a=this.url,C=this.url=T.buildAbsoluteURL(self.location.href,k,{alwaysNormalize:!0});f.logger.log("loadSource:"+C),g&&a&&a!==C&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(g)),this.trigger(m.Events.MANIFEST_LOADING,{url:k})},I.startLoad=function(k){k===void 0&&(k=-1),f.logger.log("startLoad("+k+")"),this.networkControllers.forEach(function(g){g.startLoad(k)})},I.stopLoad=function(){f.logger.log("stopLoad"),this.networkControllers.forEach(function(k){k.stopLoad()})},I.swapAudioCodec=function(){f.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},I.recoverMediaError=function(){f.logger.log("recoverMediaError");var k=this._media;this.detachMedia(),k&&this.attachMedia(k)},I.removeLevel=function(k,g){g===void 0&&(g=0),this.levelController.removeLevel(k,g)},O(P,[{key:"levels",get:function(){var k=this.levelController.levels;return k||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(k){f.logger.log("set currentLevel:"+k),this.loadLevel=k,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(k){f.logger.log("set nextLevel:"+k),this.levelController.manualLevel=k,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(k){f.logger.log("set loadLevel:"+k),this.levelController.manualLevel=k}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(k){this.levelController.nextLoadLevel=k}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(k){f.logger.log("set firstLevel:"+k),this.levelController.firstLevel=k}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(k){f.logger.log("set startLevel:"+k),k!==-1&&(k=Math.max(k,this.minAutoLevel)),this.levelController.startLevel=k}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(k){var g=!!k;g!==this.config.capLevelToPlayerSize&&(g?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=g)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(k){this._autoLevelCapping!==k&&(f.logger.log("set autoLevelCapping:"+k),this._autoLevelCapping=k)}},{key:"bandwidthEstimate",get:function(){var k=this.abrController.bwEstimator;return k?k.getEstimate():NaN}},{key:"maxHdcpLevel",get:function(){return this._maxHdcpLevel},set:function(k){x.HdcpLevels.indexOf(k)>-1&&(this._maxHdcpLevel=k)}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var k=this.levels,g=this.config.minAutoBitrate;if(!k)return 0;for(var a=k.length,C=0;C<a;C++)if(k[C].maxBitrate>=g)return C;return 0}},{key:"maxAutoLevel",get:function(){var k=this.levels,g=this.autoLevelCapping,a=this.maxHdcpLevel,C;if(g===-1&&k&&k.length?C=k.length-1:C=g,a)for(var S=C;S--;){var p=k[S].attrs["HDCP-LEVEL"];if(p&&p<=a)return S}return C}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(k){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,k)}},{key:"playingDate",get:function(){return this.streamController.currentProgramDateTime}},{key:"mainForwardBufferInfo",get:function(){return this.streamController.getMainFwdBufferInfo()}},{key:"audioTracks",get:function(){var k=this.audioTrackController;return k?k.audioTracks:[]}},{key:"audioTrack",get:function(){var k=this.audioTrackController;return k?k.audioTrack:-1},set:function(k){var g=this.audioTrackController;g&&(g.audioTrack=k)}},{key:"subtitleTracks",get:function(){var k=this.subtitleTrackController;return k?k.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var k=this.subtitleTrackController;return k?k.subtitleTrack:-1},set:function(k){var g=this.subtitleTrackController;g&&(g.subtitleTrack=k)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var k=this.subtitleTrackController;return k?k.subtitleDisplay:!1},set:function(k){var g=this.subtitleTrackController;g&&(g.subtitleDisplay=k)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(k){this.config.lowLatencyMode=k}},{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}}],[{key:"version",get:function(){return"1.3.5"}},{key:"Events",get:function(){return m.Events}},{key:"ErrorTypes",get:function(){return d.ErrorTypes}},{key:"ErrorDetails",get:function(){return d.ErrorDetails}},{key:"DefaultConfig",get:function(){return P.defaultConfig?P.defaultConfig:y.hlsDefaultConfig},set:function(k){P.defaultConfig=k}}]),P}();A.defaultConfig=void 0},"./src/is-supported.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{changeTypeSupported:()=>l,isSupported:()=>E});var T=i("./src/utils/mediasource-helper.ts");function e(){return self.SourceBuffer||self.WebKitSourceBuffer}function E(){var _=(0,T.getMediaSource)();if(!_)return!1;var r=e(),n=_&&typeof _.isTypeSupported=="function"&&_.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),o=!r||r.prototype&&typeof r.prototype.appendBuffer=="function"&&typeof r.prototype.remove=="function";return!!n&&!!o}function l(){var _,r=e();return typeof(r==null||((_=r.prototype)===null||_===void 0)?void 0:_.changeType)=="function"}},"./src/loader/date-range.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{DateRange:()=>v,DateRangeAttribute:()=>c});var T=i("./src/polyfills/number.ts"),e=i("./src/utils/attr-list.ts"),E=i("./src/utils/logger.ts");function l(){return l=Object.assign?Object.assign.bind():function(f){for(var y=1;y<arguments.length;y++){var h=arguments[y];for(var b in h)Object.prototype.hasOwnProperty.call(h,b)&&(f[b]=h[b])}return f},l.apply(this,arguments)}function _(f,y){for(var h=0;h<y.length;h++){var b=y[h];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(f,n(b.key),b)}}function r(f,y,h){return y&&_(f.prototype,y),h&&_(f,h),Object.defineProperty(f,"prototype",{writable:!1}),f}function n(f){var y=o(f,"string");return typeof y=="symbol"?y:String(y)}function o(f,y){if(typeof f!="object"||f===null)return f;var h=f[Symbol.toPrimitive];if(h!==void 0){var b=h.call(f,y||"default");if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(f)}var c;(function(f){f.ID="ID",f.CLASS="CLASS",f.START_DATE="START-DATE",f.DURATION="DURATION",f.END_DATE="END-DATE",f.END_ON_NEXT="END-ON-NEXT",f.PLANNED_DURATION="PLANNED-DURATION",f.SCTE35_OUT="SCTE35-OUT",f.SCTE35_IN="SCTE35-IN"})(c||(c={}));var v=function(){function f(y,h){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,h){var b=h.attr;for(var m in b)if(Object.prototype.hasOwnProperty.call(y,m)&&y[m]!==b[m]){E.logger.warn('DATERANGE tag attribute: "'+m+'" does not match for tags with ID: "'+y.ID+'"'),this._badValueForSameId=m;break}y=l(new e.AttrList({}),b,y)}if(this.attr=y,this._startDate=new Date(y[c.START_DATE]),c.END_DATE in this.attr){var d=new Date(this.attr[c.END_DATE]);(0,T.isFiniteNumber)(d.getTime())&&(this._endDate=d)}}return r(f,[{key:"id",get:function(){return this.attr.ID}},{key:"class",get:function(){return this.attr.CLASS}},{key:"startDate",get:function(){return this._startDate}},{key:"endDate",get:function(){if(this._endDate)return this._endDate;var h=this.duration;return h!==null?new Date(this._startDate.getTime()+h*1e3):null}},{key:"duration",get:function(){if(c.DURATION in this.attr){var h=this.attr.decimalFloatingPoint(c.DURATION);if((0,T.isFiniteNumber)(h))return h}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}},{key:"plannedDuration",get:function(){return c.PLANNED_DURATION in this.attr?this.attr.decimalFloatingPoint(c.PLANNED_DURATION):null}},{key:"endOnNext",get:function(){return this.attr.bool(c.END_ON_NEXT)}},{key:"isValid",get:function(){return!!this.id&&!this._badValueForSameId&&(0,T.isFiniteNumber)(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}]),f}()},"./src/loader/fragment-loader.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{LoadError:()=>h,default:()=>f});var T=i("./src/polyfills/number.ts"),e=i("./src/errors.ts");function E(b,m){b.prototype=Object.create(m.prototype),b.prototype.constructor=b,o(b,m)}function l(b){var m=typeof Map=="function"?new Map:void 0;return l=function(x){if(x===null||!n(x))return x;if(typeof x!="function")throw new TypeError("Super expression must either be null or a function");if(typeof m!="undefined"){if(m.has(x))return m.get(x);m.set(x,R)}function R(){return _(x,arguments,c(this).constructor)}return R.prototype=Object.create(x.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),o(R,x)},l(b)}function _(b,m,d){return r()?_=Reflect.construct.bind():_=function(R,O,w){var D=[null];D.push.apply(D,O);var A=Function.bind.apply(R,D),P=new A;return w&&o(P,w.prototype),P},_.apply(null,arguments)}function r(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(b){return!1}}function n(b){return Function.toString.call(b).indexOf("[native code]")!==-1}function o(b,m){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(x,R){return x.__proto__=R,x},o(b,m)}function c(b){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(d){return d.__proto__||Object.getPrototypeOf(d)},c(b)}var v=Math.pow(2,17),f=function(){function b(d){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=d}var m=b.prototype;return m.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},m.abort=function(){this.loader&&this.loader.abort()},m.load=function(x,R){var O=this,w=x.url;if(!w)return Promise.reject(new h({type:e.ErrorTypes.NETWORK_ERROR,details:e.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:x,networkDetails:null},"Fragment does not have a "+(w?"part list":"url")));this.abort();var D=this.config,A=D.fLoader,P=D.loader;return new Promise(function(I,u){O.loader&&O.loader.destroy();var k=O.loader=x.loader=A?new A(D):new P(D),g=y(x),a={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:x.sn==="initSegment"?Infinity:v};x.stats=k.stats,k.load(g,a,{onSuccess:function(S,p,U,z){O.resetLoader(x,k);var q=S.data;U.resetIV&&x.decryptdata&&(x.decryptdata.iv=new Uint8Array(q.slice(0,16)),q=q.slice(16)),I({frag:x,part:null,payload:q,networkDetails:z})},onError:function(S,p,U){O.resetLoader(x,k),u(new h({type:e.ErrorTypes.NETWORK_ERROR,details:e.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:x,response:S,networkDetails:U}))},onAbort:function(S,p,U){O.resetLoader(x,k),u(new h({type:e.ErrorTypes.NETWORK_ERROR,details:e.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:x,networkDetails:U}))},onTimeout:function(S,p,U){O.resetLoader(x,k),u(new h({type:e.ErrorTypes.NETWORK_ERROR,details:e.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:x,networkDetails:U}))},onProgress:function(S,p,U,z){R&&R({frag:x,part:null,payload:U,networkDetails:z})}})})},m.loadPart=function(x,R,O){var w=this;this.abort();var D=this.config,A=D.fLoader,P=D.loader;return new Promise(function(I,u){w.loader&&w.loader.destroy();var k=w.loader=x.loader=A?new A(D):new P(D),g=y(x,R),a={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:v};R.stats=k.stats,k.load(g,a,{onSuccess:function(S,p,U,z){w.resetLoader(x,k),w.updateStatsFromPart(x,R);var q={frag:x,part:R,payload:S.data,networkDetails:z};O(q),I(q)},onError:function(S,p,U){w.resetLoader(x,k),u(new h({type:e.ErrorTypes.NETWORK_ERROR,details:e.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:x,part:R,response:S,networkDetails:U}))},onAbort:function(S,p,U){x.stats.aborted=R.stats.aborted,w.resetLoader(x,k),u(new h({type:e.ErrorTypes.NETWORK_ERROR,details:e.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:x,part:R,networkDetails:U}))},onTimeout:function(S,p,U){w.resetLoader(x,k),u(new h({type:e.ErrorTypes.NETWORK_ERROR,details:e.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:x,part:R,networkDetails:U}))}})})},m.updateStatsFromPart=function(x,R){var O=x.stats,w=R.stats,D=w.total;if(O.loaded+=w.loaded,D){var A=Math.round(x.duration/R.duration),P=Math.min(Math.round(O.loaded/D),A),I=A-P,u=I*Math.round(O.loaded/P);O.total=O.loaded+u}else O.total=Math.max(O.loaded,O.total);var k=O.loading,g=w.loading;k.start?k.first+=g.first-g.start:(k.start=g.start,k.first=g.first),k.end=g.end},m.resetLoader=function(x,R){x.loader=null,this.loader===R&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),R.destroy()},b}();function y(b,m){m===void 0&&(m=null);var d=m||b,x={frag:b,part:m,responseType:"arraybuffer",url:d.url,headers:{},rangeStart:0,rangeEnd:0},R=d.byteRangeStartOffset,O=d.byteRangeEndOffset;if((0,T.isFiniteNumber)(R)&&(0,T.isFiniteNumber)(O)){var w,D=R,A=O;if(b.sn==="initSegment"&&((w=b.decryptdata)===null||w===void 0?void 0:w.method)==="AES-128"){var P=O-R;P%16&&(A=O+(16-P%16)),R!==0&&(x.resetIV=!0,D=R-16)}x.rangeStart=D,x.rangeEnd=A}return x}var h=function(b){E(m,b);function m(d){for(var x,R=arguments.length,O=new Array(R>1?R-1:0),w=1;w<R;w++)O[w-1]=arguments[w];return x=b.call.apply(b,[this].concat(O))||this,x.data=void 0,x.data=d,x}return m}(l(Error))},"./src/loader/fragment.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{BaseSegment:()=>y,ElementaryStreamTypes:()=>f,Fragment:()=>h,Part:()=>b});var T=i("./src/polyfills/number.ts"),e=i("./node_modules/url-toolkit/src/url-toolkit.js"),E=i.n(e),l=i("./src/loader/load-stats.ts");function _(m,d){m.prototype=Object.create(d.prototype),m.prototype.constructor=m,r(m,d)}function r(m,d){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,O){return R.__proto__=O,R},r(m,d)}function n(m,d){for(var x=0;x<d.length;x++){var R=d[x];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(m,c(R.key),R)}}function o(m,d,x){return d&&n(m.prototype,d),x&&n(m,x),Object.defineProperty(m,"prototype",{writable:!1}),m}function c(m){var d=v(m,"string");return typeof d=="symbol"?d:String(d)}function v(m,d){if(typeof m!="object"||m===null)return m;var x=m[Symbol.toPrimitive];if(x!==void 0){var R=x.call(m,d||"default");if(typeof R!="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(m)}var f;(function(m){m.AUDIO="audio",m.VIDEO="video",m.AUDIOVIDEO="audiovideo"})(f||(f={}));var y=function(){function m(x){var R;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(R={},R[f.AUDIO]=null,R[f.VIDEO]=null,R[f.AUDIOVIDEO]=null,R),this.baseurl=x}var d=m.prototype;return d.setByteRange=function(R,O){var w=R.split("@",2),D=[];w.length===1?D[0]=O?O.byteRangeEndOffset:0:D[0]=parseInt(w[1]),D[1]=parseInt(w[0])+D[0],this._byteRange=D},o(m,[{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=(0,e.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(R){this._url=R}}]),m}(),h=function(m){_(d,m);function d(R,O){var w;return w=m.call(this,O)||this,w._decryptdata=null,w.rawProgramDateTime=null,w.programDateTime=null,w.tagList=[],w.duration=0,w.sn=0,w.levelkeys=void 0,w.type=void 0,w.loader=null,w.keyLoader=null,w.level=-1,w.cc=0,w.startPTS=void 0,w.endPTS=void 0,w.appendedPTS=void 0,w.startDTS=void 0,w.endDTS=void 0,w.start=0,w.deltaPTS=void 0,w.maxStartPTS=void 0,w.minEndPTS=void 0,w.stats=new l.LoadStats,w.urlId=0,w.data=void 0,w.bitrateTest=!1,w.title=null,w.initSegment=null,w.endList=void 0,w.type=R,w}var x=d.prototype;return x.setKeyFormat=function(O){if(this.levelkeys){var w=this.levelkeys[O];w&&!this._decryptdata&&(this._decryptdata=w.getDecryptData(this.sn))}},x.abortRequests=function(){var O,w;(O=this.loader)===null||O===void 0||O.abort(),(w=this.keyLoader)===null||w===void 0||w.abort()},x.setElementaryStreamInfo=function(O,w,D,A,P,I){I===void 0&&(I=!1);var u=this.elementaryStreams,k=u[O];if(!k){u[O]={startPTS:w,endPTS:D,startDTS:A,endDTS:P,partial:I};return}k.startPTS=Math.min(k.startPTS,w),k.endPTS=Math.max(k.endPTS,D),k.startDTS=Math.min(k.startDTS,A),k.endDTS=Math.max(k.endDTS,P)},x.clearElementaryStreamInfo=function(){var O=this.elementaryStreams;O[f.AUDIO]=null,O[f.VIDEO]=null,O[f.AUDIOVIDEO]=null},o(d,[{key:"decryptdata",get:function(){var O=this.levelkeys;if(!O&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){var w=this.levelkeys.identity;if(w)this._decryptdata=w.getDecryptData(this.sn);else{var D=Object.keys(this.levelkeys);if(D.length===1)return this._decryptdata=this.levelkeys[D[0]].getDecryptData(this.sn)}}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!(0,T.isFiniteNumber)(this.programDateTime))return null;var O=(0,T.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+O*1e3}},{key:"encrypted",get:function(){var O;if((O=this._decryptdata)!==null&&O!==void 0&&O.encrypted)return!0;if(this.levelkeys){var w=Object.keys(this.levelkeys),D=w.length;if(D>1||D===1&&this.levelkeys[w[0]].encrypted)return!0}return!1}}]),d}(y),b=function(m){_(d,m);function d(x,R,O,w,D){var A;A=m.call(this,O)||this,A.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=x.decimalFloatingPoint("DURATION"),A.gap=x.bool("GAP"),A.independent=x.bool("INDEPENDENT"),A.relurl=x.enumeratedString("URI"),A.fragment=R,A.index=w;var P=x.enumeratedString("BYTERANGE");return P&&A.setByteRange(P,D),D&&(A.fragOffset=D.fragOffset+D.duration),A}return o(d,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var R=this.elementaryStreams;return!!(R.audio||R.video||R.audiovideo)}}]),d}(y)},"./src/loader/key-loader.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>E});var T=i("./src/errors.ts"),e=i("./src/loader/fragment-loader.ts"),E=function(){function l(r){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=r}var _=l.prototype;return _.abort=function(){for(var n in this.keyUriToKeyInfo){var o=this.keyUriToKeyInfo[n].loader;o&&o.abort()}},_.detach=function(){for(var n in this.keyUriToKeyInfo){var o=this.keyUriToKeyInfo[n];(o.mediaKeySessionContext||o.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[n]}},_.destroy=function(){this.detach();for(var n in this.keyUriToKeyInfo){var o=this.keyUriToKeyInfo[n].loader;o&&o.destroy()}this.keyUriToKeyInfo={}},_.createKeyLoadError=function(n,o,c,v){return o===void 0&&(o=T.ErrorDetails.KEY_LOAD_ERROR),new e.LoadError({type:T.ErrorTypes.NETWORK_ERROR,details:o,fatal:!1,frag:n,networkDetails:c})},_.loadClear=function(n,o){var c=this;if(this.emeController&&this.config.emeEnabled)for(var v=n.sn,f=n.cc,y=function(d){var x=o[d];if(f<=x.cc&&(v==="initSegment"||v<x.sn))return c.emeController.selectKeySystemFormat(x).then(function(R){x.setKeyFormat(R)}),"break"},h=0;h<o.length;h++){var b=y(h);if(b==="break")break}},_.load=function(n){var o=this;return!n.decryptdata&&n.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(n).then(function(c){return o.loadInternal(n,c)}):this.loadInternal(n)},_.loadInternal=function(n,o){var c,v;o&&n.setKeyFormat(o);var f=n.decryptdata;if(!f){var y=o?"Expected frag.decryptdata to be defined after setting format "+o:"Missing decryption data on fragment in onKeyLoading";return Promise.reject(this.createKeyLoadError(n,T.ErrorDetails.KEY_LOAD_ERROR,null,y))}var h=f.uri;if(!h)return Promise.reject(this.createKeyLoadError(n,T.ErrorDetails.KEY_LOAD_ERROR,null,'Invalid key URI: "'+h+'"'));var b=this.keyUriToKeyInfo[h];if((c=b)!==null&&c!==void 0&&c.decryptdata.key)return f.key=b.decryptdata.key,Promise.resolve({frag:n,keyInfo:b});if((v=b)!==null&&v!==void 0&&v.keyLoadPromise){var m;switch((m=b.mediaKeySessionContext)===null||m===void 0?void 0:m.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return b.keyLoadPromise.then(function(d){return f.key=d.keyInfo.decryptdata.key,{frag:n,keyInfo:b}})}}b=this.keyUriToKeyInfo[h]={decryptdata:f,keyLoadPromise:null,loader:null,mediaKeySessionContext:null};switch(f.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return f.keyFormat==="identity"?this.loadKeyHTTP(b,n):this.loadKeyEME(b,n);case"AES-128":return this.loadKeyHTTP(b,n);default:return Promise.reject(this.createKeyLoadError(n,T.ErrorDetails.KEY_LOAD_ERROR,null,'Key supplied with unsupported METHOD: "'+f.method+'"'))}},_.loadKeyEME=function(n,o){var c={frag:o,keyInfo:n};if(this.emeController&&this.config.emeEnabled){var v=this.emeController.loadKey(c);if(v)return(n.keyLoadPromise=v.then(function(f){return n.mediaKeySessionContext=f,c})).catch(function(f){throw n.keyLoadPromise=null,f})}return Promise.resolve(c)},_.loadKeyHTTP=function(n,o){var c=this,v=this.config,f=v.loader,y=new f(v);return o.keyLoader=n.loader=y,n.keyLoadPromise=new Promise(function(h,b){var m={keyInfo:n,frag:o,responseType:"arraybuffer",url:n.decryptdata.uri},d={timeout:v.fragLoadingTimeOut,maxRetry:0,retryDelay:v.fragLoadingRetryDelay,maxRetryDelay:v.fragLoadingMaxRetryTimeout,highWaterMark:0},x={onSuccess:function(O,w,D,A){var P=D.frag,I=D.keyInfo,u=D.url;if(!P.decryptdata||I!==c.keyUriToKeyInfo[u])return b(c.createKeyLoadError(P,T.ErrorDetails.KEY_LOAD_ERROR,A,"after key load, decryptdata unset or changed"));I.decryptdata.key=P.decryptdata.key=new Uint8Array(O.data),P.keyLoader=null,I.loader=null,h({frag:P,keyInfo:I})},onError:function(O,w,D){c.resetLoader(w),b(c.createKeyLoadError(o,T.ErrorDetails.KEY_LOAD_ERROR,D))},onTimeout:function(O,w,D){c.resetLoader(w),b(c.createKeyLoadError(o,T.ErrorDetails.KEY_LOAD_TIMEOUT,D))},onAbort:function(O,w,D){c.resetLoader(w),b(c.createKeyLoadError(o,T.ErrorDetails.INTERNAL_ABORTED,D))}};y.load(m,d,x)})},_.resetLoader=function(n){var o=n.frag,c=n.keyInfo,v=n.url,f=c.loader;o.keyLoader===f&&(o.keyLoader=null,c.loader=null),delete this.keyUriToKeyInfo[v],f&&f.destroy()},l}()},"./src/loader/level-details.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{LevelDetails:()=>n});var T=i("./src/polyfills/number.ts");function e(o,c){for(var v=0;v<c.length;v++){var f=c[v];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(o,l(f.key),f)}}function E(o,c,v){return c&&e(o.prototype,c),v&&e(o,v),Object.defineProperty(o,"prototype",{writable:!1}),o}function l(o){var c=_(o,"string");return typeof c=="symbol"?c:String(c)}function _(o,c){if(typeof o!="object"||o===null)return o;var v=o[Symbol.toPrimitive];if(v!==void 0){var f=v.call(o,c||"default");if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(o)}var r=10,n=function(){function o(v){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.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,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.encryptedFragments=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=v}var c=o.prototype;return c.reloaded=function(f){if(!f){this.advanced=!0,this.updated=!0;return}var y=this.lastPartSn-f.lastPartSn,h=this.lastPartIndex-f.lastPartIndex;this.updated=this.endSN!==f.endSN||!!h||!!y,this.advanced=this.endSN>f.endSN||y>0||y===0&&h>0,this.updated||this.advanced?this.misses=Math.floor(f.misses*.6):this.misses=f.misses+1,this.availabilityDelay=f.availabilityDelay},E(o,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?(0,T.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||r}},{key:"drift",get:function(){var f=this.driftEndTime-this.driftStartTime;if(f>0){var y=this.driftEnd-this.driftStart;return y*1e3/f}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var f;return(f=this.fragments)!==null&&f!==void 0&&f.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 f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),o}()},"./src/loader/level-key.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{LevelKey:()=>n});var T=i("./src/utils/keysystem-util.ts"),e=i("./src/utils/mediakeys-helper.ts"),E=i("./src/utils/mp4-tools.ts"),l=i("./src/utils/logger.ts"),_=i("./src/utils/numeric-encoding-utils.ts"),r={},n=function(){c.clearKeyUriToKeyIdMap=function(){r={}};function c(f,y,h,b,m){b===void 0&&(b=[1]),m===void 0&&(m=null),this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=f,this.uri=y,this.keyFormat=h,this.keyFormatVersions=b,this.iv=m,this.encrypted=f?f!=="NONE":!1,this.isCommonEncryption=this.encrypted&&f!=="AES-128"}var v=c.prototype;return v.isSupported=function(){if(this.method){if(this.method==="AES-128"||this.method==="NONE")return!0;switch(this.keyFormat){case"identity":return this.method==="SAMPLE-AES";case e.KeySystemFormats.FAIRPLAY:case e.KeySystemFormats.WIDEVINE:case e.KeySystemFormats.PLAYREADY:case e.KeySystemFormats.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1},v.getDecryptData=function(y){if(!this.encrypted||!this.uri)return null;if(this.method==="AES-128"&&this.uri&&!this.iv){typeof y!="number"&&(this.method==="AES-128"&&!this.iv&&l.logger.warn('missing IV for initialization segment with method="'+this.method+'" - compliance issue'),y=0);var h=o(y),b=new c(this.method,this.uri,"identity",this.keyFormatVersions,h);return b}var m=(0,T.convertDataUriToArrayBytes)(this.uri);if(m)switch(this.keyFormat){case e.KeySystemFormats.WIDEVINE:this.pssh=m,m.length>=22&&(this.keyId=m.subarray(m.length-22,m.length-6));break;case e.KeySystemFormats.PLAYREADY:{var d=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=(0,E.mp4pssh)(d,null,m);var x=new Uint16Array(m.buffer,m.byteOffset,m.byteLength/2),R=String.fromCharCode.apply(null,Array.from(x)),O=R.substring(R.indexOf("<"),R.length),w=new DOMParser,D=w.parseFromString(O,"text/xml"),A=D.getElementsByTagName("KID")[0];if(A){var P=A.childNodes[0]?A.childNodes[0].nodeValue:A.getAttribute("VALUE");if(P){var I=(0,_.base64Decode)(P).subarray(0,16);(0,T.changeEndianness)(I),this.keyId=I}}break}default:{var u=m.subarray(0,16);if(u.length!==16){var k=new Uint8Array(16);k.set(u,16-u.length),u=k}this.keyId=u;break}}if(!this.keyId||this.keyId.byteLength!==16){var g=r[this.uri];if(!g){var a=Object.keys(r).length%Number.MAX_SAFE_INTEGER;g=new Uint8Array(16);var C=new DataView(g.buffer,12,4);C.setUint32(0,a),r[this.uri]=g}this.keyId=g}return this},c}();function o(c){for(var v=new Uint8Array(16),f=12;f<16;f++)v[f]=c>>8*(15-f)&255;return v}},"./src/loader/load-stats.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{LoadStats:()=>T});var T=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":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>d});var T=i("./src/polyfills/number.ts"),e=i("./node_modules/url-toolkit/src/url-toolkit.js"),E=i.n(e),l=i("./src/loader/date-range.ts"),_=i("./src/loader/fragment.ts"),r=i("./src/loader/level-details.ts"),n=i("./src/loader/level-key.ts"),o=i("./src/utils/attr-list.ts"),c=i("./src/utils/logger.ts"),v=i("./src/utils/codecs.ts");function f(){return f=Object.assign?Object.assign.bind():function(I){for(var u=1;u<arguments.length;u++){var k=arguments[u];for(var g in k)Object.prototype.hasOwnProperty.call(k,g)&&(I[g]=k[g])}return I},f.apply(this,arguments)}var y=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+|#EXT-X-SESSION-KEY:([^\n\r]*)[\r\n]+/g,h=/#EXT-X-MEDIA:(.*)/g,b=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),m=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),d=function(){function I(){}return I.findGroup=function(k,g){for(var a=0;a<k.length;a++){var C=k[a];if(C.id===g)return C}},I.convertAVC1ToAVCOTI=function(k){var g=k.split(".");if(g.length>2){var a=g.shift()+".";return a+=parseInt(g.shift()).toString(16),a+=("000"+parseInt(g.shift()).toString(16)).slice(-4),a}return k},I.resolve=function(k,g){return(0,e.buildAbsoluteURL)(g,k,{alwaysNormalize:!0})},I.parseMasterPlaylist=function(k,g){var a=[],C=[],S={},p=[],U=!1;y.lastIndex=0;for(var z;(z=y.exec(k))!=null;)if(z[1]){var q,$=new o.AttrList(z[1]),re={attrs:$,bitrate:$.decimalInteger("AVERAGE-BANDWIDTH")||$.decimalInteger("BANDWIDTH"),name:$.NAME,url:I.resolve(z[2],g)},ce=$.decimalResolution("RESOLUTION");ce&&(re.width=ce.width,re.height=ce.height),R(($.CODECS||"").split(/[ ,]+/).filter(function(se){return se}),re),re.videoCodec&&re.videoCodec.indexOf("avc1")!==-1&&(re.videoCodec=I.convertAVC1ToAVCOTI(re.videoCodec)),(q=re.unknownCodecs)!==null&&q!==void 0&&q.length||C.push(re),a.push(re)}else if(z[3]){var ne=new o.AttrList(z[3]);ne["DATA-ID"]&&(U=!0,S[ne["DATA-ID"]]=ne)}else if(z[4]){var me=z[4],be=x(me,g);be.encrypted&&be.isSupported()?p.push(be):c.logger.warn('[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "'+me+'"')}var he=C.length>0&&C.length<a.length;return{levels:he?C:a,sessionData:U?S:null,sessionKeys:p.length?p:null}},I.parseMasterPlaylistMedia=function(k,g,a,C){C===void 0&&(C=[]);var S,p=[],U=0;for(h.lastIndex=0;(S=h.exec(k))!==null;){var z=new o.AttrList(S[1]);if(z.TYPE===a){var q={attrs:z,bitrate:0,id:U++,groupId:z["GROUP-ID"],instreamId:z["INSTREAM-ID"],name:z.NAME||z.LANGUAGE||"",type:a,default:z.bool("DEFAULT"),autoselect:z.bool("AUTOSELECT"),forced:z.bool("FORCED"),lang:z.LANGUAGE,url:z.URI?I.resolve(z.URI,g):""};if(C.length){var $=I.findGroup(C,q.groupId)||C[0];O(q,$,"audioCodec"),O(q,$,"textCodec")}p.push(q)}}return p},I.parseLevelPlaylist=function(k,g,a,C,S){var p=new r.LevelDetails(g),U=p.fragments,z=null,q=0,$=0,re=0,ce=0,ne=null,me=new _.Fragment(C,g),be,he,se,_e=-1,De=!1;for(b.lastIndex=0,p.m3u8=k;(be=b.exec(k))!==null;){De&&(De=!1,me=new _.Fragment(C,g),me.start=re,me.sn=q,me.cc=ce,me.level=a,z&&(me.initSegment=z,me.rawProgramDateTime=z.rawProgramDateTime,z.rawProgramDateTime=null));var ge=be[1];if(ge){me.duration=parseFloat(ge);var fe=(" "+be[2]).slice(1);me.title=fe||null,me.tagList.push(fe?["INF",ge,fe]:["INF",ge])}else if(be[3])(0,T.isFiniteNumber)(me.duration)&&(me.start=re,se&&P(me,se,p),me.sn=q,me.level=a,me.cc=ce,me.urlId=S,U.push(me),me.relurl=(" "+be[3]).slice(1),D(me,ne),ne=me,re+=me.duration,q++,$=0,De=!0);else if(be[4]){var Ce=(" "+be[4]).slice(1);ne?me.setByteRange(Ce,ne):me.setByteRange(Ce)}else if(be[5])me.rawProgramDateTime=(" "+be[5]).slice(1),me.tagList.push(["PROGRAM-DATE-TIME",me.rawProgramDateTime]),_e===-1&&(_e=U.length);else{if(be=be[0].match(m),!be){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(he=1;he<be.length&&!(typeof be[he]!="undefined");he++);var ae=(" "+be[he]).slice(1),Q=(" "+be[he+1]).slice(1),J=be[he+2]?(" "+be[he+2]).slice(1):"";switch(ae){case"PLAYLIST-TYPE":p.type=Q.toUpperCase();break;case"MEDIA-SEQUENCE":q=p.startSN=parseInt(Q);break;case"SKIP":{var Z=new o.AttrList(Q),pe=Z.decimalInteger("SKIPPED-SEGMENTS");if((0,T.isFiniteNumber)(pe)){p.skippedSegments=pe;for(var le=pe;le--;)U.unshift(null);q+=pe}var ye=Z.enumeratedString("RECENTLY-REMOVED-DATERANGES");ye&&(p.recentlyRemovedDateranges=ye.split(" "));break}case"TARGETDURATION":p.targetduration=parseFloat(Q);break;case"VERSION":p.version=parseInt(Q);break;case"EXTM3U":break;case"ENDLIST":p.live=!1;break;case"#":(Q||J)&&me.tagList.push(J?[Q,J]:[Q]);break;case"DISCONTINUITY":ce++,me.tagList.push(["DIS"]);break;case"GAP":me.tagList.push([ae]);break;case"BITRATE":me.tagList.push([ae,Q]);break;case"DATERANGE":{var Te=new o.AttrList(Q),Pe=new l.DateRange(Te,p.dateRanges[Te.ID]);Pe.isValid||p.skippedSegments?p.dateRanges[Pe.id]=Pe:c.logger.warn('Ignoring invalid DATERANGE tag: "'+Q+'"'),me.tagList.push(["EXT-X-DATERANGE",Q]);break}case"DISCONTINUITY-SEQUENCE":ce=parseInt(Q);break;case"KEY":{var He=x(Q,g);if(He.isSupported()){if(He.method==="NONE"){se=void 0;break}se||(se={}),se[He.keyFormat]&&(se=f({},se)),se[He.keyFormat]=He}else c.logger.warn('[Keys] Ignoring invalid EXT-X-KEY tag: "'+Q+'"');break}case"START":{var Oe=new o.AttrList(Q),Ue=Oe.decimalFloatingPoint("TIME-OFFSET");(0,T.isFiniteNumber)(Ue)&&(p.startTimeOffset=Ue);break}case"MAP":{var je=new o.AttrList(Q);if(me.duration){var Ve=new _.Fragment(C,g);A(Ve,je,a,se),z=Ve,me.initSegment=z,z.rawProgramDateTime&&!me.rawProgramDateTime&&(me.rawProgramDateTime=z.rawProgramDateTime)}else A(me,je,a,se),z=me,De=!0;break}case"SERVER-CONTROL":{var Re=new o.AttrList(Q);p.canBlockReload=Re.bool("CAN-BLOCK-RELOAD"),p.canSkipUntil=Re.optionalFloat("CAN-SKIP-UNTIL",0),p.canSkipDateRanges=p.canSkipUntil>0&&Re.bool("CAN-SKIP-DATERANGES"),p.partHoldBack=Re.optionalFloat("PART-HOLD-BACK",0),p.holdBack=Re.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Xe=new o.AttrList(Q);p.partTarget=Xe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Qe=p.partList;Qe||(Qe=p.partList=[]);var We=$>0?Qe[Qe.length-1]:void 0,ze=$++,Me=new _.Part(new o.AttrList(Q),me,g,ze,We);Qe.push(Me),me.duration+=Me.duration;break}case"PRELOAD-HINT":{var Ie=new o.AttrList(Q);p.preloadHint=Ie;break}case"RENDITION-REPORT":{var Be=new o.AttrList(Q);p.renditionReports=p.renditionReports||[],p.renditionReports.push(Be);break}default:c.logger.warn("line parsed but not handled: "+be);break}}}ne&&!ne.relurl?(U.pop(),re-=ne.duration,p.partList&&(p.fragmentHint=ne)):p.partList&&(D(me,ne),me.cc=ce,p.fragmentHint=me,se&&P(me,se,p));var we=U.length,Ae=U[0],ke=U[we-1];if(re+=p.skippedSegments*p.targetduration,re>0&&we&&ke){p.averagetargetduration=re/we;var Le=ke.sn;p.endSN=Le!=="initSegment"?Le:0,p.live||(ke.endList=!0),Ae&&(p.startCC=Ae.cc)}else p.endSN=0,p.startCC=0;return p.fragmentHint&&(re+=p.fragmentHint.duration),p.totalduration=re,p.endCC=ce,_e>0&&w(U,_e),p},I}();function x(I,u){var k,g,a=new o.AttrList(I),C=(k=a.enumeratedString("METHOD"))!=null?k:"",S=a.URI,p=a.hexadecimalInteger("IV"),U=a.enumeratedString("KEYFORMATVERSIONS"),z=(g=a.enumeratedString("KEYFORMAT"))!=null?g:"identity";S&&a.IV&&!p&&c.logger.error("Invalid IV: "+a.IV);var q=S?d.resolve(S,u):"",$=(U||"1").split("/").map(Number).filter(Number.isFinite);return new n.LevelKey(C,q,z,$,p)}function R(I,u){["video","audio","text"].forEach(function(k){var g=I.filter(function(C){return(0,v.isCodecType)(C,k)});if(g.length){var a=g.filter(function(C){return C.lastIndexOf("avc1",0)===0||C.lastIndexOf("mp4a",0)===0});u[k+"Codec"]=a.length>0?a[0]:g[0],I=I.filter(function(C){return g.indexOf(C)===-1})}}),u.unknownCodecs=I}function O(I,u,k){var g=u[k];g&&(I[k]=g)}function w(I,u){for(var k=I[u],g=u;g--;){var a=I[g];if(!a)return;a.programDateTime=k.programDateTime-a.duration*1e3,k=a}}function D(I,u){I.rawProgramDateTime?I.programDateTime=Date.parse(I.rawProgramDateTime):u!=null&&u.programDateTime&&(I.programDateTime=u.endProgramDateTime),(0,T.isFiniteNumber)(I.programDateTime)||(I.programDateTime=null,I.rawProgramDateTime=null)}function A(I,u,k,g){I.relurl=u.URI,u.BYTERANGE&&I.setByteRange(u.BYTERANGE),I.level=k,I.sn="initSegment",g&&(I.levelkeys=g),I.initSegment=null}function P(I,u,k){I.levelkeys=u;var g=k.encryptedFragments;(!g.length||g[g.length-1].levelkeys!==u)&&Object.keys(u).some(function(a){return u[a].isCommonEncryption})&&g.push(I)}},"./src/loader/playlist-loader.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>f});var T=i("./src/polyfills/number.ts"),e=i("./src/events.ts"),E=i("./src/errors.ts"),l=i("./src/utils/logger.ts"),_=i("./src/loader/m3u8-parser.ts"),r=i("./src/types/loader.ts"),n=i("./src/utils/attr-list.ts");function o(y){var h=y.type;switch(h){case r.PlaylistContextType.AUDIO_TRACK:return r.PlaylistLevelType.AUDIO;case r.PlaylistContextType.SUBTITLE_TRACK:return r.PlaylistLevelType.SUBTITLE;default:return r.PlaylistLevelType.MAIN}}function c(y,h){var b=y.url;return(b===void 0||b.indexOf("data:")===0)&&(b=h.url),b}var v=function(){function y(b){this.hls=void 0,this.loaders=Object.create(null),this.hls=b,this.registerListeners()}var h=y.prototype;return h.startLoad=function(m){},h.stopLoad=function(){this.destroyInternalLoaders()},h.registerListeners=function(){var m=this.hls;m.on(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),m.on(e.Events.LEVEL_LOADING,this.onLevelLoading,this),m.on(e.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),m.on(e.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},h.unregisterListeners=function(){var m=this.hls;m.off(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),m.off(e.Events.LEVEL_LOADING,this.onLevelLoading,this),m.off(e.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),m.off(e.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},h.createInternalLoader=function(m){var d=this.hls.config,x=d.pLoader,R=d.loader,O=x||R,w=new O(d);return m.loader=w,this.loaders[m.type]=w,w},h.getInternalLoader=function(m){return this.loaders[m.type]},h.resetInternalLoader=function(m){this.loaders[m]&&delete this.loaders[m]},h.destroyInternalLoaders=function(){for(var m in this.loaders){var d=this.loaders[m];d&&d.destroy(),this.resetInternalLoader(m)}},h.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},h.onManifestLoading=function(m,d){var x=d.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:r.PlaylistContextType.MANIFEST,url:x,deliveryDirectives:null})},h.onLevelLoading=function(m,d){var x=d.id,R=d.level,O=d.url,w=d.deliveryDirectives;this.load({id:x,groupId:null,level:R,responseType:"text",type:r.PlaylistContextType.LEVEL,url:O,deliveryDirectives:w})},h.onAudioTrackLoading=function(m,d){var x=d.id,R=d.groupId,O=d.url,w=d.deliveryDirectives;this.load({id:x,groupId:R,level:null,responseType:"text",type:r.PlaylistContextType.AUDIO_TRACK,url:O,deliveryDirectives:w})},h.onSubtitleTrackLoading=function(m,d){var x=d.id,R=d.groupId,O=d.url,w=d.deliveryDirectives;this.load({id:x,groupId:R,level:null,responseType:"text",type:r.PlaylistContextType.SUBTITLE_TRACK,url:O,deliveryDirectives:w})},h.load=function(m){var d,x=this.hls.config,R=this.getInternalLoader(m);if(R){var O=R.context;if(O&&O.url===m.url){l.logger.trace("[playlist-loader]: playlist request ongoing");return}l.logger.log("[playlist-loader]: aborting previous loader for type: "+m.type),R.abort()}var w,D,A,P;switch(m.type){case r.PlaylistContextType.MANIFEST:w=x.manifestLoadingMaxRetry,D=x.manifestLoadingTimeOut,A=x.manifestLoadingRetryDelay,P=x.manifestLoadingMaxRetryTimeout;break;case r.PlaylistContextType.LEVEL:case r.PlaylistContextType.AUDIO_TRACK:case r.PlaylistContextType.SUBTITLE_TRACK:w=0,D=x.levelLoadingTimeOut;break;default:w=x.levelLoadingMaxRetry,D=x.levelLoadingTimeOut,A=x.levelLoadingRetryDelay,P=x.levelLoadingMaxRetryTimeout;break}if(R=this.createInternalLoader(m),(d=m.deliveryDirectives)!==null&&d!==void 0&&d.part){var I;if(m.type===r.PlaylistContextType.LEVEL&&m.level!==null?I=this.hls.levels[m.level].details:m.type===r.PlaylistContextType.AUDIO_TRACK&&m.id!==null?I=this.hls.audioTracks[m.id].details:m.type===r.PlaylistContextType.SUBTITLE_TRACK&&m.id!==null&&(I=this.hls.subtitleTracks[m.id].details),I){var u=I.partTarget,k=I.targetduration;u&&k&&(D=Math.min(Math.max(u*3,k*.8)*1e3,D))}}var g={timeout:D,maxRetry:w,retryDelay:A,maxRetryDelay:P,highWaterMark:0},a={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};R.load(m,g,a)},h.loadsuccess=function(m,d,x,R){R===void 0&&(R=null),this.resetInternalLoader(x.type);var O=m.data;if(O.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(m,x,"no EXTM3U delimiter",R);return}d.parsing.start=performance.now(),O.indexOf("#EXTINF:")>0||O.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(m,d,x,R):this.handleMasterPlaylist(m,d,x,R)},h.loaderror=function(m,d,x){x===void 0&&(x=null),this.handleNetworkError(d,x,!1,m)},h.loadtimeout=function(m,d,x){x===void 0&&(x=null),this.handleNetworkError(d,x,!0)},h.handleMasterPlaylist=function(m,d,x,R){var O=this.hls,w=m.data,D=c(m,x),A=_.default.parseMasterPlaylist(w,D),P=A.levels,I=A.sessionData,u=A.sessionKeys;if(!P.length){this.handleManifestParsingError(m,x,"no level found in manifest",R);return}var k=P.map(function(U){return{id:U.attrs.AUDIO,audioCodec:U.audioCodec}}),g=P.map(function(U){return{id:U.attrs.SUBTITLES,textCodec:U.textCodec}}),a=_.default.parseMasterPlaylistMedia(w,D,"AUDIO",k),C=_.default.parseMasterPlaylistMedia(w,D,"SUBTITLES",g),S=_.default.parseMasterPlaylistMedia(w,D,"CLOSED-CAPTIONS");if(a.length){var p=a.some(function(U){return!U.url});!p&&P[0].audioCodec&&!P[0].attrs.AUDIO&&(l.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),a.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new n.AttrList({}),bitrate:0,url:""}))}O.trigger(e.Events.MANIFEST_LOADED,{levels:P,audioTracks:a,subtitles:C,captions:S,url:D,stats:d,networkDetails:R,sessionData:I,sessionKeys:u})},h.handleTrackOrLevelPlaylist=function(m,d,x,R){var O=this.hls,w=x.id,D=x.level,A=x.type,P=c(m,x),I=(0,T.isFiniteNumber)(w)?w:0,u=(0,T.isFiniteNumber)(D)?D:I,k=o(x),g=_.default.parseLevelPlaylist(m.data,P,u,k,I);if(!g.fragments.length){O.trigger(e.Events.ERROR,{type:E.ErrorTypes.NETWORK_ERROR,details:E.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:P,reason:"no fragments found in level",level:typeof x.level=="number"?x.level:void 0});return}if(A===r.PlaylistContextType.MANIFEST){var a={attrs:new n.AttrList({}),bitrate:0,details:g,name:"",url:P};O.trigger(e.Events.MANIFEST_LOADED,{levels:[a],audioTracks:[],url:P,stats:d,networkDetails:R,sessionData:null,sessionKeys:null})}d.parsing.end=performance.now(),x.levelDetails=g,this.handlePlaylistLoaded(m,d,x,R)},h.handleManifestParsingError=function(m,d,x,R){this.hls.trigger(e.Events.ERROR,{type:E.ErrorTypes.NETWORK_ERROR,details:E.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:d.type===r.PlaylistContextType.MANIFEST,url:m.url,reason:x,response:m,context:d,networkDetails:R})},h.handleNetworkError=function(m,d,x,R){x===void 0&&(x=!1),l.logger.warn("[playlist-loader]: A network "+(x?"timeout":"error")+" occurred while loading "+m.type+" level: "+m.level+" id: "+m.id+' group-id: "'+m.groupId+'"');var O=E.ErrorDetails.UNKNOWN,w=!1,D=this.getInternalLoader(m);switch(m.type){case r.PlaylistContextType.MANIFEST:O=x?E.ErrorDetails.MANIFEST_LOAD_TIMEOUT:E.ErrorDetails.MANIFEST_LOAD_ERROR,w=!0;break;case r.PlaylistContextType.LEVEL:O=x?E.ErrorDetails.LEVEL_LOAD_TIMEOUT:E.ErrorDetails.LEVEL_LOAD_ERROR,w=!1;break;case r.PlaylistContextType.AUDIO_TRACK:O=x?E.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:E.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,w=!1;break;case r.PlaylistContextType.SUBTITLE_TRACK:O=x?E.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:E.ErrorDetails.SUBTITLE_LOAD_ERROR,w=!1;break}D&&this.resetInternalLoader(m.type);var A={type:E.ErrorTypes.NETWORK_ERROR,details:O,fatal:w,url:m.url,loader:D,context:m,networkDetails:d};R&&(A.response=R),this.hls.trigger(e.Events.ERROR,A)},h.handlePlaylistLoaded=function(m,d,x,R){var O=x.type,w=x.level,D=x.id,A=x.groupId,P=x.loader,I=x.levelDetails,u=x.deliveryDirectives;if(!(I!=null&&I.targetduration)){this.handleManifestParsingError(m,x,"invalid target duration",R);return}if(!P)return;I.live&&(P.getCacheAge&&(I.ageHeader=P.getCacheAge()||0),(!P.getCacheAge||isNaN(I.ageHeader))&&(I.ageHeader=0));switch(O){case r.PlaylistContextType.MANIFEST:case r.PlaylistContextType.LEVEL:this.hls.trigger(e.Events.LEVEL_LOADED,{details:I,level:w||0,id:D||0,stats:d,networkDetails:R,deliveryDirectives:u});break;case r.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(e.Events.AUDIO_TRACK_LOADED,{details:I,id:D||0,groupId:A||"",stats:d,networkDetails:R,deliveryDirectives:u});break;case r.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(e.Events.SUBTITLE_TRACK_LOADED,{details:I,id:D||0,groupId:A||"",stats:d,networkDetails:R,deliveryDirectives:u});break}},y}();const f=v},"./src/polyfills/number.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{MAX_SAFE_INTEGER:()=>e,isFiniteNumber:()=>T});var T=Number.isFinite||function(E){return typeof E=="number"&&isFinite(E)},e=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>e});var T=function(){function E(){}return E.getSilentFrame=function(_,r){switch(_){case"mp4a.40.2":if(r===1)return new Uint8Array([0,200,0,128,35,128]);if(r===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(r===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(r===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(r===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(r===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(r===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(r===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(r===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},E}();const e=T},"./src/remux/mp4-generator.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>E});var T=Math.pow(2,32)-1,e=function(){function l(){}return l.init=function(){l.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:[]};var r;for(r in l.types)l.types.hasOwnProperty(r)&&(l.types[r]=[r.charCodeAt(0),r.charCodeAt(1),r.charCodeAt(2),r.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),o=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]);l.HDLR_TYPES={video:n,audio:o};var c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),v=new Uint8Array([0,0,0,0,0,0,0,0]);l.STTS=l.STSC=l.STCO=v,l.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),l.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),l.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),l.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var f=new Uint8Array([105,115,111,109]),y=new Uint8Array([97,118,99,49]),h=new Uint8Array([0,0,0,1]);l.FTYP=l.box(l.types.ftyp,f,h,f,y),l.DINF=l.box(l.types.dinf,l.box(l.types.dref,c))},l.box=function(r){for(var n=8,o=arguments.length,c=new Array(o>1?o-1:0),v=1;v<o;v++)c[v-1]=arguments[v];for(var f=c.length,y=f;f--;)n+=c[f].byteLength;var h=new Uint8Array(n);for(h[0]=n>>24&255,h[1]=n>>16&255,h[2]=n>>8&255,h[3]=n&255,h.set(r,4),f=0,n=8;f<y;f++)h.set(c[f],n),n+=c[f].byteLength;return h},l.hdlr=function(r){return l.box(l.types.hdlr,l.HDLR_TYPES[r])},l.mdat=function(r){return l.box(l.types.mdat,r)},l.mdhd=function(r,n){n*=r;var o=Math.floor(n/(T+1)),c=Math.floor(n%(T+1));return l.box(l.types.mdhd,new Uint8Array([1,0,0,0,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,r&255,o>>24,o>>16&255,o>>8&255,o&255,c>>24,c>>16&255,c>>8&255,c&255,85,196,0,0]))},l.mdia=function(r){return l.box(l.types.mdia,l.mdhd(r.timescale,r.duration),l.hdlr(r.type),l.minf(r))},l.mfhd=function(r){return l.box(l.types.mfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255]))},l.minf=function(r){return r.type==="audio"?l.box(l.types.minf,l.box(l.types.smhd,l.SMHD),l.DINF,l.stbl(r)):l.box(l.types.minf,l.box(l.types.vmhd,l.VMHD),l.DINF,l.stbl(r))},l.moof=function(r,n,o){return l.box(l.types.moof,l.mfhd(r),l.traf(o,n))},l.moov=function(r){for(var n=r.length,o=[];n--;)o[n]=l.trak(r[n]);return l.box.apply(null,[l.types.moov,l.mvhd(r[0].timescale,r[0].duration)].concat(o).concat(l.mvex(r)))},l.mvex=function(r){for(var n=r.length,o=[];n--;)o[n]=l.trex(r[n]);return l.box.apply(null,[l.types.mvex].concat(o))},l.mvhd=function(r,n){n*=r;var o=Math.floor(n/(T+1)),c=Math.floor(n%(T+1)),v=new Uint8Array([1,0,0,0,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,r&255,o>>24,o>>16&255,o>>8&255,o&255,c>>24,c>>16&255,c>>8&255,c&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return l.box(l.types.mvhd,v)},l.sdtp=function(r){var n=r.samples||[],o=new Uint8Array(4+n.length),c,v;for(c=0;c<n.length;c++)v=n[c].flags,o[c+4]=v.dependsOn<<4|v.isDependedOn<<2|v.hasRedundancy;return l.box(l.types.sdtp,o)},l.stbl=function(r){return l.box(l.types.stbl,l.stsd(r),l.box(l.types.stts,l.STTS),l.box(l.types.stsc,l.STSC),l.box(l.types.stsz,l.STSZ),l.box(l.types.stco,l.STCO))},l.avc1=function(r){var n=[],o=[],c,v,f;for(c=0;c<r.sps.length;c++)v=r.sps[c],f=v.byteLength,n.push(f>>>8&255),n.push(f&255),n=n.concat(Array.prototype.slice.call(v));for(c=0;c<r.pps.length;c++)v=r.pps[c],f=v.byteLength,o.push(f>>>8&255),o.push(f&255),o=o.concat(Array.prototype.slice.call(v));var y=l.box(l.types.avcC,new Uint8Array([1,n[3],n[4],n[5],252|3,224|r.sps.length].concat(n).concat([r.pps.length]).concat(o))),h=r.width,b=r.height,m=r.pixelRatio[0],d=r.pixelRatio[1];return l.box(l.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,h>>8&255,h&255,b>>8&255,b&255,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]),y,l.box(l.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),l.box(l.types.pasp,new Uint8Array([m>>24,m>>16&255,m>>8&255,m&255,d>>24,d>>16&255,d>>8&255,d&255])))},l.esds=function(r){var n=r.config.length;return new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(r.config).concat([6,1,2]))},l.mp4a=function(r){var n=r.samplerate;return l.box(l.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r.channelCount,0,16,0,0,0,0,n>>8&255,n&255,0,0]),l.box(l.types.esds,l.esds(r)))},l.mp3=function(r){var n=r.samplerate;return l.box(l.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r.channelCount,0,16,0,0,0,0,n>>8&255,n&255,0,0]))},l.stsd=function(r){return r.type==="audio"?r.segmentCodec==="mp3"&&r.codec==="mp3"?l.box(l.types.stsd,l.STSD,l.mp3(r)):l.box(l.types.stsd,l.STSD,l.mp4a(r)):l.box(l.types.stsd,l.STSD,l.avc1(r))},l.tkhd=function(r){var n=r.id,o=r.duration*r.timescale,c=r.width,v=r.height,f=Math.floor(o/(T+1)),y=Math.floor(o%(T+1));return l.box(l.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,n&255,0,0,0,0,f>>24,f>>16&255,f>>8&255,f&255,y>>24,y>>16&255,y>>8&255,y&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,c>>8&255,c&255,0,0,v>>8&255,v&255,0,0]))},l.traf=function(r,n){var o=l.sdtp(r),c=r.id,v=Math.floor(n/(T+1)),f=Math.floor(n%(T+1));return l.box(l.types.traf,l.box(l.types.tfhd,new Uint8Array([0,0,0,0,c>>24,c>>16&255,c>>8&255,c&255])),l.box(l.types.tfdt,new Uint8Array([1,0,0,0,v>>24,v>>16&255,v>>8&255,v&255,f>>24,f>>16&255,f>>8&255,f&255])),l.trun(r,o.length+16+20+8+16+8+8),o)},l.trak=function(r){return r.duration=r.duration||4294967295,l.box(l.types.trak,l.tkhd(r),l.mdia(r))},l.trex=function(r){var n=r.id;return l.box(l.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},l.trun=function(r,n){var o=r.samples||[],c=o.length,v=12+16*c,f=new Uint8Array(v),y,h,b,m,d,x;for(n+=8+v,f.set([r.type==="video"?1:0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,c&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255],0),y=0;y<c;y++)h=o[y],b=h.duration,m=h.size,d=h.flags,x=h.cts,f.set([b>>>24&255,b>>>16&255,b>>>8&255,b&255,m>>>24&255,m>>>16&255,m>>>8&255,m&255,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.paddingValue<<1|d.isNonSync,d.degradPrio&240<<8,d.degradPrio&15,x>>>24&255,x>>>16&255,x>>>8&255,x&255],12+16*y);return l.box(l.types.trun,f)},l.initSegment=function(r){l.types||l.init();var n=l.moov(r),o=new Uint8Array(l.FTYP.byteLength+n.byteLength);return o.set(l.FTYP),o.set(n,l.FTYP.byteLength),o},l}();e.types=void 0,e.HDLR_TYPES=void 0,e.STTS=void 0,e.STSC=void 0,e.STCO=void 0,e.STSZ=void 0,e.VMHD=void 0,e.SMHD=void 0,e.STSD=void 0,e.FTYP=void 0,e.DINF=void 0;const E=e},"./src/remux/mp4-remuxer.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>m,flushTextTrackMetadataCueSamples:()=>R,flushTextTrackUserdataCueSamples:()=>O,normalizePts:()=>d});var T=i("./src/polyfills/number.ts"),e=i("./src/remux/aac-helper.ts"),E=i("./src/remux/mp4-generator.ts"),l=i("./src/events.ts"),_=i("./src/errors.ts"),r=i("./src/utils/logger.ts"),n=i("./src/types/loader.ts"),o=i("./src/utils/timescale-conversion.ts");function c(){return c=Object.assign?Object.assign.bind():function(A){for(var P=1;P<arguments.length;P++){var I=arguments[P];for(var u in I)Object.prototype.hasOwnProperty.call(I,u)&&(A[u]=I[u])}return A},c.apply(this,arguments)}var v=10*1e3,f=1024,y=1152,h=null,b=null,m=function(){function A(I,u,k,g){if(g===void 0&&(g=""),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.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=I,this.config=u,this.typeSupported=k,this.ISGenerated=!1,h===null){var a=navigator.userAgent||"",C=a.match(/Chrome\/(\d+)/i);h=C?parseInt(C[1]):0}if(b===null){var S=navigator.userAgent.match(/Safari\/(\d+)/i);b=S?parseInt(S[1]):0}}var P=A.prototype;return P.destroy=function(){},P.resetTimeStamp=function(u){r.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=u},P.resetNextTimestamp=function(){r.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},P.resetInitSegment=function(){r.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},P.getVideoStartPts=function(u){var k=!1,g=u.reduce(function(a,C){var S=C.pts-a;return S<-4294967296?(k=!0,d(a,C.pts)):S>0?a:C.pts},u[0].pts);return k&&r.logger.debug("PTS rollover detected"),g},P.remux=function(u,k,g,a,C,S,p,U){var z,q,$,re,ce,ne,me=C,be=C,he=u.pid>-1,se=k.pid>-1,_e=k.samples.length,De=u.samples.length>0,ge=p&&_e>0||_e>1,fe=(!he||De)&&(!se||ge)||this.ISGenerated||p;if(fe){this.ISGenerated||($=this.generateIS(u,k,C));var Ce=this.isVideoContiguous,ae=-1,Q;if(ge&&(ae=x(k.samples),!Ce&&this.config.forceKeyFrameOnDiscontinuity))if(ne=!0,ae>0){r.logger.warn("[mp4-remuxer]: Dropped "+ae+" out of "+_e+" video samples due to a missing keyframe");var J=this.getVideoStartPts(k.samples);k.samples=k.samples.slice(ae),k.dropped+=ae,be+=(k.samples[0].pts-J)/k.inputTimeScale,Q=be}else ae===-1&&(r.logger.warn("[mp4-remuxer]: No keyframe found out of "+_e+" video samples"),ne=!1);if(this.ISGenerated){if(De&&ge){var Z=this.getVideoStartPts(k.samples),pe=d(u.samples[0].pts,Z)-Z,le=pe/k.inputTimeScale;me+=Math.max(0,le),be+=Math.max(0,-le)}if(De){if(u.samplerate||(r.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),$=this.generateIS(u,k,C)),q=this.remuxAudio(u,me,this.isAudioContiguous,S,se||ge||U===n.PlaylistLevelType.AUDIO?be:void 0),ge){var ye=q?q.endPTS-q.startPTS:0;k.inputTimeScale||(r.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),$=this.generateIS(u,k,C)),z=this.remuxVideo(k,be,Ce,ye)}}else ge&&(z=this.remuxVideo(k,be,Ce,0));z&&(z.firstKeyFrame=ae,z.independent=ae!==-1,z.firstKeyFramePTS=Q)}}return this.ISGenerated&&(g.samples.length&&(ce=R(g,C,this._initPTS,this._initDTS)),a.samples.length&&(re=O(a,C,this._initPTS))),{audio:q,video:z,initSegment:$,independent:ne,text:re,id3:ce}},P.generateIS=function(u,k,g){var a=u.samples,C=k.samples,S=this.typeSupported,p={},U=!(0,T.isFiniteNumber)(this._initPTS),z="audio/mp4",q,$,re;if(U&&(q=$=Infinity),u.config&&a.length){u.timescale=u.samplerate;switch(u.segmentCodec){case"mp3":S.mpeg?(z="audio/mpeg",u.codec=""):S.mp3&&(u.codec="mp3");break}p.audio={id:"audio",container:z,codec:u.codec,initSegment:u.segmentCodec==="mp3"&&S.mpeg?new Uint8Array(0):E.default.initSegment([u]),metadata:{channelCount:u.channelCount}},U&&(re=u.inputTimeScale,q=$=a[0].pts-Math.round(re*g))}if(k.sps&&k.pps&&C.length&&(k.timescale=k.inputTimeScale,p.video={id:"main",container:"video/mp4",codec:k.codec,initSegment:E.default.initSegment([k]),metadata:{width:k.width,height:k.height}},U)){re=k.inputTimeScale;var ce=this.getVideoStartPts(C),ne=Math.round(re*g);$=Math.min($,d(C[0].dts,ce)-ne),q=Math.min(q,ce-ne)}if(Object.keys(p).length)return this.ISGenerated=!0,U&&(this._initPTS=q,this._initDTS=$),{tracks:p,initPTS:q,timescale:re}},P.remuxVideo=function(u,k,g,a){var C=u.inputTimeScale,S=u.samples,p=[],U=S.length,z=this._initPTS,q=this.nextAvcDts,$=8,re=this.videoSampleDuration,ce,ne,me=Number.POSITIVE_INFINITY,be=Number.NEGATIVE_INFINITY,he=!1;if(!g||q===null){var se=k*C,_e=S[0].pts-d(S[0].dts,S[0].pts);q=se-_e}for(var De=0;De<U;De++){var ge=S[De];ge.pts=d(ge.pts-z,q),ge.dts=d(ge.dts-z,q),ge.dts<S[De>0?De-1:De].dts&&(he=!0)}he&&S.sort(function(_t,jt){var Ht=_t.dts-jt.dts,ct=_t.pts-jt.pts;return Ht||ct}),ce=S[0].dts,ne=S[S.length-1].dts;var fe=ne-ce,Ce=fe?Math.round(fe/(U-1)):re||u.inputTimeScale/30;if(g){var ae=ce-q,Q=ae>Ce,J=ae<-1;if((Q||J)&&(Q?r.logger.warn("AVC: "+(0,o.toMsFromMpegTsClock)(ae,!0)+" ms ("+ae+"dts) hole between fragments detected, filling it"):r.logger.warn("AVC: "+(0,o.toMsFromMpegTsClock)(-ae,!0)+" ms ("+ae+"dts) overlapping between fragments detected"),!J||q>S[0].pts)){ce=q;var Z=S[0].pts-ae;S[0].dts=ce,S[0].pts=Z,r.logger.log("Video: First PTS/DTS adjusted: "+(0,o.toMsFromMpegTsClock)(Z,!0)+"/"+(0,o.toMsFromMpegTsClock)(ce,!0)+", delta: "+(0,o.toMsFromMpegTsClock)(ae,!0)+" ms")}}ce=Math.max(0,ce);for(var pe=0,le=0,ye=0;ye<U;ye++){for(var Te=S[ye],Pe=Te.units,He=Pe.length,Oe=0,Ue=0;Ue<He;Ue++)Oe+=Pe[Ue].data.length;le+=Oe,pe+=He,Te.length=Oe,Te.dts=Math.max(Te.dts,ce),me=Math.min(Te.pts,me),be=Math.max(Te.pts,be)}ne=S[U-1].dts;var je=le+4*pe+8,Ve;try{Ve=new Uint8Array(je)}catch(_t){this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:_.ErrorTypes.MUX_ERROR,details:_.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:je,reason:"fail allocating video mdat "+je});return}var Re=new DataView(Ve.buffer);Re.setUint32(0,je),Ve.set(E.default.types.mdat,4);for(var Xe=!1,Qe=Number.POSITIVE_INFINITY,We=Number.POSITIVE_INFINITY,ze=Number.NEGATIVE_INFINITY,Me=Number.NEGATIVE_INFINITY,Ie=0;Ie<U;Ie++){for(var Be=S[Ie],we=Be.units,Ae=0,ke=0,Le=we.length;ke<Le;ke++){var Ke=we[ke],Ze=Ke.data,Ne=Ke.data.byteLength;Re.setUint32($,Ne),$+=4,Ve.set(Ze,$),$+=Ne,Ae+=4+Ne}var $e=void 0;if(Ie<U-1)re=S[Ie+1].dts-Be.dts,$e=S[Ie+1].pts-Be.pts;else{var Je=this.config,qe=Ie>0?Be.dts-S[Ie-1].dts:Ce;if($e=Ie>0?Be.pts-S[Ie-1].pts:Ce,Je.stretchShortVideoTrack&&this.nextAudioPts!==null){var ot=Math.floor(Je.maxBufferHole*C),at=(a?me+a*C:this.nextAudioPts)-Be.pts;at>ot?(re=at-qe,re<0?re=qe:Xe=!0,r.logger.log("[mp4-remuxer]: It is approximately "+at/90+" ms to the next segment; using duration "+re/90+" ms for the last video frame.")):re=qe}else re=qe}var rt=Math.round(Be.pts-Be.dts);Qe=Math.min(Qe,re),ze=Math.max(ze,re),We=Math.min(We,$e),Me=Math.max(Me,$e),p.push(new w(Be.key,re,Ae,rt))}if(p.length){if(h){if(h<70){var dt=p[0].flags;dt.dependsOn=2,dt.isNonSync=0}}else if(b&&(Me-We<ze-Qe&&Ce/ze<.025&&p[0].cts===0)){r.logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");for(var nt=ce,mt=0,yt=p.length;mt<yt;mt++){var ft=nt+p[mt].duration,ht=nt+p[mt].cts;if(mt<yt-1){var Rt=ft+p[mt+1].cts;p[mt].duration=Rt-ht}else p[mt].duration=mt?p[mt-1].duration:Ce;p[mt].cts=0,nt=ft}}}console.assert(re!==null,"mp4SampleDuration must be computed"),re=Xe||!re?Ce:re,this.nextAvcDts=q=ne+re,this.videoSampleDuration=re,this.isVideoContiguous=!0;var Wt=E.default.moof(u.sequenceNumber++,ce,c({},u,{samples:p})),wt="video",lt={data1:Wt,data2:Ve,startPTS:me/C,endPTS:(be+re)/C,startDTS:ce/C,endDTS:q/C,type:wt,hasAudio:!1,hasVideo:!0,nb:p.length,dropped:u.dropped};return u.samples=[],u.dropped=0,console.assert(Ve.length,"MDAT length must not be zero"),lt},P.remuxAudio=function(u,k,g,a,C){var S=u.inputTimeScale,p=u.samplerate?u.samplerate:S,U=S/p,z=u.segmentCodec==="aac"?f:y,q=z*U,$=this._initPTS,re=u.segmentCodec==="mp3"&&this.typeSupported.mpeg,ce=[],ne=C!==void 0,me=u.samples,be=re?0:8,he=this.nextAudioPts||-1,se=k*S;if(this.isAudioContiguous=g=g||me.length&&he>0&&(a&&Math.abs(se-he)<9e3||Math.abs(d(me[0].pts-$,se)-he)<20*q),me.forEach(function(Ke){Ke.pts=d(Ke.pts-$,se)}),!g||he<0){if(me=me.filter(function(Ke){return Ke.pts>=0}),!me.length)return;C===0?he=0:a&&!ne?he=Math.max(0,se):he=me[0].pts}if(u.segmentCodec==="aac")for(var _e=this.config.maxAudioFramesDrift,De=0,ge=he;De<me.length;De++){var fe=me[De],Ce=fe.pts,ae=Ce-ge,Q=Math.abs(1e3*ae/S);if(ae<=-_e*q&&ne)De===0&&(r.logger.warn("Audio frame @ "+(Ce/S).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*ae/S)+" ms."),this.nextAudioPts=he=ge=Ce);else if(ae>=_e*q&&Q<v&&ne){var J=Math.round(ae/q);ge=Ce-J*q,ge<0&&(J--,ge+=q),De===0&&(this.nextAudioPts=he=ge),r.logger.warn("[mp4-remuxer]: Injecting "+J+" audio frame @ "+(ge/S).toFixed(3)+"s due to "+Math.round(1e3*ae/S)+" ms gap.");for(var Z=0;Z<J;Z++){var pe=Math.max(ge,0),le=e.default.getSilentFrame(u.manifestCodec||u.codec,u.channelCount);le||(r.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),le=fe.unit.subarray()),me.splice(De,0,{unit:le,pts:pe}),ge+=q,De++}}fe.pts=ge,ge+=q}for(var ye=null,Te=null,Pe,He=0,Oe=me.length;Oe--;)He+=me[Oe].unit.byteLength;for(var Ue=0,je=me.length;Ue<je;Ue++){var Ve=me[Ue],Re=Ve.unit,Xe=Ve.pts;if(Te!==null){var Qe=ce[Ue-1];Qe.duration=Math.round((Xe-Te)/U)}else if(g&&u.segmentCodec==="aac"&&(Xe=he),ye=Xe,He>0){He+=be;try{Pe=new Uint8Array(He)}catch(Ke){this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:_.ErrorTypes.MUX_ERROR,details:_.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:He,reason:"fail allocating audio mdat "+He});return}if(!re){var We=new DataView(Pe.buffer);We.setUint32(0,He),Pe.set(E.default.types.mdat,4)}}else return;Pe.set(Re,be);var ze=Re.byteLength;be+=ze,ce.push(new w(!0,z,ze,0)),Te=Xe}var Me=ce.length;if(!Me)return;var Ie=ce[ce.length-1];this.nextAudioPts=he=Te+U*Ie.duration;var Be=re?new Uint8Array(0):E.default.moof(u.sequenceNumber++,ye/U,c({},u,{samples:ce}));u.samples=[];var we=ye/S,Ae=he/S,ke="audio",Le={data1:Be,data2:Pe,startPTS:we,endPTS:Ae,startDTS:we,endDTS:Ae,type:ke,hasAudio:!0,hasVideo:!1,nb:Me};return this.isAudioContiguous=!0,console.assert(Pe.length,"MDAT length must not be zero"),Le},P.remuxEmptyAudio=function(u,k,g,a){var C=u.inputTimeScale,S=u.samplerate?u.samplerate:C,p=C/S,U=this.nextAudioPts,z=(U!==null?U:a.startDTS*C)+this._initDTS,q=a.endDTS*C+this._initDTS,$=p*f,re=Math.ceil((q-z)/$),ce=e.default.getSilentFrame(u.manifestCodec||u.codec,u.channelCount);if(r.logger.warn("[mp4-remuxer]: remux empty Audio"),!ce){r.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ne=[],me=0;me<re;me++){var be=z+me*$;ne.push({unit:ce,pts:be,dts:be})}return u.samples=ne,this.remuxAudio(u,k,g,!1)},A}();function d(A,P){var I;if(P===null)return A;for(P<A?I=-8589934592:I=8589934592;Math.abs(A-P)>4294967296;)A+=I;return A}function x(A){for(var P=0;P<A.length;P++)if(A[P].key)return P;return-1}function R(A,P,I,u){var k=A.samples.length;if(!k)return;for(var g=A.inputTimeScale,a=0;a<k;a++){var C=A.samples[a];C.pts=d(C.pts-I,P*g)/g,C.dts=d(C.dts-u,P*g)/g}var S=A.samples;return A.samples=[],{samples:S}}function O(A,P,I){var u=A.samples.length;if(!u)return;for(var k=A.inputTimeScale,g=0;g<u;g++){var a=A.samples[g];a.pts=d(a.pts-I,P*k)/k}A.samples.sort(function(S,p){return S.pts-p.pts});var C=A.samples;return A.samples=[],{samples:C}}var w=function(P,I,u,k){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=I,this.size=u,this.cts=k,this.flags=new D(P)},D=function(P){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=P?2:1,this.isNonSync=P?0:1}},"./src/remux/passthrough-remuxer.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>o});var T=i("./src/polyfills/number.ts"),e=i("./src/remux/mp4-remuxer.ts"),E=i("./src/utils/mp4-tools.ts"),l=i("./src/loader/fragment.ts"),_=i("./src/utils/logger.ts"),r=function(){function c(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndTime=null}var v=c.prototype;return v.destroy=function(){},v.resetTimeStamp=function(y){this.initPTS=y,this.lastEndTime=null},v.resetNextTimestamp=function(){this.lastEndTime=null},v.resetInitSegment=function(y,h,b,m){this.audioCodec=h,this.videoCodec=b,this.generateInitSegment((0,E.patchEncyptionData)(y,m)),this.emitInitSegment=!0},v.generateInitSegment=function(y){var h=this.audioCodec,b=this.videoCodec;if(!y||!y.byteLength){this.initTracks=void 0,this.initData=void 0;return}var m=this.initData=(0,E.parseInitSegment)(y);h||(h=n(m.audio,l.ElementaryStreamTypes.AUDIO)),b||(b=n(m.video,l.ElementaryStreamTypes.VIDEO));var d={};m.audio&&m.video?d.audiovideo={container:"video/mp4",codec:h+","+b,initSegment:y,id:"main"}:m.audio?d.audio={container:"audio/mp4",codec:h,initSegment:y,id:"audio"}:m.video?d.video={container:"video/mp4",codec:b,initSegment:y,id:"main"}:_.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=d},v.remux=function(y,h,b,m,d){var x,R=this.initPTS,O=this.lastEndTime,w={audio:void 0,video:void 0,text:m,id3:b,initSegment:void 0};(0,T.isFiniteNumber)(O)||(O=this.lastEndTime=d||0);var D=h.samples;if(!D||!D.length)return w;var A={initPTS:void 0,timescale:1},P=this.initData;if((!P||!P.length)&&(this.generateInitSegment(D),P=this.initData),!P||!P.length)return _.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),w;this.emitInitSegment&&(A.tracks=this.initTracks,this.emitInitSegment=!1);var I=(0,E.getStartDTS)(P,D);(0,T.isFiniteNumber)(R)||(this.initPTS=A.initPTS=R=I-d);var u=(0,E.getDuration)(D,P),k=y?I-R:O,g=k+u;(0,E.offsetStartDTS)(P,D,R),u>0?this.lastEndTime=g:(_.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var a=!!P.audio,C=!!P.video,S="";a&&(S+="audio"),C&&(S+="video");var p={data1:D,startPTS:k,startDTS:k,endPTS:g,endDTS:g,type:S,hasAudio:a,hasVideo:C,nb:1,dropped:0};w.audio=p.type==="audio"?p:void 0,w.video=p.type!=="audio"?p:void 0,w.initSegment=A;var U=(x=this.initPTS)!=null?x:0;return w.id3=(0,e.flushTextTrackMetadataCueSamples)(b,d,U,U),m.samples.length&&(w.text=(0,e.flushTextTrackUserdataCueSamples)(m,d,U)),w},c}();function n(c,v){var f=c==null?void 0:c.codec;return f&&f.length>4?f:f==="hvc1"||f==="hev1"?"hvc1.1.c.L120.90":f==="av01"?"av01.0.04M.08":f==="avc1"||v===l.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}const o=r},"./src/task-loop.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>T});var T=function(){function e(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var E=e.prototype;return E.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},E.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},E.onHandlerDestroyed=function(){},E.hasInterval=function(){return!!this._tickInterval},E.hasNextTick=function(){return!!this._tickTimer},E.setInterval=function(_){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,_),!0)},E.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},E.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},E.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},E.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},E.doTick=function(){},e}()},"./src/types/cmcd.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{CMCDObjectType:()=>e,CMCDStreamType:()=>l,CMCDStreamingFormat:()=>E,CMCDVersion:()=>T});var T=1,e;(function(_){_.MANIFEST="m",_.AUDIO="a",_.VIDEO="v",_.MUXED="av",_.INIT="i",_.CAPTION="c",_.TIMED_TEXT="tt",_.KEY="k",_.OTHER="o"})(e||(e={}));var E;(function(_){_.DASH="d",_.HLS="h",_.SMOOTH="s",_.OTHER="o"})(E||(E={}));var l;(function(_){_.VOD="v",_.LIVE="l"})(l||(l={}))},"./src/types/demuxer.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{MetadataSchema:()=>T});var T;(function(e){e.audioId3="org.id3",e.dateRange="com.apple.quicktime.HLS",e.emsg="https://aomedia.org/emsg/ID3"})(T||(T={}))},"./src/types/level.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{HdcpLevels:()=>_,HlsSkip:()=>r,HlsUrlParameters:()=>o,Level:()=>c,getSkipValue:()=>n});function T(v,f){for(var y=0;y<f.length;y++){var h=f[y];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(v,E(h.key),h)}}function e(v,f,y){return f&&T(v.prototype,f),y&&T(v,y),Object.defineProperty(v,"prototype",{writable:!1}),v}function E(v){var f=l(v,"string");return typeof f=="symbol"?f:String(f)}function l(v,f){if(typeof v!="object"||v===null)return v;var y=v[Symbol.toPrimitive];if(y!==void 0){var h=y.call(v,f||"default");if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(v)}var _=["NONE","TYPE-0","TYPE-1","TYPE-2",null],r;(function(v){v.No="",v.Yes="YES",v.v2="v2"})(r||(r={}));function n(v,f){var y=v.canSkipUntil,h=v.canSkipDateRanges,b=v.endSN,m=f!==void 0?f-b:0;return y&&m<y?h?r.v2:r.Yes:r.No}var o=function(){function v(y,h,b){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=y,this.part=h,this.skip=b}var f=v.prototype;return f.addDirectives=function(h){var b=new self.URL(h);return this.msn!==void 0&&b.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&b.searchParams.set("_HLS_part",this.part.toString()),this.skip&&b.searchParams.set("_HLS_skip",this.skip),b.href},v}(),c=function(){function v(f){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=[f.url],this.attrs=f.attrs,this.bitrate=f.bitrate,f.details&&(this.details=f.details),this.id=f.id||0,this.name=f.name,this.width=f.width||0,this.height=f.height||0,this.audioCodec=f.audioCodec,this.videoCodec=f.videoCodec,this.unknownCodecs=f.unknownCodecs,this.codecSet=[f.videoCodec,f.audioCodec].filter(function(y){return y}).join(",").replace(/\.[^.,]+/g,"")}return e(v,[{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(y){var h=y%this.url.length;this._urlId!==h&&(this.details=void 0,this._urlId=h)}}]),v}()},"./src/types/loader.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{PlaylistContextType:()=>T,PlaylistLevelType:()=>e});var T;(function(E){E.MANIFEST="manifest",E.LEVEL="level",E.AUDIO_TRACK="audioTrack",E.SUBTITLE_TRACK="subtitleTrack"})(T||(T={}));var e;(function(E){E.MAIN="main",E.AUDIO="audio",E.SUBTITLE="subtitle"})(e||(e={}))},"./src/types/transmuxer.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{ChunkMetadata:()=>T});var T=function(l,_,r,n,o,c){n===void 0&&(n=0),o===void 0&&(o=-1),c===void 0&&(c=!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=e(),this.buffering={audio:e(),video:e(),audiovideo:e()},this.level=l,this.sn=_,this.id=r,this.size=n,this.part=o,this.partial=c};function e(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{AttrList:()=>E});var T=/^(\d+)x(\d+)$/,e=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,E=function(){function l(r){typeof r=="string"&&(r=l.parseAttrList(r));for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n])}var _=l.prototype;return _.decimalInteger=function(n){var o=parseInt(this[n],10);return o>Number.MAX_SAFE_INTEGER?Infinity:o},_.hexadecimalInteger=function(n){if(this[n]){var o=(this[n]||"0x").slice(2);o=(o.length&1?"0":"")+o;for(var c=new Uint8Array(o.length/2),v=0;v<o.length/2;v++)c[v]=parseInt(o.slice(v*2,v*2+2),16);return c}else return null},_.hexadecimalIntegerAsNumber=function(n){var o=parseInt(this[n],16);return o>Number.MAX_SAFE_INTEGER?Infinity:o},_.decimalFloatingPoint=function(n){return parseFloat(this[n])},_.optionalFloat=function(n,o){var c=this[n];return c?parseFloat(c):o},_.enumeratedString=function(n){return this[n]},_.bool=function(n){return this[n]==="YES"},_.decimalResolution=function(n){var o=T.exec(this[n]);return o===null?void 0:{width:parseInt(o[1],10),height:parseInt(o[2],10)}},l.parseAttrList=function(n){var o,c={},v='"';for(e.lastIndex=0;(o=e.exec(n))!==null;){var f=o[2];f.indexOf(v)===0&&f.lastIndexOf(v)===f.length-1&&(f=f.slice(1,-1)),c[o[1]]=f}return c},l}()},"./src/utils/binary-search.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>e});var T={search:function(l,_){for(var r=0,n=l.length-1,o=null,c=null;r<=n;){o=(r+n)/2|0,c=l[o];var v=_(c);if(v>0)r=o+1;else if(v<0)n=o-1;else return c}return null}};const e=T},"./src/utils/buffer-helper.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{BufferHelper:()=>E});var T=i("./src/utils/logger.ts"),e={length:0,start:function(){return 0},end:function(){return 0}},E=function(){function l(){}return l.isBuffered=function(r,n){try{if(r){for(var o=l.getBuffered(r),c=0;c<o.length;c++)if(n>=o.start(c)&&n<=o.end(c))return!0}}catch(v){}return!1},l.bufferInfo=function(r,n,o){try{if(r){var c=l.getBuffered(r),v=[],f;for(f=0;f<c.length;f++)v.push({start:c.start(f),end:c.end(f)});return this.bufferedInfo(v,n,o)}}catch(y){}return{len:0,start:n,end:n,nextStart:void 0}},l.bufferedInfo=function(r,n,o){n=Math.max(0,n),r.sort(function(w,D){var A=w.start-D.start;return A||D.end-w.end});var c=[];if(o)for(var v=0;v<r.length;v++){var f=c.length;if(f){var y=c[f-1].end;r[v].start-y<o?r[v].end>y&&(c[f-1].end=r[v].end):c.push(r[v])}else c.push(r[v])}else c=r;for(var h=0,b,m=n,d=n,x=0;x<c.length;x++){var R=c[x].start,O=c[x].end;if(n+o>=R&&n<O)m=R,d=O,h=d-n;else if(n+o<R){b=R;break}}return{len:h,start:m||0,end:d||0,nextStart:b}},l.getBuffered=function(r){try{return r.buffered}catch(n){return T.logger.log("failed to get media.buffered",n),e}},l}()},"./src/utils/cea-608-parser.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{CaptionScreen:()=>x,Row:()=>d,default:()=>P});var T=i("./src/utils/logger.ts"),e={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},E=function(u){var k=u;return e.hasOwnProperty(u)&&(k=e[u]),String.fromCharCode(k)},l=15,_=100,r={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},n={17:2,18:4,21:6,22:8,23:10,19:13,20:15},o={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},c={25:2,26:4,29:6,30:8,31:10,27:13,28:15},v=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],f;(function(I){I[I.ERROR=0]="ERROR",I[I.TEXT=1]="TEXT",I[I.WARNING=2]="WARNING",I[I.INFO=2]="INFO",I[I.DEBUG=3]="DEBUG",I[I.DATA=3]="DATA"})(f||(f={}));var y=function(){function I(){this.time=null,this.verboseLevel=f.ERROR}var u=I.prototype;return u.log=function(g,a){if(this.verboseLevel>=g){var C=typeof a=="function"?a():a;T.logger.log(this.time+" ["+g+"] "+C)}},I}(),h=function(u){for(var k=[],g=0;g<u.length;g++)k.push(u[g].toString(16));return k},b=function(){function I(k,g,a,C,S){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=k||"white",this.underline=g||!1,this.italics=a||!1,this.background=C||"black",this.flash=S||!1}var u=I.prototype;return u.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},u.setStyles=function(g){for(var a=["foreground","underline","italics","background","flash"],C=0;C<a.length;C++){var S=a[C];g.hasOwnProperty(S)&&(this[S]=g[S])}},u.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},u.equals=function(g){return this.foreground===g.foreground&&this.underline===g.underline&&this.italics===g.italics&&this.background===g.background&&this.flash===g.flash},u.copy=function(g){this.foreground=g.foreground,this.underline=g.underline,this.italics=g.italics,this.background=g.background,this.flash=g.flash},u.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},I}(),m=function(){function I(k,g,a,C,S,p){this.uchar=void 0,this.penState=void 0,this.uchar=k||" ",this.penState=new b(g,a,C,S,p)}var u=I.prototype;return u.reset=function(){this.uchar=" ",this.penState.reset()},u.setChar=function(g,a){this.uchar=g,this.penState.copy(a)},u.setPenState=function(g){this.penState.copy(g)},u.equals=function(g){return this.uchar===g.uchar&&this.penState.equals(g.penState)},u.copy=function(g){this.uchar=g.uchar,this.penState.copy(g.penState)},u.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},I}(),d=function(){function I(k){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var g=0;g<_;g++)this.chars.push(new m);this.logger=k,this.pos=0,this.currPenState=new b}var u=I.prototype;return u.equals=function(g){for(var a=!0,C=0;C<_;C++)if(!this.chars[C].equals(g.chars[C])){a=!1;break}return a},u.copy=function(g){for(var a=0;a<_;a++)this.chars[a].copy(g.chars[a])},u.isEmpty=function(){for(var g=!0,a=0;a<_;a++)if(!this.chars[a].isEmpty()){g=!1;break}return g},u.setCursor=function(g){this.pos!==g&&(this.pos=g),this.pos<0?(this.logger.log(f.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>_&&(this.logger.log(f.DEBUG,"Too large cursor position "+this.pos),this.pos=_)},u.moveCursor=function(g){var a=this.pos+g;if(g>1)for(var C=this.pos+1;C<a+1;C++)this.chars[C].setPenState(this.currPenState);this.setCursor(a)},u.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},u.insertChar=function(g){var a=this;g>=144&&this.backSpace();var C=E(g);if(this.pos>=_){this.logger.log(f.ERROR,function(){return"Cannot insert "+g.toString(16)+" ("+C+") at position "+a.pos+". Skipping it!"});return}this.chars[this.pos].setChar(C,this.currPenState),this.moveCursor(1)},u.clearFromPos=function(g){var a;for(a=g;a<_;a++)this.chars[a].reset()},u.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},u.clearToEndOfRow=function(){this.clearFromPos(this.pos)},u.getTextString=function(){for(var g=[],a=!0,C=0;C<_;C++){var S=this.chars[C].uchar;S!==" "&&(a=!1),g.push(S)}return a?"":g.join("")},u.setPenStyles=function(g){this.currPenState.setStyles(g);var a=this.chars[this.pos];a.setPenState(this.currPenState)},I}(),x=function(){function I(k){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var g=0;g<l;g++)this.rows.push(new d(k));this.logger=k,this.currRow=l-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var u=I.prototype;return u.reset=function(){for(var g=0;g<l;g++)this.rows[g].clear();this.currRow=l-1},u.equals=function(g){for(var a=!0,C=0;C<l;C++)if(!this.rows[C].equals(g.rows[C])){a=!1;break}return a},u.copy=function(g){for(var a=0;a<l;a++)this.rows[a].copy(g.rows[a])},u.isEmpty=function(){for(var g=!0,a=0;a<l;a++)if(!this.rows[a].isEmpty()){g=!1;break}return g},u.backSpace=function(){var g=this.rows[this.currRow];g.backSpace()},u.clearToEndOfRow=function(){var g=this.rows[this.currRow];g.clearToEndOfRow()},u.insertChar=function(g){var a=this.rows[this.currRow];a.insertChar(g)},u.setPen=function(g){var a=this.rows[this.currRow];a.setPenStyles(g)},u.moveCursor=function(g){var a=this.rows[this.currRow];a.moveCursor(g)},u.setCursor=function(g){this.logger.log(f.INFO,"setCursor: "+g);var a=this.rows[this.currRow];a.setCursor(g)},u.setPAC=function(g){this.logger.log(f.INFO,function(){return"pacData = "+JSON.stringify(g)});var a=g.row-1;if(this.nrRollUpRows&&a<this.nrRollUpRows-1&&(a=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==a){for(var C=0;C<l;C++)this.rows[C].clear();var S=this.currRow+1-this.nrRollUpRows,p=this.lastOutputScreen;if(p){var U=p.rows[S].cueStartTime,z=this.logger.time;if(U&&z!==null&&U<z)for(var q=0;q<this.nrRollUpRows;q++)this.rows[a-this.nrRollUpRows+q+1].copy(p.rows[S+q])}}this.currRow=a;var $=this.rows[this.currRow];if(g.indent!==null){var re=g.indent,ce=Math.max(re-1,0);$.setCursor(g.indent),g.color=$.chars[ce].penState.foreground}var ne={foreground:g.color,underline:g.underline,italics:g.italics,background:"black",flash:!1};this.setPen(ne)},u.setBkgData=function(g){this.logger.log(f.INFO,function(){return"bkgData = "+JSON.stringify(g)}),this.backSpace(),this.setPen(g),this.insertChar(32)},u.setRollUpRows=function(g){this.nrRollUpRows=g},u.rollUp=function(){var g=this;if(this.nrRollUpRows===null){this.logger.log(f.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(f.TEXT,function(){return g.getDisplayText()});var a=this.currRow+1-this.nrRollUpRows,C=this.rows.splice(a,1)[0];C.clear(),this.rows.splice(this.currRow,0,C),this.logger.log(f.INFO,"Rolling up")},u.getDisplayText=function(g){g=g||!1;for(var a=[],C="",S=-1,p=0;p<l;p++){var U=this.rows[p].getTextString();U&&(S=p+1,g?a.push("Row "+S+": '"+U+"'"):a.push(U.trim()))}return a.length>0&&(g?C="["+a.join(" | ")+"]":C=a.join(`
|
|
|
`)),C},u.getTextAndFormat=function(){return this.rows},I}(),R=function(){function I(k,g,a){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=k,this.outputFilter=g,this.mode=null,this.verbose=0,this.displayedMemory=new x(a),this.nonDisplayedMemory=new x(a),this.lastOutputScreen=new x(a),this.currRollUpRow=this.displayedMemory.rows[l-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=a}var u=I.prototype;return u.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[l-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},u.getHandler=function(){return this.outputFilter},u.setHandler=function(g){this.outputFilter=g},u.setPAC=function(g){this.writeScreen.setPAC(g)},u.setBkgData=function(g){this.writeScreen.setBkgData(g)},u.setMode=function(g){if(g===this.mode)return;this.mode=g,this.logger.log(f.INFO,function(){return"MODE="+g}),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=g},u.insertChars=function(g){for(var a=this,C=0;C<g.length;C++)this.writeScreen.insertChar(g[C]);var S=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(f.INFO,function(){return S+": "+a.writeScreen.getDisplayText(!0)}),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(f.TEXT,function(){return"DISPLAYED: "+a.displayedMemory.getDisplayText(!0)}),this.outputDataUpdate())},u.ccRCL=function(){this.logger.log(f.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},u.ccBS=function(){if(this.logger.log(f.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},u.ccAOF=function(){},u.ccAON=function(){},u.ccDER=function(){this.logger.log(f.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},u.ccRU=function(g){this.logger.log(f.INFO,"RU("+g+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(g)},u.ccFON=function(){this.logger.log(f.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},u.ccRDC=function(){this.logger.log(f.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},u.ccTR=function(){this.logger.log(f.INFO,"TR"),this.setMode("MODE_TEXT")},u.ccRTD=function(){this.logger.log(f.INFO,"RTD"),this.setMode("MODE_TEXT")},u.ccEDM=function(){this.logger.log(f.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},u.ccCR=function(){this.logger.log(f.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},u.ccENM=function(){this.logger.log(f.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},u.ccEOC=function(){var g=this;if(this.logger.log(f.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var a=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=a,this.writeScreen=this.nonDisplayedMemory,this.logger.log(f.TEXT,function(){return"DISP: "+g.displayedMemory.getDisplayText()})}this.outputDataUpdate(!0)},u.ccTO=function(g){this.logger.log(f.INFO,"TO("+g+") - Tab Offset"),this.writeScreen.moveCursor(g)},u.ccMIDROW=function(g){var a={flash:!1};if(a.underline=g%2===1,a.italics=g>=46,a.italics)a.foreground="white";else{var C=Math.floor(g/2)-16,S=["white","green","blue","cyan","red","yellow","magenta"];a.foreground=S[C]}this.logger.log(f.INFO,"MIDROW: "+JSON.stringify(a)),this.writeScreen.setPen(a)},u.outputDataUpdate=function(g){g===void 0&&(g=!1);var a=this.logger.time;if(a===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=a:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,a,this.lastOutputScreen),g&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:a),this.lastOutputScreen.copy(this.displayedMemory))},u.cueSplitAtTime=function(g){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,g,this.displayedMemory),this.cueStartTime=g))},I}(),O=function(){function I(k,g,a){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var C=new y;this.channels=[null,new R(k,g,C),new R(k+1,a,C)],this.cmdHistory=A(),this.logger=C}var u=I.prototype;return u.getHandler=function(g){return this.channels[g].getHandler()},u.setHandler=function(g,a){this.channels[g].setHandler(a)},u.addData=function(g,a){var C,S,p,U=!1;this.logger.time=g;for(var z=0;z<a.length;z+=2){if(S=a[z]&127,p=a[z+1]&127,S===0&&p===0)continue;if(this.logger.log(f.DATA,"["+h([a[z],a[z+1]])+"] -> ("+h([S,p])+")"),C=this.parseCmd(S,p),C||(C=this.parseMidrow(S,p)),C||(C=this.parsePAC(S,p)),C||(C=this.parseBackgroundAttributes(S,p)),!C&&(U=this.parseChars(S,p),U)){var q=this.currentChannel;if(q&&q>0){var $=this.channels[q];$.insertChars(U)}else this.logger.log(f.WARNING,"No channel found yet. TEXT-MODE?")}!C&&!U&&this.logger.log(f.WARNING,"Couldn't parse cleaned data "+h([S,p])+" orig: "+h([a[z],a[z+1]]))}},u.parseCmd=function(g,a){var C=this.cmdHistory,S=(g===20||g===28||g===21||g===29)&&a>=32&&a<=47,p=(g===23||g===31)&&a>=33&&a<=35;if(!(S||p))return!1;if(D(g,a,C))return w(null,null,C),this.logger.log(f.DEBUG,"Repeated command ("+h([g,a])+") is dropped"),!0;var U=g===20||g===21||g===23?1:2,z=this.channels[U];return g===20||g===21||g===28||g===29?a===32?z.ccRCL():a===33?z.ccBS():a===34?z.ccAOF():a===35?z.ccAON():a===36?z.ccDER():a===37?z.ccRU(2):a===38?z.ccRU(3):a===39?z.ccRU(4):a===40?z.ccFON():a===41?z.ccRDC():a===42?z.ccTR():a===43?z.ccRTD():a===44?z.ccEDM():a===45?z.ccCR():a===46?z.ccENM():a===47&&z.ccEOC():z.ccTO(a-32),w(g,a,C),this.currentChannel=U,!0},u.parseMidrow=function(g,a){var C=0;if((g===17||g===25)&&a>=32&&a<=47){if(g===17?C=1:C=2,C!==this.currentChannel)return this.logger.log(f.ERROR,"Mismatch channel in midrow parsing"),!1;var S=this.channels[C];return S?(S.ccMIDROW(a),this.logger.log(f.DEBUG,"MIDROW ("+h([g,a])+")"),!0):!1}return!1},u.parsePAC=function(g,a){var C,S=this.cmdHistory,p=(g>=17&&g<=23||g>=25&&g<=31)&&a>=64&&a<=127,U=(g===16||g===24)&&a>=64&&a<=95;if(!(p||U))return!1;if(D(g,a,S))return w(null,null,S),!0;var z=g<=23?1:2;a>=64&&a<=95?C=z===1?r[g]:o[g]:C=z===1?n[g]:c[g];var q=this.channels[z];return q?(q.setPAC(this.interpretPAC(C,a)),w(g,a,S),this.currentChannel=z,!0):!1},u.interpretPAC=function(g,a){var C,S={color:null,italics:!1,indent:null,underline:!1,row:g};return a>95?C=a-96:C=a-64,S.underline=(C&1)===1,C<=13?S.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(C/2)]:C<=15?(S.italics=!0,S.color="white"):S.indent=Math.floor((C-16)/2)*4,S},u.parseChars=function(g,a){var C,S=null,p=null;if(g>=25?(C=2,p=g-8):(C=1,p=g),p>=17&&p<=19){var U;p===17?U=a+80:p===18?U=a+112:U=a+144,this.logger.log(f.INFO,"Special char '"+E(U)+"' in channel "+C),S=[U]}else g>=32&&g<=127&&(S=a===0?[g]:[g,a]);if(S){var z=h(S);this.logger.log(f.DEBUG,"Char codes = "+z.join(",")),w(g,a,this.cmdHistory)}return S},u.parseBackgroundAttributes=function(g,a){var C=(g===16||g===24)&&a>=32&&a<=47,S=(g===23||g===31)&&a>=45&&a<=47;if(!(C||S))return!1;var p,U={};g===16||g===24?(p=Math.floor((a-32)/2),U.background=v[p],a%2===1&&(U.background=U.background+"_semi")):a===45?U.background="transparent":(U.foreground="black",a===47&&(U.underline=!0));var z=g<=23?1:2,q=this.channels[z];return q.setBkgData(U),w(g,a,this.cmdHistory),!0},u.reset=function(){for(var g=0;g<Object.keys(this.channels).length;g++){var a=this.channels[g];a&&a.reset()}this.cmdHistory=A()},u.cueSplitAtTime=function(g){for(var a=0;a<this.channels.length;a++){var C=this.channels[a];C&&C.cueSplitAtTime(g)}},I}();function w(I,u,k){k.a=I,k.b=u}function D(I,u,k){return k.a===I&&k.b===u}function A(){return{a:null,b:null}}const P=O},"./src/utils/codecs.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{isCodecSupportedInMp4:()=>E,isCodecType:()=>e});var T={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,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,dva1:!0,dvav:!0,dvh1:!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 e(l,_){var r=T[_];return!!r&&r[l.slice(0,4)]===!0}function E(l,_){return MediaSource.isTypeSupported((_||"video")+'/mp4;codecs="'+l+'"')}},"./src/utils/cues.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>r});var T=i("./src/utils/vttparser.ts"),e=i("./src/utils/webvtt-parser.ts"),E=i("./src/utils/texttrack-utils.ts"),l=/\s/,_={newCue:function(o,c,v,f){for(var y=[],h,b,m,d,x,R=self.VTTCue||self.TextTrackCue,O=0;O<f.rows.length;O++)if(h=f.rows[O],m=!0,d=0,x="",!h.isEmpty()){for(var w=0;w<h.chars.length;w++)l.test(h.chars[w].uchar)&&m?d++:(x+=h.chars[w].uchar,m=!1);h.cueStartTime=c,c===v&&(v+=1e-4),d>=16?d--:d++;var D=(0,T.fixLineBreaks)(x.trim()),A=(0,e.generateCueId)(c,v,D);(!o||!o.cues||!o.cues.getCueById(A))&&(b=new R(c,v,D),b.id=A,b.line=O+1,b.align="left",b.position=10+Math.min(80,Math.floor(d*8/32)*10),y.push(b))}return o&&y.length&&(y.sort(function(P,I){return P.line==="auto"||I.line==="auto"?0:P.line>8&&I.line>8?I.line-P.line:P.line-I.line}),y.forEach(function(P){return(0,E.addCueToTrack)(o,P)})),y}};const r=_},"./src/utils/discontinuities.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{adjustSlidingStart:()=>o,alignMediaPlaylistByPDT:()=>y,alignPDT:()=>f,alignStream:()=>c,findDiscontinuousReferenceFrag:()=>r,findFirstFragWithCC:()=>l,shouldAlignOnDiscontinuities:()=>_});var T=i("./src/polyfills/number.ts"),e=i("./src/utils/logger.ts"),E=i("./src/controller/level-helper.ts");function l(h,b){for(var m=null,d=0,x=h.length;d<x;d++){var R=h[d];if(R&&R.cc===b){m=R;break}}return m}function _(h,b,m){return!!(b.details&&(m.endCC>m.startCC||h&&h.cc<m.startCC))}function r(h,b,m){m===void 0&&(m=0);var d=h.fragments,x=b.fragments;if(!x.length||!d.length){e.logger.log("No fragments to align");return}var R=l(d,x[0].cc);if(!R||R&&!R.startPTS){e.logger.log("No frag in previous level to align on");return}return R}function n(h,b){if(h){var m=h.start+b;h.start=h.startPTS=m,h.endPTS=m+h.duration}}function o(h,b){for(var m=b.fragments,d=0,x=m.length;d<x;d++)n(m[d],h);b.fragmentHint&&n(b.fragmentHint,h),b.alignedSliding=!0}function c(h,b,m){if(!b)return;v(h,m,b),!m.alignedSliding&&b.details&&f(m,b.details),!m.alignedSliding&&b.details&&!m.skippedSegments&&(0,E.adjustSliding)(b.details,m)}function v(h,b,m){if(_(h,m,b)){var d=r(m.details,b);d&&(0,T.isFiniteNumber)(d.start)&&(e.logger.log("Adjusting PTS using last level due to CC increase within current level "+b.url),o(d.start,b))}}function f(h,b){if(!b.fragments.length||!h.hasProgramDateTime||!b.hasProgramDateTime)return;var m=b.fragments[0].programDateTime,d=h.fragments[0].programDateTime,x=(d-m)/1e3+b.fragments[0].start;x&&(0,T.isFiniteNumber)(x)&&(e.logger.log("Adjusting PTS using programDateTime delta "+(d-m)+"ms, sliding:"+x.toFixed(3)+" "+h.url+" "),o(x,h))}function y(h,b){if(!h.hasProgramDateTime||!b.hasProgramDateTime)return;var m=h.fragments,d=b.fragments;if(!m.length||!d.length)return;var x=Math.round(d.length/2)-1,R=d[x],O=l(m,R.cc)||m[Math.round(m.length/2)-1],w=R.programDateTime,D=O.programDateTime;if(w===null||D===null)return;var A=(D-w)/1e3-(O.start-R.start);o(A,h)}},"./src/utils/ewma-bandwidth-estimator.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>E});var T=i("./src/utils/ewma.ts"),e=function(){function l(r,n,o){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=o,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new T.default(r),this.fast_=new T.default(n)}var _=l.prototype;return _.update=function(n,o){var c=this.slow_,v=this.fast_;this.slow_.halfLife!==n&&(this.slow_=new T.default(n,c.getEstimate(),c.getTotalWeight())),this.fast_.halfLife!==o&&(this.fast_=new T.default(o,v.getEstimate(),v.getTotalWeight()))},_.sample=function(n,o){n=Math.max(n,this.minDelayMs_);var c=8*o,v=n/1e3,f=c/v;this.fast_.sample(v,f),this.slow_.sample(v,f)},_.canEstimate=function(){var n=this.fast_;return n&&n.getTotalWeight()>=this.minWeight_},_.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},_.destroy=function(){},l}();const E=e},"./src/utils/ewma.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>e});var T=function(){function E(_,r,n){r===void 0&&(r=0),n===void 0&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=_,this.alpha_=_?Math.exp(Math.log(.5)/_):0,this.estimate_=r,this.totalWeight_=n}var l=E.prototype;return l.sample=function(r,n){var o=Math.pow(this.alpha_,r);this.estimate_=n*(1-o)+o*this.estimate_,this.totalWeight_+=r},l.getTotalWeight=function(){return this.totalWeight_},l.getEstimate=function(){if(this.alpha_){var r=1-Math.pow(this.alpha_,this.totalWeight_);if(r)return this.estimate_/r}return this.estimate_},E}();const e=T},"./src/utils/fetch-loader.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>x,fetchSupported:()=>y});var T=i("./src/polyfills/number.ts"),e=i("./src/loader/load-stats.ts"),E=i("./src/demux/chunk-cache.ts");function l(R,O){R.prototype=Object.create(O.prototype),R.prototype.constructor=R,c(R,O)}function _(R){var O=typeof Map=="function"?new Map:void 0;return _=function(D){if(D===null||!o(D))return D;if(typeof D!="function")throw new TypeError("Super expression must either be null or a function");if(typeof O!="undefined"){if(O.has(D))return O.get(D);O.set(D,A)}function A(){return r(D,arguments,v(this).constructor)}return A.prototype=Object.create(D.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),c(A,D)},_(R)}function r(R,O,w){return n()?r=Reflect.construct.bind():r=function(A,P,I){var u=[null];u.push.apply(u,P);var k=Function.bind.apply(A,u),g=new k;return I&&c(g,I.prototype),g},r.apply(null,arguments)}function n(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(R){return!1}}function o(R){return Function.toString.call(R).indexOf("[native code]")!==-1}function c(R,O){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(D,A){return D.__proto__=A,D},c(R,O)}function v(R){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(w){return w.__proto__||Object.getPrototypeOf(w)},v(R)}function f(){return f=Object.assign?Object.assign.bind():function(R){for(var O=1;O<arguments.length;O++){var w=arguments[O];for(var D in w)Object.prototype.hasOwnProperty.call(w,D)&&(R[D]=w[D])}return R},f.apply(this,arguments)}function y(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(R){}return!1}var h=function(){function R(w){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=w.fetchSetup||m,this.controller=new self.AbortController,this.stats=new e.LoadStats}var O=R.prototype;return O.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},O.abortInternal=function(){var D=this.response;(!D||!D.ok)&&(this.stats.aborted=!0,this.controller.abort())},O.abort=function(){var D;this.abortInternal(),(D=this.callbacks)!==null&&D!==void 0&&D.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},O.load=function(D,A,P){var I=this,u=this.stats;if(u.loading.start)throw new Error("Loader can only be used once.");u.loading.start=self.performance.now();var k=b(D,this.controller.signal),g=P.onProgress,a=D.responseType==="arraybuffer",C=a?"byteLength":"length";this.context=D,this.config=A,this.callbacks=P,this.request=this.fetchSetup(D,k),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){I.abortInternal(),P.onTimeout(u,D,I.response)},A.timeout),self.fetch(this.request).then(function(S){if(I.response=I.loader=S,!S.ok){var p=S.status,U=S.statusText;throw new d(U||"fetch, bad network response",p,S)}return u.loading.first=Math.max(self.performance.now(),u.loading.start),u.total=parseInt(S.headers.get("Content-Length")||"0"),g&&(0,T.isFiniteNumber)(A.highWaterMark)?I.loadProgressively(S,u,D,A.highWaterMark,g):a?S.arrayBuffer():S.text()}).then(function(S){var p=I.response;self.clearTimeout(I.requestTimeout),u.loading.end=Math.max(self.performance.now(),u.loading.first);var U=S[C];U&&(u.loaded=u.total=U);var z={url:p.url,data:S};g&&!(0,T.isFiniteNumber)(A.highWaterMark)&&g(u,D,S,p),P.onSuccess(z,u,D,p)}).catch(function(S){if(self.clearTimeout(I.requestTimeout),u.aborted)return;var p=S&&S.code||0,U=S?S.message:null;P.onError({code:p,text:U},D,S?S.details:null)})},O.getCacheAge=function(){var D=null;if(this.response){var A=this.response.headers.get("age");D=A?parseFloat(A):null}return D},O.loadProgressively=function(D,A,P,I,u){I===void 0&&(I=0);var k=new E.default,g=D.body.getReader(),a=function C(){return g.read().then(function(S){if(S.done)return k.dataLength&&u(A,P,k.flush(),D),Promise.resolve(new ArrayBuffer(0));var p=S.value,U=p.length;return A.loaded+=U,U<I||k.dataLength?(k.push(p),k.dataLength>=I&&u(A,P,k.flush(),D)):u(A,P,p,D),C()}).catch(function(){return Promise.reject()})};return a()},R}();function b(R,O){var w={method:"GET",mode:"cors",credentials:"same-origin",signal:O,headers:new self.Headers(f({},R.headers))};return R.rangeEnd&&w.headers.set("Range","bytes="+R.rangeStart+"-"+String(R.rangeEnd-1)),w}function m(R,O){return new self.Request(R.url,O)}var d=function(R){l(O,R);function O(w,D,A){var P;return P=R.call(this,w)||this,P.code=void 0,P.details=void 0,P.code=D,P.details=A,P}return O}(_(Error));const x=h},"./src/utils/hex.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>e});var T={hexDump:function(l){for(var _="",r=0;r<l.length;r++){var n=l[r].toString(16);n.length<2&&(n="0"+n),_+=n}return _}};const e=T},"./src/utils/imsc1-ttml-parser.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{IMSC1_CODEC:()=>o,parseIMSC1:()=>y});var T=i("./src/utils/mp4-tools.ts"),e=i("./src/utils/vttparser.ts"),E=i("./src/utils/vttcue.ts"),l=i("./src/demux/id3.ts"),_=i("./src/utils/timescale-conversion.ts"),r=i("./src/utils/webvtt-parser.ts");function n(){return n=Object.assign?Object.assign.bind():function(P){for(var I=1;I<arguments.length;I++){var u=arguments[I];for(var k in u)Object.prototype.hasOwnProperty.call(u,k)&&(P[k]=u[k])}return P},n.apply(this,arguments)}var o="stpp.ttml.im1t",c=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,v=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,f={left:"start",center:"center",right:"end",start:"start",end:"end"};function y(P,I,u,k,g){var a=(0,T.findBox)(new Uint8Array(P),["mdat"]);if(a.length===0){g(new Error("Could not parse IMSC1 mdat"));return}var C=a.map(function(p){return(0,l.utf8ArrayToStr)(p)}),S=(0,_.toTimescaleFromScale)(I,1,u);try{C.forEach(function(p){return k(h(p,S))})}catch(p){g(p)}}function h(P,I){var u=new DOMParser,k=u.parseFromString(P,"text/xml"),g=k.getElementsByTagName("tt")[0];if(!g)throw new Error("Invalid ttml");var a={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},C=Object.keys(a).reduce(function(q,$){return q[$]=g.getAttribute("ttp:"+$)||a[$],q},{}),S=g.getAttribute("xml:space")!=="preserve",p=m(b(g,"styling","style")),U=m(b(g,"layout","region")),z=b(g,"body","[begin]");return[].map.call(z,function(q){var $=d(q,S);if(!$||!q.hasAttribute("begin"))return null;var re=w(q.getAttribute("begin"),C),ce=w(q.getAttribute("dur"),C),ne=w(q.getAttribute("end"),C);if(re===null)throw O(q);if(ne===null){if(ce===null)throw O(q);ne=re+ce}var me=new E.default(re-I,ne-I,$);me.id=(0,r.generateCueId)(me.startTime,me.endTime,me.text);var be=U[q.getAttribute("region")],he=p[q.getAttribute("style")],se=x(be,he,p),_e=se.textAlign;if(_e){var De=f[_e];De&&(me.lineAlign=De),me.align=_e}return n(me,se),me}).filter(function(q){return q!==null})}function b(P,I,u){var k=P.getElementsByTagName(I)[0];return k?[].slice.call(k.querySelectorAll(u)):[]}function m(P){return P.reduce(function(I,u){var k=u.getAttribute("xml:id");return k&&(I[k]=u),I},{})}function d(P,I){return[].slice.call(P.childNodes).reduce(function(u,k,g){var a;return k.nodeName==="br"&&g?u+`
|
|
|
`:(a=k.childNodes)!==null&&a!==void 0&&a.length?d(k,I):I?u+k.textContent.trim().replace(/\s+/g," "):u+k.textContent},"")}function x(P,I,u){var k="http://www.w3.org/ns/ttml#styling",g=null,a=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],C=P!=null&&P.hasAttribute("style")?P.getAttribute("style"):null;return C&&u.hasOwnProperty(C)&&(g=u[C]),a.reduce(function(S,p){var U=R(I,k,p)||R(P,k,p)||R(g,k,p);return U&&(S[p]=U),S},{})}function R(P,I,u){return P&&P.hasAttributeNS(I,u)?P.getAttributeNS(I,u):null}function O(P){return new Error("Could not parse ttml timestamp "+P)}function w(P,I){if(!P)return null;var u=(0,e.parseTimeStamp)(P);return u===null&&(c.test(P)?u=D(P,I):v.test(P)&&(u=A(P,I))),u}function D(P,I){var u=c.exec(P),k=(u[4]|0)+(u[5]|0)/I.subFrameRate;return(u[1]|0)*3600+(u[2]|0)*60+(u[3]|0)+k/I.frameRate}function A(P,I){var u=v.exec(P),k=Number(u[1]),g=u[2];switch(g){case"h":return k*3600;case"m":return k*60;case"ms":return k*1e3;case"f":return k/I.frameRate;case"t":return k/I.tickRate}return k}},"./src/utils/keysystem-util.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{changeEndianness:()=>E,convertDataUriToArrayBytes:()=>l,strToUtf8array:()=>_});var T=i("./src/utils/numeric-encoding-utils.ts");function e(r){var n=_(r).subarray(0,16),o=new Uint8Array(16);return o.set(n,16-n.length),o}function E(r){var n=function(c,v,f){var y=c[v];c[v]=c[f],c[f]=y};n(r,0,3),n(r,1,2),n(r,4,5),n(r,6,7)}function l(r){var n=r.split(":"),o=null;if(n[0]==="data"&&n.length===2){var c=n[1].split(";"),v=c[c.length-1].split(",");if(v.length===2){var f=v[0]==="base64",y=v[1];f?(c.splice(-1,1),o=(0,T.base64Decode)(y)):o=e(y)}}return o}function _(r){return Uint8Array.from(unescape(encodeURIComponent(r)),function(n){return n.charCodeAt(0)})}},"./src/utils/logger.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{enableLogs:()=>r,logger:()=>n});var T=function(){},e={trace:T,debug:T,log:T,warn:T,info:T,error:T},E=e;function l(o){var c=self.console[o];return c?c.bind(self.console,"["+o+"] >"):T}function _(o){for(var c=arguments.length,v=new Array(c>1?c-1:0),f=1;f<c;f++)v[f-1]=arguments[f];v.forEach(function(y){E[y]=o[y]?o[y].bind(o):l(y)})}function r(o,c){if(self.console&&o===!0||typeof o=="object"){_(o,"debug","log","info","warn","error");try{E.log('Debug logs enabled for "'+c+'"')}catch(v){E=e}}else E=e}var n=E},"./src/utils/mediakeys-helper.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{KeySystemFormats:()=>e,KeySystemIds:()=>l,KeySystems:()=>T,getKeySystemsForConfig:()=>n,getSupportedMediaKeySystemConfigurations:()=>c,keySystemDomainToKeySystemFormat:()=>r,keySystemFormatToKeySystemDomain:()=>E,keySystemIdToKeySystemDomain:()=>_,requestMediaKeySystemAccess:()=>o});var T;(function(f){f.CLEARKEY="org.w3.clearkey",f.FAIRPLAY="com.apple.fps",f.PLAYREADY="com.microsoft.playready",f.WIDEVINE="com.widevine.alpha"})(T||(T={}));var e;(function(f){f.CLEARKEY="org.w3.clearkey",f.FAIRPLAY="com.apple.streamingkeydelivery",f.PLAYREADY="com.microsoft.playready",f.WIDEVINE="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"})(e||(e={}));function E(f){switch(f){case e.FAIRPLAY:return T.FAIRPLAY;case e.PLAYREADY:return T.PLAYREADY;case e.WIDEVINE:return T.WIDEVINE;case e.CLEARKEY:return T.CLEARKEY}}var l;(function(f){f.WIDEVINE="edef8ba979d64acea3c827dcd51d21ed"})(l||(l={}));function _(f){if(f===l.WIDEVINE)return T.WIDEVINE}function r(f){switch(f){case T.FAIRPLAY:return e.FAIRPLAY;case T.PLAYREADY:return e.PLAYREADY;case T.WIDEVINE:return e.WIDEVINE;case T.CLEARKEY:return e.CLEARKEY}}function n(f){var y=f.drmSystems,h=f.widevineLicenseUrl,b=y?[T.FAIRPLAY,T.WIDEVINE,T.PLAYREADY,T.CLEARKEY].filter(function(m){return!!y[m]}):[];return!b[T.WIDEVINE]&&h&&b.push(T.WIDEVINE),b}var o=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function c(f,y,h,b){var m;switch(f){case T.FAIRPLAY:m=["cenc","sinf"];break;case T.WIDEVINE:case T.PLAYREADY:m=["cenc"];break;case T.CLEARKEY:m=["cenc","keyids"];break;default:throw new Error("Unknown key-system: "+f)}return v(m,y,h,b)}function v(f,y,h,b){var m={initDataTypes:f,persistentState:b.persistentState||"not-allowed",distinctiveIdentifier:b.distinctiveIdentifier||"not-allowed",sessionTypes:b.sessionTypes||[b.sessionType||"temporary"],audioCapabilities:y.map(function(d){return{contentType:'audio/mp4; codecs="'+d+'"',robustness:b.audioRobustness||"",encryptionScheme:b.audioEncryptionScheme||null}}),videoCapabilities:h.map(function(d){return{contentType:'video/mp4; codecs="'+d+'"',robustness:b.videoRobustness||"",encryptionScheme:b.videoEncryptionScheme||null}})};return[m]}},"./src/utils/mediasource-helper.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{getMediaSource:()=>T});function T(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{RemuxerTrackIdConfig:()=>o,appendUint8Array:()=>I,bin2str:()=>c,computeRawDurationFromSamples:()=>D,discardEPB:()=>C,findBox:()=>b,getDuration:()=>w,getStartDTS:()=>O,mp4Box:()=>p,mp4pssh:()=>U,offsetStartDTS:()=>A,parseEmsg:()=>S,parseInitSegment:()=>d,parsePssh:()=>z,parseSEIMessageFromNALu:()=>a,parseSamples:()=>u,parseSegmentIndex:()=>m,parseSinf:()=>R,patchEncyptionData:()=>x,readSint32:()=>y,readUint16:()=>v,readUint32:()=>f,segmentValidRange:()=>P,writeUint32:()=>h});var T=i("./src/loader/fragment.ts"),e=i("./src/utils/typed-array.ts"),E=i("./src/demux/id3.ts"),l=i("./src/utils/logger.ts"),_=i("./src/utils/hex.ts"),r=Math.pow(2,32)-1,n=[].push,o={video:1,audio:2,id3:3,text:4};function c(q){return String.fromCharCode.apply(null,q)}function v(q,$){var re=q[$]<<8|q[$+1];return re<0?65536+re:re}function f(q,$){var re=y(q,$);return re<0?4294967296+re:re}function y(q,$){return q[$]<<24|q[$+1]<<16|q[$+2]<<8|q[$+3]}function h(q,$,re){q[$]=re>>24,q[$+1]=re>>16&255,q[$+2]=re>>8&255,q[$+3]=re&255}function b(q,$){var re=[];if(!$.length)return re;for(var ce=q.byteLength,ne=0;ne<ce;){var me=f(q,ne),be=c(q.subarray(ne+4,ne+8)),he=me>1?ne+me:ce;if(be===$[0])if($.length===1)re.push(q.subarray(ne+8,he));else{var se=b(q.subarray(ne+8,he),$.slice(1));se.length&&n.apply(re,se)}ne=he}return re}function m(q){var $=[],re=q[0],ce=8,ne=f(q,ce);ce+=4;var me=0,be=0;re===0?ce+=8:ce+=16,ce+=2;var he=q.length+be,se=v(q,ce);ce+=2;for(var _e=0;_e<se;_e++){var De=ce,ge=f(q,De);De+=4;var fe=ge&2147483647,Ce=(ge&2147483648)>>>31;if(Ce===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ae=f(q,De);De+=4,$.push({referenceSize:fe,subsegmentDuration:ae,info:{duration:ae/ne,start:he,end:he+fe-1}}),he+=fe,De+=4,ce=De}return{earliestPresentationTime:me,timescale:ne,version:re,referencesCount:se,references:$}}function d(q){for(var $=[],re=b(q,["moov","trak"]),ce=0;ce<re.length;ce++){var ne=re[ce],me=b(ne,["tkhd"])[0];if(me){var be=me[0],he=be===0?12:20,se=f(me,he),_e=b(ne,["mdia","mdhd"])[0];if(_e){be=_e[0],he=be===0?12:20;var De=f(_e,he),ge=b(ne,["mdia","hdlr"])[0];if(ge){var fe=c(ge.subarray(8,12)),Ce={soun:T.ElementaryStreamTypes.AUDIO,vide:T.ElementaryStreamTypes.VIDEO}[fe];if(Ce){var ae=b(ne,["mdia","minf","stbl","stsd"])[0],Q=void 0;ae&&(Q=c(ae.subarray(12,16))),$[se]={timescale:De,type:Ce},$[Ce]={timescale:De,id:se,codec:Q}}}}}}var J=b(q,["moov","mvex","trex"]);return J.forEach(function(Z){var pe=f(Z,4),le=$[pe];le&&(le.default={duration:f(Z,12),flags:f(Z,20)})}),$}function x(q,$){if(!q||!$)return q;var re=$.keyId;if(re&&$.isCommonEncryption){var ce=b(q,["moov","trak"]);ce.forEach(function(ne){var me=b(ne,["mdia","minf","stbl","stsd"])[0],be=me.subarray(8),he=b(be,["enca"]),se=he.length>0;se||(he=b(be,["encv"])),he.forEach(function(_e){var De=se?_e.subarray(28):_e.subarray(78),ge=b(De,["sinf"]);ge.forEach(function(fe){var Ce=R(fe);if(Ce){var ae=Ce.subarray(8,24);ae.some(function(Q){return Q!==0})||(l.logger.log("[eme] Patching keyId in 'enc"+(se?"a":"v")+">sinf>>tenc' box: "+_.default.hexDump(ae)+" -> "+_.default.hexDump(re)),Ce.set(re,8))}})})})}return q}function R(q){var $=b(q,["schm"])[0];if($){var re=c($.subarray(4,8));if(re==="cbcs"||re==="cenc")return b(q,["schi","tenc"])[0]}return l.logger.error("[eme] missing 'schm' box"),null}function O(q,$){return b($,["moof","traf"]).reduce(function(re,ce){var ne=b(ce,["tfdt"])[0],me=ne[0],be=b(ce,["tfhd"]).reduce(function(he,se){var _e=f(se,4),De=q[_e];if(De){var ge=f(ne,4);me===1&&(ge*=Math.pow(2,32),ge+=f(ne,8));var fe=De.timescale||9e4,Ce=ge/fe;if(isFinite(Ce)&&(he===null||Ce<he))return Ce}return he},null);return be!==null&&isFinite(be)&&(re===null||be<re)?be:re},null)||0}function w(q,$){for(var re=0,ce=0,ne=0,me=b(q,["moof","traf"]),be=0;be<me.length;be++){var he=me[be],se=b(he,["tfhd"])[0],_e=f(se,4),De=$[_e];if(!De)continue;var ge=De.default,fe=f(se,0)|(ge==null?void 0:ge.flags),Ce=ge==null?void 0:ge.duration;fe&8&&(fe&2?Ce=f(se,12):Ce=f(se,8));for(var ae=De.timescale||9e4,Q=b(he,["trun"]),J=0;J<Q.length;J++){if(re=D(Q[J]),!re&&Ce){var Z=f(Q[J],4);re=Ce*Z}De.type===T.ElementaryStreamTypes.VIDEO?ce+=re/ae:De.type===T.ElementaryStreamTypes.AUDIO&&(ne+=re/ae)}}if(ce===0&&ne===0){for(var pe=0,le=b(q,["sidx"]),ye=0;ye<le.length;ye++){var Te=m(le[ye]);Te!=null&&Te.references&&(pe+=Te.references.reduce(function(Pe,He){return Pe+He.info.duration||0},0))}return pe}return ce||ne}function D(q){var $=f(q,0),re=8;$&1&&(re+=4),$&4&&(re+=4);for(var ce=0,ne=f(q,4),me=0;me<ne;me++){if($&256){var be=f(q,re);ce+=be,re+=4}$&512&&(re+=4),$&1024&&(re+=4),$&2048&&(re+=4)}return ce}function A(q,$,re){b($,["moof","traf"]).forEach(function(ce){b(ce,["tfhd"]).forEach(function(ne){var me=f(ne,4),be=q[me];if(!be)return;var he=be.timescale||9e4;b(ce,["tfdt"]).forEach(function(se){var _e=se[0],De=f(se,4);if(_e===0)De-=re*he,De=Math.max(De,0),h(se,4,De);else{De*=Math.pow(2,32),De+=f(se,8),De-=re*he,De=Math.max(De,0);var ge=Math.floor(De/(r+1)),fe=Math.floor(De%(r+1));h(se,4,ge),h(se,8,fe)}})})})}function P(q){var $={valid:null,remainder:null},re=b(q,["moof"]);if(re){if(re.length<2)return $.remainder=q,$}else return $;var ce=re[re.length-1];return $.valid=(0,e.sliceUint8)(q,0,ce.byteOffset-8),$.remainder=(0,e.sliceUint8)(q,ce.byteOffset-8),$}function I(q,$){var re=new Uint8Array(q.length+$.length);return re.set(q),re.set($,q.length),re}function u(q,$){var re=[],ce=$.samples,ne=$.timescale,me=$.id,be=!1,he=b(ce,["moof"]);return he.map(function(se){var _e=se.byteOffset-8,De=b(se,["traf"]);De.map(function(ge){var fe=b(ge,["tfdt"]).map(function(Ce){var ae=Ce[0],Q=f(Ce,4);return ae===1&&(Q*=Math.pow(2,32),Q+=f(Ce,8)),Q/ne})[0];return fe!==void 0&&(q=fe),b(ge,["tfhd"]).map(function(Ce){var ae=f(Ce,4),Q=f(Ce,0)&16777215,J=(Q&1)!==0,Z=(Q&2)!==0,pe=(Q&8)!==0,le=0,ye=(Q&16)!==0,Te=0,Pe=(Q&32)!==0,He=8;ae===me&&(J&&(He+=8),Z&&(He+=4),pe&&(le=f(Ce,He),He+=4),ye&&(Te=f(Ce,He),He+=4),Pe&&(He+=4),$.type==="video"&&(be=k($.codec)),b(ge,["trun"]).map(function(Oe){var Ue=Oe[0],je=f(Oe,0)&16777215,Ve=(je&1)!==0,Re=0,Xe=(je&4)!==0,Qe=(je&256)!==0,We=0,ze=(je&512)!==0,Me=0,Ie=(je&1024)!==0,Be=(je&2048)!==0,we=0,Ae=f(Oe,4),ke=8;Ve&&(Re=f(Oe,ke),ke+=4),Xe&&(ke+=4);for(var Le=Re+_e,Ke=0;Ke<Ae;Ke++){if(Qe?(We=f(Oe,ke),ke+=4):We=le,ze?(Me=f(Oe,ke),ke+=4):Me=Te,Ie&&(ke+=4),Be&&(Ue===0?we=f(Oe,ke):we=y(Oe,ke),ke+=4),$.type===T.ElementaryStreamTypes.VIDEO)for(var Ze=0;Ze<Me;){var Ne=f(ce,Le);if(Le+=4,g(be,ce[Le])){var $e=ce.subarray(Le,Le+Ne);a($e,be?2:1,q+we/ne,re)}Le+=Ne,Ze+=Ne+4}q+=We/ne}}))})})}),re}function k(q){if(!q)return!1;var $=q.indexOf("."),re=$<0?q:q.substring(0,$);return re==="hvc1"||re==="hev1"||re==="dvh1"||re==="dvhe"}function g(q,$){if(q){var re=$>>1&63;return re===39||re===40}else{var ce=$&31;return ce===6}}function a(q,$,re,ce){var ne=C(q),me=0;me+=$;for(var be=0,he=0,se=!1,_e=0;me<ne.length;){be=0;do{if(me>=ne.length)break;_e=ne[me++],be+=_e}while(_e===255);he=0;do{if(me>=ne.length)break;_e=ne[me++],he+=_e}while(_e===255);var De=ne.length-me;if(!se&&be===4&&me<ne.length){se=!0;var ge=ne[me++];if(ge===181){var fe=v(ne,me);if(me+=2,fe===49){var Ce=f(ne,me);if(me+=4,Ce===1195456820){var ae=ne[me++];if(ae===3){var Q=ne[me++],J=31&Q,Z=64&Q,pe=Z?2+J*3:0,le=new Uint8Array(pe);if(Z){le[0]=Q;for(var ye=1;ye<pe;ye++)le[ye]=ne[me++]}ce.push({type:ae,payloadType:be,pts:re,bytes:le})}}}}}else if(be===5&&he<De){if(se=!0,he>16){for(var Te=[],Pe=0;Pe<16;Pe++){var He=ne[me++].toString(16);Te.push(He.length==1?"0"+He:He),(Pe===3||Pe===5||Pe===7||Pe===9)&&Te.push("-")}for(var Oe=he-16,Ue=new Uint8Array(Oe),je=0;je<Oe;je++)Ue[je]=ne[me++];ce.push({payloadType:be,pts:re,uuid:Te.join(""),userData:(0,E.utf8ArrayToStr)(Ue),userDataBytes:Ue})}}else if(he<De)me+=he;else if(he>De)break}}function C(q){for(var $=q.byteLength,re=[],ce=1;ce<$-2;)q[ce]===0&&q[ce+1]===0&&q[ce+2]===3?(re.push(ce+2),ce+=2):ce++;if(re.length===0)return q;var ne=$-re.length,me=new Uint8Array(ne),be=0;for(ce=0;ce<ne;be++,ce++)be===re[0]&&(be++,re.shift()),me[ce]=q[be];return me}function S(q){var $=q[0],re="",ce="",ne=0,me=0,be=0,he=0,se=0,_e=0;if($===0){for(;c(q.subarray(_e,_e+1))!=="\0";)re+=c(q.subarray(_e,_e+1)),_e+=1;for(re+=c(q.subarray(_e,_e+1)),_e+=1;c(q.subarray(_e,_e+1))!=="\0";)ce+=c(q.subarray(_e,_e+1)),_e+=1;ce+=c(q.subarray(_e,_e+1)),_e+=1,ne=f(q,12),me=f(q,16),he=f(q,20),se=f(q,24),_e=28}else if($===1){_e+=4,ne=f(q,_e),_e+=4;var De=f(q,_e);_e+=4;var ge=f(q,_e);for(_e+=4,be=Math.pow(2,32)*De+ge,Number.isSafeInteger(be)||(be=Number.MAX_SAFE_INTEGER,console.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),he=f(q,_e),_e+=4,se=f(q,_e),_e+=4;c(q.subarray(_e,_e+1))!=="\0";)re+=c(q.subarray(_e,_e+1)),_e+=1;for(re+=c(q.subarray(_e,_e+1)),_e+=1;c(q.subarray(_e,_e+1))!=="\0";)ce+=c(q.subarray(_e,_e+1)),_e+=1;ce+=c(q.subarray(_e,_e+1)),_e+=1}var fe=q.subarray(_e,q.byteLength);return{schemeIdUri:re,value:ce,timeScale:ne,presentationTime:be,presentationTimeDelta:me,eventDuration:he,id:se,payload:fe}}function p(q){for(var $=arguments.length,re=new Array($>1?$-1:0),ce=1;ce<$;ce++)re[ce-1]=arguments[ce];for(var ne=re.length,me=8,be=ne;be--;)me+=re[be].byteLength;var he=new Uint8Array(me);for(he[0]=me>>24&255,he[1]=me>>16&255,he[2]=me>>8&255,he[3]=me&255,he.set(q,4),be=0,me=8;be<ne;be++)he.set(re[be],me),me+=re[be].byteLength;return he}function U(q,$,re){if(q.byteLength!==16)throw new RangeError("Invalid system id");var ce,ne;if($){ce=1,ne=new Uint8Array($.length*16);for(var me=0;me<$.length;me++){var be=$[me];if(be.byteLength!==16)throw new RangeError("Invalid key");ne.set(be,me*16)}}else ce=0,ne=new Uint8Array;var he;ce>0?(he=new Uint8Array(4),$.length>0&&new DataView(he.buffer).setUint32(0,$.length,!1)):he=new Uint8Array;var se=new Uint8Array(4);return re&&re.byteLength>0&&new DataView(se.buffer).setUint32(0,re.byteLength,!1),p([112,115,115,104],new Uint8Array([ce,0,0,0]),q,he,ne,se,re||new Uint8Array)}function z(q){if(!(q instanceof ArrayBuffer)||q.byteLength<32)return null;var $={version:0,systemId:"",kids:null,data:null},re=new DataView(q),ce=re.getUint32(0);if(q.byteLength!==ce&&ce>44)return null;var ne=re.getUint32(4);if(ne!==1886614376)return null;if($.version=re.getUint32(8)>>>24,$.version>1)return null;$.systemId=_.default.hexDump(new Uint8Array(q,12,16));var me=re.getUint32(28);if($.version===0){if(ce-32<me)return null;$.data=new Uint8Array(q,32,me)}else if($.version===1){$.kids=[];for(var be=0;be<me;be++)$.kids.push(new Uint8Array(q,32+be*16,16))}return $}},"./src/utils/numeric-encoding-utils.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{base64Decode:()=>r,base64DecodeToStr:()=>E,base64Encode:()=>l,base64ToBase64Url:()=>T,base64UrlEncode:()=>_,strToBase64Encode:()=>e});function T(n){return n.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function e(n){return btoa(n)}function E(n){return atob(n)}function l(n){return btoa(String.fromCharCode.apply(String,n))}function _(n){return T(l(n))}function r(n){return Uint8Array.from(atob(n),function(o){return o.charCodeAt(0)})}},"./src/utils/output-filter.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>T});var T=function(){function e(l,_){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=l,this.trackName=_}var E=e.prototype;return E.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},E.newCue=function(_,r,n){(this.startTime===null||this.startTime>_)&&(this.startTime=_),this.endTime=r,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},E.reset=function(){this.cueRanges=[],this.startTime=null},e}()},"./src/utils/texttrack-utils.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{addCueToTrack:()=>E,clearCurrentCues:()=>l,getCuesInRange:()=>n,removeCuesInRange:()=>_,sendAddTrackEvent:()=>e});var T=i("./src/utils/logger.ts");function e(o,c){var v;try{v=new Event("addtrack")}catch(f){v=document.createEvent("Event"),v.initEvent("addtrack",!1,!1)}v.track=o,c.dispatchEvent(v)}function E(o,c){var v=o.mode;if(v==="disabled"&&(o.mode="hidden"),o.cues&&!o.cues.getCueById(c.id))try{if(o.addCue(c),!o.cues.getCueById(c.id))throw new Error("addCue is failed for: "+c)}catch(y){T.logger.debug("[texttrack-utils]: "+y);var f=new self.TextTrackCue(c.startTime,c.endTime,c.text);f.id=c.id,o.addCue(f)}v==="disabled"&&(o.mode=v)}function l(o){var c=o.mode;if(c==="disabled"&&(o.mode="hidden"),o.cues)for(var v=o.cues.length;v--;)o.removeCue(o.cues[v]);c==="disabled"&&(o.mode=c)}function _(o,c,v,f){var y=o.mode;if(y==="disabled"&&(o.mode="hidden"),o.cues&&o.cues.length>0)for(var h=n(o.cues,c,v),b=0;b<h.length;b++)(!f||f(h[b]))&&o.removeCue(h[b]);y==="disabled"&&(o.mode=y)}function r(o,c){if(c<o[0].startTime)return 0;var v=o.length-1;if(c>o[v].endTime)return-1;for(var f=0,y=v;f<=y;){var h=Math.floor((y+f)/2);if(c<o[h].startTime)y=h-1;else if(c>o[h].startTime&&f<v)f=h+1;else return h}return o[f].startTime-c<c-o[y].startTime?f:y}function n(o,c,v){var f=[],y=r(o,c);if(y>-1)for(var h=y,b=o.length;h<b;h++){var m=o[h];if(m.startTime>=c&&m.endTime<=v)f.push(m);else if(m.startTime>v)return f}return f}},"./src/utils/time-ranges.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>e});var T={toString:function(l){for(var _="",r=l.length,n=0;n<r;n++)_+="["+l.start(n).toFixed(3)+"-"+l.end(n).toFixed(3)+"]";return _}};const e=T},"./src/utils/timescale-conversion.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{toMpegTsClockFromTimescale:()=>_,toMsFromMpegTsClock:()=>l,toTimescaleFromBase:()=>e,toTimescaleFromScale:()=>E});var T=9e4;function e(r,n,o,c){o===void 0&&(o=1),c===void 0&&(c=!1);var v=r*n*o;return c?Math.round(v):v}function E(r,n,o,c){return o===void 0&&(o=1),c===void 0&&(c=!1),e(r,n,1/o,c)}function l(r,n){return n===void 0&&(n=!1),e(r,1e3,1/T,n)}function _(r,n){return n===void 0&&(n=1),e(r,T,1/n)}},"./src/utils/typed-array.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{sliceUint8:()=>T});function T(e,E,l){return Uint8Array.prototype.slice?e.slice(E,l):new Uint8Array(Array.prototype.slice.call(e,E,l))}},"./src/utils/vttcue.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>T});const T=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var e=["","lr","rl"],E=["start","middle","end","left","right"];function l(c,v){if(typeof v!="string")return!1;if(!Array.isArray(c))return!1;var f=v.toLowerCase();return~c.indexOf(f)?f:!1}function _(c){return l(e,c)}function r(c){return l(E,c)}function n(c){for(var v=arguments.length,f=new Array(v>1?v-1:0),y=1;y<v;y++)f[y-1]=arguments[y];for(var h=1;h<arguments.length;h++){var b=arguments[h];for(var m in b)c[m]=b[m]}return c}function o(c,v,f){var y=this,h={enumerable:!0};y.hasBeenReset=!1;var b="",m=!1,d=c,x=v,R=f,O=null,w="",D=!0,A="auto",P="start",I=50,u="middle",k=50,g="middle";Object.defineProperty(y,"id",n({},h,{get:function(){return b},set:function(C){b=""+C}})),Object.defineProperty(y,"pauseOnExit",n({},h,{get:function(){return m},set:function(C){m=!!C}})),Object.defineProperty(y,"startTime",n({},h,{get:function(){return d},set:function(C){if(typeof C!="number")throw new TypeError("Start time must be set to a number.");d=C,this.hasBeenReset=!0}})),Object.defineProperty(y,"endTime",n({},h,{get:function(){return x},set:function(C){if(typeof C!="number")throw new TypeError("End time must be set to a number.");x=C,this.hasBeenReset=!0}})),Object.defineProperty(y,"text",n({},h,{get:function(){return R},set:function(C){R=""+C,this.hasBeenReset=!0}})),Object.defineProperty(y,"region",n({},h,{get:function(){return O},set:function(C){O=C,this.hasBeenReset=!0}})),Object.defineProperty(y,"vertical",n({},h,{get:function(){return w},set:function(C){var S=_(C);if(S===!1)throw new SyntaxError("An invalid or illegal string was specified.");w=S,this.hasBeenReset=!0}})),Object.defineProperty(y,"snapToLines",n({},h,{get:function(){return D},set:function(C){D=!!C,this.hasBeenReset=!0}})),Object.defineProperty(y,"line",n({},h,{get:function(){return A},set:function(C){if(typeof C!="number"&&C!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");A=C,this.hasBeenReset=!0}})),Object.defineProperty(y,"lineAlign",n({},h,{get:function(){return P},set:function(C){var S=r(C);if(!S)throw new SyntaxError("An invalid or illegal string was specified.");P=S,this.hasBeenReset=!0}})),Object.defineProperty(y,"position",n({},h,{get:function(){return I},set:function(C){if(C<0||C>100)throw new Error("Position must be between 0 and 100.");I=C,this.hasBeenReset=!0}})),Object.defineProperty(y,"positionAlign",n({},h,{get:function(){return u},set:function(C){var S=r(C);if(!S)throw new SyntaxError("An invalid or illegal string was specified.");u=S,this.hasBeenReset=!0}})),Object.defineProperty(y,"size",n({},h,{get:function(){return k},set:function(C){if(C<0||C>100)throw new Error("Size must be between 0 and 100.");k=C,this.hasBeenReset=!0}})),Object.defineProperty(y,"align",n({},h,{get:function(){return g},set:function(C){var S=r(C);if(!S)throw new SyntaxError("An invalid or illegal string was specified.");g=S,this.hasBeenReset=!0}})),y.displayState=void 0}return o.prototype.getCueAsHTML=function(){var c=self.WebVTT;return c.convertCueToDOMTree(self,this.text)},o}()},"./src/utils/vttparser.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{VTTParser:()=>v,fixLineBreaks:()=>c,parseTimeStamp:()=>E});var T=i("./src/utils/vttcue.ts"),e=function(){function f(){}var y=f.prototype;return y.decode=function(b,m){if(!b)return"";if(typeof b!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(b))},f}();function E(f){function y(b,m,d,x){return(b|0)*3600+(m|0)*60+(d|0)+parseFloat(x||0)}var h=f.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return h?parseFloat(h[2])>59?y(h[2],h[3],0,h[4]):y(h[1],h[2],h[3],h[4]):null}var l=function(){function f(){this.values=Object.create(null)}var y=f.prototype;return y.set=function(b,m){!this.get(b)&&m!==""&&(this.values[b]=m)},y.get=function(b,m,d){return d?this.has(b)?this.values[b]:m[d]:this.has(b)?this.values[b]:m},y.has=function(b){return b in this.values},y.alt=function(b,m,d){for(var x=0;x<d.length;++x)if(m===d[x]){this.set(b,m);break}},y.integer=function(b,m){/^-?\d+$/.test(m)&&this.set(b,parseInt(m,10))},y.percent=function(b,m){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(m)){var d=parseFloat(m);if(d>=0&&d<=100)return this.set(b,d),!0}return!1},f}();function _(f,y,h,b){var m=b?f.split(b):[f];for(var d in m){if(typeof m[d]!="string")continue;var x=m[d].split(h);if(x.length!==2)continue;var R=x[0],O=x[1];y(R,O)}}var r=new T.default(0,0,""),n=r.align==="middle"?"middle":"center";function o(f,y,h){var b=f;function m(){var R=E(f);if(R===null)throw new Error("Malformed timestamp: "+b);return f=f.replace(/^[^\sa-zA-Z-]+/,""),R}function d(R,O){var w=new l;_(R,function(P,I){var u;switch(P){case"region":for(var k=h.length-1;k>=0;k--)if(h[k].id===I){w.set(P,h[k].region);break}break;case"vertical":w.alt(P,I,["rl","lr"]);break;case"line":u=I.split(","),w.integer(P,u[0]),w.percent(P,u[0])&&w.set("snapToLines",!1),w.alt(P,u[0],["auto"]),u.length===2&&w.alt("lineAlign",u[1],["start",n,"end"]);break;case"position":u=I.split(","),w.percent(P,u[0]),u.length===2&&w.alt("positionAlign",u[1],["start",n,"end","line-left","line-right","auto"]);break;case"size":w.percent(P,I);break;case"align":w.alt(P,I,["start",n,"end","left","right"]);break}},/:/,/\s/),O.region=w.get("region",null),O.vertical=w.get("vertical","");var D=w.get("line","auto");D==="auto"&&r.line===-1&&(D=-1),O.line=D,O.lineAlign=w.get("lineAlign","start"),O.snapToLines=w.get("snapToLines",!0),O.size=w.get("size",100),O.align=w.get("align",n);var A=w.get("position","auto");A==="auto"&&r.position===50&&(A=O.align==="start"||O.align==="left"?0:O.align==="end"||O.align==="right"?100:50),O.position=A}function x(){f=f.replace(/^\s+/,"")}if(x(),y.startTime=m(),x(),f.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+b);f=f.slice(3),x(),y.endTime=m(),x(),d(f,y)}function c(f){return f.replace(/<br(?: \/)?>/gi,`
|
|
|
`)}var v=function(){function f(){this.state="INITIAL",this.buffer="",this.decoder=new e,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var y=f.prototype;return y.parse=function(b){var m=this;b&&(m.buffer+=m.decoder.decode(b,{stream:!0}));function d(){var A=m.buffer,P=0;for(A=c(A);P<A.length&&A[P]!=="\r"&&A[P]!==`
|
|
|
`;)++P;var I=A.slice(0,P);return A[P]==="\r"&&++P,A[P]===`
|
|
|
`&&++P,m.buffer=A.slice(P),I}function x(A){_(A,function(P,I){},/:/)}try{var R="";if(m.state==="INITIAL"){if(!/\r\n|\n/.test(m.buffer))return this;R=d();var O=R.match(/^()?WEBVTT([ \t].*)?$/);if(!O||!O[0])throw new Error("Malformed WebVTT signature.");m.state="HEADER"}for(var w=!1;m.buffer;){if(!/\r\n|\n/.test(m.buffer))return this;w?w=!1:R=d();switch(m.state){case"HEADER":/:/.test(R)?x(R):R||(m.state="ID");continue;case"NOTE":R||(m.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(R)){m.state="NOTE";break}if(!R)continue;if(m.cue=new T.default(0,0,""),m.state="CUE",R.indexOf("-->")===-1){m.cue.id=R;continue}case"CUE":if(!m.cue){m.state="BADCUE";continue}try{o(R,m.cue,m.regionList)}catch(A){m.cue=null,m.state="BADCUE";continue}m.state="CUETEXT";continue;case"CUETEXT":{var D=R.indexOf("-->")!==-1;if(!R||D&&(w=!0)){m.oncue&&m.cue&&m.oncue(m.cue),m.cue=null,m.state="ID";continue}if(m.cue===null)continue;m.cue.text&&(m.cue.text+=`
|
|
|
`),m.cue.text+=R}continue;case"BADCUE":R||(m.state="ID")}}}catch(A){m.state==="CUETEXT"&&m.cue&&m.oncue&&m.oncue(m.cue),m.cue=null,m.state=m.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},y.flush=function(){var b=this;try{if((b.cue||b.state==="HEADER")&&(b.buffer+=`
|
|
|
|
|
|
`,b.parse()),b.state==="INITIAL"||b.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(m){b.onparsingerror&&b.onparsingerror(m)}return b.onflush&&b.onflush(),this},f}()},"./src/utils/webvtt-parser.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{generateCueId:()=>v,parseWebVTT:()=>y});var T=i("./src/polyfills/number.ts"),e=i("./src/utils/vttparser.ts"),E=i("./src/demux/id3.ts"),l=i("./src/utils/timescale-conversion.ts"),_=i("./src/remux/mp4-remuxer.ts"),r=/\r\n|\n\r|\n|\r/g,n=function(b,m,d){return d===void 0&&(d=0),b.slice(d,d+m.length)===m},o=function(b){var m=parseInt(b.slice(-3)),d=parseInt(b.slice(-6,-4)),x=parseInt(b.slice(-9,-7)),R=b.length>9?parseInt(b.substring(0,b.indexOf(":"))):0;if(!(0,T.isFiniteNumber)(m)||!(0,T.isFiniteNumber)(d)||!(0,T.isFiniteNumber)(x)||!(0,T.isFiniteNumber)(R))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+b);return m+=1e3*d,m+=60*1e3*x,m+=60*60*1e3*R,m},c=function(b){for(var m=5381,d=b.length;d;)m=m*33^b.charCodeAt(--d);return(m>>>0).toString()};function v(h,b,m){return c(h.toString())+c(b.toString())+c(m)}var f=function(b,m,d){var x=b[m],R=b[x.prevCC];if(!R||!R.new&&x.new){b.ccOffset=b.presentationOffset=x.start,x.new=!1;return}for(;(O=R)!==null&&O!==void 0&&O.new;){var O;b.ccOffset+=x.start-R.start,x.new=!1,x=R,R=b[x.prevCC]}b.presentationOffset=d};function y(h,b,m,d,x,R,O,w){var D=new e.VTTParser,A=(0,E.utf8ArrayToStr)(new Uint8Array(h)).trim().replace(r,`
|
|
|
`).split(`
|
|
|
`),P=[],I=(0,l.toMpegTsClockFromTimescale)(b,m),u="00:00.000",k=0,g=0,a,C=!0;D.oncue=function(S){var p=d[x],U=d.ccOffset,z=(k-I)/9e4;p!=null&&p.new&&(g!==void 0?U=d.ccOffset=p.start:f(d,x,z)),z&&(U=z-d.presentationOffset);var q=S.endTime-S.startTime,$=(0,_.normalizePts)((S.startTime+U-g)*9e4,R*9e4)/9e4;S.startTime=Math.max($,0),S.endTime=Math.max($+q,0);var re=S.text.trim();S.text=decodeURIComponent(encodeURIComponent(re)),S.id||(S.id=v(S.startTime,S.endTime,re)),S.endTime>0&&P.push(S)},D.onparsingerror=function(S){a=S},D.onflush=function(){if(a){w(a);return}O(P)},A.forEach(function(S){if(C)if(n(S,"X-TIMESTAMP-MAP=")){C=!1,S.slice(16).split(",").forEach(function(p){n(p,"LOCAL:")?u=p.slice(6):n(p,"MPEGTS:")&&(k=parseInt(p.slice(7)))});try{g=o(u)/1e3}catch(p){a=p}return}else S===""&&(C=!1);D.parse(S+`
|
|
|
`)}),D.flush()}},"./src/utils/xhr-loader.ts":(K,N,i)=>{"use strict";i.r(N),i.d(N,{default:()=>_});var T=i("./src/utils/logger.ts"),e=i("./src/loader/load-stats.ts"),E=/^age:\s*[\d.]+\s*$/m,l=function(){function r(o){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=o?o.xhrSetup:null,this.stats=new e.LoadStats,this.retryDelay=0}var n=r.prototype;return n.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},n.abortInternal=function(){var c=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),c&&(c.onreadystatechange=null,c.onprogress=null,c.readyState!==4&&(this.stats.aborted=!0,c.abort()))},n.abort=function(){var c;this.abortInternal(),(c=this.callbacks)!==null&&c!==void 0&&c.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},n.load=function(c,v,f){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=c,this.config=v,this.callbacks=f,this.retryDelay=v.retryDelay,this.loadInternal()},n.loadInternal=function(){var c=this.config,v=this.context;if(!c)return;var f=this.loader=new self.XMLHttpRequest,y=this.stats;y.loading.first=0,y.loaded=0;var h=this.xhrSetup;try{if(h)try{h(f,v.url)}catch(d){f.open("GET",v.url,!0),h(f,v.url)}f.readyState||f.open("GET",v.url,!0);var b=this.context.headers;if(b)for(var m in b)f.setRequestHeader(m,b[m])}catch(d){this.callbacks.onError({code:f.status,text:d.message},v,f);return}v.rangeEnd&&f.setRequestHeader("Range","bytes="+v.rangeStart+"-"+(v.rangeEnd-1)),f.onreadystatechange=this.readystatechange.bind(this),f.onprogress=this.loadprogress.bind(this),f.responseType=v.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),c.timeout),f.send()},n.readystatechange=function(){var c=this.context,v=this.loader,f=this.stats;if(!c||!v)return;var y=v.readyState,h=this.config;if(f.aborted)return;if(y>=2)if(self.clearTimeout(this.requestTimeout),f.loading.first===0&&(f.loading.first=Math.max(self.performance.now(),f.loading.start)),y===4){v.onreadystatechange=null,v.onprogress=null;var b=v.status,m=v.responseType==="arraybuffer";if(b>=200&&b<300&&(m&&v.response||v.responseText!==null)){f.loading.end=Math.max(self.performance.now(),f.loading.first);var d,x;if(m?(d=v.response,x=d.byteLength):(d=v.responseText,x=d.length),f.loaded=f.total=x,!this.callbacks)return;var R=this.callbacks.onProgress;if(R&&R(f,c,d,v),!this.callbacks)return;var O={url:v.responseURL,data:d};this.callbacks.onSuccess(O,f,c,v)}else f.retry>=h.maxRetry||b>=400&&b<499?(T.logger.error(b+" while loading "+c.url),this.callbacks.onError({code:b,text:v.statusText},c,v)):(T.logger.warn(b+" while loading "+c.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,h.maxRetryDelay),f.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),h.timeout)},n.loadtimeout=function(){T.logger.warn("timeout while loading "+this.context.url);var c=this.callbacks;c&&(this.abortInternal(),c.onTimeout(this.stats,this.context,this.loader))},n.loadprogress=function(c){var v=this.stats;v.loaded=c.loaded,c.lengthComputable&&(v.total=c.total)},n.getCacheAge=function(){var c=null;if(this.loader&&E.test(this.loader.getAllResponseHeaders())){var v=this.loader.getResponseHeader("age");c=v?parseFloat(v):null}return c},r}();const _=l},"./node_modules/eventemitter3/index.js":K=>{"use strict";var N=Object.prototype.hasOwnProperty,i="~";function T(){}Object.create&&(T.prototype=Object.create(null),new T().__proto__||(i=!1));function e(r,n,o){this.fn=r,this.context=n,this.once=o||!1}function E(r,n,o,c,v){if(typeof o!="function")throw new TypeError("The listener must be a function");var f=new e(o,c||r,v),y=i?i+n:n;return r._events[y]?r._events[y].fn?r._events[y]=[r._events[y],f]:r._events[y].push(f):(r._events[y]=f,r._eventsCount++),r}function l(r,n){--r._eventsCount===0?r._events=new T:delete r._events[n]}function _(){this._events=new T,this._eventsCount=0}_.prototype.eventNames=function(){var n=[],o,c;if(this._eventsCount===0)return n;for(c in o=this._events)N.call(o,c)&&n.push(i?c.slice(1):c);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(o)):n},_.prototype.listeners=function(n){var o=i?i+n:n,c=this._events[o];if(!c)return[];if(c.fn)return[c.fn];for(var v=0,f=c.length,y=new Array(f);v<f;v++)y[v]=c[v].fn;return y},_.prototype.listenerCount=function(n){var o=i?i+n:n,c=this._events[o];return c?c.fn?1:c.length:0},_.prototype.emit=function(n,o,c,v,f,y){var h=i?i+n:n;if(!this._events[h])return!1;var b=this._events[h],m=arguments.length,d,x;if(b.fn){b.once&&this.removeListener(n,b.fn,void 0,!0);switch(m){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,o),!0;case 3:return b.fn.call(b.context,o,c),!0;case 4:return b.fn.call(b.context,o,c,v),!0;case 5:return b.fn.call(b.context,o,c,v,f),!0;case 6:return b.fn.call(b.context,o,c,v,f,y),!0}for(x=1,d=new Array(m-1);x<m;x++)d[x-1]=arguments[x];b.fn.apply(b.context,d)}else{var R=b.length,O;for(x=0;x<R;x++){b[x].once&&this.removeListener(n,b[x].fn,void 0,!0);switch(m){case 1:b[x].fn.call(b[x].context);break;case 2:b[x].fn.call(b[x].context,o);break;case 3:b[x].fn.call(b[x].context,o,c);break;case 4:b[x].fn.call(b[x].context,o,c,v);break;default:if(!d)for(O=1,d=new Array(m-1);O<m;O++)d[O-1]=arguments[O];b[x].fn.apply(b[x].context,d)}}}return!0},_.prototype.on=function(n,o,c){return E(this,n,o,c,!1)},_.prototype.once=function(n,o,c){return E(this,n,o,c,!0)},_.prototype.removeListener=function(n,o,c,v){var f=i?i+n:n;if(!this._events[f])return this;if(!o)return l(this,f),this;var y=this._events[f];if(y.fn)y.fn===o&&(!v||y.once)&&(!c||y.context===c)&&l(this,f);else{for(var h=0,b=[],m=y.length;h<m;h++)(y[h].fn!==o||v&&!y[h].once||c&&y[h].context!==c)&&b.push(y[h]);b.length?this._events[f]=b.length===1?b[0]:b:l(this,f)}return this},_.prototype.removeAllListeners=function(n){var o;return n?(o=i?i+n:n,this._events[o]&&l(this,o)):(this._events=new T,this._eventsCount=0),this},_.prototype.off=_.prototype.removeListener,_.prototype.addListener=_.prototype.on,_.prefixed=i,_.EventEmitter=_,K.exports=_},"./node_modules/url-toolkit/src/url-toolkit.js":function(K){(function(N){var i=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,T=/^(?=([^\/?#]*))\1([^]*)$/,e=/(?:\/|^)\.(?=\/)/g,E=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,l={buildAbsoluteURL:function(_,r,n){if(n=n||{},_=_.trim(),r=r.trim(),!r){if(!n.alwaysNormalize)return _;var o=l.parseURL(_);if(!o)throw new Error("Error trying to parse base URL.");return o.path=l.normalizePath(o.path),l.buildURLFromParts(o)}var c=l.parseURL(r);if(!c)throw new Error("Error trying to parse relative URL.");if(c.scheme)return n.alwaysNormalize?(c.path=l.normalizePath(c.path),l.buildURLFromParts(c)):r;var v=l.parseURL(_);if(!v)throw new Error("Error trying to parse base URL.");if(!v.netLoc&&v.path&&v.path[0]!=="/"){var f=T.exec(v.path);v.netLoc=f[1],v.path=f[2]}v.netLoc&&!v.path&&(v.path="/");var y={scheme:v.scheme,netLoc:c.netLoc,path:null,params:c.params,query:c.query,fragment:c.fragment};if(!c.netLoc&&(y.netLoc=v.netLoc,c.path[0]!=="/"))if(!c.path)y.path=v.path,c.params||(y.params=v.params,c.query||(y.query=v.query));else{var h=v.path,b=h.substring(0,h.lastIndexOf("/")+1)+c.path;y.path=l.normalizePath(b)}return y.path===null&&(y.path=n.alwaysNormalize?l.normalizePath(c.path):c.path),l.buildURLFromParts(y)},parseURL:function(_){var r=i.exec(_);return r?{scheme:r[1]||"",netLoc:r[2]||"",path:r[3]||"",params:r[4]||"",query:r[5]||"",fragment:r[6]||""}:null},normalizePath:function(_){for(_=_.split("").reverse().join("").replace(e,"");_.length!==(_=_.replace(E,"")).length;);return _.split("").reverse().join("")},buildURLFromParts:function(_){return _.scheme+_.netLoc+_.path+_.params+_.query+_.fragment}};K.exports=l})(this)}},M={};function G(K){var N=M[K];if(N!==void 0)return N.exports;var i=M[K]={exports:{}};return B[K].call(i.exports,i,i.exports,G),i.exports}G.m=B,(()=>{G.n=K=>{var N=K&&K.__esModule?()=>K.default:()=>K;return G.d(N,{a:N}),N}})(),(()=>{G.d=(K,N)=>{for(var i in N)G.o(N,i)&&!G.o(K,i)&&Object.defineProperty(K,i,{enumerable:!0,get:N[i]})}})(),(()=>{G.o=(K,N)=>Object.prototype.hasOwnProperty.call(K,N)})(),(()=>{G.r=K=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(K,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(K,"__esModule",{value:!0})}})();var X=G("./src/hls.ts");return X=X.default,X})())},vHTk:function(W,ee,L){W.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vqdp:function(W,ee,L){"use strict";L.d(ee,"a",function(){return i});var B=L("B/uU"),M=L("El5i");function G(T,e){var E=new Set;return T.forEach(function(l){e.has(l)||E.add(l)}),E}function X(T){var e=T||{},E=e.disabled,l=e.disableCheckbox,_=e.checkable;return!!(E||l)||_===!1}function K(T,e,E,l){for(var _=new Set(T),r=new Set,n=0;n<=E;n+=1){var o=e.get(n)||new Set;o.forEach(function(y){var h=y.key,b=y.node,m=y.children,d=m===void 0?[]:m;_.has(h)&&!l(b)&&d.filter(function(x){return!l(x.node)}).forEach(function(x){_.add(x.key)})})}for(var c=new Set,v=E;v>=0;v-=1){var f=e.get(v)||new Set;f.forEach(function(y){var h=y.parent,b=y.node;if(l(b)||!y.parent||c.has(y.parent.key))return;if(l(y.parent.node)){c.add(h.key);return}var m=!0,d=!1;(h.children||[]).filter(function(x){return!l(x.node)}).forEach(function(x){var R=x.key,O=_.has(R);m&&!O&&(m=!1),!d&&(O||r.has(R))&&(d=!0)}),m&&_.add(h.key),d&&r.add(h.key),c.add(h.key)})}return{checkedKeys:Array.from(_),halfCheckedKeys:Array.from(G(r,_))}}function N(T,e,E,l,_){for(var r=new Set(T),n=new Set(e),o=0;o<=l;o+=1){var c=E.get(o)||new Set;c.forEach(function(h){var b=h.key,m=h.node,d=h.children,x=d===void 0?[]:d;!r.has(b)&&!n.has(b)&&!_(m)&&x.filter(function(R){return!_(R.node)}).forEach(function(R){r.delete(R.key)})})}n=new Set;for(var v=new Set,f=l;f>=0;f-=1){var y=E.get(f)||new Set;y.forEach(function(h){var b=h.parent,m=h.node;if(_(m)||!h.parent||v.has(h.parent.key))return;if(_(h.parent.node)){v.add(b.key);return}var d=!0,x=!1;(b.children||[]).filter(function(R){return!_(R.node)}).forEach(function(R){var O=R.key,w=r.has(O);d&&!w&&(d=!1),!x&&(w||n.has(O))&&(x=!0)}),d||r.delete(b.key),x&&n.add(b.key),v.add(b.key)})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(G(n,r))}}function i(T,e,E,l){var _=[],r;l?r=l:r=X;var n=new Set(T.filter(function(f){var y=!!Object(M.a)(E,f);return y||_.push(f),y})),o=new Map,c=0;Object.keys(E).forEach(function(f){var y=E[f],h=y.level,b=o.get(h);b||(b=new Set,o.set(h,b)),b.add(y),c=Math.max(c,h)}),Object(B.a)(!_.length,"Tree missing follow keys: ".concat(_.slice(0,100).map(function(f){return"'".concat(f,"'")}).join(", ")));var v;return e===!0?v=K(n,o,c,r):v=N(n,e.halfCheckedKeys,o,c,r),v}},w7YG:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(B){return function(){var M=B,G=M.lib,X=G.StreamCipher,K=M.algo,N=K.RC4=X.extend({_doReset:function(){for(var e=this._key,E=e.words,l=e.sigBytes,_=this._S=[],r=0;r<256;r++)_[r]=r;for(var r=0,n=0;r<256;r++){var o=r%l,c=E[o>>>2]>>>24-o%4*8&255;n=(n+_[r]+c)%256;var v=_[r];_[r]=_[n],_[n]=v}this._i=this._j=0},_doProcessBlock:function(e,E){e[E]^=i.call(this)},keySize:256/32,ivSize:0});function i(){for(var e=this._S,E=this._i,l=this._j,_=0,r=0;r<4;r++){E=(E+1)%256,l=(l+e[E])%256;var n=e[E];e[E]=e[l],e[l]=n,_|=e[(e[E]+e[l])%256]<<24-r*8}return this._i=E,this._j=l,_}M.RC4=X._createHelper(N);var T=K.RC4Drop=N.extend({cfg:N.cfg.extend({drop:192}),_doReset:function(){N._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)i.call(this)}});M.RC4Drop=X._createHelper(T)}(),B.RC4})},wZgz:function(W,ee,L){(function(B,M,G){W.exports=ee=M(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(B){return function(){var M=B,G=M.lib,X=G.BlockCipher,K=M.algo,N=[],i=[],T=[],e=[],E=[],l=[],_=[],r=[],n=[],o=[];(function(){for(var f=[],y=0;y<256;y++)y<128?f[y]=y<<1:f[y]=y<<1^283;for(var h=0,b=0,y=0;y<256;y++){var m=b^b<<1^b<<2^b<<3^b<<4;m=m>>>8^m&255^99,N[h]=m,i[m]=h;var d=f[h],x=f[d],R=f[x],O=f[m]*257^m*16843008;T[h]=O<<24|O>>>8,e[h]=O<<16|O>>>16,E[h]=O<<8|O>>>24,l[h]=O;var O=R*16843009^x*65537^d*257^h*16843008;_[m]=O<<24|O>>>8,r[m]=O<<16|O>>>16,n[m]=O<<8|O>>>24,o[m]=O,h?(h=d^f[f[f[R^d]]],b^=f[f[b]]):h=b=1}})();var c=[0,1,2,4,8,16,32,64,128,27,54],v=K.AES=X.extend({_doReset:function(){var f;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var y=this._keyPriorReset=this._key,h=y.words,b=y.sigBytes/4,m=this._nRounds=b+6,d=(m+1)*4,x=this._keySchedule=[],R=0;R<d;R++)R<b?x[R]=h[R]:(f=x[R-1],R%b?b>6&&R%b==4&&(f=N[f>>>24]<<24|N[f>>>16&255]<<16|N[f>>>8&255]<<8|N[f&255]):(f=f<<8|f>>>24,f=N[f>>>24]<<24|N[f>>>16&255]<<16|N[f>>>8&255]<<8|N[f&255],f^=c[R/b|0]<<24),x[R]=x[R-b]^f);for(var O=this._invKeySchedule=[],w=0;w<d;w++){var R=d-w;if(w%4)var f=x[R];else var f=x[R-4];w<4||R<=4?O[w]=f:O[w]=_[N[f>>>24]]^r[N[f>>>16&255]]^n[N[f>>>8&255]]^o[N[f&255]]}},encryptBlock:function(f,y){this._doCryptBlock(f,y,this._keySchedule,T,e,E,l,N)},decryptBlock:function(f,y){var h=f[y+1];f[y+1]=f[y+3],f[y+3]=h,this._doCryptBlock(f,y,this._invKeySchedule,_,r,n,o,i);var h=f[y+1];f[y+1]=f[y+3],f[y+3]=h},_doCryptBlock:function(f,y,h,b,m,d,x,R){for(var O=this._nRounds,w=f[y]^h[0],D=f[y+1]^h[1],A=f[y+2]^h[2],P=f[y+3]^h[3],I=4,u=1;u<O;u++){var k=b[w>>>24]^m[D>>>16&255]^d[A>>>8&255]^x[P&255]^h[I++],g=b[D>>>24]^m[A>>>16&255]^d[P>>>8&255]^x[w&255]^h[I++],a=b[A>>>24]^m[P>>>16&255]^d[w>>>8&255]^x[D&255]^h[I++],C=b[P>>>24]^m[w>>>16&255]^d[D>>>8&255]^x[A&255]^h[I++];w=k,D=g,A=a,P=C}var k=(R[w>>>24]<<24|R[D>>>16&255]<<16|R[A>>>8&255]<<8|R[P&255])^h[I++],g=(R[D>>>24]<<24|R[A>>>16&255]<<16|R[P>>>8&255]<<8|R[w&255])^h[I++],a=(R[A>>>24]<<24|R[P>>>16&255]<<16|R[w>>>8&255]<<8|R[D&255])^h[I++],C=(R[P>>>24]<<24|R[w>>>16&255]<<16|R[D>>>8&255]<<8|R[A&255])^h[I++];f[y]=k,f[y+1]=g,f[y+2]=a,f[y+3]=C},keySize:256/32});M.AES=X._createHelper(v)}(),B.AES})},wbyO:function(W,ee,L){(function(B,M){W.exports=ee=M(L("Ib8C"))})(this,function(B){return function(){var M=B,G=M.lib,X=G.WordArray,K=M.enc,N=K.Base64url={stringify:function(T,e=!0){var E=T.words,l=T.sigBytes,_=e?this._safe_map:this._map;T.clamp();for(var r=[],n=0;n<l;n+=3)for(var o=E[n>>>2]>>>24-n%4*8&255,c=E[n+1>>>2]>>>24-(n+1)%4*8&255,v=E[n+2>>>2]>>>24-(n+2)%4*8&255,f=o<<16|c<<8|v,y=0;y<4&&n+y*.75<l;y++)r.push(_.charAt(f>>>6*(3-y)&63));var h=_.charAt(64);if(h)for(;r.length%4;)r.push(h);return r.join("")},parse:function(T,e=!0){var E=T.length,l=e?this._safe_map:this._map,_=this._reverseMap;if(!_){_=this._reverseMap=[];for(var r=0;r<l.length;r++)_[l.charCodeAt(r)]=r}var n=l.charAt(64);if(n){var o=T.indexOf(n);o!==-1&&(E=o)}return i(T,E,_)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function i(T,e,E){for(var l=[],_=0,r=0;r<e;r++)if(r%4){var n=E[T.charCodeAt(r-1)]<<r%4*2,o=E[T.charCodeAt(r)]>>>6-r%4*2,c=n|o;l[_>>>2]|=c<<24-_%4*8,_++}return X.create(l,_)}}(),B.enc.Base64url})},wx14:function(W,ee,L){"use strict";L.d(ee,"a",function(){return B});function B(){return B=Object.assign?Object.assign.bind():function(M){for(var G=1;G<arguments.length;G++){var X=arguments[G];for(var K in X)Object.prototype.hasOwnProperty.call(X,K)&&(M[K]=X[K])}return M},B.apply(this,arguments)}},"x/L2":function(W,ee,L){"use strict";var B=L("yuO0"),M=L("XjgL"),G=L("6ASS"),X=L("fNpE"),K=L("36hc"),N=L("kxoy"),i=L("T/Jt"),T=L.n(i),e=L("27eb"),E=L.n(e),l=L("1HCi"),_=L.n(l),r=L("Eiay"),n=L("5Und"),o=L("MRIS"),c=L("QOAJ"),v=L("ynYK"),f=L("B/uU"),y=L("VbWF"),h=L("U+Vu"),b=["colSpan","rowSpan","style","className"];function m(I,u,k,g){var a=I+u-1;return I<=g&&a>=k}function d(I){return I&&Object(N.a)(I)==="object"&&!Array.isArray(I)&&!i.isValidElement(I)}function x(I){return typeof I=="string"?!0:Object(r.c)(I)}var R=function(u){var k=u.ellipsis,g=u.rowType,a=u.children,C,S=k===!0?{showTitle:!0}:k;return S&&(S.showTitle||g==="header")&&(typeof a=="string"||typeof a=="number"?C=a.toString():i.isValidElement(a)&&typeof a.props.children=="string"&&(C=a.props.children)),C};function O(I,u){var k,g,a,C=I.prefixCls,S=I.className,p=I.record,U=I.index,z=I.renderIndex,q=I.dataIndex,$=I.render,re=I.children,ce=I.component,ne=ce===void 0?"td":ce,me=I.colSpan,be=I.rowSpan,he=I.fixLeft,se=I.fixRight,_e=I.firstFixLeft,De=I.lastFixLeft,ge=I.firstFixRight,fe=I.lastFixRight,Ce=I.appendNode,ae=I.additionalProps,Q=ae===void 0?{}:ae,J=I.ellipsis,Z=I.align,pe=I.rowType,le=I.isSticky,ye=I.hovering,Te=I.onHover,Pe="".concat(C,"-cell"),He=i.useContext(y.a),Oe=i.useContext(o.a),Ue=i.useContext(v.a),je=Ue.allColumnsFixedLeft,Ve=i.useMemo(function(){if(Object(n.c)(re))return[re];var rt=Object(n.b)(p,q),dt=rt,nt=void 0;if($){var mt=$(rt,p,z);d(mt)?(dt=mt.children,nt=mt.props,He.renderWithProps=!0):dt=mt}return[dt,nt]},[He.renderWithProps?Math.random():0,re,q,He,p,$,z]),Re=Object(K.a)(Ve,2),Xe=Re[0],Qe=Re[1],We=Xe;Object(N.a)(We)==="object"&&!Array.isArray(We)&&!i.isValidElement(We)&&(We=null),J&&(De||ge)&&(We=i.createElement("span",{className:"".concat(Pe,"-content")},We));var ze=Qe||{},Me=ze.colSpan,Ie=ze.rowSpan,Be=ze.style,we=ze.className,Ae=Object(X.a)(ze,b),ke=(k=Me!==void 0?Me:me)!==null&&k!==void 0?k:1,Le=(g=Ie!==void 0?Ie:be)!==null&&g!==void 0?g:1;if(ke===0||Le===0)return null;var Ke={},Ze=typeof he=="number"&&Oe,Ne=typeof se=="number"&&Oe;Ze&&(Ke.position="sticky",Ke.left=he),Ne&&(Ke.position="sticky",Ke.right=se);var $e={};Z&&($e.textAlign=Z);var Je=function(dt){var nt;p&&Te(U,U+Le-1),Q==null||((nt=Q.onMouseEnter)===null||nt===void 0)||nt.call(Q,dt)},qe=function(dt){var nt;p&&Te(-1,-1),Q==null||((nt=Q.onMouseLeave)===null||nt===void 0)||nt.call(Q,dt)},ot=R({rowType:pe,ellipsis:J,children:Xe}),at=Object(G.a)(Object(G.a)(Object(G.a)({title:ot},Ae),Q),{},{colSpan:ke!==1?ke:null,rowSpan:Le!==1?Le:null,className:E()(Pe,S,(a={},Object(M.a)(a,"".concat(Pe,"-fix-left"),Ze&&Oe),Object(M.a)(a,"".concat(Pe,"-fix-left-first"),_e&&Oe),Object(M.a)(a,"".concat(Pe,"-fix-left-last"),De&&Oe),Object(M.a)(a,"".concat(Pe,"-fix-left-all"),De&&je&&Oe),Object(M.a)(a,"".concat(Pe,"-fix-right"),Ne&&Oe),Object(M.a)(a,"".concat(Pe,"-fix-right-first"),ge&&Oe),Object(M.a)(a,"".concat(Pe,"-fix-right-last"),fe&&Oe),Object(M.a)(a,"".concat(Pe,"-ellipsis"),J),Object(M.a)(a,"".concat(Pe,"-with-append"),Ce),Object(M.a)(a,"".concat(Pe,"-fix-sticky"),(Ze||Ne)&&le&&Oe),Object(M.a)(a,"".concat(Pe,"-row-hover"),!Qe&&ye),a),Q.className,we),style:Object(G.a)(Object(G.a)(Object(G.a)(Object(G.a)({},Q.style),$e),Ke),Be),onMouseEnter:Je,onMouseLeave:qe,ref:x(ne)?u:null});return i.createElement(ne,at,Ce,We)}var w=i.forwardRef(O);w.displayName="Cell";var D=["expanded","className","hovering"],A=i.memo(w,function(I,u){return u.shouldCellUpdate?D.every(function(k){return I[k]===u[k]})&&!u.shouldCellUpdate(u.record,I.record):_()(I,u)}),P=i.forwardRef(function(I,u){var k=I.index,g=I.additionalProps,a=g===void 0?{}:g,C=I.colSpan,S=I.rowSpan,p=a.colSpan,U=a.rowSpan,z=C!=null?C:p,q=S!=null?S:U,$=Object(h.b)(c.a,function(ne){var me=m(k,q||1,ne==null?void 0:ne.startRow,ne==null?void 0:ne.endRow);return{onHover:ne==null?void 0:ne.onHover,hovering:me}}),re=$.onHover,ce=$.hovering;return i.createElement(A,Object(B.a)({},I,{colSpan:z,rowSpan:q,hovering:ce,ref:u,onHover:re}))});P.displayName="WrappedCell",ee.a=P},xB1R:function(W,ee,L){"use strict";var B=L("6ASS"),M=L("36hc"),G=L("T/Jt"),X=L("QMfX"),K=L("s7W6"),N=L("XjgL"),i=L("yuO0"),T=L("27eb"),e=L.n(T),E=L("J5No"),l=L("sg8A"),_=L("E0BR"),r=G.createContext(null),n=r,o=function(A){var P=A.prefixCls,I=A.className,u=A.style,k=A.children,g=A.containerRef,a=A.id,C=A.onMouseEnter,S=A.onMouseOver,p=A.onMouseLeave,U=A.onClick,z=A.onKeyDown,q=A.onKeyUp,$={onMouseEnter:C,onMouseOver:S,onMouseLeave:p,onClick:U,onKeyDown:z,onKeyUp:q};return G.createElement(G.Fragment,null,G.createElement("div",Object(i.a)({id:a,className:e()("".concat(P,"-content"),I),style:Object(B.a)({},u),"aria-modal":"true",role:"dialog",ref:g},$),k))},c=o,v=L("B/uU"),f=L("Zfln");function y(D){return typeof D=="string"&&String(Number(D))===D?(Object(v.a)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(D)):D}function h(D){Object(v.a)(!("wrapperClassName"in D),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),Object(v.a)(Object(f.a)()||!D.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var b={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function m(D,A){var P,I,u,k,g=D.prefixCls,a=D.open,C=D.placement,S=D.inline,p=D.push,U=D.forceRender,z=D.autoFocus,q=D.keyboard,$=D.rootClassName,re=D.rootStyle,ce=D.zIndex,ne=D.className,me=D.id,be=D.style,he=D.motion,se=D.width,_e=D.height,De=D.children,ge=D.contentWrapperStyle,fe=D.mask,Ce=D.maskClosable,ae=D.maskMotion,Q=D.maskClassName,J=D.maskStyle,Z=D.afterOpenChange,pe=D.onClose,le=D.onMouseEnter,ye=D.onMouseOver,Te=D.onMouseLeave,Pe=D.onClick,He=D.onKeyDown,Oe=D.onKeyUp,Ue=G.useRef(),je=G.useRef(),Ve=G.useRef();G.useImperativeHandle(A,function(){return Ue.current});var Re=function(Je){var qe=Je.keyCode,ot=Je.shiftKey;switch(qe){case l.a.TAB:{if(qe===l.a.TAB){if(!ot&&document.activeElement===Ve.current){var at;(at=je.current)===null||at===void 0||at.focus({preventScroll:!0})}else if(ot&&document.activeElement===je.current){var rt;(rt=Ve.current)===null||rt===void 0||rt.focus({preventScroll:!0})}}break}case l.a.ESC:{pe&&q&&(Je.stopPropagation(),pe(Je));break}}};G.useEffect(function(){if(a&&z){var $e;($e=Ue.current)===null||$e===void 0||$e.focus({preventScroll:!0})}},[a]);var Xe=G.useState(!1),Qe=Object(M.a)(Xe,2),We=Qe[0],ze=Qe[1],Me=G.useContext(n),Ie;p===!1?Ie={distance:0}:p===!0?Ie={}:Ie=p||{};var Be=(P=(I=(u=Ie)===null||u===void 0?void 0:u.distance)!==null&&I!==void 0?I:Me==null?void 0:Me.pushDistance)!==null&&P!==void 0?P:180,we=G.useMemo(function(){return{pushDistance:Be,push:function(){ze(!0)},pull:function(){ze(!1)}}},[Be]);G.useEffect(function(){if(a){var $e;Me==null||(($e=Me.push)===null||$e===void 0)||$e.call(Me)}else{var Je;Me==null||((Je=Me.pull)===null||Je===void 0)||Je.call(Me)}},[a]),G.useEffect(function(){return function(){var $e;Me==null||(($e=Me.pull)===null||$e===void 0)||$e.call(Me)}},[]);var Ae=fe&&G.createElement(E.default,Object(i.a)({key:"mask"},ae,{visible:a}),function($e,Je){var qe=$e.className,ot=$e.style;return G.createElement("div",{className:e()("".concat(g,"-mask"),qe,Q),style:Object(B.a)(Object(B.a)({},ot),J),onClick:Ce&&a?pe:void 0,ref:Je})}),ke=typeof he=="function"?he(C):he,Le={};if(We&&Be)switch(C){case"top":Le.transform="translateY(".concat(Be,"px)");break;case"bottom":Le.transform="translateY(".concat(-Be,"px)");break;case"left":Le.transform="translateX(".concat(Be,"px)");break;default:Le.transform="translateX(".concat(-Be,"px)");break}C==="left"||C==="right"?Le.width=y(se):Le.height=y(_e);var Ke={onMouseEnter:le,onMouseOver:ye,onMouseLeave:Te,onClick:Pe,onKeyDown:He,onKeyUp:Oe},Ze=G.createElement(E.default,Object(i.a)({key:"panel"},ke,{visible:a,forceRender:U,onVisibleChanged:function(Je){Z==null||Z(Je)},removeOnLeave:!1,leavedClassName:"".concat(g,"-content-wrapper-hidden")}),function($e,Je){var qe=$e.className,ot=$e.style;return G.createElement("div",Object(i.a)({className:e()("".concat(g,"-content-wrapper"),qe),style:Object(B.a)(Object(B.a)(Object(B.a)({},Le),ot),ge)},Object(_.a)(D,{data:!0})),G.createElement(c,Object(i.a)({id:me,containerRef:Je,prefixCls:g,className:ne,style:be},Ke),De))}),Ne=Object(B.a)({},re);return ce&&(Ne.zIndex=ce),G.createElement(n.Provider,{value:we},G.createElement("div",{className:e()(g,"".concat(g,"-").concat(C),$,(k={},Object(N.a)(k,"".concat(g,"-open"),a),Object(N.a)(k,"".concat(g,"-inline"),S),k)),style:Ne,tabIndex:-1,ref:Ue,onKeyDown:Re},Ae,G.createElement("div",{tabIndex:0,ref:je,style:b,"aria-hidden":"true","data-sentinel":"start"}),Ze,G.createElement("div",{tabIndex:0,ref:Ve,style:b,"aria-hidden":"true","data-sentinel":"end"})))}var d=G.forwardRef(m),x=d,R=function(A){var P=A.open,I=P===void 0?!1:P,u=A.prefixCls,k=u===void 0?"rc-drawer":u,g=A.placement,a=g===void 0?"right":g,C=A.autoFocus,S=C===void 0?!0:C,p=A.keyboard,U=p===void 0?!0:p,z=A.width,q=z===void 0?378:z,$=A.mask,re=$===void 0?!0:$,ce=A.maskClosable,ne=ce===void 0?!0:ce,me=A.getContainer,be=A.forceRender,he=A.afterOpenChange,se=A.destroyOnClose,_e=A.onMouseEnter,De=A.onMouseOver,ge=A.onMouseLeave,fe=A.onClick,Ce=A.onKeyDown,ae=A.onKeyUp,Q=G.useState(!1),J=Object(M.a)(Q,2),Z=J[0],pe=J[1],le=G.useState(!1),ye=Object(M.a)(le,2),Te=ye[0],Pe=ye[1];Object(K.a)(function(){Pe(!0)},[]);var He=Te?I:!1,Oe=G.useRef(),Ue=G.useRef();Object(K.a)(function(){He&&(Ue.current=document.activeElement)},[He]);var je=function(Qe){var We;if(pe(Qe),he==null||he(Qe),!Qe&&Ue.current&&!((We=Oe.current)===null||We===void 0?void 0:We.contains(Ue.current))){var ze;(ze=Ue.current)===null||ze===void 0||ze.focus({preventScroll:!0})}};if(!be&&!Z&&!He&&se)return null;var Ve={onMouseEnter:_e,onMouseOver:De,onMouseLeave:ge,onClick:fe,onKeyDown:Ce,onKeyUp:ae},Re=Object(B.a)(Object(B.a)({},A),{},{open:He,prefixCls:k,placement:a,autoFocus:S,keyboard:U,width:q,mask:re,maskClosable:ne,inline:me===!1,afterOpenChange:je,ref:Oe},Ve);return G.createElement(X.a,{open:He||be||Z,autoDestroy:!1,getContainer:me,autoLock:re&&(He||Z)},G.createElement(x,Re))},O=R,w=ee.a=O},xYGA:function(W,ee,L){"use strict";L.r(ee),L.d(ee,"ResizableTextArea",function(){return A});var B=L("yuO0"),M=L("eA01"),G=L("fXDJ"),X=L("BPTR"),K=L("udol"),N=L("T/Jt"),i=L("XjgL"),T=L("6ASS"),e=L("kxoy"),E=L("36hc"),l=L("fNpE"),_=L("s3yx"),r=L("s7W6"),n=L("IRwA"),o=L("8wWb"),c=L("27eb"),v=L.n(c),f=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,y=["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"],h={},b;function m(u){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g=u.getAttribute("id")||u.getAttribute("data-reactid")||u.getAttribute("name");if(k&&h[g])return h[g];var a=window.getComputedStyle(u),C=a.getPropertyValue("box-sizing")||a.getPropertyValue("-moz-box-sizing")||a.getPropertyValue("-webkit-box-sizing"),S=parseFloat(a.getPropertyValue("padding-bottom"))+parseFloat(a.getPropertyValue("padding-top")),p=parseFloat(a.getPropertyValue("border-bottom-width"))+parseFloat(a.getPropertyValue("border-top-width")),U=y.map(function(q){return"".concat(q,":").concat(a.getPropertyValue(q))}).join(";"),z={sizingStyle:U,paddingSize:S,borderSize:p,boxSizing:C};return k&&g&&(h[g]=z),z}function d(u){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;b||(b=document.createElement("textarea"),b.setAttribute("tab-index","-1"),b.setAttribute("aria-hidden","true"),document.body.appendChild(b)),u.getAttribute("wrap")?b.setAttribute("wrap",u.getAttribute("wrap")):b.removeAttribute("wrap");var C=m(u,k),S=C.paddingSize,p=C.borderSize,U=C.boxSizing,z=C.sizingStyle;b.setAttribute("style","".concat(z,";").concat(f)),b.value=u.value||u.placeholder||"";var q=void 0,$=void 0,re,ce=b.scrollHeight;if(U==="border-box"?ce+=p:U==="content-box"&&(ce-=S),g!==null||a!==null){b.value=" ";var ne=b.scrollHeight-S;g!==null&&(q=ne*g,U==="border-box"&&(q=q+S+p),ce=Math.max(q,ce)),a!==null&&($=ne*a,U==="border-box"&&($=$+S+p),re=ce>$?"":"hidden",ce=Math.min($,ce))}var me={height:ce,overflowY:re,resize:"none"};return q&&(me.minHeight=q),$&&(me.maxHeight=$),me}var x=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],R=0,O=1,w=2,D=N.forwardRef(function(u,k){var g=u.prefixCls,a=g===void 0?"rc-textarea":g,C=u.onPressEnter,S=u.defaultValue,p=u.value,U=u.autoSize,z=u.onResize,q=u.className,$=u.style,re=u.disabled,ce=u.onChange,ne=u.onInternalAutoSize,me=Object(l.a)(u,x),be=Object(o.a)(S,{value:p,postState:function(Me){return Me!=null?Me:""}}),he=Object(E.a)(be,2),se=he[0],_e=he[1],De=function(Me){_e(Me.target.value),ce==null||ce(Me)},ge=N.useRef();N.useImperativeHandle(k,function(){return{textArea:ge.current}});var fe=N.useMemo(function(){return U&&Object(e.a)(U)==="object"?[U.minRows,U.maxRows]:[]},[U]),Ce=Object(E.a)(fe,2),ae=Ce[0],Q=Ce[1],J=!!U,Z=function(){try{if(document.activeElement===ge.current){var Me=ge.current,Ie=Me.selectionStart,Be=Me.selectionEnd,we=Me.scrollTop;ge.current.setSelectionRange(Ie,Be),ge.current.scrollTop=we}}catch(Ae){}},pe=N.useState(w),le=Object(E.a)(pe,2),ye=le[0],Te=le[1],Pe=N.useState(),He=Object(E.a)(Pe,2),Oe=He[0],Ue=He[1],je=function(){Te(R)};Object(r.a)(function(){J&&je()},[p,ae,Q,J]),Object(r.a)(function(){if(ye===R)Te(O);else if(ye===O){var ze=d(ge.current,!1,ae,Q);Te(w),Ue(ze)}else Z()},[ye]);var Ve=N.useRef(),Re=function(){n.a.cancel(Ve.current)},Xe=function(Me){ye===w&&(z==null||z(Me),U&&(Re(),Ve.current=Object(n.a)(function(){je()})))};N.useEffect(function(){return Re},[]);var Qe=J?Oe:null,We=Object(T.a)(Object(T.a)({},$),Qe);return(ye===R||ye===O)&&(We.overflowY="hidden",We.overflowX="hidden"),N.createElement(_.a,{onResize:Xe,disabled:!(U||z)},N.createElement("textarea",Object(B.a)({},me,{ref:ge,style:We,className:v()(a,q,Object(i.a)({},"".concat(a,"-disabled"),re)),disabled:re,value:se,onChange:De})))}),A=D,P=function(u){Object(X.a)(g,u);var k=Object(K.a)(g);function g(a){var C;Object(M.a)(this,g),C=k.call(this,a),C.resizableTextArea=void 0,C.focus=function(){C.resizableTextArea.textArea.focus()},C.saveTextArea=function(p){C.resizableTextArea=p},C.handleChange=function(p){var U=C.props.onChange;C.setValue(p.target.value),U&&U(p)},C.handleKeyDown=function(p){var U=C.props,z=U.onPressEnter,q=U.onKeyDown;p.keyCode===13&&z&&z(p),q&&q(p)};var S=typeof a.value=="undefined"||a.value===null?a.defaultValue:a.value;return C.state={value:S},C}return Object(G.a)(g,[{key:"setValue",value:function(C,S){"value"in this.props||this.setState({value:C},S)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return N.createElement(A,Object(B.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(C){return"value"in C?{value:C.value}:null}}]),g}(N.Component),I=ee.default=P},"yg+E":function(W,ee,L){"use strict";L.r(ee),L.d(ee,"BaseInput",function(){return r});var B=L("XjgL"),M=L("kxoy"),G=L("T/Jt"),X=L.n(G),K=L("27eb"),N=L.n(K);function i(x){return!!(x.addonBefore||x.addonAfter)}function T(x){return!!(x.prefix||x.suffix||x.allowClear)}function e(x,R,O,w){if(!O)return;var D=R;if(R.type==="click"){var A=x.cloneNode(!0);D=Object.create(R,{target:{value:A},currentTarget:{value:A}}),A.value="",O(D);return}if(w!==void 0){D=Object.create(R,{target:{value:x},currentTarget:{value:x}}),x.value=w,O(D);return}O(D)}function E(x,R){if(!x)return;x.focus(R);var O=R||{},w=O.cursor;if(w){var D=x.value.length;switch(w){case"start":x.setSelectionRange(0,0);break;case"end":x.setSelectionRange(D,D);break;default:x.setSelectionRange(0,D)}}}function l(x){return typeof x=="undefined"||x===null?"":String(x)}var _=function(R){var O=R.inputElement,w=R.prefixCls,D=R.prefix,A=R.suffix,P=R.addonBefore,I=R.addonAfter,u=R.className,k=R.style,g=R.affixWrapperClassName,a=R.groupClassName,C=R.wrapperClassName,S=R.disabled,p=R.readOnly,U=R.focused,z=R.triggerFocus,q=R.allowClear,$=R.value,re=R.handleReset,ce=R.hidden,ne=Object(G.useRef)(null),me=function(Z){var pe;(pe=ne.current)!==null&&pe!==void 0&&pe.contains(Z.target)&&(z==null||z())},be=function(){var Z;if(!q)return null;var pe=!S&&!p&&$,le="".concat(w,"-clear-icon"),ye=Object(M.a)(q)==="object"&&q!==null&&q!==void 0&&q.clearIcon?q.clearIcon:"\u2716";return X.a.createElement("span",{onClick:re,onMouseDown:function(Pe){return Pe.preventDefault()},className:N()(le,(Z={},Object(B.a)(Z,"".concat(le,"-hidden"),!pe),Object(B.a)(Z,"".concat(le,"-has-suffix"),!!A),Z)),role:"button",tabIndex:-1},ye)},he=Object(G.cloneElement)(O,{value:$,hidden:ce});if(T(R)){var se,_e="".concat(w,"-affix-wrapper"),De=N()(_e,(se={},Object(B.a)(se,"".concat(_e,"-disabled"),S),Object(B.a)(se,"".concat(_e,"-focused"),U),Object(B.a)(se,"".concat(_e,"-readonly"),p),Object(B.a)(se,"".concat(_e,"-input-with-clear-btn"),A&&q&&$),se),!i(R)&&u,g),ge=(A||q)&&X.a.createElement("span",{className:"".concat(w,"-suffix")},be(),A);he=X.a.createElement("span",{className:De,style:k,hidden:!i(R)&&ce,onClick:me,ref:ne},D&&X.a.createElement("span",{className:"".concat(w,"-prefix")},D),Object(G.cloneElement)(O,{style:null,value:$,hidden:null}),ge)}if(i(R)){var fe="".concat(w,"-group"),Ce="".concat(fe,"-addon"),ae=N()("".concat(w,"-wrapper"),fe,C),Q=N()("".concat(w,"-group-wrapper"),u,a);return X.a.createElement("span",{className:Q,style:k,hidden:ce},X.a.createElement("span",{className:ae},P&&X.a.createElement("span",{className:Ce},P),Object(G.cloneElement)(he,{style:null,hidden:null}),I&&X.a.createElement("span",{className:Ce},I)))}return he},r=_,n=L("aVTQ"),o=L("yuO0"),c=L("36hc"),v=L("fNpE"),f=L("N7A4"),y=L("8wWb"),h=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","inputClassName"],b=Object(G.forwardRef)(function(x,R){var O=x.autoComplete,w=x.onChange,D=x.onFocus,A=x.onBlur,P=x.onPressEnter,I=x.onKeyDown,u=x.prefixCls,k=u===void 0?"rc-input":u,g=x.disabled,a=x.htmlSize,C=x.className,S=x.maxLength,p=x.suffix,U=x.showCount,z=x.type,q=z===void 0?"text":z,$=x.inputClassName,re=Object(v.a)(x,h),ce=Object(y.a)(x.defaultValue,{value:x.value}),ne=Object(c.a)(ce,2),me=ne[0],be=ne[1],he=Object(G.useState)(!1),se=Object(c.a)(he,2),_e=se[0],De=se[1],ge=Object(G.useRef)(null),fe=function(Te){ge.current&&E(ge.current,Te)};Object(G.useImperativeHandle)(R,function(){return{focus:fe,blur:function(){var Te;(Te=ge.current)===null||Te===void 0||Te.blur()},setSelectionRange:function(Te,Pe,He){var Oe;(Oe=ge.current)===null||Oe===void 0||Oe.setSelectionRange(Te,Pe,He)},select:function(){var Te;(Te=ge.current)===null||Te===void 0||Te.select()},input:ge.current}}),Object(G.useEffect)(function(){De(function(ye){return ye&&g?!1:ye})},[g]);var Ce=function(Te){x.value===void 0&&be(Te.target.value),ge.current&&e(ge.current,Te,w)},ae=function(Te){P&&Te.key==="Enter"&&P(Te),I==null||I(Te)},Q=function(Te){De(!0),D==null||D(Te)},J=function(Te){De(!1),A==null||A(Te)},Z=function(Te){be(""),fe(),ge.current&&e(ge.current,Te,w)},pe=function(){var Te=Object(f.a)(x,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName","htmlSize"]);return X.a.createElement("input",Object(o.a)({autoComplete:O},Te,{onChange:Ce,onFocus:Q,onBlur:J,onKeyDown:ae,className:N()(k,Object(B.a)({},"".concat(k,"-disabled"),g),$,!i(x)&&!T(x)&&C),ref:ge,size:a,type:q}))},le=function(){var Te=Number(S)>0;if(p||U){var Pe=l(me),He=Object(n.a)(Pe).length,Oe=Object(M.a)(U)==="object"?U.formatter({value:Pe,count:He,maxLength:S}):"".concat(He).concat(Te?" / ".concat(S):"");return X.a.createElement(X.a.Fragment,null,!!U&&X.a.createElement("span",{className:N()("".concat(k,"-show-count-suffix"),Object(B.a)({},"".concat(k,"-show-count-has-suffix"),!!p))},Oe),p)}return null};return X.a.createElement(r,Object(o.a)({},re,{prefixCls:k,className:C,inputElement:pe(),handleReset:Z,value:l(me),focused:_e,triggerFocus:fe,suffix:le(),disabled:g}))}),m=b,d=ee.default=m},yhAM:function(W,ee,L){"use strict";var B=L("yuO0"),M=L("XjgL"),G=L("6ASS"),X=L("36hc"),K=L("kxoy"),N=L("fNpE"),i=L("T/Jt"),T=L("27eb"),e=L.n(T),E=L("EOd9"),l=L("8wWb"),_=L("J5No"),r=Object(i.createContext)(null),n=i.forwardRef(function(Oe,Ue){var je=Oe.prefixCls,Ve=Oe.className,Re=Oe.style,Xe=Oe.id,Qe=Oe.active,We=Oe.tabKey,ze=Oe.children;return i.createElement("div",{id:Xe&&"".concat(Xe,"-panel-").concat(We),role:"tabpanel",tabIndex:Qe?0:-1,"aria-labelledby":Xe&&"".concat(Xe,"-tab-").concat(We),"aria-hidden":!Qe,style:Re,className:e()(je,Qe&&"".concat(je,"-active"),Ve),ref:Ue},ze)}),o=n,c=["key","forceRender","style","className"];function v(Oe){var Ue=Oe.id,je=Oe.activeKey,Ve=Oe.animated,Re=Oe.tabPosition,Xe=Oe.destroyInactiveTabPane,Qe=i.useContext(r),We=Qe.prefixCls,ze=Qe.tabs,Me=Ve.tabPane,Ie="".concat(We,"-tabpane");return i.createElement("div",{className:e()("".concat(We,"-content-holder"))},i.createElement("div",{className:e()("".concat(We,"-content"),"".concat(We,"-content-").concat(Re),Object(M.a)({},"".concat(We,"-content-animated"),Me))},ze.map(function(Be){var we=Be.key,Ae=Be.forceRender,ke=Be.style,Le=Be.className,Ke=Object(N.a)(Be,c),Ze=we===je;return i.createElement(_.default,Object(B.a)({key:we,visible:Ze,forceRender:Ae,removeOnLeave:!!Xe,leavedClassName:"".concat(Ie,"-hidden")},Ve.tabPaneMotion),function(Ne,$e){var Je=Ne.style,qe=Ne.className;return i.createElement(o,Object(B.a)({},Ke,{prefixCls:Ie,id:Ue,tabKey:we,animated:Me,active:Ze,style:Object(G.a)(Object(G.a)({},ke),Je),className:e()(Le,qe),ref:$e}))})})))}var f=L("aVTQ"),y=L("s3yx"),h=L("HnKm"),b=L("IRwA"),m=L("Eiay"),d={width:0,height:0,left:0,top:0};function x(Oe,Ue,je){return Object(i.useMemo)(function(){for(var Ve,Re=new Map,Xe=Ue.get((Ve=Oe[0])===null||Ve===void 0?void 0:Ve.key)||d,Qe=Xe.left+Xe.width,We=0;We<Oe.length;We+=1){var ze=Oe[We].key,Me=Ue.get(ze);if(!Me){var Ie;Me=Ue.get((Ie=Oe[We-1])===null||Ie===void 0?void 0:Ie.key)||d}var Be=Re.get(ze)||Object(G.a)({},Me);Be.right=Qe-Be.left-Be.width,Re.set(ze,Be)}return Re},[Oe.map(function(Ve){return Ve.key}).join("_"),Ue,je])}function R(Oe,Ue){var je=i.useRef(Oe),Ve=i.useState({}),Re=Object(X.a)(Ve,2),Xe=Re[1];function Qe(We){var ze=typeof We=="function"?We(je.current):We;ze!==je.current&&Ue(ze,je.current),je.current=ze,Xe({})}return[je.current,Qe]}var O=.1,w=.01,D=20,A=Math.pow(.995,D);function P(Oe,Ue){var je=Object(i.useState)(),Ve=Object(X.a)(je,2),Re=Ve[0],Xe=Ve[1],Qe=Object(i.useState)(0),We=Object(X.a)(Qe,2),ze=We[0],Me=We[1],Ie=Object(i.useState)(0),Be=Object(X.a)(Ie,2),we=Be[0],Ae=Be[1],ke=Object(i.useState)(),Le=Object(X.a)(ke,2),Ke=Le[0],Ze=Le[1],Ne=Object(i.useRef)();function $e(dt){var nt=dt.touches[0],mt=nt.screenX,yt=nt.screenY;Xe({x:mt,y:yt}),window.clearInterval(Ne.current)}function Je(dt){if(!Re)return;dt.preventDefault();var nt=dt.touches[0],mt=nt.screenX,yt=nt.screenY;Xe({x:mt,y:yt});var ft=mt-Re.x,ht=yt-Re.y;Ue(ft,ht);var Rt=Date.now();Me(Rt),Ae(Rt-ze),Ze({x:ft,y:ht})}function qe(){if(!Re)return;if(Xe(null),Ze(null),Ke){var dt=Ke.x/we,nt=Ke.y/we,mt=Math.abs(dt),yt=Math.abs(nt);if(Math.max(mt,yt)<O)return;var ft=dt,ht=nt;Ne.current=window.setInterval(function(){if(Math.abs(ft)<w&&Math.abs(ht)<w){window.clearInterval(Ne.current);return}ft*=A,ht*=A,Ue(ft*D,ht*D)},D)}}var ot=Object(i.useRef)();function at(dt){var nt=dt.deltaX,mt=dt.deltaY,yt=0,ft=Math.abs(nt),ht=Math.abs(mt);ft===ht?yt=ot.current==="x"?nt:mt:ft>ht?(yt=nt,ot.current="x"):(yt=mt,ot.current="y"),Ue(-yt,-yt)&&dt.preventDefault()}var rt=Object(i.useRef)(null);rt.current={onTouchStart:$e,onTouchMove:Je,onTouchEnd:qe,onWheel:at},i.useEffect(function(){function dt(ft){rt.current.onTouchStart(ft)}function nt(ft){rt.current.onTouchMove(ft)}function mt(ft){rt.current.onTouchEnd(ft)}function yt(ft){rt.current.onWheel(ft)}return document.addEventListener("touchmove",nt,{passive:!1}),document.addEventListener("touchend",mt,{passive:!1}),Oe.current.addEventListener("touchstart",dt,{passive:!1}),Oe.current.addEventListener("wheel",yt),function(){document.removeEventListener("touchmove",nt),document.removeEventListener("touchend",mt)}},[])}var I=L("s7W6");function u(Oe){var Ue=Object(i.useState)(0),je=Object(X.a)(Ue,2),Ve=je[0],Re=je[1],Xe=Object(i.useRef)(0),Qe=Object(i.useRef)();return Qe.current=Oe,Object(I.b)(function(){var We;(We=Qe.current)===null||We===void 0||We.call(Qe)},[Ve]),function(){if(Xe.current!==Ve)return;Xe.current+=1,Re(Xe.current)}}function k(Oe){var Ue=Object(i.useRef)([]),je=Object(i.useState)({}),Ve=Object(X.a)(je,2),Re=Ve[1],Xe=Object(i.useRef)(typeof Oe=="function"?Oe():Oe),Qe=u(function(){var ze=Xe.current;Ue.current.forEach(function(Me){ze=Me(ze)}),Ue.current=[],Xe.current=ze,Re({})});function We(ze){Ue.current.push(ze),Qe()}return[Xe.current,We]}var g={width:0,height:0,left:0,top:0,right:0};function a(Oe,Ue,je,Ve,Re,Xe,Qe){var We=Qe.tabs,ze=Qe.tabPosition,Me=Qe.rtl,Ie,Be,we;return["top","bottom"].includes(ze)?(Ie="width",Be=Me?"right":"left",we=Math.abs(je)):(Ie="height",Be="top",we=-je),Object(i.useMemo)(function(){if(!We.length)return[0,0];for(var Ae=We.length,ke=Ae,Le=0;Le<Ae;Le+=1){var Ke=Oe.get(We[Le].key)||g;if(Ke[Be]+Ke[Ie]>we+Ue){ke=Le-1;break}}for(var Ze=0,Ne=Ae-1;Ne>=0;Ne-=1){var $e=Oe.get(We[Ne].key)||g;if($e[Be]<we){Ze=Ne+1;break}}return[Ze,ke]},[Oe,Ue,Ve,Re,Xe,we,ze,We.map(function(Ae){return Ae.key}).join("_"),Me])}function C(Oe){var Ue;return Oe instanceof Map?(Ue={},Oe.forEach(function(je,Ve){Ue[Ve]=je})):Ue=Oe,JSON.stringify(Ue)}var S="TABS_DQ";function p(Oe){return String(Oe).replace(/"/g,S)}function U(Oe,Ue){var je=Oe.prefixCls,Ve=Oe.editable,Re=Oe.locale,Xe=Oe.style;return!Ve||Ve.showAdd===!1?null:i.createElement("button",{ref:Ue,type:"button",className:"".concat(je,"-nav-add"),style:Xe,"aria-label":(Re==null?void 0:Re.addAriaLabel)||"Add tab",onClick:function(We){Ve.onEdit("add",{event:We})}},Ve.addIcon||"+")}var z=i.forwardRef(U),q=i.forwardRef(function(Oe,Ue){var je=Oe.position,Ve=Oe.prefixCls,Re=Oe.extra;if(!Re)return null;var Xe,Qe={};return Object(K.a)(Re)==="object"&&!i.isValidElement(Re)?Qe=Re:Qe.right=Re,je==="right"&&(Xe=Qe.right),je==="left"&&(Xe=Qe.left),Xe?i.createElement("div",{className:"".concat(Ve,"-extra-content"),ref:Ue},Xe):null}),$=q,re=L("bgne"),ce=L("ADms"),ne=L("sg8A");function me(Oe,Ue){var je=Oe.prefixCls,Ve=Oe.id,Re=Oe.tabs,Xe=Oe.locale,Qe=Oe.mobile,We=Oe.moreIcon,ze=We===void 0?"More":We,Me=Oe.moreTransitionName,Ie=Oe.style,Be=Oe.className,we=Oe.editable,Ae=Oe.tabBarGutter,ke=Oe.rtl,Le=Oe.removeAriaLabel,Ke=Oe.onTabClick,Ze=Oe.getPopupContainer,Ne=Oe.popupClassName,$e=Object(i.useState)(!1),Je=Object(X.a)($e,2),qe=Je[0],ot=Je[1],at=Object(i.useState)(null),rt=Object(X.a)(at,2),dt=rt[0],nt=rt[1],mt="".concat(Ve,"-more-popup"),yt="".concat(je,"-dropdown"),ft=dt!==null?"".concat(mt,"-").concat(dt):null,ht=Xe==null?void 0:Xe.dropdownAriaLabel;function Rt(ct,bt){ct.preventDefault(),ct.stopPropagation(),we.onEdit("remove",{key:bt,event:ct})}var Wt=i.createElement(ce.g,{onClick:function(bt){var gt=bt.key,Ut=bt.domEvent;Ke(gt,Ut),ot(!1)},prefixCls:"".concat(yt,"-menu"),id:mt,tabIndex:-1,role:"listbox","aria-activedescendant":ft,selectedKeys:[dt],"aria-label":ht!==void 0?ht:"expanded dropdown"},Re.map(function(ct){var bt=we&&ct.closable!==!1&&!ct.disabled;return i.createElement(ce.d,{key:ct.key,id:"".concat(mt,"-").concat(ct.key),role:"option","aria-controls":Ve&&"".concat(Ve,"-panel-").concat(ct.key),disabled:ct.disabled},i.createElement("span",null,ct.label),bt&&i.createElement("button",{type:"button","aria-label":Le||"remove",tabIndex:0,className:"".concat(yt,"-menu-item-remove"),onClick:function(Ut){Ut.stopPropagation(),Rt(Ut,ct.key)}},ct.closeIcon||we.removeIcon||"\xD7"))}));function wt(ct){for(var bt=Re.filter(function(St){return!St.disabled}),gt=bt.findIndex(function(St){return St.key===dt})||0,Ut=bt.length,Lt=0;Lt<Ut;Lt+=1){gt=(gt+ct+Ut)%Ut;var It=bt[gt];if(!It.disabled){nt(It.key);return}}}function lt(ct){var bt=ct.which;if(!qe){[ne.a.DOWN,ne.a.SPACE,ne.a.ENTER].includes(bt)&&(ot(!0),ct.preventDefault());return}switch(bt){case ne.a.UP:wt(-1),ct.preventDefault();break;case ne.a.DOWN:wt(1),ct.preventDefault();break;case ne.a.ESC:ot(!1);break;case ne.a.SPACE:case ne.a.ENTER:dt!==null&&Ke(dt,ct);break}}Object(i.useEffect)(function(){var ct=document.getElementById(ft);ct&&ct.scrollIntoView&&ct.scrollIntoView(!1)},[dt]),Object(i.useEffect)(function(){qe||nt(null)},[qe]);var _t=Object(M.a)({},ke?"marginRight":"marginLeft",Ae);Re.length||(_t.visibility="hidden",_t.order=1);var jt=e()(Object(M.a)({},"".concat(yt,"-rtl"),ke)),Ht=Qe?null:i.createElement(re.a,{prefixCls:yt,overlay:Wt,trigger:["hover"],visible:Re.length?qe:!1,transitionName:Me,onVisibleChange:ot,overlayClassName:e()(jt,Ne),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:Ze},i.createElement("button",{type:"button",className:"".concat(je,"-nav-more"),style:_t,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":mt,id:"".concat(Ve,"-more"),"aria-expanded":qe,onKeyDown:lt},ze));return i.createElement("div",{className:e()("".concat(je,"-nav-operations"),Be),style:Ie,ref:Ue},Ht,i.createElement(z,{prefixCls:je,locale:Xe,editable:we}))}var be=i.memo(i.forwardRef(me),function(Oe,Ue){return Ue.tabMoving});function he(Oe){var Ue,je=Oe.prefixCls,Ve=Oe.id,Re=Oe.active,Xe=Oe.tab,Qe=Xe.key,We=Xe.label,ze=Xe.disabled,Me=Xe.closeIcon,Ie=Oe.closable,Be=Oe.renderWrapper,we=Oe.removeAriaLabel,Ae=Oe.editable,ke=Oe.onClick,Le=Oe.onFocus,Ke=Oe.style,Ze="".concat(je,"-tab"),Ne=Ae&&Ie!==!1&&!ze;function $e(ot){if(ze)return;ke(ot)}function Je(ot){ot.preventDefault(),ot.stopPropagation(),Ae.onEdit("remove",{key:Qe,event:ot})}var qe=i.createElement("div",{key:Qe,"data-node-key":p(Qe),className:e()(Ze,(Ue={},Object(M.a)(Ue,"".concat(Ze,"-with-remove"),Ne),Object(M.a)(Ue,"".concat(Ze,"-active"),Re),Object(M.a)(Ue,"".concat(Ze,"-disabled"),ze),Ue)),style:Ke,onClick:$e},i.createElement("div",{role:"tab","aria-selected":Re,id:Ve&&"".concat(Ve,"-tab-").concat(Qe),className:"".concat(Ze,"-btn"),"aria-controls":Ve&&"".concat(Ve,"-panel-").concat(Qe),"aria-disabled":ze,tabIndex:ze?null:0,onClick:function(at){at.stopPropagation(),$e(at)},onKeyDown:function(at){[ne.a.SPACE,ne.a.ENTER].includes(at.which)&&(at.preventDefault(),$e(at))},onFocus:Le},We),Ne&&i.createElement("button",{type:"button","aria-label":we||"remove",tabIndex:0,className:"".concat(Ze,"-remove"),onClick:function(at){at.stopPropagation(),Je(at)}},Me||Ae.removeIcon||"\xD7"));return Be?Be(qe):qe}var se=he,_e=function(Ue){var je=Ue.current||{},Ve=je.offsetWidth,Re=Ve===void 0?0:Ve,Xe=je.offsetHeight,Qe=Xe===void 0?0:Xe;return[Re,Qe]},De=function(Ue,je){return Ue[je?0:1]};function ge(Oe,Ue){var je,Ve=i.useContext(r),Re=Ve.prefixCls,Xe=Ve.tabs,Qe=Oe.className,We=Oe.style,ze=Oe.id,Me=Oe.animated,Ie=Oe.activeKey,Be=Oe.rtl,we=Oe.extra,Ae=Oe.editable,ke=Oe.locale,Le=Oe.tabPosition,Ke=Oe.tabBarGutter,Ze=Oe.children,Ne=Oe.onTabClick,$e=Oe.onTabScroll,Je=Object(i.useRef)(),qe=Object(i.useRef)(),ot=Object(i.useRef)(),at=Object(i.useRef)(),rt=Object(i.useRef)(),dt=Object(i.useRef)(),nt=Object(i.useRef)(),mt=Le==="top"||Le==="bottom",yt=R(0,function(hr,rr){mt&&$e&&$e({direction:hr>rr?"left":"right"})}),ft=Object(X.a)(yt,2),ht=ft[0],Rt=ft[1],Wt=R(0,function(hr,rr){!mt&&$e&&$e({direction:hr>rr?"top":"bottom"})}),wt=Object(X.a)(Wt,2),lt=wt[0],_t=wt[1],jt=Object(i.useState)([0,0]),Ht=Object(X.a)(jt,2),ct=Ht[0],bt=Ht[1],gt=Object(i.useState)([0,0]),Ut=Object(X.a)(gt,2),Lt=Ut[0],It=Ut[1],St=Object(i.useState)([0,0]),Jt=Object(X.a)(St,2),kt=Jt[0],zt=Jt[1],st=Object(i.useState)([0,0]),pt=Object(X.a)(st,2),Ct=pt[0],Dt=pt[1],Tt=k(new Map),tr=Object(X.a)(Tt,2),yr=tr[0],Kt=tr[1],ue=x(Xe,yr,Lt[0]),V=De(ct,mt),Y=De(Lt,mt),ie=De(kt,mt),Ee=De(Ct,mt),oe=V<Y+ie,Fe=oe?V-Ee:V-ie,tt="".concat(Re,"-nav-operations-hidden"),xt=0,Ot=0;mt&&Be?(xt=0,Ot=Math.max(0,Y-Fe)):(xt=Math.min(0,Fe-Y),Ot=0);function ut(hr){return hr<xt?xt:hr>Ot?Ot:hr}var Ft=Object(i.useRef)(),Xt=Object(i.useState)(),er=Object(X.a)(Xt,2),nr=er[0],ur=er[1];function fr(){ur(Date.now())}function Pt(){window.clearTimeout(Ft.current)}P(at,function(hr,rr){function Ar(Dr,Jr){Dr(function(Qr){var cn=ut(Qr+Jr);return cn})}return oe?(mt?Ar(Rt,hr):Ar(_t,rr),Pt(),fr(),!0):!1}),Object(i.useEffect)(function(){return Pt(),nr&&(Ft.current=window.setTimeout(function(){ur(0)},100)),Pt},[nr]);var sr=a(ue,Fe,mt?ht:lt,Y,ie,Ee,Object(G.a)(Object(G.a)({},Oe),{},{tabs:Xe})),lr=Object(X.a)(sr,2),br=lr[0],$t=lr[1],$r=Object(h.a)(function(){var hr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ie,rr=ue.get(hr)||{width:0,height:0,left:0,right:0,top:0};if(mt){var Ar=ht;Be?rr.right<ht?Ar=rr.right:rr.right+rr.width>ht+Fe&&(Ar=rr.right+rr.width-Fe):rr.left<-ht?Ar=-rr.left:rr.left+rr.width>-ht+Fe&&(Ar=-(rr.left+rr.width-Fe)),_t(0),Rt(ut(Ar))}else{var Dr=lt;rr.top<-lt?Dr=-rr.top:rr.top+rr.height>-lt+Fe&&(Dr=-(rr.top+rr.height-Fe)),Rt(0),_t(ut(Dr))}}),jr={};Le==="top"||Le==="bottom"?jr[Be?"marginRight":"marginLeft"]=Ke:jr.marginTop=Ke;var Kn=Xe.map(function(hr,rr){var Ar=hr.key;return i.createElement(se,{id:ze,prefixCls:Re,key:Ar,tab:hr,style:rr===0?void 0:jr,closable:hr.closable,editable:Ae,active:Ar===Ie,renderWrapper:Ze,removeAriaLabel:ke==null?void 0:ke.removeAriaLabel,onClick:function(Jr){Ne(Ar,Jr)},onFocus:function(){if($r(Ar),fr(),!at.current)return;Be||(at.current.scrollLeft=0),at.current.scrollTop=0}})}),Xr=function(){return Kt(function(){var rr=new Map;return Xe.forEach(function(Ar){var Dr,Jr=Ar.key,Qr=(Dr=rt.current)===null||Dr===void 0?void 0:Dr.querySelector('[data-node-key="'.concat(p(Jr),'"]'));Qr&&rr.set(Jr,{width:Qr.offsetWidth,height:Qr.offsetHeight,left:Qr.offsetLeft,top:Qr.offsetTop})}),rr})};Object(i.useEffect)(function(){Xr()},[Xe.map(function(hr){return hr.key}).join("_")]);var pn=u(function(){var hr=_e(Je),rr=_e(qe),Ar=_e(ot);bt([hr[0]-rr[0]-Ar[0],hr[1]-rr[1]-Ar[1]]);var Dr=_e(nt);zt(Dr);var Jr=_e(dt);Dt(Jr);var Qr=_e(rt);It([Qr[0]-Dr[0],Qr[1]-Dr[1]]),Xr()}),rn=Xe.slice(0,br),Nn=Xe.slice($t+1),Cr=[].concat(Object(f.a)(rn),Object(f.a)(Nn)),nn=Object(i.useState)(),Tn=Object(X.a)(nn,2),an=Tn[0],Pr=Tn[1],cr=ue.get(Ie),Nr=Object(i.useRef)();function mr(){b.a.cancel(Nr.current)}Object(i.useEffect)(function(){var hr={};return cr&&(mt?(Be?hr.right=cr.right:hr.left=cr.left,hr.width=cr.width):(hr.top=cr.top,hr.height=cr.height)),mr(),Nr.current=Object(b.a)(function(){Pr(hr)}),mr},[cr,mt,Be]),Object(i.useEffect)(function(){$r()},[Ie,xt,Ot,C(cr),C(ue),mt]),Object(i.useEffect)(function(){pn()},[Be]);var zr=!!Cr.length,Or="".concat(Re,"-nav-wrap"),Vr,Wr,vn,Dn;return mt?Be?(Wr=ht>0,Vr=ht!==Ot):(Vr=ht<0,Wr=ht!==xt):(vn=lt<0,Dn=lt!==xt),i.createElement(y.a,{onResize:pn},i.createElement("div",{ref:Object(m.d)(Ue,Je),role:"tablist",className:e()("".concat(Re,"-nav"),Qe),style:We,onKeyDown:function(){fr()}},i.createElement($,{ref:qe,position:"left",extra:we,prefixCls:Re}),i.createElement("div",{className:e()(Or,(je={},Object(M.a)(je,"".concat(Or,"-ping-left"),Vr),Object(M.a)(je,"".concat(Or,"-ping-right"),Wr),Object(M.a)(je,"".concat(Or,"-ping-top"),vn),Object(M.a)(je,"".concat(Or,"-ping-bottom"),Dn),je)),ref:at},i.createElement(y.a,{onResize:pn},i.createElement("div",{ref:rt,className:"".concat(Re,"-nav-list"),style:{transform:"translate(".concat(ht,"px, ").concat(lt,"px)"),transition:nr?"none":void 0}},Kn,i.createElement(z,{ref:nt,prefixCls:Re,locale:ke,editable:Ae,style:Object(G.a)(Object(G.a)({},Kn.length===0?void 0:jr),{},{visibility:zr?"hidden":null})}),i.createElement("div",{className:e()("".concat(Re,"-ink-bar"),Object(M.a)({},"".concat(Re,"-ink-bar-animated"),Me.inkBar)),style:an})))),i.createElement(be,Object(B.a)({},Oe,{removeAriaLabel:ke==null?void 0:ke.removeAriaLabel,ref:dt,prefixCls:Re,tabs:Cr,className:!zr&&tt,tabMoving:!!nr})),i.createElement($,{ref:ot,position:"right",extra:we,prefixCls:Re})))}var fe=i.forwardRef(ge),Ce=["renderTabBar"],ae=["label","key"];function Q(Oe){var Ue=Oe.renderTabBar,je=Object(N.a)(Oe,Ce),Ve=i.useContext(r),Re=Ve.tabs;if(Ue){var Xe=Object(G.a)(Object(G.a)({},je),{},{panes:Re.map(function(Qe){var We=Qe.label,ze=Qe.key,Me=Object(N.a)(Qe,ae);return i.createElement(o,Object(B.a)({tab:We,key:ze,tabKey:ze},Me))})});return Ue(Xe,fe)}return i.createElement(fe,je)}var J=L("B/uU");function Z(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},Ue;return Oe===!1?Ue={inkBar:!1,tabPane:!1}:Oe===!0?Ue={inkBar:!0,tabPane:!1}:Ue=Object(G.a)({inkBar:!0},Object(K.a)(Oe)==="object"?Oe:{}),Ue.tabPaneMotion&&Ue.tabPane===void 0&&(Ue.tabPane=!0),!Ue.tabPaneMotion&&Ue.tabPane&&(Ue.tabPane=!1),Ue}var pe=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName"],le=0;function ye(Oe,Ue){var je,Ve=Oe.id,Re=Oe.prefixCls,Xe=Re===void 0?"rc-tabs":Re,Qe=Oe.className,We=Oe.items,ze=Oe.direction,Me=Oe.activeKey,Ie=Oe.defaultActiveKey,Be=Oe.editable,we=Oe.animated,Ae=Oe.tabPosition,ke=Ae===void 0?"top":Ae,Le=Oe.tabBarGutter,Ke=Oe.tabBarStyle,Ze=Oe.tabBarExtraContent,Ne=Oe.locale,$e=Oe.moreIcon,Je=Oe.moreTransitionName,qe=Oe.destroyInactiveTabPane,ot=Oe.renderTabBar,at=Oe.onChange,rt=Oe.onTabClick,dt=Oe.onTabScroll,nt=Oe.getPopupContainer,mt=Oe.popupClassName,yt=Object(N.a)(Oe,pe),ft=i.useMemo(function(){return(We||[]).filter(function(Tt){return Tt&&Object(K.a)(Tt)==="object"&&"key"in Tt})},[We]),ht=ze==="rtl",Rt=Z(we),Wt=Object(i.useState)(!1),wt=Object(X.a)(Wt,2),lt=wt[0],_t=wt[1];Object(i.useEffect)(function(){_t(Object(E.a)())},[]);var jt=Object(l.a)(function(){var Tt;return(Tt=ft[0])===null||Tt===void 0?void 0:Tt.key},{value:Me,defaultValue:Ie}),Ht=Object(X.a)(jt,2),ct=Ht[0],bt=Ht[1],gt=Object(i.useState)(function(){return ft.findIndex(function(Tt){return Tt.key===ct})}),Ut=Object(X.a)(gt,2),Lt=Ut[0],It=Ut[1];Object(i.useEffect)(function(){var Tt=ft.findIndex(function(yr){return yr.key===ct});if(Tt===-1){var tr;Tt=Math.max(0,Math.min(Lt,ft.length-1)),bt((tr=ft[Tt])===null||tr===void 0?void 0:tr.key)}It(Tt)},[ft.map(function(Tt){return Tt.key}).join("_"),ct,Lt]);var St=Object(l.a)(null,{value:Ve}),Jt=Object(X.a)(St,2),kt=Jt[0],zt=Jt[1];Object(i.useEffect)(function(){Ve||(zt("rc-tabs-".concat(le)),le+=1)},[]);function st(Tt,tr){rt==null||rt(Tt,tr);var yr=Tt!==ct;bt(Tt),yr&&(at==null||at(Tt))}var pt={id:kt,activeKey:ct,animated:Rt,tabPosition:ke,rtl:ht,mobile:lt},Ct,Dt=Object(G.a)(Object(G.a)({},pt),{},{editable:Be,locale:Ne,moreIcon:$e,moreTransitionName:Je,tabBarGutter:Le,onTabClick:st,onTabScroll:dt,extra:Ze,style:Ke,panes:null,getPopupContainer:nt,popupClassName:mt});return i.createElement(r.Provider,{value:{tabs:ft,prefixCls:Xe}},i.createElement("div",Object(B.a)({ref:Ue,id:Ve,className:e()(Xe,"".concat(Xe,"-").concat(ke),(je={},Object(M.a)(je,"".concat(Xe,"-mobile"),lt),Object(M.a)(je,"".concat(Xe,"-editable"),Be),Object(M.a)(je,"".concat(Xe,"-rtl"),ht),je),Qe)},yt),Ct,i.createElement(Q,Object(B.a)({},Dt,{renderTabBar:ot})),i.createElement(v,Object(B.a)({destroyInactiveTabPane:qe},pt,{animated:Rt}))))}var Te=i.forwardRef(ye),Pe=Te,He=ee.a=Pe},ynYK:function(W,ee,L){"use strict";var B=L("T/Jt"),M=L.n(B),G=B.createContext(null);ee.a=G},ynwM:function(W,ee,L){var B=L("MFOe"),M=B.Global;W.exports={name:"oldFF-globalStorage",read:X,write:K,each:N,remove:i,clearAll:T};var G=M.globalStorage;function X(e){return G[e]}function K(e,E){G[e]=E}function N(e){for(var E=G.length-1;E>=0;E--){var l=G.key(E);e(G[l],l)}}function i(e){return G.removeItem(e)}function T(){N(function(e,E){delete G[e]})}},zLVn:function(W,ee,L){"use strict";L.d(ee,"a",function(){return B});function B(M,G){if(M==null)return{};var X={},K=Object.keys(M),N,i;for(i=0;i<K.length;i++){if(N=K[i],G.indexOf(N)>=0)continue;X[N]=M[N]}return X}}}]);
|